diff --git a/.sdk-version b/.sdk-version index 3d5a70b..3a1a0ae 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.123.0 +v3.124.0 diff --git a/docs/Permissions.md b/docs/Permissions.md index ddd7f47..57422c4 100644 --- a/docs/Permissions.md +++ b/docs/Permissions.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **can_export_symbols** | **bool** | | **can_generate_pdf_reports** | **bool** | | **can_use_ai_malware_analysis** | **bool** | | +**can_use_composition_analysis** | **bool** | | **can_use_malware_sandbox** | **bool** | | **can_use_private_analyses** | **bool** | | diff --git a/docs/SearchApi.md b/docs/SearchApi.md index 3a626c6..6ff15a4 100644 --- a/docs/SearchApi.md +++ b/docs/SearchApi.md @@ -11,7 +11,7 @@ Method | HTTP request | Description # **search_binaries** -> BaseResponseBinarySearchResponse search_binaries(page=page, page_size=page_size, partial_name=partial_name, partial_sha256=partial_sha256, tags=tags, model_name=model_name, user_files_only=user_files_only, exclude_binary_id=exclude_binary_id) +> BaseResponseBinarySearchResponse search_binaries(page=page, page_size=page_size, partial_name=partial_name, partial_sha256=partial_sha256, tags=tags, model_name=model_name, user_files_only=user_files_only, exclude_binary_id=exclude_binary_id, user_ids=user_ids) Binaries search @@ -62,10 +62,11 @@ with revengai.ApiClient(configuration) as api_client: model_name = 'model_name_example' # str | The name of the model used to analyze the binary the function belongs to (optional) user_files_only = False # bool | Whether to only search user's uploaded files (optional) (default to False) exclude_binary_id = 56 # int | A binary ID to exclude from the results (optional) + user_ids = [56] # List[int] | Restrict the search to binaries owned by these user IDs (optional) try: # Binaries search - api_response = api_instance.search_binaries(page=page, page_size=page_size, partial_name=partial_name, partial_sha256=partial_sha256, tags=tags, model_name=model_name, user_files_only=user_files_only, exclude_binary_id=exclude_binary_id) + api_response = api_instance.search_binaries(page=page, page_size=page_size, partial_name=partial_name, partial_sha256=partial_sha256, tags=tags, model_name=model_name, user_files_only=user_files_only, exclude_binary_id=exclude_binary_id, user_ids=user_ids) print("The response of SearchApi->search_binaries:\n") pprint(api_response) except Exception as e: @@ -87,6 +88,7 @@ Name | Type | Description | Notes **model_name** | **str**| The name of the model used to analyze the binary the function belongs to | [optional] **user_files_only** | **bool**| Whether to only search user's uploaded files | [optional] [default to False] **exclude_binary_id** | **int**| A binary ID to exclude from the results | [optional] + **user_ids** | [**List[int]**](int.md)| Restrict the search to binaries owned by these user IDs | [optional] ### Return type @@ -111,7 +113,7 @@ 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) # **search_collections** -> BaseResponseCollectionSearchResponse search_collections(page=page, page_size=page_size, partial_collection_name=partial_collection_name, partial_binary_name=partial_binary_name, partial_binary_sha256=partial_binary_sha256, tags=tags, filters=filters, order_by=order_by, order_by_direction=order_by_direction) +> BaseResponseCollectionSearchResponse search_collections(page=page, page_size=page_size, partial_collection_name=partial_collection_name, partial_binary_name=partial_binary_name, partial_binary_sha256=partial_binary_sha256, tags=tags, filters=filters, order_by=order_by, order_by_direction=order_by_direction, user_ids=user_ids) Collections search @@ -166,10 +168,11 @@ with revengai.ApiClient(configuration) as api_client: filters = [revengai.Filters()] # List[Filters] | The filters to be used for the search (optional) order_by = revengai.AppApiRestV2CollectionsEnumsOrderBy() # AppApiRestV2CollectionsEnumsOrderBy | The field to sort the order by in the results (optional) order_by_direction = revengai.Order() # Order | The order direction in which to return results (optional) + user_ids = [56] # List[int] | Restrict the search to collections owned by these user IDs (optional) try: # Collections search - api_response = api_instance.search_collections(page=page, page_size=page_size, partial_collection_name=partial_collection_name, partial_binary_name=partial_binary_name, partial_binary_sha256=partial_binary_sha256, tags=tags, filters=filters, order_by=order_by, order_by_direction=order_by_direction) + api_response = api_instance.search_collections(page=page, page_size=page_size, partial_collection_name=partial_collection_name, partial_binary_name=partial_binary_name, partial_binary_sha256=partial_binary_sha256, tags=tags, filters=filters, order_by=order_by, order_by_direction=order_by_direction, user_ids=user_ids) print("The response of SearchApi->search_collections:\n") pprint(api_response) except Exception as e: @@ -192,6 +195,7 @@ Name | Type | Description | Notes **filters** | [**List[Filters]**](Filters.md)| The filters to be used for the search | [optional] **order_by** | [**AppApiRestV2CollectionsEnumsOrderBy**](.md)| The field to sort the order by in the results | [optional] **order_by_direction** | [**Order**](.md)| The order direction in which to return results | [optional] + **user_ids** | [**List[int]**](int.md)| Restrict the search to collections owned by these user IDs | [optional] ### Return type diff --git a/revengai/__init__.py b/revengai/__init__.py index ce702f8..27e65f8 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v3.123.0" +__version__ = "v3.124.0" # Define package exports __all__ = [ diff --git a/revengai/api/search_api.py b/revengai/api/search_api.py index de96f0b..e1932fe 100644 --- a/revengai/api/search_api.py +++ b/revengai/api/search_api.py @@ -55,6 +55,7 @@ def search_binaries( model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None, user_files_only: Annotated[Optional[StrictBool], Field(description="Whether to only search user's uploaded files")] = None, exclude_binary_id: Annotated[Optional[StrictInt], Field(description="A binary ID to exclude from the results")] = None, + user_ids: Annotated[Optional[List[StrictInt]], Field(description="Restrict the search to binaries owned by these user IDs")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -88,6 +89,8 @@ def search_binaries( :type user_files_only: bool :param exclude_binary_id: A binary ID to exclude from the results :type exclude_binary_id: int + :param user_ids: Restrict the search to binaries owned by these user IDs + :type user_ids: List[int] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -119,6 +122,7 @@ def search_binaries( model_name=model_name, user_files_only=user_files_only, exclude_binary_id=exclude_binary_id, + user_ids=user_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -151,6 +155,7 @@ def search_binaries_with_http_info( model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None, user_files_only: Annotated[Optional[StrictBool], Field(description="Whether to only search user's uploaded files")] = None, exclude_binary_id: Annotated[Optional[StrictInt], Field(description="A binary ID to exclude from the results")] = None, + user_ids: Annotated[Optional[List[StrictInt]], Field(description="Restrict the search to binaries owned by these user IDs")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -184,6 +189,8 @@ def search_binaries_with_http_info( :type user_files_only: bool :param exclude_binary_id: A binary ID to exclude from the results :type exclude_binary_id: int + :param user_ids: Restrict the search to binaries owned by these user IDs + :type user_ids: List[int] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -215,6 +222,7 @@ def search_binaries_with_http_info( model_name=model_name, user_files_only=user_files_only, exclude_binary_id=exclude_binary_id, + user_ids=user_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -247,6 +255,7 @@ def search_binaries_without_preload_content( model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None, user_files_only: Annotated[Optional[StrictBool], Field(description="Whether to only search user's uploaded files")] = None, exclude_binary_id: Annotated[Optional[StrictInt], Field(description="A binary ID to exclude from the results")] = None, + user_ids: Annotated[Optional[List[StrictInt]], Field(description="Restrict the search to binaries owned by these user IDs")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -280,6 +289,8 @@ def search_binaries_without_preload_content( :type user_files_only: bool :param exclude_binary_id: A binary ID to exclude from the results :type exclude_binary_id: int + :param user_ids: Restrict the search to binaries owned by these user IDs + :type user_ids: List[int] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -311,6 +322,7 @@ def search_binaries_without_preload_content( model_name=model_name, user_files_only=user_files_only, exclude_binary_id=exclude_binary_id, + user_ids=user_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -338,6 +350,7 @@ def _search_binaries_serialize( model_name, user_files_only, exclude_binary_id, + user_ids, _request_auth, _content_type, _headers, @@ -348,6 +361,7 @@ def _search_binaries_serialize( _collection_formats: Dict[str, str] = { 'tags': 'multi', + 'user_ids': 'multi', } _path_params: Dict[str, str] = {} @@ -393,6 +407,10 @@ def _search_binaries_serialize( _query_params.append(('exclude_binary_id', exclude_binary_id)) + if user_ids is not None: + + _query_params.append(('user_ids', user_ids)) + # process the header parameters # process the form parameters # process the body parameter @@ -443,6 +461,7 @@ def search_collections( filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None, order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None, order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None, + user_ids: Annotated[Optional[List[StrictInt]], Field(description="Restrict the search to collections owned by these user IDs")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -478,6 +497,8 @@ def search_collections( :type order_by: AppApiRestV2CollectionsEnumsOrderBy :param order_by_direction: The order direction in which to return results :type order_by_direction: Order + :param user_ids: Restrict the search to collections owned by these user IDs + :type user_ids: List[int] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -510,6 +531,7 @@ def search_collections( filters=filters, order_by=order_by, order_by_direction=order_by_direction, + user_ids=user_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -543,6 +565,7 @@ def search_collections_with_http_info( filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None, order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None, order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None, + user_ids: Annotated[Optional[List[StrictInt]], Field(description="Restrict the search to collections owned by these user IDs")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -578,6 +601,8 @@ def search_collections_with_http_info( :type order_by: AppApiRestV2CollectionsEnumsOrderBy :param order_by_direction: The order direction in which to return results :type order_by_direction: Order + :param user_ids: Restrict the search to collections owned by these user IDs + :type user_ids: List[int] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -610,6 +635,7 @@ def search_collections_with_http_info( filters=filters, order_by=order_by, order_by_direction=order_by_direction, + user_ids=user_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -643,6 +669,7 @@ def search_collections_without_preload_content( filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None, order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None, order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None, + user_ids: Annotated[Optional[List[StrictInt]], Field(description="Restrict the search to collections owned by these user IDs")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -678,6 +705,8 @@ def search_collections_without_preload_content( :type order_by: AppApiRestV2CollectionsEnumsOrderBy :param order_by_direction: The order direction in which to return results :type order_by_direction: Order + :param user_ids: Restrict the search to collections owned by these user IDs + :type user_ids: List[int] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -710,6 +739,7 @@ def search_collections_without_preload_content( filters=filters, order_by=order_by, order_by_direction=order_by_direction, + user_ids=user_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -738,6 +768,7 @@ def _search_collections_serialize( filters, order_by, order_by_direction, + user_ids, _request_auth, _content_type, _headers, @@ -749,6 +780,7 @@ def _search_collections_serialize( _collection_formats: Dict[str, str] = { 'tags': 'multi', 'filters': 'multi', + 'user_ids': 'multi', } _path_params: Dict[str, str] = {} @@ -798,6 +830,10 @@ def _search_collections_serialize( _query_params.append(('order_by_direction', order_by_direction.value)) + if user_ids is not None: + + _query_params.append(('user_ids', user_ids)) + # process the header parameters # process the form parameters # process the body parameter diff --git a/revengai/api_client.py b/revengai/api_client.py index 4853a30..39cb5d0 100644 --- a/revengai/api_client.py +++ b/revengai/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/v3.123.0/python' + self.user_agent = 'OpenAPI-Generator/v3.124.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index bbbfc54..32f2749 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -541,8 +541,8 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v3.123.0\n"\ - "SDK Package Version: v3.123.0".\ + "Version of the API: v3.124.0\n"\ + "SDK Package Version: v3.124.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/revengai/models/permissions.py b/revengai/models/permissions.py index 85b0824..9a7df61 100644 --- a/revengai/models/permissions.py +++ b/revengai/models/permissions.py @@ -28,10 +28,11 @@ class Permissions(BaseModel): can_export_symbols: StrictBool can_generate_pdf_reports: StrictBool can_use_ai_malware_analysis: StrictBool + can_use_composition_analysis: StrictBool can_use_malware_sandbox: StrictBool can_use_private_analyses: StrictBool additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["can_export_symbols", "can_generate_pdf_reports", "can_use_ai_malware_analysis", "can_use_malware_sandbox", "can_use_private_analyses"] + __properties: ClassVar[List[str]] = ["can_export_symbols", "can_generate_pdf_reports", "can_use_ai_malware_analysis", "can_use_composition_analysis", "can_use_malware_sandbox", "can_use_private_analyses"] model_config = ConfigDict( populate_by_name=True, @@ -94,6 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "can_export_symbols": obj.get("can_export_symbols"), "can_generate_pdf_reports": obj.get("can_generate_pdf_reports"), "can_use_ai_malware_analysis": obj.get("can_use_ai_malware_analysis"), + "can_use_composition_analysis": obj.get("can_use_composition_analysis"), "can_use_malware_sandbox": obj.get("can_use_malware_sandbox"), "can_use_private_analyses": obj.get("can_use_private_analyses") })