diff --git a/.sdk-version b/.sdk-version index aeb5aaf..92c2d1e 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v2.46.0 +v2.49.0 diff --git a/README.md b/README.md index f0e8274..5ef6b40 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this dependency to your project's POM: ai.reveng sdk - 2.46.0 + 2.49.0 compile ``` @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation "ai.reveng:sdk:2.46.0" + implementation "ai.reveng:sdk:2.49.0" } ``` diff --git a/build.gradle b/build.gradle index 6777971..0153c75 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'ai.reveng' -version = '2.46.0' +version = '2.49.0' @@ -171,7 +171,7 @@ mavenPublishing { publishToMavenCentral(true) signAllPublications() - coordinates("ai.reveng", "sdk", "2.46.0") + coordinates("ai.reveng", "sdk", "2.49.0") pom { name = "sdk" diff --git a/build.sbt b/build.sbt index 707468b..0f65906 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "ai.reveng", name := "sdk", - version := "2.46.0", + version := "2.49.0", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/CollectionsApi.md b/docs/CollectionsApi.md index cd85303..9da65ba 100644 --- a/docs/CollectionsApi.md +++ b/docs/CollectionsApi.md @@ -155,7 +155,7 @@ public class Example { # **getCollection** -> BaseResponseCollectionResponse getCollection(collectionId, includeTags, includeBinaries) +> BaseResponseCollectionResponse getCollection(collectionId, includeTags, includeBinaries, pageSize, pageNumber, binarySearchStr) Returns a collection @@ -186,8 +186,11 @@ public class Example { Integer collectionId = 56; // Integer | Boolean includeTags = false; // Boolean | Boolean includeBinaries = false; // Boolean | + Integer pageSize = 10; // Integer | + Integer pageNumber = 1; // Integer | + String binarySearchStr = "binarySearchStr_example"; // String | try { - BaseResponseCollectionResponse result = apiInstance.getCollection(collectionId, includeTags, includeBinaries); + BaseResponseCollectionResponse result = apiInstance.getCollection(collectionId, includeTags, includeBinaries, pageSize, pageNumber, binarySearchStr); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling CollectionsApi#getCollection"); @@ -207,6 +210,9 @@ public class Example { | **collectionId** | **Integer**| | | | **includeTags** | **Boolean**| | [optional] [default to false] | | **includeBinaries** | **Boolean**| | [optional] [default to false] | +| **pageSize** | **Integer**| | [optional] [default to 10] | +| **pageNumber** | **Integer**| | [optional] [default to 1] | +| **binarySearchStr** | **String**| | [optional] | ### Return type diff --git a/pom.xml b/pom.xml index 187beb9..81c3a33 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sdk jar sdk - 2.46.0 + 2.49.0 https://github.com/RevEngAI/sdk-java Java SDK for the RevEng.AI API diff --git a/src/main/java/ai/reveng/api/CollectionsApi.java b/src/main/java/ai/reveng/api/CollectionsApi.java index 0fceb40..631e75a 100644 --- a/src/main/java/ai/reveng/api/CollectionsApi.java +++ b/src/main/java/ai/reveng/api/CollectionsApi.java @@ -350,6 +350,9 @@ public okhttp3.Call deleteCollectionAsync(@javax.annotation.Nonnull Integer coll * @param collectionId (required) * @param includeTags (optional, default to false) * @param includeBinaries (optional, default to false) + * @param pageSize (optional, default to 10) + * @param pageNumber (optional, default to 1) + * @param binarySearchStr (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -361,7 +364,7 @@ public okhttp3.Call deleteCollectionAsync(@javax.annotation.Nonnull Integer coll 422 Invalid request parameters - */ - public okhttp3.Call getCollectionCall(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCollectionCall(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable Integer pageNumber, @javax.annotation.Nullable String binarySearchStr, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -395,6 +398,18 @@ public okhttp3.Call getCollectionCall(@javax.annotation.Nonnull Integer collecti localVarQueryParams.addAll(localVarApiClient.parameterToPair("include_binaries", includeBinaries)); } + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); + } + + if (pageNumber != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_number", pageNumber)); + } + + if (binarySearchStr != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("binary_search_str", binarySearchStr)); + } + final String[] localVarAccepts = { "application/json" }; @@ -415,13 +430,13 @@ public okhttp3.Call getCollectionCall(@javax.annotation.Nonnull Integer collecti } @SuppressWarnings("rawtypes") - private okhttp3.Call getCollectionValidateBeforeCall(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCollectionValidateBeforeCall(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable Integer pageNumber, @javax.annotation.Nullable String binarySearchStr, final ApiCallback _callback) throws ApiException { // verify the required parameter 'collectionId' is set if (collectionId == null) { throw new ApiException("Missing the required parameter 'collectionId' when calling getCollection(Async)"); } - return getCollectionCall(collectionId, includeTags, includeBinaries, _callback); + return getCollectionCall(collectionId, includeTags, includeBinaries, pageSize, pageNumber, binarySearchStr, _callback); } @@ -431,6 +446,9 @@ private okhttp3.Call getCollectionValidateBeforeCall(@javax.annotation.Nonnull I * @param collectionId (required) * @param includeTags (optional, default to false) * @param includeBinaries (optional, default to false) + * @param pageSize (optional, default to 10) + * @param pageNumber (optional, default to 1) + * @param binarySearchStr (optional) * @return BaseResponseCollectionResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -441,8 +459,8 @@ private okhttp3.Call getCollectionValidateBeforeCall(@javax.annotation.Nonnull I 422 Invalid request parameters - */ - public BaseResponseCollectionResponse getCollection(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries) throws ApiException { - ApiResponse localVarResp = getCollectionWithHttpInfo(collectionId, includeTags, includeBinaries); + public BaseResponseCollectionResponse getCollection(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable Integer pageNumber, @javax.annotation.Nullable String binarySearchStr) throws ApiException { + ApiResponse localVarResp = getCollectionWithHttpInfo(collectionId, includeTags, includeBinaries, pageSize, pageNumber, binarySearchStr); return localVarResp.getData(); } @@ -452,6 +470,9 @@ public BaseResponseCollectionResponse getCollection(@javax.annotation.Nonnull In * @param collectionId (required) * @param includeTags (optional, default to false) * @param includeBinaries (optional, default to false) + * @param pageSize (optional, default to 10) + * @param pageNumber (optional, default to 1) + * @param binarySearchStr (optional) * @return ApiResponse<BaseResponseCollectionResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -462,8 +483,8 @@ public BaseResponseCollectionResponse getCollection(@javax.annotation.Nonnull In 422 Invalid request parameters - */ - public ApiResponse getCollectionWithHttpInfo(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries) throws ApiException { - okhttp3.Call localVarCall = getCollectionValidateBeforeCall(collectionId, includeTags, includeBinaries, null); + public ApiResponse getCollectionWithHttpInfo(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable Integer pageNumber, @javax.annotation.Nullable String binarySearchStr) throws ApiException { + okhttp3.Call localVarCall = getCollectionValidateBeforeCall(collectionId, includeTags, includeBinaries, pageSize, pageNumber, binarySearchStr, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -474,6 +495,9 @@ public ApiResponse getCollectionWithHttpInfo(@ja * @param collectionId (required) * @param includeTags (optional, default to false) * @param includeBinaries (optional, default to false) + * @param pageSize (optional, default to 10) + * @param pageNumber (optional, default to 1) + * @param binarySearchStr (optional) * @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 @@ -485,9 +509,9 @@ public ApiResponse getCollectionWithHttpInfo(@ja 422 Invalid request parameters - */ - public okhttp3.Call getCollectionAsync(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCollectionAsync(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable Integer pageNumber, @javax.annotation.Nullable String binarySearchStr, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getCollectionValidateBeforeCall(collectionId, includeTags, includeBinaries, _callback); + okhttp3.Call localVarCall = getCollectionValidateBeforeCall(collectionId, includeTags, includeBinaries, pageSize, pageNumber, binarySearchStr, _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 e38abe9..0120899 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/2.46.0/java"); + setUserAgent("OpenAPI-Generator/2.49.0/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 7f062a9..ab88004 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 = "2.46.0"; + public static final String VERSION = "2.49.0"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/test/java/ai/reveng/api/CollectionsApiTest.java b/src/test/java/ai/reveng/api/CollectionsApiTest.java index b7fb485..dddf66c 100644 --- a/src/test/java/ai/reveng/api/CollectionsApiTest.java +++ b/src/test/java/ai/reveng/api/CollectionsApiTest.java @@ -82,7 +82,10 @@ public void getCollectionTest() throws ApiException { Integer collectionId = null; Boolean includeTags = null; Boolean includeBinaries = null; - BaseResponseCollectionResponse response = api.getCollection(collectionId, includeTags, includeBinaries); + Integer pageSize = null; + Integer pageNumber = null; + String binarySearchStr = null; + BaseResponseCollectionResponse response = api.getCollection(collectionId, includeTags, includeBinaries, pageSize, pageNumber, binarySearchStr); // TODO: test validations }