From 8ce73b795b3abfbd0faef92ae5407387c1dcbc6b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 5 Jun 2026 07:41:40 +0000 Subject: [PATCH] Update SDK to version v3.87.0 - Generated from OpenAPI spec version v3.87.0 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- README.md | 15 +- docs/AnalysesCoreApi.md | 88 +++ docs/AnalysisBasicInfoOutputBody.md | 46 ++ docs/BinariesApi.md | 176 ++++++ docs/BinariesCoreApi.md | 184 ------ docs/CreateCheckoutSessionInputBody.md | 31 + docs/CreatePortalSessionInputBody.md | 29 + docs/GetProductsOutputBody.md | 29 + docs/GetSubscriptionOutputBody.md | 34 + docs/PriceOutput.md | 32 + docs/PriceSummary.md | 31 + docs/ProductOutput.md | 35 ++ docs/ProductSummary.md | 29 + docs/SessionOutputBody.md | 29 + revengai/__init__.py | 24 +- revengai/api/__init__.py | 1 - revengai/api/analyses_core_api.py | 274 ++++++++ revengai/api/binaries_api.py | 551 ++++++++++++++++- revengai/api/binaries_core_api.py | 584 ------------------ revengai/api/functions_core_api.py | 27 +- revengai/api_client.py | 2 +- revengai/configuration.py | 4 +- revengai/models/__init__.py | 10 + .../models/analysis_basic_info_output_body.py | 146 +++++ .../create_checkout_session_input_body.py | 125 ++++ .../create_portal_session_input_body.py | 107 ++++ revengai/models/error_body.py | 4 +- revengai/models/get_products_output_body.py | 112 ++++ .../models/get_subscription_output_body.py | 132 ++++ revengai/models/price_output.py | 112 ++++ revengai/models/price_summary.py | 110 ++++ revengai/models/product_output.py | 129 ++++ revengai/models/product_summary.py | 99 +++ revengai/models/session_output_body.py | 99 +++ 35 files changed, 2652 insertions(+), 790 deletions(-) create mode 100644 docs/AnalysisBasicInfoOutputBody.md delete mode 100644 docs/BinariesCoreApi.md create mode 100644 docs/CreateCheckoutSessionInputBody.md create mode 100644 docs/CreatePortalSessionInputBody.md create mode 100644 docs/GetProductsOutputBody.md create mode 100644 docs/GetSubscriptionOutputBody.md create mode 100644 docs/PriceOutput.md create mode 100644 docs/PriceSummary.md create mode 100644 docs/ProductOutput.md create mode 100644 docs/ProductSummary.md create mode 100644 docs/SessionOutputBody.md delete mode 100644 revengai/api/binaries_core_api.py create mode 100644 revengai/models/analysis_basic_info_output_body.py create mode 100644 revengai/models/create_checkout_session_input_body.py create mode 100644 revengai/models/create_portal_session_input_body.py create mode 100644 revengai/models/get_products_output_body.py create mode 100644 revengai/models/get_subscription_output_body.py create mode 100644 revengai/models/price_output.py create mode 100644 revengai/models/price_summary.py create mode 100644 revengai/models/product_output.py create mode 100644 revengai/models/product_summary.py create mode 100644 revengai/models/session_output_body.py diff --git a/.sdk-version b/.sdk-version index ceece8fb..4bccaba0 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.86.8 +v3.87.0 diff --git a/README.md b/README.md index eb3cf783..80a7384e 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ Class | Method | HTTP request | Description *AnalysesCoreApi* | [**create_analysis**](docs/AnalysesCoreApi.md#create_analysis) | **POST** /v2/analyses | Create Analysis *AnalysesCoreApi* | [**delete_analysis**](docs/AnalysesCoreApi.md#delete_analysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis *AnalysesCoreApi* | [**get_analysis_basic_info**](docs/AnalysesCoreApi.md#get_analysis_basic_info) | **GET** /v2/analyses/{analysis_id}/basic | Gets basic analysis information +*AnalysesCoreApi* | [**get_analysis_basic_info_0**](docs/AnalysesCoreApi.md#get_analysis_basic_info_0) | **GET** /v3/analyses/{analysis_id}/basic | Get basic analysis information *AnalysesCoreApi* | [**get_analysis_bytes**](docs/AnalysesCoreApi.md#get_analysis_bytes) | **GET** /v3/analyses/{analysis_id}/bytes | Get the bytes of a binary *AnalysesCoreApi* | [**get_analysis_function_map**](docs/AnalysesCoreApi.md#get_analysis_function_map) | **GET** /v2/analyses/{analysis_id}/func_maps | Get Analysis Function Map *AnalysesCoreApi* | [**get_analysis_logs**](docs/AnalysesCoreApi.md#get_analysis_logs) | **GET** /v2/analyses/{analysis_id}/logs | Gets the logs of an analysis @@ -88,14 +89,14 @@ Class | Method | HTTP request | Description *AuthenticationUsersApi* | [**submit_user_feedback**](docs/AuthenticationUsersApi.md#submit_user_feedback) | **POST** /v2/users/feedback | Submit feedback about the application *BinariesApi* | [**download_zipped_binary**](docs/BinariesApi.md#download_zipped_binary) | **GET** /v2/binaries/{binary_id}/download-zipped | Downloads a zipped binary with password protection *BinariesApi* | [**get_binary_additional_details**](docs/BinariesApi.md#get_binary_additional_details) | **GET** /v2/binaries/{binary_id}/additional-details | Gets the additional details of a binary +*BinariesApi* | [**get_binary_additional_details_0**](docs/BinariesApi.md#get_binary_additional_details_0) | **GET** /v3/binaries/{binary_id}/additional-details | Get additional details for a binary. *BinariesApi* | [**get_binary_additional_details_status**](docs/BinariesApi.md#get_binary_additional_details_status) | **GET** /v2/binaries/{binary_id}/additional-details/status | Gets the status of the additional details task for a binary +*BinariesApi* | [**get_binary_additional_details_status_0**](docs/BinariesApi.md#get_binary_additional_details_status_0) | **GET** /v3/binaries/{binary_id}/additional-details/status | Get the additional-details extraction status for a binary. *BinariesApi* | [**get_binary_details**](docs/BinariesApi.md#get_binary_details) | **GET** /v2/binaries/{binary_id}/details | Gets the details of a binary *BinariesApi* | [**get_binary_die_info**](docs/BinariesApi.md#get_binary_die_info) | **GET** /v2/binaries/{binary_id}/die-info | Gets the die info of a binary *BinariesApi* | [**get_binary_externals**](docs/BinariesApi.md#get_binary_externals) | **GET** /v2/binaries/{binary_id}/externals | Gets the external details of a binary *BinariesApi* | [**get_binary_related_status**](docs/BinariesApi.md#get_binary_related_status) | **GET** /v2/binaries/{binary_id}/related/status | Gets the status of the unpack binary task for a binary *BinariesApi* | [**get_related_binaries**](docs/BinariesApi.md#get_related_binaries) | **GET** /v2/binaries/{binary_id}/related | Gets the related binaries of a binary. -*BinariesCoreApi* | [**get_binary_additional_details**](docs/BinariesCoreApi.md#get_binary_additional_details) | **GET** /v3/binaries/{binary_id}/additional-details | Get additional details for a binary. -*BinariesCoreApi* | [**get_binary_additional_details_status**](docs/BinariesCoreApi.md#get_binary_additional_details_status) | **GET** /v3/binaries/{binary_id}/additional-details/status | Get the additional-details extraction status for a binary. *CollectionsApi* | [**create_collection**](docs/CollectionsApi.md#create_collection) | **POST** /v2/collections | Creates new collection information *CollectionsApi* | [**delete_collection**](docs/CollectionsApi.md#delete_collection) | **DELETE** /v2/collections/{collection_id} | Deletes a collection *CollectionsApi* | [**get_collection**](docs/CollectionsApi.md#get_collection) | **GET** /v2/collections/{collection_id} | Returns a collection @@ -192,6 +193,7 @@ Class | Method | HTTP request | Description - [AiDecompilationTaskStatus](docs/AiDecompilationTaskStatus.md) - [AiUnstripRequest](docs/AiUnstripRequest.md) - [AnalysisAccessInfo](docs/AnalysisAccessInfo.md) + - [AnalysisBasicInfoOutputBody](docs/AnalysisBasicInfoOutputBody.md) - [AnalysisBulkAddTagsRequest](docs/AnalysisBulkAddTagsRequest.md) - [AnalysisBulkAddTagsResponse](docs/AnalysisBulkAddTagsResponse.md) - [AnalysisBulkAddTagsResponseItem](docs/AnalysisBulkAddTagsResponseItem.md) @@ -344,7 +346,9 @@ Class | Method | HTTP request | Description - [ConversationContext](docs/ConversationContext.md) - [ConversationWithEvents](docs/ConversationWithEvents.md) - [CreateAIDecompOutputBody](docs/CreateAIDecompOutputBody.md) + - [CreateCheckoutSessionInputBody](docs/CreateCheckoutSessionInputBody.md) - [CreateConversationRequest](docs/CreateConversationRequest.md) + - [CreatePortalSessionInputBody](docs/CreatePortalSessionInputBody.md) - [Created](docs/Created.md) - [DecompFailedEvent](docs/DecompFailedEvent.md) - [DecompFinishedEvent](docs/DecompFinishedEvent.md) @@ -449,7 +453,9 @@ Class | Method | HTTP request | Description - [GetAiDecompilationRatingResponse](docs/GetAiDecompilationRatingResponse.md) - [GetAiDecompilationTask](docs/GetAiDecompilationTask.md) - [GetAnalysisStringsStatusOutputBody](docs/GetAnalysisStringsStatusOutputBody.md) + - [GetProductsOutputBody](docs/GetProductsOutputBody.md) - [GetPublicUserResponse](docs/GetPublicUserResponse.md) + - [GetSubscriptionOutputBody](docs/GetSubscriptionOutputBody.md) - [GlobalVariable](docs/GlobalVariable.md) - [HistoryEntry](docs/HistoryEntry.md) - [HttpRequest](docs/HttpRequest.md) @@ -486,11 +492,15 @@ Class | Method | HTTP request | Description - [Params](docs/Params.md) - [PatchCommentBody](docs/PatchCommentBody.md) - [Platform](docs/Platform.md) + - [PriceOutput](docs/PriceOutput.md) + - [PriceSummary](docs/PriceSummary.md) - [ProcessActivityEntry](docs/ProcessActivityEntry.md) - [ProcessExtractedFiles](docs/ProcessExtractedFiles.md) - [ProcessMemdumps](docs/ProcessMemdumps.md) - [ProcessNode](docs/ProcessNode.md) - [ProcessTree](docs/ProcessTree.md) + - [ProductOutput](docs/ProductOutput.md) + - [ProductSummary](docs/ProductSummary.md) - [ProgressMessage](docs/ProgressMessage.md) - [ProseEvent](docs/ProseEvent.md) - [PutAnalysisStringsRequest](docs/PutAnalysisStringsRequest.md) @@ -522,6 +532,7 @@ Class | Method | HTTP request | Description - [SegmentInfo](docs/SegmentInfo.md) - [SendMessageRequest](docs/SendMessageRequest.md) - [ServiceEntry](docs/ServiceEntry.md) + - [SessionOutputBody](docs/SessionOutputBody.md) - [SingleCodeCertificateModel](docs/SingleCodeCertificateModel.md) - [SingleCodeSignatureModel](docs/SingleCodeSignatureModel.md) - [SinglePDBEntryModel](docs/SinglePDBEntryModel.md) diff --git a/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index fc84b634..1fa0d9dc 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**create_analysis**](AnalysesCoreApi.md#create_analysis) | **POST** /v2/analyses | Create Analysis [**delete_analysis**](AnalysesCoreApi.md#delete_analysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis [**get_analysis_basic_info**](AnalysesCoreApi.md#get_analysis_basic_info) | **GET** /v2/analyses/{analysis_id}/basic | Gets basic analysis information +[**get_analysis_basic_info_0**](AnalysesCoreApi.md#get_analysis_basic_info_0) | **GET** /v3/analyses/{analysis_id}/basic | Get basic analysis information [**get_analysis_bytes**](AnalysesCoreApi.md#get_analysis_bytes) | **GET** /v3/analyses/{analysis_id}/bytes | Get the bytes of a binary [**get_analysis_function_map**](AnalysesCoreApi.md#get_analysis_function_map) | **GET** /v2/analyses/{analysis_id}/func_maps | Get Analysis Function Map [**get_analysis_logs**](AnalysesCoreApi.md#get_analysis_logs) | **GET** /v2/analyses/{analysis_id}/logs | Gets the logs of an analysis @@ -362,6 +363,93 @@ 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) +# **get_analysis_basic_info_0** +> AnalysisBasicInfoOutputBody get_analysis_basic_info_0(analysis_id) + +Get basic analysis information + +Returns basic metadata for the given analysis including binary details, model, owner, and function count. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.analysis_basic_info_output_body import AnalysisBasicInfoOutputBody +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AnalysesCoreApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get basic analysis information + api_response = api_instance.get_analysis_basic_info_0(analysis_id) + print("The response of AnalysesCoreApi->get_analysis_basic_info_0:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->get_analysis_basic_info_0: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**AnalysisBasicInfoOutputBody**](AnalysisBasicInfoOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_analysis_bytes** > get_analysis_bytes(analysis_id, page=page) diff --git a/docs/AnalysisBasicInfoOutputBody.md b/docs/AnalysisBasicInfoOutputBody.md new file mode 100644 index 00000000..70bb2e1b --- /dev/null +++ b/docs/AnalysisBasicInfoOutputBody.md @@ -0,0 +1,46 @@ +# AnalysisBasicInfoOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**analysis_scope** | **str** | PUBLIC, PRIVATE, or TEAM | +**base_address** | **int** | Base address of the binary, null when unknown | +**binary_id** | **int** | Binary ID | +**binary_name** | **str** | Binary filename | +**binary_size** | **int** | Binary size in bytes | +**binary_uuid** | **str** | UUID of the binary, omitted when not set | [optional] +**creation** | **datetime** | When the binary was uploaded | +**debug** | **bool** | True when the binary was analysed with debug symbols | +**function_count** | **int** | Number of functions in the binary | +**is_advanced** | **bool** | True when the analysis was run in advanced mode | +**is_owner** | **bool** | True when the caller is the analysis owner | +**is_system** | **bool** | True when the analysis is owned by a system user | +**model_id** | **int** | Model ID | +**model_name** | **str** | Model used for analysis | +**owner_username** | **str** | Username of the analysis owner | +**sequencer_version** | **str** | Sequencer version, omitted when not set | [optional] +**sha_256_hash** | **str** | SHA-256 hash of the binary | +**team_id** | **int** | Team ID of the analysis | + +## Example + +```python +from revengai.models.analysis_basic_info_output_body import AnalysisBasicInfoOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisBasicInfoOutputBody from a JSON string +analysis_basic_info_output_body_instance = AnalysisBasicInfoOutputBody.from_json(json) +# print the JSON string representation of the object +print(AnalysisBasicInfoOutputBody.to_json()) + +# convert the object into a dict +analysis_basic_info_output_body_dict = analysis_basic_info_output_body_instance.to_dict() +# create an instance of AnalysisBasicInfoOutputBody from a dict +analysis_basic_info_output_body_from_dict = AnalysisBasicInfoOutputBody.from_dict(analysis_basic_info_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BinariesApi.md b/docs/BinariesApi.md index d7b4504b..643919a2 100644 --- a/docs/BinariesApi.md +++ b/docs/BinariesApi.md @@ -6,7 +6,9 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**download_zipped_binary**](BinariesApi.md#download_zipped_binary) | **GET** /v2/binaries/{binary_id}/download-zipped | Downloads a zipped binary with password protection [**get_binary_additional_details**](BinariesApi.md#get_binary_additional_details) | **GET** /v2/binaries/{binary_id}/additional-details | Gets the additional details of a binary +[**get_binary_additional_details_0**](BinariesApi.md#get_binary_additional_details_0) | **GET** /v3/binaries/{binary_id}/additional-details | Get additional details for a binary. [**get_binary_additional_details_status**](BinariesApi.md#get_binary_additional_details_status) | **GET** /v2/binaries/{binary_id}/additional-details/status | Gets the status of the additional details task for a binary +[**get_binary_additional_details_status_0**](BinariesApi.md#get_binary_additional_details_status_0) | **GET** /v3/binaries/{binary_id}/additional-details/status | Get the additional-details extraction status for a binary. [**get_binary_details**](BinariesApi.md#get_binary_details) | **GET** /v2/binaries/{binary_id}/details | Gets the details of a binary [**get_binary_die_info**](BinariesApi.md#get_binary_die_info) | **GET** /v2/binaries/{binary_id}/die-info | Gets the die info of a binary [**get_binary_externals**](BinariesApi.md#get_binary_externals) | **GET** /v2/binaries/{binary_id}/externals | Gets the external details of a binary @@ -169,6 +171,93 @@ 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) +# **get_binary_additional_details_0** +> GetAdditionalDetailsOutputBody get_binary_additional_details_0(binary_id) + +Get additional details for a binary. + +Returns structured metadata extracted by the additional-details pipeline for the given binary. Returns `null` for `details` when the pipeline has not yet run. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.get_additional_details_output_body import GetAdditionalDetailsOutputBody +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.BinariesApi(api_client) + binary_id = 56 # int | Binary ID + + try: + # Get additional details for a binary. + api_response = api_instance.get_binary_additional_details_0(binary_id) + print("The response of BinariesApi->get_binary_additional_details_0:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BinariesApi->get_binary_additional_details_0: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **binary_id** | **int**| Binary ID | + +### Return type + +[**GetAdditionalDetailsOutputBody**](GetAdditionalDetailsOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_binary_additional_details_status** > BaseResponseAdditionalDetailsStatusResponse get_binary_additional_details_status(binary_id) @@ -247,6 +336,93 @@ 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) +# **get_binary_additional_details_status_0** +> GetAdditionalDetailsStatusOutputBody get_binary_additional_details_status_0(binary_id) + +Get the additional-details extraction status for a binary. + +Returns the status of the additional-details extraction task. 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 + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.get_additional_details_status_output_body import GetAdditionalDetailsStatusOutputBody +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.BinariesApi(api_client) + binary_id = 56 # int | Binary ID + + try: + # Get the additional-details extraction status for a binary. + api_response = api_instance.get_binary_additional_details_status_0(binary_id) + print("The response of BinariesApi->get_binary_additional_details_status_0:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BinariesApi->get_binary_additional_details_status_0: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **binary_id** | **int**| Binary ID | + +### Return type + +[**GetAdditionalDetailsStatusOutputBody**](GetAdditionalDetailsStatusOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_binary_details** > BaseResponseBinaryDetailsResponse get_binary_details(binary_id) diff --git a/docs/BinariesCoreApi.md b/docs/BinariesCoreApi.md deleted file mode 100644 index e1559a87..00000000 --- a/docs/BinariesCoreApi.md +++ /dev/null @@ -1,184 +0,0 @@ -# revengai.BinariesCoreApi - -All URIs are relative to *https://api.reveng.ai* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_binary_additional_details**](BinariesCoreApi.md#get_binary_additional_details) | **GET** /v3/binaries/{binary_id}/additional-details | Get additional details for a binary. -[**get_binary_additional_details_status**](BinariesCoreApi.md#get_binary_additional_details_status) | **GET** /v3/binaries/{binary_id}/additional-details/status | Get the additional-details extraction status for a binary. - - -# **get_binary_additional_details** -> GetAdditionalDetailsOutputBody get_binary_additional_details(binary_id) - -Get additional details for a binary. - -Returns structured metadata extracted by the additional-details pipeline for the given binary. Returns `null` for `details` when the pipeline has not yet run. - -**Error codes:** -- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found -- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.get_additional_details_output_body import GetAdditionalDetailsOutputBody -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.BinariesCoreApi(api_client) - binary_id = 56 # int | Binary ID - - try: - # Get additional details for a binary. - api_response = api_instance.get_binary_additional_details(binary_id) - print("The response of BinariesCoreApi->get_binary_additional_details:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling BinariesCoreApi->get_binary_additional_details: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **binary_id** | **int**| Binary ID | - -### Return type - -[**GetAdditionalDetailsOutputBody**](GetAdditionalDetailsOutputBody.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**422** | Unprocessable Entity | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_binary_additional_details_status** -> GetAdditionalDetailsStatusOutputBody get_binary_additional_details_status(binary_id) - -Get the additional-details extraction status for a binary. - -Returns the status of the additional-details extraction task. 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 - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.get_additional_details_status_output_body import GetAdditionalDetailsStatusOutputBody -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.BinariesCoreApi(api_client) - binary_id = 56 # int | Binary ID - - try: - # Get the additional-details extraction status for a binary. - api_response = api_instance.get_binary_additional_details_status(binary_id) - print("The response of BinariesCoreApi->get_binary_additional_details_status:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling BinariesCoreApi->get_binary_additional_details_status: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **binary_id** | **int**| Binary ID | - -### Return type - -[**GetAdditionalDetailsStatusOutputBody**](GetAdditionalDetailsStatusOutputBody.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**422** | Unprocessable Entity | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/CreateCheckoutSessionInputBody.md b/docs/CreateCheckoutSessionInputBody.md new file mode 100644 index 00000000..6b4e5f6e --- /dev/null +++ b/docs/CreateCheckoutSessionInputBody.md @@ -0,0 +1,31 @@ +# CreateCheckoutSessionInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cancel_url** | **str** | URL to redirect to on cancel. | +**price_id** | **str** | Price ID from /v3/billing/products. | +**success_url** | **str** | URL to redirect to on success. | + +## Example + +```python +from revengai.models.create_checkout_session_input_body import CreateCheckoutSessionInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateCheckoutSessionInputBody from a JSON string +create_checkout_session_input_body_instance = CreateCheckoutSessionInputBody.from_json(json) +# print the JSON string representation of the object +print(CreateCheckoutSessionInputBody.to_json()) + +# convert the object into a dict +create_checkout_session_input_body_dict = create_checkout_session_input_body_instance.to_dict() +# create an instance of CreateCheckoutSessionInputBody from a dict +create_checkout_session_input_body_from_dict = CreateCheckoutSessionInputBody.from_dict(create_checkout_session_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreatePortalSessionInputBody.md b/docs/CreatePortalSessionInputBody.md new file mode 100644 index 00000000..a13abedb --- /dev/null +++ b/docs/CreatePortalSessionInputBody.md @@ -0,0 +1,29 @@ +# CreatePortalSessionInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**return_url** | **str** | URL the user returns to. | + +## Example + +```python +from revengai.models.create_portal_session_input_body import CreatePortalSessionInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreatePortalSessionInputBody from a JSON string +create_portal_session_input_body_instance = CreatePortalSessionInputBody.from_json(json) +# print the JSON string representation of the object +print(CreatePortalSessionInputBody.to_json()) + +# convert the object into a dict +create_portal_session_input_body_dict = create_portal_session_input_body_instance.to_dict() +# create an instance of CreatePortalSessionInputBody from a dict +create_portal_session_input_body_from_dict = CreatePortalSessionInputBody.from_dict(create_portal_session_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetProductsOutputBody.md b/docs/GetProductsOutputBody.md new file mode 100644 index 00000000..873cd94a --- /dev/null +++ b/docs/GetProductsOutputBody.md @@ -0,0 +1,29 @@ +# GetProductsOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**products** | [**List[ProductOutput]**](ProductOutput.md) | List of available products | + +## Example + +```python +from revengai.models.get_products_output_body import GetProductsOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of GetProductsOutputBody from a JSON string +get_products_output_body_instance = GetProductsOutputBody.from_json(json) +# print the JSON string representation of the object +print(GetProductsOutputBody.to_json()) + +# convert the object into a dict +get_products_output_body_dict = get_products_output_body_instance.to_dict() +# create an instance of GetProductsOutputBody from a dict +get_products_output_body_from_dict = GetProductsOutputBody.from_dict(get_products_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetSubscriptionOutputBody.md b/docs/GetSubscriptionOutputBody.md new file mode 100644 index 00000000..4fb6c9f2 --- /dev/null +++ b/docs/GetSubscriptionOutputBody.md @@ -0,0 +1,34 @@ +# GetSubscriptionOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ends_at** | **datetime** | Date access ends (CANCELING only). | [optional] +**price** | [**PriceSummary**](PriceSummary.md) | Current price (ACTIVE / CANCELING / PAYMENT_ISSUE only). | [optional] +**product** | [**ProductSummary**](ProductSummary.md) | Subscribed product (ACTIVE / CANCELING / PAYMENT_ISSUE only). | [optional] +**renews_at** | **datetime** | Next billing date (ACTIVE only). | [optional] +**status** | **str** | Subscription state. | +**tier** | **str** | User's effective tier. | + +## Example + +```python +from revengai.models.get_subscription_output_body import GetSubscriptionOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of GetSubscriptionOutputBody from a JSON string +get_subscription_output_body_instance = GetSubscriptionOutputBody.from_json(json) +# print the JSON string representation of the object +print(GetSubscriptionOutputBody.to_json()) + +# convert the object into a dict +get_subscription_output_body_dict = get_subscription_output_body_instance.to_dict() +# create an instance of GetSubscriptionOutputBody from a dict +get_subscription_output_body_from_dict = GetSubscriptionOutputBody.from_dict(get_subscription_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PriceOutput.md b/docs/PriceOutput.md new file mode 100644 index 00000000..31760e07 --- /dev/null +++ b/docs/PriceOutput.md @@ -0,0 +1,32 @@ +# PriceOutput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Lowercase ISO 4217 currency code (e.g. \"usd\", \"gbp\"). | +**id** | **str** | Price ID. | +**interval** | **str** | Billing interval at which the price recurs. | +**unit_amount** | **int** | Price per billing interval, expressed in the smallest unit of the currency (e.g. cents for USD, pence for GBP). | + +## Example + +```python +from revengai.models.price_output import PriceOutput + +# TODO update the JSON string below +json = "{}" +# create an instance of PriceOutput from a JSON string +price_output_instance = PriceOutput.from_json(json) +# print the JSON string representation of the object +print(PriceOutput.to_json()) + +# convert the object into a dict +price_output_dict = price_output_instance.to_dict() +# create an instance of PriceOutput from a dict +price_output_from_dict = PriceOutput.from_dict(price_output_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PriceSummary.md b/docs/PriceSummary.md new file mode 100644 index 00000000..ff473a83 --- /dev/null +++ b/docs/PriceSummary.md @@ -0,0 +1,31 @@ +# PriceSummary + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **str** | Lowercase ISO 4217 currency code. | +**interval** | **str** | Billing interval at which the price recurs. | +**unit_amount** | **int** | Price per billing interval, in the smallest unit of the currency. | + +## Example + +```python +from revengai.models.price_summary import PriceSummary + +# TODO update the JSON string below +json = "{}" +# create an instance of PriceSummary from a JSON string +price_summary_instance = PriceSummary.from_json(json) +# print the JSON string representation of the object +print(PriceSummary.to_json()) + +# convert the object into a dict +price_summary_dict = price_summary_instance.to_dict() +# create an instance of PriceSummary from a dict +price_summary_from_dict = PriceSummary.from_dict(price_summary_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProductOutput.md b/docs/ProductOutput.md new file mode 100644 index 00000000..67440d33 --- /dev/null +++ b/docs/ProductOutput.md @@ -0,0 +1,35 @@ +# ProductOutput + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**credits_per_month** | **int** | Credits awarded per billing month, if applicable. | [optional] +**description** | **str** | Human-readable product description. | +**features** | **List[str]** | Marketing feature list for this product. | +**id** | **str** | Product ID. | +**name** | **str** | Human-readable product name. | +**prices** | [**List[PriceOutput]**](PriceOutput.md) | All active recurring prices for this product. | +**tier** | **str** | User tier associated with this product, if any. | [optional] + +## Example + +```python +from revengai.models.product_output import ProductOutput + +# TODO update the JSON string below +json = "{}" +# create an instance of ProductOutput from a JSON string +product_output_instance = ProductOutput.from_json(json) +# print the JSON string representation of the object +print(ProductOutput.to_json()) + +# convert the object into a dict +product_output_dict = product_output_instance.to_dict() +# create an instance of ProductOutput from a dict +product_output_from_dict = ProductOutput.from_dict(product_output_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProductSummary.md b/docs/ProductSummary.md new file mode 100644 index 00000000..6f61e9b8 --- /dev/null +++ b/docs/ProductSummary.md @@ -0,0 +1,29 @@ +# ProductSummary + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Product name. | + +## Example + +```python +from revengai.models.product_summary import ProductSummary + +# TODO update the JSON string below +json = "{}" +# create an instance of ProductSummary from a JSON string +product_summary_instance = ProductSummary.from_json(json) +# print the JSON string representation of the object +print(ProductSummary.to_json()) + +# convert the object into a dict +product_summary_dict = product_summary_instance.to_dict() +# create an instance of ProductSummary from a dict +product_summary_from_dict = ProductSummary.from_dict(product_summary_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SessionOutputBody.md b/docs/SessionOutputBody.md new file mode 100644 index 00000000..a9b8abca --- /dev/null +++ b/docs/SessionOutputBody.md @@ -0,0 +1,29 @@ +# SessionOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | Hosted session URL to redirect the user to. | + +## Example + +```python +from revengai.models.session_output_body import SessionOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of SessionOutputBody from a JSON string +session_output_body_instance = SessionOutputBody.from_json(json) +# print the JSON string representation of the object +print(SessionOutputBody.to_json()) + +# convert the object into a dict +session_output_body_dict = session_output_body_instance.to_dict() +# create an instance of SessionOutputBody from a dict +session_output_body_from_dict = SessionOutputBody.from_dict(session_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/revengai/__init__.py b/revengai/__init__.py index 36e3a1fa..1b9ddd8d 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v3.86.8" +__version__ = "v3.87.0" # Define package exports __all__ = [ @@ -25,7 +25,6 @@ "AnalysesXRefsApi", "AuthenticationUsersApi", "BinariesApi", - "BinariesCoreApi", "CollectionsApi", "ConfigApi", "ConversationsApi", @@ -57,6 +56,7 @@ "AiDecompilationTaskStatus", "AiUnstripRequest", "AnalysisAccessInfo", + "AnalysisBasicInfoOutputBody", "AnalysisBulkAddTagsRequest", "AnalysisBulkAddTagsResponse", "AnalysisBulkAddTagsResponseItem", @@ -209,7 +209,9 @@ "ConversationContext", "ConversationWithEvents", "CreateAIDecompOutputBody", + "CreateCheckoutSessionInputBody", "CreateConversationRequest", + "CreatePortalSessionInputBody", "Created", "DecompFailedEvent", "DecompFinishedEvent", @@ -314,7 +316,9 @@ "GetAiDecompilationRatingResponse", "GetAiDecompilationTask", "GetAnalysisStringsStatusOutputBody", + "GetProductsOutputBody", "GetPublicUserResponse", + "GetSubscriptionOutputBody", "GlobalVariable", "HistoryEntry", "HttpRequest", @@ -351,11 +355,15 @@ "Params", "PatchCommentBody", "Platform", + "PriceOutput", + "PriceSummary", "ProcessActivityEntry", "ProcessExtractedFiles", "ProcessMemdumps", "ProcessNode", "ProcessTree", + "ProductOutput", + "ProductSummary", "ProgressMessage", "ProseEvent", "PutAnalysisStringsRequest", @@ -387,6 +395,7 @@ "SegmentInfo", "SendMessageRequest", "ServiceEntry", + "SessionOutputBody", "SingleCodeCertificateModel", "SingleCodeSignatureModel", "SinglePDBEntryModel", @@ -463,7 +472,6 @@ from revengai.api.analyses_x_refs_api import AnalysesXRefsApi as AnalysesXRefsApi from revengai.api.authentication_users_api import AuthenticationUsersApi as AuthenticationUsersApi from revengai.api.binaries_api import BinariesApi as BinariesApi -from revengai.api.binaries_core_api import BinariesCoreApi as BinariesCoreApi from revengai.api.collections_api import CollectionsApi as CollectionsApi from revengai.api.config_api import ConfigApi as ConfigApi from revengai.api.conversations_api import ConversationsApi as ConversationsApi @@ -499,6 +507,7 @@ from revengai.models.ai_decompilation_task_status import AiDecompilationTaskStatus as AiDecompilationTaskStatus from revengai.models.ai_unstrip_request import AiUnstripRequest as AiUnstripRequest from revengai.models.analysis_access_info import AnalysisAccessInfo as AnalysisAccessInfo +from revengai.models.analysis_basic_info_output_body import AnalysisBasicInfoOutputBody as AnalysisBasicInfoOutputBody from revengai.models.analysis_bulk_add_tags_request import AnalysisBulkAddTagsRequest as AnalysisBulkAddTagsRequest from revengai.models.analysis_bulk_add_tags_response import AnalysisBulkAddTagsResponse as AnalysisBulkAddTagsResponse from revengai.models.analysis_bulk_add_tags_response_item import AnalysisBulkAddTagsResponseItem as AnalysisBulkAddTagsResponseItem @@ -651,7 +660,9 @@ from revengai.models.conversation_context import ConversationContext as ConversationContext from revengai.models.conversation_with_events import ConversationWithEvents as ConversationWithEvents from revengai.models.create_ai_decomp_output_body import CreateAIDecompOutputBody as CreateAIDecompOutputBody +from revengai.models.create_checkout_session_input_body import CreateCheckoutSessionInputBody as CreateCheckoutSessionInputBody from revengai.models.create_conversation_request import CreateConversationRequest as CreateConversationRequest +from revengai.models.create_portal_session_input_body import CreatePortalSessionInputBody as CreatePortalSessionInputBody from revengai.models.created import Created as Created from revengai.models.decomp_failed_event import DecompFailedEvent as DecompFailedEvent from revengai.models.decomp_finished_event import DecompFinishedEvent as DecompFinishedEvent @@ -756,7 +767,9 @@ from revengai.models.get_ai_decompilation_rating_response import GetAiDecompilationRatingResponse as GetAiDecompilationRatingResponse from revengai.models.get_ai_decompilation_task import GetAiDecompilationTask as GetAiDecompilationTask from revengai.models.get_analysis_strings_status_output_body import GetAnalysisStringsStatusOutputBody as GetAnalysisStringsStatusOutputBody +from revengai.models.get_products_output_body import GetProductsOutputBody as GetProductsOutputBody from revengai.models.get_public_user_response import GetPublicUserResponse as GetPublicUserResponse +from revengai.models.get_subscription_output_body import GetSubscriptionOutputBody as GetSubscriptionOutputBody from revengai.models.global_variable import GlobalVariable as GlobalVariable from revengai.models.history_entry import HistoryEntry as HistoryEntry from revengai.models.http_request import HttpRequest as HttpRequest @@ -793,11 +806,15 @@ from revengai.models.params import Params as Params from revengai.models.patch_comment_body import PatchCommentBody as PatchCommentBody from revengai.models.platform import Platform as Platform +from revengai.models.price_output import PriceOutput as PriceOutput +from revengai.models.price_summary import PriceSummary as PriceSummary from revengai.models.process_activity_entry import ProcessActivityEntry as ProcessActivityEntry from revengai.models.process_extracted_files import ProcessExtractedFiles as ProcessExtractedFiles from revengai.models.process_memdumps import ProcessMemdumps as ProcessMemdumps from revengai.models.process_node import ProcessNode as ProcessNode from revengai.models.process_tree import ProcessTree as ProcessTree +from revengai.models.product_output import ProductOutput as ProductOutput +from revengai.models.product_summary import ProductSummary as ProductSummary from revengai.models.progress_message import ProgressMessage as ProgressMessage from revengai.models.prose_event import ProseEvent as ProseEvent from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest as PutAnalysisStringsRequest @@ -829,6 +846,7 @@ from revengai.models.segment_info import SegmentInfo as SegmentInfo from revengai.models.send_message_request import SendMessageRequest as SendMessageRequest from revengai.models.service_entry import ServiceEntry as ServiceEntry +from revengai.models.session_output_body import SessionOutputBody as SessionOutputBody from revengai.models.single_code_certificate_model import SingleCodeCertificateModel as SingleCodeCertificateModel from revengai.models.single_code_signature_model import SingleCodeSignatureModel as SingleCodeSignatureModel from revengai.models.single_pdb_entry_model import SinglePDBEntryModel as SinglePDBEntryModel diff --git a/revengai/api/__init__.py b/revengai/api/__init__.py index d9454bac..2367c642 100644 --- a/revengai/api/__init__.py +++ b/revengai/api/__init__.py @@ -9,7 +9,6 @@ from revengai.api.analyses_x_refs_api import AnalysesXRefsApi from revengai.api.authentication_users_api import AuthenticationUsersApi from revengai.api.binaries_api import BinariesApi -from revengai.api.binaries_core_api import BinariesCoreApi from revengai.api.collections_api import CollectionsApi from revengai.api.config_api import ConfigApi from revengai.api.conversations_api import ConversationsApi diff --git a/revengai/api/analyses_core_api.py b/revengai/api/analyses_core_api.py index 69d7ca0e..5f3612d5 100644 --- a/revengai/api/analyses_core_api.py +++ b/revengai/api/analyses_core_api.py @@ -19,6 +19,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated from revengai.models.add_user_string_input_body import AddUserStringInputBody +from revengai.models.analysis_basic_info_output_body import AnalysisBasicInfoOutputBody from revengai.models.analysis_create_request import AnalysisCreateRequest from revengai.models.analysis_update_request import AnalysisUpdateRequest from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest @@ -1200,6 +1201,279 @@ def _get_analysis_basic_info_serialize( + @validate_call + def get_analysis_basic_info_0( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AnalysisBasicInfoOutputBody: + """Get basic analysis information + + Returns basic metadata for the given analysis including binary details, model, owner, and function count. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: 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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_analysis_basic_info_0_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AnalysisBasicInfoOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_analysis_basic_info_0_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AnalysisBasicInfoOutputBody]: + """Get basic analysis information + + Returns basic metadata for the given analysis including binary details, model, owner, and function count. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: 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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_analysis_basic_info_0_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AnalysisBasicInfoOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_analysis_basic_info_0_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get basic analysis information + + Returns basic metadata for the given analysis including binary details, model, owner, and function count. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: 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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_analysis_basic_info_0_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AnalysisBasicInfoOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_analysis_basic_info_0_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/analyses/{analysis_id}/basic', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_analysis_bytes( self, diff --git a/revengai/api/binaries_api.py b/revengai/api/binaries_api.py index 356fb188..2cad8d51 100644 --- a/revengai/api/binaries_api.py +++ b/revengai/api/binaries_api.py @@ -15,8 +15,9 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictBytes, StrictInt, StrictStr +from pydantic import Field, StrictBytes, StrictInt, StrictStr from typing import Tuple, Union +from typing_extensions import Annotated from revengai.models.base_response_additional_details_status_response import BaseResponseAdditionalDetailsStatusResponse from revengai.models.base_response_binaries_related_status_response import BaseResponseBinariesRelatedStatusResponse from revengai.models.base_response_binary_additional_response import BaseResponseBinaryAdditionalResponse @@ -24,6 +25,8 @@ from revengai.models.base_response_binary_externals_response import BaseResponseBinaryExternalsResponse from revengai.models.base_response_child_binaries_response import BaseResponseChildBinariesResponse from revengai.models.base_response_list_die_match import BaseResponseListDieMatch +from revengai.models.get_additional_details_output_body import GetAdditionalDetailsOutputBody +from revengai.models.get_additional_details_status_output_body import GetAdditionalDetailsStatusOutputBody from revengai.api_client import ApiClient, RequestSerialized from revengai.api_response import ApiResponse @@ -566,6 +569,279 @@ def _get_binary_additional_details_serialize( + @validate_call + def get_binary_additional_details_0( + self, + binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetAdditionalDetailsOutputBody: + """Get additional details for a binary. + + Returns structured metadata extracted by the additional-details pipeline for the given binary. Returns `null` for `details` when the pipeline has not yet run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param binary_id: Binary ID (required) + :type binary_id: 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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_binary_additional_details_0_serialize( + binary_id=binary_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetAdditionalDetailsOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_binary_additional_details_0_with_http_info( + self, + binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetAdditionalDetailsOutputBody]: + """Get additional details for a binary. + + Returns structured metadata extracted by the additional-details pipeline for the given binary. Returns `null` for `details` when the pipeline has not yet run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param binary_id: Binary ID (required) + :type binary_id: 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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_binary_additional_details_0_serialize( + binary_id=binary_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetAdditionalDetailsOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_binary_additional_details_0_without_preload_content( + self, + binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get additional details for a binary. + + Returns structured metadata extracted by the additional-details pipeline for the given binary. Returns `null` for `details` when the pipeline has not yet run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param binary_id: Binary ID (required) + :type binary_id: 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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_binary_additional_details_0_serialize( + binary_id=binary_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetAdditionalDetailsOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_binary_additional_details_0_serialize( + self, + binary_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if binary_id is not None: + _path_params['binary_id'] = binary_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/binaries/{binary_id}/additional-details', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_binary_additional_details_status( self, @@ -827,6 +1103,279 @@ def _get_binary_additional_details_status_serialize( + @validate_call + def get_binary_additional_details_status_0( + self, + binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetAdditionalDetailsStatusOutputBody: + """Get the additional-details extraction status for a binary. + + Returns the status of the additional-details extraction task. 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 + + :param binary_id: Binary ID (required) + :type binary_id: 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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_binary_additional_details_status_0_serialize( + binary_id=binary_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetAdditionalDetailsStatusOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_binary_additional_details_status_0_with_http_info( + self, + binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetAdditionalDetailsStatusOutputBody]: + """Get the additional-details extraction status for a binary. + + Returns the status of the additional-details extraction task. 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 + + :param binary_id: Binary ID (required) + :type binary_id: 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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_binary_additional_details_status_0_serialize( + binary_id=binary_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetAdditionalDetailsStatusOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_binary_additional_details_status_0_without_preload_content( + self, + binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the additional-details extraction status for a binary. + + Returns the status of the additional-details extraction task. 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 + + :param binary_id: Binary ID (required) + :type binary_id: 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 + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_binary_additional_details_status_0_serialize( + binary_id=binary_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetAdditionalDetailsStatusOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_binary_additional_details_status_0_serialize( + self, + binary_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if binary_id is not None: + _path_params['binary_id'] = binary_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/binaries/{binary_id}/additional-details/status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_binary_details( self, diff --git a/revengai/api/binaries_core_api.py b/revengai/api/binaries_core_api.py deleted file mode 100644 index c869ed37..00000000 --- a/revengai/api/binaries_core_api.py +++ /dev/null @@ -1,584 +0,0 @@ -# coding: utf-8 - -""" - 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. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field -from typing_extensions import Annotated -from revengai.models.get_additional_details_output_body import GetAdditionalDetailsOutputBody -from revengai.models.get_additional_details_status_output_body import GetAdditionalDetailsStatusOutputBody - -from revengai.api_client import ApiClient, RequestSerialized -from revengai.api_response import ApiResponse -from revengai.rest import RESTResponseType - - -class BinariesCoreApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def get_binary_additional_details( - self, - binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetAdditionalDetailsOutputBody: - """Get additional details for a binary. - - Returns structured metadata extracted by the additional-details pipeline for the given binary. Returns `null` for `details` when the pipeline has not yet run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - - :param binary_id: Binary ID (required) - :type binary_id: 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 - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_binary_additional_details_serialize( - binary_id=binary_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAdditionalDetailsOutputBody", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_binary_additional_details_with_http_info( - self, - binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetAdditionalDetailsOutputBody]: - """Get additional details for a binary. - - Returns structured metadata extracted by the additional-details pipeline for the given binary. Returns `null` for `details` when the pipeline has not yet run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - - :param binary_id: Binary ID (required) - :type binary_id: 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 - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_binary_additional_details_serialize( - binary_id=binary_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAdditionalDetailsOutputBody", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_binary_additional_details_without_preload_content( - self, - binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get additional details for a binary. - - Returns structured metadata extracted by the additional-details pipeline for the given binary. Returns `null` for `details` when the pipeline has not yet run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - - :param binary_id: Binary ID (required) - :type binary_id: 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 - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_binary_additional_details_serialize( - binary_id=binary_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAdditionalDetailsOutputBody", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_binary_additional_details_serialize( - self, - binary_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if binary_id is not None: - _path_params['binary_id'] = binary_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v3/binaries/{binary_id}/additional-details', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_binary_additional_details_status( - self, - binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetAdditionalDetailsStatusOutputBody: - """Get the additional-details extraction status for a binary. - - Returns the status of the additional-details extraction task. 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 - - :param binary_id: Binary ID (required) - :type binary_id: 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 - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_binary_additional_details_status_serialize( - binary_id=binary_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAdditionalDetailsStatusOutputBody", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_binary_additional_details_status_with_http_info( - self, - binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetAdditionalDetailsStatusOutputBody]: - """Get the additional-details extraction status for a binary. - - Returns the status of the additional-details extraction task. 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 - - :param binary_id: Binary ID (required) - :type binary_id: 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 - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_binary_additional_details_status_serialize( - binary_id=binary_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAdditionalDetailsStatusOutputBody", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_binary_additional_details_status_without_preload_content( - self, - binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get the additional-details extraction status for a binary. - - Returns the status of the additional-details extraction task. 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 - - :param binary_id: Binary ID (required) - :type binary_id: 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 - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_binary_additional_details_status_serialize( - binary_id=binary_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetAdditionalDetailsStatusOutputBody", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_binary_additional_details_status_serialize( - self, - binary_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if binary_id is not None: - _path_params['binary_id'] = binary_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v3/binaries/{binary_id}/additional-details/status', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/revengai/api/functions_core_api.py b/revengai/api/functions_core_api.py index 40751963..f4c75515 100644 --- a/revengai/api/functions_core_api.py +++ b/revengai/api/functions_core_api.py @@ -2363,7 +2363,7 @@ def get_analysis_strings( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseAnalysisStringsResponse: - """Get string information found in the Analysis + """(Deprecated) Get string information found in the Analysis Get string information found in the analysis @@ -2402,6 +2402,7 @@ def get_analysis_strings( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/functions/strings is deprecated.", DeprecationWarning) _param = self._get_analysis_strings_serialize( analysis_id=analysis_id, @@ -2455,7 +2456,7 @@ def get_analysis_strings_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseAnalysisStringsResponse]: - """Get string information found in the Analysis + """(Deprecated) Get string information found in the Analysis Get string information found in the analysis @@ -2494,6 +2495,7 @@ def get_analysis_strings_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/functions/strings is deprecated.", DeprecationWarning) _param = self._get_analysis_strings_serialize( analysis_id=analysis_id, @@ -2547,7 +2549,7 @@ def get_analysis_strings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get string information found in the Analysis + """(Deprecated) Get string information found in the Analysis Get string information found in the analysis @@ -2586,6 +2588,7 @@ def get_analysis_strings_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/functions/strings is deprecated.", DeprecationWarning) _param = self._get_analysis_strings_serialize( analysis_id=analysis_id, @@ -2723,7 +2726,7 @@ def get_analysis_strings_status( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseAnalysisStringsStatusResponse: - """Get string processing state for the Analysis + """(Deprecated) Get string processing state for the Analysis Get string processing state for the Analysis @@ -2750,6 +2753,7 @@ def get_analysis_strings_status( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/functions/strings/status is deprecated.", DeprecationWarning) _param = self._get_analysis_strings_status_serialize( analysis_id=analysis_id, @@ -2791,7 +2795,7 @@ def get_analysis_strings_status_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseAnalysisStringsStatusResponse]: - """Get string processing state for the Analysis + """(Deprecated) Get string processing state for the Analysis Get string processing state for the Analysis @@ -2818,6 +2822,7 @@ def get_analysis_strings_status_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/functions/strings/status is deprecated.", DeprecationWarning) _param = self._get_analysis_strings_status_serialize( analysis_id=analysis_id, @@ -2859,7 +2864,7 @@ def get_analysis_strings_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get string processing state for the Analysis + """(Deprecated) Get string processing state for the Analysis Get string processing state for the Analysis @@ -2886,6 +2891,7 @@ def get_analysis_strings_status_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/functions/strings/status is deprecated.", DeprecationWarning) _param = self._get_analysis_strings_status_serialize( analysis_id=analysis_id, @@ -4307,7 +4313,7 @@ def get_function_strings( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseFunctionStringsResponse: - """Get string information found in the function + """(Deprecated) Get string information found in the function Get string information found in the function @@ -4340,6 +4346,7 @@ def get_function_strings( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/functions/{function_id}/strings is deprecated.", DeprecationWarning) _param = self._get_function_strings_serialize( function_id=function_id, @@ -4387,7 +4394,7 @@ def get_function_strings_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseFunctionStringsResponse]: - """Get string information found in the function + """(Deprecated) Get string information found in the function Get string information found in the function @@ -4420,6 +4427,7 @@ def get_function_strings_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/functions/{function_id}/strings is deprecated.", DeprecationWarning) _param = self._get_function_strings_serialize( function_id=function_id, @@ -4467,7 +4475,7 @@ def get_function_strings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get string information found in the function + """(Deprecated) Get string information found in the function Get string information found in the function @@ -4500,6 +4508,7 @@ def get_function_strings_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/functions/{function_id}/strings is deprecated.", DeprecationWarning) _param = self._get_function_strings_serialize( function_id=function_id, diff --git a/revengai/api_client.py b/revengai/api_client.py index 8bec8e18..219a4511 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.86.8/python' + self.user_agent = 'OpenAPI-Generator/v3.87.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 01106a77..d52a702d 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -533,8 +533,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.86.8\n"\ - "SDK Package Version: v3.86.8".\ + "Version of the API: v3.87.0\n"\ + "SDK Package Version: v3.87.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/revengai/models/__init__.py b/revengai/models/__init__.py index a9cf1b19..6e3f2cbf 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -22,6 +22,7 @@ from revengai.models.ai_decompilation_task_status import AiDecompilationTaskStatus from revengai.models.ai_unstrip_request import AiUnstripRequest from revengai.models.analysis_access_info import AnalysisAccessInfo +from revengai.models.analysis_basic_info_output_body import AnalysisBasicInfoOutputBody from revengai.models.analysis_bulk_add_tags_request import AnalysisBulkAddTagsRequest from revengai.models.analysis_bulk_add_tags_response import AnalysisBulkAddTagsResponse from revengai.models.analysis_bulk_add_tags_response_item import AnalysisBulkAddTagsResponseItem @@ -174,7 +175,9 @@ from revengai.models.conversation_context import ConversationContext from revengai.models.conversation_with_events import ConversationWithEvents from revengai.models.create_ai_decomp_output_body import CreateAIDecompOutputBody +from revengai.models.create_checkout_session_input_body import CreateCheckoutSessionInputBody from revengai.models.create_conversation_request import CreateConversationRequest +from revengai.models.create_portal_session_input_body import CreatePortalSessionInputBody from revengai.models.created import Created from revengai.models.decomp_failed_event import DecompFailedEvent from revengai.models.decomp_finished_event import DecompFinishedEvent @@ -279,7 +282,9 @@ from revengai.models.get_ai_decompilation_rating_response import GetAiDecompilationRatingResponse from revengai.models.get_ai_decompilation_task import GetAiDecompilationTask from revengai.models.get_analysis_strings_status_output_body import GetAnalysisStringsStatusOutputBody +from revengai.models.get_products_output_body import GetProductsOutputBody from revengai.models.get_public_user_response import GetPublicUserResponse +from revengai.models.get_subscription_output_body import GetSubscriptionOutputBody from revengai.models.global_variable import GlobalVariable from revengai.models.history_entry import HistoryEntry from revengai.models.http_request import HttpRequest @@ -316,11 +321,15 @@ from revengai.models.params import Params from revengai.models.patch_comment_body import PatchCommentBody from revengai.models.platform import Platform +from revengai.models.price_output import PriceOutput +from revengai.models.price_summary import PriceSummary from revengai.models.process_activity_entry import ProcessActivityEntry from revengai.models.process_extracted_files import ProcessExtractedFiles from revengai.models.process_memdumps import ProcessMemdumps from revengai.models.process_node import ProcessNode from revengai.models.process_tree import ProcessTree +from revengai.models.product_output import ProductOutput +from revengai.models.product_summary import ProductSummary from revengai.models.progress_message import ProgressMessage from revengai.models.prose_event import ProseEvent from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest @@ -352,6 +361,7 @@ from revengai.models.segment_info import SegmentInfo from revengai.models.send_message_request import SendMessageRequest from revengai.models.service_entry import ServiceEntry +from revengai.models.session_output_body import SessionOutputBody from revengai.models.single_code_certificate_model import SingleCodeCertificateModel from revengai.models.single_code_signature_model import SingleCodeSignatureModel from revengai.models.single_pdb_entry_model import SinglePDBEntryModel diff --git a/revengai/models/analysis_basic_info_output_body.py b/revengai/models/analysis_basic_info_output_body.py new file mode 100644 index 00000000..1c8c38b5 --- /dev/null +++ b/revengai/models/analysis_basic_info_output_body.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisBasicInfoOutputBody(BaseModel): + """ + AnalysisBasicInfoOutputBody + """ # noqa: E501 + analysis_scope: StrictStr = Field(description="PUBLIC, PRIVATE, or TEAM") + base_address: Optional[StrictInt] = Field(description="Base address of the binary, null when unknown") + binary_id: StrictInt = Field(description="Binary ID") + binary_name: StrictStr = Field(description="Binary filename") + binary_size: StrictInt = Field(description="Binary size in bytes") + binary_uuid: Optional[StrictStr] = Field(default=None, description="UUID of the binary, omitted when not set") + creation: datetime = Field(description="When the binary was uploaded") + debug: StrictBool = Field(description="True when the binary was analysed with debug symbols") + function_count: StrictInt = Field(description="Number of functions in the binary") + is_advanced: StrictBool = Field(description="True when the analysis was run in advanced mode") + is_owner: StrictBool = Field(description="True when the caller is the analysis owner") + is_system: StrictBool = Field(description="True when the analysis is owned by a system user") + model_id: StrictInt = Field(description="Model ID") + model_name: StrictStr = Field(description="Model used for analysis") + owner_username: StrictStr = Field(description="Username of the analysis owner") + sequencer_version: Optional[StrictStr] = Field(default=None, description="Sequencer version, omitted when not set") + sha_256_hash: StrictStr = Field(description="SHA-256 hash of the binary") + team_id: StrictInt = Field(description="Team ID of the analysis") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["analysis_scope", "base_address", "binary_id", "binary_name", "binary_size", "binary_uuid", "creation", "debug", "function_count", "is_advanced", "is_owner", "is_system", "model_id", "model_name", "owner_username", "sequencer_version", "sha_256_hash", "team_id"] + + @field_validator('analysis_scope') + def analysis_scope_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['PRIVATE', 'PUBLIC', 'TEAM', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('PRIVATE', 'PUBLIC', 'TEAM', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AnalysisBasicInfoOutputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if base_address (nullable) is None + # and model_fields_set contains the field + if self.base_address is None and "base_address" in self.model_fields_set: + _dict['base_address'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalysisBasicInfoOutputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "analysis_scope": obj.get("analysis_scope"), + "base_address": obj.get("base_address"), + "binary_id": obj.get("binary_id"), + "binary_name": obj.get("binary_name"), + "binary_size": obj.get("binary_size"), + "binary_uuid": obj.get("binary_uuid"), + "creation": obj.get("creation"), + "debug": obj.get("debug"), + "function_count": obj.get("function_count"), + "is_advanced": obj.get("is_advanced"), + "is_owner": obj.get("is_owner"), + "is_system": obj.get("is_system"), + "model_id": obj.get("model_id"), + "model_name": obj.get("model_name"), + "owner_username": obj.get("owner_username"), + "sequencer_version": obj.get("sequencer_version"), + "sha_256_hash": obj.get("sha_256_hash"), + "team_id": obj.get("team_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/create_checkout_session_input_body.py b/revengai/models/create_checkout_session_input_body.py new file mode 100644 index 00000000..8fa22e5f --- /dev/null +++ b/revengai/models/create_checkout_session_input_body.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreateCheckoutSessionInputBody(BaseModel): + """ + CreateCheckoutSessionInputBody + """ # noqa: E501 + cancel_url: Annotated[str, Field(min_length=1, strict=True, max_length=2048)] = Field(description="URL to redirect to on cancel.") + price_id: Annotated[str, Field(min_length=6, strict=True, max_length=255)] = Field(description="Price ID from /v3/billing/products.") + success_url: Annotated[str, Field(min_length=1, strict=True, max_length=2048)] = Field(description="URL to redirect to on success.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["cancel_url", "price_id", "success_url"] + + @field_validator('cancel_url') + def cancel_url_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^https?:\/\/[a-zA-Z0-9]([a-zA-Z0-9.-]*[a-zA-Z0-9])+(:[0-9]{1,5})?(\/.*)?$", value): + raise ValueError(r"must validate the regular expression /^https?:\/\/[a-zA-Z0-9]([a-zA-Z0-9.-]*[a-zA-Z0-9])+(:[0-9]{1,5})?(\/.*)?$/") + return value + + @field_validator('price_id') + def price_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^price_[A-Za-z0-9]+$", value): + raise ValueError(r"must validate the regular expression /^price_[A-Za-z0-9]+$/") + return value + + @field_validator('success_url') + def success_url_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^https?:\/\/[a-zA-Z0-9]([a-zA-Z0-9.-]*[a-zA-Z0-9])+(:[0-9]{1,5})?(\/.*)?$", value): + raise ValueError(r"must validate the regular expression /^https?:\/\/[a-zA-Z0-9]([a-zA-Z0-9.-]*[a-zA-Z0-9])+(:[0-9]{1,5})?(\/.*)?$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateCheckoutSessionInputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateCheckoutSessionInputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cancel_url": obj.get("cancel_url"), + "price_id": obj.get("price_id"), + "success_url": obj.get("success_url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/create_portal_session_input_body.py b/revengai/models/create_portal_session_input_body.py new file mode 100644 index 00000000..8d1abd62 --- /dev/null +++ b/revengai/models/create_portal_session_input_body.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class CreatePortalSessionInputBody(BaseModel): + """ + CreatePortalSessionInputBody + """ # noqa: E501 + return_url: Annotated[str, Field(min_length=1, strict=True, max_length=2048)] = Field(description="URL the user returns to.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["return_url"] + + @field_validator('return_url') + def return_url_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^https?:\/\/[a-zA-Z0-9]([a-zA-Z0-9.-]*[a-zA-Z0-9])+(:[0-9]{1,5})?(\/.*)?$", value): + raise ValueError(r"must validate the regular expression /^https?:\/\/[a-zA-Z0-9]([a-zA-Z0-9.-]*[a-zA-Z0-9])+(:[0-9]{1,5})?(\/.*)?$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreatePortalSessionInputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreatePortalSessionInputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "return_url": obj.get("return_url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/error_body.py b/revengai/models/error_body.py index 92f736fd..caf95edd 100644 --- a/revengai/models/error_body.py +++ b/revengai/models/error_body.py @@ -36,8 +36,8 @@ class ErrorBody(BaseModel): @field_validator('code') def code_validate_enum(cls, value): """Validates the enum""" - if value not in set(['ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api']): - raise ValueError("must be one of enum values ('ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api')") + if value not in set(['ACCESS_DENIED', 'AGENT_BUDGET_EXCEEDED', 'AGENT_DEFINITION_NOT_FOUND', 'AGENT_INVALID_STARTING_INPUT', 'AGENT_MEMORY_INVALID_SCOPE', 'AGENT_MEMORY_NOT_FOUND', 'AGENT_MEMORY_VERSION_CONFLICT', 'AGENT_NO_PENDING_QUESTION', 'AGENT_RUN_NOT_FOUND', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('ACCESS_DENIED', 'AGENT_BUDGET_EXCEEDED', 'AGENT_DEFINITION_NOT_FOUND', 'AGENT_INVALID_STARTING_INPUT', 'AGENT_MEMORY_INVALID_SCOPE', 'AGENT_MEMORY_NOT_FOUND', 'AGENT_MEMORY_VERSION_CONFLICT', 'AGENT_NO_PENDING_QUESTION', 'AGENT_RUN_NOT_FOUND', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api')") return value model_config = ConfigDict( diff --git a/revengai/models/get_products_output_body.py b/revengai/models/get_products_output_body.py new file mode 100644 index 00000000..0ee8fd5d --- /dev/null +++ b/revengai/models/get_products_output_body.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.product_output import ProductOutput +from typing import Optional, Set +from typing_extensions import Self + +class GetProductsOutputBody(BaseModel): + """ + GetProductsOutputBody + """ # noqa: E501 + products: Optional[List[ProductOutput]] = Field(description="List of available products") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["products"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetProductsOutputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in products (list) + _items = [] + if self.products: + for _item_products in self.products: + if _item_products: + _items.append(_item_products.to_dict()) + _dict['products'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if products (nullable) is None + # and model_fields_set contains the field + if self.products is None and "products" in self.model_fields_set: + _dict['products'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetProductsOutputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "products": [ProductOutput.from_dict(_item) for _item in obj["products"]] if obj.get("products") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/get_subscription_output_body.py b/revengai/models/get_subscription_output_body.py new file mode 100644 index 00000000..08b7c872 --- /dev/null +++ b/revengai/models/get_subscription_output_body.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.price_summary import PriceSummary +from revengai.models.product_summary import ProductSummary +from typing import Optional, Set +from typing_extensions import Self + +class GetSubscriptionOutputBody(BaseModel): + """ + GetSubscriptionOutputBody + """ # noqa: E501 + ends_at: Optional[datetime] = Field(default=None, description="Date access ends (CANCELING only).") + price: Optional[PriceSummary] = Field(default=None, description="Current price (ACTIVE / CANCELING / PAYMENT_ISSUE only).") + product: Optional[ProductSummary] = Field(default=None, description="Subscribed product (ACTIVE / CANCELING / PAYMENT_ISSUE only).") + renews_at: Optional[datetime] = Field(default=None, description="Next billing date (ACTIVE only).") + status: StrictStr = Field(description="Subscription state.") + tier: StrictStr = Field(description="User's effective tier.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ends_at", "price", "product", "renews_at", "status", "tier"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ACTIVE', 'CANCELING', 'PAYMENT_ISSUE', 'NONE', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('ACTIVE', 'CANCELING', 'PAYMENT_ISSUE', 'NONE', 'unknown_default_open_api')") + return value + + @field_validator('tier') + def tier_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ENTHUSIAST', 'REVERSER', 'VULNERABILITY_HUNTER', 'MALWARE_ANALYST', 'SECURITY_RESEARCHER', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('ENTHUSIAST', 'REVERSER', 'VULNERABILITY_HUNTER', 'MALWARE_ANALYST', 'SECURITY_RESEARCHER', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetSubscriptionOutputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of price + if self.price: + _dict['price'] = self.price.to_dict() + # override the default output from pydantic by calling `to_dict()` of product + if self.product: + _dict['product'] = self.product.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetSubscriptionOutputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ends_at": obj.get("ends_at"), + "price": PriceSummary.from_dict(obj["price"]) if obj.get("price") is not None else None, + "product": ProductSummary.from_dict(obj["product"]) if obj.get("product") is not None else None, + "renews_at": obj.get("renews_at"), + "status": obj.get("status"), + "tier": obj.get("tier") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/price_output.py b/revengai/models/price_output.py new file mode 100644 index 00000000..d8d00be1 --- /dev/null +++ b/revengai/models/price_output.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class PriceOutput(BaseModel): + """ + PriceOutput + """ # noqa: E501 + currency: StrictStr = Field(description="Lowercase ISO 4217 currency code (e.g. \"usd\", \"gbp\").") + id: StrictStr = Field(description="Price ID.") + interval: StrictStr = Field(description="Billing interval at which the price recurs.") + unit_amount: StrictInt = Field(description="Price per billing interval, expressed in the smallest unit of the currency (e.g. cents for USD, pence for GBP).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["currency", "id", "interval", "unit_amount"] + + @field_validator('interval') + def interval_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['month', 'year', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('month', 'year', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PriceOutput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PriceOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "currency": obj.get("currency"), + "id": obj.get("id"), + "interval": obj.get("interval"), + "unit_amount": obj.get("unit_amount") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/price_summary.py b/revengai/models/price_summary.py new file mode 100644 index 00000000..3f477f56 --- /dev/null +++ b/revengai/models/price_summary.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class PriceSummary(BaseModel): + """ + PriceSummary + """ # noqa: E501 + currency: StrictStr = Field(description="Lowercase ISO 4217 currency code.") + interval: StrictStr = Field(description="Billing interval at which the price recurs.") + unit_amount: StrictInt = Field(description="Price per billing interval, in the smallest unit of the currency.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["currency", "interval", "unit_amount"] + + @field_validator('interval') + def interval_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['month', 'year', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('month', 'year', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PriceSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PriceSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "currency": obj.get("currency"), + "interval": obj.get("interval"), + "unit_amount": obj.get("unit_amount") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/product_output.py b/revengai/models/product_output.py new file mode 100644 index 00000000..52bba1ad --- /dev/null +++ b/revengai/models/product_output.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.price_output import PriceOutput +from typing import Optional, Set +from typing_extensions import Self + +class ProductOutput(BaseModel): + """ + ProductOutput + """ # noqa: E501 + credits_per_month: Optional[StrictInt] = Field(default=None, description="Credits awarded per billing month, if applicable.") + description: StrictStr = Field(description="Human-readable product description.") + features: Optional[List[StrictStr]] = Field(description="Marketing feature list for this product.") + id: StrictStr = Field(description="Product ID.") + name: StrictStr = Field(description="Human-readable product name.") + prices: Optional[List[PriceOutput]] = Field(description="All active recurring prices for this product.") + tier: Optional[StrictStr] = Field(default=None, description="User tier associated with this product, if any.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["credits_per_month", "description", "features", "id", "name", "prices", "tier"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProductOutput from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in prices (list) + _items = [] + if self.prices: + for _item_prices in self.prices: + if _item_prices: + _items.append(_item_prices.to_dict()) + _dict['prices'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if features (nullable) is None + # and model_fields_set contains the field + if self.features is None and "features" in self.model_fields_set: + _dict['features'] = None + + # set to None if prices (nullable) is None + # and model_fields_set contains the field + if self.prices is None and "prices" in self.model_fields_set: + _dict['prices'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProductOutput from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "credits_per_month": obj.get("credits_per_month"), + "description": obj.get("description"), + "features": obj.get("features"), + "id": obj.get("id"), + "name": obj.get("name"), + "prices": [PriceOutput.from_dict(_item) for _item in obj["prices"]] if obj.get("prices") is not None else None, + "tier": obj.get("tier") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/product_summary.py b/revengai/models/product_summary.py new file mode 100644 index 00000000..30b14b3c --- /dev/null +++ b/revengai/models/product_summary.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ProductSummary(BaseModel): + """ + ProductSummary + """ # noqa: E501 + name: StrictStr = Field(description="Product name.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProductSummary from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProductSummary from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/session_output_body.py b/revengai/models/session_output_body.py new file mode 100644 index 00000000..a98925e7 --- /dev/null +++ b/revengai/models/session_output_body.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SessionOutputBody(BaseModel): + """ + SessionOutputBody + """ # noqa: E501 + url: StrictStr = Field(description="Hosted session URL to redirect the user to.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SessionOutputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SessionOutputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + +