diff --git a/.sdk-version b/.sdk-version index 338a4a1..8f8c6ff 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.84.0 +v3.85.0 diff --git a/README.md b/README.md index 03528a1..919dec2 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,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_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 *AnalysesCoreApi* | [**get_analysis_params**](docs/AnalysesCoreApi.md#get_analysis_params) | **GET** /v2/analyses/{analysis_id}/params | Gets analysis param information @@ -116,6 +117,7 @@ Class | Method | HTTP request | Description *FunctionsAIDecompilationApi* | [**create_ai_decompilation_comment**](docs/FunctionsAIDecompilationApi.md#create_ai_decompilation_comment) | **POST** /v2/functions/{function_id}/ai-decompilation/comments | Create a comment for this function *FunctionsAIDecompilationApi* | [**create_ai_decompilation_task**](docs/FunctionsAIDecompilationApi.md#create_ai_decompilation_task) | **POST** /v2/functions/{function_id}/ai-decompilation | Begins AI Decompilation Process *FunctionsAIDecompilationApi* | [**delete_ai_decompilation_comment**](docs/FunctionsAIDecompilationApi.md#delete_ai_decompilation_comment) | **DELETE** /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} | Delete a comment +*FunctionsAIDecompilationApi* | [**delete_ai_decompilation_inline_comment**](docs/FunctionsAIDecompilationApi.md#delete_ai_decompilation_inline_comment) | **DELETE** /v3/functions/{function_id}/ai-decompilation/inline-comments/{line} | Delete a single inline comment *FunctionsAIDecompilationApi* | [**get_ai_decompilation**](docs/FunctionsAIDecompilationApi.md#get_ai_decompilation) | **GET** /v3/functions/{function_id}/ai-decompilation | Get AI decompilation result *FunctionsAIDecompilationApi* | [**get_ai_decompilation_comments**](docs/FunctionsAIDecompilationApi.md#get_ai_decompilation_comments) | **GET** /v2/functions/{function_id}/ai-decompilation/comments | Get comments for this function *FunctionsAIDecompilationApi* | [**get_ai_decompilation_inline_comments**](docs/FunctionsAIDecompilationApi.md#get_ai_decompilation_inline_comments) | **GET** /v3/functions/{function_id}/ai-decompilation/inline-comments | Get AI decompilation inline comments @@ -127,6 +129,7 @@ Class | Method | HTTP request | Description *FunctionsAIDecompilationApi* | [**get_ai_decompilation_task_result**](docs/FunctionsAIDecompilationApi.md#get_ai_decompilation_task_result) | **GET** /v2/functions/{function_id}/ai-decompilation | Polls AI Decompilation Process *FunctionsAIDecompilationApi* | [**get_ai_decompilation_task_status**](docs/FunctionsAIDecompilationApi.md#get_ai_decompilation_task_status) | **GET** /v2/functions/{function_id}/ai-decompilation/status | Check the status of a function ai decompilation *FunctionsAIDecompilationApi* | [**get_ai_decompilation_tokenised**](docs/FunctionsAIDecompilationApi.md#get_ai_decompilation_tokenised) | **GET** /v3/functions/{function_id}/ai-decompilation/tokenised | Get tokenised AI decompilation with function mapping +*FunctionsAIDecompilationApi* | [**patch_ai_decompilation_inline_comment**](docs/FunctionsAIDecompilationApi.md#patch_ai_decompilation_inline_comment) | **PATCH** /v3/functions/{function_id}/ai-decompilation/inline-comments | Update a single inline comment *FunctionsAIDecompilationApi* | [**regenerate_ai_decompilation_inline_comments**](docs/FunctionsAIDecompilationApi.md#regenerate_ai_decompilation_inline_comments) | **POST** /v3/functions/{function_id}/ai-decompilation/inline-comments | Regenerate AI decompilation inline comments *FunctionsAIDecompilationApi* | [**regenerate_ai_decompilation_summary**](docs/FunctionsAIDecompilationApi.md#regenerate_ai_decompilation_summary) | **POST** /v3/functions/{function_id}/ai-decompilation/summary | Regenerate AI decompilation summary *FunctionsAIDecompilationApi* | [**update_ai_decompilation_comment**](docs/FunctionsAIDecompilationApi.md#update_ai_decompilation_comment) | **PATCH** /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} | Update a comment @@ -162,8 +165,8 @@ Class | Method | HTTP request | Description *FunctionsRenamingHistoryApi* | [**revert_function_name_0**](docs/FunctionsRenamingHistoryApi.md#revert_function_name_0) | **POST** /v3/functions/{function_id}/history/{history_id}/revert | Revert function name *ModelsApi* | [**get_models**](docs/ModelsApi.md#get_models) | **GET** /v2/models | Gets models *ReportsApi* | [**create_pdf_report**](docs/ReportsApi.md#create_pdf_report) | **POST** /v3/analyses/{analysis_id}/pdf | Start PDF report generation -*ReportsApi* | [**download_pdf_report**](docs/ReportsApi.md#download_pdf_report) | **GET** /v3/analyses/{analysis_id}/pdf/{task_id} | Download generated PDF report -*ReportsApi* | [**get_pdf_report_status**](docs/ReportsApi.md#get_pdf_report_status) | **GET** /v3/analyses/{analysis_id}/pdf/{task_id}/status | Get PDF report workflow status +*ReportsApi* | [**download_pdf_report**](docs/ReportsApi.md#download_pdf_report) | **GET** /v3/analyses/{analysis_id}/pdf | Download generated PDF report +*ReportsApi* | [**get_pdf_report_status**](docs/ReportsApi.md#get_pdf_report_status) | **GET** /v3/analyses/{analysis_id}/pdf/status | Get PDF report workflow status *SearchApi* | [**search_binaries**](docs/SearchApi.md#search_binaries) | **GET** /v2/search/binaries | Binaries search *SearchApi* | [**search_collections**](docs/SearchApi.md#search_collections) | **GET** /v2/search/collections | Collections search *SearchApi* | [**search_functions**](docs/SearchApi.md#search_functions) | **GET** /v2/search/functions | Functions search @@ -449,6 +452,7 @@ Class | Method | HTTP request | Description - [PEModel](docs/PEModel.md) - [PaginationModel](docs/PaginationModel.md) - [Params](docs/Params.md) + - [PatchCommentBody](docs/PatchCommentBody.md) - [Platform](docs/Platform.md) - [ProcessActivityEntry](docs/ProcessActivityEntry.md) - [ProcessMemdumps](docs/ProcessMemdumps.md) diff --git a/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index e5499b4..643c054 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -7,6 +7,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_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 [**get_analysis_params**](AnalysesCoreApi.md#get_analysis_params) | **GET** /v2/analyses/{analysis_id}/params | Gets analysis param information @@ -269,6 +270,94 @@ 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_bytes** +> get_analysis_bytes(analysis_id, page=page) + +Get the bytes of a binary + +Returns a 64kb byte page from the binary. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +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 + page = 56 # int | 64kb page of binary data (optional) + + try: + # Get the bytes of a binary + api_instance.get_analysis_bytes(analysis_id, page=page) + except Exception as e: + print("Exception when calling AnalysesCoreApi->get_analysis_bytes: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + **page** | **int**| 64kb page of binary data | [optional] + +### Return type + +void (empty response body) + +### 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 | - | +**400** | Bad Request | - | +**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_function_map** > BaseResponseAnalysisFunctionMapping get_analysis_function_map(analysis_id) diff --git a/docs/FunctionsAIDecompilationApi.md b/docs/FunctionsAIDecompilationApi.md index 99fcec9..380906b 100644 --- a/docs/FunctionsAIDecompilationApi.md +++ b/docs/FunctionsAIDecompilationApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**create_ai_decompilation_comment**](FunctionsAIDecompilationApi.md#create_ai_decompilation_comment) | **POST** /v2/functions/{function_id}/ai-decompilation/comments | Create a comment for this function [**create_ai_decompilation_task**](FunctionsAIDecompilationApi.md#create_ai_decompilation_task) | **POST** /v2/functions/{function_id}/ai-decompilation | Begins AI Decompilation Process [**delete_ai_decompilation_comment**](FunctionsAIDecompilationApi.md#delete_ai_decompilation_comment) | **DELETE** /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} | Delete a comment +[**delete_ai_decompilation_inline_comment**](FunctionsAIDecompilationApi.md#delete_ai_decompilation_inline_comment) | **DELETE** /v3/functions/{function_id}/ai-decompilation/inline-comments/{line} | Delete a single inline comment [**get_ai_decompilation**](FunctionsAIDecompilationApi.md#get_ai_decompilation) | **GET** /v3/functions/{function_id}/ai-decompilation | Get AI decompilation result [**get_ai_decompilation_comments**](FunctionsAIDecompilationApi.md#get_ai_decompilation_comments) | **GET** /v2/functions/{function_id}/ai-decompilation/comments | Get comments for this function [**get_ai_decompilation_inline_comments**](FunctionsAIDecompilationApi.md#get_ai_decompilation_inline_comments) | **GET** /v3/functions/{function_id}/ai-decompilation/inline-comments | Get AI decompilation inline comments @@ -19,6 +20,7 @@ Method | HTTP request | Description [**get_ai_decompilation_task_result**](FunctionsAIDecompilationApi.md#get_ai_decompilation_task_result) | **GET** /v2/functions/{function_id}/ai-decompilation | Polls AI Decompilation Process [**get_ai_decompilation_task_status**](FunctionsAIDecompilationApi.md#get_ai_decompilation_task_status) | **GET** /v2/functions/{function_id}/ai-decompilation/status | Check the status of a function ai decompilation [**get_ai_decompilation_tokenised**](FunctionsAIDecompilationApi.md#get_ai_decompilation_tokenised) | **GET** /v3/functions/{function_id}/ai-decompilation/tokenised | Get tokenised AI decompilation with function mapping +[**patch_ai_decompilation_inline_comment**](FunctionsAIDecompilationApi.md#patch_ai_decompilation_inline_comment) | **PATCH** /v3/functions/{function_id}/ai-decompilation/inline-comments | Update a single inline comment [**regenerate_ai_decompilation_inline_comments**](FunctionsAIDecompilationApi.md#regenerate_ai_decompilation_inline_comments) | **POST** /v3/functions/{function_id}/ai-decompilation/inline-comments | Regenerate AI decompilation inline comments [**regenerate_ai_decompilation_summary**](FunctionsAIDecompilationApi.md#regenerate_ai_decompilation_summary) | **POST** /v3/functions/{function_id}/ai-decompilation/summary | Regenerate AI decompilation summary [**update_ai_decompilation_comment**](FunctionsAIDecompilationApi.md#update_ai_decompilation_comment) | **PATCH** /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} | Update a comment @@ -373,6 +375,95 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **delete_ai_decompilation_inline_comment** +> CommentsData delete_ai_decompilation_inline_comment(function_id, line) + +Delete a single inline comment + +Removes the comment for the given line number. Requires comments to have been generated first. + +**Error codes:** +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.comments_data import CommentsData +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.FunctionsAIDecompilationApi(api_client) + function_id = 56 # int | Function ID + line = 56 # int | Line number of the comment to delete + + try: + # Delete a single inline comment + api_response = api_instance.delete_ai_decompilation_inline_comment(function_id, line) + print("The response of FunctionsAIDecompilationApi->delete_ai_decompilation_inline_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsAIDecompilationApi->delete_ai_decompilation_inline_comment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| Function ID | + **line** | **int**| Line number of the comment to delete | + +### Return type + +[**CommentsData**](CommentsData.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_ai_decompilation** > DecompilationData get_ai_decompilation(function_id) @@ -1308,6 +1399,96 @@ 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) +# **patch_ai_decompilation_inline_comment** +> CommentsData patch_ai_decompilation_inline_comment(function_id, patch_comment_body) + +Update a single inline comment + +Merges a single line comment into the existing AI-generated inline comments. Requires comments to have been generated first. + +**Error codes:** +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.comments_data import CommentsData +from revengai.models.patch_comment_body import PatchCommentBody +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.FunctionsAIDecompilationApi(api_client) + function_id = 56 # int | Function ID + patch_comment_body = revengai.PatchCommentBody() # PatchCommentBody | + + try: + # Update a single inline comment + api_response = api_instance.patch_ai_decompilation_inline_comment(function_id, patch_comment_body) + print("The response of FunctionsAIDecompilationApi->patch_ai_decompilation_inline_comment:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsAIDecompilationApi->patch_ai_decompilation_inline_comment: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| Function ID | + **patch_comment_body** | [**PatchCommentBody**](PatchCommentBody.md)| | + +### Return type + +[**CommentsData**](CommentsData.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **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) + # **regenerate_ai_decompilation_inline_comments** > RegenerateOutputBody regenerate_ai_decompilation_inline_comments(function_id) diff --git a/docs/GeneratePDFOutputBody.md b/docs/GeneratePDFOutputBody.md index c56bd1c..e019336 100644 --- a/docs/GeneratePDFOutputBody.md +++ b/docs/GeneratePDFOutputBody.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **already_running** | **bool** | True when an existing PDF generation is in progress for this analysis and user | [optional] -**task_id** | **str** | Workflow task ID — use to poll status and download the PDF | ## Example diff --git a/docs/PatchCommentBody.md b/docs/PatchCommentBody.md new file mode 100644 index 0000000..e814390 --- /dev/null +++ b/docs/PatchCommentBody.md @@ -0,0 +1,30 @@ +# PatchCommentBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**comment** | **str** | Comment text | +**line** | **int** | Line number to set the comment on | + +## Example + +```python +from revengai.models.patch_comment_body import PatchCommentBody + +# TODO update the JSON string below +json = "{}" +# create an instance of PatchCommentBody from a JSON string +patch_comment_body_instance = PatchCommentBody.from_json(json) +# print the JSON string representation of the object +print(PatchCommentBody.to_json()) + +# convert the object into a dict +patch_comment_body_dict = patch_comment_body_instance.to_dict() +# create an instance of PatchCommentBody from a dict +patch_comment_body_from_dict = PatchCommentBody.from_dict(patch_comment_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/ReportsApi.md b/docs/ReportsApi.md index 1db17d4..5b6d452 100644 --- a/docs/ReportsApi.md +++ b/docs/ReportsApi.md @@ -5,8 +5,8 @@ All URIs are relative to *https://api.reveng.ai* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_pdf_report**](ReportsApi.md#create_pdf_report) | **POST** /v3/analyses/{analysis_id}/pdf | Start PDF report generation -[**download_pdf_report**](ReportsApi.md#download_pdf_report) | **GET** /v3/analyses/{analysis_id}/pdf/{task_id} | Download generated PDF report -[**get_pdf_report_status**](ReportsApi.md#get_pdf_report_status) | **GET** /v3/analyses/{analysis_id}/pdf/{task_id}/status | Get PDF report workflow status +[**download_pdf_report**](ReportsApi.md#download_pdf_report) | **GET** /v3/analyses/{analysis_id}/pdf | Download generated PDF report +[**get_pdf_report_status**](ReportsApi.md#get_pdf_report_status) | **GET** /v3/analyses/{analysis_id}/pdf/status | Get PDF report workflow status # **create_pdf_report** @@ -14,7 +14,7 @@ Method | HTTP request | Description Start PDF report generation -Starts an asynchronous PDF report generation workflow for the given analysis. Returns a deterministic task_id used to poll status and download the resulting PDF. Idempotent: if a workflow is already running for this analysis and user, the same task_id is returned with `already_running: true` so the caller can rejoin the in-flight workflow. +Starts an asynchronous PDF report generation workflow for the given analysis. Poll status and download the resulting PDF using the same analysis ID. Idempotent: if a workflow is already running for this analysis and user, the response sets `already_running: true` and the caller rejoins the in-flight workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied @@ -97,11 +97,11 @@ 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) # **download_pdf_report** -> download_pdf_report(analysis_id, task_id) +> download_pdf_report(analysis_id) Download generated PDF report -Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when the task does not exist or the caller is not authorised to see it. +Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied @@ -140,11 +140,10 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.ReportsApi(api_client) analysis_id = 56 # int | Analysis ID - task_id = 'task_id_example' # str | Task ID returned by the create endpoint try: # Download generated PDF report - api_instance.download_pdf_report(analysis_id, task_id) + api_instance.download_pdf_report(analysis_id) except Exception as e: print("Exception when calling ReportsApi->download_pdf_report: %s\n" % e) ``` @@ -157,7 +156,6 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | - **task_id** | **str**| Task ID returned by the create endpoint | ### Return type @@ -186,11 +184,11 @@ void (empty response body) [[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_pdf_report_status** -> WorkflowProgress get_pdf_report_status(analysis_id, task_id) +> WorkflowProgress get_pdf_report_status(analysis_id) Get PDF report workflow status -Returns live workflow progress for the given task. Returns 404 when the task does not exist or the caller is not authorised to see it. +Returns live workflow progress for the given analysis. Returns 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied @@ -228,11 +226,10 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.ReportsApi(api_client) analysis_id = 56 # int | Analysis ID - task_id = 'task_id_example' # str | Task ID returned by the create endpoint try: # Get PDF report workflow status - api_response = api_instance.get_pdf_report_status(analysis_id, task_id) + api_response = api_instance.get_pdf_report_status(analysis_id) print("The response of ReportsApi->get_pdf_report_status:\n") pprint(api_response) except Exception as e: @@ -247,7 +244,6 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | - **task_id** | **str**| Task ID returned by the create endpoint | ### Return type diff --git a/revengai/__init__.py b/revengai/__init__.py index e4002ab..9b53e6b 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v3.84.0" +__version__ = "v3.85.0" # Define package exports __all__ = [ @@ -323,6 +323,7 @@ "PEModel", "PaginationModel", "Params", + "PatchCommentBody", "Platform", "ProcessActivityEntry", "ProcessMemdumps", @@ -731,6 +732,7 @@ from revengai.models.pe_model import PEModel as PEModel from revengai.models.pagination_model import PaginationModel as PaginationModel 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.process_activity_entry import ProcessActivityEntry as ProcessActivityEntry from revengai.models.process_memdumps import ProcessMemdumps as ProcessMemdumps diff --git a/revengai/api/analyses_core_api.py b/revengai/api/analyses_core_api.py index b3cffcf..bafcea6 100644 --- a/revengai/api/analyses_core_api.py +++ b/revengai/api/analyses_core_api.py @@ -896,6 +896,299 @@ def _get_analysis_basic_info_serialize( + @validate_call + def get_analysis_bytes( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + page: Annotated[Optional[Annotated[int, Field(le=16777216, strict=True, ge=0)]], Field(description="64kb page of binary data")] = None, + _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, + ) -> None: + """Get the bytes of a binary + + Returns a 64kb byte page from the binary. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param page: 64kb page of binary data + :type page: 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_bytes_serialize( + analysis_id=analysis_id, + page=page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "APIError", + '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_bytes_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + page: Annotated[Optional[Annotated[int, Field(le=16777216, strict=True, ge=0)]], Field(description="64kb page of binary data")] = None, + _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[None]: + """Get the bytes of a binary + + Returns a 64kb byte page from the binary. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param page: 64kb page of binary data + :type page: 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_bytes_serialize( + analysis_id=analysis_id, + page=page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "APIError", + '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_bytes_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + page: Annotated[Optional[Annotated[int, Field(le=16777216, strict=True, ge=0)]], Field(description="64kb page of binary data")] = None, + _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 bytes of a binary + + Returns a 64kb byte page from the binary. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param page: 64kb page of binary data + :type page: 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_bytes_serialize( + analysis_id=analysis_id, + page=page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "APIError", + '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_bytes_serialize( + self, + analysis_id, + page, + _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 + if page is not None: + + _query_params.append(('page', page)) + + # 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}/bytes', + 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_function_map( self, diff --git a/revengai/api/functions_ai_decompilation_api.py b/revengai/api/functions_ai_decompilation_api.py index 680edf0..6d321fd 100644 --- a/revengai/api/functions_ai_decompilation_api.py +++ b/revengai/api/functions_ai_decompilation_api.py @@ -30,6 +30,7 @@ from revengai.models.create_ai_decomp_output_body import CreateAIDecompOutputBody from revengai.models.decompilation_data import DecompilationData from revengai.models.function_comment_create_request import FunctionCommentCreateRequest +from revengai.models.patch_comment_body import PatchCommentBody from revengai.models.regenerate_output_body import RegenerateOutputBody from revengai.models.regenerate_target import RegenerateTarget from revengai.models.summary_data import SummaryData @@ -1230,9 +1231,10 @@ def _delete_ai_decompilation_comment_serialize( @validate_call - def get_ai_decompilation( + def delete_ai_decompilation_inline_comment( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + line: Annotated[int, Field(strict=True, ge=1, description="Line number of the comment to delete")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1245,13 +1247,15 @@ def get_ai_decompilation( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DecompilationData: - """Get AI decompilation result + ) -> CommentsData: + """Delete a single inline comment - Returns the decompilation source code. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `500` [`INTERNAL_ERROR`](/errors/INTERNAL_ERROR) — Internal Server Error + Removes the comment for the given line number. Requires comments to have been generated first. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int + :param line: Line number of the comment to delete (required) + :type line: 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 @@ -1274,8 +1278,9 @@ def get_ai_decompilation( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_serialize( + _param = self._delete_ai_decompilation_inline_comment_serialize( function_id=function_id, + line=line, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1283,7 +1288,7 @@ def get_ai_decompilation( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DecompilationData", + '200': "CommentsData", '403': "APIError", '404': "APIError", '422': "APIError", @@ -1301,9 +1306,10 @@ def get_ai_decompilation( @validate_call - def get_ai_decompilation_with_http_info( + def delete_ai_decompilation_inline_comment_with_http_info( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + line: Annotated[int, Field(strict=True, ge=1, description="Line number of the comment to delete")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1316,13 +1322,15 @@ def get_ai_decompilation_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DecompilationData]: - """Get AI decompilation result + ) -> ApiResponse[CommentsData]: + """Delete a single inline comment - Returns the decompilation source code. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `500` [`INTERNAL_ERROR`](/errors/INTERNAL_ERROR) — Internal Server Error + Removes the comment for the given line number. Requires comments to have been generated first. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int + :param line: Line number of the comment to delete (required) + :type line: 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 @@ -1345,8 +1353,9 @@ def get_ai_decompilation_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_serialize( + _param = self._delete_ai_decompilation_inline_comment_serialize( function_id=function_id, + line=line, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1354,7 +1363,7 @@ def get_ai_decompilation_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DecompilationData", + '200': "CommentsData", '403': "APIError", '404': "APIError", '422': "APIError", @@ -1372,9 +1381,10 @@ def get_ai_decompilation_with_http_info( @validate_call - def get_ai_decompilation_without_preload_content( + def delete_ai_decompilation_inline_comment_without_preload_content( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + line: Annotated[int, Field(strict=True, ge=1, description="Line number of the comment to delete")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1388,12 +1398,14 @@ def get_ai_decompilation_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get AI decompilation result + """Delete a single inline comment - Returns the decompilation source code. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `500` [`INTERNAL_ERROR`](/errors/INTERNAL_ERROR) — Internal Server Error + Removes the comment for the given line number. Requires comments to have been generated first. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int + :param line: Line number of the comment to delete (required) + :type line: 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 @@ -1416,8 +1428,9 @@ def get_ai_decompilation_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_serialize( + _param = self._delete_ai_decompilation_inline_comment_serialize( function_id=function_id, + line=line, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1425,7 +1438,7 @@ def get_ai_decompilation_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DecompilationData", + '200': "CommentsData", '403': "APIError", '404': "APIError", '422': "APIError", @@ -1438,9 +1451,10 @@ def get_ai_decompilation_without_preload_content( return response_data.response - def _get_ai_decompilation_serialize( + def _delete_ai_decompilation_inline_comment_serialize( self, function_id, + line, _request_auth, _content_type, _headers, @@ -1464,6 +1478,8 @@ def _get_ai_decompilation_serialize( # process the path parameters if function_id is not None: _path_params['function_id'] = function_id + if line is not None: + _path_params['line'] = line # process the query parameters # process the header parameters # process the form parameters @@ -1485,8 +1501,8 @@ def _get_ai_decompilation_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v3/functions/{function_id}/ai-decompilation', + method='DELETE', + resource_path='/v3/functions/{function_id}/ai-decompilation/inline-comments/{line}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1503,9 +1519,9 @@ def _get_ai_decompilation_serialize( @validate_call - def get_ai_decompilation_comments( + def get_ai_decompilation( self, - function_id: StrictInt, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1518,12 +1534,12 @@ def get_ai_decompilation_comments( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseListCommentResponse: - """Get comments for this function + ) -> DecompilationData: + """Get AI decompilation result - Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. + Returns the decompilation source code. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `500` [`INTERNAL_ERROR`](/errors/INTERNAL_ERROR) — Internal Server Error - :param function_id: (required) + :param function_id: Function ID (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1547,7 +1563,7 @@ def get_ai_decompilation_comments( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_comments_serialize( + _param = self._get_ai_decompilation_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1556,8 +1572,11 @@ def get_ai_decompilation_comments( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListCommentResponse", - '422': "BaseResponse", + '200': "DecompilationData", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -1571,9 +1590,9 @@ def get_ai_decompilation_comments( @validate_call - def get_ai_decompilation_comments_with_http_info( + def get_ai_decompilation_with_http_info( self, - function_id: StrictInt, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1586,12 +1605,12 @@ def get_ai_decompilation_comments_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseListCommentResponse]: - """Get comments for this function + ) -> ApiResponse[DecompilationData]: + """Get AI decompilation result - Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. + Returns the decompilation source code. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `500` [`INTERNAL_ERROR`](/errors/INTERNAL_ERROR) — Internal Server Error - :param function_id: (required) + :param function_id: Function ID (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1615,7 +1634,7 @@ def get_ai_decompilation_comments_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_comments_serialize( + _param = self._get_ai_decompilation_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1624,8 +1643,11 @@ def get_ai_decompilation_comments_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListCommentResponse", - '422': "BaseResponse", + '200': "DecompilationData", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -1639,9 +1661,9 @@ def get_ai_decompilation_comments_with_http_info( @validate_call - def get_ai_decompilation_comments_without_preload_content( + def get_ai_decompilation_without_preload_content( self, - function_id: StrictInt, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1655,11 +1677,11 @@ def get_ai_decompilation_comments_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get comments for this function + """Get AI decompilation result - Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. + Returns the decompilation source code. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `500` [`INTERNAL_ERROR`](/errors/INTERNAL_ERROR) — Internal Server Error - :param function_id: (required) + :param function_id: Function ID (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1683,7 +1705,7 @@ def get_ai_decompilation_comments_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_comments_serialize( + _param = self._get_ai_decompilation_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1692,8 +1714,11 @@ def get_ai_decompilation_comments_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListCommentResponse", - '422': "BaseResponse", + '200': "DecompilationData", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -1702,7 +1727,7 @@ def get_ai_decompilation_comments_without_preload_content( return response_data.response - def _get_ai_decompilation_comments_serialize( + def _get_ai_decompilation_serialize( self, function_id, _request_auth, @@ -1750,7 +1775,7 @@ def _get_ai_decompilation_comments_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/functions/{function_id}/ai-decompilation/comments', + resource_path='/v3/functions/{function_id}/ai-decompilation', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1767,9 +1792,9 @@ def _get_ai_decompilation_comments_serialize( @validate_call - def get_ai_decompilation_inline_comments( + def get_ai_decompilation_comments( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + function_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1782,12 +1807,12 @@ def get_ai_decompilation_inline_comments( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CommentsData: - """Get AI decompilation inline comments + ) -> BaseResponseListCommentResponse: + """Get comments for this function - Returns the commented source if available. Returns pending status if comments are still being generated. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. - :param function_id: Function ID (required) + :param function_id: (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1811,7 +1836,7 @@ def get_ai_decompilation_inline_comments( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_inline_comments_serialize( + _param = self._get_ai_decompilation_comments_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1820,11 +1845,8 @@ def get_ai_decompilation_inline_comments( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CommentsData", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseListCommentResponse", + '422': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -1838,9 +1860,9 @@ def get_ai_decompilation_inline_comments( @validate_call - def get_ai_decompilation_inline_comments_with_http_info( + def get_ai_decompilation_comments_with_http_info( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + function_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1853,12 +1875,12 @@ def get_ai_decompilation_inline_comments_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CommentsData]: - """Get AI decompilation inline comments + ) -> ApiResponse[BaseResponseListCommentResponse]: + """Get comments for this function - Returns the commented source if available. Returns pending status if comments are still being generated. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. - :param function_id: Function ID (required) + :param function_id: (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1882,7 +1904,7 @@ def get_ai_decompilation_inline_comments_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_inline_comments_serialize( + _param = self._get_ai_decompilation_comments_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1891,11 +1913,8 @@ def get_ai_decompilation_inline_comments_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CommentsData", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseListCommentResponse", + '422': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -1909,9 +1928,9 @@ def get_ai_decompilation_inline_comments_with_http_info( @validate_call - def get_ai_decompilation_inline_comments_without_preload_content( + def get_ai_decompilation_comments_without_preload_content( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + function_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1925,11 +1944,11 @@ def get_ai_decompilation_inline_comments_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get AI decompilation inline comments + """Get comments for this function - Returns the commented source if available. Returns pending status if comments are still being generated. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. - :param function_id: Function ID (required) + :param function_id: (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1953,7 +1972,7 @@ def get_ai_decompilation_inline_comments_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_inline_comments_serialize( + _param = self._get_ai_decompilation_comments_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1962,11 +1981,8 @@ def get_ai_decompilation_inline_comments_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CommentsData", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseListCommentResponse", + '422': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -1975,7 +1991,7 @@ def get_ai_decompilation_inline_comments_without_preload_content( return response_data.response - def _get_ai_decompilation_inline_comments_serialize( + def _get_ai_decompilation_comments_serialize( self, function_id, _request_auth, @@ -2023,7 +2039,7 @@ def _get_ai_decompilation_inline_comments_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/functions/{function_id}/ai-decompilation/inline-comments', + resource_path='/v2/functions/{function_id}/ai-decompilation/comments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2040,7 +2056,7 @@ def _get_ai_decompilation_inline_comments_serialize( @validate_call - def get_ai_decompilation_inline_comments_status( + def get_ai_decompilation_inline_comments( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -2055,10 +2071,10 @@ def get_ai_decompilation_inline_comments_status( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> WorkflowProgress: - """Get inline comments generation workflow status + ) -> CommentsData: + """Get AI decompilation inline comments - Returns fine-grained progress of the inline comments generation workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the commented source if available. Returns pending status if comments are still being generated. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int @@ -2084,7 +2100,7 @@ def get_ai_decompilation_inline_comments_status( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_inline_comments_status_serialize( + _param = self._get_ai_decompilation_inline_comments_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2093,7 +2109,7 @@ def get_ai_decompilation_inline_comments_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkflowProgress", + '200': "CommentsData", '403': "APIError", '404': "APIError", '422': "APIError", @@ -2111,7 +2127,7 @@ def get_ai_decompilation_inline_comments_status( @validate_call - def get_ai_decompilation_inline_comments_status_with_http_info( + def get_ai_decompilation_inline_comments_with_http_info( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -2126,10 +2142,10 @@ def get_ai_decompilation_inline_comments_status_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[WorkflowProgress]: - """Get inline comments generation workflow status + ) -> ApiResponse[CommentsData]: + """Get AI decompilation inline comments - Returns fine-grained progress of the inline comments generation workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the commented source if available. Returns pending status if comments are still being generated. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int @@ -2155,7 +2171,7 @@ def get_ai_decompilation_inline_comments_status_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_inline_comments_status_serialize( + _param = self._get_ai_decompilation_inline_comments_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2164,7 +2180,7 @@ def get_ai_decompilation_inline_comments_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkflowProgress", + '200': "CommentsData", '403': "APIError", '404': "APIError", '422': "APIError", @@ -2182,7 +2198,7 @@ def get_ai_decompilation_inline_comments_status_with_http_info( @validate_call - def get_ai_decompilation_inline_comments_status_without_preload_content( + def get_ai_decompilation_inline_comments_without_preload_content( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -2198,9 +2214,9 @@ def get_ai_decompilation_inline_comments_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get inline comments generation workflow status + """Get AI decompilation inline comments - Returns fine-grained progress of the inline comments generation workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the commented source if available. Returns pending status if comments are still being generated. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int @@ -2226,7 +2242,7 @@ def get_ai_decompilation_inline_comments_status_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_inline_comments_status_serialize( + _param = self._get_ai_decompilation_inline_comments_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2235,7 +2251,7 @@ def get_ai_decompilation_inline_comments_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkflowProgress", + '200': "CommentsData", '403': "APIError", '404': "APIError", '422': "APIError", @@ -2248,7 +2264,7 @@ def get_ai_decompilation_inline_comments_status_without_preload_content( return response_data.response - def _get_ai_decompilation_inline_comments_status_serialize( + def _get_ai_decompilation_inline_comments_serialize( self, function_id, _request_auth, @@ -2296,7 +2312,7 @@ def _get_ai_decompilation_inline_comments_status_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/functions/{function_id}/ai-decompilation/inline-comments/status', + resource_path='/v3/functions/{function_id}/ai-decompilation/inline-comments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2313,9 +2329,9 @@ def _get_ai_decompilation_inline_comments_status_serialize( @validate_call - def get_ai_decompilation_rating( + def get_ai_decompilation_inline_comments_status( self, - function_id: Annotated[StrictInt, Field(description="The ID of the function for which to get the rating")], + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2328,11 +2344,12 @@ def get_ai_decompilation_rating( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseUnionGetAiDecompilationRatingResponseNoneType: - """Get rating for AI decompilation + ) -> WorkflowProgress: + """Get inline comments generation workflow status + Returns fine-grained progress of the inline comments generation workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_id: The ID of the function for which to get the rating (required) + :param function_id: Function ID (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2356,7 +2373,7 @@ def get_ai_decompilation_rating( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_rating_serialize( + _param = self._get_ai_decompilation_inline_comments_status_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2365,8 +2382,11 @@ def get_ai_decompilation_rating( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseUnionGetAiDecompilationRatingResponseNoneType", - '422': "BaseResponse", + '200': "WorkflowProgress", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -2380,9 +2400,9 @@ def get_ai_decompilation_rating( @validate_call - def get_ai_decompilation_rating_with_http_info( + def get_ai_decompilation_inline_comments_status_with_http_info( self, - function_id: Annotated[StrictInt, Field(description="The ID of the function for which to get the rating")], + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2395,11 +2415,12 @@ def get_ai_decompilation_rating_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseUnionGetAiDecompilationRatingResponseNoneType]: - """Get rating for AI decompilation + ) -> ApiResponse[WorkflowProgress]: + """Get inline comments generation workflow status + Returns fine-grained progress of the inline comments generation workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_id: The ID of the function for which to get the rating (required) + :param function_id: Function ID (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2423,7 +2444,7 @@ def get_ai_decompilation_rating_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_rating_serialize( + _param = self._get_ai_decompilation_inline_comments_status_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2432,8 +2453,11 @@ def get_ai_decompilation_rating_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseUnionGetAiDecompilationRatingResponseNoneType", - '422': "BaseResponse", + '200': "WorkflowProgress", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -2447,9 +2471,9 @@ def get_ai_decompilation_rating_with_http_info( @validate_call - def get_ai_decompilation_rating_without_preload_content( + def get_ai_decompilation_inline_comments_status_without_preload_content( self, - function_id: Annotated[StrictInt, Field(description="The ID of the function for which to get the rating")], + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2463,10 +2487,11 @@ def get_ai_decompilation_rating_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get rating for AI decompilation + """Get inline comments generation workflow status + Returns fine-grained progress of the inline comments generation workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_id: The ID of the function for which to get the rating (required) + :param function_id: Function ID (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2490,7 +2515,7 @@ def get_ai_decompilation_rating_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_rating_serialize( + _param = self._get_ai_decompilation_inline_comments_status_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2499,8 +2524,11 @@ def get_ai_decompilation_rating_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseUnionGetAiDecompilationRatingResponseNoneType", - '422': "BaseResponse", + '200': "WorkflowProgress", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -2509,7 +2537,7 @@ def get_ai_decompilation_rating_without_preload_content( return response_data.response - def _get_ai_decompilation_rating_serialize( + def _get_ai_decompilation_inline_comments_status_serialize( self, function_id, _request_auth, @@ -2557,7 +2585,7 @@ def _get_ai_decompilation_rating_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/functions/{function_id}/ai-decompilation/rating', + resource_path='/v3/functions/{function_id}/ai-decompilation/inline-comments/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2574,9 +2602,9 @@ def _get_ai_decompilation_rating_serialize( @validate_call - def get_ai_decompilation_status( + def get_ai_decompilation_rating( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + function_id: Annotated[StrictInt, Field(description="The ID of the function for which to get the rating")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2589,12 +2617,11 @@ def get_ai_decompilation_status( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> WorkflowProgress: - """Get AI decompilation workflow status + ) -> BaseResponseUnionGetAiDecompilationRatingResponseNoneType: + """Get rating for AI decompilation - Returns fine-grained progress of the running workflow including current step, total steps, and messages. Falls back to the database task status when no workflow is running. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_id: Function ID (required) + :param function_id: The ID of the function for which to get the rating (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2618,7 +2645,7 @@ def get_ai_decompilation_status( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_status_serialize( + _param = self._get_ai_decompilation_rating_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2627,11 +2654,8 @@ def get_ai_decompilation_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkflowProgress", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseUnionGetAiDecompilationRatingResponseNoneType", + '422': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -2645,9 +2669,9 @@ def get_ai_decompilation_status( @validate_call - def get_ai_decompilation_status_with_http_info( + def get_ai_decompilation_rating_with_http_info( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + function_id: Annotated[StrictInt, Field(description="The ID of the function for which to get the rating")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2660,12 +2684,11 @@ def get_ai_decompilation_status_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[WorkflowProgress]: - """Get AI decompilation workflow status + ) -> ApiResponse[BaseResponseUnionGetAiDecompilationRatingResponseNoneType]: + """Get rating for AI decompilation - Returns fine-grained progress of the running workflow including current step, total steps, and messages. Falls back to the database task status when no workflow is running. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_id: Function ID (required) + :param function_id: The ID of the function for which to get the rating (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2689,7 +2712,7 @@ def get_ai_decompilation_status_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_status_serialize( + _param = self._get_ai_decompilation_rating_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2698,11 +2721,8 @@ def get_ai_decompilation_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkflowProgress", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseUnionGetAiDecompilationRatingResponseNoneType", + '422': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -2716,9 +2736,9 @@ def get_ai_decompilation_status_with_http_info( @validate_call - def get_ai_decompilation_status_without_preload_content( + def get_ai_decompilation_rating_without_preload_content( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + function_id: Annotated[StrictInt, Field(description="The ID of the function for which to get the rating")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2732,11 +2752,10 @@ def get_ai_decompilation_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get AI decompilation workflow status + """Get rating for AI decompilation - Returns fine-grained progress of the running workflow including current step, total steps, and messages. Falls back to the database task status when no workflow is running. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_id: Function ID (required) + :param function_id: The ID of the function for which to get the rating (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2760,7 +2779,7 @@ def get_ai_decompilation_status_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_status_serialize( + _param = self._get_ai_decompilation_rating_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2769,11 +2788,8 @@ def get_ai_decompilation_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkflowProgress", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseUnionGetAiDecompilationRatingResponseNoneType", + '422': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -2782,7 +2798,7 @@ def get_ai_decompilation_status_without_preload_content( return response_data.response - def _get_ai_decompilation_status_serialize( + def _get_ai_decompilation_rating_serialize( self, function_id, _request_auth, @@ -2830,7 +2846,7 @@ def _get_ai_decompilation_status_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/functions/{function_id}/ai-decompilation/status', + resource_path='/v2/functions/{function_id}/ai-decompilation/rating', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2847,7 +2863,7 @@ def _get_ai_decompilation_status_serialize( @validate_call - def get_ai_decompilation_summary( + def get_ai_decompilation_status( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -2862,10 +2878,10 @@ def get_ai_decompilation_summary( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SummaryData: - """Get AI decompilation summary + ) -> WorkflowProgress: + """Get AI decompilation workflow status - Returns the summary if available. Returns pending status if summary is still being generated. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns fine-grained progress of the running workflow including current step, total steps, and messages. Falls back to the database task status when no workflow is running. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int @@ -2891,7 +2907,7 @@ def get_ai_decompilation_summary( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_summary_serialize( + _param = self._get_ai_decompilation_status_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2900,7 +2916,7 @@ def get_ai_decompilation_summary( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SummaryData", + '200': "WorkflowProgress", '403': "APIError", '404': "APIError", '422': "APIError", @@ -2918,7 +2934,7 @@ def get_ai_decompilation_summary( @validate_call - def get_ai_decompilation_summary_with_http_info( + def get_ai_decompilation_status_with_http_info( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -2933,10 +2949,10 @@ def get_ai_decompilation_summary_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SummaryData]: - """Get AI decompilation summary + ) -> ApiResponse[WorkflowProgress]: + """Get AI decompilation workflow status - Returns the summary if available. Returns pending status if summary is still being generated. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns fine-grained progress of the running workflow including current step, total steps, and messages. Falls back to the database task status when no workflow is running. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int @@ -2962,7 +2978,7 @@ def get_ai_decompilation_summary_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_summary_serialize( + _param = self._get_ai_decompilation_status_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2971,7 +2987,7 @@ def get_ai_decompilation_summary_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SummaryData", + '200': "WorkflowProgress", '403': "APIError", '404': "APIError", '422': "APIError", @@ -2989,7 +3005,7 @@ def get_ai_decompilation_summary_with_http_info( @validate_call - def get_ai_decompilation_summary_without_preload_content( + def get_ai_decompilation_status_without_preload_content( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -3005,9 +3021,9 @@ def get_ai_decompilation_summary_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get AI decompilation summary + """Get AI decompilation workflow status - Returns the summary if available. Returns pending status if summary is still being generated. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns fine-grained progress of the running workflow including current step, total steps, and messages. Falls back to the database task status when no workflow is running. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int @@ -3033,7 +3049,7 @@ def get_ai_decompilation_summary_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_summary_serialize( + _param = self._get_ai_decompilation_status_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3042,7 +3058,7 @@ def get_ai_decompilation_summary_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SummaryData", + '200': "WorkflowProgress", '403': "APIError", '404': "APIError", '422': "APIError", @@ -3055,7 +3071,7 @@ def get_ai_decompilation_summary_without_preload_content( return response_data.response - def _get_ai_decompilation_summary_serialize( + def _get_ai_decompilation_status_serialize( self, function_id, _request_auth, @@ -3103,7 +3119,7 @@ def _get_ai_decompilation_summary_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/functions/{function_id}/ai-decompilation/summary', + resource_path='/v3/functions/{function_id}/ai-decompilation/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3120,7 +3136,7 @@ def _get_ai_decompilation_summary_serialize( @validate_call - def get_ai_decompilation_summary_status( + def get_ai_decompilation_summary( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -3135,10 +3151,10 @@ def get_ai_decompilation_summary_status( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> WorkflowProgress: - """Get summary generation workflow status + ) -> SummaryData: + """Get AI decompilation summary - Returns fine-grained progress of the summary generation workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the summary if available. Returns pending status if summary is still being generated. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int @@ -3164,7 +3180,7 @@ def get_ai_decompilation_summary_status( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_summary_status_serialize( + _param = self._get_ai_decompilation_summary_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3173,7 +3189,7 @@ def get_ai_decompilation_summary_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkflowProgress", + '200': "SummaryData", '403': "APIError", '404': "APIError", '422': "APIError", @@ -3191,7 +3207,7 @@ def get_ai_decompilation_summary_status( @validate_call - def get_ai_decompilation_summary_status_with_http_info( + def get_ai_decompilation_summary_with_http_info( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -3206,10 +3222,10 @@ def get_ai_decompilation_summary_status_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[WorkflowProgress]: - """Get summary generation workflow status + ) -> ApiResponse[SummaryData]: + """Get AI decompilation summary - Returns fine-grained progress of the summary generation workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the summary if available. Returns pending status if summary is still being generated. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int @@ -3235,7 +3251,7 @@ def get_ai_decompilation_summary_status_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_summary_status_serialize( + _param = self._get_ai_decompilation_summary_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3244,7 +3260,7 @@ def get_ai_decompilation_summary_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkflowProgress", + '200': "SummaryData", '403': "APIError", '404': "APIError", '422': "APIError", @@ -3262,7 +3278,7 @@ def get_ai_decompilation_summary_status_with_http_info( @validate_call - def get_ai_decompilation_summary_status_without_preload_content( + def get_ai_decompilation_summary_without_preload_content( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -3278,9 +3294,9 @@ def get_ai_decompilation_summary_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get summary generation workflow status + """Get AI decompilation summary - Returns fine-grained progress of the summary generation workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the summary if available. Returns pending status if summary is still being generated. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int @@ -3306,7 +3322,7 @@ def get_ai_decompilation_summary_status_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_summary_status_serialize( + _param = self._get_ai_decompilation_summary_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3315,7 +3331,7 @@ def get_ai_decompilation_summary_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkflowProgress", + '200': "SummaryData", '403': "APIError", '404': "APIError", '422': "APIError", @@ -3328,7 +3344,7 @@ def get_ai_decompilation_summary_status_without_preload_content( return response_data.response - def _get_ai_decompilation_summary_status_serialize( + def _get_ai_decompilation_summary_serialize( self, function_id, _request_auth, @@ -3376,7 +3392,7 @@ def _get_ai_decompilation_summary_status_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/functions/{function_id}/ai-decompilation/summary/status', + resource_path='/v3/functions/{function_id}/ai-decompilation/summary', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3393,12 +3409,9 @@ def _get_ai_decompilation_summary_status_serialize( @validate_call - def get_ai_decompilation_task_result( + def get_ai_decompilation_summary_status( self, - function_id: Annotated[StrictInt, Field(description="The ID of the function being decompiled")], - summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None, - generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation")] = None, - force_regenerate: Annotated[Optional[List[RegenerateTarget]], Field(description="Force regeneration of summary and/or comments.")] = None, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3411,19 +3424,13 @@ def get_ai_decompilation_task_result( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseGetAiDecompilationTask: - """(Deprecated) Polls AI Decompilation Process + ) -> WorkflowProgress: + """Get summary generation workflow status - Polls the AI Decompilation Process + Returns fine-grained progress of the summary generation workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_id: The ID of the function being decompiled (required) + :param function_id: Function ID (required) :type function_id: int - :param summarise: Generate a summary for the decompilation - :type summarise: bool - :param generate_inline_comments: Generate inline comments for the decompilation - :type generate_inline_comments: bool - :param force_regenerate: Force regeneration of summary and/or comments. - :type force_regenerate: List[RegenerateTarget] :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 @@ -3445,13 +3452,9 @@ def get_ai_decompilation_task_result( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/ai-decompilation is deprecated.", DeprecationWarning) - _param = self._get_ai_decompilation_task_result_serialize( + _param = self._get_ai_decompilation_summary_status_serialize( function_id=function_id, - summarise=summarise, - generate_inline_comments=generate_inline_comments, - force_regenerate=force_regenerate, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3459,9 +3462,11 @@ def get_ai_decompilation_task_result( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseGetAiDecompilationTask", - '422': "BaseResponse", - '403': "BaseResponse", + '200': "WorkflowProgress", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -3475,12 +3480,9 @@ def get_ai_decompilation_task_result( @validate_call - def get_ai_decompilation_task_result_with_http_info( + def get_ai_decompilation_summary_status_with_http_info( self, - function_id: Annotated[StrictInt, Field(description="The ID of the function being decompiled")], - summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None, - generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation")] = None, - force_regenerate: Annotated[Optional[List[RegenerateTarget]], Field(description="Force regeneration of summary and/or comments.")] = None, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3493,19 +3495,13 @@ def get_ai_decompilation_task_result_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseGetAiDecompilationTask]: - """(Deprecated) Polls AI Decompilation Process + ) -> ApiResponse[WorkflowProgress]: + """Get summary generation workflow status - Polls the AI Decompilation Process + Returns fine-grained progress of the summary generation workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_id: The ID of the function being decompiled (required) + :param function_id: Function ID (required) :type function_id: int - :param summarise: Generate a summary for the decompilation - :type summarise: bool - :param generate_inline_comments: Generate inline comments for the decompilation - :type generate_inline_comments: bool - :param force_regenerate: Force regeneration of summary and/or comments. - :type force_regenerate: List[RegenerateTarget] :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 @@ -3527,13 +3523,9 @@ def get_ai_decompilation_task_result_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/ai-decompilation is deprecated.", DeprecationWarning) - _param = self._get_ai_decompilation_task_result_serialize( + _param = self._get_ai_decompilation_summary_status_serialize( function_id=function_id, - summarise=summarise, - generate_inline_comments=generate_inline_comments, - force_regenerate=force_regenerate, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3541,9 +3533,11 @@ def get_ai_decompilation_task_result_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseGetAiDecompilationTask", - '422': "BaseResponse", - '403': "BaseResponse", + '200': "WorkflowProgress", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -3557,12 +3551,9 @@ def get_ai_decompilation_task_result_with_http_info( @validate_call - def get_ai_decompilation_task_result_without_preload_content( + def get_ai_decompilation_summary_status_without_preload_content( self, - function_id: Annotated[StrictInt, Field(description="The ID of the function being decompiled")], - summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None, - generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation")] = None, - force_regenerate: Annotated[Optional[List[RegenerateTarget]], Field(description="Force regeneration of summary and/or comments.")] = None, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3576,18 +3567,12 @@ def get_ai_decompilation_task_result_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Polls AI Decompilation Process + """Get summary generation workflow status - Polls the AI Decompilation Process + Returns fine-grained progress of the summary generation workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_id: The ID of the function being decompiled (required) + :param function_id: Function ID (required) :type function_id: int - :param summarise: Generate a summary for the decompilation - :type summarise: bool - :param generate_inline_comments: Generate inline comments for the decompilation - :type generate_inline_comments: bool - :param force_regenerate: Force regeneration of summary and/or comments. - :type force_regenerate: List[RegenerateTarget] :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 @@ -3609,13 +3594,9 @@ def get_ai_decompilation_task_result_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/ai-decompilation is deprecated.", DeprecationWarning) - _param = self._get_ai_decompilation_task_result_serialize( + _param = self._get_ai_decompilation_summary_status_serialize( function_id=function_id, - summarise=summarise, - generate_inline_comments=generate_inline_comments, - force_regenerate=force_regenerate, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3623,9 +3604,11 @@ def get_ai_decompilation_task_result_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseGetAiDecompilationTask", - '422': "BaseResponse", - '403': "BaseResponse", + '200': "WorkflowProgress", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -3634,12 +3617,9 @@ def get_ai_decompilation_task_result_without_preload_content( return response_data.response - def _get_ai_decompilation_task_result_serialize( + def _get_ai_decompilation_summary_status_serialize( self, function_id, - summarise, - generate_inline_comments, - force_regenerate, _request_auth, _content_type, _headers, @@ -3649,7 +3629,6 @@ def _get_ai_decompilation_task_result_serialize( _host = None _collection_formats: Dict[str, str] = { - 'force_regenerate': 'multi', } _path_params: Dict[str, str] = {} @@ -3665,15 +3644,325 @@ def _get_ai_decompilation_task_result_serialize( if function_id is not None: _path_params['function_id'] = function_id # process the query parameters - if summarise is not None: - - _query_params.append(('summarise', summarise)) - - if generate_inline_comments is not None: - - _query_params.append(('generate_inline_comments', generate_inline_comments)) - - if force_regenerate is not None: + # 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/functions/{function_id}/ai-decompilation/summary/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_ai_decompilation_task_result( + self, + function_id: Annotated[StrictInt, Field(description="The ID of the function being decompiled")], + summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None, + generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation")] = None, + force_regenerate: Annotated[Optional[List[RegenerateTarget]], Field(description="Force regeneration of summary and/or comments.")] = None, + _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, + ) -> BaseResponseGetAiDecompilationTask: + """(Deprecated) Polls AI Decompilation Process + + Polls the AI Decompilation Process + + :param function_id: The ID of the function being decompiled (required) + :type function_id: int + :param summarise: Generate a summary for the decompilation + :type summarise: bool + :param generate_inline_comments: Generate inline comments for the decompilation + :type generate_inline_comments: bool + :param force_regenerate: Force regeneration of summary and/or comments. + :type force_regenerate: List[RegenerateTarget] + :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 + warnings.warn("GET /v2/functions/{function_id}/ai-decompilation is deprecated.", DeprecationWarning) + + _param = self._get_ai_decompilation_task_result_serialize( + function_id=function_id, + summarise=summarise, + generate_inline_comments=generate_inline_comments, + force_regenerate=force_regenerate, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseGetAiDecompilationTask", + '422': "BaseResponse", + '403': "BaseResponse", + } + 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_ai_decompilation_task_result_with_http_info( + self, + function_id: Annotated[StrictInt, Field(description="The ID of the function being decompiled")], + summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None, + generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation")] = None, + force_regenerate: Annotated[Optional[List[RegenerateTarget]], Field(description="Force regeneration of summary and/or comments.")] = None, + _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[BaseResponseGetAiDecompilationTask]: + """(Deprecated) Polls AI Decompilation Process + + Polls the AI Decompilation Process + + :param function_id: The ID of the function being decompiled (required) + :type function_id: int + :param summarise: Generate a summary for the decompilation + :type summarise: bool + :param generate_inline_comments: Generate inline comments for the decompilation + :type generate_inline_comments: bool + :param force_regenerate: Force regeneration of summary and/or comments. + :type force_regenerate: List[RegenerateTarget] + :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 + warnings.warn("GET /v2/functions/{function_id}/ai-decompilation is deprecated.", DeprecationWarning) + + _param = self._get_ai_decompilation_task_result_serialize( + function_id=function_id, + summarise=summarise, + generate_inline_comments=generate_inline_comments, + force_regenerate=force_regenerate, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseGetAiDecompilationTask", + '422': "BaseResponse", + '403': "BaseResponse", + } + 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_ai_decompilation_task_result_without_preload_content( + self, + function_id: Annotated[StrictInt, Field(description="The ID of the function being decompiled")], + summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None, + generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation")] = None, + force_regenerate: Annotated[Optional[List[RegenerateTarget]], Field(description="Force regeneration of summary and/or comments.")] = None, + _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: + """(Deprecated) Polls AI Decompilation Process + + Polls the AI Decompilation Process + + :param function_id: The ID of the function being decompiled (required) + :type function_id: int + :param summarise: Generate a summary for the decompilation + :type summarise: bool + :param generate_inline_comments: Generate inline comments for the decompilation + :type generate_inline_comments: bool + :param force_regenerate: Force regeneration of summary and/or comments. + :type force_regenerate: List[RegenerateTarget] + :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 + warnings.warn("GET /v2/functions/{function_id}/ai-decompilation is deprecated.", DeprecationWarning) + + _param = self._get_ai_decompilation_task_result_serialize( + function_id=function_id, + summarise=summarise, + generate_inline_comments=generate_inline_comments, + force_regenerate=force_regenerate, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseGetAiDecompilationTask", + '422': "BaseResponse", + '403': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_ai_decompilation_task_result_serialize( + self, + function_id, + summarise, + generate_inline_comments, + force_regenerate, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'force_regenerate': 'multi', + } + + _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 function_id is not None: + _path_params['function_id'] = function_id + # process the query parameters + if summarise is not None: + + _query_params.append(('summarise', summarise)) + + if generate_inline_comments is not None: + + _query_params.append(('generate_inline_comments', generate_inline_comments)) + + if force_regenerate is not None: _query_params.append(('force_regenerate', force_regenerate)) @@ -3698,7 +3987,271 @@ def _get_ai_decompilation_task_result_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/functions/{function_id}/ai-decompilation', + resource_path='/v2/functions/{function_id}/ai-decompilation', + 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_ai_decompilation_task_status( + self, + function_id: Annotated[StrictInt, Field(description="The ID of the function being checked")], + _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, + ) -> BaseResponseFunctionTaskResponse: + """(Deprecated) Check the status of a function ai decompilation + + + :param function_id: The ID of the function being checked (required) + :type function_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 + warnings.warn("GET /v2/functions/{function_id}/ai-decompilation/status is deprecated.", DeprecationWarning) + + _param = self._get_ai_decompilation_task_status_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionTaskResponse", + '422': "BaseResponse", + } + 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_ai_decompilation_task_status_with_http_info( + self, + function_id: Annotated[StrictInt, Field(description="The ID of the function being checked")], + _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[BaseResponseFunctionTaskResponse]: + """(Deprecated) Check the status of a function ai decompilation + + + :param function_id: The ID of the function being checked (required) + :type function_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 + warnings.warn("GET /v2/functions/{function_id}/ai-decompilation/status is deprecated.", DeprecationWarning) + + _param = self._get_ai_decompilation_task_status_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionTaskResponse", + '422': "BaseResponse", + } + 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_ai_decompilation_task_status_without_preload_content( + self, + function_id: Annotated[StrictInt, Field(description="The ID of the function being checked")], + _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: + """(Deprecated) Check the status of a function ai decompilation + + + :param function_id: The ID of the function being checked (required) + :type function_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 + warnings.warn("GET /v2/functions/{function_id}/ai-decompilation/status is deprecated.", DeprecationWarning) + + _param = self._get_ai_decompilation_task_status_serialize( + function_id=function_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseFunctionTaskResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_ai_decompilation_task_status_serialize( + self, + function_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 function_id is not None: + _path_params['function_id'] = function_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='/v2/functions/{function_id}/ai-decompilation/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3715,9 +4268,9 @@ def _get_ai_decompilation_task_result_serialize( @validate_call - def get_ai_decompilation_task_status( + def get_ai_decompilation_tokenised( self, - function_id: Annotated[StrictInt, Field(description="The ID of the function being checked")], + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3730,11 +4283,12 @@ def get_ai_decompilation_task_status( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseFunctionTaskResponse: - """(Deprecated) Check the status of a function ai decompilation + ) -> TokenisedData: + """Get tokenised AI decompilation with function mapping + Returns the decompilation with placeholder tokens, the function mapping for token resolution, and the predicted function name. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `500` [`INTERNAL_ERROR`](/errors/INTERNAL_ERROR) — Internal Server Error - :param function_id: The ID of the function being checked (required) + :param function_id: Function ID (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3757,9 +4311,8 @@ def get_ai_decompilation_task_status( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/ai-decompilation/status is deprecated.", DeprecationWarning) - _param = self._get_ai_decompilation_task_status_serialize( + _param = self._get_ai_decompilation_tokenised_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3768,8 +4321,11 @@ def get_ai_decompilation_task_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionTaskResponse", - '422': "BaseResponse", + '200': "TokenisedData", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -3783,9 +4339,9 @@ def get_ai_decompilation_task_status( @validate_call - def get_ai_decompilation_task_status_with_http_info( + def get_ai_decompilation_tokenised_with_http_info( self, - function_id: Annotated[StrictInt, Field(description="The ID of the function being checked")], + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3798,11 +4354,12 @@ def get_ai_decompilation_task_status_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseFunctionTaskResponse]: - """(Deprecated) Check the status of a function ai decompilation + ) -> ApiResponse[TokenisedData]: + """Get tokenised AI decompilation with function mapping + Returns the decompilation with placeholder tokens, the function mapping for token resolution, and the predicted function name. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `500` [`INTERNAL_ERROR`](/errors/INTERNAL_ERROR) — Internal Server Error - :param function_id: The ID of the function being checked (required) + :param function_id: Function ID (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3825,9 +4382,8 @@ def get_ai_decompilation_task_status_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/ai-decompilation/status is deprecated.", DeprecationWarning) - _param = self._get_ai_decompilation_task_status_serialize( + _param = self._get_ai_decompilation_tokenised_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3836,8 +4392,11 @@ def get_ai_decompilation_task_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionTaskResponse", - '422': "BaseResponse", + '200': "TokenisedData", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -3851,9 +4410,9 @@ def get_ai_decompilation_task_status_with_http_info( @validate_call - def get_ai_decompilation_task_status_without_preload_content( + def get_ai_decompilation_tokenised_without_preload_content( self, - function_id: Annotated[StrictInt, Field(description="The ID of the function being checked")], + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3867,10 +4426,11 @@ def get_ai_decompilation_task_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Check the status of a function ai decompilation + """Get tokenised AI decompilation with function mapping + Returns the decompilation with placeholder tokens, the function mapping for token resolution, and the predicted function name. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `500` [`INTERNAL_ERROR`](/errors/INTERNAL_ERROR) — Internal Server Error - :param function_id: The ID of the function being checked (required) + :param function_id: Function ID (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3893,9 +4453,8 @@ def get_ai_decompilation_task_status_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/ai-decompilation/status is deprecated.", DeprecationWarning) - _param = self._get_ai_decompilation_task_status_serialize( + _param = self._get_ai_decompilation_tokenised_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3904,8 +4463,11 @@ def get_ai_decompilation_task_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionTaskResponse", - '422': "BaseResponse", + '200': "TokenisedData", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -3914,7 +4476,7 @@ def get_ai_decompilation_task_status_without_preload_content( return response_data.response - def _get_ai_decompilation_task_status_serialize( + def _get_ai_decompilation_tokenised_serialize( self, function_id, _request_auth, @@ -3962,7 +4524,7 @@ def _get_ai_decompilation_task_status_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/functions/{function_id}/ai-decompilation/status', + resource_path='/v3/functions/{function_id}/ai-decompilation/tokenised', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3979,9 +4541,10 @@ def _get_ai_decompilation_task_status_serialize( @validate_call - def get_ai_decompilation_tokenised( + def patch_ai_decompilation_inline_comment( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + patch_comment_body: PatchCommentBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3994,13 +4557,15 @@ def get_ai_decompilation_tokenised( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TokenisedData: - """Get tokenised AI decompilation with function mapping + ) -> CommentsData: + """Update a single inline comment - Returns the decompilation with placeholder tokens, the function mapping for token resolution, and the predicted function name. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `500` [`INTERNAL_ERROR`](/errors/INTERNAL_ERROR) — Internal Server Error + Merges a single line comment into the existing AI-generated inline comments. Requires comments to have been generated first. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int + :param patch_comment_body: (required) + :type patch_comment_body: PatchCommentBody :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 @@ -4023,8 +4588,9 @@ def get_ai_decompilation_tokenised( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_tokenised_serialize( + _param = self._patch_ai_decompilation_inline_comment_serialize( function_id=function_id, + patch_comment_body=patch_comment_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4032,7 +4598,7 @@ def get_ai_decompilation_tokenised( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TokenisedData", + '200': "CommentsData", '403': "APIError", '404': "APIError", '422': "APIError", @@ -4050,9 +4616,10 @@ def get_ai_decompilation_tokenised( @validate_call - def get_ai_decompilation_tokenised_with_http_info( + def patch_ai_decompilation_inline_comment_with_http_info( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + patch_comment_body: PatchCommentBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4065,13 +4632,15 @@ def get_ai_decompilation_tokenised_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TokenisedData]: - """Get tokenised AI decompilation with function mapping + ) -> ApiResponse[CommentsData]: + """Update a single inline comment - Returns the decompilation with placeholder tokens, the function mapping for token resolution, and the predicted function name. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `500` [`INTERNAL_ERROR`](/errors/INTERNAL_ERROR) — Internal Server Error + Merges a single line comment into the existing AI-generated inline comments. Requires comments to have been generated first. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int + :param patch_comment_body: (required) + :type patch_comment_body: PatchCommentBody :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 @@ -4094,8 +4663,9 @@ def get_ai_decompilation_tokenised_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_tokenised_serialize( + _param = self._patch_ai_decompilation_inline_comment_serialize( function_id=function_id, + patch_comment_body=patch_comment_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4103,7 +4673,7 @@ def get_ai_decompilation_tokenised_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TokenisedData", + '200': "CommentsData", '403': "APIError", '404': "APIError", '422': "APIError", @@ -4121,9 +4691,10 @@ def get_ai_decompilation_tokenised_with_http_info( @validate_call - def get_ai_decompilation_tokenised_without_preload_content( + def patch_ai_decompilation_inline_comment_without_preload_content( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + patch_comment_body: PatchCommentBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4137,12 +4708,14 @@ def get_ai_decompilation_tokenised_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get tokenised AI decompilation with function mapping + """Update a single inline comment - Returns the decompilation with placeholder tokens, the function mapping for token resolution, and the predicted function name. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `500` [`INTERNAL_ERROR`](/errors/INTERNAL_ERROR) — Internal Server Error + Merges a single line comment into the existing AI-generated inline comments. Requires comments to have been generated first. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int + :param patch_comment_body: (required) + :type patch_comment_body: PatchCommentBody :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 @@ -4165,8 +4738,9 @@ def get_ai_decompilation_tokenised_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_tokenised_serialize( + _param = self._patch_ai_decompilation_inline_comment_serialize( function_id=function_id, + patch_comment_body=patch_comment_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4174,7 +4748,7 @@ def get_ai_decompilation_tokenised_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TokenisedData", + '200': "CommentsData", '403': "APIError", '404': "APIError", '422': "APIError", @@ -4187,9 +4761,10 @@ def get_ai_decompilation_tokenised_without_preload_content( return response_data.response - def _get_ai_decompilation_tokenised_serialize( + def _patch_ai_decompilation_inline_comment_serialize( self, function_id, + patch_comment_body, _request_auth, _content_type, _headers, @@ -4217,6 +4792,8 @@ def _get_ai_decompilation_tokenised_serialize( # process the header parameters # process the form parameters # process the body parameter + if patch_comment_body is not None: + _body_params = patch_comment_body # set the HTTP header `Accept` @@ -4227,6 +4804,19 @@ def _get_ai_decompilation_tokenised_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -4234,8 +4824,8 @@ def _get_ai_decompilation_tokenised_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v3/functions/{function_id}/ai-decompilation/tokenised', + method='PATCH', + resource_path='/v3/functions/{function_id}/ai-decompilation/inline-comments', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/revengai/api/reports_api.py b/revengai/api/reports_api.py index 311eeea..6f76d5c 100644 --- a/revengai/api/reports_api.py +++ b/revengai/api/reports_api.py @@ -15,7 +15,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, field_validator +from pydantic import Field from typing_extensions import Annotated from revengai.models.generate_pdf_output_body import GeneratePDFOutputBody from revengai.models.workflow_progress import WorkflowProgress @@ -57,7 +57,7 @@ def create_pdf_report( ) -> GeneratePDFOutputBody: """Start PDF report generation - Starts an asynchronous PDF report generation workflow for the given analysis. Returns a deterministic task_id used to poll status and download the resulting PDF. Idempotent: if a workflow is already running for this analysis and user, the same task_id is returned with `already_running: true` so the caller can rejoin the in-flight workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Starts an asynchronous PDF report generation workflow for the given analysis. Poll status and download the resulting PDF using the same analysis ID. Idempotent: if a workflow is already running for this analysis and user, the response sets `already_running: true` and the caller rejoins the in-flight workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -128,7 +128,7 @@ def create_pdf_report_with_http_info( ) -> ApiResponse[GeneratePDFOutputBody]: """Start PDF report generation - Starts an asynchronous PDF report generation workflow for the given analysis. Returns a deterministic task_id used to poll status and download the resulting PDF. Idempotent: if a workflow is already running for this analysis and user, the same task_id is returned with `already_running: true` so the caller can rejoin the in-flight workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Starts an asynchronous PDF report generation workflow for the given analysis. Poll status and download the resulting PDF using the same analysis ID. Idempotent: if a workflow is already running for this analysis and user, the response sets `already_running: true` and the caller rejoins the in-flight workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -199,7 +199,7 @@ def create_pdf_report_without_preload_content( ) -> RESTResponseType: """Start PDF report generation - Starts an asynchronous PDF report generation workflow for the given analysis. Returns a deterministic task_id used to poll status and download the resulting PDF. Idempotent: if a workflow is already running for this analysis and user, the same task_id is returned with `already_running: true` so the caller can rejoin the in-flight workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Starts an asynchronous PDF report generation workflow for the given analysis. Poll status and download the resulting PDF using the same analysis ID. Idempotent: if a workflow is already running for this analysis and user, the response sets `already_running: true` and the caller rejoins the in-flight workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -315,7 +315,6 @@ def _create_pdf_report_serialize( def download_pdf_report( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - task_id: Annotated[str, Field(min_length=1, strict=True, max_length=64, description="Task ID returned by the create endpoint")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -331,12 +330,10 @@ def download_pdf_report( ) -> None: """Download generated PDF report - Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when the task does not exist or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) — Report Render Failed + Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) — Report Render Failed :param analysis_id: Analysis ID (required) :type analysis_id: int - :param task_id: Task ID returned by the create endpoint (required) - :type task_id: str :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 @@ -361,7 +358,6 @@ def download_pdf_report( _param = self._download_pdf_report_serialize( analysis_id=analysis_id, - task_id=task_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -391,7 +387,6 @@ def download_pdf_report( def download_pdf_report_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - task_id: Annotated[str, Field(min_length=1, strict=True, max_length=64, description="Task ID returned by the create endpoint")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -407,12 +402,10 @@ def download_pdf_report_with_http_info( ) -> ApiResponse[None]: """Download generated PDF report - Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when the task does not exist or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) — Report Render Failed + Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) — Report Render Failed :param analysis_id: Analysis ID (required) :type analysis_id: int - :param task_id: Task ID returned by the create endpoint (required) - :type task_id: str :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 @@ -437,7 +430,6 @@ def download_pdf_report_with_http_info( _param = self._download_pdf_report_serialize( analysis_id=analysis_id, - task_id=task_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -467,7 +459,6 @@ def download_pdf_report_with_http_info( def download_pdf_report_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - task_id: Annotated[str, Field(min_length=1, strict=True, max_length=64, description="Task ID returned by the create endpoint")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -483,12 +474,10 @@ def download_pdf_report_without_preload_content( ) -> RESTResponseType: """Download generated PDF report - Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when the task does not exist or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) — Report Render Failed + Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) — Report Render Failed :param analysis_id: Analysis ID (required) :type analysis_id: int - :param task_id: Task ID returned by the create endpoint (required) - :type task_id: str :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 @@ -513,7 +502,6 @@ def download_pdf_report_without_preload_content( _param = self._download_pdf_report_serialize( analysis_id=analysis_id, - task_id=task_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -538,7 +526,6 @@ def download_pdf_report_without_preload_content( def _download_pdf_report_serialize( self, analysis_id, - task_id, _request_auth, _content_type, _headers, @@ -562,8 +549,6 @@ def _download_pdf_report_serialize( # process the path parameters if analysis_id is not None: _path_params['analysis_id'] = analysis_id - if task_id is not None: - _path_params['task_id'] = task_id # process the query parameters # process the header parameters # process the form parameters @@ -586,7 +571,7 @@ def _download_pdf_report_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/{analysis_id}/pdf/{task_id}', + resource_path='/v3/analyses/{analysis_id}/pdf', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -606,7 +591,6 @@ def _download_pdf_report_serialize( def get_pdf_report_status( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - task_id: Annotated[str, Field(min_length=1, strict=True, max_length=64, description="Task ID returned by the create endpoint")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -622,12 +606,10 @@ def get_pdf_report_status( ) -> WorkflowProgress: """Get PDF report workflow status - Returns live workflow progress for the given task. Returns 404 when the task does not exist or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns live workflow progress for the given analysis. Returns 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param analysis_id: Analysis ID (required) :type analysis_id: int - :param task_id: Task ID returned by the create endpoint (required) - :type task_id: str :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 @@ -652,7 +634,6 @@ def get_pdf_report_status( _param = self._get_pdf_report_status_serialize( analysis_id=analysis_id, - task_id=task_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -681,7 +662,6 @@ def get_pdf_report_status( def get_pdf_report_status_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - task_id: Annotated[str, Field(min_length=1, strict=True, max_length=64, description="Task ID returned by the create endpoint")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -697,12 +677,10 @@ def get_pdf_report_status_with_http_info( ) -> ApiResponse[WorkflowProgress]: """Get PDF report workflow status - Returns live workflow progress for the given task. Returns 404 when the task does not exist or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns live workflow progress for the given analysis. Returns 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param analysis_id: Analysis ID (required) :type analysis_id: int - :param task_id: Task ID returned by the create endpoint (required) - :type task_id: str :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 @@ -727,7 +705,6 @@ def get_pdf_report_status_with_http_info( _param = self._get_pdf_report_status_serialize( analysis_id=analysis_id, - task_id=task_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -756,7 +733,6 @@ def get_pdf_report_status_with_http_info( def get_pdf_report_status_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - task_id: Annotated[str, Field(min_length=1, strict=True, max_length=64, description="Task ID returned by the create endpoint")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -772,12 +748,10 @@ def get_pdf_report_status_without_preload_content( ) -> RESTResponseType: """Get PDF report workflow status - Returns live workflow progress for the given task. Returns 404 when the task does not exist or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns live workflow progress for the given analysis. Returns 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param analysis_id: Analysis ID (required) :type analysis_id: int - :param task_id: Task ID returned by the create endpoint (required) - :type task_id: str :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 @@ -802,7 +776,6 @@ def get_pdf_report_status_without_preload_content( _param = self._get_pdf_report_status_serialize( analysis_id=analysis_id, - task_id=task_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -826,7 +799,6 @@ def get_pdf_report_status_without_preload_content( def _get_pdf_report_status_serialize( self, analysis_id, - task_id, _request_auth, _content_type, _headers, @@ -850,8 +822,6 @@ def _get_pdf_report_status_serialize( # process the path parameters if analysis_id is not None: _path_params['analysis_id'] = analysis_id - if task_id is not None: - _path_params['task_id'] = task_id # process the query parameters # process the header parameters # process the form parameters @@ -874,7 +844,7 @@ def _get_pdf_report_status_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/{analysis_id}/pdf/{task_id}/status', + resource_path='/v3/analyses/{analysis_id}/pdf/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/revengai/api_client.py b/revengai/api_client.py index d8605d7..7bb6f41 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.84.0/python' + self.user_agent = 'OpenAPI-Generator/v3.85.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 71dd2a5..15f4774 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.84.0\n"\ - "SDK Package Version: v3.84.0".\ + "Version of the API: v3.85.0\n"\ + "SDK Package Version: v3.85.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 0f601ec..1b7126d 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -289,6 +289,7 @@ from revengai.models.pe_model import PEModel from revengai.models.pagination_model import PaginationModel from revengai.models.params import Params +from revengai.models.patch_comment_body import PatchCommentBody from revengai.models.platform import Platform from revengai.models.process_activity_entry import ProcessActivityEntry from revengai.models.process_memdumps import ProcessMemdumps diff --git a/revengai/models/error_body.py b/revengai/models/error_body.py index f0683c4..92f736f 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_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_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', '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')") return value model_config = ConfigDict( diff --git a/revengai/models/generate_pdf_output_body.py b/revengai/models/generate_pdf_output_body.py index 4b0243a..7b7c2b1 100644 --- a/revengai/models/generate_pdf_output_body.py +++ b/revengai/models/generate_pdf_output_body.py @@ -16,7 +16,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,9 +26,8 @@ class GeneratePDFOutputBody(BaseModel): GeneratePDFOutputBody """ # noqa: E501 already_running: Optional[StrictBool] = Field(default=None, description="True when an existing PDF generation is in progress for this analysis and user") - task_id: StrictStr = Field(description="Workflow task ID — use to poll status and download the PDF") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["already_running", "task_id"] + __properties: ClassVar[List[str]] = ["already_running"] model_config = ConfigDict( populate_by_name=True, @@ -88,8 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "already_running": obj.get("already_running"), - "task_id": obj.get("task_id") + "already_running": obj.get("already_running") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/patch_comment_body.py b/revengai/models/patch_comment_body.py new file mode 100644 index 0000000..99fd7be --- /dev/null +++ b/revengai/models/patch_comment_body.py @@ -0,0 +1,102 @@ +# 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PatchCommentBody(BaseModel): + """ + PatchCommentBody + """ # noqa: E501 + comment: Annotated[str, Field(min_length=1, strict=True, max_length=10000)] = Field(description="Comment text") + line: Annotated[int, Field(strict=True, ge=1)] = Field(description="Line number to set the comment on") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["comment", "line"] + + 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 PatchCommentBody 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 PatchCommentBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "comment": obj.get("comment"), + "line": obj.get("line") + }) + # 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 + +