Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
# Move generated files to the correct locations and clean up
rm -Rf docs && mv java-client/docs .
rm -Rf gradle && mv java-client/gradle .
rm -Rf src && mv java-client/src .
rm -Rf src/main && mv java-client/src/main src/
rm -Rf build.gradle && mv java-client/build.gradle .
rm -Rf build.sbt && mv java-client/build.sbt .
rm -Rf gradle.properties && mv java-client/gradle.properties .
Expand Down
2 changes: 1 addition & 1 deletion .sdk-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.32.0
v3.34.0
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>ai.reveng</groupId>
<artifactId>sdk</artifactId>
<version>3.32.0</version>
<version>3.34.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -31,7 +31,7 @@ repositories {
}

dependencies {
implementation "ai.reveng:sdk:3.32.0"
implementation "ai.reveng:sdk:3.34.0"
}
```

Expand Down Expand Up @@ -161,6 +161,7 @@ Class | Method | HTTP request | Description
*FunctionsCoreApi* | [**getAnalysisStringsStatus**](docs/FunctionsCoreApi.md#getAnalysisStringsStatus) | **GET** /v2/analyses/{analysis_id}/functions/strings/status | Get string processing state for the Analysis
*FunctionsCoreApi* | [**getFunctionBlocks**](docs/FunctionsCoreApi.md#getFunctionBlocks) | **GET** /v2/functions/{function_id}/blocks | Get disassembly blocks related to the function
*FunctionsCoreApi* | [**getFunctionCalleesCallers**](docs/FunctionsCoreApi.md#getFunctionCalleesCallers) | **GET** /v2/functions/{function_id}/callees_callers | Get list of functions that call or are called by the specified function
*FunctionsCoreApi* | [**getFunctionCalleesCallersBulk**](docs/FunctionsCoreApi.md#getFunctionCalleesCallersBulk) | **GET** /v2/functions/callees_callers | Get list of functions that call or are called for a list of functions
*FunctionsCoreApi* | [**getFunctionCapabilities**](docs/FunctionsCoreApi.md#getFunctionCapabilities) | **GET** /v2/functions/{function_id}/capabilities | Retrieve a functions capabilities
*FunctionsCoreApi* | [**getFunctionDetails**](docs/FunctionsCoreApi.md#getFunctionDetails) | **GET** /v2/functions/{function_id} | Get function details
*FunctionsCoreApi* | [**getFunctionStrings**](docs/FunctionsCoreApi.md#getFunctionStrings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function
Expand Down Expand Up @@ -272,6 +273,7 @@ Class | Method | HTTP request | Description
- [BaseResponseGetAiDecompilationTask](docs/BaseResponseGetAiDecompilationTask.md)
- [BaseResponseGetMeResponse](docs/BaseResponseGetMeResponse.md)
- [BaseResponseGetPublicUserResponse](docs/BaseResponseGetPublicUserResponse.md)
- [BaseResponseListCalleesCallerFunctionsResponse](docs/BaseResponseListCalleesCallerFunctionsResponse.md)
- [BaseResponseListCollectionResults](docs/BaseResponseListCollectionResults.md)
- [BaseResponseListCommentResponse](docs/BaseResponseListCommentResponse.md)
- [BaseResponseListDieMatch](docs/BaseResponseListDieMatch.md)
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'

group = 'ai.reveng'
version = '3.32.0'
version = '3.34.0'



Expand Down Expand Up @@ -171,7 +171,7 @@ mavenPublishing {
publishToMavenCentral(true)
signAllPublications()

coordinates("ai.reveng", "sdk", "3.32.0")
coordinates("ai.reveng", "sdk", "3.34.0")

pom {
name = "sdk"
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "ai.reveng",
name := "sdk",
version := "3.32.0",
version := "3.34.0",
scalaVersion := "2.11.12",
scalacOptions ++= Seq("-feature"),
compile / javacOptions ++= Seq("-Xlint:deprecation"),
Expand Down
17 changes: 17 additions & 0 deletions docs/BaseResponseListCalleesCallerFunctionsResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@


# BaseResponseListCalleesCallerFunctionsResponse


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**status** | **Boolean** | Response status on whether the request succeeded | [optional] |
|**data** | [**List&lt;CalleesCallerFunctionsResponse&gt;**](CalleesCallerFunctionsResponse.md) | | [optional] |
|**message** | **String** | | [optional] |
|**errors** | [**List&lt;ErrorModel&gt;**](ErrorModel.md) | | [optional] |
|**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] |



1 change: 1 addition & 0 deletions docs/FunctionMatchingFilters.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
|**binaryIds** | **List&lt;Integer&gt;** | ID&#39;s of binaries to limit the search to, if empty, search all scoped binaries | [optional] |
|**collectionIds** | **List&lt;Integer&gt;** | ID&#39;s of collections to limit the search to, if empty, search all scoped collections | [optional] |
|**functionIds** | **List&lt;Long&gt;** | ID&#39;s of functions to limit the search to, if empty, search all scoped functions | [optional] |
|**userIds** | **List&lt;Integer&gt;** | ID&#39;s of users to limit the search to, if empty, search all scoped users | [optional] |
|**debugTypes** | [**List&lt;DebugTypesEnum&gt;**](#List&lt;DebugTypesEnum&gt;) | Limit the search to specific debug types, if empty, search all scoped debug &amp; non-debug functions | [optional] |


Expand Down
69 changes: 69 additions & 0 deletions docs/FunctionsCoreApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All URIs are relative to *https://api.reveng.ai*
| [**getAnalysisStringsStatus**](FunctionsCoreApi.md#getAnalysisStringsStatus) | **GET** /v2/analyses/{analysis_id}/functions/strings/status | Get string processing state for the Analysis |
| [**getFunctionBlocks**](FunctionsCoreApi.md#getFunctionBlocks) | **GET** /v2/functions/{function_id}/blocks | Get disassembly blocks related to the function |
| [**getFunctionCalleesCallers**](FunctionsCoreApi.md#getFunctionCalleesCallers) | **GET** /v2/functions/{function_id}/callees_callers | Get list of functions that call or are called by the specified function |
| [**getFunctionCalleesCallersBulk**](FunctionsCoreApi.md#getFunctionCalleesCallersBulk) | **GET** /v2/functions/callees_callers | Get list of functions that call or are called for a list of functions |
| [**getFunctionCapabilities**](FunctionsCoreApi.md#getFunctionCapabilities) | **GET** /v2/functions/{function_id}/capabilities | Retrieve a functions capabilities |
| [**getFunctionDetails**](FunctionsCoreApi.md#getFunctionDetails) | **GET** /v2/functions/{function_id} | Get function details |
| [**getFunctionStrings**](FunctionsCoreApi.md#getFunctionStrings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function |
Expand Down Expand Up @@ -736,6 +737,74 @@ public class Example {
| **200** | Successful Response | - |
| **422** | Invalid request parameters | - |

<a id="getFunctionCalleesCallersBulk"></a>
# **getFunctionCalleesCallersBulk**
> BaseResponseListCalleesCallerFunctionsResponse getFunctionCalleesCallersBulk(functionIds)

Get list of functions that call or are called for a list of functions

### Example
```java
// Import classes:
import ai.reveng.invoker.ApiClient;
import ai.reveng.invoker.ApiException;
import ai.reveng.invoker.Configuration;
import ai.reveng.invoker.auth.*;
import ai.reveng.invoker.models.*;
import ai.reveng.api.FunctionsCoreApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.reveng.ai");

// Configure API key authorization: APIKey
ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey");
APIKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKey.setApiKeyPrefix("Token");

FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient);
List<Integer> functionIds = Arrays.asList(); // List<Integer> |
try {
BaseResponseListCalleesCallerFunctionsResponse result = apiInstance.getFunctionCalleesCallersBulk(functionIds);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FunctionsCoreApi#getFunctionCalleesCallersBulk");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```

### Parameters

| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **functionIds** | [**List&lt;Integer&gt;**](Integer.md)| | |

### Return type

[**BaseResponseListCalleesCallerFunctionsResponse**](BaseResponseListCalleesCallerFunctionsResponse.md)

### Authorization

[APIKey](../README.md#APIKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Successful Response | - |
| **422** | Invalid request parameters | - |

<a id="getFunctionCapabilities"></a>
# **getFunctionCapabilities**
> BaseResponseFunctionCapabilityResponse getFunctionCapabilities(functionId)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>sdk</artifactId>
<packaging>jar</packaging>
<name>sdk</name>
<version>3.32.0</version>
<version>3.34.0</version>
<url>https://github.com/RevEngAI/sdk-java</url>
<description>Java SDK for the RevEng.AI API</description>
<scm>
Expand Down
135 changes: 135 additions & 0 deletions src/main/java/ai/reveng/api/FunctionsCoreApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import ai.reveng.model.BaseResponseFunctionCapabilityResponse;
import ai.reveng.model.BaseResponseFunctionStringsResponse;
import ai.reveng.model.BaseResponseFunctionsDetailResponse;
import ai.reveng.model.BaseResponseListCalleesCallerFunctionsResponse;
import ai.reveng.model.FunctionMatchingRequest;
import ai.reveng.model.FunctionMatchingResponse;

Expand Down Expand Up @@ -1476,6 +1477,140 @@ public okhttp3.Call getFunctionCalleesCallersAsync(@javax.annotation.Nonnull Int
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getFunctionCalleesCallersBulk
* @param functionIds (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
<table border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
*/
public okhttp3.Call getFunctionCalleesCallersBulkCall(@javax.annotation.Nonnull List<Integer> functionIds, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };

// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}

Object localVarPostBody = null;

// create path and map variables
String localVarPath = "/v2/functions/callees_callers";

List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();

if (functionIds != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "function_ids", functionIds));
}

final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}

final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}

String[] localVarAuthNames = new String[] { "APIKey" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}

@SuppressWarnings("rawtypes")
private okhttp3.Call getFunctionCalleesCallersBulkValidateBeforeCall(@javax.annotation.Nonnull List<Integer> functionIds, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'functionIds' is set
if (functionIds == null) {
throw new ApiException("Missing the required parameter 'functionIds' when calling getFunctionCalleesCallersBulk(Async)");
}

return getFunctionCalleesCallersBulkCall(functionIds, _callback);

}

/**
* Get list of functions that call or are called for a list of functions
*
* @param functionIds (required)
* @return BaseResponseListCalleesCallerFunctionsResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
*/
public BaseResponseListCalleesCallerFunctionsResponse getFunctionCalleesCallersBulk(@javax.annotation.Nonnull List<Integer> functionIds) throws ApiException {
ApiResponse<BaseResponseListCalleesCallerFunctionsResponse> localVarResp = getFunctionCalleesCallersBulkWithHttpInfo(functionIds);
return localVarResp.getData();
}

/**
* Get list of functions that call or are called for a list of functions
*
* @param functionIds (required)
* @return ApiResponse&lt;BaseResponseListCalleesCallerFunctionsResponse&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
*/
public ApiResponse<BaseResponseListCalleesCallerFunctionsResponse> getFunctionCalleesCallersBulkWithHttpInfo(@javax.annotation.Nonnull List<Integer> functionIds) throws ApiException {
okhttp3.Call localVarCall = getFunctionCalleesCallersBulkValidateBeforeCall(functionIds, null);
Type localVarReturnType = new TypeToken<BaseResponseListCalleesCallerFunctionsResponse>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}

/**
* Get list of functions that call or are called for a list of functions (asynchronously)
*
* @param functionIds (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
<table border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
*/
public okhttp3.Call getFunctionCalleesCallersBulkAsync(@javax.annotation.Nonnull List<Integer> functionIds, final ApiCallback<BaseResponseListCalleesCallerFunctionsResponse> _callback) throws ApiException {

okhttp3.Call localVarCall = getFunctionCalleesCallersBulkValidateBeforeCall(functionIds, _callback);
Type localVarReturnType = new TypeToken<BaseResponseListCalleesCallerFunctionsResponse>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getFunctionCapabilities
* @param functionId (required)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/reveng/invoker/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("OpenAPI-Generator/3.32.0/java");
setUserAgent("OpenAPI-Generator/3.34.0/java");

authentications = new HashMap<String, Authentication>();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/reveng/invoker/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Configuration {
public static final String VERSION = "3.32.0";
public static final String VERSION = "3.34.0";

private static final AtomicReference<ApiClient> defaultApiClient = new AtomicReference<>();
private static volatile Supplier<ApiClient> apiClientFactory = ApiClient::new;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ai/reveng/invoker/JSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseGetAiDecompilationTask.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseGetMeResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseGetPublicUserResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListCalleesCallerFunctionsResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListCollectionResults.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListCommentResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListDieMatch.CustomTypeAdapterFactory());
Expand Down
Loading