diff --git a/.sdk-version b/.sdk-version index 349a9d4..a12e6bf 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.89.0 +v3.91.1 diff --git a/README.md b/README.md index 3a1ed97..ab782a3 100644 --- a/README.md +++ b/README.md @@ -73,8 +73,6 @@ Class | Method | HTTP request | Description *AnalysesCoreApi* | [**getAnalysisParams**](docs/AnalysesCoreApi.md#getAnalysisParams) | **GET** /v2/analyses/{analysis_id}/params | Gets analysis param information *AnalysesCoreApi* | [**getAnalysisQueuePosition**](docs/AnalysesCoreApi.md#getAnalysisQueuePosition) | **GET** /v2/analyses/{analysis_id}/queue-position | Get the queue position of an analysis *AnalysesCoreApi* | [**getAnalysisStatus**](docs/AnalysesCoreApi.md#getAnalysisStatus) | **GET** /v2/analyses/{analysis_id}/status | Gets the status of an analysis -*AnalysesCoreApi* | [**getAnalysisStrings**](docs/AnalysesCoreApi.md#getAnalysisStrings) | **GET** /v3/analyses/{analysis_id}/functions/strings | List strings for an analysis. -*AnalysesCoreApi* | [**getAnalysisStringsStatus**](docs/AnalysesCoreApi.md#getAnalysisStringsStatus) | **GET** /v3/analyses/{analysis_id}/functions/strings/status | Get the string-extraction status for an analysis. *AnalysesCoreApi* | [**insertAnalysisLog**](docs/AnalysesCoreApi.md#insertAnalysisLog) | **POST** /v2/analyses/{analysis_id}/logs | Insert a log entry for an analysis *AnalysesCoreApi* | [**listAnalyses**](docs/AnalysesCoreApi.md#listAnalyses) | **GET** /v2/analyses/list | Gets the most recent analyses *AnalysesCoreApi* | [**lookupBinaryId**](docs/AnalysesCoreApi.md#lookupBinaryId) | **GET** /v2/analyses/lookup/{binary_id} | Gets the analysis ID from binary ID @@ -83,6 +81,8 @@ Class | Method | HTTP request | Description *AnalysesCoreApi* | [**updateAnalysis**](docs/AnalysesCoreApi.md#updateAnalysis) | **PATCH** /v2/analyses/{analysis_id} | Update Analysis *AnalysesCoreApi* | [**updateAnalysisTags**](docs/AnalysesCoreApi.md#updateAnalysisTags) | **PATCH** /v2/analyses/{analysis_id}/tags | Update Analysis Tags *AnalysesCoreApi* | [**uploadFile**](docs/AnalysesCoreApi.md#uploadFile) | **POST** /v2/upload | Upload File +*AnalysesCoreApi* | [**v3GetAnalysisStrings**](docs/AnalysesCoreApi.md#v3GetAnalysisStrings) | **GET** /v3/analyses/{analysis_id}/functions/strings | List strings for an analysis. +*AnalysesCoreApi* | [**v3GetAnalysisStringsStatus**](docs/AnalysesCoreApi.md#v3GetAnalysisStringsStatus) | **GET** /v3/analyses/{analysis_id}/functions/strings/status | Get the string-extraction status for an analysis. *AnalysesResultsMetadataApi* | [**getAnalysisFunctionsPaginated**](docs/AnalysesResultsMetadataApi.md#getAnalysisFunctionsPaginated) | **GET** /v2/analyses/{analysis_id}/functions | Get functions from analysis *AnalysesResultsMetadataApi* | [**getCapabilities**](docs/AnalysesResultsMetadataApi.md#getCapabilities) | **GET** /v2/analyses/{analysis_id}/capabilities | Gets the capabilities from the analysis *AnalysesResultsMetadataApi* | [**getFunctionsList**](docs/AnalysesResultsMetadataApi.md#getFunctionsList) | **GET** /v2/analyses/{analysis_id}/functions/list | Gets functions from analysis @@ -104,6 +104,7 @@ Class | Method | HTTP request | Description *BinariesApi* | [**getBinaryRelatedStatus**](docs/BinariesApi.md#getBinaryRelatedStatus) | **GET** /v2/binaries/{binary_id}/related/status | Gets the status of the unpack binary task for a binary *BinariesApi* | [**getRelatedBinaries**](docs/BinariesApi.md#getRelatedBinaries) | **GET** /v2/binaries/{binary_id}/related | Gets the related binaries of a binary. *CollectionsApi* | [**createCollection**](docs/CollectionsApi.md#createCollection) | **POST** /v2/collections | Creates new collection information +*CollectionsApi* | [**createCollection_0**](docs/CollectionsApi.md#createCollection_0) | **POST** /v3/collections | Create a collection. *CollectionsApi* | [**deleteCollection**](docs/CollectionsApi.md#deleteCollection) | **DELETE** /v2/collections/{collection_id} | Deletes a collection *CollectionsApi* | [**getCollection**](docs/CollectionsApi.md#getCollection) | **GET** /v2/collections/{collection_id} | Returns a collection *CollectionsApi* | [**listCollections**](docs/CollectionsApi.md#listCollections) | **GET** /v2/collections | Gets basic collections information @@ -311,6 +312,7 @@ Class | Method | HTTP request | Description - [BatchRenameOutputBody](BatchRenameOutputBody.md) - [BinariesRelatedStatusResponse](BinariesRelatedStatusResponse.md) - [BinariesTaskStatus](BinariesTaskStatus.md) + - [Binary](Binary.md) - [BinaryAdditionalDetailsDataResponse](BinaryAdditionalDetailsDataResponse.md) - [BinaryAdditionalResponse](BinaryAdditionalResponse.md) - [BinaryConfig](BinaryConfig.md) @@ -353,6 +355,8 @@ Class | Method | HTTP request | Description - [ConversationWithEvents](ConversationWithEvents.md) - [CreateAIDecompOutputBody](CreateAIDecompOutputBody.md) - [CreateCheckoutSessionInputBody](CreateCheckoutSessionInputBody.md) + - [CreateCollectionInputBody](CreateCollectionInputBody.md) + - [CreateCollectionOutputBody](CreateCollectionOutputBody.md) - [CreateConversationRequest](CreateConversationRequest.md) - [CreatePortalSessionInputBody](CreatePortalSessionInputBody.md) - [Created](Created.md) diff --git a/apis/AnalysesCoreApi.ts b/apis/AnalysesCoreApi.ts index e825876..b59a7a1 100644 --- a/apis/AnalysesCoreApi.ts +++ b/apis/AnalysesCoreApi.ts @@ -506,124 +506,6 @@ export class AnalysesCoreApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - /** - * Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - * List strings for an analysis. - * @param analysisId Analysis ID - * @param page Page number (1-indexed). - * @param pageSize Number of results per page. - * @param search Filter by string value (case-insensitive substring match). - * @param functionSearch Filter by function name (case-insensitive substring match). - * @param orderBy Field to order results by. - * @param sortOrder Sort direction. - */ - public async getAnalysisStrings(analysisId: number, page?: number, pageSize?: number, search?: string, functionSearch?: string, orderBy?: 'value' | 'length', sortOrder?: 'ASC' | 'DESC', _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'analysisId' is not null or undefined - if (analysisId === null || analysisId === undefined) { - throw new RequiredError("AnalysesCoreApi", "getAnalysisStrings", "analysisId"); - } - - - - - - - - - // Path Params - const localVarPath = '/v3/analyses/{analysis_id}/functions/strings' - .replace('{' + 'analysis_id' + '}', encodeURIComponent(String(analysisId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - // Query Params - if (page !== undefined) { - requestContext.setQueryParam("page", ObjectSerializer.serialize(page, "number", "int64")); - } - - // Query Params - if (pageSize !== undefined) { - requestContext.setQueryParam("page_size", ObjectSerializer.serialize(pageSize, "number", "int64")); - } - - // Query Params - if (search !== undefined) { - requestContext.setQueryParam("search", ObjectSerializer.serialize(search, "string", "")); - } - - // Query Params - if (functionSearch !== undefined) { - requestContext.setQueryParam("function_search", ObjectSerializer.serialize(functionSearch, "string", "")); - } - - // Query Params - if (orderBy !== undefined) { - requestContext.setQueryParam("order_by", ObjectSerializer.serialize(orderBy, "'value' | 'length'", "")); - } - - // Query Params - if (sortOrder !== undefined) { - requestContext.setQueryParam("sort_order", ObjectSerializer.serialize(sortOrder, "'ASC' | 'DESC'", "")); - } - - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["APIKey"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - - /** - * Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - * Get the string-extraction status for an analysis. - * @param analysisId Analysis ID - */ - public async getAnalysisStringsStatus(analysisId: number, _options?: Configuration): Promise { - let _config = _options || this.configuration; - - // verify required parameter 'analysisId' is not null or undefined - if (analysisId === null || analysisId === undefined) { - throw new RequiredError("AnalysesCoreApi", "getAnalysisStringsStatus", "analysisId"); - } - - - // Path Params - const localVarPath = '/v3/analyses/{analysis_id}/functions/strings/status' - .replace('{' + 'analysis_id' + '}', encodeURIComponent(String(analysisId))); - - // Make Request Context - const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - - - let authMethod: SecurityAuthentication | undefined; - // Apply auth methods - authMethod = _config.authMethods["APIKey"] - if (authMethod?.applySecurityAuthentication) { - await authMethod?.applySecurityAuthentication(requestContext); - } - - const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default - if (defaultAuth?.applySecurityAuthentication) { - await defaultAuth?.applySecurityAuthentication(requestContext); - } - - return requestContext; - } - /** * Inserts a log record for an analysis. Only the analysis owner can insert logs. * Insert a log entry for an analysis @@ -1153,6 +1035,124 @@ export class AnalysesCoreApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * List strings for an analysis. + * @param analysisId Analysis ID + * @param page Page number (1-indexed). + * @param pageSize Number of results per page. + * @param search Filter by string value (case-insensitive substring match). + * @param functionSearch Filter by function name (case-insensitive substring match). + * @param orderBy Field to order results by. + * @param sortOrder Sort direction. + */ + public async v3GetAnalysisStrings(analysisId: number, page?: number, pageSize?: number, search?: string, functionSearch?: string, orderBy?: 'value' | 'length', sortOrder?: 'ASC' | 'DESC', _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'analysisId' is not null or undefined + if (analysisId === null || analysisId === undefined) { + throw new RequiredError("AnalysesCoreApi", "v3GetAnalysisStrings", "analysisId"); + } + + + + + + + + + // Path Params + const localVarPath = '/v3/analyses/{analysis_id}/functions/strings' + .replace('{' + 'analysis_id' + '}', encodeURIComponent(String(analysisId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (page !== undefined) { + requestContext.setQueryParam("page", ObjectSerializer.serialize(page, "number", "int64")); + } + + // Query Params + if (pageSize !== undefined) { + requestContext.setQueryParam("page_size", ObjectSerializer.serialize(pageSize, "number", "int64")); + } + + // Query Params + if (search !== undefined) { + requestContext.setQueryParam("search", ObjectSerializer.serialize(search, "string", "")); + } + + // Query Params + if (functionSearch !== undefined) { + requestContext.setQueryParam("function_search", ObjectSerializer.serialize(functionSearch, "string", "")); + } + + // Query Params + if (orderBy !== undefined) { + requestContext.setQueryParam("order_by", ObjectSerializer.serialize(orderBy, "'value' | 'length'", "")); + } + + // Query Params + if (sortOrder !== undefined) { + requestContext.setQueryParam("sort_order", ObjectSerializer.serialize(sortOrder, "'ASC' | 'DESC'", "")); + } + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["APIKey"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Get the string-extraction status for an analysis. + * @param analysisId Analysis ID + */ + public async v3GetAnalysisStringsStatus(analysisId: number, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'analysisId' is not null or undefined + if (analysisId === null || analysisId === undefined) { + throw new RequiredError("AnalysesCoreApi", "v3GetAnalysisStringsStatus", "analysisId"); + } + + + // Path Params + const localVarPath = '/v3/analyses/{analysis_id}/functions/strings/status' + .replace('{' + 'analysis_id' + '}', encodeURIComponent(String(analysisId))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["APIKey"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class AnalysesCoreApiResponseProcessor { @@ -1668,120 +1668,6 @@ export class AnalysesCoreApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to getAnalysisStrings - * @throws ApiException if the response code was not in [200, 299] - */ - public async getAnalysisStringsWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: ListAnalysisStringsOutputBody = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "ListAnalysisStringsOutputBody", "" - ) as ListAnalysisStringsOutputBody; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("403", response.httpStatusCode)) { - const body: APIError = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "APIError", "" - ) as APIError; - throw new ApiException(response.httpStatusCode, "Forbidden", body, response.headers); - } - if (isCodeInRange("404", response.httpStatusCode)) { - const body: APIError = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "APIError", "" - ) as APIError; - throw new ApiException(response.httpStatusCode, "Not Found", body, response.headers); - } - if (isCodeInRange("422", response.httpStatusCode)) { - const body: APIError = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "APIError", "" - ) as APIError; - throw new ApiException(response.httpStatusCode, "Unprocessable Entity", body, response.headers); - } - if (isCodeInRange("500", response.httpStatusCode)) { - const body: APIError = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "APIError", "" - ) as APIError; - throw new ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: ListAnalysisStringsOutputBody = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "ListAnalysisStringsOutputBody", "" - ) as ListAnalysisStringsOutputBody; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to getAnalysisStringsStatus - * @throws ApiException if the response code was not in [200, 299] - */ - public async getAnalysisStringsStatusWithHttpInfo(response: ResponseContext): Promise> { - const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); - if (isCodeInRange("200", response.httpStatusCode)) { - const body: GetAnalysisStringsStatusOutputBody = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "GetAnalysisStringsStatusOutputBody", "" - ) as GetAnalysisStringsStatusOutputBody; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - if (isCodeInRange("403", response.httpStatusCode)) { - const body: APIError = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "APIError", "" - ) as APIError; - throw new ApiException(response.httpStatusCode, "Forbidden", body, response.headers); - } - if (isCodeInRange("404", response.httpStatusCode)) { - const body: APIError = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "APIError", "" - ) as APIError; - throw new ApiException(response.httpStatusCode, "Not Found", body, response.headers); - } - if (isCodeInRange("422", response.httpStatusCode)) { - const body: APIError = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "APIError", "" - ) as APIError; - throw new ApiException(response.httpStatusCode, "Unprocessable Entity", body, response.headers); - } - if (isCodeInRange("500", response.httpStatusCode)) { - const body: APIError = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "APIError", "" - ) as APIError; - throw new ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: GetAnalysisStringsStatusOutputBody = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "GetAnalysisStringsStatusOutputBody", "" - ) as GetAnalysisStringsStatusOutputBody; - return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); - } - - throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); - } - /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -2084,4 +1970,118 @@ export class AnalysesCoreApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to v3GetAnalysisStrings + * @throws ApiException if the response code was not in [200, 299] + */ + public async v3GetAnalysisStringsWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ListAnalysisStringsOutputBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListAnalysisStringsOutputBody", "" + ) as ListAnalysisStringsOutputBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: APIError = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIError", "" + ) as APIError; + throw new ApiException(response.httpStatusCode, "Forbidden", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: APIError = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIError", "" + ) as APIError; + throw new ApiException(response.httpStatusCode, "Not Found", body, response.headers); + } + if (isCodeInRange("422", response.httpStatusCode)) { + const body: APIError = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIError", "" + ) as APIError; + throw new ApiException(response.httpStatusCode, "Unprocessable Entity", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: APIError = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIError", "" + ) as APIError; + throw new ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ListAnalysisStringsOutputBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListAnalysisStringsOutputBody", "" + ) as ListAnalysisStringsOutputBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to v3GetAnalysisStringsStatus + * @throws ApiException if the response code was not in [200, 299] + */ + public async v3GetAnalysisStringsStatusWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: GetAnalysisStringsStatusOutputBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetAnalysisStringsStatusOutputBody", "" + ) as GetAnalysisStringsStatusOutputBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("403", response.httpStatusCode)) { + const body: APIError = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIError", "" + ) as APIError; + throw new ApiException(response.httpStatusCode, "Forbidden", body, response.headers); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: APIError = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIError", "" + ) as APIError; + throw new ApiException(response.httpStatusCode, "Not Found", body, response.headers); + } + if (isCodeInRange("422", response.httpStatusCode)) { + const body: APIError = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIError", "" + ) as APIError; + throw new ApiException(response.httpStatusCode, "Unprocessable Entity", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: APIError = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIError", "" + ) as APIError; + throw new ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GetAnalysisStringsStatusOutputBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GetAnalysisStringsStatusOutputBody", "" + ) as GetAnalysisStringsStatusOutputBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/apis/CollectionsApi.ts b/apis/CollectionsApi.ts index 1bacb18..8c471d1 100644 --- a/apis/CollectionsApi.ts +++ b/apis/CollectionsApi.ts @@ -8,6 +8,7 @@ import {canConsumeForm, isCodeInRange} from '../util'; import {SecurityAuthentication} from '../auth/auth'; +import { APIError } from '../models/APIError'; import { AppApiRestV2CollectionsEnumsOrderBy } from '../models/AppApiRestV2CollectionsEnumsOrderBy'; import { BaseResponse } from '../models/BaseResponse'; import { BaseResponseBool } from '../models/BaseResponseBool'; @@ -19,6 +20,8 @@ import { CollectionBinariesUpdateRequest } from '../models/CollectionBinariesUpd import { CollectionCreateRequest } from '../models/CollectionCreateRequest'; import { CollectionTagsUpdateRequest } from '../models/CollectionTagsUpdateRequest'; import { CollectionUpdateRequest } from '../models/CollectionUpdateRequest'; +import { CreateCollectionInputBody } from '../models/CreateCollectionInputBody'; +import { CreateCollectionOutputBody } from '../models/CreateCollectionOutputBody'; import { Filters } from '../models/Filters'; import { Order } from '../models/Order'; @@ -75,6 +78,54 @@ export class CollectionsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Creates a new collection, optionally tagging it and linking binary IDs to it. Tags and binaries are returned in the response only when they were supplied in the request. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Create a collection. + * @param createCollectionInputBody + */ + public async createCollection_1(createCollectionInputBody: CreateCollectionInputBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'createCollectionInputBody' is not null or undefined + if (createCollectionInputBody === null || createCollectionInputBody === undefined) { + throw new RequiredError("CollectionsApi", "createCollection_1", "createCollectionInputBody"); + } + + + // Path Params + const localVarPath = '/v3/collections'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(createCollectionInputBody, "CreateCollectionInputBody", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["APIKey"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Deletes a collection * Deletes a collection @@ -469,6 +520,56 @@ export class CollectionsApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createCollection_1 + * @throws ApiException if the response code was not in [200, 299] + */ + public async createCollection_1WithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("201", response.httpStatusCode)) { + const body: CreateCollectionOutputBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CreateCollectionOutputBody", "" + ) as CreateCollectionOutputBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("404", response.httpStatusCode)) { + const body: APIError = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIError", "" + ) as APIError; + throw new ApiException(response.httpStatusCode, "Not Found", body, response.headers); + } + if (isCodeInRange("422", response.httpStatusCode)) { + const body: APIError = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIError", "" + ) as APIError; + throw new ApiException(response.httpStatusCode, "Unprocessable Entity", body, response.headers); + } + if (isCodeInRange("500", response.httpStatusCode)) { + const body: APIError = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIError", "" + ) as APIError; + throw new ApiException(response.httpStatusCode, "Internal Server Error", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CreateCollectionOutputBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CreateCollectionOutputBody", "" + ) as CreateCollectionOutputBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects diff --git a/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index 06b19bd..4237b72 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -15,8 +15,6 @@ Method | HTTP request | Description [**getAnalysisParams**](AnalysesCoreApi.md#getAnalysisParams) | **GET** /v2/analyses/{analysis_id}/params | Gets analysis param information [**getAnalysisQueuePosition**](AnalysesCoreApi.md#getAnalysisQueuePosition) | **GET** /v2/analyses/{analysis_id}/queue-position | Get the queue position of an analysis [**getAnalysisStatus**](AnalysesCoreApi.md#getAnalysisStatus) | **GET** /v2/analyses/{analysis_id}/status | Gets the status of an analysis -[**getAnalysisStrings**](AnalysesCoreApi.md#getAnalysisStrings) | **GET** /v3/analyses/{analysis_id}/functions/strings | List strings for an analysis. -[**getAnalysisStringsStatus**](AnalysesCoreApi.md#getAnalysisStringsStatus) | **GET** /v3/analyses/{analysis_id}/functions/strings/status | Get the string-extraction status for an analysis. [**insertAnalysisLog**](AnalysesCoreApi.md#insertAnalysisLog) | **POST** /v2/analyses/{analysis_id}/logs | Insert a log entry for an analysis [**listAnalyses**](AnalysesCoreApi.md#listAnalyses) | **GET** /v2/analyses/list | Gets the most recent analyses [**lookupBinaryId**](AnalysesCoreApi.md#lookupBinaryId) | **GET** /v2/analyses/lookup/{binary_id} | Gets the analysis ID from binary ID @@ -25,6 +23,8 @@ Method | HTTP request | Description [**updateAnalysis**](AnalysesCoreApi.md#updateAnalysis) | **PATCH** /v2/analyses/{analysis_id} | Update Analysis [**updateAnalysisTags**](AnalysesCoreApi.md#updateAnalysisTags) | **PATCH** /v2/analyses/{analysis_id}/tags | Update Analysis Tags [**uploadFile**](AnalysesCoreApi.md#uploadFile) | **POST** /v2/upload | Upload File +[**v3GetAnalysisStrings**](AnalysesCoreApi.md#v3GetAnalysisStrings) | **GET** /v3/analyses/{analysis_id}/functions/strings | List strings for an analysis. +[**v3GetAnalysisStringsStatus**](AnalysesCoreApi.md#v3GetAnalysisStringsStatus) | **GET** /v3/analyses/{analysis_id}/functions/strings/status | Get the string-extraction status for an analysis. # **addUserStringToAnalysis** @@ -692,138 +692,6 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) -# **getAnalysisStrings** -> ListAnalysisStringsOutputBody getAnalysisStrings() - -Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - -### Example - - -```typescript -import { createConfiguration, AnalysesCoreApi } from '@revengai/sdk'; -import type { AnalysesCoreApiGetAnalysisStringsRequest } from '@revengai/sdk'; - -const configuration = createConfiguration(); -const apiInstance = new AnalysesCoreApi(configuration); - -const request: AnalysesCoreApiGetAnalysisStringsRequest = { - // Analysis ID - analysisId: 1, - // Page number (1-indexed). (optional) - page: 1, - // Number of results per page. (optional) - pageSize: 100, - // Filter by string value (case-insensitive substring match). (optional) - search: "search_example", - // Filter by function name (case-insensitive substring match). (optional) - functionSearch: "function_search_example", - // Field to order results by. (optional) - orderBy: "value", - // Sort direction. (optional) - sortOrder: "ASC", -}; - -const data = await apiInstance.getAnalysisStrings(request); -console.log('API called successfully. Returned data:', data); -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **analysisId** | [**number**] | Analysis ID | defaults to undefined - **page** | [**number**] | Page number (1-indexed). | (optional) defaults to 1 - **pageSize** | [**number**] | Number of results per page. | (optional) defaults to 100 - **search** | [**string**] | Filter by string value (case-insensitive substring match). | (optional) defaults to undefined - **functionSearch** | [**string**] | Filter by function name (case-insensitive substring match). | (optional) defaults to undefined - **orderBy** | [**'value' | 'length'**]**Array<'value' | 'length' | '11184809'>** | Field to order results by. | (optional) defaults to 'value' - **sortOrder** | [**'ASC' | 'DESC'**]**Array<'ASC' | 'DESC' | '11184809'>** | Sort direction. | (optional) defaults to 'ASC' - - -### Return type - -**ListAnalysisStringsOutputBody** - -### Authorization - -[APIKey](README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**422** | Unprocessable Entity | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) - -# **getAnalysisStringsStatus** -> GetAnalysisStringsStatusOutputBody getAnalysisStringsStatus() - -Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - -### Example - - -```typescript -import { createConfiguration, AnalysesCoreApi } from '@revengai/sdk'; -import type { AnalysesCoreApiGetAnalysisStringsStatusRequest } from '@revengai/sdk'; - -const configuration = createConfiguration(); -const apiInstance = new AnalysesCoreApi(configuration); - -const request: AnalysesCoreApiGetAnalysisStringsStatusRequest = { - // Analysis ID - analysisId: 1, -}; - -const data = await apiInstance.getAnalysisStringsStatus(request); -console.log('API called successfully. Returned data:', data); -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **analysisId** | [**number**] | Analysis ID | defaults to undefined - - -### Return type - -**GetAnalysisStringsStatusOutputBody** - -### Authorization - -[APIKey](README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**422** | Unprocessable Entity | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) - # **insertAnalysisLog** > BaseResponse insertAnalysisLog(insertAnalysisLogRequest) @@ -1344,4 +1212,136 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **v3GetAnalysisStrings** +> ListAnalysisStringsOutputBody v3GetAnalysisStrings() + +Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + + +```typescript +import { createConfiguration, AnalysesCoreApi } from '@revengai/sdk'; +import type { AnalysesCoreApiV3GetAnalysisStringsRequest } from '@revengai/sdk'; + +const configuration = createConfiguration(); +const apiInstance = new AnalysesCoreApi(configuration); + +const request: AnalysesCoreApiV3GetAnalysisStringsRequest = { + // Analysis ID + analysisId: 1, + // Page number (1-indexed). (optional) + page: 1, + // Number of results per page. (optional) + pageSize: 100, + // Filter by string value (case-insensitive substring match). (optional) + search: "search_example", + // Filter by function name (case-insensitive substring match). (optional) + functionSearch: "function_search_example", + // Field to order results by. (optional) + orderBy: "value", + // Sort direction. (optional) + sortOrder: "ASC", +}; + +const data = await apiInstance.v3GetAnalysisStrings(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysisId** | [**number**] | Analysis ID | defaults to undefined + **page** | [**number**] | Page number (1-indexed). | (optional) defaults to 1 + **pageSize** | [**number**] | Number of results per page. | (optional) defaults to 100 + **search** | [**string**] | Filter by string value (case-insensitive substring match). | (optional) defaults to undefined + **functionSearch** | [**string**] | Filter by function name (case-insensitive substring match). | (optional) defaults to undefined + **orderBy** | [**'value' | 'length'**]**Array<'value' | 'length' | '11184809'>** | Field to order results by. | (optional) defaults to 'value' + **sortOrder** | [**'ASC' | 'DESC'**]**Array<'ASC' | 'DESC' | '11184809'>** | Sort direction. | (optional) defaults to 'ASC' + + +### Return type + +**ListAnalysisStringsOutputBody** + +### Authorization + +[APIKey](README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **v3GetAnalysisStringsStatus** +> GetAnalysisStringsStatusOutputBody v3GetAnalysisStringsStatus() + +Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + + +```typescript +import { createConfiguration, AnalysesCoreApi } from '@revengai/sdk'; +import type { AnalysesCoreApiV3GetAnalysisStringsStatusRequest } from '@revengai/sdk'; + +const configuration = createConfiguration(); +const apiInstance = new AnalysesCoreApi(configuration); + +const request: AnalysesCoreApiV3GetAnalysisStringsStatusRequest = { + // Analysis ID + analysisId: 1, +}; + +const data = await apiInstance.v3GetAnalysisStringsStatus(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysisId** | [**number**] | Analysis ID | defaults to undefined + + +### Return type + +**GetAnalysisStringsStatusOutputBody** + +### Authorization + +[APIKey](README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/docs/CollectionsApi.md b/docs/CollectionsApi.md index f4a00ac..467344a 100644 --- a/docs/CollectionsApi.md +++ b/docs/CollectionsApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://api.reveng.ai* Method | HTTP request | Description ------------- | ------------- | ------------- [**createCollection**](CollectionsApi.md#createCollection) | **POST** /v2/collections | Creates new collection information +[**createCollection_0**](CollectionsApi.md#createCollection_0) | **POST** /v3/collections | Create a collection. [**deleteCollection**](CollectionsApi.md#deleteCollection) | **DELETE** /v2/collections/{collection_id} | Deletes a collection [**getCollection**](CollectionsApi.md#getCollection) | **GET** /v2/collections/{collection_id} | Returns a collection [**listCollections**](CollectionsApi.md#listCollections) | **GET** /v2/collections | Gets basic collections information @@ -78,6 +79,62 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **createCollection_0** +> CreateCollectionOutputBody createCollection_0(createCollectionInputBody) + +Creates a new collection, optionally tagging it and linking binary IDs to it. Tags and binaries are returned in the response only when they were supplied in the request. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + +### Example + + +```typescript +import { createConfiguration, CollectionsApi } from '@revengai/sdk'; +import type { CollectionsApiCreateCollection0Request } from '@revengai/sdk'; + +const configuration = createConfiguration(); +const apiInstance = new CollectionsApi(configuration); + +const request: CollectionsApiCreateCollection0Request = { + + createCollectionInputBody: , +}; + +const data = await apiInstance.createCollection_0(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createCollectionInputBody** | **CreateCollectionInputBody**| | + + +### Return type + +**CreateCollectionOutputBody** + +### Authorization + +[APIKey](README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + # **deleteCollection** > BaseResponseBool deleteCollection() diff --git a/models/Binary.ts b/models/Binary.ts new file mode 100644 index 0000000..d0fed08 --- /dev/null +++ b/models/Binary.ts @@ -0,0 +1,77 @@ +/** + * RevEng.AI API + * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class Binary { + 'analysisId': number; + 'binaryId': number; + 'binaryName': string; + 'createdAt': Date; + 'isSystemAnalysis': boolean; + 'ownerId': number; + 'sha256Hash': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "analysisId", + "baseName": "analysis_id", + "type": "number", + "format": "int64" + }, + { + "name": "binaryId", + "baseName": "binary_id", + "type": "number", + "format": "int64" + }, + { + "name": "binaryName", + "baseName": "binary_name", + "type": "string", + "format": "" + }, + { + "name": "createdAt", + "baseName": "created_at", + "type": "Date", + "format": "date-time" + }, + { + "name": "isSystemAnalysis", + "baseName": "is_system_analysis", + "type": "boolean", + "format": "" + }, + { + "name": "ownerId", + "baseName": "owner_id", + "type": "number", + "format": "int64" + }, + { + "name": "sha256Hash", + "baseName": "sha_256_hash", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Binary.attributeTypeMap; + } + + public constructor() { + } +} diff --git a/models/CreateCollectionInputBody.ts b/models/CreateCollectionInputBody.ts new file mode 100644 index 0000000..510a980 --- /dev/null +++ b/models/CreateCollectionInputBody.ts @@ -0,0 +1,97 @@ +/** + * RevEng.AI API + * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http'; + +export class CreateCollectionInputBody { + /** + * Optional binary IDs to link to the collection. + */ + 'binaries'?: Array | null; + /** + * Collection name. + */ + 'collectionName': string; + /** + * Visibility scope. + */ + 'collectionScope': CreateCollectionInputBodyCollectionScopeEnum; + /** + * Collection description. + */ + 'description': string; + /** + * Model ID the collection is associated with. + */ + 'modelId': number; + /** + * Optional tags to attach to the collection. + */ + 'tags'?: Array | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "binaries", + "baseName": "binaries", + "type": "Array", + "format": "int64" + }, + { + "name": "collectionName", + "baseName": "collection_name", + "type": "string", + "format": "" + }, + { + "name": "collectionScope", + "baseName": "collection_scope", + "type": "CreateCollectionInputBodyCollectionScopeEnum", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "modelId", + "baseName": "model_id", + "type": "number", + "format": "int64" + }, + { + "name": "tags", + "baseName": "tags", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CreateCollectionInputBody.attributeTypeMap; + } + + public constructor() { + } +} + +export enum CreateCollectionInputBodyCollectionScopeEnum { + Private = 'PRIVATE', + Public = 'PUBLIC', + Protected = 'PROTECTED', + Team = 'TEAM', + UnknownDefaultOpenApi = '11184809' +} + diff --git a/models/CreateCollectionOutputBody.ts b/models/CreateCollectionOutputBody.ts new file mode 100644 index 0000000..8901158 --- /dev/null +++ b/models/CreateCollectionOutputBody.ts @@ -0,0 +1,106 @@ +/** + * RevEng.AI API + * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Binary } from '../models/Binary'; +import { HttpFile } from '../http/http'; + +export class CreateCollectionOutputBody { + 'binaries'?: Array | null; + 'collectionId': number; + 'collectionName': string; + 'collectionScope': string; + 'createdAt': Date; + 'description': string; + 'modelId': number; + 'tags'?: Array | null; + 'teamId': number; + 'updatedAt': Date; + 'userId': number; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "binaries", + "baseName": "binaries", + "type": "Array", + "format": "" + }, + { + "name": "collectionId", + "baseName": "collection_id", + "type": "number", + "format": "int64" + }, + { + "name": "collectionName", + "baseName": "collection_name", + "type": "string", + "format": "" + }, + { + "name": "collectionScope", + "baseName": "collection_scope", + "type": "string", + "format": "" + }, + { + "name": "createdAt", + "baseName": "created_at", + "type": "Date", + "format": "date-time" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "modelId", + "baseName": "model_id", + "type": "number", + "format": "int64" + }, + { + "name": "tags", + "baseName": "tags", + "type": "Array", + "format": "" + }, + { + "name": "teamId", + "baseName": "team_id", + "type": "number", + "format": "int64" + }, + { + "name": "updatedAt", + "baseName": "updated_at", + "type": "Date", + "format": "date-time" + }, + { + "name": "userId", + "baseName": "user_id", + "type": "number", + "format": "int64" + } ]; + + static getAttributeTypeMap() { + return CreateCollectionOutputBody.attributeTypeMap; + } + + public constructor() { + } +} diff --git a/models/ObjectSerializer.ts b/models/ObjectSerializer.ts index 5615a74..00af873 100644 --- a/models/ObjectSerializer.ts +++ b/models/ObjectSerializer.ts @@ -120,6 +120,7 @@ export * from '../models/BatchRenameItem'; export * from '../models/BatchRenameOutputBody'; export * from '../models/BinariesRelatedStatusResponse'; export * from '../models/BinariesTaskStatus'; +export * from '../models/Binary'; export * from '../models/BinaryAdditionalDetailsDataResponse'; export * from '../models/BinaryAdditionalResponse'; export * from '../models/BinaryConfig'; @@ -162,6 +163,8 @@ export * from '../models/ConversationContext'; export * from '../models/ConversationWithEvents'; export * from '../models/CreateAIDecompOutputBody'; export * from '../models/CreateCheckoutSessionInputBody'; +export * from '../models/CreateCollectionInputBody'; +export * from '../models/CreateCollectionOutputBody'; export * from '../models/CreateConversationRequest'; export * from '../models/CreatePortalSessionInputBody'; export * from '../models/Created'; @@ -536,6 +539,7 @@ import { BatchRenameItem } from '../models/BatchRenameItem'; import { BatchRenameOutputBody } from '../models/BatchRenameOutputBody'; import { BinariesRelatedStatusResponse } from '../models/BinariesRelatedStatusResponse'; import { BinariesTaskStatus } from '../models/BinariesTaskStatus'; +import { Binary } from '../models/Binary'; import { BinaryAdditionalDetailsDataResponse } from '../models/BinaryAdditionalDetailsDataResponse'; import { BinaryAdditionalResponse } from '../models/BinaryAdditionalResponse'; import { BinaryConfig } from '../models/BinaryConfig'; @@ -578,6 +582,8 @@ import { ConversationContext } from '../models/ConversationContext'; import { ConversationWithEvents } from '../models/ConversationWithEvents'; import { CreateAIDecompOutputBody } from '../models/CreateAIDecompOutputBody'; import { CreateCheckoutSessionInputBody } from '../models/CreateCheckoutSessionInputBody'; +import { CreateCollectionInputBody , CreateCollectionInputBodyCollectionScopeEnum } from '../models/CreateCollectionInputBody'; +import { CreateCollectionOutputBody } from '../models/CreateCollectionOutputBody'; import { CreateConversationRequest } from '../models/CreateConversationRequest'; import { CreatePortalSessionInputBody } from '../models/CreatePortalSessionInputBody'; import { Created } from '../models/Created'; @@ -855,6 +861,7 @@ let enumsMap: Set = new Set([ "BinaryTaskStatus", "CollectionScope", "CommentsDataTaskStatusEnum", + "CreateCollectionInputBodyCollectionScopeEnum", "DecompilationDataStatusEnum", "DynamicExecutionStatus", "ErrorBodyCodeEnum", @@ -1035,6 +1042,7 @@ let typeMap: {[index: string]: any} = { "BatchRenameItem": BatchRenameItem, "BatchRenameOutputBody": BatchRenameOutputBody, "BinariesRelatedStatusResponse": BinariesRelatedStatusResponse, + "Binary": Binary, "BinaryAdditionalDetailsDataResponse": BinaryAdditionalDetailsDataResponse, "BinaryAdditionalResponse": BinaryAdditionalResponse, "BinaryConfig": BinaryConfig, @@ -1075,6 +1083,8 @@ let typeMap: {[index: string]: any} = { "ConversationWithEvents": ConversationWithEvents, "CreateAIDecompOutputBody": CreateAIDecompOutputBody, "CreateCheckoutSessionInputBody": CreateCheckoutSessionInputBody, + "CreateCollectionInputBody": CreateCollectionInputBody, + "CreateCollectionOutputBody": CreateCollectionOutputBody, "CreateConversationRequest": CreateConversationRequest, "CreatePortalSessionInputBody": CreatePortalSessionInputBody, "Created": Created, diff --git a/models/all.ts b/models/all.ts index ab82492..2700735 100644 --- a/models/all.ts +++ b/models/all.ts @@ -120,6 +120,7 @@ export * from '../models/BatchRenameItem' export * from '../models/BatchRenameOutputBody' export * from '../models/BinariesRelatedStatusResponse' export * from '../models/BinariesTaskStatus' +export * from '../models/Binary' export * from '../models/BinaryAdditionalDetailsDataResponse' export * from '../models/BinaryAdditionalResponse' export * from '../models/BinaryConfig' @@ -162,6 +163,8 @@ export * from '../models/ConversationContext' export * from '../models/ConversationWithEvents' export * from '../models/CreateAIDecompOutputBody' export * from '../models/CreateCheckoutSessionInputBody' +export * from '../models/CreateCollectionInputBody' +export * from '../models/CreateCollectionOutputBody' export * from '../models/CreateConversationRequest' export * from '../models/CreatePortalSessionInputBody' export * from '../models/Created' diff --git a/package.json b/package.json index c3afcc4..4833cd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@revengai/sdk", - "version": "v3.89.0", + "version": "v3.91.1", "description": "TypeScript SDK for the RevEng.AI API", "author": "RevEng.AI", "repository": { diff --git a/types/ObjectParamAPI.ts b/types/ObjectParamAPI.ts index 1abf42f..f2d0d82 100644 --- a/types/ObjectParamAPI.ts +++ b/types/ObjectParamAPI.ts @@ -124,6 +124,7 @@ import { BatchRenameItem } from '../models/BatchRenameItem'; import { BatchRenameOutputBody } from '../models/BatchRenameOutputBody'; import { BinariesRelatedStatusResponse } from '../models/BinariesRelatedStatusResponse'; import { BinariesTaskStatus } from '../models/BinariesTaskStatus'; +import { Binary } from '../models/Binary'; import { BinaryAdditionalDetailsDataResponse } from '../models/BinaryAdditionalDetailsDataResponse'; import { BinaryAdditionalResponse } from '../models/BinaryAdditionalResponse'; import { BinaryConfig } from '../models/BinaryConfig'; @@ -166,6 +167,8 @@ import { ConversationContext } from '../models/ConversationContext'; import { ConversationWithEvents } from '../models/ConversationWithEvents'; import { CreateAIDecompOutputBody } from '../models/CreateAIDecompOutputBody'; import { CreateCheckoutSessionInputBody } from '../models/CreateCheckoutSessionInputBody'; +import { CreateCollectionInputBody } from '../models/CreateCollectionInputBody'; +import { CreateCollectionOutputBody } from '../models/CreateCollectionOutputBody'; import { CreateConversationRequest } from '../models/CreateConversationRequest'; import { CreatePortalSessionInputBody } from '../models/CreatePortalSessionInputBody'; import { Created } from '../models/Created'; @@ -1022,73 +1025,6 @@ export interface AnalysesCoreApiGetAnalysisStatusRequest { analysisId: number } -export interface AnalysesCoreApiGetAnalysisStringsRequest { - /** - * Analysis ID - * Minimum: 1 - * Defaults to: undefined - * @type number - * @memberof AnalysesCoreApigetAnalysisStrings - */ - analysisId: number - /** - * Page number (1-indexed). - * Minimum: 1 - * Defaults to: 1 - * @type number - * @memberof AnalysesCoreApigetAnalysisStrings - */ - page?: number - /** - * Number of results per page. - * Minimum: 1 - * Maximum: 500 - * Defaults to: 100 - * @type number - * @memberof AnalysesCoreApigetAnalysisStrings - */ - pageSize?: number - /** - * Filter by string value (case-insensitive substring match). - * Defaults to: undefined - * @type string - * @memberof AnalysesCoreApigetAnalysisStrings - */ - search?: string - /** - * Filter by function name (case-insensitive substring match). - * Defaults to: undefined - * @type string - * @memberof AnalysesCoreApigetAnalysisStrings - */ - functionSearch?: string - /** - * Field to order results by. - * Defaults to: 'value' - * @type 'value' | 'length' - * @memberof AnalysesCoreApigetAnalysisStrings - */ - orderBy?: 'value' | 'length' - /** - * Sort direction. - * Defaults to: 'ASC' - * @type 'ASC' | 'DESC' - * @memberof AnalysesCoreApigetAnalysisStrings - */ - sortOrder?: 'ASC' | 'DESC' -} - -export interface AnalysesCoreApiGetAnalysisStringsStatusRequest { - /** - * Analysis ID - * Minimum: 1 - * Defaults to: undefined - * @type number - * @memberof AnalysesCoreApigetAnalysisStringsStatus - */ - analysisId: number -} - export interface AnalysesCoreApiInsertAnalysisLogRequest { /** * @@ -1299,6 +1235,73 @@ export interface AnalysesCoreApiUploadFileRequest { forceOverwrite?: boolean } +export interface AnalysesCoreApiV3GetAnalysisStringsRequest { + /** + * Analysis ID + * Minimum: 1 + * Defaults to: undefined + * @type number + * @memberof AnalysesCoreApiv3GetAnalysisStrings + */ + analysisId: number + /** + * Page number (1-indexed). + * Minimum: 1 + * Defaults to: 1 + * @type number + * @memberof AnalysesCoreApiv3GetAnalysisStrings + */ + page?: number + /** + * Number of results per page. + * Minimum: 1 + * Maximum: 500 + * Defaults to: 100 + * @type number + * @memberof AnalysesCoreApiv3GetAnalysisStrings + */ + pageSize?: number + /** + * Filter by string value (case-insensitive substring match). + * Defaults to: undefined + * @type string + * @memberof AnalysesCoreApiv3GetAnalysisStrings + */ + search?: string + /** + * Filter by function name (case-insensitive substring match). + * Defaults to: undefined + * @type string + * @memberof AnalysesCoreApiv3GetAnalysisStrings + */ + functionSearch?: string + /** + * Field to order results by. + * Defaults to: 'value' + * @type 'value' | 'length' + * @memberof AnalysesCoreApiv3GetAnalysisStrings + */ + orderBy?: 'value' | 'length' + /** + * Sort direction. + * Defaults to: 'ASC' + * @type 'ASC' | 'DESC' + * @memberof AnalysesCoreApiv3GetAnalysisStrings + */ + sortOrder?: 'ASC' | 'DESC' +} + +export interface AnalysesCoreApiV3GetAnalysisStringsStatusRequest { + /** + * Analysis ID + * Minimum: 1 + * Defaults to: undefined + * @type number + * @memberof AnalysesCoreApiv3GetAnalysisStringsStatus + */ + analysisId: number +} + export class ObjectAnalysesCoreApi { private api: ObservableAnalysesCoreApi @@ -1504,42 +1507,6 @@ export class ObjectAnalysesCoreApi { return this.api.getAnalysisStatus(param.analysisId, options).toPromise(); } - /** - * Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - * List strings for an analysis. - * @param param the request object - */ - public getAnalysisStringsWithHttpInfo(param: AnalysesCoreApiGetAnalysisStringsRequest, options?: ConfigurationOptions): Promise> { - return this.api.getAnalysisStringsWithHttpInfo(param.analysisId, param.page, param.pageSize, param.search, param.functionSearch, param.orderBy, param.sortOrder, options).toPromise(); - } - - /** - * Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - * List strings for an analysis. - * @param param the request object - */ - public getAnalysisStrings(param: AnalysesCoreApiGetAnalysisStringsRequest, options?: ConfigurationOptions): Promise { - return this.api.getAnalysisStrings(param.analysisId, param.page, param.pageSize, param.search, param.functionSearch, param.orderBy, param.sortOrder, options).toPromise(); - } - - /** - * Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - * Get the string-extraction status for an analysis. - * @param param the request object - */ - public getAnalysisStringsStatusWithHttpInfo(param: AnalysesCoreApiGetAnalysisStringsStatusRequest, options?: ConfigurationOptions): Promise> { - return this.api.getAnalysisStringsStatusWithHttpInfo(param.analysisId, options).toPromise(); - } - - /** - * Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - * Get the string-extraction status for an analysis. - * @param param the request object - */ - public getAnalysisStringsStatus(param: AnalysesCoreApiGetAnalysisStringsStatusRequest, options?: ConfigurationOptions): Promise { - return this.api.getAnalysisStringsStatus(param.analysisId, options).toPromise(); - } - /** * Inserts a log record for an analysis. Only the analysis owner can insert logs. * Insert a log entry for an analysis @@ -1682,6 +1649,42 @@ export class ObjectAnalysesCoreApi { return this.api.uploadFile(param.uploadFileType, param.file, param.packedPassword, param.forceOverwrite, options).toPromise(); } + /** + * Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * List strings for an analysis. + * @param param the request object + */ + public v3GetAnalysisStringsWithHttpInfo(param: AnalysesCoreApiV3GetAnalysisStringsRequest, options?: ConfigurationOptions): Promise> { + return this.api.v3GetAnalysisStringsWithHttpInfo(param.analysisId, param.page, param.pageSize, param.search, param.functionSearch, param.orderBy, param.sortOrder, options).toPromise(); + } + + /** + * Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * List strings for an analysis. + * @param param the request object + */ + public v3GetAnalysisStrings(param: AnalysesCoreApiV3GetAnalysisStringsRequest, options?: ConfigurationOptions): Promise { + return this.api.v3GetAnalysisStrings(param.analysisId, param.page, param.pageSize, param.search, param.functionSearch, param.orderBy, param.sortOrder, options).toPromise(); + } + + /** + * Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Get the string-extraction status for an analysis. + * @param param the request object + */ + public v3GetAnalysisStringsStatusWithHttpInfo(param: AnalysesCoreApiV3GetAnalysisStringsStatusRequest, options?: ConfigurationOptions): Promise> { + return this.api.v3GetAnalysisStringsStatusWithHttpInfo(param.analysisId, options).toPromise(); + } + + /** + * Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Get the string-extraction status for an analysis. + * @param param the request object + */ + public v3GetAnalysisStringsStatus(param: AnalysesCoreApiV3GetAnalysisStringsStatusRequest, options?: ConfigurationOptions): Promise { + return this.api.v3GetAnalysisStringsStatus(param.analysisId, options).toPromise(); + } + } import { ObservableAnalysesResultsMetadataApi } from "./ObservableAPI"; @@ -2341,6 +2344,15 @@ export interface CollectionsApiCreateCollectionRequest { collectionCreateRequest: CollectionCreateRequest } +export interface CollectionsApiCreateCollection0Request { + /** + * + * @type CreateCollectionInputBody + * @memberof CollectionsApicreateCollection_1 + */ + createCollectionInputBody: CreateCollectionInputBody +} + export interface CollectionsApiDeleteCollectionRequest { /** * @@ -2519,6 +2531,24 @@ export class ObjectCollectionsApi { return this.api.createCollection(param.collectionCreateRequest, options).toPromise(); } + /** + * Creates a new collection, optionally tagging it and linking binary IDs to it. Tags and binaries are returned in the response only when they were supplied in the request. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Create a collection. + * @param param the request object + */ + public createCollection_1WithHttpInfo(param: CollectionsApiCreateCollection0Request, options?: ConfigurationOptions): Promise> { + return this.api.createCollection_1WithHttpInfo(param.createCollectionInputBody, options).toPromise(); + } + + /** + * Creates a new collection, optionally tagging it and linking binary IDs to it. Tags and binaries are returned in the response only when they were supplied in the request. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Create a collection. + * @param param the request object + */ + public createCollection_1(param: CollectionsApiCreateCollection0Request, options?: ConfigurationOptions): Promise { + return this.api.createCollection_1(param.createCollectionInputBody, options).toPromise(); + } + /** * Deletes a collection * Deletes a collection diff --git a/types/ObservableAPI.ts b/types/ObservableAPI.ts index 11b5d6c..db74944 100644 --- a/types/ObservableAPI.ts +++ b/types/ObservableAPI.ts @@ -125,6 +125,7 @@ import { BatchRenameItem } from '../models/BatchRenameItem'; import { BatchRenameOutputBody } from '../models/BatchRenameOutputBody'; import { BinariesRelatedStatusResponse } from '../models/BinariesRelatedStatusResponse'; import { BinariesTaskStatus } from '../models/BinariesTaskStatus'; +import { Binary } from '../models/Binary'; import { BinaryAdditionalDetailsDataResponse } from '../models/BinaryAdditionalDetailsDataResponse'; import { BinaryAdditionalResponse } from '../models/BinaryAdditionalResponse'; import { BinaryConfig } from '../models/BinaryConfig'; @@ -167,6 +168,8 @@ import { ConversationContext } from '../models/ConversationContext'; import { ConversationWithEvents } from '../models/ConversationWithEvents'; import { CreateAIDecompOutputBody } from '../models/CreateAIDecompOutputBody'; import { CreateCheckoutSessionInputBody } from '../models/CreateCheckoutSessionInputBody'; +import { CreateCollectionInputBody } from '../models/CreateCollectionInputBody'; +import { CreateCollectionOutputBody } from '../models/CreateCollectionOutputBody'; import { CreateConversationRequest } from '../models/CreateConversationRequest'; import { CreatePortalSessionInputBody } from '../models/CreatePortalSessionInputBody'; import { Created } from '../models/Created'; @@ -1371,86 +1374,6 @@ export class ObservableAnalysesCoreApi { return this.getAnalysisStatusWithHttpInfo(analysisId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } - /** - * Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - * List strings for an analysis. - * @param analysisId Analysis ID - * @param [page] Page number (1-indexed). - * @param [pageSize] Number of results per page. - * @param [search] Filter by string value (case-insensitive substring match). - * @param [functionSearch] Filter by function name (case-insensitive substring match). - * @param [orderBy] Field to order results by. - * @param [sortOrder] Sort direction. - */ - public getAnalysisStringsWithHttpInfo(analysisId: number, page?: number, pageSize?: number, search?: string, functionSearch?: string, orderBy?: 'value' | 'length', sortOrder?: 'ASC' | 'DESC', _options?: ConfigurationOptions): Observable> { - const _config = mergeConfiguration(this.configuration, _options); - - const requestContextPromise = this.requestFactory.getAnalysisStrings(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder, _config); - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (const middleware of _config.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (const middleware of _config.middleware.reverse()) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAnalysisStringsWithHttpInfo(rsp))); - })); - } - - /** - * Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - * List strings for an analysis. - * @param analysisId Analysis ID - * @param [page] Page number (1-indexed). - * @param [pageSize] Number of results per page. - * @param [search] Filter by string value (case-insensitive substring match). - * @param [functionSearch] Filter by function name (case-insensitive substring match). - * @param [orderBy] Field to order results by. - * @param [sortOrder] Sort direction. - */ - public getAnalysisStrings(analysisId: number, page?: number, pageSize?: number, search?: string, functionSearch?: string, orderBy?: 'value' | 'length', sortOrder?: 'ASC' | 'DESC', _options?: ConfigurationOptions): Observable { - return this.getAnalysisStringsWithHttpInfo(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - - /** - * Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - * Get the string-extraction status for an analysis. - * @param analysisId Analysis ID - */ - public getAnalysisStringsStatusWithHttpInfo(analysisId: number, _options?: ConfigurationOptions): Observable> { - const _config = mergeConfiguration(this.configuration, _options); - - const requestContextPromise = this.requestFactory.getAnalysisStringsStatus(analysisId, _config); - // build promise chain - let middlewarePreObservable = from(requestContextPromise); - for (const middleware of _config.middleware) { - middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); - } - - return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). - pipe(mergeMap((response: ResponseContext) => { - let middlewarePostObservable = of(response); - for (const middleware of _config.middleware.reverse()) { - middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); - } - return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getAnalysisStringsStatusWithHttpInfo(rsp))); - })); - } - - /** - * Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - * Get the string-extraction status for an analysis. - * @param analysisId Analysis ID - */ - public getAnalysisStringsStatus(analysisId: number, _options?: ConfigurationOptions): Observable { - return this.getAnalysisStringsStatusWithHttpInfo(analysisId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); - } - /** * Inserts a log record for an analysis. Only the analysis owner can insert logs. * Insert a log entry for an analysis @@ -1759,6 +1682,86 @@ export class ObservableAnalysesCoreApi { return this.uploadFileWithHttpInfo(uploadFileType, file, packedPassword, forceOverwrite, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } + /** + * Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * List strings for an analysis. + * @param analysisId Analysis ID + * @param [page] Page number (1-indexed). + * @param [pageSize] Number of results per page. + * @param [search] Filter by string value (case-insensitive substring match). + * @param [functionSearch] Filter by function name (case-insensitive substring match). + * @param [orderBy] Field to order results by. + * @param [sortOrder] Sort direction. + */ + public v3GetAnalysisStringsWithHttpInfo(analysisId: number, page?: number, pageSize?: number, search?: string, functionSearch?: string, orderBy?: 'value' | 'length', sortOrder?: 'ASC' | 'DESC', _options?: ConfigurationOptions): Observable> { + const _config = mergeConfiguration(this.configuration, _options); + + const requestContextPromise = this.requestFactory.v3GetAnalysisStrings(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder, _config); + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of _config.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of _config.middleware.reverse()) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.v3GetAnalysisStringsWithHttpInfo(rsp))); + })); + } + + /** + * Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * List strings for an analysis. + * @param analysisId Analysis ID + * @param [page] Page number (1-indexed). + * @param [pageSize] Number of results per page. + * @param [search] Filter by string value (case-insensitive substring match). + * @param [functionSearch] Filter by function name (case-insensitive substring match). + * @param [orderBy] Field to order results by. + * @param [sortOrder] Sort direction. + */ + public v3GetAnalysisStrings(analysisId: number, page?: number, pageSize?: number, search?: string, functionSearch?: string, orderBy?: 'value' | 'length', sortOrder?: 'ASC' | 'DESC', _options?: ConfigurationOptions): Observable { + return this.v3GetAnalysisStringsWithHttpInfo(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Get the string-extraction status for an analysis. + * @param analysisId Analysis ID + */ + public v3GetAnalysisStringsStatusWithHttpInfo(analysisId: number, _options?: ConfigurationOptions): Observable> { + const _config = mergeConfiguration(this.configuration, _options); + + const requestContextPromise = this.requestFactory.v3GetAnalysisStringsStatus(analysisId, _config); + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of _config.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of _config.middleware.reverse()) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.v3GetAnalysisStringsStatusWithHttpInfo(rsp))); + })); + } + + /** + * Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Get the string-extraction status for an analysis. + * @param analysisId Analysis ID + */ + public v3GetAnalysisStringsStatus(analysisId: number, _options?: ConfigurationOptions): Observable { + return this.v3GetAnalysisStringsStatusWithHttpInfo(analysisId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + } import { AnalysesResultsMetadataApiRequestFactory, AnalysesResultsMetadataApiResponseProcessor} from "../apis/AnalysesResultsMetadataApi"; @@ -2551,6 +2554,40 @@ export class ObservableCollectionsApi { return this.createCollectionWithHttpInfo(collectionCreateRequest, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } + /** + * Creates a new collection, optionally tagging it and linking binary IDs to it. Tags and binaries are returned in the response only when they were supplied in the request. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Create a collection. + * @param createCollectionInputBody + */ + public createCollection_1WithHttpInfo(createCollectionInputBody: CreateCollectionInputBody, _options?: ConfigurationOptions): Observable> { + const _config = mergeConfiguration(this.configuration, _options); + + const requestContextPromise = this.requestFactory.createCollection_1(createCollectionInputBody, _config); + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of _config.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => _config.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of _config.middleware.reverse()) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createCollection_1WithHttpInfo(rsp))); + })); + } + + /** + * Creates a new collection, optionally tagging it and linking binary IDs to it. Tags and binaries are returned in the response only when they were supplied in the request. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Create a collection. + * @param createCollectionInputBody + */ + public createCollection_1(createCollectionInputBody: CreateCollectionInputBody, _options?: ConfigurationOptions): Observable { + return this.createCollection_1WithHttpInfo(createCollectionInputBody, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + /** * Deletes a collection * Deletes a collection diff --git a/types/PromiseAPI.ts b/types/PromiseAPI.ts index 6bfa1f7..eef4bd6 100644 --- a/types/PromiseAPI.ts +++ b/types/PromiseAPI.ts @@ -124,6 +124,7 @@ import { BatchRenameItem } from '../models/BatchRenameItem'; import { BatchRenameOutputBody } from '../models/BatchRenameOutputBody'; import { BinariesRelatedStatusResponse } from '../models/BinariesRelatedStatusResponse'; import { BinariesTaskStatus } from '../models/BinariesTaskStatus'; +import { Binary } from '../models/Binary'; import { BinaryAdditionalDetailsDataResponse } from '../models/BinaryAdditionalDetailsDataResponse'; import { BinaryAdditionalResponse } from '../models/BinaryAdditionalResponse'; import { BinaryConfig } from '../models/BinaryConfig'; @@ -166,6 +167,8 @@ import { ConversationContext } from '../models/ConversationContext'; import { ConversationWithEvents } from '../models/ConversationWithEvents'; import { CreateAIDecompOutputBody } from '../models/CreateAIDecompOutputBody'; import { CreateCheckoutSessionInputBody } from '../models/CreateCheckoutSessionInputBody'; +import { CreateCollectionInputBody } from '../models/CreateCollectionInputBody'; +import { CreateCollectionOutputBody } from '../models/CreateCollectionOutputBody'; import { CreateConversationRequest } from '../models/CreateConversationRequest'; import { CreatePortalSessionInputBody } from '../models/CreatePortalSessionInputBody'; import { Created } from '../models/Created'; @@ -1058,62 +1061,6 @@ export class PromiseAnalysesCoreApi { return result.toPromise(); } - /** - * Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - * List strings for an analysis. - * @param analysisId Analysis ID - * @param [page] Page number (1-indexed). - * @param [pageSize] Number of results per page. - * @param [search] Filter by string value (case-insensitive substring match). - * @param [functionSearch] Filter by function name (case-insensitive substring match). - * @param [orderBy] Field to order results by. - * @param [sortOrder] Sort direction. - */ - public getAnalysisStringsWithHttpInfo(analysisId: number, page?: number, pageSize?: number, search?: string, functionSearch?: string, orderBy?: 'value' | 'length', sortOrder?: 'ASC' | 'DESC', _options?: PromiseConfigurationOptions): Promise> { - const observableOptions = wrapOptions(_options); - const result = this.api.getAnalysisStringsWithHttpInfo(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder, observableOptions); - return result.toPromise(); - } - - /** - * Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - * List strings for an analysis. - * @param analysisId Analysis ID - * @param [page] Page number (1-indexed). - * @param [pageSize] Number of results per page. - * @param [search] Filter by string value (case-insensitive substring match). - * @param [functionSearch] Filter by function name (case-insensitive substring match). - * @param [orderBy] Field to order results by. - * @param [sortOrder] Sort direction. - */ - public getAnalysisStrings(analysisId: number, page?: number, pageSize?: number, search?: string, functionSearch?: string, orderBy?: 'value' | 'length', sortOrder?: 'ASC' | 'DESC', _options?: PromiseConfigurationOptions): Promise { - const observableOptions = wrapOptions(_options); - const result = this.api.getAnalysisStrings(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder, observableOptions); - return result.toPromise(); - } - - /** - * Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - * Get the string-extraction status for an analysis. - * @param analysisId Analysis ID - */ - public getAnalysisStringsStatusWithHttpInfo(analysisId: number, _options?: PromiseConfigurationOptions): Promise> { - const observableOptions = wrapOptions(_options); - const result = this.api.getAnalysisStringsStatusWithHttpInfo(analysisId, observableOptions); - return result.toPromise(); - } - - /** - * Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - * Get the string-extraction status for an analysis. - * @param analysisId Analysis ID - */ - public getAnalysisStringsStatus(analysisId: number, _options?: PromiseConfigurationOptions): Promise { - const observableOptions = wrapOptions(_options); - const result = this.api.getAnalysisStringsStatus(analysisId, observableOptions); - return result.toPromise(); - } - /** * Inserts a log record for an analysis. Only the analysis owner can insert logs. * Insert a log entry for an analysis @@ -1326,6 +1273,62 @@ export class PromiseAnalysesCoreApi { return result.toPromise(); } + /** + * Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * List strings for an analysis. + * @param analysisId Analysis ID + * @param [page] Page number (1-indexed). + * @param [pageSize] Number of results per page. + * @param [search] Filter by string value (case-insensitive substring match). + * @param [functionSearch] Filter by function name (case-insensitive substring match). + * @param [orderBy] Field to order results by. + * @param [sortOrder] Sort direction. + */ + public v3GetAnalysisStringsWithHttpInfo(analysisId: number, page?: number, pageSize?: number, search?: string, functionSearch?: string, orderBy?: 'value' | 'length', sortOrder?: 'ASC' | 'DESC', _options?: PromiseConfigurationOptions): Promise> { + const observableOptions = wrapOptions(_options); + const result = this.api.v3GetAnalysisStringsWithHttpInfo(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder, observableOptions); + return result.toPromise(); + } + + /** + * Returns the strings discovered in an analysis, combining function-level and analysis-level strings. Supports value/function-name search, sorting and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * List strings for an analysis. + * @param analysisId Analysis ID + * @param [page] Page number (1-indexed). + * @param [pageSize] Number of results per page. + * @param [search] Filter by string value (case-insensitive substring match). + * @param [functionSearch] Filter by function name (case-insensitive substring match). + * @param [orderBy] Field to order results by. + * @param [sortOrder] Sort direction. + */ + public v3GetAnalysisStrings(analysisId: number, page?: number, pageSize?: number, search?: string, functionSearch?: string, orderBy?: 'value' | 'length', sortOrder?: 'ASC' | 'DESC', _options?: PromiseConfigurationOptions): Promise { + const observableOptions = wrapOptions(_options); + const result = this.api.v3GetAnalysisStrings(analysisId, page, pageSize, search, functionSearch, orderBy, sortOrder, observableOptions); + return result.toPromise(); + } + + /** + * Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Get the string-extraction status for an analysis. + * @param analysisId Analysis ID + */ + public v3GetAnalysisStringsStatusWithHttpInfo(analysisId: number, _options?: PromiseConfigurationOptions): Promise> { + const observableOptions = wrapOptions(_options); + const result = this.api.v3GetAnalysisStringsStatusWithHttpInfo(analysisId, observableOptions); + return result.toPromise(); + } + + /** + * Returns the status of the string-extraction task for the binary backing the analysis. One of UNINITIALISED, PENDING, RUNNING, COMPLETED, FAILED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + * Get the string-extraction status for an analysis. + * @param analysisId Analysis ID + */ + public v3GetAnalysisStringsStatus(analysisId: number, _options?: PromiseConfigurationOptions): Promise { + const observableOptions = wrapOptions(_options); + const result = this.api.v3GetAnalysisStringsStatus(analysisId, observableOptions); + return result.toPromise(); + } + } @@ -1871,6 +1874,28 @@ export class PromiseCollectionsApi { return result.toPromise(); } + /** + * Creates a new collection, optionally tagging it and linking binary IDs to it. Tags and binaries are returned in the response only when they were supplied in the request. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Create a collection. + * @param createCollectionInputBody + */ + public createCollection_1WithHttpInfo(createCollectionInputBody: CreateCollectionInputBody, _options?: PromiseConfigurationOptions): Promise> { + const observableOptions = wrapOptions(_options); + const result = this.api.createCollection_1WithHttpInfo(createCollectionInputBody, observableOptions); + return result.toPromise(); + } + + /** + * Creates a new collection, optionally tagging it and linking binary IDs to it. Tags and binaries are returned in the response only when they were supplied in the request. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + * Create a collection. + * @param createCollectionInputBody + */ + public createCollection_1(createCollectionInputBody: CreateCollectionInputBody, _options?: PromiseConfigurationOptions): Promise { + const observableOptions = wrapOptions(_options); + const result = this.api.createCollection_1(createCollectionInputBody, observableOptions); + return result.toPromise(); + } + /** * Deletes a collection * Deletes a collection