Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .sdk-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.123.0
v3.124.0
24 changes: 22 additions & 2 deletions apis/SearchApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ export class SearchApiRequestFactory extends BaseAPIRequestFactory {
* @param modelName The name of the model used to analyze the binary the function belongs to
* @param userFilesOnly Whether to only search user\'s uploaded files
* @param excludeBinaryId A binary ID to exclude from the results
* @param userIds Restrict the search to binaries owned by these user IDs
*/
public async searchBinaries(page?: number, pageSize?: number, partialName?: string, partialSha256?: string, tags?: Array<string>, modelName?: string, userFilesOnly?: boolean, excludeBinaryId?: number, _options?: Configuration): Promise<RequestContext> {
public async searchBinaries(page?: number, pageSize?: number, partialName?: string, partialSha256?: string, tags?: Array<string>, modelName?: string, userFilesOnly?: boolean, excludeBinaryId?: number, userIds?: Array<number>, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;


Expand All @@ -45,6 +46,7 @@ export class SearchApiRequestFactory extends BaseAPIRequestFactory {




// Path Params
const localVarPath = '/v2/search/binaries';

Expand Down Expand Up @@ -95,6 +97,14 @@ export class SearchApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setQueryParam("exclude_binary_id", ObjectSerializer.serialize(excludeBinaryId, "number", ""));
}

// Query Params
if (userIds !== undefined) {
const serializedParams = ObjectSerializer.serialize(userIds, "Array<number>", "");
for (const serializedParam of serializedParams) {
requestContext.appendQueryParam("user_ids", serializedParam);
}
}


let authMethod: SecurityAuthentication | undefined;
// Apply auth methods
Expand Down Expand Up @@ -128,8 +138,9 @@ export class SearchApiRequestFactory extends BaseAPIRequestFactory {
* @param filters The filters to be used for the search
* @param orderBy The field to sort the order by in the results
* @param orderByDirection The order direction in which to return results
* @param userIds Restrict the search to collections owned by these user IDs
*/
public async searchCollections(page?: number, pageSize?: number, partialCollectionName?: string, partialBinaryName?: string, partialBinarySha256?: string, tags?: Array<string>, filters?: Array<Filters>, orderBy?: AppApiRestV2CollectionsEnumsOrderBy, orderByDirection?: Order, _options?: Configuration): Promise<RequestContext> {
public async searchCollections(page?: number, pageSize?: number, partialCollectionName?: string, partialBinaryName?: string, partialBinarySha256?: string, tags?: Array<string>, filters?: Array<Filters>, orderBy?: AppApiRestV2CollectionsEnumsOrderBy, orderByDirection?: Order, userIds?: Array<number>, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;


Expand All @@ -141,6 +152,7 @@ export class SearchApiRequestFactory extends BaseAPIRequestFactory {




// Path Params
const localVarPath = '/v2/search/collections';

Expand Down Expand Up @@ -199,6 +211,14 @@ export class SearchApiRequestFactory extends BaseAPIRequestFactory {
requestContext.setQueryParam("order_by_direction", ObjectSerializer.serialize(orderByDirection, "Order", ""));
}

// Query Params
if (userIds !== undefined) {
const serializedParams = ObjectSerializer.serialize(userIds, "Array<number>", "");
for (const serializedParam of serializedParams) {
requestContext.appendQueryParam("user_ids", serializedParam);
}
}


let authMethod: SecurityAuthentication | undefined;
// Apply auth methods
Expand Down
10 changes: 10 additions & 0 deletions docs/SearchApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ const request: SearchApiSearchBinariesRequest = {
userFilesOnly: false,
// A binary ID to exclude from the results (optional)
excludeBinaryId: 1,
// Restrict the search to binaries owned by these user IDs (optional)
userIds: [
1,
],
};

const data = await apiInstance.searchBinaries(request);
Expand All @@ -63,6 +67,7 @@ Name | Type | Description | Notes
**modelName** | [**string**] | The name of the model used to analyze the binary the function belongs to | (optional) defaults to undefined
**userFilesOnly** | [**boolean**] | Whether to only search user\&#39;s uploaded files | (optional) defaults to false
**excludeBinaryId** | [**number**] | A binary ID to exclude from the results | (optional) defaults to undefined
**userIds** | **Array&lt;number&gt;** | Restrict the search to binaries owned by these user IDs | (optional) defaults to undefined


### Return type
Expand Down Expand Up @@ -125,6 +130,10 @@ const request: SearchApiSearchCollectionsRequest = {
orderBy: "created",
// The order direction in which to return results (optional)
orderByDirection: "ASC",
// Restrict the search to collections owned by these user IDs (optional)
userIds: [
1,
],
};

const data = await apiInstance.searchCollections(request);
Expand All @@ -145,6 +154,7 @@ Name | Type | Description | Notes
**filters** | **Array&lt;Filters&gt;** | The filters to be used for the search | (optional) defaults to undefined
**orderBy** | **AppApiRestV2CollectionsEnumsOrderBy** | The field to sort the order by in the results | (optional) defaults to undefined
**orderByDirection** | **Order** | The order direction in which to return results | (optional) defaults to undefined
**userIds** | **Array&lt;number&gt;** | Restrict the search to collections owned by these user IDs | (optional) defaults to undefined


### Return type
Expand Down
7 changes: 7 additions & 0 deletions models/Permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export class Permissions {
'canExportSymbols': boolean;
'canGeneratePdfReports': boolean;
'canUseAiMalwareAnalysis': boolean;
'canUseCompositionAnalysis': boolean;
'canUseMalwareSandbox': boolean;
'canUsePrivateAnalyses': boolean;

Expand All @@ -41,6 +42,12 @@ export class Permissions {
"type": "boolean",
"format": ""
},
{
"name": "canUseCompositionAnalysis",
"baseName": "can_use_composition_analysis",
"type": "boolean",
"format": ""
},
{
"name": "canUseMalwareSandbox",
"baseName": "can_use_malware_sandbox",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@revengai/sdk",
"version": "3.123.0",
"version": "3.124.0",
"description": "TypeScript SDK for the RevEng.AI API",
"author": "RevEng.AI",
"repository": {
Expand Down
22 changes: 18 additions & 4 deletions types/ObjectParamAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5913,6 +5913,13 @@ export interface SearchApiSearchBinariesRequest {
* @memberof SearchApisearchBinaries
*/
excludeBinaryId?: number
/**
* Restrict the search to binaries owned by these user IDs
* Defaults to: undefined
* @type Array&lt;number&gt;
* @memberof SearchApisearchBinaries
*/
userIds?: Array<number>
}

export interface SearchApiSearchCollectionsRequest {
Expand Down Expand Up @@ -5982,6 +5989,13 @@ export interface SearchApiSearchCollectionsRequest {
* @memberof SearchApisearchCollections
*/
orderByDirection?: Order
/**
* Restrict the search to collections owned by these user IDs
* Defaults to: undefined
* @type Array&lt;number&gt;
* @memberof SearchApisearchCollections
*/
userIds?: Array<number>
}

export interface SearchApiSearchFunctionsRequest {
Expand Down Expand Up @@ -6058,7 +6072,7 @@ export class ObjectSearchApi {
* @param param the request object
*/
public searchBinariesWithHttpInfo(param: SearchApiSearchBinariesRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<BaseResponseBinarySearchResponse>> {
return this.api.searchBinariesWithHttpInfo(param.page, param.pageSize, param.partialName, param.partialSha256, param.tags, param.modelName, param.userFilesOnly, param.excludeBinaryId, options).toPromise();
return this.api.searchBinariesWithHttpInfo(param.page, param.pageSize, param.partialName, param.partialSha256, param.tags, param.modelName, param.userFilesOnly, param.excludeBinaryId, param.userIds, options).toPromise();
}

/**
Expand All @@ -6067,7 +6081,7 @@ export class ObjectSearchApi {
* @param param the request object
*/
public searchBinaries(param: SearchApiSearchBinariesRequest = {}, options?: ConfigurationOptions): Promise<BaseResponseBinarySearchResponse> {
return this.api.searchBinaries(param.page, param.pageSize, param.partialName, param.partialSha256, param.tags, param.modelName, param.userFilesOnly, param.excludeBinaryId, options).toPromise();
return this.api.searchBinaries(param.page, param.pageSize, param.partialName, param.partialSha256, param.tags, param.modelName, param.userFilesOnly, param.excludeBinaryId, param.userIds, options).toPromise();
}

/**
Expand All @@ -6076,7 +6090,7 @@ export class ObjectSearchApi {
* @param param the request object
*/
public searchCollectionsWithHttpInfo(param: SearchApiSearchCollectionsRequest = {}, options?: ConfigurationOptions): Promise<HttpInfo<BaseResponseCollectionSearchResponse>> {
return this.api.searchCollectionsWithHttpInfo(param.page, param.pageSize, param.partialCollectionName, param.partialBinaryName, param.partialBinarySha256, param.tags, param.filters, param.orderBy, param.orderByDirection, options).toPromise();
return this.api.searchCollectionsWithHttpInfo(param.page, param.pageSize, param.partialCollectionName, param.partialBinaryName, param.partialBinarySha256, param.tags, param.filters, param.orderBy, param.orderByDirection, param.userIds, options).toPromise();
}

/**
Expand All @@ -6085,7 +6099,7 @@ export class ObjectSearchApi {
* @param param the request object
*/
public searchCollections(param: SearchApiSearchCollectionsRequest = {}, options?: ConfigurationOptions): Promise<BaseResponseCollectionSearchResponse> {
return this.api.searchCollections(param.page, param.pageSize, param.partialCollectionName, param.partialBinaryName, param.partialBinarySha256, param.tags, param.filters, param.orderBy, param.orderByDirection, options).toPromise();
return this.api.searchCollections(param.page, param.pageSize, param.partialCollectionName, param.partialBinaryName, param.partialBinarySha256, param.tags, param.filters, param.orderBy, param.orderByDirection, param.userIds, options).toPromise();
}

/**
Expand Down
20 changes: 12 additions & 8 deletions types/ObservableAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6267,11 +6267,12 @@ export class ObservableSearchApi {
* @param [modelName] The name of the model used to analyze the binary the function belongs to
* @param [userFilesOnly] Whether to only search user\&#39;s uploaded files
* @param [excludeBinaryId] A binary ID to exclude from the results
* @param [userIds] Restrict the search to binaries owned by these user IDs
*/
public searchBinariesWithHttpInfo(page?: number, pageSize?: number, partialName?: string, partialSha256?: string, tags?: Array<string>, modelName?: string, userFilesOnly?: boolean, excludeBinaryId?: number, _options?: ConfigurationOptions): Observable<HttpInfo<BaseResponseBinarySearchResponse>> {
public searchBinariesWithHttpInfo(page?: number, pageSize?: number, partialName?: string, partialSha256?: string, tags?: Array<string>, modelName?: string, userFilesOnly?: boolean, excludeBinaryId?: number, userIds?: Array<number>, _options?: ConfigurationOptions): Observable<HttpInfo<BaseResponseBinarySearchResponse>> {
const _config = mergeConfiguration(this.configuration, _options);

const requestContextPromise = this.requestFactory.searchBinaries(page, pageSize, partialName, partialSha256, tags, modelName, userFilesOnly, excludeBinaryId, _config);
const requestContextPromise = this.requestFactory.searchBinaries(page, pageSize, partialName, partialSha256, tags, modelName, userFilesOnly, excludeBinaryId, userIds, _config);
// build promise chain
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
for (const middleware of _config.middleware) {
Expand Down Expand Up @@ -6299,9 +6300,10 @@ export class ObservableSearchApi {
* @param [modelName] The name of the model used to analyze the binary the function belongs to
* @param [userFilesOnly] Whether to only search user\&#39;s uploaded files
* @param [excludeBinaryId] A binary ID to exclude from the results
* @param [userIds] Restrict the search to binaries owned by these user IDs
*/
public searchBinaries(page?: number, pageSize?: number, partialName?: string, partialSha256?: string, tags?: Array<string>, modelName?: string, userFilesOnly?: boolean, excludeBinaryId?: number, _options?: ConfigurationOptions): Observable<BaseResponseBinarySearchResponse> {
return this.searchBinariesWithHttpInfo(page, pageSize, partialName, partialSha256, tags, modelName, userFilesOnly, excludeBinaryId, _options).pipe(map((apiResponse: HttpInfo<BaseResponseBinarySearchResponse>) => apiResponse.data));
public searchBinaries(page?: number, pageSize?: number, partialName?: string, partialSha256?: string, tags?: Array<string>, modelName?: string, userFilesOnly?: boolean, excludeBinaryId?: number, userIds?: Array<number>, _options?: ConfigurationOptions): Observable<BaseResponseBinarySearchResponse> {
return this.searchBinariesWithHttpInfo(page, pageSize, partialName, partialSha256, tags, modelName, userFilesOnly, excludeBinaryId, userIds, _options).pipe(map((apiResponse: HttpInfo<BaseResponseBinarySearchResponse>) => apiResponse.data));
}

/**
Expand All @@ -6316,11 +6318,12 @@ export class ObservableSearchApi {
* @param [filters] The filters to be used for the search
* @param [orderBy] The field to sort the order by in the results
* @param [orderByDirection] The order direction in which to return results
* @param [userIds] Restrict the search to collections owned by these user IDs
*/
public searchCollectionsWithHttpInfo(page?: number, pageSize?: number, partialCollectionName?: string, partialBinaryName?: string, partialBinarySha256?: string, tags?: Array<string>, filters?: Array<Filters>, orderBy?: AppApiRestV2CollectionsEnumsOrderBy, orderByDirection?: Order, _options?: ConfigurationOptions): Observable<HttpInfo<BaseResponseCollectionSearchResponse>> {
public searchCollectionsWithHttpInfo(page?: number, pageSize?: number, partialCollectionName?: string, partialBinaryName?: string, partialBinarySha256?: string, tags?: Array<string>, filters?: Array<Filters>, orderBy?: AppApiRestV2CollectionsEnumsOrderBy, orderByDirection?: Order, userIds?: Array<number>, _options?: ConfigurationOptions): Observable<HttpInfo<BaseResponseCollectionSearchResponse>> {
const _config = mergeConfiguration(this.configuration, _options);

const requestContextPromise = this.requestFactory.searchCollections(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, filters, orderBy, orderByDirection, _config);
const requestContextPromise = this.requestFactory.searchCollections(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, filters, orderBy, orderByDirection, userIds, _config);
// build promise chain
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
for (const middleware of _config.middleware) {
Expand Down Expand Up @@ -6349,9 +6352,10 @@ export class ObservableSearchApi {
* @param [filters] The filters to be used for the search
* @param [orderBy] The field to sort the order by in the results
* @param [orderByDirection] The order direction in which to return results
* @param [userIds] Restrict the search to collections owned by these user IDs
*/
public searchCollections(page?: number, pageSize?: number, partialCollectionName?: string, partialBinaryName?: string, partialBinarySha256?: string, tags?: Array<string>, filters?: Array<Filters>, orderBy?: AppApiRestV2CollectionsEnumsOrderBy, orderByDirection?: Order, _options?: ConfigurationOptions): Observable<BaseResponseCollectionSearchResponse> {
return this.searchCollectionsWithHttpInfo(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, filters, orderBy, orderByDirection, _options).pipe(map((apiResponse: HttpInfo<BaseResponseCollectionSearchResponse>) => apiResponse.data));
public searchCollections(page?: number, pageSize?: number, partialCollectionName?: string, partialBinaryName?: string, partialBinarySha256?: string, tags?: Array<string>, filters?: Array<Filters>, orderBy?: AppApiRestV2CollectionsEnumsOrderBy, orderByDirection?: Order, userIds?: Array<number>, _options?: ConfigurationOptions): Observable<BaseResponseCollectionSearchResponse> {
return this.searchCollectionsWithHttpInfo(page, pageSize, partialCollectionName, partialBinaryName, partialBinarySha256, tags, filters, orderBy, orderByDirection, userIds, _options).pipe(map((apiResponse: HttpInfo<BaseResponseCollectionSearchResponse>) => apiResponse.data));
}

/**
Expand Down
Loading