diff --git a/.sdk-version b/.sdk-version index 3e4750f..73cf653 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.22.2 +v3.23.1 diff --git a/README.md b/README.md index 5a640b8..9ae7515 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this dependency to your project's POM: ai.reveng sdk - 3.22.2 + 3.23.1 compile ``` @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation "ai.reveng:sdk:3.22.2" + implementation "ai.reveng:sdk:3.23.1" } ``` diff --git a/build.gradle b/build.gradle index a76e1ed..4a5e789 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'ai.reveng' -version = '3.22.2' +version = '3.23.1' @@ -171,7 +171,7 @@ mavenPublishing { publishToMavenCentral(true) signAllPublications() - coordinates("ai.reveng", "sdk", "3.22.2") + coordinates("ai.reveng", "sdk", "3.23.1") pom { name = "sdk" diff --git a/build.sbt b/build.sbt index 26d8b6f..bb7b62e 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "ai.reveng", name := "sdk", - version := "3.22.2", + version := "3.23.1", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/FunctionsCoreApi.md b/docs/FunctionsCoreApi.md index cd9c8e8..fada39c 100644 --- a/docs/FunctionsCoreApi.md +++ b/docs/FunctionsCoreApi.md @@ -447,7 +447,7 @@ public class Example { # **getAnalysisStrings** -> BaseResponseAnalysisStringsResponse getAnalysisStrings(analysisId, page, pageSize, search, functionSearch) +> BaseResponseAnalysisStringsResponse getAnalysisStrings(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder) Get string information found in the Analysis @@ -480,8 +480,10 @@ public class Example { Integer pageSize = 100; // Integer | Number of items per page. String search = "search_example"; // String | Search is applied to string value String functionSearch = "functionSearch_example"; // String | Search is applied to function names + String orderBy = "length"; // String | Order by field + String sortOrder = "ASC"; // String | Sort order for the results try { - BaseResponseAnalysisStringsResponse result = apiInstance.getAnalysisStrings(analysisId, page, pageSize, search, functionSearch); + BaseResponseAnalysisStringsResponse result = apiInstance.getAnalysisStrings(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FunctionsCoreApi#getAnalysisStrings"); @@ -503,6 +505,8 @@ public class Example { | **pageSize** | **Integer**| Number of items per page. | [optional] [default to 100] | | **search** | **String**| Search is applied to string value | [optional] | | **functionSearch** | **String**| Search is applied to function names | [optional] | +| **orderBy** | **String**| Order by field | [optional] [default to value] [enum: length, value] | +| **sortOrder** | **String**| Sort order for the results | [optional] [default to ASC] [enum: ASC, DESC] | ### Return type diff --git a/pom.xml b/pom.xml index 6ae1d85..b37aea6 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sdk jar sdk - 3.22.2 + 3.23.1 https://github.com/RevEngAI/sdk-java Java SDK for the RevEng.AI API diff --git a/src/main/java/ai/reveng/api/FunctionsCoreApi.java b/src/main/java/ai/reveng/api/FunctionsCoreApi.java index 0ea1849..be77486 100644 --- a/src/main/java/ai/reveng/api/FunctionsCoreApi.java +++ b/src/main/java/ai/reveng/api/FunctionsCoreApi.java @@ -907,6 +907,8 @@ public okhttp3.Call cancelAutoUnstripAsync(@javax.annotation.Nonnull Integer ana * @param pageSize Number of items per page. (optional, default to 100) * @param search Search is applied to string value (optional) * @param functionSearch Search is applied to function names (optional) + * @param orderBy Order by field (optional, default to value) + * @param sortOrder Sort order for the results (optional, default to ASC) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -918,7 +920,7 @@ public okhttp3.Call cancelAutoUnstripAsync(@javax.annotation.Nonnull Integer ana 422 Invalid request parameters - */ - public okhttp3.Call getAnalysisStringsCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, @javax.annotation.Nullable String functionSearch, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAnalysisStringsCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, @javax.annotation.Nullable String functionSearch, @javax.annotation.Nullable String orderBy, @javax.annotation.Nullable String sortOrder, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -960,6 +962,14 @@ public okhttp3.Call getAnalysisStringsCall(@javax.annotation.Nonnull Integer ana localVarQueryParams.addAll(localVarApiClient.parameterToPair("function_search", functionSearch)); } + if (orderBy != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("order_by", orderBy)); + } + + if (sortOrder != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort_order", sortOrder)); + } + final String[] localVarAccepts = { "application/json" }; @@ -980,13 +990,13 @@ public okhttp3.Call getAnalysisStringsCall(@javax.annotation.Nonnull Integer ana } @SuppressWarnings("rawtypes") - private okhttp3.Call getAnalysisStringsValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, @javax.annotation.Nullable String functionSearch, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getAnalysisStringsValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, @javax.annotation.Nullable String functionSearch, @javax.annotation.Nullable String orderBy, @javax.annotation.Nullable String sortOrder, final ApiCallback _callback) throws ApiException { // verify the required parameter 'analysisId' is set if (analysisId == null) { throw new ApiException("Missing the required parameter 'analysisId' when calling getAnalysisStrings(Async)"); } - return getAnalysisStringsCall(analysisId, page, pageSize, search, functionSearch, _callback); + return getAnalysisStringsCall(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder, _callback); } @@ -998,6 +1008,8 @@ private okhttp3.Call getAnalysisStringsValidateBeforeCall(@javax.annotation.Nonn * @param pageSize Number of items per page. (optional, default to 100) * @param search Search is applied to string value (optional) * @param functionSearch Search is applied to function names (optional) + * @param orderBy Order by field (optional, default to value) + * @param sortOrder Sort order for the results (optional, default to ASC) * @return BaseResponseAnalysisStringsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1008,8 +1020,8 @@ private okhttp3.Call getAnalysisStringsValidateBeforeCall(@javax.annotation.Nonn 422 Invalid request parameters - */ - public BaseResponseAnalysisStringsResponse getAnalysisStrings(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, @javax.annotation.Nullable String functionSearch) throws ApiException { - ApiResponse localVarResp = getAnalysisStringsWithHttpInfo(analysisId, page, pageSize, search, functionSearch); + public BaseResponseAnalysisStringsResponse getAnalysisStrings(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, @javax.annotation.Nullable String functionSearch, @javax.annotation.Nullable String orderBy, @javax.annotation.Nullable String sortOrder) throws ApiException { + ApiResponse localVarResp = getAnalysisStringsWithHttpInfo(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder); return localVarResp.getData(); } @@ -1021,6 +1033,8 @@ public BaseResponseAnalysisStringsResponse getAnalysisStrings(@javax.annotation. * @param pageSize Number of items per page. (optional, default to 100) * @param search Search is applied to string value (optional) * @param functionSearch Search is applied to function names (optional) + * @param orderBy Order by field (optional, default to value) + * @param sortOrder Sort order for the results (optional, default to ASC) * @return ApiResponse<BaseResponseAnalysisStringsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1031,8 +1045,8 @@ public BaseResponseAnalysisStringsResponse getAnalysisStrings(@javax.annotation. 422 Invalid request parameters - */ - public ApiResponse getAnalysisStringsWithHttpInfo(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, @javax.annotation.Nullable String functionSearch) throws ApiException { - okhttp3.Call localVarCall = getAnalysisStringsValidateBeforeCall(analysisId, page, pageSize, search, functionSearch, null); + public ApiResponse getAnalysisStringsWithHttpInfo(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, @javax.annotation.Nullable String functionSearch, @javax.annotation.Nullable String orderBy, @javax.annotation.Nullable String sortOrder) throws ApiException { + okhttp3.Call localVarCall = getAnalysisStringsValidateBeforeCall(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -1045,6 +1059,8 @@ public ApiResponse getAnalysisStringsWithHt * @param pageSize Number of items per page. (optional, default to 100) * @param search Search is applied to string value (optional) * @param functionSearch Search is applied to function names (optional) + * @param orderBy Order by field (optional, default to value) + * @param sortOrder Sort order for the results (optional, default to ASC) * @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 @@ -1056,9 +1072,9 @@ public ApiResponse getAnalysisStringsWithHt 422 Invalid request parameters - */ - public okhttp3.Call getAnalysisStringsAsync(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, @javax.annotation.Nullable String functionSearch, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAnalysisStringsAsync(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String search, @javax.annotation.Nullable String functionSearch, @javax.annotation.Nullable String orderBy, @javax.annotation.Nullable String sortOrder, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getAnalysisStringsValidateBeforeCall(analysisId, page, pageSize, search, functionSearch, _callback); + okhttp3.Call localVarCall = getAnalysisStringsValidateBeforeCall(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/ai/reveng/invoker/ApiClient.java b/src/main/java/ai/reveng/invoker/ApiClient.java index c6ca441..2940710 100644 --- a/src/main/java/ai/reveng/invoker/ApiClient.java +++ b/src/main/java/ai/reveng/invoker/ApiClient.java @@ -146,7 +146,7 @@ protected void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/3.22.2/java"); + setUserAgent("OpenAPI-Generator/3.23.1/java"); authentications = new HashMap(); } diff --git a/src/main/java/ai/reveng/invoker/Configuration.java b/src/main/java/ai/reveng/invoker/Configuration.java index bb4ba8b..8fa53eb 100644 --- a/src/main/java/ai/reveng/invoker/Configuration.java +++ b/src/main/java/ai/reveng/invoker/Configuration.java @@ -18,7 +18,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "3.22.2"; + public static final String VERSION = "3.23.1"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/test/java/ai/reveng/api/FunctionsCoreApiTest.java b/src/test/java/ai/reveng/api/FunctionsCoreApiTest.java index 7ae33fd..d14b321 100644 --- a/src/test/java/ai/reveng/api/FunctionsCoreApiTest.java +++ b/src/test/java/ai/reveng/api/FunctionsCoreApiTest.java @@ -144,7 +144,9 @@ public void getAnalysisStringsTest() throws ApiException { Integer pageSize = null; String search = null; String functionSearch = null; - BaseResponseAnalysisStringsResponse response = api.getAnalysisStrings(analysisId, page, pageSize, search, functionSearch); + String orderBy = null; + String sortOrder = null; + BaseResponseAnalysisStringsResponse response = api.getAnalysisStrings(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder); // TODO: test validations }