Skip to content

Commit 2d0fb80

Browse files
authored
Merge pull request #105 from RevEngAI/sdk-update-v3.34.0
🤖 Update SDK to version v3.34.0
2 parents cd9b866 + b3829dc commit 2d0fb80

16 files changed

Lines changed: 806 additions & 109 deletions

.github/workflows/check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
# Move generated files to the correct locations and clean up
123123
rm -Rf docs && mv java-client/docs .
124124
rm -Rf gradle && mv java-client/gradle .
125-
rm -Rf src && mv java-client/src .
125+
rm -Rf src/main && mv java-client/src/main src/
126126
rm -Rf build.gradle && mv java-client/build.gradle .
127127
rm -Rf build.sbt && mv java-client/build.sbt .
128128
rm -Rf gradle.properties && mv java-client/gradle.properties .

.sdk-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v3.32.0
1+
v3.34.0

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Add this dependency to your project's POM:
1616
<dependency>
1717
<groupId>ai.reveng</groupId>
1818
<artifactId>sdk</artifactId>
19-
<version>3.32.0</version>
19+
<version>3.34.0</version>
2020
<scope>compile</scope>
2121
</dependency>
2222
```
@@ -31,7 +31,7 @@ repositories {
3131
}
3232
3333
dependencies {
34-
implementation "ai.reveng:sdk:3.32.0"
34+
implementation "ai.reveng:sdk:3.34.0"
3535
}
3636
```
3737

@@ -161,6 +161,7 @@ Class | Method | HTTP request | Description
161161
*FunctionsCoreApi* | [**getAnalysisStringsStatus**](docs/FunctionsCoreApi.md#getAnalysisStringsStatus) | **GET** /v2/analyses/{analysis_id}/functions/strings/status | Get string processing state for the Analysis
162162
*FunctionsCoreApi* | [**getFunctionBlocks**](docs/FunctionsCoreApi.md#getFunctionBlocks) | **GET** /v2/functions/{function_id}/blocks | Get disassembly blocks related to the function
163163
*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
164+
*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
164165
*FunctionsCoreApi* | [**getFunctionCapabilities**](docs/FunctionsCoreApi.md#getFunctionCapabilities) | **GET** /v2/functions/{function_id}/capabilities | Retrieve a functions capabilities
165166
*FunctionsCoreApi* | [**getFunctionDetails**](docs/FunctionsCoreApi.md#getFunctionDetails) | **GET** /v2/functions/{function_id} | Get function details
166167
*FunctionsCoreApi* | [**getFunctionStrings**](docs/FunctionsCoreApi.md#getFunctionStrings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function
@@ -272,6 +273,7 @@ Class | Method | HTTP request | Description
272273
- [BaseResponseGetAiDecompilationTask](docs/BaseResponseGetAiDecompilationTask.md)
273274
- [BaseResponseGetMeResponse](docs/BaseResponseGetMeResponse.md)
274275
- [BaseResponseGetPublicUserResponse](docs/BaseResponseGetPublicUserResponse.md)
276+
- [BaseResponseListCalleesCallerFunctionsResponse](docs/BaseResponseListCalleesCallerFunctionsResponse.md)
275277
- [BaseResponseListCollectionResults](docs/BaseResponseListCollectionResults.md)
276278
- [BaseResponseListCommentResponse](docs/BaseResponseListCommentResponse.md)
277279
- [BaseResponseListDieMatch](docs/BaseResponseListDieMatch.md)

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ apply plugin: 'java'
1919
apply plugin: 'com.diffplug.spotless'
2020

2121
group = 'ai.reveng'
22-
version = '3.32.0'
22+
version = '3.34.0'
2323

2424

2525

@@ -171,7 +171,7 @@ mavenPublishing {
171171
publishToMavenCentral(true)
172172
signAllPublications()
173173

174-
coordinates("ai.reveng", "sdk", "3.32.0")
174+
coordinates("ai.reveng", "sdk", "3.34.0")
175175

176176
pom {
177177
name = "sdk"

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
22
settings(
33
organization := "ai.reveng",
44
name := "sdk",
5-
version := "3.32.0",
5+
version := "3.34.0",
66
scalaVersion := "2.11.12",
77
scalacOptions ++= Seq("-feature"),
88
compile / javacOptions ++= Seq("-Xlint:deprecation"),
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
3+
# BaseResponseListCalleesCallerFunctionsResponse
4+
5+
6+
## Properties
7+
8+
| Name | Type | Description | Notes |
9+
|------------ | ------------- | ------------- | -------------|
10+
|**status** | **Boolean** | Response status on whether the request succeeded | [optional] |
11+
|**data** | [**List&lt;CalleesCallerFunctionsResponse&gt;**](CalleesCallerFunctionsResponse.md) | | [optional] |
12+
|**message** | **String** | | [optional] |
13+
|**errors** | [**List&lt;ErrorModel&gt;**](ErrorModel.md) | | [optional] |
14+
|**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] |
15+
16+
17+

docs/FunctionMatchingFilters.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
|**binaryIds** | **List&lt;Integer&gt;** | ID&#39;s of binaries to limit the search to, if empty, search all scoped binaries | [optional] |
1111
|**collectionIds** | **List&lt;Integer&gt;** | ID&#39;s of collections to limit the search to, if empty, search all scoped collections | [optional] |
1212
|**functionIds** | **List&lt;Long&gt;** | ID&#39;s of functions to limit the search to, if empty, search all scoped functions | [optional] |
13+
|**userIds** | **List&lt;Integer&gt;** | ID&#39;s of users to limit the search to, if empty, search all scoped users | [optional] |
1314
|**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] |
1415

1516

docs/FunctionsCoreApi.md

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

740+
<a id="getFunctionCalleesCallersBulk"></a>
741+
# **getFunctionCalleesCallersBulk**
742+
> BaseResponseListCalleesCallerFunctionsResponse getFunctionCalleesCallersBulk(functionIds)
743+
744+
Get list of functions that call or are called for a list of functions
745+
746+
### Example
747+
```java
748+
// Import classes:
749+
import ai.reveng.invoker.ApiClient;
750+
import ai.reveng.invoker.ApiException;
751+
import ai.reveng.invoker.Configuration;
752+
import ai.reveng.invoker.auth.*;
753+
import ai.reveng.invoker.models.*;
754+
import ai.reveng.api.FunctionsCoreApi;
755+
756+
public class Example {
757+
public static void main(String[] args) {
758+
ApiClient defaultClient = Configuration.getDefaultApiClient();
759+
defaultClient.setBasePath("https://api.reveng.ai");
760+
761+
// Configure API key authorization: APIKey
762+
ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey");
763+
APIKey.setApiKey("YOUR API KEY");
764+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
765+
//APIKey.setApiKeyPrefix("Token");
766+
767+
FunctionsCoreApi apiInstance = new FunctionsCoreApi(defaultClient);
768+
List<Integer> functionIds = Arrays.asList(); // List<Integer> |
769+
try {
770+
BaseResponseListCalleesCallerFunctionsResponse result = apiInstance.getFunctionCalleesCallersBulk(functionIds);
771+
System.out.println(result);
772+
} catch (ApiException e) {
773+
System.err.println("Exception when calling FunctionsCoreApi#getFunctionCalleesCallersBulk");
774+
System.err.println("Status code: " + e.getCode());
775+
System.err.println("Reason: " + e.getResponseBody());
776+
System.err.println("Response headers: " + e.getResponseHeaders());
777+
e.printStackTrace();
778+
}
779+
}
780+
}
781+
```
782+
783+
### Parameters
784+
785+
| Name | Type | Description | Notes |
786+
|------------- | ------------- | ------------- | -------------|
787+
| **functionIds** | [**List&lt;Integer&gt;**](Integer.md)| | |
788+
789+
### Return type
790+
791+
[**BaseResponseListCalleesCallerFunctionsResponse**](BaseResponseListCalleesCallerFunctionsResponse.md)
792+
793+
### Authorization
794+
795+
[APIKey](../README.md#APIKey)
796+
797+
### HTTP request headers
798+
799+
- **Content-Type**: Not defined
800+
- **Accept**: application/json
801+
802+
### HTTP response details
803+
| Status code | Description | Response headers |
804+
|-------------|-------------|------------------|
805+
| **200** | Successful Response | - |
806+
| **422** | Invalid request parameters | - |
807+
739808
<a id="getFunctionCapabilities"></a>
740809
# **getFunctionCapabilities**
741810
> BaseResponseFunctionCapabilityResponse getFunctionCapabilities(functionId)

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>sdk</artifactId>
66
<packaging>jar</packaging>
77
<name>sdk</name>
8-
<version>3.32.0</version>
8+
<version>3.34.0</version>
99
<url>https://github.com/RevEngAI/sdk-java</url>
1010
<description>Java SDK for the RevEng.AI API</description>
1111
<scm>

src/main/java/ai/reveng/api/FunctionsCoreApi.java

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import ai.reveng.model.BaseResponseFunctionCapabilityResponse;
3939
import ai.reveng.model.BaseResponseFunctionStringsResponse;
4040
import ai.reveng.model.BaseResponseFunctionsDetailResponse;
41+
import ai.reveng.model.BaseResponseListCalleesCallerFunctionsResponse;
4142
import ai.reveng.model.FunctionMatchingRequest;
4243
import ai.reveng.model.FunctionMatchingResponse;
4344

@@ -1476,6 +1477,140 @@ public okhttp3.Call getFunctionCalleesCallersAsync(@javax.annotation.Nonnull Int
14761477
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
14771478
return localVarCall;
14781479
}
1480+
/**
1481+
* Build call for getFunctionCalleesCallersBulk
1482+
* @param functionIds (required)
1483+
* @param _callback Callback for upload/download progress
1484+
* @return Call to execute
1485+
* @throws ApiException If fail to serialize the request body object
1486+
* @http.response.details
1487+
<table border="1">
1488+
<caption>Response Details</caption>
1489+
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
1490+
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
1491+
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
1492+
</table>
1493+
*/
1494+
public okhttp3.Call getFunctionCalleesCallersBulkCall(@javax.annotation.Nonnull List<Integer> functionIds, final ApiCallback _callback) throws ApiException {
1495+
String basePath = null;
1496+
// Operation Servers
1497+
String[] localBasePaths = new String[] { };
1498+
1499+
// Determine Base Path to Use
1500+
if (localCustomBaseUrl != null){
1501+
basePath = localCustomBaseUrl;
1502+
} else if ( localBasePaths.length > 0 ) {
1503+
basePath = localBasePaths[localHostIndex];
1504+
} else {
1505+
basePath = null;
1506+
}
1507+
1508+
Object localVarPostBody = null;
1509+
1510+
// create path and map variables
1511+
String localVarPath = "/v2/functions/callees_callers";
1512+
1513+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
1514+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
1515+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
1516+
Map<String, String> localVarCookieParams = new HashMap<String, String>();
1517+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
1518+
1519+
if (functionIds != null) {
1520+
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "function_ids", functionIds));
1521+
}
1522+
1523+
final String[] localVarAccepts = {
1524+
"application/json"
1525+
};
1526+
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
1527+
if (localVarAccept != null) {
1528+
localVarHeaderParams.put("Accept", localVarAccept);
1529+
}
1530+
1531+
final String[] localVarContentTypes = {
1532+
};
1533+
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
1534+
if (localVarContentType != null) {
1535+
localVarHeaderParams.put("Content-Type", localVarContentType);
1536+
}
1537+
1538+
String[] localVarAuthNames = new String[] { "APIKey" };
1539+
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
1540+
}
1541+
1542+
@SuppressWarnings("rawtypes")
1543+
private okhttp3.Call getFunctionCalleesCallersBulkValidateBeforeCall(@javax.annotation.Nonnull List<Integer> functionIds, final ApiCallback _callback) throws ApiException {
1544+
// verify the required parameter 'functionIds' is set
1545+
if (functionIds == null) {
1546+
throw new ApiException("Missing the required parameter 'functionIds' when calling getFunctionCalleesCallersBulk(Async)");
1547+
}
1548+
1549+
return getFunctionCalleesCallersBulkCall(functionIds, _callback);
1550+
1551+
}
1552+
1553+
/**
1554+
* Get list of functions that call or are called for a list of functions
1555+
*
1556+
* @param functionIds (required)
1557+
* @return BaseResponseListCalleesCallerFunctionsResponse
1558+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1559+
* @http.response.details
1560+
<table border="1">
1561+
<caption>Response Details</caption>
1562+
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
1563+
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
1564+
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
1565+
</table>
1566+
*/
1567+
public BaseResponseListCalleesCallerFunctionsResponse getFunctionCalleesCallersBulk(@javax.annotation.Nonnull List<Integer> functionIds) throws ApiException {
1568+
ApiResponse<BaseResponseListCalleesCallerFunctionsResponse> localVarResp = getFunctionCalleesCallersBulkWithHttpInfo(functionIds);
1569+
return localVarResp.getData();
1570+
}
1571+
1572+
/**
1573+
* Get list of functions that call or are called for a list of functions
1574+
*
1575+
* @param functionIds (required)
1576+
* @return ApiResponse&lt;BaseResponseListCalleesCallerFunctionsResponse&gt;
1577+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
1578+
* @http.response.details
1579+
<table border="1">
1580+
<caption>Response Details</caption>
1581+
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
1582+
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
1583+
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
1584+
</table>
1585+
*/
1586+
public ApiResponse<BaseResponseListCalleesCallerFunctionsResponse> getFunctionCalleesCallersBulkWithHttpInfo(@javax.annotation.Nonnull List<Integer> functionIds) throws ApiException {
1587+
okhttp3.Call localVarCall = getFunctionCalleesCallersBulkValidateBeforeCall(functionIds, null);
1588+
Type localVarReturnType = new TypeToken<BaseResponseListCalleesCallerFunctionsResponse>(){}.getType();
1589+
return localVarApiClient.execute(localVarCall, localVarReturnType);
1590+
}
1591+
1592+
/**
1593+
* Get list of functions that call or are called for a list of functions (asynchronously)
1594+
*
1595+
* @param functionIds (required)
1596+
* @param _callback The callback to be executed when the API call finishes
1597+
* @return The request call
1598+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
1599+
* @http.response.details
1600+
<table border="1">
1601+
<caption>Response Details</caption>
1602+
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
1603+
<tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
1604+
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
1605+
</table>
1606+
*/
1607+
public okhttp3.Call getFunctionCalleesCallersBulkAsync(@javax.annotation.Nonnull List<Integer> functionIds, final ApiCallback<BaseResponseListCalleesCallerFunctionsResponse> _callback) throws ApiException {
1608+
1609+
okhttp3.Call localVarCall = getFunctionCalleesCallersBulkValidateBeforeCall(functionIds, _callback);
1610+
Type localVarReturnType = new TypeToken<BaseResponseListCalleesCallerFunctionsResponse>(){}.getType();
1611+
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
1612+
return localVarCall;
1613+
}
14791614
/**
14801615
* Build call for getFunctionCapabilities
14811616
* @param functionId (required)

0 commit comments

Comments
 (0)