From b4386b381c11a11f4de245bc3eedc9a075f6fdb0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 9 Jul 2026 08:52:28 +0000 Subject: [PATCH] Update SDK to version v3.113.0 - Generated from OpenAPI spec version v3.113.0 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- README.md | 13 ++ apis/AnalysesCoreApi.ts | 263 ++++++++++++++++++++++++++ apis/FunctionsCoreApi.ts | 213 +++++++++++++++++++++ docs/AnalysesCoreApi.md | 148 +++++++++++++++ docs/FunctionsCoreApi.md | 116 ++++++++++++ models/AnalysisRecordBody.ts | 187 ++++++++++++++++++ models/AnalysisTagBody.ts | 58 ++++++ models/AutoUnstripStatusOutputBody.ts | 48 +++++ models/CanonicalName.ts | 48 +++++ models/CanonicalizeNamesInputBody.ts | 38 ++++ models/CanonicalizeNamesOutputBody.ts | 39 ++++ models/IndirectCallSite.ts | 69 +++++++ models/IndirectCallSitesOutputBody.ts | 43 +++++ models/ListAnalysesOutputBody.ts | 59 ++++++ models/ObjectSerializer.ts | 29 +++ models/all.ts | 9 + package.json | 2 +- types/ObjectParamAPI.ts | 187 ++++++++++++++++++ types/ObservableAPI.ts | 163 ++++++++++++++++ types/PromiseAPI.ts | 115 +++++++++++ 21 files changed, 1847 insertions(+), 2 deletions(-) create mode 100644 models/AnalysisRecordBody.ts create mode 100644 models/AnalysisTagBody.ts create mode 100644 models/AutoUnstripStatusOutputBody.ts create mode 100644 models/CanonicalName.ts create mode 100644 models/CanonicalizeNamesInputBody.ts create mode 100644 models/CanonicalizeNamesOutputBody.ts create mode 100644 models/IndirectCallSite.ts create mode 100644 models/IndirectCallSitesOutputBody.ts create mode 100644 models/ListAnalysesOutputBody.ts diff --git a/.sdk-version b/.sdk-version index 498b115..0c62fbe 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.110.0 +v3.113.0 diff --git a/README.md b/README.md index e103125..54aabde 100644 --- a/README.md +++ b/README.md @@ -85,8 +85,10 @@ 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* | [**v3GetAnalysisAutoUnstripStatus**](docs/AnalysesCoreApi.md#v3GetAnalysisAutoUnstripStatus) | **GET** /v3/analyses/{analysis_id}/auto-unstrip/status | Get the auto-unstrip status for an analysis. *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. +*AnalysesCoreApi* | [**v3ListAnalyses**](docs/AnalysesCoreApi.md#v3ListAnalyses) | **GET** /v3/analyses | List analyses *AnalysesCoreApi* | [**v3ListExampleAnalyses**](docs/AnalysesCoreApi.md#v3ListExampleAnalyses) | **GET** /v3/analyses/examples | List example analyses *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 @@ -170,6 +172,7 @@ Class | Method | HTTP request | Description *FunctionsCoreApi* | [**getFunctionCapabilities_0**](docs/FunctionsCoreApi.md#getFunctionCapabilities_0) | **GET** /v3/functions/{function_id}/capabilities | Get capabilities for a function *FunctionsCoreApi* | [**getFunctionDetails**](docs/FunctionsCoreApi.md#getFunctionDetails) | **GET** /v2/functions/{function_id} | Get function details *FunctionsCoreApi* | [**getFunctionDetails_0**](docs/FunctionsCoreApi.md#getFunctionDetails_0) | **GET** /v3/functions/{function_id} | Get function details +*FunctionsCoreApi* | [**getFunctionIndirectCallSites**](docs/FunctionsCoreApi.md#getFunctionIndirectCallSites) | **GET** /v3/functions/{function_id}/indirect-call-sites | Get indirect call sites for a function *FunctionsCoreApi* | [**getFunctionStrings**](docs/FunctionsCoreApi.md#getFunctionStrings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function *FunctionsCoreApi* | [**getFunctionStrings_0**](docs/FunctionsCoreApi.md#getFunctionStrings_0) | **GET** /v3/functions/{function_id}/strings | List strings for a function. *FunctionsCoreApi* | [**getFunctionsCalleesCallers**](docs/FunctionsCoreApi.md#getFunctionsCalleesCallers) | **GET** /v3/functions/callees-callers | Get callees and callers for many functions @@ -179,6 +182,7 @@ Class | Method | HTTP request | Description *FunctionsCoreApi* | [**listAnalysisFunctions**](docs/FunctionsCoreApi.md#listAnalysisFunctions) | **GET** /v3/analyses/{analysis_id}/functions | List functions in an analysis *FunctionsCoreApi* | [**listImportedFunctions**](docs/FunctionsCoreApi.md#listImportedFunctions) | **GET** /v3/analyses/{analysis_id}/imported-functions | List imported functions in an analysis *FunctionsCoreApi* | [**startFunctionsMatching**](docs/FunctionsCoreApi.md#startFunctionsMatching) | **POST** /v3/functions/matches | Start function matching for an explicit set of functions +*FunctionsCoreApi* | [**v3CanonicalizeFunctionNames**](docs/FunctionsCoreApi.md#v3CanonicalizeFunctionNames) | **POST** /v3/functions/canonical-names | Canonicalize a batch of function names *FunctionsDataTypesApi* | [**batchUpdateFunctionDataTypes**](docs/FunctionsDataTypesApi.md#batchUpdateFunctionDataTypes) | **PUT** /v3/analyses/{analysis_id}/functions/data-types | Batch update function data types *FunctionsDataTypesApi* | [**generateFunctionDataTypesForAnalysis**](docs/FunctionsDataTypesApi.md#generateFunctionDataTypesForAnalysis) | **POST** /v2/analyses/{analysis_id}/functions/data_types | Generate Function Data Types *FunctionsDataTypesApi* | [**generateFunctionDataTypesForFunctions**](docs/FunctionsDataTypesApi.md#generateFunctionDataTypesForFunctions) | **POST** /v2/functions/data_types | Generate Function Data Types for an arbitrary list of functions @@ -241,6 +245,7 @@ Class | Method | HTTP request | Description - [AnalysisLogMessage](AnalysisLogMessage.md) - [AnalysisLogs](AnalysisLogs.md) - [AnalysisRecord](AnalysisRecord.md) + - [AnalysisRecordBody](AnalysisRecordBody.md) - [AnalysisReport](AnalysisReport.md) - [AnalysisScope](AnalysisScope.md) - [AnalysisStringFunction](AnalysisStringFunction.md) @@ -248,6 +253,7 @@ Class | Method | HTTP request | Description - [AnalysisStringItem](AnalysisStringItem.md) - [AnalysisStringsResponse](AnalysisStringsResponse.md) - [AnalysisStringsStatusResponse](AnalysisStringsStatusResponse.md) + - [AnalysisTagBody](AnalysisTagBody.md) - [AnalysisTags](AnalysisTags.md) - [AnalysisUpdateRequest](AnalysisUpdateRequest.md) - [AnalysisUpdateTagsRequest](AnalysisUpdateTagsRequest.md) @@ -267,6 +273,7 @@ Class | Method | HTTP request | Description - [AutoRunAgents](AutoRunAgents.md) - [AutoUnstripRequest](AutoUnstripRequest.md) - [AutoUnstripResponse](AutoUnstripResponse.md) + - [AutoUnstripStatusOutputBody](AutoUnstripStatusOutputBody.md) - [BaseResponse](BaseResponse.md) - [BaseResponseAdditionalDetailsStatusResponse](BaseResponseAdditionalDetailsStatusResponse.md) - [BaseResponseAnalysisBulkAddTagsResponse](BaseResponseAnalysisBulkAddTagsResponse.md) @@ -361,6 +368,9 @@ Class | Method | HTTP request | Description - [CalleeFunctionInfo](CalleeFunctionInfo.md) - [CalleesCallerFunctionsResponse](CalleesCallerFunctionsResponse.md) - [CallerFunctionInfo](CallerFunctionInfo.md) + - [CanonicalName](CanonicalName.md) + - [CanonicalizeNamesInputBody](CanonicalizeNamesInputBody.md) + - [CanonicalizeNamesOutputBody](CanonicalizeNamesOutputBody.md) - [Capabilities](Capabilities.md) - [CapabilitiesAgentResponse](CapabilitiesAgentResponse.md) - [CapabilitiesOutputBody](CapabilitiesOutputBody.md) @@ -525,10 +535,13 @@ Class | Method | HTTP request | Description - [ImportedFunctionCallerEntry](ImportedFunctionCallerEntry.md) - [ImportedFunctionDetailOutputBody](ImportedFunctionDetailOutputBody.md) - [ImportedFunctionEntry](ImportedFunctionEntry.md) + - [IndirectCallSite](IndirectCallSite.md) + - [IndirectCallSitesOutputBody](IndirectCallSitesOutputBody.md) - [InlineComment](InlineComment.md) - [InsertAnalysisLogRequest](InsertAnalysisLogRequest.md) - [InviteUserInputBody](InviteUserInputBody.md) - [IssuerAllowedDomain](IssuerAllowedDomain.md) + - [ListAnalysesOutputBody](ListAnalysesOutputBody.md) - [ListAnalysisFunctionsDataTypesOutputBody](ListAnalysisFunctionsDataTypesOutputBody.md) - [ListAnalysisFunctionsOutputBody](ListAnalysisFunctionsOutputBody.md) - [ListAnalysisStringsOutputBody](ListAnalysisStringsOutputBody.md) diff --git a/apis/AnalysesCoreApi.ts b/apis/AnalysesCoreApi.ts index 5aa05c6..f08ac08 100644 --- a/apis/AnalysesCoreApi.ts +++ b/apis/AnalysesCoreApi.ts @@ -16,6 +16,7 @@ import { AnalysisReport } from '../models/AnalysisReport'; import { AnalysisUpdateRequest } from '../models/AnalysisUpdateRequest'; import { AnalysisUpdateTagsRequest } from '../models/AnalysisUpdateTagsRequest'; import { AppApiRestV2AnalysesEnumsOrderBy } from '../models/AppApiRestV2AnalysesEnumsOrderBy'; +import { AutoUnstripStatusOutputBody } from '../models/AutoUnstripStatusOutputBody'; import { BaseResponse } from '../models/BaseResponse'; import { BaseResponseAnalysisCreateResponse } from '../models/BaseResponseAnalysisCreateResponse'; import { BaseResponseAnalysisDetailResponse } from '../models/BaseResponseAnalysisDetailResponse'; @@ -35,6 +36,7 @@ import { GetAnalysisStringsStatusOutputBody } from '../models/GetAnalysisStrings import { GetMatchesOutputBody } from '../models/GetMatchesOutputBody'; import { GetMatchesStatusOutputBody } from '../models/GetMatchesStatusOutputBody'; import { InsertAnalysisLogRequest } from '../models/InsertAnalysisLogRequest'; +import { ListAnalysesOutputBody } from '../models/ListAnalysesOutputBody'; import { ListAnalysisStringsOutputBody } from '../models/ListAnalysisStringsOutputBody'; import { ListExampleAnalysesOutputBody } from '../models/ListExampleAnalysesOutputBody'; import { ModelName } from '../models/ModelName'; @@ -1340,6 +1342,49 @@ export class AnalysesCoreApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Returns the status of the auto-unstrip 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 auto-unstrip status for an analysis. + * @param analysisId Analysis ID + */ + public async v3GetAnalysisAutoUnstripStatus(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", "v3GetAnalysisAutoUnstripStatus", "analysisId"); + } + + + // Path Params + const localVarPath = '/v3/analyses/{analysis_id}/auto-unstrip/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); + } + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + 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 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. @@ -1468,6 +1513,117 @@ export class AnalysesCoreApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Returns a page of analyses visible to the caller, filtered and ordered by the query parameters. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + * List analyses + * @param searchTerm + * @param analysisScope Leave empty for no filter + * @param status + * @param modelName + * @param usernames + * @param sha256Hash + * @param pageSize + * @param nextPageToken Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). + * @param orderBy + * @param order + */ + public async v3ListAnalyses(searchTerm?: string, analysisScope?: Array<'PRIVATE' | 'PUBLIC' | 'TEAM'>, status?: Array<'Uploaded' | 'Queued' | 'Complete' | 'Error' | 'Processing'>, modelName?: Array, usernames?: Array, sha256Hash?: string, pageSize?: number, nextPageToken?: string, orderBy?: 'created' | 'binary_name' | 'binary_size', order?: 'ASC' | 'DESC', _options?: Configuration): Promise { + let _config = _options || this.configuration; + + + + + + + + + + + + // Path Params + const localVarPath = '/v3/analyses'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (searchTerm !== undefined) { + requestContext.setQueryParam("search_term", ObjectSerializer.serialize(searchTerm, "string", "")); + } + + // Query Params + if (analysisScope !== undefined) { + const serializedParams = ObjectSerializer.serialize(analysisScope, "Array<'PRIVATE' | 'PUBLIC' | 'TEAM'>", ""); + for (const serializedParam of serializedParams) { + requestContext.appendQueryParam("analysis_scope", serializedParam); + } + } + + // Query Params + if (status !== undefined) { + const serializedParams = ObjectSerializer.serialize(status, "Array<'Uploaded' | 'Queued' | 'Complete' | 'Error' | 'Processing'>", ""); + for (const serializedParam of serializedParams) { + requestContext.appendQueryParam("status", serializedParam); + } + } + + // Query Params + if (modelName !== undefined) { + requestContext.setQueryParam("model_name", ObjectSerializer.serialize(modelName, "Array", "")); + } + + // Query Params + if (usernames !== undefined) { + requestContext.setQueryParam("usernames", ObjectSerializer.serialize(usernames, "Array", "")); + } + + // Query Params + if (sha256Hash !== undefined) { + requestContext.setQueryParam("sha256_hash", ObjectSerializer.serialize(sha256Hash, "string", "")); + } + + // Query Params + if (pageSize !== undefined) { + requestContext.setQueryParam("page_size", ObjectSerializer.serialize(pageSize, "number", "int64")); + } + + // Query Params + if (nextPageToken !== undefined) { + requestContext.setQueryParam("next_page_token", ObjectSerializer.serialize(nextPageToken, "string", "")); + } + + // Query Params + if (orderBy !== undefined) { + requestContext.setQueryParam("order_by", ObjectSerializer.serialize(orderBy, "'created' | 'binary_name' | 'binary_size'", "")); + } + + // Query Params + if (order !== undefined) { + requestContext.setQueryParam("order", ObjectSerializer.serialize(order, "'ASC' | 'DESC'", "")); + } + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["APIKey"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + 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 curated example Analyses. * List example analyses @@ -2562,6 +2718,63 @@ 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 v3GetAnalysisAutoUnstripStatus + * @throws ApiException if the response code was not in [200, 299] + */ + public async v3GetAnalysisAutoUnstripStatusWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AutoUnstripStatusOutputBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AutoUnstripStatusOutputBody", "" + ) as AutoUnstripStatusOutputBody; + 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: AutoUnstripStatusOutputBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AutoUnstripStatusOutputBody", "" + ) as AutoUnstripStatusOutputBody; + 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 @@ -2676,6 +2889,56 @@ 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 v3ListAnalyses + * @throws ApiException if the response code was not in [200, 299] + */ + public async v3ListAnalysesWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: ListAnalysesOutputBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListAnalysesOutputBody", "" + ) as ListAnalysesOutputBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: APIError = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIError", "" + ) as APIError; + throw new ApiException(response.httpStatusCode, "Bad Request", 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: ListAnalysesOutputBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListAnalysesOutputBody", "" + ) as ListAnalysesOutputBody; + 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/apis/FunctionsCoreApi.ts b/apis/FunctionsCoreApi.ts index c98c5dc..ea540f1 100644 --- a/apis/FunctionsCoreApi.ts +++ b/apis/FunctionsCoreApi.ts @@ -25,6 +25,8 @@ import { BaseResponseFunctionStringsResponse } from '../models/BaseResponseFunct import { BaseResponseFunctionsDetailResponse } from '../models/BaseResponseFunctionsDetailResponse'; import { BaseResponseListCalleesCallerFunctionsResponse } from '../models/BaseResponseListCalleesCallerFunctionsResponse'; import { CallEdgesOutputBody } from '../models/CallEdgesOutputBody'; +import { CanonicalizeNamesInputBody } from '../models/CanonicalizeNamesInputBody'; +import { CanonicalizeNamesOutputBody } from '../models/CanonicalizeNamesOutputBody'; import { CapabilitiesOutputBody } from '../models/CapabilitiesOutputBody'; import { DisassemblyOutputBody } from '../models/DisassemblyOutputBody'; import { FunctionDetailsOutputBody } from '../models/FunctionDetailsOutputBody'; @@ -33,6 +35,7 @@ import { FunctionMatchingResponse } from '../models/FunctionMatchingResponse'; import { GetMatchesOutputBody } from '../models/GetMatchesOutputBody'; import { GetMatchesStatusOutputBody } from '../models/GetMatchesStatusOutputBody'; import { ImportedFunctionDetailOutputBody } from '../models/ImportedFunctionDetailOutputBody'; +import { IndirectCallSitesOutputBody } from '../models/IndirectCallSitesOutputBody'; import { ListAnalysisFunctionsOutputBody } from '../models/ListAnalysisFunctionsOutputBody'; import { ListFunctionStringsOutputBody } from '../models/ListFunctionStringsOutputBody'; import { ListImportedFunctionsOutputBody } from '../models/ListImportedFunctionsOutputBody'; @@ -1032,6 +1035,49 @@ export class FunctionsCoreApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Returns the function\'s indirect call instructions with their resolved call target. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * Get indirect call sites for a function + * @param functionId Function ID + */ + public async getFunctionIndirectCallSites(functionId: number, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'functionId' is not null or undefined + if (functionId === null || functionId === undefined) { + throw new RequiredError("FunctionsCoreApi", "getFunctionIndirectCallSites", "functionId"); + } + + + // Path Params + const localVarPath = '/v3/functions/{function_id}/indirect-call-sites' + .replace('{' + 'function_id' + '}', encodeURIComponent(String(functionId))); + + // 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); + } + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * @deprecated * @@ -1525,6 +1571,59 @@ export class FunctionsCoreApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Accepts up to 25 raw function names and returns their canonical forms in the same order. A name with no canonical form is returned unchanged. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `503` [`SERVICE_UNAVAILABLE`](/errors/SERVICE_UNAVAILABLE) — Service Unavailable + * Canonicalize a batch of function names + * @param canonicalizeNamesInputBody + */ + public async v3CanonicalizeFunctionNames(canonicalizeNamesInputBody: CanonicalizeNamesInputBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'canonicalizeNamesInputBody' is not null or undefined + if (canonicalizeNamesInputBody === null || canonicalizeNamesInputBody === undefined) { + throw new RequiredError("FunctionsCoreApi", "v3CanonicalizeFunctionNames", "canonicalizeNamesInputBody"); + } + + + // Path Params + const localVarPath = '/v3/functions/canonical-names'; + + // 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(canonicalizeNamesInputBody, "CanonicalizeNamesInputBody", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["APIKey"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + // Apply auth methods + authMethod = _config.authMethods["bearerAuth"] + 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 FunctionsCoreApiResponseProcessor { @@ -2360,6 +2459,63 @@ export class FunctionsCoreApiResponseProcessor { 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 getFunctionIndirectCallSites + * @throws ApiException if the response code was not in [200, 299] + */ + public async getFunctionIndirectCallSitesWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: IndirectCallSitesOutputBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IndirectCallSitesOutputBody", "" + ) as IndirectCallSitesOutputBody; + 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: IndirectCallSitesOutputBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IndirectCallSitesOutputBody", "" + ) as IndirectCallSitesOutputBody; + 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 @@ -2880,4 +3036,61 @@ export class FunctionsCoreApiResponseProcessor { 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 v3CanonicalizeFunctionNames + * @throws ApiException if the response code was not in [200, 299] + */ + public async v3CanonicalizeFunctionNamesWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: CanonicalizeNamesOutputBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CanonicalizeNamesOutputBody", "" + ) as CanonicalizeNamesOutputBody; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + if (isCodeInRange("400", response.httpStatusCode)) { + const body: APIError = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIError", "" + ) as APIError; + throw new ApiException(response.httpStatusCode, "Bad Request", 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); + } + if (isCodeInRange("503", response.httpStatusCode)) { + const body: APIError = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "APIError", "" + ) as APIError; + throw new ApiException(response.httpStatusCode, "Service Unavailable", body, response.headers); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CanonicalizeNamesOutputBody = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CanonicalizeNamesOutputBody", "" + ) as CanonicalizeNamesOutputBody; + 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/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index 63fc619..67d32fa 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -27,8 +27,10 @@ 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 +[**v3GetAnalysisAutoUnstripStatus**](AnalysesCoreApi.md#v3GetAnalysisAutoUnstripStatus) | **GET** /v3/analyses/{analysis_id}/auto-unstrip/status | Get the auto-unstrip status for an analysis. [**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. +[**v3ListAnalyses**](AnalysesCoreApi.md#v3ListAnalyses) | **GET** /v3/analyses | List analyses [**v3ListExampleAnalyses**](AnalysesCoreApi.md#v3ListExampleAnalyses) | **GET** /v3/analyses/examples | List example analyses @@ -1461,6 +1463,63 @@ 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) +# **v3GetAnalysisAutoUnstripStatus** +> AutoUnstripStatusOutputBody v3GetAnalysisAutoUnstripStatus() + +Returns the status of the auto-unstrip 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 { AnalysesCoreApiV3GetAnalysisAutoUnstripStatusRequest } from '@revengai/sdk'; + +const configuration = createConfiguration(); +const apiInstance = new AnalysesCoreApi(configuration); + +const request: AnalysesCoreApiV3GetAnalysisAutoUnstripStatusRequest = { + // Analysis ID + analysisId: 1, +}; + +const data = await apiInstance.v3GetAnalysisAutoUnstripStatus(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysisId** | [**number**] | Analysis ID | defaults to undefined + + +### Return type + +**AutoUnstripStatusOutputBody** + +### Authorization + +[APIKey](README.md#APIKey), [bearerAuth](README.md#bearerAuth) + +### 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) + # **v3GetAnalysisStrings** > ListAnalysisStringsOutputBody v3GetAnalysisStrings() @@ -1593,6 +1652,95 @@ 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) +# **v3ListAnalyses** +> ListAnalysesOutputBody v3ListAnalyses() + +Returns a page of analyses visible to the caller, filtered and ordered by the query parameters. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + +### Example + + +```typescript +import { createConfiguration, AnalysesCoreApi } from '@revengai/sdk'; +import type { AnalysesCoreApiV3ListAnalysesRequest } from '@revengai/sdk'; + +const configuration = createConfiguration(); +const apiInstance = new AnalysesCoreApi(configuration); + +const request: AnalysesCoreApiV3ListAnalysesRequest = { + + searchTerm: "search_term_example", + // Leave empty for no filter (optional) + analysisScope: ["PRIVATE"], + + status: [ + "Uploaded", + ], + + modelName: [ + "model_name_example", + ], + + usernames: [ + "usernames_example", + ], + + sha256Hash: "sha256_hash_example", + + pageSize: 20, + // Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). (optional) + nextPageToken: "next_page_token_example", + + orderBy: "created", + + order: "DESC", +}; + +const data = await apiInstance.v3ListAnalyses(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **searchTerm** | [**string**] | | (optional) defaults to undefined + **analysisScope** | **Array<'PRIVATE' | 'PUBLIC' | 'TEAM' | '11184809'>** | Leave empty for no filter | (optional) defaults to undefined + **status** | **Array<'Uploaded' | 'Queued' | 'Complete' | 'Error' | 'Processing' | '11184809'>** | | (optional) defaults to undefined + **modelName** | **Array<string>** | | (optional) defaults to undefined + **usernames** | **Array<string>** | | (optional) defaults to undefined + **sha256Hash** | [**string**] | | (optional) defaults to undefined + **pageSize** | [**number**] | | (optional) defaults to 20 + **nextPageToken** | [**string**] | Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). | (optional) defaults to undefined + **orderBy** | [**'created' | 'binary_name' | 'binary_size'**]**Array<'created' | 'binary_name' | 'binary_size' | '11184809'>** | | (optional) defaults to 'created' + **order** | [**'ASC' | 'DESC'**]**Array<'ASC' | 'DESC' | '11184809'>** | | (optional) defaults to 'DESC' + + +### Return type + +**ListAnalysesOutputBody** + +### Authorization + +[APIKey](README.md#APIKey), [bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**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) + # **v3ListExampleAnalyses** > ListExampleAnalysesOutputBody v3ListExampleAnalyses() diff --git a/docs/FunctionsCoreApi.md b/docs/FunctionsCoreApi.md index 30a4cbe..309caf1 100644 --- a/docs/FunctionsCoreApi.md +++ b/docs/FunctionsCoreApi.md @@ -23,6 +23,7 @@ Method | HTTP request | Description [**getFunctionCapabilities_0**](FunctionsCoreApi.md#getFunctionCapabilities_0) | **GET** /v3/functions/{function_id}/capabilities | Get capabilities for a function [**getFunctionDetails**](FunctionsCoreApi.md#getFunctionDetails) | **GET** /v2/functions/{function_id} | Get function details [**getFunctionDetails_0**](FunctionsCoreApi.md#getFunctionDetails_0) | **GET** /v3/functions/{function_id} | Get function details +[**getFunctionIndirectCallSites**](FunctionsCoreApi.md#getFunctionIndirectCallSites) | **GET** /v3/functions/{function_id}/indirect-call-sites | Get indirect call sites for a function [**getFunctionStrings**](FunctionsCoreApi.md#getFunctionStrings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function [**getFunctionStrings_0**](FunctionsCoreApi.md#getFunctionStrings_0) | **GET** /v3/functions/{function_id}/strings | List strings for a function. [**getFunctionsCalleesCallers**](FunctionsCoreApi.md#getFunctionsCalleesCallers) | **GET** /v3/functions/callees-callers | Get callees and callers for many functions @@ -32,6 +33,7 @@ Method | HTTP request | Description [**listAnalysisFunctions**](FunctionsCoreApi.md#listAnalysisFunctions) | **GET** /v3/analyses/{analysis_id}/functions | List functions in an analysis [**listImportedFunctions**](FunctionsCoreApi.md#listImportedFunctions) | **GET** /v3/analyses/{analysis_id}/imported-functions | List imported functions in an analysis [**startFunctionsMatching**](FunctionsCoreApi.md#startFunctionsMatching) | **POST** /v3/functions/matches | Start function matching for an explicit set of functions +[**v3CanonicalizeFunctionNames**](FunctionsCoreApi.md#v3CanonicalizeFunctionNames) | **POST** /v3/functions/canonical-names | Canonicalize a batch of function names # **addFunctionCallee** @@ -1145,6 +1147,63 @@ Name | Type | Description | Notes - **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) + +# **getFunctionIndirectCallSites** +> IndirectCallSitesOutputBody getFunctionIndirectCallSites() + +Returns the function\'s indirect call instructions with their resolved call target. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + +### Example + + +```typescript +import { createConfiguration, FunctionsCoreApi } from '@revengai/sdk'; +import type { FunctionsCoreApiGetFunctionIndirectCallSitesRequest } from '@revengai/sdk'; + +const configuration = createConfiguration(); +const apiInstance = new FunctionsCoreApi(configuration); + +const request: FunctionsCoreApiGetFunctionIndirectCallSitesRequest = { + // Function ID + functionId: 1, +}; + +const data = await apiInstance.getFunctionIndirectCallSites(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **functionId** | [**number**] | Function ID | defaults to undefined + + +### Return type + +**IndirectCallSitesOutputBody** + +### Authorization + +[APIKey](README.md#APIKey), [bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| @@ -1717,4 +1776,61 @@ 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) +# **v3CanonicalizeFunctionNames** +> CanonicalizeNamesOutputBody v3CanonicalizeFunctionNames(canonicalizeNamesInputBody) + +Accepts up to 25 raw function names and returns their canonical forms in the same order. A name with no canonical form is returned unchanged. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `503` [`SERVICE_UNAVAILABLE`](/errors/SERVICE_UNAVAILABLE) — Service Unavailable + +### Example + + +```typescript +import { createConfiguration, FunctionsCoreApi } from '@revengai/sdk'; +import type { FunctionsCoreApiV3CanonicalizeFunctionNamesRequest } from '@revengai/sdk'; + +const configuration = createConfiguration(); +const apiInstance = new FunctionsCoreApi(configuration); + +const request: FunctionsCoreApiV3CanonicalizeFunctionNamesRequest = { + + canonicalizeNamesInputBody: , +}; + +const data = await apiInstance.v3CanonicalizeFunctionNames(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **canonicalizeNamesInputBody** | **CanonicalizeNamesInputBody**| | + + +### Return type + +**CanonicalizeNamesOutputBody** + +### Authorization + +[APIKey](README.md#APIKey), [bearerAuth](README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | +**503** | Service Unavailable | - | + +[[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/models/AnalysisRecordBody.ts b/models/AnalysisRecordBody.ts new file mode 100644 index 0000000..b2db461 --- /dev/null +++ b/models/AnalysisRecordBody.ts @@ -0,0 +1,187 @@ +/** + * 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 { AnalysisTagBody } from '../models/AnalysisTagBody'; +import { HttpFile } from '../http/http'; + +export class AnalysisRecordBody { + /** + * Analysis ID + */ + 'analysisId': number; + /** + * Scope of the analysis + */ + 'analysisScope': AnalysisRecordBodyAnalysisScopeEnum; + /** + * Binary base address + */ + 'baseAddress': number; + /** + * Binary ID + */ + 'binaryId': number; + /** + * Binary filename + */ + 'binaryName': string; + /** + * Binary size in bytes + */ + 'binarySize': number; + /** + * When the analysis was created + */ + 'creation': Date; + /** + * Hash of the binary\'s provided function boundaries + */ + 'functionBoundariesHash': string; + /** + * True when the caller owns the analysis + */ + 'isOwner': boolean; + /** + * Model ID + */ + 'modelId': number; + /** + * Model name + */ + 'modelName': string; + /** + * SHA-256 hash of the binary + */ + 'sha256Hash': string; + /** + * Analysis status + */ + 'status': string; + /** + * Tags associated with the binary + */ + 'tags': Array | null; + /** + * Username of the analysis owner + */ + 'username': 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": "analysisScope", + "baseName": "analysis_scope", + "type": "AnalysisRecordBodyAnalysisScopeEnum", + "format": "" + }, + { + "name": "baseAddress", + "baseName": "base_address", + "type": "number", + "format": "int64" + }, + { + "name": "binaryId", + "baseName": "binary_id", + "type": "number", + "format": "int64" + }, + { + "name": "binaryName", + "baseName": "binary_name", + "type": "string", + "format": "" + }, + { + "name": "binarySize", + "baseName": "binary_size", + "type": "number", + "format": "int64" + }, + { + "name": "creation", + "baseName": "creation", + "type": "Date", + "format": "date-time" + }, + { + "name": "functionBoundariesHash", + "baseName": "function_boundaries_hash", + "type": "string", + "format": "" + }, + { + "name": "isOwner", + "baseName": "is_owner", + "type": "boolean", + "format": "" + }, + { + "name": "modelId", + "baseName": "model_id", + "type": "number", + "format": "int64" + }, + { + "name": "modelName", + "baseName": "model_name", + "type": "string", + "format": "" + }, + { + "name": "sha256Hash", + "baseName": "sha_256_hash", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "string", + "format": "" + }, + { + "name": "tags", + "baseName": "tags", + "type": "Array", + "format": "" + }, + { + "name": "username", + "baseName": "username", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AnalysisRecordBody.attributeTypeMap; + } + + public constructor() { + } +} + +export enum AnalysisRecordBodyAnalysisScopeEnum { + Public = 'PUBLIC', + Private = 'PRIVATE', + Team = 'TEAM', + UnknownDefaultOpenApi = '11184809' +} + diff --git a/models/AnalysisTagBody.ts b/models/AnalysisTagBody.ts new file mode 100644 index 0000000..cbe7b95 --- /dev/null +++ b/models/AnalysisTagBody.ts @@ -0,0 +1,58 @@ +/** + * 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 AnalysisTagBody { + /** + * Collection this tag maps to, or null + */ + 'collectionId': number | null; + /** + * Tag name + */ + 'name': string; + /** + * Origin of the tag + */ + 'origin': 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": "collectionId", + "baseName": "collection_id", + "type": "number", + "format": "int64" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "origin", + "baseName": "origin", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AnalysisTagBody.attributeTypeMap; + } + + public constructor() { + } +} diff --git a/models/AutoUnstripStatusOutputBody.ts b/models/AutoUnstripStatusOutputBody.ts new file mode 100644 index 0000000..14d69f0 --- /dev/null +++ b/models/AutoUnstripStatusOutputBody.ts @@ -0,0 +1,48 @@ +/** + * 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 AutoUnstripStatusOutputBody { + /** + * Auto-unstrip task status + */ + 'status': AutoUnstripStatusOutputBodyStatusEnum; + + 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": "status", + "baseName": "status", + "type": "AutoUnstripStatusOutputBodyStatusEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AutoUnstripStatusOutputBody.attributeTypeMap; + } + + public constructor() { + } +} + +export enum AutoUnstripStatusOutputBodyStatusEnum { + Uninitialised = 'UNINITIALISED', + Pending = 'PENDING', + Running = 'RUNNING', + Completed = 'COMPLETED', + Failed = 'FAILED', + UnknownDefaultOpenApi = '11184809' +} + diff --git a/models/CanonicalName.ts b/models/CanonicalName.ts new file mode 100644 index 0000000..d11e1bc --- /dev/null +++ b/models/CanonicalName.ts @@ -0,0 +1,48 @@ +/** + * 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 CanonicalName { + /** + * Canonical form of the name, or the input name itself when it has no canonical form. + */ + 'canonicalName': string; + /** + * The input function name. + */ + 'name': 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": "canonicalName", + "baseName": "canonical_name", + "type": "string", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CanonicalName.attributeTypeMap; + } + + public constructor() { + } +} diff --git a/models/CanonicalizeNamesInputBody.ts b/models/CanonicalizeNamesInputBody.ts new file mode 100644 index 0000000..ef59456 --- /dev/null +++ b/models/CanonicalizeNamesInputBody.ts @@ -0,0 +1,38 @@ +/** + * 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 CanonicalizeNamesInputBody { + /** + * Function names to canonicalize. + */ + 'names': 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": "names", + "baseName": "names", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CanonicalizeNamesInputBody.attributeTypeMap; + } + + public constructor() { + } +} diff --git a/models/CanonicalizeNamesOutputBody.ts b/models/CanonicalizeNamesOutputBody.ts new file mode 100644 index 0000000..9467489 --- /dev/null +++ b/models/CanonicalizeNamesOutputBody.ts @@ -0,0 +1,39 @@ +/** + * 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 { CanonicalName } from '../models/CanonicalName'; +import { HttpFile } from '../http/http'; + +export class CanonicalizeNamesOutputBody { + /** + * Canonicalized names in the same order as the input. + */ + 'results': 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": "results", + "baseName": "results", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return CanonicalizeNamesOutputBody.attributeTypeMap; + } + + public constructor() { + } +} diff --git a/models/IndirectCallSite.ts b/models/IndirectCallSite.ts new file mode 100644 index 0000000..0941d40 --- /dev/null +++ b/models/IndirectCallSite.ts @@ -0,0 +1,69 @@ +/** + * 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 IndirectCallSite { + 'calleeFunctionId'?: number; + /** + * Vaddr of the indirect call instruction. + */ + 'instVaddr': number; + 'isExternal': boolean; + 'targetName'?: string; + /** + * Resolved call target vaddr. + */ + 'targetVaddr': 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": "calleeFunctionId", + "baseName": "callee_function_id", + "type": "number", + "format": "int64" + }, + { + "name": "instVaddr", + "baseName": "inst_vaddr", + "type": "number", + "format": "int64" + }, + { + "name": "isExternal", + "baseName": "is_external", + "type": "boolean", + "format": "" + }, + { + "name": "targetName", + "baseName": "target_name", + "type": "string", + "format": "" + }, + { + "name": "targetVaddr", + "baseName": "target_vaddr", + "type": "number", + "format": "int64" + } ]; + + static getAttributeTypeMap() { + return IndirectCallSite.attributeTypeMap; + } + + public constructor() { + } +} diff --git a/models/IndirectCallSitesOutputBody.ts b/models/IndirectCallSitesOutputBody.ts new file mode 100644 index 0000000..6851616 --- /dev/null +++ b/models/IndirectCallSitesOutputBody.ts @@ -0,0 +1,43 @@ +/** + * 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 { IndirectCallSite } from '../models/IndirectCallSite'; +import { HttpFile } from '../http/http'; + +export class IndirectCallSitesOutputBody { + 'functionId': number; + 'sites': 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": "functionId", + "baseName": "function_id", + "type": "number", + "format": "int64" + }, + { + "name": "sites", + "baseName": "sites", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return IndirectCallSitesOutputBody.attributeTypeMap; + } + + public constructor() { + } +} diff --git a/models/ListAnalysesOutputBody.ts b/models/ListAnalysesOutputBody.ts new file mode 100644 index 0000000..22f8b0b --- /dev/null +++ b/models/ListAnalysesOutputBody.ts @@ -0,0 +1,59 @@ +/** + * 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 { AnalysisRecordBody } from '../models/AnalysisRecordBody'; +import { HttpFile } from '../http/http'; + +export class ListAnalysesOutputBody { + /** + * Opaque cursor to fetch the next page; empty on the last page + */ + 'nextPageToken'?: string; + /** + * Number of results in this page + */ + 'pageSize': number; + /** + * The page of matching analyses + */ + 'results': 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": "nextPageToken", + "baseName": "next_page_token", + "type": "string", + "format": "" + }, + { + "name": "pageSize", + "baseName": "page_size", + "type": "number", + "format": "int64" + }, + { + "name": "results", + "baseName": "results", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ListAnalysesOutputBody.attributeTypeMap; + } + + public constructor() { + } +} diff --git a/models/ObjectSerializer.ts b/models/ObjectSerializer.ts index bca0300..84046b7 100644 --- a/models/ObjectSerializer.ts +++ b/models/ObjectSerializer.ts @@ -29,6 +29,7 @@ export * from '../models/AnalysisFunctionsList'; export * from '../models/AnalysisLogMessage'; export * from '../models/AnalysisLogs'; export * from '../models/AnalysisRecord'; +export * from '../models/AnalysisRecordBody'; export * from '../models/AnalysisReport'; export * from '../models/AnalysisScope'; export * from '../models/AnalysisStringFunction'; @@ -36,6 +37,7 @@ export * from '../models/AnalysisStringInput'; export * from '../models/AnalysisStringItem'; export * from '../models/AnalysisStringsResponse'; export * from '../models/AnalysisStringsStatusResponse'; +export * from '../models/AnalysisTagBody'; export * from '../models/AnalysisTags'; export * from '../models/AnalysisUpdateRequest'; export * from '../models/AnalysisUpdateTagsRequest'; @@ -55,6 +57,7 @@ export * from '../models/AttemptStartedEvent'; export * from '../models/AutoRunAgents'; export * from '../models/AutoUnstripRequest'; export * from '../models/AutoUnstripResponse'; +export * from '../models/AutoUnstripStatusOutputBody'; export * from '../models/BaseResponse'; export * from '../models/BaseResponseAdditionalDetailsStatusResponse'; export * from '../models/BaseResponseAnalysisBulkAddTagsResponse'; @@ -149,6 +152,9 @@ export * from '../models/CallEdgesOutputBody'; export * from '../models/CalleeFunctionInfo'; export * from '../models/CalleesCallerFunctionsResponse'; export * from '../models/CallerFunctionInfo'; +export * from '../models/CanonicalName'; +export * from '../models/CanonicalizeNamesInputBody'; +export * from '../models/CanonicalizeNamesOutputBody'; export * from '../models/Capabilities'; export * from '../models/CapabilitiesAgentResponse'; export * from '../models/CapabilitiesOutputBody'; @@ -313,10 +319,13 @@ export * from '../models/ImportModel'; export * from '../models/ImportedFunctionCallerEntry'; export * from '../models/ImportedFunctionDetailOutputBody'; export * from '../models/ImportedFunctionEntry'; +export * from '../models/IndirectCallSite'; +export * from '../models/IndirectCallSitesOutputBody'; export * from '../models/InlineComment'; export * from '../models/InsertAnalysisLogRequest'; export * from '../models/InviteUserInputBody'; export * from '../models/IssuerAllowedDomain'; +export * from '../models/ListAnalysesOutputBody'; export * from '../models/ListAnalysisFunctionsDataTypesOutputBody'; export * from '../models/ListAnalysisFunctionsOutputBody'; export * from '../models/ListAnalysisStringsOutputBody'; @@ -536,6 +545,7 @@ import { AnalysisFunctionsList } from '../models/AnalysisFunctionsList'; import { AnalysisLogMessage } from '../models/AnalysisLogMessage'; import { AnalysisLogs } from '../models/AnalysisLogs'; import { AnalysisRecord } from '../models/AnalysisRecord'; +import { AnalysisRecordBody , AnalysisRecordBodyAnalysisScopeEnum } from '../models/AnalysisRecordBody'; import { AnalysisReport } from '../models/AnalysisReport'; import { AnalysisScope } from '../models/AnalysisScope'; import { AnalysisStringFunction } from '../models/AnalysisStringFunction'; @@ -543,6 +553,7 @@ import { AnalysisStringInput } from '../models/AnalysisStringInput'; import { AnalysisStringItem } from '../models/AnalysisStringItem'; import { AnalysisStringsResponse } from '../models/AnalysisStringsResponse'; import { AnalysisStringsStatusResponse } from '../models/AnalysisStringsStatusResponse'; +import { AnalysisTagBody } from '../models/AnalysisTagBody'; import { AnalysisTags } from '../models/AnalysisTags'; import { AnalysisUpdateRequest , AnalysisUpdateRequestAnalysisScopeEnum } from '../models/AnalysisUpdateRequest'; import { AnalysisUpdateTagsRequest } from '../models/AnalysisUpdateTagsRequest'; @@ -562,6 +573,7 @@ import { AttemptStartedEvent } from '../models/AttemptStartedEvent'; import { AutoRunAgents } from '../models/AutoRunAgents'; import { AutoUnstripRequest } from '../models/AutoUnstripRequest'; import { AutoUnstripResponse } from '../models/AutoUnstripResponse'; +import { AutoUnstripStatusOutputBody, AutoUnstripStatusOutputBodyStatusEnum } from '../models/AutoUnstripStatusOutputBody'; import { BaseResponse } from '../models/BaseResponse'; import { BaseResponseAdditionalDetailsStatusResponse } from '../models/BaseResponseAdditionalDetailsStatusResponse'; import { BaseResponseAnalysisBulkAddTagsResponse } from '../models/BaseResponseAnalysisBulkAddTagsResponse'; @@ -656,6 +668,9 @@ import { CallEdgesOutputBody } from '../models/CallEdgesOutputBody'; import { CalleeFunctionInfo } from '../models/CalleeFunctionInfo'; import { CalleesCallerFunctionsResponse } from '../models/CalleesCallerFunctionsResponse'; import { CallerFunctionInfo } from '../models/CallerFunctionInfo'; +import { CanonicalName } from '../models/CanonicalName'; +import { CanonicalizeNamesInputBody } from '../models/CanonicalizeNamesInputBody'; +import { CanonicalizeNamesOutputBody } from '../models/CanonicalizeNamesOutputBody'; import { Capabilities } from '../models/Capabilities'; import { CapabilitiesAgentResponse } from '../models/CapabilitiesAgentResponse'; import { CapabilitiesOutputBody } from '../models/CapabilitiesOutputBody'; @@ -820,10 +835,13 @@ import { ImportModel } from '../models/ImportModel'; import { ImportedFunctionCallerEntry } from '../models/ImportedFunctionCallerEntry'; import { ImportedFunctionDetailOutputBody } from '../models/ImportedFunctionDetailOutputBody'; import { ImportedFunctionEntry } from '../models/ImportedFunctionEntry'; +import { IndirectCallSite } from '../models/IndirectCallSite'; +import { IndirectCallSitesOutputBody } from '../models/IndirectCallSitesOutputBody'; import { InlineComment } from '../models/InlineComment'; import { InsertAnalysisLogRequest } from '../models/InsertAnalysisLogRequest'; import { InviteUserInputBody } from '../models/InviteUserInputBody'; import { IssuerAllowedDomain } from '../models/IssuerAllowedDomain'; +import { ListAnalysesOutputBody } from '../models/ListAnalysesOutputBody'; import { ListAnalysisFunctionsDataTypesOutputBody } from '../models/ListAnalysisFunctionsDataTypesOutputBody'; import { ListAnalysisFunctionsOutputBody } from '../models/ListAnalysisFunctionsOutputBody'; import { ListAnalysisStringsOutputBody } from '../models/ListAnalysisStringsOutputBody'; @@ -1027,12 +1045,14 @@ let primitives = [ let enumsMap: Set = new Set([ "AiDecompilationRating", "AnalysisBasicInfoOutputBodyAnalysisScopeEnum", + "AnalysisRecordBodyAnalysisScopeEnum", "AnalysisScope", "AnalysisUpdateRequestAnalysisScopeEnum", "AppApiRestV2AgentSchemaCapabilityTypeEnum", "AppApiRestV2AnalysesEnumsOrderBy", "AppApiRestV2CollectionsEnumsOrderBy", "ArtifactReasonEnum", + "AutoUnstripStatusOutputBodyStatusEnum", "BatchBinaryMatchResultStatusEnum", "BatchMatchingOutputBodyStatusEnum", "BatchUpdateDataTypesResultStatusEnum", @@ -1148,12 +1168,14 @@ let typeMap: {[index: string]: any} = { "AnalysisLogMessage": AnalysisLogMessage, "AnalysisLogs": AnalysisLogs, "AnalysisRecord": AnalysisRecord, + "AnalysisRecordBody": AnalysisRecordBody, "AnalysisReport": AnalysisReport, "AnalysisStringFunction": AnalysisStringFunction, "AnalysisStringInput": AnalysisStringInput, "AnalysisStringItem": AnalysisStringItem, "AnalysisStringsResponse": AnalysisStringsResponse, "AnalysisStringsStatusResponse": AnalysisStringsStatusResponse, + "AnalysisTagBody": AnalysisTagBody, "AnalysisTags": AnalysisTags, "AnalysisUpdateRequest": AnalysisUpdateRequest, "AnalysisUpdateTagsRequest": AnalysisUpdateTagsRequest, @@ -1171,6 +1193,7 @@ let typeMap: {[index: string]: any} = { "AutoRunAgents": AutoRunAgents, "AutoUnstripRequest": AutoUnstripRequest, "AutoUnstripResponse": AutoUnstripResponse, + "AutoUnstripStatusOutputBody": AutoUnstripStatusOutputBody, "BaseResponse": BaseResponse, "BaseResponseAdditionalDetailsStatusResponse": BaseResponseAdditionalDetailsStatusResponse, "BaseResponseAnalysisBulkAddTagsResponse": BaseResponseAnalysisBulkAddTagsResponse, @@ -1263,6 +1286,9 @@ let typeMap: {[index: string]: any} = { "CalleeFunctionInfo": CalleeFunctionInfo, "CalleesCallerFunctionsResponse": CalleesCallerFunctionsResponse, "CallerFunctionInfo": CallerFunctionInfo, + "CanonicalName": CanonicalName, + "CanonicalizeNamesInputBody": CanonicalizeNamesInputBody, + "CanonicalizeNamesOutputBody": CanonicalizeNamesOutputBody, "Capabilities": Capabilities, "CapabilitiesAgentResponse": CapabilitiesAgentResponse, "CapabilitiesOutputBody": CapabilitiesOutputBody, @@ -1421,10 +1447,13 @@ let typeMap: {[index: string]: any} = { "ImportedFunctionCallerEntry": ImportedFunctionCallerEntry, "ImportedFunctionDetailOutputBody": ImportedFunctionDetailOutputBody, "ImportedFunctionEntry": ImportedFunctionEntry, + "IndirectCallSite": IndirectCallSite, + "IndirectCallSitesOutputBody": IndirectCallSitesOutputBody, "InlineComment": InlineComment, "InsertAnalysisLogRequest": InsertAnalysisLogRequest, "InviteUserInputBody": InviteUserInputBody, "IssuerAllowedDomain": IssuerAllowedDomain, + "ListAnalysesOutputBody": ListAnalysesOutputBody, "ListAnalysisFunctionsDataTypesOutputBody": ListAnalysisFunctionsDataTypesOutputBody, "ListAnalysisFunctionsOutputBody": ListAnalysisFunctionsOutputBody, "ListAnalysisStringsOutputBody": ListAnalysisStringsOutputBody, diff --git a/models/all.ts b/models/all.ts index f94f95d..266c1f1 100644 --- a/models/all.ts +++ b/models/all.ts @@ -29,6 +29,7 @@ export * from '../models/AnalysisFunctionsList' export * from '../models/AnalysisLogMessage' export * from '../models/AnalysisLogs' export * from '../models/AnalysisRecord' +export * from '../models/AnalysisRecordBody' export * from '../models/AnalysisReport' export * from '../models/AnalysisScope' export * from '../models/AnalysisStringFunction' @@ -36,6 +37,7 @@ export * from '../models/AnalysisStringInput' export * from '../models/AnalysisStringItem' export * from '../models/AnalysisStringsResponse' export * from '../models/AnalysisStringsStatusResponse' +export * from '../models/AnalysisTagBody' export * from '../models/AnalysisTags' export * from '../models/AnalysisUpdateRequest' export * from '../models/AnalysisUpdateTagsRequest' @@ -55,6 +57,7 @@ export * from '../models/AttemptStartedEvent' export * from '../models/AutoRunAgents' export * from '../models/AutoUnstripRequest' export * from '../models/AutoUnstripResponse' +export * from '../models/AutoUnstripStatusOutputBody' export * from '../models/BaseResponse' export * from '../models/BaseResponseAdditionalDetailsStatusResponse' export * from '../models/BaseResponseAnalysisBulkAddTagsResponse' @@ -149,6 +152,9 @@ export * from '../models/CallEdgesOutputBody' export * from '../models/CalleeFunctionInfo' export * from '../models/CalleesCallerFunctionsResponse' export * from '../models/CallerFunctionInfo' +export * from '../models/CanonicalName' +export * from '../models/CanonicalizeNamesInputBody' +export * from '../models/CanonicalizeNamesOutputBody' export * from '../models/Capabilities' export * from '../models/CapabilitiesAgentResponse' export * from '../models/CapabilitiesOutputBody' @@ -313,10 +319,13 @@ export * from '../models/ImportModel' export * from '../models/ImportedFunctionCallerEntry' export * from '../models/ImportedFunctionDetailOutputBody' export * from '../models/ImportedFunctionEntry' +export * from '../models/IndirectCallSite' +export * from '../models/IndirectCallSitesOutputBody' export * from '../models/InlineComment' export * from '../models/InsertAnalysisLogRequest' export * from '../models/InviteUserInputBody' export * from '../models/IssuerAllowedDomain' +export * from '../models/ListAnalysesOutputBody' export * from '../models/ListAnalysisFunctionsDataTypesOutputBody' export * from '../models/ListAnalysisFunctionsOutputBody' export * from '../models/ListAnalysisStringsOutputBody' diff --git a/package.json b/package.json index 8d81ee7..d0416a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@revengai/sdk", - "version": "v3.110.0", + "version": "v3.113.0", "description": "TypeScript SDK for the RevEng.AI API", "author": "RevEng.AI", "repository": { diff --git a/types/ObjectParamAPI.ts b/types/ObjectParamAPI.ts index ad79d33..8ea7723 100644 --- a/types/ObjectParamAPI.ts +++ b/types/ObjectParamAPI.ts @@ -33,6 +33,7 @@ import { AnalysisFunctionsList } from '../models/AnalysisFunctionsList'; import { AnalysisLogMessage } from '../models/AnalysisLogMessage'; import { AnalysisLogs } from '../models/AnalysisLogs'; import { AnalysisRecord } from '../models/AnalysisRecord'; +import { AnalysisRecordBody } from '../models/AnalysisRecordBody'; import { AnalysisReport } from '../models/AnalysisReport'; import { AnalysisScope } from '../models/AnalysisScope'; import { AnalysisStringFunction } from '../models/AnalysisStringFunction'; @@ -40,6 +41,7 @@ import { AnalysisStringInput } from '../models/AnalysisStringInput'; import { AnalysisStringItem } from '../models/AnalysisStringItem'; import { AnalysisStringsResponse } from '../models/AnalysisStringsResponse'; import { AnalysisStringsStatusResponse } from '../models/AnalysisStringsStatusResponse'; +import { AnalysisTagBody } from '../models/AnalysisTagBody'; import { AnalysisTags } from '../models/AnalysisTags'; import { AnalysisUpdateRequest } from '../models/AnalysisUpdateRequest'; import { AnalysisUpdateTagsRequest } from '../models/AnalysisUpdateTagsRequest'; @@ -59,6 +61,7 @@ import { AttemptStartedEvent } from '../models/AttemptStartedEvent'; import { AutoRunAgents } from '../models/AutoRunAgents'; import { AutoUnstripRequest } from '../models/AutoUnstripRequest'; import { AutoUnstripResponse } from '../models/AutoUnstripResponse'; +import { AutoUnstripStatusOutputBody } from '../models/AutoUnstripStatusOutputBody'; import { BaseResponse } from '../models/BaseResponse'; import { BaseResponseAdditionalDetailsStatusResponse } from '../models/BaseResponseAdditionalDetailsStatusResponse'; import { BaseResponseAnalysisBulkAddTagsResponse } from '../models/BaseResponseAnalysisBulkAddTagsResponse'; @@ -153,6 +156,9 @@ import { CallEdgesOutputBody } from '../models/CallEdgesOutputBody'; import { CalleeFunctionInfo } from '../models/CalleeFunctionInfo'; import { CalleesCallerFunctionsResponse } from '../models/CalleesCallerFunctionsResponse'; import { CallerFunctionInfo } from '../models/CallerFunctionInfo'; +import { CanonicalName } from '../models/CanonicalName'; +import { CanonicalizeNamesInputBody } from '../models/CanonicalizeNamesInputBody'; +import { CanonicalizeNamesOutputBody } from '../models/CanonicalizeNamesOutputBody'; import { Capabilities } from '../models/Capabilities'; import { CapabilitiesAgentResponse } from '../models/CapabilitiesAgentResponse'; import { CapabilitiesOutputBody } from '../models/CapabilitiesOutputBody'; @@ -317,10 +323,13 @@ import { ImportModel } from '../models/ImportModel'; import { ImportedFunctionCallerEntry } from '../models/ImportedFunctionCallerEntry'; import { ImportedFunctionDetailOutputBody } from '../models/ImportedFunctionDetailOutputBody'; import { ImportedFunctionEntry } from '../models/ImportedFunctionEntry'; +import { IndirectCallSite } from '../models/IndirectCallSite'; +import { IndirectCallSitesOutputBody } from '../models/IndirectCallSitesOutputBody'; import { InlineComment } from '../models/InlineComment'; import { InsertAnalysisLogRequest } from '../models/InsertAnalysisLogRequest'; import { InviteUserInputBody } from '../models/InviteUserInputBody'; import { IssuerAllowedDomain } from '../models/IssuerAllowedDomain'; +import { ListAnalysesOutputBody } from '../models/ListAnalysesOutputBody'; import { ListAnalysisFunctionsDataTypesOutputBody } from '../models/ListAnalysisFunctionsDataTypesOutputBody'; import { ListAnalysisFunctionsOutputBody } from '../models/ListAnalysisFunctionsOutputBody'; import { ListAnalysisStringsOutputBody } from '../models/ListAnalysisStringsOutputBody'; @@ -1387,6 +1396,17 @@ export interface AnalysesCoreApiUploadFileRequest { forceOverwrite?: boolean } +export interface AnalysesCoreApiV3GetAnalysisAutoUnstripStatusRequest { + /** + * Analysis ID + * Minimum: 1 + * Defaults to: undefined + * @type number + * @memberof AnalysesCoreApiv3GetAnalysisAutoUnstripStatus + */ + analysisId: number +} + export interface AnalysesCoreApiV3GetAnalysisStringsRequest { /** * Analysis ID @@ -1454,6 +1474,81 @@ export interface AnalysesCoreApiV3GetAnalysisStringsStatusRequest { analysisId: number } +export interface AnalysesCoreApiV3ListAnalysesRequest { + /** + * + * Defaults to: undefined + * @type string + * @memberof AnalysesCoreApiv3ListAnalyses + */ + searchTerm?: string + /** + * Leave empty for no filter + * Defaults to: undefined + * @type Array<'PRIVATE' | 'PUBLIC' | 'TEAM'> + * @memberof AnalysesCoreApiv3ListAnalyses + */ + analysisScope?: Array<'PRIVATE' | 'PUBLIC' | 'TEAM'> + /** + * + * Defaults to: undefined + * @type Array<'Uploaded' | 'Queued' | 'Complete' | 'Error' | 'Processing'> + * @memberof AnalysesCoreApiv3ListAnalyses + */ + status?: Array<'Uploaded' | 'Queued' | 'Complete' | 'Error' | 'Processing'> + /** + * + * Defaults to: undefined + * @type Array<string> + * @memberof AnalysesCoreApiv3ListAnalyses + */ + modelName?: Array + /** + * + * Defaults to: undefined + * @type Array<string> + * @memberof AnalysesCoreApiv3ListAnalyses + */ + usernames?: Array + /** + * + * Defaults to: undefined + * @type string + * @memberof AnalysesCoreApiv3ListAnalyses + */ + sha256Hash?: string + /** + * + * Minimum: 1 + * Maximum: 50 + * Defaults to: 20 + * @type number + * @memberof AnalysesCoreApiv3ListAnalyses + */ + pageSize?: number + /** + * Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). + * Defaults to: undefined + * @type string + * @memberof AnalysesCoreApiv3ListAnalyses + */ + nextPageToken?: string + /** + * + * Defaults to: 'created' + * @type 'created' | 'binary_name' | 'binary_size' + * @memberof AnalysesCoreApiv3ListAnalyses + */ + orderBy?: 'created' | 'binary_name' | 'binary_size' + /** + * + * Defaults to: 'DESC' + * @type 'ASC' | 'DESC' + * @memberof AnalysesCoreApiv3ListAnalyses + */ + order?: 'ASC' | 'DESC' +} + export interface AnalysesCoreApiV3ListExampleAnalysesRequest { } @@ -1876,6 +1971,24 @@ export class ObjectAnalysesCoreApi { return this.api.uploadFile(param.uploadFileType, param.file, param.packedPassword, param.forceOverwrite, options).toPromise(); } + /** + * Returns the status of the auto-unstrip 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 auto-unstrip status for an analysis. + * @param param the request object + */ + public v3GetAnalysisAutoUnstripStatusWithHttpInfo(param: AnalysesCoreApiV3GetAnalysisAutoUnstripStatusRequest, options?: ConfigurationOptions): Promise> { + return this.api.v3GetAnalysisAutoUnstripStatusWithHttpInfo(param.analysisId, options).toPromise(); + } + + /** + * Returns the status of the auto-unstrip 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 auto-unstrip status for an analysis. + * @param param the request object + */ + public v3GetAnalysisAutoUnstripStatus(param: AnalysesCoreApiV3GetAnalysisAutoUnstripStatusRequest, options?: ConfigurationOptions): Promise { + return this.api.v3GetAnalysisAutoUnstripStatus(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. @@ -1912,6 +2025,24 @@ export class ObjectAnalysesCoreApi { return this.api.v3GetAnalysisStringsStatus(param.analysisId, options).toPromise(); } + /** + * Returns a page of analyses visible to the caller, filtered and ordered by the query parameters. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + * List analyses + * @param param the request object + */ + public v3ListAnalysesWithHttpInfo(param: AnalysesCoreApiV3ListAnalysesRequest = {}, options?: ConfigurationOptions): Promise> { + return this.api.v3ListAnalysesWithHttpInfo(param.searchTerm, param.analysisScope, param.status, param.modelName, param.usernames, param.sha256Hash, param.pageSize, param.nextPageToken, param.orderBy, param.order, options).toPromise(); + } + + /** + * Returns a page of analyses visible to the caller, filtered and ordered by the query parameters. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + * List analyses + * @param param the request object + */ + public v3ListAnalyses(param: AnalysesCoreApiV3ListAnalysesRequest = {}, options?: ConfigurationOptions): Promise { + return this.api.v3ListAnalyses(param.searchTerm, param.analysisScope, param.status, param.modelName, param.usernames, param.sha256Hash, param.pageSize, param.nextPageToken, param.orderBy, param.order, options).toPromise(); + } + /** * Returns the curated example Analyses. * List example analyses @@ -4373,6 +4504,17 @@ export interface FunctionsCoreApiGetFunctionDetails0Request { functionId: number } +export interface FunctionsCoreApiGetFunctionIndirectCallSitesRequest { + /** + * Function ID + * Minimum: 1 + * Defaults to: undefined + * @type number + * @memberof FunctionsCoreApigetFunctionIndirectCallSites + */ + functionId: number +} + export interface FunctionsCoreApiGetFunctionStringsRequest { /** * @@ -4570,6 +4712,15 @@ export interface FunctionsCoreApiStartFunctionsMatchingRequest { startMatchingForFunctionsInputBody: StartMatchingForFunctionsInputBody } +export interface FunctionsCoreApiV3CanonicalizeFunctionNamesRequest { + /** + * + * @type CanonicalizeNamesInputBody + * @memberof FunctionsCoreApiv3CanonicalizeFunctionNames + */ + canonicalizeNamesInputBody: CanonicalizeNamesInputBody +} + export class ObjectFunctionsCoreApi { private api: ObservableFunctionsCoreApi @@ -4911,6 +5062,24 @@ export class ObjectFunctionsCoreApi { return this.api.getFunctionDetails_4(param.functionId, options).toPromise(); } + /** + * Returns the function\'s indirect call instructions with their resolved call target. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * Get indirect call sites for a function + * @param param the request object + */ + public getFunctionIndirectCallSitesWithHttpInfo(param: FunctionsCoreApiGetFunctionIndirectCallSitesRequest, options?: ConfigurationOptions): Promise> { + return this.api.getFunctionIndirectCallSitesWithHttpInfo(param.functionId, options).toPromise(); + } + + /** + * Returns the function\'s indirect call instructions with their resolved call target. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * Get indirect call sites for a function + * @param param the request object + */ + public getFunctionIndirectCallSites(param: FunctionsCoreApiGetFunctionIndirectCallSitesRequest, options?: ConfigurationOptions): Promise { + return this.api.getFunctionIndirectCallSites(param.functionId, options).toPromise(); + } + /** * Get string information found in the function * Get string information found in the function @@ -5073,6 +5242,24 @@ export class ObjectFunctionsCoreApi { return this.api.startFunctionsMatching(param.startMatchingForFunctionsInputBody, options).toPromise(); } + /** + * Accepts up to 25 raw function names and returns their canonical forms in the same order. A name with no canonical form is returned unchanged. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `503` [`SERVICE_UNAVAILABLE`](/errors/SERVICE_UNAVAILABLE) — Service Unavailable + * Canonicalize a batch of function names + * @param param the request object + */ + public v3CanonicalizeFunctionNamesWithHttpInfo(param: FunctionsCoreApiV3CanonicalizeFunctionNamesRequest, options?: ConfigurationOptions): Promise> { + return this.api.v3CanonicalizeFunctionNamesWithHttpInfo(param.canonicalizeNamesInputBody, options).toPromise(); + } + + /** + * Accepts up to 25 raw function names and returns their canonical forms in the same order. A name with no canonical form is returned unchanged. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `503` [`SERVICE_UNAVAILABLE`](/errors/SERVICE_UNAVAILABLE) — Service Unavailable + * Canonicalize a batch of function names + * @param param the request object + */ + public v3CanonicalizeFunctionNames(param: FunctionsCoreApiV3CanonicalizeFunctionNamesRequest, options?: ConfigurationOptions): Promise { + return this.api.v3CanonicalizeFunctionNames(param.canonicalizeNamesInputBody, options).toPromise(); + } + } import { ObservableFunctionsDataTypesApi } from "./ObservableAPI"; diff --git a/types/ObservableAPI.ts b/types/ObservableAPI.ts index 1a39baa..3901a67 100644 --- a/types/ObservableAPI.ts +++ b/types/ObservableAPI.ts @@ -34,6 +34,7 @@ import { AnalysisFunctionsList } from '../models/AnalysisFunctionsList'; import { AnalysisLogMessage } from '../models/AnalysisLogMessage'; import { AnalysisLogs } from '../models/AnalysisLogs'; import { AnalysisRecord } from '../models/AnalysisRecord'; +import { AnalysisRecordBody } from '../models/AnalysisRecordBody'; import { AnalysisReport } from '../models/AnalysisReport'; import { AnalysisScope } from '../models/AnalysisScope'; import { AnalysisStringFunction } from '../models/AnalysisStringFunction'; @@ -41,6 +42,7 @@ import { AnalysisStringInput } from '../models/AnalysisStringInput'; import { AnalysisStringItem } from '../models/AnalysisStringItem'; import { AnalysisStringsResponse } from '../models/AnalysisStringsResponse'; import { AnalysisStringsStatusResponse } from '../models/AnalysisStringsStatusResponse'; +import { AnalysisTagBody } from '../models/AnalysisTagBody'; import { AnalysisTags } from '../models/AnalysisTags'; import { AnalysisUpdateRequest } from '../models/AnalysisUpdateRequest'; import { AnalysisUpdateTagsRequest } from '../models/AnalysisUpdateTagsRequest'; @@ -60,6 +62,7 @@ import { AttemptStartedEvent } from '../models/AttemptStartedEvent'; import { AutoRunAgents } from '../models/AutoRunAgents'; import { AutoUnstripRequest } from '../models/AutoUnstripRequest'; import { AutoUnstripResponse } from '../models/AutoUnstripResponse'; +import { AutoUnstripStatusOutputBody } from '../models/AutoUnstripStatusOutputBody'; import { BaseResponse } from '../models/BaseResponse'; import { BaseResponseAdditionalDetailsStatusResponse } from '../models/BaseResponseAdditionalDetailsStatusResponse'; import { BaseResponseAnalysisBulkAddTagsResponse } from '../models/BaseResponseAnalysisBulkAddTagsResponse'; @@ -154,6 +157,9 @@ import { CallEdgesOutputBody } from '../models/CallEdgesOutputBody'; import { CalleeFunctionInfo } from '../models/CalleeFunctionInfo'; import { CalleesCallerFunctionsResponse } from '../models/CalleesCallerFunctionsResponse'; import { CallerFunctionInfo } from '../models/CallerFunctionInfo'; +import { CanonicalName } from '../models/CanonicalName'; +import { CanonicalizeNamesInputBody } from '../models/CanonicalizeNamesInputBody'; +import { CanonicalizeNamesOutputBody } from '../models/CanonicalizeNamesOutputBody'; import { Capabilities } from '../models/Capabilities'; import { CapabilitiesAgentResponse } from '../models/CapabilitiesAgentResponse'; import { CapabilitiesOutputBody } from '../models/CapabilitiesOutputBody'; @@ -318,10 +324,13 @@ import { ImportModel } from '../models/ImportModel'; import { ImportedFunctionCallerEntry } from '../models/ImportedFunctionCallerEntry'; import { ImportedFunctionDetailOutputBody } from '../models/ImportedFunctionDetailOutputBody'; import { ImportedFunctionEntry } from '../models/ImportedFunctionEntry'; +import { IndirectCallSite } from '../models/IndirectCallSite'; +import { IndirectCallSitesOutputBody } from '../models/IndirectCallSitesOutputBody'; import { InlineComment } from '../models/InlineComment'; import { InsertAnalysisLogRequest } from '../models/InsertAnalysisLogRequest'; import { InviteUserInputBody } from '../models/InviteUserInputBody'; import { IssuerAllowedDomain } from '../models/IssuerAllowedDomain'; +import { ListAnalysesOutputBody } from '../models/ListAnalysesOutputBody'; import { ListAnalysisFunctionsDataTypesOutputBody } from '../models/ListAnalysisFunctionsDataTypesOutputBody'; import { ListAnalysisFunctionsOutputBody } from '../models/ListAnalysisFunctionsOutputBody'; import { ListAnalysisStringsOutputBody } from '../models/ListAnalysisStringsOutputBody'; @@ -1912,6 +1921,40 @@ export class ObservableAnalysesCoreApi { return this.uploadFileWithHttpInfo(uploadFileType, file, packedPassword, forceOverwrite, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } + /** + * Returns the status of the auto-unstrip 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 auto-unstrip status for an analysis. + * @param analysisId Analysis ID + */ + public v3GetAnalysisAutoUnstripStatusWithHttpInfo(analysisId: number, _options?: ConfigurationOptions): Observable> { + const _config = mergeConfiguration(this.configuration, _options); + + const requestContextPromise = this.requestFactory.v3GetAnalysisAutoUnstripStatus(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.v3GetAnalysisAutoUnstripStatusWithHttpInfo(rsp))); + })); + } + + /** + * Returns the status of the auto-unstrip 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 auto-unstrip status for an analysis. + * @param analysisId Analysis ID + */ + public v3GetAnalysisAutoUnstripStatus(analysisId: number, _options?: ConfigurationOptions): Observable { + return this.v3GetAnalysisAutoUnstripStatusWithHttpInfo(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. @@ -1992,6 +2035,58 @@ export class ObservableAnalysesCoreApi { return this.v3GetAnalysisStringsStatusWithHttpInfo(analysisId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } + /** + * Returns a page of analyses visible to the caller, filtered and ordered by the query parameters. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + * List analyses + * @param [searchTerm] + * @param [analysisScope] Leave empty for no filter + * @param [status] + * @param [modelName] + * @param [usernames] + * @param [sha256Hash] + * @param [pageSize] + * @param [nextPageToken] Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). + * @param [orderBy] + * @param [order] + */ + public v3ListAnalysesWithHttpInfo(searchTerm?: string, analysisScope?: Array<'PRIVATE' | 'PUBLIC' | 'TEAM'>, status?: Array<'Uploaded' | 'Queued' | 'Complete' | 'Error' | 'Processing'>, modelName?: Array, usernames?: Array, sha256Hash?: string, pageSize?: number, nextPageToken?: string, orderBy?: 'created' | 'binary_name' | 'binary_size', order?: 'ASC' | 'DESC', _options?: ConfigurationOptions): Observable> { + const _config = mergeConfiguration(this.configuration, _options); + + const requestContextPromise = this.requestFactory.v3ListAnalyses(searchTerm, analysisScope, status, modelName, usernames, sha256Hash, pageSize, nextPageToken, orderBy, order, _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.v3ListAnalysesWithHttpInfo(rsp))); + })); + } + + /** + * Returns a page of analyses visible to the caller, filtered and ordered by the query parameters. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + * List analyses + * @param [searchTerm] + * @param [analysisScope] Leave empty for no filter + * @param [status] + * @param [modelName] + * @param [usernames] + * @param [sha256Hash] + * @param [pageSize] + * @param [nextPageToken] Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). + * @param [orderBy] + * @param [order] + */ + public v3ListAnalyses(searchTerm?: string, analysisScope?: Array<'PRIVATE' | 'PUBLIC' | 'TEAM'>, status?: Array<'Uploaded' | 'Queued' | 'Complete' | 'Error' | 'Processing'>, modelName?: Array, usernames?: Array, sha256Hash?: string, pageSize?: number, nextPageToken?: string, orderBy?: 'created' | 'binary_name' | 'binary_size', order?: 'ASC' | 'DESC', _options?: ConfigurationOptions): Observable { + return this.v3ListAnalysesWithHttpInfo(searchTerm, analysisScope, status, modelName, usernames, sha256Hash, pageSize, nextPageToken, orderBy, order, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + /** * Returns the curated example Analyses. * List example analyses @@ -5070,6 +5165,40 @@ export class ObservableFunctionsCoreApi { return this.getFunctionDetails_4WithHttpInfo(functionId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } + /** + * Returns the function\'s indirect call instructions with their resolved call target. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * Get indirect call sites for a function + * @param functionId Function ID + */ + public getFunctionIndirectCallSitesWithHttpInfo(functionId: number, _options?: ConfigurationOptions): Observable> { + const _config = mergeConfiguration(this.configuration, _options); + + const requestContextPromise = this.requestFactory.getFunctionIndirectCallSites(functionId, _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.getFunctionIndirectCallSitesWithHttpInfo(rsp))); + })); + } + + /** + * Returns the function\'s indirect call instructions with their resolved call target. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * Get indirect call sites for a function + * @param functionId Function ID + */ + public getFunctionIndirectCallSites(functionId: number, _options?: ConfigurationOptions): Observable { + return this.getFunctionIndirectCallSitesWithHttpInfo(functionId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + /** * Get string information found in the function * Get string information found in the function @@ -5402,6 +5531,40 @@ export class ObservableFunctionsCoreApi { return this.startFunctionsMatchingWithHttpInfo(startMatchingForFunctionsInputBody, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } + /** + * Accepts up to 25 raw function names and returns their canonical forms in the same order. A name with no canonical form is returned unchanged. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `503` [`SERVICE_UNAVAILABLE`](/errors/SERVICE_UNAVAILABLE) — Service Unavailable + * Canonicalize a batch of function names + * @param canonicalizeNamesInputBody + */ + public v3CanonicalizeFunctionNamesWithHttpInfo(canonicalizeNamesInputBody: CanonicalizeNamesInputBody, _options?: ConfigurationOptions): Observable> { + const _config = mergeConfiguration(this.configuration, _options); + + const requestContextPromise = this.requestFactory.v3CanonicalizeFunctionNames(canonicalizeNamesInputBody, _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.v3CanonicalizeFunctionNamesWithHttpInfo(rsp))); + })); + } + + /** + * Accepts up to 25 raw function names and returns their canonical forms in the same order. A name with no canonical form is returned unchanged. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `503` [`SERVICE_UNAVAILABLE`](/errors/SERVICE_UNAVAILABLE) — Service Unavailable + * Canonicalize a batch of function names + * @param canonicalizeNamesInputBody + */ + public v3CanonicalizeFunctionNames(canonicalizeNamesInputBody: CanonicalizeNamesInputBody, _options?: ConfigurationOptions): Observable { + return this.v3CanonicalizeFunctionNamesWithHttpInfo(canonicalizeNamesInputBody, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + } import { FunctionsDataTypesApiRequestFactory, FunctionsDataTypesApiResponseProcessor} from "../apis/FunctionsDataTypesApi"; diff --git a/types/PromiseAPI.ts b/types/PromiseAPI.ts index ef04a3d..d40bafe 100644 --- a/types/PromiseAPI.ts +++ b/types/PromiseAPI.ts @@ -33,6 +33,7 @@ import { AnalysisFunctionsList } from '../models/AnalysisFunctionsList'; import { AnalysisLogMessage } from '../models/AnalysisLogMessage'; import { AnalysisLogs } from '../models/AnalysisLogs'; import { AnalysisRecord } from '../models/AnalysisRecord'; +import { AnalysisRecordBody } from '../models/AnalysisRecordBody'; import { AnalysisReport } from '../models/AnalysisReport'; import { AnalysisScope } from '../models/AnalysisScope'; import { AnalysisStringFunction } from '../models/AnalysisStringFunction'; @@ -40,6 +41,7 @@ import { AnalysisStringInput } from '../models/AnalysisStringInput'; import { AnalysisStringItem } from '../models/AnalysisStringItem'; import { AnalysisStringsResponse } from '../models/AnalysisStringsResponse'; import { AnalysisStringsStatusResponse } from '../models/AnalysisStringsStatusResponse'; +import { AnalysisTagBody } from '../models/AnalysisTagBody'; import { AnalysisTags } from '../models/AnalysisTags'; import { AnalysisUpdateRequest } from '../models/AnalysisUpdateRequest'; import { AnalysisUpdateTagsRequest } from '../models/AnalysisUpdateTagsRequest'; @@ -59,6 +61,7 @@ import { AttemptStartedEvent } from '../models/AttemptStartedEvent'; import { AutoRunAgents } from '../models/AutoRunAgents'; import { AutoUnstripRequest } from '../models/AutoUnstripRequest'; import { AutoUnstripResponse } from '../models/AutoUnstripResponse'; +import { AutoUnstripStatusOutputBody } from '../models/AutoUnstripStatusOutputBody'; import { BaseResponse } from '../models/BaseResponse'; import { BaseResponseAdditionalDetailsStatusResponse } from '../models/BaseResponseAdditionalDetailsStatusResponse'; import { BaseResponseAnalysisBulkAddTagsResponse } from '../models/BaseResponseAnalysisBulkAddTagsResponse'; @@ -153,6 +156,9 @@ import { CallEdgesOutputBody } from '../models/CallEdgesOutputBody'; import { CalleeFunctionInfo } from '../models/CalleeFunctionInfo'; import { CalleesCallerFunctionsResponse } from '../models/CalleesCallerFunctionsResponse'; import { CallerFunctionInfo } from '../models/CallerFunctionInfo'; +import { CanonicalName } from '../models/CanonicalName'; +import { CanonicalizeNamesInputBody } from '../models/CanonicalizeNamesInputBody'; +import { CanonicalizeNamesOutputBody } from '../models/CanonicalizeNamesOutputBody'; import { Capabilities } from '../models/Capabilities'; import { CapabilitiesAgentResponse } from '../models/CapabilitiesAgentResponse'; import { CapabilitiesOutputBody } from '../models/CapabilitiesOutputBody'; @@ -317,10 +323,13 @@ import { ImportModel } from '../models/ImportModel'; import { ImportedFunctionCallerEntry } from '../models/ImportedFunctionCallerEntry'; import { ImportedFunctionDetailOutputBody } from '../models/ImportedFunctionDetailOutputBody'; import { ImportedFunctionEntry } from '../models/ImportedFunctionEntry'; +import { IndirectCallSite } from '../models/IndirectCallSite'; +import { IndirectCallSitesOutputBody } from '../models/IndirectCallSitesOutputBody'; import { InlineComment } from '../models/InlineComment'; import { InsertAnalysisLogRequest } from '../models/InsertAnalysisLogRequest'; import { InviteUserInputBody } from '../models/InviteUserInputBody'; import { IssuerAllowedDomain } from '../models/IssuerAllowedDomain'; +import { ListAnalysesOutputBody } from '../models/ListAnalysesOutputBody'; import { ListAnalysisFunctionsDataTypesOutputBody } from '../models/ListAnalysisFunctionsDataTypesOutputBody'; import { ListAnalysisFunctionsOutputBody } from '../models/ListAnalysisFunctionsOutputBody'; import { ListAnalysisStringsOutputBody } from '../models/ListAnalysisStringsOutputBody'; @@ -1455,6 +1464,28 @@ export class PromiseAnalysesCoreApi { return result.toPromise(); } + /** + * Returns the status of the auto-unstrip 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 auto-unstrip status for an analysis. + * @param analysisId Analysis ID + */ + public v3GetAnalysisAutoUnstripStatusWithHttpInfo(analysisId: number, _options?: PromiseConfigurationOptions): Promise> { + const observableOptions = wrapOptions(_options); + const result = this.api.v3GetAnalysisAutoUnstripStatusWithHttpInfo(analysisId, observableOptions); + return result.toPromise(); + } + + /** + * Returns the status of the auto-unstrip 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 auto-unstrip status for an analysis. + * @param analysisId Analysis ID + */ + public v3GetAnalysisAutoUnstripStatus(analysisId: number, _options?: PromiseConfigurationOptions): Promise { + const observableOptions = wrapOptions(_options); + const result = this.api.v3GetAnalysisAutoUnstripStatus(analysisId, 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. @@ -1511,6 +1542,46 @@ export class PromiseAnalysesCoreApi { return result.toPromise(); } + /** + * Returns a page of analyses visible to the caller, filtered and ordered by the query parameters. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + * List analyses + * @param [searchTerm] + * @param [analysisScope] Leave empty for no filter + * @param [status] + * @param [modelName] + * @param [usernames] + * @param [sha256Hash] + * @param [pageSize] + * @param [nextPageToken] Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). + * @param [orderBy] + * @param [order] + */ + public v3ListAnalysesWithHttpInfo(searchTerm?: string, analysisScope?: Array<'PRIVATE' | 'PUBLIC' | 'TEAM'>, status?: Array<'Uploaded' | 'Queued' | 'Complete' | 'Error' | 'Processing'>, modelName?: Array, usernames?: Array, sha256Hash?: string, pageSize?: number, nextPageToken?: string, orderBy?: 'created' | 'binary_name' | 'binary_size', order?: 'ASC' | 'DESC', _options?: PromiseConfigurationOptions): Promise> { + const observableOptions = wrapOptions(_options); + const result = this.api.v3ListAnalysesWithHttpInfo(searchTerm, analysisScope, status, modelName, usernames, sha256Hash, pageSize, nextPageToken, orderBy, order, observableOptions); + return result.toPromise(); + } + + /** + * Returns a page of analyses visible to the caller, filtered and ordered by the query parameters. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + * List analyses + * @param [searchTerm] + * @param [analysisScope] Leave empty for no filter + * @param [status] + * @param [modelName] + * @param [usernames] + * @param [sha256Hash] + * @param [pageSize] + * @param [nextPageToken] Forward-pagination cursor from a prior response. When set, order_by/order are taken from the token (the sort cannot change mid-pagination). + * @param [orderBy] + * @param [order] + */ + public v3ListAnalyses(searchTerm?: string, analysisScope?: Array<'PRIVATE' | 'PUBLIC' | 'TEAM'>, status?: Array<'Uploaded' | 'Queued' | 'Complete' | 'Error' | 'Processing'>, modelName?: Array, usernames?: Array, sha256Hash?: string, pageSize?: number, nextPageToken?: string, orderBy?: 'created' | 'binary_name' | 'binary_size', order?: 'ASC' | 'DESC', _options?: PromiseConfigurationOptions): Promise { + const observableOptions = wrapOptions(_options); + const result = this.api.v3ListAnalyses(searchTerm, analysisScope, status, modelName, usernames, sha256Hash, pageSize, nextPageToken, orderBy, order, observableOptions); + return result.toPromise(); + } + /** * Returns the curated example Analyses. * List example analyses @@ -3604,6 +3675,28 @@ export class PromiseFunctionsCoreApi { return result.toPromise(); } + /** + * Returns the function\'s indirect call instructions with their resolved call target. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * Get indirect call sites for a function + * @param functionId Function ID + */ + public getFunctionIndirectCallSitesWithHttpInfo(functionId: number, _options?: PromiseConfigurationOptions): Promise> { + const observableOptions = wrapOptions(_options); + const result = this.api.getFunctionIndirectCallSitesWithHttpInfo(functionId, observableOptions); + return result.toPromise(); + } + + /** + * Returns the function\'s indirect call instructions with their resolved call target. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * Get indirect call sites for a function + * @param functionId Function ID + */ + public getFunctionIndirectCallSites(functionId: number, _options?: PromiseConfigurationOptions): Promise { + const observableOptions = wrapOptions(_options); + const result = this.api.getFunctionIndirectCallSites(functionId, observableOptions); + return result.toPromise(); + } + /** * Get string information found in the function * Get string information found in the function @@ -3828,6 +3921,28 @@ export class PromiseFunctionsCoreApi { return result.toPromise(); } + /** + * Accepts up to 25 raw function names and returns their canonical forms in the same order. A name with no canonical form is returned unchanged. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `503` [`SERVICE_UNAVAILABLE`](/errors/SERVICE_UNAVAILABLE) — Service Unavailable + * Canonicalize a batch of function names + * @param canonicalizeNamesInputBody + */ + public v3CanonicalizeFunctionNamesWithHttpInfo(canonicalizeNamesInputBody: CanonicalizeNamesInputBody, _options?: PromiseConfigurationOptions): Promise> { + const observableOptions = wrapOptions(_options); + const result = this.api.v3CanonicalizeFunctionNamesWithHttpInfo(canonicalizeNamesInputBody, observableOptions); + return result.toPromise(); + } + + /** + * Accepts up to 25 raw function names and returns their canonical forms in the same order. A name with no canonical form is returned unchanged. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `503` [`SERVICE_UNAVAILABLE`](/errors/SERVICE_UNAVAILABLE) — Service Unavailable + * Canonicalize a batch of function names + * @param canonicalizeNamesInputBody + */ + public v3CanonicalizeFunctionNames(canonicalizeNamesInputBody: CanonicalizeNamesInputBody, _options?: PromiseConfigurationOptions): Promise { + const observableOptions = wrapOptions(_options); + const result = this.api.v3CanonicalizeFunctionNames(canonicalizeNamesInputBody, observableOptions); + return result.toPromise(); + } + }