From e35414050a09b3e2c705a6ffe140bf8a482a5cb0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 18 Jun 2026 15:11:03 +0000 Subject: [PATCH] Update SDK to version v3.94.0 - Generated from OpenAPI spec version v3.94.0 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- README.md | 30 +- docs/AIDecompInverseFunctionMapItem.md | 2 +- docs/AIDecompInverseStringMapItem.md | 2 +- docs/Addr.md | 28 - docs/AiDecompilationTaskStatus.md | 18 - docs/AnalysesCoreApi.md | 174 ++ docs/AnalysisReport.md | 4 +- docs/Artifact.md | 48 + docs/BaseResponseFunctionTaskResponse.md | 33 - docs/BaseResponseGetAiDecompilationTask.md | 33 - docs/Connection.md | 5 + docs/ConsoleOutputEntry.md | 30 + docs/DnsQuery.md | 3 + docs/DynamicExecutionStatusResponse.md | 4 +- docs/ExtractedFileEntry.md | 38 - docs/FunctionCommentCreateRequest.md | 30 - docs/FunctionMappingFull.md | 42 - docs/FunctionTaskResponse.md | 30 - docs/FunctionTaskStatus.md | 20 - docs/FunctionsAIDecompilationApi.md | 592 ---- docs/GetAiDecompilationTask.md | 37 - docs/HttpRequest.md | 7 + docs/InverseFunctionMapItem.md | 31 - docs/InverseStringMapItem.md | 30 - docs/InverseValue.md | 29 - docs/NumericAddr.md | 29 - docs/PcapBodyInfo.md | 35 + docs/ProcessExtractedFiles.md | 30 - docs/RegenerateTarget.md | 14 - docs/RenameInputBody.md | 1 + docs/ReportEvent.md | 5 +- docs/TcpCarvedFile.md | 36 + docs/TriggerDynamicExecutionInputBody.md | 31 + revengai/__init__.py | 44 +- revengai/api/analyses_core_api.py | 545 ++++ .../api/functions_ai_decompilation_api.py | 2456 ++--------------- revengai/api_client.py | 2 +- revengai/configuration.py | 4 +- revengai/models/__init__.py | 21 +- revengai/models/addr.py | 143 - .../ai_decomp_inverse_function_map_item.py | 17 +- .../ai_decomp_inverse_string_map_item.py | 17 +- .../models/ai_decompilation_task_status.py | 44 - revengai/models/analysis_log_message.py | 16 +- revengai/models/analysis_report.py | 45 +- revengai/models/api_call.py | 22 +- .../{extracted_file_entry.py => artifact.py} | 99 +- .../base_response_function_task_response.py | 125 - ...base_response_get_ai_decompilation_task.py | 125 - revengai/models/connection.py | 50 +- ...umeric_addr.py => console_output_entry.py} | 25 +- revengai/models/dns_query.py | 25 +- revengai/models/drakvuf_file_metadata.py | 29 +- .../dynamic_execution_status_response.py | 4 +- revengai/models/extracted_url.py | 7 +- revengai/models/file_activity_entry.py | 7 +- .../models/function_comment_create_request.py | 92 - revengai/models/function_mapping_full.py | 277 -- revengai/models/function_task_response.py | 94 - revengai/models/function_task_status.py | 45 - revengai/models/get_ai_decompilation_task.py | 160 -- revengai/models/http_request.py | 78 +- revengai/models/inverse_function_map_item.py | 99 - revengai/models/inverse_value.py | 86 - revengai/models/memdump_entry.py | 48 +- revengai/models/module_load_entry.py | 5 - revengai/models/mutex_entry.py | 7 +- ...s_extracted_files.py => pcap_body_info.py} | 44 +- revengai/models/process_activity_entry.py | 12 +- revengai/models/process_node.py | 12 +- revengai/models/regenerate_target.py | 42 - revengai/models/registry_operation.py | 7 +- revengai/models/rename_input_body.py | 8 +- revengai/models/report_event.py | 32 +- revengai/models/report_info.py | 32 +- revengai/models/report_options.py | 40 - revengai/models/scheduled_task_entry.py | 50 - revengai/models/service_entry.py | 25 - revengai/models/startup_info.py | 25 - ..._string_map_item.py => tcp_carved_file.py} | 51 +- .../trigger_dynamic_execution_input_body.py | 124 + revengai/models/ttp.py | 10 - 83 files changed, 1560 insertions(+), 5300 deletions(-) delete mode 100644 docs/Addr.md delete mode 100644 docs/AiDecompilationTaskStatus.md create mode 100644 docs/Artifact.md delete mode 100644 docs/BaseResponseFunctionTaskResponse.md delete mode 100644 docs/BaseResponseGetAiDecompilationTask.md create mode 100644 docs/ConsoleOutputEntry.md delete mode 100644 docs/ExtractedFileEntry.md delete mode 100644 docs/FunctionCommentCreateRequest.md delete mode 100644 docs/FunctionMappingFull.md delete mode 100644 docs/FunctionTaskResponse.md delete mode 100644 docs/FunctionTaskStatus.md delete mode 100644 docs/GetAiDecompilationTask.md delete mode 100644 docs/InverseFunctionMapItem.md delete mode 100644 docs/InverseStringMapItem.md delete mode 100644 docs/InverseValue.md delete mode 100644 docs/NumericAddr.md create mode 100644 docs/PcapBodyInfo.md delete mode 100644 docs/ProcessExtractedFiles.md delete mode 100644 docs/RegenerateTarget.md create mode 100644 docs/TcpCarvedFile.md create mode 100644 docs/TriggerDynamicExecutionInputBody.md delete mode 100644 revengai/models/addr.py delete mode 100644 revengai/models/ai_decompilation_task_status.py rename revengai/models/{extracted_file_entry.py => artifact.py} (57%) delete mode 100644 revengai/models/base_response_function_task_response.py delete mode 100644 revengai/models/base_response_get_ai_decompilation_task.py rename revengai/models/{numeric_addr.py => console_output_entry.py} (81%) delete mode 100644 revengai/models/function_comment_create_request.py delete mode 100644 revengai/models/function_mapping_full.py delete mode 100644 revengai/models/function_task_response.py delete mode 100644 revengai/models/function_task_status.py delete mode 100644 revengai/models/get_ai_decompilation_task.py delete mode 100644 revengai/models/inverse_function_map_item.py delete mode 100644 revengai/models/inverse_value.py rename revengai/models/{process_extracted_files.py => pcap_body_info.py} (72%) delete mode 100644 revengai/models/regenerate_target.py rename revengai/models/{inverse_string_map_item.py => tcp_carved_file.py} (57%) create mode 100644 revengai/models/trigger_dynamic_execution_input_body.py diff --git a/.sdk-version b/.sdk-version index 3bab994a..49f49f4b 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.93.0 +v3.94.0 diff --git a/README.md b/README.md index 2955144e..8db9e642 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,8 @@ Class | Method | HTTP request | Description *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 *AnalysesCoreApi* | [**get_analysis_status**](docs/AnalysesCoreApi.md#get_analysis_status) | **GET** /v2/analyses/{analysis_id}/status | Gets the status of an analysis +*AnalysesCoreApi* | [**get_dynamic_execution_report**](docs/AnalysesCoreApi.md#get_dynamic_execution_report) | **GET** /v2/analyses/{analysis_id}/dynamic-execution/report | Get dynamic execution report +*AnalysesCoreApi* | [**get_dynamic_execution_status**](docs/AnalysesCoreApi.md#get_dynamic_execution_status) | **GET** /v2/analyses/{analysis_id}/dynamic-execution/status | Get dynamic execution status *AnalysesCoreApi* | [**insert_analysis_log**](docs/AnalysesCoreApi.md#insert_analysis_log) | **POST** /v2/analyses/{analysis_id}/logs | Insert a log entry for an analysis *AnalysesCoreApi* | [**list_analyses**](docs/AnalysesCoreApi.md#list_analyses) | **GET** /v2/analyses/list | Gets the most recent analyses *AnalysesCoreApi* | [**lookup_binary_id**](docs/AnalysesCoreApi.md#lookup_binary_id) | **GET** /v2/analyses/lookup/{binary_id} | Gets the analysis ID from binary ID @@ -124,26 +126,19 @@ Class | Method | HTTP request | Description *FirmwareApi* | [**get_binaries_for_firmware_task**](docs/FirmwareApi.md#get_binaries_for_firmware_task) | **GET** /v2/firmware/get-binaries/{task_id} | Upload firmware for unpacking *FirmwareApi* | [**upload_firmware**](docs/FirmwareApi.md#upload_firmware) | **POST** /v2/firmware | Upload firmware for unpacking *FunctionsAIDecompilationApi* | [**create_ai_decompilation**](docs/FunctionsAIDecompilationApi.md#create_ai_decompilation) | **POST** /v3/functions/{function_id}/ai-decompilation | Start AI decompilation -*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 *FunctionsAIDecompilationApi* | [**get_ai_decompilation_inline_comments_status**](docs/FunctionsAIDecompilationApi.md#get_ai_decompilation_inline_comments_status) | **GET** /v3/functions/{function_id}/ai-decompilation/inline-comments/status | Get inline comments generation workflow status *FunctionsAIDecompilationApi* | [**get_ai_decompilation_rating**](docs/FunctionsAIDecompilationApi.md#get_ai_decompilation_rating) | **GET** /v2/functions/{function_id}/ai-decompilation/rating | Get rating for AI decompilation *FunctionsAIDecompilationApi* | [**get_ai_decompilation_status**](docs/FunctionsAIDecompilationApi.md#get_ai_decompilation_status) | **GET** /v3/functions/{function_id}/ai-decompilation/status | Get AI decompilation workflow status *FunctionsAIDecompilationApi* | [**get_ai_decompilation_summary**](docs/FunctionsAIDecompilationApi.md#get_ai_decompilation_summary) | **GET** /v3/functions/{function_id}/ai-decompilation/summary | Get AI decompilation summary *FunctionsAIDecompilationApi* | [**get_ai_decompilation_summary_status**](docs/FunctionsAIDecompilationApi.md#get_ai_decompilation_summary_status) | **GET** /v3/functions/{function_id}/ai-decompilation/summary/status | Get summary generation workflow status -*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* | [**stream_ai_decompilation**](docs/FunctionsAIDecompilationApi.md#stream_ai_decompilation) | **GET** /v3/functions/{function_id}/ai-decompilation/events | Stream live AI decompilation output (SSE) -*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 *FunctionsAIDecompilationApi* | [**upsert_ai_decompilation_overrides**](docs/FunctionsAIDecompilationApi.md#upsert_ai_decompilation_overrides) | **PATCH** /v3/functions/{function_id}/ai-decompilation/overrides | Upsert variable/function name overrides *FunctionsAIDecompilationApi* | [**upsert_ai_decompilation_rating**](docs/FunctionsAIDecompilationApi.md#upsert_ai_decompilation_rating) | **PATCH** /v2/functions/{function_id}/ai-decompilation/rating | Upsert rating for AI decompilation *FunctionsCoreApi* | [**add_function_callee**](docs/FunctionsCoreApi.md#add_function_callee) | **POST** /v3/functions/{function_id}/callees | Add a callee to a function @@ -197,9 +192,7 @@ Class | Method | HTTP request | Description - [AddUserStringInputBody](docs/AddUserStringInputBody.md) - [AddUserStringToFunctionInputBody](docs/AddUserStringToFunctionInputBody.md) - [AdditionalDetailsStatusResponse](docs/AdditionalDetailsStatusResponse.md) - - [Addr](docs/Addr.md) - [AiDecompilationRating](docs/AiDecompilationRating.md) - - [AiDecompilationTaskStatus](docs/AiDecompilationTaskStatus.md) - [AiUnstripRequest](docs/AiUnstripRequest.md) - [AnalysisAccessInfo](docs/AnalysisAccessInfo.md) - [AnalysisBasicInfoOutputBody](docs/AnalysisBasicInfoOutputBody.md) @@ -236,6 +229,7 @@ Class | Method | HTTP request | Description - [AppApiRestV2FunctionsTypesFunction](docs/AppApiRestV2FunctionsTypesFunction.md) - [AppApiRestV2InfoTypesCapability](docs/AppApiRestV2InfoTypesCapability.md) - [Argument](docs/Argument.md) + - [Artifact](docs/Artifact.md) - [AttemptFailedEvent](docs/AttemptFailedEvent.md) - [AttemptStartedEvent](docs/AttemptStartedEvent.md) - [AutoRunAgents](docs/AutoRunAgents.md) @@ -279,11 +273,9 @@ Class | Method | HTTP request | Description - [BaseResponseFunctionDataTypesList](docs/BaseResponseFunctionDataTypesList.md) - [BaseResponseFunctionSearchResponse](docs/BaseResponseFunctionSearchResponse.md) - [BaseResponseFunctionStringsResponse](docs/BaseResponseFunctionStringsResponse.md) - - [BaseResponseFunctionTaskResponse](docs/BaseResponseFunctionTaskResponse.md) - [BaseResponseFunctionsDetailResponse](docs/BaseResponseFunctionsDetailResponse.md) - [BaseResponseGenerateFunctionDataTypes](docs/BaseResponseGenerateFunctionDataTypes.md) - [BaseResponseGenerationStatusList](docs/BaseResponseGenerationStatusList.md) - - [BaseResponseGetAiDecompilationTask](docs/BaseResponseGetAiDecompilationTask.md) - [BaseResponseGetPublicUserResponse](docs/BaseResponseGetPublicUserResponse.md) - [BaseResponseListCalleesCallerFunctionsResponse](docs/BaseResponseListCalleesCallerFunctionsResponse.md) - [BaseResponseListCollectionResults](docs/BaseResponseListCollectionResults.md) @@ -352,6 +344,7 @@ Class | Method | HTTP request | Description - [ConfigResponse](docs/ConfigResponse.md) - [ConfirmToolInputBody](docs/ConfirmToolInputBody.md) - [Connection](docs/Connection.md) + - [ConsoleOutputEntry](docs/ConsoleOutputEntry.md) - [Context](docs/Context.md) - [Conversation](docs/Conversation.md) - [ConversationContext](docs/ConversationContext.md) @@ -412,7 +405,6 @@ Class | Method | HTTP request | Description - [EventWarning](docs/EventWarning.md) - [ExportModel](docs/ExportModel.md) - [ExternalResponse](docs/ExternalResponse.md) - - [ExtractedFileEntry](docs/ExtractedFileEntry.md) - [ExtractedURL](docs/ExtractedURL.md) - [FileActivityEntry](docs/FileActivityEntry.md) - [FileFormat](docs/FileFormat.md) @@ -424,7 +416,6 @@ Class | Method | HTTP request | Description - [FunctionBlocksResponse](docs/FunctionBlocksResponse.md) - [FunctionBoundary](docs/FunctionBoundary.md) - [FunctionCapabilityResponse](docs/FunctionCapabilityResponse.md) - - [FunctionCommentCreateRequest](docs/FunctionCommentCreateRequest.md) - [FunctionDataTypes](docs/FunctionDataTypes.md) - [FunctionDataTypesList](docs/FunctionDataTypesList.md) - [FunctionDataTypesListItem](docs/FunctionDataTypesListItem.md) @@ -437,7 +428,6 @@ Class | Method | HTTP request | Description - [FunctionListItem](docs/FunctionListItem.md) - [FunctionLocalVariableResponse](docs/FunctionLocalVariableResponse.md) - [FunctionMapping](docs/FunctionMapping.md) - - [FunctionMappingFull](docs/FunctionMappingFull.md) - [FunctionMatch](docs/FunctionMatch.md) - [FunctionMatchingFilters](docs/FunctionMatchingFilters.md) - [FunctionMatchingRequest](docs/FunctionMatchingRequest.md) @@ -452,8 +442,6 @@ Class | Method | HTTP request | Description - [FunctionString](docs/FunctionString.md) - [FunctionStringItem](docs/FunctionStringItem.md) - [FunctionStringsResponse](docs/FunctionStringsResponse.md) - - [FunctionTaskResponse](docs/FunctionTaskResponse.md) - - [FunctionTaskStatus](docs/FunctionTaskStatus.md) - [FunctionTypeInput](docs/FunctionTypeInput.md) - [FunctionTypeOutput](docs/FunctionTypeOutput.md) - [FunctionsDetailResponse](docs/FunctionsDetailResponse.md) @@ -464,7 +452,6 @@ Class | Method | HTTP request | Description - [GetAdditionalDetailsOutputBody](docs/GetAdditionalDetailsOutputBody.md) - [GetAdditionalDetailsStatusOutputBody](docs/GetAdditionalDetailsStatusOutputBody.md) - [GetAiDecompilationRatingResponse](docs/GetAiDecompilationRatingResponse.md) - - [GetAiDecompilationTask](docs/GetAiDecompilationTask.md) - [GetAnalysisStringsStatusOutputBody](docs/GetAnalysisStringsStatusOutputBody.md) - [GetCollectionOutputBody](docs/GetCollectionOutputBody.md) - [GetProductsOutputBody](docs/GetProductsOutputBody.md) @@ -479,9 +466,6 @@ Class | Method | HTTP request | Description - [ImportModel](docs/ImportModel.md) - [InlineComment](docs/InlineComment.md) - [InsertAnalysisLogRequest](docs/InsertAnalysisLogRequest.md) - - [InverseFunctionMapItem](docs/InverseFunctionMapItem.md) - - [InverseStringMapItem](docs/InverseStringMapItem.md) - - [InverseValue](docs/InverseValue.md) - [ListAnalysisStringsOutputBody](docs/ListAnalysisStringsOutputBody.md) - [ListCollectionResults](docs/ListCollectionResults.md) - [ListCollectionsOutputBody](docs/ListCollectionsOutputBody.md) @@ -499,7 +483,6 @@ Class | Method | HTTP request | Description - [NameConfidence](docs/NameConfidence.md) - [NameSourceType](docs/NameSourceType.md) - [NetworkActivity](docs/NetworkActivity.md) - - [NumericAddr](docs/NumericAddr.md) - [Order](docs/Order.md) - [PDBDebugModel](docs/PDBDebugModel.md) - [PEModel](docs/PEModel.md) @@ -512,11 +495,11 @@ Class | Method | HTTP request | Description - [PatchCollectionTagsInputBody](docs/PatchCollectionTagsInputBody.md) - [PatchCollectionTagsOutputBody](docs/PatchCollectionTagsOutputBody.md) - [PatchCommentBody](docs/PatchCommentBody.md) + - [PcapBodyInfo](docs/PcapBodyInfo.md) - [Platform](docs/Platform.md) - [PriceOutput](docs/PriceOutput.md) - [PriceSummary](docs/PriceSummary.md) - [ProcessActivityEntry](docs/ProcessActivityEntry.md) - - [ProcessExtractedFiles](docs/ProcessExtractedFiles.md) - [ProcessMemdumps](docs/ProcessMemdumps.md) - [ProcessNode](docs/ProcessNode.md) - [ProcessTree](docs/ProcessTree.md) @@ -529,7 +512,6 @@ Class | Method | HTTP request | Description - [ReAnalysisForm](docs/ReAnalysisForm.md) - [Recent](docs/Recent.md) - [RegenerateOutputBody](docs/RegenerateOutputBody.md) - - [RegenerateTarget](docs/RegenerateTarget.md) - [RegistryOperation](docs/RegistryOperation.md) - [RelativeBinaryResponse](docs/RelativeBinaryResponse.md) - [RenameAppliedEvent](docs/RenameAppliedEvent.md) @@ -597,10 +579,12 @@ Class | Method | HTTP request | Description - [TaskResponse](docs/TaskResponse.md) - [TaskStatus](docs/TaskStatus.md) - [TaskStatusResponse](docs/TaskStatusResponse.md) + - [TcpCarvedFile](docs/TcpCarvedFile.md) - [TimestampModel](docs/TimestampModel.md) - [TokenisedData](docs/TokenisedData.md) - [TriageFunctionResponse](docs/TriageFunctionResponse.md) - [TriageReportResponse](docs/TriageReportResponse.md) + - [TriggerDynamicExecutionInputBody](docs/TriggerDynamicExecutionInputBody.md) - [Ttp](docs/Ttp.md) - [TypeDefinition](docs/TypeDefinition.md) - [UpdateFunctionDataTypes](docs/UpdateFunctionDataTypes.md) diff --git a/docs/AIDecompInverseFunctionMapItem.md b/docs/AIDecompInverseFunctionMapItem.md index 3c7e0b94..1e48fc85 100644 --- a/docs/AIDecompInverseFunctionMapItem.md +++ b/docs/AIDecompInverseFunctionMapItem.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**addr** | [**NumericAddr**](NumericAddr.md) | | +**addr** | **int** | | **is_external** | **bool** | | **name** | **str** | | diff --git a/docs/AIDecompInverseStringMapItem.md b/docs/AIDecompInverseStringMapItem.md index f4cae764..00c34f79 100644 --- a/docs/AIDecompInverseStringMapItem.md +++ b/docs/AIDecompInverseStringMapItem.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**addr** | [**NumericAddr**](NumericAddr.md) | | +**addr** | **int** | | **string** | **str** | | ## Example diff --git a/docs/Addr.md b/docs/Addr.md deleted file mode 100644 index 17ac6c4a..00000000 --- a/docs/Addr.md +++ /dev/null @@ -1,28 +0,0 @@ -# Addr - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from revengai.models.addr import Addr - -# TODO update the JSON string below -json = "{}" -# create an instance of Addr from a JSON string -addr_instance = Addr.from_json(json) -# print the JSON string representation of the object -print(Addr.to_json()) - -# convert the object into a dict -addr_dict = addr_instance.to_dict() -# create an instance of Addr from a dict -addr_from_dict = Addr.from_dict(addr_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/AiDecompilationTaskStatus.md b/docs/AiDecompilationTaskStatus.md deleted file mode 100644 index 5b617da7..00000000 --- a/docs/AiDecompilationTaskStatus.md +++ /dev/null @@ -1,18 +0,0 @@ -# AiDecompilationTaskStatus - - -## Enum - -* `UNINITIALISED` (value: `'uninitialised'`) - -* `ERROR` (value: `'error'`) - -* `PENDING` (value: `'pending'`) - -* `SUCCESS` (value: `'success'`) - -* `UNKNOWN_DEFAULT_OPEN_API` (value: `'unknown_default_open_api'`) - -[[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/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index 401b52cb..fba8d435 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -14,6 +14,8 @@ Method | HTTP request | Description [**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 [**get_analysis_status**](AnalysesCoreApi.md#get_analysis_status) | **GET** /v2/analyses/{analysis_id}/status | Gets the status of an analysis +[**get_dynamic_execution_report**](AnalysesCoreApi.md#get_dynamic_execution_report) | **GET** /v2/analyses/{analysis_id}/dynamic-execution/report | Get dynamic execution report +[**get_dynamic_execution_status**](AnalysesCoreApi.md#get_dynamic_execution_status) | **GET** /v2/analyses/{analysis_id}/dynamic-execution/status | Get dynamic execution status [**insert_analysis_log**](AnalysesCoreApi.md#insert_analysis_log) | **POST** /v2/analyses/{analysis_id}/logs | Insert a log entry for an analysis [**list_analyses**](AnalysesCoreApi.md#list_analyses) | **GET** /v2/analyses/list | Gets the most recent analyses [**lookup_binary_id**](AnalysesCoreApi.md#lookup_binary_id) | **GET** /v2/analyses/lookup/{binary_id} | Gets the analysis ID from binary ID @@ -857,6 +859,178 @@ 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_dynamic_execution_report** +> AnalysisReport get_dynamic_execution_report(analysis_id) + +Get dynamic execution report + +Returns the dynamic execution report JSON for the analysis. Requires the task to be in COMPLETED status. + +**Error codes:** +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.analysis_report import AnalysisReport +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AnalysesCoreApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get dynamic execution report + api_response = api_instance.get_dynamic_execution_report(analysis_id) + print("The response of AnalysesCoreApi->get_dynamic_execution_report:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->get_dynamic_execution_report: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**AnalysisReport**](AnalysisReport.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 | - | +**409** | Conflict | - | +**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_dynamic_execution_status** +> DynamicExecutionStatusResponse get_dynamic_execution_status(analysis_id) + +Get dynamic execution status + +Returns the status of the most recent dynamic execution task for the analysis. Returns UNINITIALISED if no task has been started. + +**Error codes:** +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.dynamic_execution_status_response import DynamicExecutionStatusResponse +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AnalysesCoreApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get dynamic execution status + api_response = api_instance.get_dynamic_execution_status(analysis_id) + print("The response of AnalysesCoreApi->get_dynamic_execution_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->get_dynamic_execution_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**DynamicExecutionStatusResponse**](DynamicExecutionStatusResponse.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 | - | +**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) + # **insert_analysis_log** > BaseResponse insert_analysis_log(analysis_id, insert_analysis_log_request) diff --git a/docs/AnalysisReport.md b/docs/AnalysisReport.md index 4e1db6d1..e7fc6cba 100644 --- a/docs/AnalysisReport.md +++ b/docs/AnalysisReport.md @@ -5,7 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**extracted_files** | [**List[ProcessExtractedFiles]**](ProcessExtractedFiles.md) | | [optional] +**artifacts** | [**List[Artifact]**](Artifact.md) | | [optional] +**console_output** | [**List[ConsoleOutputEntry]**](ConsoleOutputEntry.md) | | [optional] **file_activity** | [**List[FileActivityEntry]**](FileActivityEntry.md) | | [optional] **info** | [**ReportInfo**](ReportInfo.md) | | **memdumps** | [**List[ProcessMemdumps]**](ProcessMemdumps.md) | | [optional] @@ -18,7 +19,6 @@ Name | Type | Description | Notes **scheduled_tasks** | [**List[ScheduledTaskEntry]**](ScheduledTaskEntry.md) | | [optional] **services** | [**List[ServiceEntry]**](ServiceEntry.md) | | [optional] **startup** | [**StartupInfo**](StartupInfo.md) | | [optional] -**threat_score** | **int** | | **ttps** | [**List[Ttp]**](Ttp.md) | | [optional] ## Example diff --git a/docs/Artifact.md b/docs/Artifact.md new file mode 100644 index 00000000..ea4246ee --- /dev/null +++ b/docs/Artifact.md @@ -0,0 +1,48 @@ +# Artifact + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**direction** | **str** | | [optional] +**dump_addr** | **str** | | [optional] +**dump_pid** | **int** | | [optional] +**file_type** | **str** | | [optional] +**host** | **str** | | [optional] +**is_pe** | **bool** | | +**mime_type** | **str** | | [optional] +**name** | **str** | | +**network_source** | **str** | | [optional] +**original_filename** | **str** | | [optional] +**path** | **str** | | +**process_seqid** | **int** | | [optional] +**reason** | **str** | | +**response_status** | **int** | | [optional] +**sha256** | **str** | | [optional] +**size** | **int** | | +**source** | **str** | | +**uri** | **str** | | [optional] +**was_mapped** | **bool** | | [optional] +**yara_hits** | **List[str]** | | [optional] + +## Example + +```python +from revengai.models.artifact import Artifact + +# TODO update the JSON string below +json = "{}" +# create an instance of Artifact from a JSON string +artifact_instance = Artifact.from_json(json) +# print the JSON string representation of the object +print(Artifact.to_json()) + +# convert the object into a dict +artifact_dict = artifact_instance.to_dict() +# create an instance of Artifact from a dict +artifact_from_dict = Artifact.from_dict(artifact_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/BaseResponseFunctionTaskResponse.md b/docs/BaseResponseFunctionTaskResponse.md deleted file mode 100644 index 72b78c2e..00000000 --- a/docs/BaseResponseFunctionTaskResponse.md +++ /dev/null @@ -1,33 +0,0 @@ -# BaseResponseFunctionTaskResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | [**FunctionTaskResponse**](FunctionTaskResponse.md) | | [optional] -**message** | **str** | | [optional] -**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] -**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] - -## Example - -```python -from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseResponseFunctionTaskResponse from a JSON string -base_response_function_task_response_instance = BaseResponseFunctionTaskResponse.from_json(json) -# print the JSON string representation of the object -print(BaseResponseFunctionTaskResponse.to_json()) - -# convert the object into a dict -base_response_function_task_response_dict = base_response_function_task_response_instance.to_dict() -# create an instance of BaseResponseFunctionTaskResponse from a dict -base_response_function_task_response_from_dict = BaseResponseFunctionTaskResponse.from_dict(base_response_function_task_response_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/BaseResponseGetAiDecompilationTask.md b/docs/BaseResponseGetAiDecompilationTask.md deleted file mode 100644 index ebd36f72..00000000 --- a/docs/BaseResponseGetAiDecompilationTask.md +++ /dev/null @@ -1,33 +0,0 @@ -# BaseResponseGetAiDecompilationTask - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | [**GetAiDecompilationTask**](GetAiDecompilationTask.md) | | [optional] -**message** | **str** | | [optional] -**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] -**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] - -## Example - -```python -from revengai.models.base_response_get_ai_decompilation_task import BaseResponseGetAiDecompilationTask - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseResponseGetAiDecompilationTask from a JSON string -base_response_get_ai_decompilation_task_instance = BaseResponseGetAiDecompilationTask.from_json(json) -# print the JSON string representation of the object -print(BaseResponseGetAiDecompilationTask.to_json()) - -# convert the object into a dict -base_response_get_ai_decompilation_task_dict = base_response_get_ai_decompilation_task_instance.to_dict() -# create an instance of BaseResponseGetAiDecompilationTask from a dict -base_response_get_ai_decompilation_task_from_dict = BaseResponseGetAiDecompilationTask.from_dict(base_response_get_ai_decompilation_task_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/Connection.md b/docs/Connection.md index 212c0fe7..223c6f2a 100644 --- a/docs/Connection.md +++ b/docs/Connection.md @@ -5,12 +5,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**bytes_received** | **int** | | [optional] +**bytes_sent** | **int** | | [optional] **events** | [**List[ReportEvent]**](ReportEvent.md) | | [optional] +**ja3** | **str** | | [optional] +**ja3s** | **str** | | [optional] **local_ip** | **str** | | **local_port** | **object** | | **protocol** | **str** | | **remote_ip** | **str** | | **remote_port** | **object** | | +**tcp_carved_files** | [**List[TcpCarvedFile]**](TcpCarvedFile.md) | | [optional] ## Example diff --git a/docs/ConsoleOutputEntry.md b/docs/ConsoleOutputEntry.md new file mode 100644 index 00000000..85cfd31c --- /dev/null +++ b/docs/ConsoleOutputEntry.md @@ -0,0 +1,30 @@ +# ConsoleOutputEntry + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**output** | **str** | | +**process_seqid** | **int** | | + +## Example + +```python +from revengai.models.console_output_entry import ConsoleOutputEntry + +# TODO update the JSON string below +json = "{}" +# create an instance of ConsoleOutputEntry from a JSON string +console_output_entry_instance = ConsoleOutputEntry.from_json(json) +# print the JSON string representation of the object +print(ConsoleOutputEntry.to_json()) + +# convert the object into a dict +console_output_entry_dict = console_output_entry_instance.to_dict() +# create an instance of ConsoleOutputEntry from a dict +console_output_entry_from_dict = ConsoleOutputEntry.from_dict(console_output_entry_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/DnsQuery.md b/docs/DnsQuery.md index 5e0daf9c..c3236f80 100644 --- a/docs/DnsQuery.md +++ b/docs/DnsQuery.md @@ -5,8 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**cname_chain** | **List[str]** | | [optional] **domain** | **str** | | **events** | [**List[ReportEvent]**](ReportEvent.md) | | [optional] +**min_ttl** | **int** | | [optional] +**resolved_ips** | **List[str]** | | [optional] ## Example diff --git a/docs/DynamicExecutionStatusResponse.md b/docs/DynamicExecutionStatusResponse.md index ad73f798..3cb2cd38 100644 --- a/docs/DynamicExecutionStatusResponse.md +++ b/docs/DynamicExecutionStatusResponse.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**error_message** | **str** | Error detail, set when status is ERROR | [optional] +**error_message** | **str** | Error detail, set when status is FAILED | [optional] **logs** | [**AnalysisLogs**](AnalysisLogs.md) | Sandbox status log messages captured during the run. Contains a single \"No logs available\" message when none have been captured yet. | -**status** | **str** | Task status: UNINITIALISED, PENDING, RUNNING, COMPLETED, or ERROR | +**status** | **str** | Task status: UNINITIALISED, PENDING, RUNNING, COMPLETED, or FAILED | ## Example diff --git a/docs/ExtractedFileEntry.md b/docs/ExtractedFileEntry.md deleted file mode 100644 index 9684c40c..00000000 --- a/docs/ExtractedFileEntry.md +++ /dev/null @@ -1,38 +0,0 @@ -# ExtractedFileEntry - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file_hash** | **str** | | [optional] -**file_size** | **int** | | -**file_type** | **str** | | [optional] -**filename** | **str** | | -**is_pe** | **bool** | | [optional] -**mime_type** | **str** | | [optional] -**reason** | **str** | | [optional] -**seq_num** | **int** | | -**sha256** | **str** | | [optional] -**zip_filename** | **str** | | - -## Example - -```python -from revengai.models.extracted_file_entry import ExtractedFileEntry - -# TODO update the JSON string below -json = "{}" -# create an instance of ExtractedFileEntry from a JSON string -extracted_file_entry_instance = ExtractedFileEntry.from_json(json) -# print the JSON string representation of the object -print(ExtractedFileEntry.to_json()) - -# convert the object into a dict -extracted_file_entry_dict = extracted_file_entry_instance.to_dict() -# create an instance of ExtractedFileEntry from a dict -extracted_file_entry_from_dict = ExtractedFileEntry.from_dict(extracted_file_entry_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/FunctionCommentCreateRequest.md b/docs/FunctionCommentCreateRequest.md deleted file mode 100644 index b96d148c..00000000 --- a/docs/FunctionCommentCreateRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# FunctionCommentCreateRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content** | **str** | Comment text content | -**context** | [**DecompilationCommentContext**](DecompilationCommentContext.md) | Comment context for a function decompilation | [optional] - -## Example - -```python -from revengai.models.function_comment_create_request import FunctionCommentCreateRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionCommentCreateRequest from a JSON string -function_comment_create_request_instance = FunctionCommentCreateRequest.from_json(json) -# print the JSON string representation of the object -print(FunctionCommentCreateRequest.to_json()) - -# convert the object into a dict -function_comment_create_request_dict = function_comment_create_request_instance.to_dict() -# create an instance of FunctionCommentCreateRequest from a dict -function_comment_create_request_from_dict = FunctionCommentCreateRequest.from_dict(function_comment_create_request_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/FunctionMappingFull.md b/docs/FunctionMappingFull.md deleted file mode 100644 index cda13779..00000000 --- a/docs/FunctionMappingFull.md +++ /dev/null @@ -1,42 +0,0 @@ -# FunctionMappingFull - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**inverse_string_map** | [**Dict[str, InverseStringMapItem]**](InverseStringMapItem.md) | | -**inverse_function_map** | [**Dict[str, InverseFunctionMapItem]**](InverseFunctionMapItem.md) | | -**unmatched_functions** | [**Dict[str, InverseValue]**](InverseValue.md) | | -**unmatched_custom_types** | [**Dict[str, InverseValue]**](InverseValue.md) | | -**unmatched_strings** | [**Dict[str, InverseValue]**](InverseValue.md) | | -**unmatched_vars** | [**Dict[str, InverseValue]**](InverseValue.md) | | -**unmatched_go_to_labels** | [**Dict[str, InverseValue]**](InverseValue.md) | | -**unmatched_custom_function_pointers** | [**Dict[str, InverseValue]**](InverseValue.md) | | -**unmatched_variadic_lists** | [**Dict[str, InverseValue]**](InverseValue.md) | | -**unmatched_enums** | [**Dict[str, InverseValue]**](InverseValue.md) | | -**unmatched_global_vars** | [**Dict[str, InverseValue]**](InverseValue.md) | | -**fields** | **Dict[str, Dict[str, InverseValue]]** | | -**unmatched_external_vars** | [**Dict[str, InverseValue]**](InverseValue.md) | No longer provided. | [optional] -**user_override_mappings** | **Dict[str, str]** | | [optional] - -## Example - -```python -from revengai.models.function_mapping_full import FunctionMappingFull - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionMappingFull from a JSON string -function_mapping_full_instance = FunctionMappingFull.from_json(json) -# print the JSON string representation of the object -print(FunctionMappingFull.to_json()) - -# convert the object into a dict -function_mapping_full_dict = function_mapping_full_instance.to_dict() -# create an instance of FunctionMappingFull from a dict -function_mapping_full_from_dict = FunctionMappingFull.from_dict(function_mapping_full_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/FunctionTaskResponse.md b/docs/FunctionTaskResponse.md deleted file mode 100644 index f063cf65..00000000 --- a/docs/FunctionTaskResponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# FunctionTaskResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | [**FunctionTaskStatus**](FunctionTaskStatus.md) | | [optional] -**error_message** | **str** | | [optional] - -## Example - -```python -from revengai.models.function_task_response import FunctionTaskResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionTaskResponse from a JSON string -function_task_response_instance = FunctionTaskResponse.from_json(json) -# print the JSON string representation of the object -print(FunctionTaskResponse.to_json()) - -# convert the object into a dict -function_task_response_dict = function_task_response_instance.to_dict() -# create an instance of FunctionTaskResponse from a dict -function_task_response_from_dict = FunctionTaskResponse.from_dict(function_task_response_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/FunctionTaskStatus.md b/docs/FunctionTaskStatus.md deleted file mode 100644 index e4d7ca68..00000000 --- a/docs/FunctionTaskStatus.md +++ /dev/null @@ -1,20 +0,0 @@ -# FunctionTaskStatus - - -## Enum - -* `UNINITIALISED` (value: `'UNINITIALISED'`) - -* `PENDING` (value: `'PENDING'`) - -* `RUNNING` (value: `'RUNNING'`) - -* `COMPLETED` (value: `'COMPLETED'`) - -* `FAILED` (value: `'FAILED'`) - -* `UNKNOWN_DEFAULT_OPEN_API` (value: `'unknown_default_open_api'`) - -[[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/FunctionsAIDecompilationApi.md b/docs/FunctionsAIDecompilationApi.md index 950849cf..f4adb22d 100644 --- a/docs/FunctionsAIDecompilationApi.md +++ b/docs/FunctionsAIDecompilationApi.md @@ -5,26 +5,19 @@ All URIs are relative to *https://api.reveng.ai* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_ai_decompilation**](FunctionsAIDecompilationApi.md#create_ai_decompilation) | **POST** /v3/functions/{function_id}/ai-decompilation | Start AI decompilation -[**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 [**get_ai_decompilation_inline_comments_status**](FunctionsAIDecompilationApi.md#get_ai_decompilation_inline_comments_status) | **GET** /v3/functions/{function_id}/ai-decompilation/inline-comments/status | Get inline comments generation workflow status [**get_ai_decompilation_rating**](FunctionsAIDecompilationApi.md#get_ai_decompilation_rating) | **GET** /v2/functions/{function_id}/ai-decompilation/rating | Get rating for AI decompilation [**get_ai_decompilation_status**](FunctionsAIDecompilationApi.md#get_ai_decompilation_status) | **GET** /v3/functions/{function_id}/ai-decompilation/status | Get AI decompilation workflow status [**get_ai_decompilation_summary**](FunctionsAIDecompilationApi.md#get_ai_decompilation_summary) | **GET** /v3/functions/{function_id}/ai-decompilation/summary | Get AI decompilation summary [**get_ai_decompilation_summary_status**](FunctionsAIDecompilationApi.md#get_ai_decompilation_summary_status) | **GET** /v3/functions/{function_id}/ai-decompilation/summary/status | Get summary generation workflow status -[**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 [**stream_ai_decompilation**](FunctionsAIDecompilationApi.md#stream_ai_decompilation) | **GET** /v3/functions/{function_id}/ai-decompilation/events | Stream live AI decompilation output (SSE) -[**update_ai_decompilation_comment**](FunctionsAIDecompilationApi.md#update_ai_decompilation_comment) | **PATCH** /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} | Update a comment [**upsert_ai_decompilation_overrides**](FunctionsAIDecompilationApi.md#upsert_ai_decompilation_overrides) | **PATCH** /v3/functions/{function_id}/ai-decompilation/overrides | Upsert variable/function name overrides [**upsert_ai_decompilation_rating**](FunctionsAIDecompilationApi.md#upsert_ai_decompilation_rating) | **PATCH** /v2/functions/{function_id}/ai-decompilation/rating | Upsert rating for AI decompilation @@ -124,258 +117,6 @@ 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) -# **create_ai_decompilation_comment** -> BaseResponseCommentResponse create_ai_decompilation_comment(function_id, function_comment_create_request) - -Create a comment for this function - -Creates a comment associated with a specified function). - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_comment_response import BaseResponseCommentResponse -from revengai.models.function_comment_create_request import FunctionCommentCreateRequest -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_comment_create_request = revengai.FunctionCommentCreateRequest() # FunctionCommentCreateRequest | - - try: - # Create a comment for this function - api_response = api_instance.create_ai_decompilation_comment(function_id, function_comment_create_request) - print("The response of FunctionsAIDecompilationApi->create_ai_decompilation_comment:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FunctionsAIDecompilationApi->create_ai_decompilation_comment: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **function_id** | **int**| | - **function_comment_create_request** | [**FunctionCommentCreateRequest**](FunctionCommentCreateRequest.md)| | - -### Return type - -[**BaseResponseCommentResponse**](BaseResponseCommentResponse.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Successful Response | - | -**422** | Invalid request parameters | - | -**400** | Bad Request | - | - -[[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) - -# **create_ai_decompilation_task** -> BaseResponse create_ai_decompilation_task(function_id) - -Begins AI Decompilation Process - -Begins the AI Decompilation Process - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response import BaseResponse -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 | The ID of the function for which we are creating the decompilation task - - try: - # Begins AI Decompilation Process - api_response = api_instance.create_ai_decompilation_task(function_id) - print("The response of FunctionsAIDecompilationApi->create_ai_decompilation_task:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FunctionsAIDecompilationApi->create_ai_decompilation_task: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **function_id** | **int**| The ID of the function for which we are creating the decompilation task | - -### Return type - -[**BaseResponse**](BaseResponse.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Successful Response | - | -**422** | Invalid request parameters | - | -**403** | Forbidden | - | -**402** | Payment Required | - | -**409** | Conflict | - | -**400** | Bad Request | - | - -[[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_comment** -> BaseResponseBool delete_ai_decompilation_comment(comment_id, function_id) - -Delete a comment - -Deletes an existing comment. Users can only delete their own comments. - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_bool import BaseResponseBool -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) - comment_id = 56 # int | - function_id = 56 # int | - - try: - # Delete a comment - api_response = api_instance.delete_ai_decompilation_comment(comment_id, function_id) - print("The response of FunctionsAIDecompilationApi->delete_ai_decompilation_comment:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FunctionsAIDecompilationApi->delete_ai_decompilation_comment: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **comment_id** | **int**| | - **function_id** | **int**| | - -### Return type - -[**BaseResponseBool**](BaseResponseBool.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** | Successful Response | - | -**422** | Invalid request parameters | - | -**403** | You can only delete your own comments | - | -**400** | Bad Request | - | - -[[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) @@ -553,86 +294,6 @@ 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_ai_decompilation_comments** -> BaseResponseListCommentResponse get_ai_decompilation_comments(function_id) - -Get comments for this function - -Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse -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 | - - try: - # Get comments for this function - api_response = api_instance.get_ai_decompilation_comments(function_id) - print("The response of FunctionsAIDecompilationApi->get_ai_decompilation_comments:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FunctionsAIDecompilationApi->get_ai_decompilation_comments: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **function_id** | **int**| | - -### Return type - -[**BaseResponseListCommentResponse**](BaseResponseListCommentResponse.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** | Successful Response | - | -**422** | Invalid request parameters | - | - -[[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_inline_comments** > CommentsData get_ai_decompilation_inline_comments(function_id) @@ -1146,172 +807,6 @@ 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_ai_decompilation_task_result** -> BaseResponseGetAiDecompilationTask get_ai_decompilation_task_result(function_id, summarise=summarise, generate_inline_comments=generate_inline_comments, force_regenerate=force_regenerate) - -Polls AI Decompilation Process - -Polls the AI Decompilation Process - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_get_ai_decompilation_task import BaseResponseGetAiDecompilationTask -from revengai.models.regenerate_target import RegenerateTarget -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 | The ID of the function being decompiled - summarise = True # bool | Generate a summary for the decompilation (optional) (default to True) - generate_inline_comments = True # bool | Generate inline comments for the decompilation (optional) (default to True) - force_regenerate = [] # List[RegenerateTarget] | Force regeneration of summary and/or comments. (optional) (default to []) - - try: - # Polls AI Decompilation Process - api_response = api_instance.get_ai_decompilation_task_result(function_id, summarise=summarise, generate_inline_comments=generate_inline_comments, force_regenerate=force_regenerate) - print("The response of FunctionsAIDecompilationApi->get_ai_decompilation_task_result:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FunctionsAIDecompilationApi->get_ai_decompilation_task_result: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **function_id** | **int**| The ID of the function being decompiled | - **summarise** | **bool**| Generate a summary for the decompilation | [optional] [default to True] - **generate_inline_comments** | **bool**| Generate inline comments for the decompilation | [optional] [default to True] - **force_regenerate** | [**List[RegenerateTarget]**](RegenerateTarget.md)| Force regeneration of summary and/or comments. | [optional] [default to []] - -### Return type - -[**BaseResponseGetAiDecompilationTask**](BaseResponseGetAiDecompilationTask.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** | Successful Response | - | -**422** | Invalid request parameters | - | -**403** | Forbidden | - | - -[[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_task_status** -> BaseResponseFunctionTaskResponse get_ai_decompilation_task_status(function_id) - -Check the status of a function ai decompilation - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse -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 | The ID of the function being checked - - try: - # Check the status of a function ai decompilation - api_response = api_instance.get_ai_decompilation_task_status(function_id) - print("The response of FunctionsAIDecompilationApi->get_ai_decompilation_task_status:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FunctionsAIDecompilationApi->get_ai_decompilation_task_status: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **function_id** | **int**| The ID of the function being checked | - -### Return type - -[**BaseResponseFunctionTaskResponse**](BaseResponseFunctionTaskResponse.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** | Successful Response | - | -**422** | Invalid request parameters | - | - -[[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_tokenised** > TokenisedData get_ai_decompilation_tokenised(function_id) @@ -1744,93 +1239,6 @@ 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) -# **update_ai_decompilation_comment** -> BaseResponseCommentResponse update_ai_decompilation_comment(comment_id, function_id, comment_update_request) - -Update a comment - -Updates the content of an existing comment. Users can only update their own comments. - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_comment_response import BaseResponseCommentResponse -from revengai.models.comment_update_request import CommentUpdateRequest -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) - comment_id = 56 # int | - function_id = 56 # int | - comment_update_request = revengai.CommentUpdateRequest() # CommentUpdateRequest | - - try: - # Update a comment - api_response = api_instance.update_ai_decompilation_comment(comment_id, function_id, comment_update_request) - print("The response of FunctionsAIDecompilationApi->update_ai_decompilation_comment:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FunctionsAIDecompilationApi->update_ai_decompilation_comment: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **comment_id** | **int**| | - **function_id** | **int**| | - **comment_update_request** | [**CommentUpdateRequest**](CommentUpdateRequest.md)| | - -### Return type - -[**BaseResponseCommentResponse**](BaseResponseCommentResponse.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** | Successful Response | - | -**422** | Invalid request parameters | - | -**403** | You can only update your own comments | - | -**400** | Bad Request | - | - -[[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) - # **upsert_ai_decompilation_overrides** > UpsertOverridesData upsert_ai_decompilation_overrides(function_id, upsert_overrides_input_body) diff --git a/docs/GetAiDecompilationTask.md b/docs/GetAiDecompilationTask.md deleted file mode 100644 index 207afbbb..00000000 --- a/docs/GetAiDecompilationTask.md +++ /dev/null @@ -1,37 +0,0 @@ -# GetAiDecompilationTask - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | [**AiDecompilationTaskStatus**](AiDecompilationTaskStatus.md) | The status of the AI decompilation task | -**decompilation** | **str** | | -**raw_decompilation** | **str** | | -**function_mapping** | [**Dict[str, InverseFunctionMapItem]**](InverseFunctionMapItem.md) | | -**function_mapping_full** | [**FunctionMappingFull**](FunctionMappingFull.md) | | -**summary** | **str** | | [optional] -**ai_summary** | **str** | | [optional] -**raw_ai_summary** | **str** | | [optional] -**predicted_function_name** | **str** | | [optional] - -## Example - -```python -from revengai.models.get_ai_decompilation_task import GetAiDecompilationTask - -# TODO update the JSON string below -json = "{}" -# create an instance of GetAiDecompilationTask from a JSON string -get_ai_decompilation_task_instance = GetAiDecompilationTask.from_json(json) -# print the JSON string representation of the object -print(GetAiDecompilationTask.to_json()) - -# convert the object into a dict -get_ai_decompilation_task_dict = get_ai_decompilation_task_instance.to_dict() -# create an instance of GetAiDecompilationTask from a dict -get_ai_decompilation_task_from_dict = GetAiDecompilationTask.from_dict(get_ai_decompilation_task_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/HttpRequest.md b/docs/HttpRequest.md index 69429516..1439be4a 100644 --- a/docs/HttpRequest.md +++ b/docs/HttpRequest.md @@ -5,15 +5,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**bytes_received** | **int** | | [optional] +**bytes_sent** | **int** | | [optional] **events** | [**List[ReportEvent]**](ReportEvent.md) | | [optional] **extra_headers** | **List[str]** | | [optional] **flags** | **int** | | [optional] **password** | **str** | | [optional] **path** | **str** | | [optional] +**pcap_stream_id** | **int** | | [optional] **post_data** | **str** | | [optional] **proxy** | **str** | | [optional] **proxy_bypass** | **str** | | [optional] **referer** | **str** | | [optional] +**request_body** | [**PcapBodyInfo**](PcapBodyInfo.md) | | [optional] +**response_body** | [**PcapBodyInfo**](PcapBodyInfo.md) | | [optional] +**response_status** | **int** | | [optional] +**server_ip** | **str** | | [optional] **server_name** | **str** | | [optional] **server_port** | **int** | | [optional] **service** | **int** | | [optional] diff --git a/docs/InverseFunctionMapItem.md b/docs/InverseFunctionMapItem.md deleted file mode 100644 index 7a8e2125..00000000 --- a/docs/InverseFunctionMapItem.md +++ /dev/null @@ -1,31 +0,0 @@ -# InverseFunctionMapItem - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**addr** | [**Addr**](Addr.md) | | -**is_external** | **bool** | | [optional] [default to False] - -## Example - -```python -from revengai.models.inverse_function_map_item import InverseFunctionMapItem - -# TODO update the JSON string below -json = "{}" -# create an instance of InverseFunctionMapItem from a JSON string -inverse_function_map_item_instance = InverseFunctionMapItem.from_json(json) -# print the JSON string representation of the object -print(InverseFunctionMapItem.to_json()) - -# convert the object into a dict -inverse_function_map_item_dict = inverse_function_map_item_instance.to_dict() -# create an instance of InverseFunctionMapItem from a dict -inverse_function_map_item_from_dict = InverseFunctionMapItem.from_dict(inverse_function_map_item_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/InverseStringMapItem.md b/docs/InverseStringMapItem.md deleted file mode 100644 index 83e3b472..00000000 --- a/docs/InverseStringMapItem.md +++ /dev/null @@ -1,30 +0,0 @@ -# InverseStringMapItem - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**string** | **str** | | -**addr** | **int** | | - -## Example - -```python -from revengai.models.inverse_string_map_item import InverseStringMapItem - -# TODO update the JSON string below -json = "{}" -# create an instance of InverseStringMapItem from a JSON string -inverse_string_map_item_instance = InverseStringMapItem.from_json(json) -# print the JSON string representation of the object -print(InverseStringMapItem.to_json()) - -# convert the object into a dict -inverse_string_map_item_dict = inverse_string_map_item_instance.to_dict() -# create an instance of InverseStringMapItem from a dict -inverse_string_map_item_from_dict = InverseStringMapItem.from_dict(inverse_string_map_item_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/InverseValue.md b/docs/InverseValue.md deleted file mode 100644 index 976173d8..00000000 --- a/docs/InverseValue.md +++ /dev/null @@ -1,29 +0,0 @@ -# InverseValue - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **str** | | - -## Example - -```python -from revengai.models.inverse_value import InverseValue - -# TODO update the JSON string below -json = "{}" -# create an instance of InverseValue from a JSON string -inverse_value_instance = InverseValue.from_json(json) -# print the JSON string representation of the object -print(InverseValue.to_json()) - -# convert the object into a dict -inverse_value_dict = inverse_value_instance.to_dict() -# create an instance of InverseValue from a dict -inverse_value_from_dict = InverseValue.from_dict(inverse_value_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/NumericAddr.md b/docs/NumericAddr.md deleted file mode 100644 index 0bf79c33..00000000 --- a/docs/NumericAddr.md +++ /dev/null @@ -1,29 +0,0 @@ -# NumericAddr - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **int** | | - -## Example - -```python -from revengai.models.numeric_addr import NumericAddr - -# TODO update the JSON string below -json = "{}" -# create an instance of NumericAddr from a JSON string -numeric_addr_instance = NumericAddr.from_json(json) -# print the JSON string representation of the object -print(NumericAddr.to_json()) - -# convert the object into a dict -numeric_addr_dict = numeric_addr_instance.to_dict() -# create an instance of NumericAddr from a dict -numeric_addr_from_dict = NumericAddr.from_dict(numeric_addr_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/PcapBodyInfo.md b/docs/PcapBodyInfo.md new file mode 100644 index 00000000..cb2bb255 --- /dev/null +++ b/docs/PcapBodyInfo.md @@ -0,0 +1,35 @@ +# PcapBodyInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filename** | **str** | | [optional] +**is_pe** | **bool** | | +**mime_type** | **str** | | [optional] +**preview** | **str** | | [optional] +**sha256** | **str** | | [optional] +**size** | **int** | | +**yara_hits** | **List[str]** | | [optional] + +## Example + +```python +from revengai.models.pcap_body_info import PcapBodyInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of PcapBodyInfo from a JSON string +pcap_body_info_instance = PcapBodyInfo.from_json(json) +# print the JSON string representation of the object +print(PcapBodyInfo.to_json()) + +# convert the object into a dict +pcap_body_info_dict = pcap_body_info_instance.to_dict() +# create an instance of PcapBodyInfo from a dict +pcap_body_info_from_dict = PcapBodyInfo.from_dict(pcap_body_info_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/ProcessExtractedFiles.md b/docs/ProcessExtractedFiles.md deleted file mode 100644 index ab93e281..00000000 --- a/docs/ProcessExtractedFiles.md +++ /dev/null @@ -1,30 +0,0 @@ -# ProcessExtractedFiles - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**files** | [**List[ExtractedFileEntry]**](ExtractedFileEntry.md) | | [optional] -**process_seqid** | **int** | | - -## Example - -```python -from revengai.models.process_extracted_files import ProcessExtractedFiles - -# TODO update the JSON string below -json = "{}" -# create an instance of ProcessExtractedFiles from a JSON string -process_extracted_files_instance = ProcessExtractedFiles.from_json(json) -# print the JSON string representation of the object -print(ProcessExtractedFiles.to_json()) - -# convert the object into a dict -process_extracted_files_dict = process_extracted_files_instance.to_dict() -# create an instance of ProcessExtractedFiles from a dict -process_extracted_files_from_dict = ProcessExtractedFiles.from_dict(process_extracted_files_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/RegenerateTarget.md b/docs/RegenerateTarget.md deleted file mode 100644 index 0c47cdd9..00000000 --- a/docs/RegenerateTarget.md +++ /dev/null @@ -1,14 +0,0 @@ -# RegenerateTarget - - -## Enum - -* `SUMMARY` (value: `'summary'`) - -* `COMMENTS` (value: `'comments'`) - -* `UNKNOWN_DEFAULT_OPEN_API` (value: `'unknown_default_open_api'`) - -[[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/RenameInputBody.md b/docs/RenameInputBody.md index 2b181139..c8005d6e 100644 --- a/docs/RenameInputBody.md +++ b/docs/RenameInputBody.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **new_mangled_name** | **str** | New mangled function name | [optional] **new_name** | **str** | New function name | +**preserve_ai_decompilation** | **bool** | Keep the cached AI decompilation, summary and inline comments. Set when the new name comes from the model's own prediction (e.g. Transfer Name) so existing AI output is not discarded and regenerated. | [optional] ## Example diff --git a/docs/ReportEvent.md b/docs/ReportEvent.md index dce34cf9..01fa8f2b 100644 --- a/docs/ReportEvent.md +++ b/docs/ReportEvent.md @@ -6,12 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **api_calls** | [**List[ApiCall]**](ApiCall.md) | | [optional] +**count** | **int** | | [optional] +**desired_access** | **List[str]** | | [optional] **process_seqid** | **int** | | [optional] -**total_bytes_requested** | **int** | | [optional] +**total_bytes** | **int** | | [optional] **type** | **str** | | **value** | **str** | | [optional] **value_name** | **str** | | [optional] -**write_count** | **int** | | [optional] ## Example diff --git a/docs/TcpCarvedFile.md b/docs/TcpCarvedFile.md new file mode 100644 index 00000000..32637dc6 --- /dev/null +++ b/docs/TcpCarvedFile.md @@ -0,0 +1,36 @@ +# TcpCarvedFile + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**direction** | **str** | | +**filename** | **str** | | [optional] +**is_pe** | **bool** | | +**mime_type** | **str** | | [optional] +**offset** | **int** | | +**sha256** | **str** | | +**size** | **int** | | +**yara_hits** | **List[str]** | | [optional] + +## Example + +```python +from revengai.models.tcp_carved_file import TcpCarvedFile + +# TODO update the JSON string below +json = "{}" +# create an instance of TcpCarvedFile from a JSON string +tcp_carved_file_instance = TcpCarvedFile.from_json(json) +# print the JSON string representation of the object +print(TcpCarvedFile.to_json()) + +# convert the object into a dict +tcp_carved_file_dict = tcp_carved_file_instance.to_dict() +# create an instance of TcpCarvedFile from a dict +tcp_carved_file_from_dict = TcpCarvedFile.from_dict(tcp_carved_file_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/TriggerDynamicExecutionInputBody.md b/docs/TriggerDynamicExecutionInputBody.md new file mode 100644 index 00000000..c617e9cd --- /dev/null +++ b/docs/TriggerDynamicExecutionInputBody.md @@ -0,0 +1,31 @@ +# TriggerDynamicExecutionInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**command_line_args** | **str** | Command-line arguments passed to the sample when the sandbox launches it | [optional] +**start_method** | **str** | How the sandbox launches the sample. Defaults to the sandbox's standard behaviour when omitted. | [optional] +**timeout** | **int** | Maximum sandbox execution time in seconds | [optional] [default to 120] + +## Example + +```python +from revengai.models.trigger_dynamic_execution_input_body import TriggerDynamicExecutionInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of TriggerDynamicExecutionInputBody from a JSON string +trigger_dynamic_execution_input_body_instance = TriggerDynamicExecutionInputBody.from_json(json) +# print the JSON string representation of the object +print(TriggerDynamicExecutionInputBody.to_json()) + +# convert the object into a dict +trigger_dynamic_execution_input_body_dict = trigger_dynamic_execution_input_body_instance.to_dict() +# create an instance of TriggerDynamicExecutionInputBody from a dict +trigger_dynamic_execution_input_body_from_dict = TriggerDynamicExecutionInputBody.from_dict(trigger_dynamic_execution_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/revengai/__init__.py b/revengai/__init__.py index 16421985..36c9360f 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v3.93.0" +__version__ = "v3.94.0" # Define package exports __all__ = [ @@ -54,9 +54,7 @@ "AddUserStringInputBody", "AddUserStringToFunctionInputBody", "AdditionalDetailsStatusResponse", - "Addr", "AiDecompilationRating", - "AiDecompilationTaskStatus", "AiUnstripRequest", "AnalysisAccessInfo", "AnalysisBasicInfoOutputBody", @@ -93,6 +91,7 @@ "AppApiRestV2FunctionsTypesFunction", "AppApiRestV2InfoTypesCapability", "Argument", + "Artifact", "AttemptFailedEvent", "AttemptStartedEvent", "AutoRunAgents", @@ -136,11 +135,9 @@ "BaseResponseFunctionDataTypesList", "BaseResponseFunctionSearchResponse", "BaseResponseFunctionStringsResponse", - "BaseResponseFunctionTaskResponse", "BaseResponseFunctionsDetailResponse", "BaseResponseGenerateFunctionDataTypes", "BaseResponseGenerationStatusList", - "BaseResponseGetAiDecompilationTask", "BaseResponseGetPublicUserResponse", "BaseResponseListCalleesCallerFunctionsResponse", "BaseResponseListCollectionResults", @@ -209,6 +206,7 @@ "ConfigResponse", "ConfirmToolInputBody", "Connection", + "ConsoleOutputEntry", "Context", "Conversation", "ConversationContext", @@ -269,7 +267,6 @@ "EventWarning", "ExportModel", "ExternalResponse", - "ExtractedFileEntry", "ExtractedURL", "FileActivityEntry", "FileFormat", @@ -281,7 +278,6 @@ "FunctionBlocksResponse", "FunctionBoundary", "FunctionCapabilityResponse", - "FunctionCommentCreateRequest", "FunctionDataTypes", "FunctionDataTypesList", "FunctionDataTypesListItem", @@ -294,7 +290,6 @@ "FunctionListItem", "FunctionLocalVariableResponse", "FunctionMapping", - "FunctionMappingFull", "FunctionMatch", "FunctionMatchingFilters", "FunctionMatchingRequest", @@ -309,8 +304,6 @@ "FunctionString", "FunctionStringItem", "FunctionStringsResponse", - "FunctionTaskResponse", - "FunctionTaskStatus", "FunctionTypeInput", "FunctionTypeOutput", "FunctionsDetailResponse", @@ -321,7 +314,6 @@ "GetAdditionalDetailsOutputBody", "GetAdditionalDetailsStatusOutputBody", "GetAiDecompilationRatingResponse", - "GetAiDecompilationTask", "GetAnalysisStringsStatusOutputBody", "GetCollectionOutputBody", "GetProductsOutputBody", @@ -336,9 +328,6 @@ "ImportModel", "InlineComment", "InsertAnalysisLogRequest", - "InverseFunctionMapItem", - "InverseStringMapItem", - "InverseValue", "ListAnalysisStringsOutputBody", "ListCollectionResults", "ListCollectionsOutputBody", @@ -356,7 +345,6 @@ "NameConfidence", "NameSourceType", "NetworkActivity", - "NumericAddr", "Order", "PDBDebugModel", "PEModel", @@ -369,11 +357,11 @@ "PatchCollectionTagsInputBody", "PatchCollectionTagsOutputBody", "PatchCommentBody", + "PcapBodyInfo", "Platform", "PriceOutput", "PriceSummary", "ProcessActivityEntry", - "ProcessExtractedFiles", "ProcessMemdumps", "ProcessNode", "ProcessTree", @@ -386,7 +374,6 @@ "ReAnalysisForm", "Recent", "RegenerateOutputBody", - "RegenerateTarget", "RegistryOperation", "RelativeBinaryResponse", "RenameAppliedEvent", @@ -454,10 +441,12 @@ "TaskResponse", "TaskStatus", "TaskStatusResponse", + "TcpCarvedFile", "TimestampModel", "TokenisedData", "TriageFunctionResponse", "TriageReportResponse", + "TriggerDynamicExecutionInputBody", "Ttp", "TypeDefinition", "UpdateFunctionDataTypes", @@ -519,9 +508,7 @@ from revengai.models.add_user_string_input_body import AddUserStringInputBody as AddUserStringInputBody from revengai.models.add_user_string_to_function_input_body import AddUserStringToFunctionInputBody as AddUserStringToFunctionInputBody from revengai.models.additional_details_status_response import AdditionalDetailsStatusResponse as AdditionalDetailsStatusResponse -from revengai.models.addr import Addr as Addr from revengai.models.ai_decompilation_rating import AiDecompilationRating as AiDecompilationRating -from revengai.models.ai_decompilation_task_status import AiDecompilationTaskStatus as AiDecompilationTaskStatus from revengai.models.ai_unstrip_request import AiUnstripRequest as AiUnstripRequest from revengai.models.analysis_access_info import AnalysisAccessInfo as AnalysisAccessInfo from revengai.models.analysis_basic_info_output_body import AnalysisBasicInfoOutputBody as AnalysisBasicInfoOutputBody @@ -558,6 +545,7 @@ from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction as AppApiRestV2FunctionsTypesFunction from revengai.models.app_api_rest_v2_info_types_capability import AppApiRestV2InfoTypesCapability as AppApiRestV2InfoTypesCapability from revengai.models.argument import Argument as Argument +from revengai.models.artifact import Artifact as Artifact from revengai.models.attempt_failed_event import AttemptFailedEvent as AttemptFailedEvent from revengai.models.attempt_started_event import AttemptStartedEvent as AttemptStartedEvent from revengai.models.auto_run_agents import AutoRunAgents as AutoRunAgents @@ -601,11 +589,9 @@ from revengai.models.base_response_function_data_types_list import BaseResponseFunctionDataTypesList as BaseResponseFunctionDataTypesList from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse as BaseResponseFunctionSearchResponse from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse as BaseResponseFunctionStringsResponse -from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse as BaseResponseFunctionTaskResponse from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse as BaseResponseFunctionsDetailResponse from revengai.models.base_response_generate_function_data_types import BaseResponseGenerateFunctionDataTypes as BaseResponseGenerateFunctionDataTypes from revengai.models.base_response_generation_status_list import BaseResponseGenerationStatusList as BaseResponseGenerationStatusList -from revengai.models.base_response_get_ai_decompilation_task import BaseResponseGetAiDecompilationTask as BaseResponseGetAiDecompilationTask from revengai.models.base_response_get_public_user_response import BaseResponseGetPublicUserResponse as BaseResponseGetPublicUserResponse from revengai.models.base_response_list_callees_caller_functions_response import BaseResponseListCalleesCallerFunctionsResponse as BaseResponseListCalleesCallerFunctionsResponse from revengai.models.base_response_list_collection_results import BaseResponseListCollectionResults as BaseResponseListCollectionResults @@ -674,6 +660,7 @@ from revengai.models.config_response import ConfigResponse as ConfigResponse from revengai.models.confirm_tool_input_body import ConfirmToolInputBody as ConfirmToolInputBody from revengai.models.connection import Connection as Connection +from revengai.models.console_output_entry import ConsoleOutputEntry as ConsoleOutputEntry from revengai.models.context import Context as Context from revengai.models.conversation import Conversation as Conversation from revengai.models.conversation_context import ConversationContext as ConversationContext @@ -734,7 +721,6 @@ from revengai.models.event_warning import EventWarning as EventWarning from revengai.models.export_model import ExportModel as ExportModel from revengai.models.external_response import ExternalResponse as ExternalResponse -from revengai.models.extracted_file_entry import ExtractedFileEntry as ExtractedFileEntry from revengai.models.extracted_url import ExtractedURL as ExtractedURL from revengai.models.file_activity_entry import FileActivityEntry as FileActivityEntry from revengai.models.file_format import FileFormat as FileFormat @@ -746,7 +732,6 @@ from revengai.models.function_blocks_response import FunctionBlocksResponse as FunctionBlocksResponse from revengai.models.function_boundary import FunctionBoundary as FunctionBoundary from revengai.models.function_capability_response import FunctionCapabilityResponse as FunctionCapabilityResponse -from revengai.models.function_comment_create_request import FunctionCommentCreateRequest as FunctionCommentCreateRequest from revengai.models.function_data_types import FunctionDataTypes as FunctionDataTypes from revengai.models.function_data_types_list import FunctionDataTypesList as FunctionDataTypesList from revengai.models.function_data_types_list_item import FunctionDataTypesListItem as FunctionDataTypesListItem @@ -759,7 +744,6 @@ from revengai.models.function_list_item import FunctionListItem as FunctionListItem from revengai.models.function_local_variable_response import FunctionLocalVariableResponse as FunctionLocalVariableResponse from revengai.models.function_mapping import FunctionMapping as FunctionMapping -from revengai.models.function_mapping_full import FunctionMappingFull as FunctionMappingFull from revengai.models.function_match import FunctionMatch as FunctionMatch from revengai.models.function_matching_filters import FunctionMatchingFilters as FunctionMatchingFilters from revengai.models.function_matching_request import FunctionMatchingRequest as FunctionMatchingRequest @@ -774,8 +758,6 @@ from revengai.models.function_string import FunctionString as FunctionString from revengai.models.function_string_item import FunctionStringItem as FunctionStringItem from revengai.models.function_strings_response import FunctionStringsResponse as FunctionStringsResponse -from revengai.models.function_task_response import FunctionTaskResponse as FunctionTaskResponse -from revengai.models.function_task_status import FunctionTaskStatus as FunctionTaskStatus from revengai.models.function_type_input import FunctionTypeInput as FunctionTypeInput from revengai.models.function_type_output import FunctionTypeOutput as FunctionTypeOutput from revengai.models.functions_detail_response import FunctionsDetailResponse as FunctionsDetailResponse @@ -786,7 +768,6 @@ from revengai.models.get_additional_details_output_body import GetAdditionalDetailsOutputBody as GetAdditionalDetailsOutputBody from revengai.models.get_additional_details_status_output_body import GetAdditionalDetailsStatusOutputBody as GetAdditionalDetailsStatusOutputBody from revengai.models.get_ai_decompilation_rating_response import GetAiDecompilationRatingResponse as GetAiDecompilationRatingResponse -from revengai.models.get_ai_decompilation_task import GetAiDecompilationTask as GetAiDecompilationTask from revengai.models.get_analysis_strings_status_output_body import GetAnalysisStringsStatusOutputBody as GetAnalysisStringsStatusOutputBody from revengai.models.get_collection_output_body import GetCollectionOutputBody as GetCollectionOutputBody from revengai.models.get_products_output_body import GetProductsOutputBody as GetProductsOutputBody @@ -801,9 +782,6 @@ from revengai.models.import_model import ImportModel as ImportModel from revengai.models.inline_comment import InlineComment as InlineComment from revengai.models.insert_analysis_log_request import InsertAnalysisLogRequest as InsertAnalysisLogRequest -from revengai.models.inverse_function_map_item import InverseFunctionMapItem as InverseFunctionMapItem -from revengai.models.inverse_string_map_item import InverseStringMapItem as InverseStringMapItem -from revengai.models.inverse_value import InverseValue as InverseValue from revengai.models.list_analysis_strings_output_body import ListAnalysisStringsOutputBody as ListAnalysisStringsOutputBody from revengai.models.list_collection_results import ListCollectionResults as ListCollectionResults from revengai.models.list_collections_output_body import ListCollectionsOutputBody as ListCollectionsOutputBody @@ -821,7 +799,6 @@ from revengai.models.name_confidence import NameConfidence as NameConfidence from revengai.models.name_source_type import NameSourceType as NameSourceType from revengai.models.network_activity import NetworkActivity as NetworkActivity -from revengai.models.numeric_addr import NumericAddr as NumericAddr from revengai.models.order import Order as Order from revengai.models.pdb_debug_model import PDBDebugModel as PDBDebugModel from revengai.models.pe_model import PEModel as PEModel @@ -834,11 +811,11 @@ from revengai.models.patch_collection_tags_input_body import PatchCollectionTagsInputBody as PatchCollectionTagsInputBody from revengai.models.patch_collection_tags_output_body import PatchCollectionTagsOutputBody as PatchCollectionTagsOutputBody from revengai.models.patch_comment_body import PatchCommentBody as PatchCommentBody +from revengai.models.pcap_body_info import PcapBodyInfo as PcapBodyInfo from revengai.models.platform import Platform as Platform from revengai.models.price_output import PriceOutput as PriceOutput from revengai.models.price_summary import PriceSummary as PriceSummary from revengai.models.process_activity_entry import ProcessActivityEntry as ProcessActivityEntry -from revengai.models.process_extracted_files import ProcessExtractedFiles as ProcessExtractedFiles from revengai.models.process_memdumps import ProcessMemdumps as ProcessMemdumps from revengai.models.process_node import ProcessNode as ProcessNode from revengai.models.process_tree import ProcessTree as ProcessTree @@ -851,7 +828,6 @@ from revengai.models.re_analysis_form import ReAnalysisForm as ReAnalysisForm from revengai.models.recent import Recent as Recent from revengai.models.regenerate_output_body import RegenerateOutputBody as RegenerateOutputBody -from revengai.models.regenerate_target import RegenerateTarget as RegenerateTarget from revengai.models.registry_operation import RegistryOperation as RegistryOperation from revengai.models.relative_binary_response import RelativeBinaryResponse as RelativeBinaryResponse from revengai.models.rename_applied_event import RenameAppliedEvent as RenameAppliedEvent @@ -919,10 +895,12 @@ from revengai.models.task_response import TaskResponse as TaskResponse from revengai.models.task_status import TaskStatus as TaskStatus from revengai.models.task_status_response import TaskStatusResponse as TaskStatusResponse +from revengai.models.tcp_carved_file import TcpCarvedFile as TcpCarvedFile from revengai.models.timestamp_model import TimestampModel as TimestampModel from revengai.models.tokenised_data import TokenisedData as TokenisedData from revengai.models.triage_function_response import TriageFunctionResponse as TriageFunctionResponse from revengai.models.triage_report_response import TriageReportResponse as TriageReportResponse +from revengai.models.trigger_dynamic_execution_input_body import TriggerDynamicExecutionInputBody as TriggerDynamicExecutionInputBody from revengai.models.ttp import Ttp as Ttp from revengai.models.type_definition import TypeDefinition as TypeDefinition from revengai.models.update_function_data_types import UpdateFunctionDataTypes as UpdateFunctionDataTypes diff --git a/revengai/api/analyses_core_api.py b/revengai/api/analyses_core_api.py index 9c859625..ca94d205 100644 --- a/revengai/api/analyses_core_api.py +++ b/revengai/api/analyses_core_api.py @@ -21,6 +21,7 @@ from revengai.models.add_user_string_input_body import AddUserStringInputBody from revengai.models.analysis_basic_info_output_body import AnalysisBasicInfoOutputBody from revengai.models.analysis_create_request import AnalysisCreateRequest +from revengai.models.analysis_report import AnalysisReport from revengai.models.analysis_update_request import AnalysisUpdateRequest from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy @@ -38,6 +39,7 @@ from revengai.models.base_response_status import BaseResponseStatus from revengai.models.base_response_upload_response import BaseResponseUploadResponse from revengai.models.dynamic_execution_status import DynamicExecutionStatus +from revengai.models.dynamic_execution_status_response import DynamicExecutionStatusResponse from revengai.models.get_analysis_strings_status_output_body import GetAnalysisStringsStatusOutputBody from revengai.models.insert_analysis_log_request import InsertAnalysisLogRequest from revengai.models.list_analysis_strings_output_body import ListAnalysisStringsOutputBody @@ -2825,6 +2827,549 @@ def _get_analysis_status_serialize( + @validate_call + def get_dynamic_execution_report( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AnalysisReport: + """Get dynamic execution report + + Returns the dynamic execution report JSON for the analysis. Requires the task to be in COMPLETED status. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dynamic_execution_report_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AnalysisReport", + '403': "APIError", + '409': "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_dynamic_execution_report_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AnalysisReport]: + """Get dynamic execution report + + Returns the dynamic execution report JSON for the analysis. Requires the task to be in COMPLETED status. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dynamic_execution_report_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AnalysisReport", + '403': "APIError", + '409': "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_dynamic_execution_report_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get dynamic execution report + + Returns the dynamic execution report JSON for the analysis. Requires the task to be in COMPLETED status. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dynamic_execution_report_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AnalysisReport", + '403': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dynamic_execution_report_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/dynamic-execution/report', + 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_dynamic_execution_status( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DynamicExecutionStatusResponse: + """Get dynamic execution status + + Returns the status of the most recent dynamic execution task for the analysis. Returns UNINITIALISED if no task has been started. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dynamic_execution_status_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DynamicExecutionStatusResponse", + '403': "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_dynamic_execution_status_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DynamicExecutionStatusResponse]: + """Get dynamic execution status + + Returns the status of the most recent dynamic execution task for the analysis. Returns UNINITIALISED if no task has been started. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dynamic_execution_status_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DynamicExecutionStatusResponse", + '403': "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_dynamic_execution_status_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get dynamic execution status + + Returns the status of the most recent dynamic execution task for the analysis. Returns UNINITIALISED if no task has been started. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dynamic_execution_status_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DynamicExecutionStatusResponse", + '403': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dynamic_execution_status_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analyses/{analysis_id}/dynamic-execution/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 insert_analysis_log( self, diff --git a/revengai/api/functions_ai_decompilation_api.py b/revengai/api/functions_ai_decompilation_api.py index ab541abc..c2e4f306 100644 --- a/revengai/api/functions_ai_decompilation_api.py +++ b/revengai/api/functions_ai_decompilation_api.py @@ -19,20 +19,12 @@ from typing import List, Optional, Union from typing_extensions import Annotated from revengai.models.base_response import BaseResponse -from revengai.models.base_response_bool import BaseResponseBool -from revengai.models.base_response_comment_response import BaseResponseCommentResponse -from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse -from revengai.models.base_response_get_ai_decompilation_task import BaseResponseGetAiDecompilationTask -from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse from revengai.models.base_response_union_get_ai_decompilation_rating_response_none_type import BaseResponseUnionGetAiDecompilationRatingResponseNoneType -from revengai.models.comment_update_request import CommentUpdateRequest from revengai.models.comments_data import CommentsData 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.stream_ai_decompilation200_response_inner import StreamAiDecompilation200ResponseInner from revengai.models.summary_data import SummaryData from revengai.models.tokenised_data import TokenisedData @@ -373,1693 +365,10 @@ def _create_ai_decompilation_serialize( @validate_call - def create_ai_decompilation_comment( - self, - function_id: StrictInt, - function_comment_create_request: FunctionCommentCreateRequest, - _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, - ) -> BaseResponseCommentResponse: - """Create a comment for this function - - Creates a comment associated with a specified function). - - :param function_id: (required) - :type function_id: int - :param function_comment_create_request: (required) - :type function_comment_create_request: FunctionCommentCreateRequest - :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._create_ai_decompilation_comment_serialize( - function_id=function_id, - function_comment_create_request=function_comment_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "BaseResponseCommentResponse", - '422': "BaseResponse", - '400': "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 create_ai_decompilation_comment_with_http_info( - self, - function_id: StrictInt, - function_comment_create_request: FunctionCommentCreateRequest, - _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[BaseResponseCommentResponse]: - """Create a comment for this function - - Creates a comment associated with a specified function). - - :param function_id: (required) - :type function_id: int - :param function_comment_create_request: (required) - :type function_comment_create_request: FunctionCommentCreateRequest - :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._create_ai_decompilation_comment_serialize( - function_id=function_id, - function_comment_create_request=function_comment_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "BaseResponseCommentResponse", - '422': "BaseResponse", - '400': "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 create_ai_decompilation_comment_without_preload_content( - self, - function_id: StrictInt, - function_comment_create_request: FunctionCommentCreateRequest, - _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: - """Create a comment for this function - - Creates a comment associated with a specified function). - - :param function_id: (required) - :type function_id: int - :param function_comment_create_request: (required) - :type function_comment_create_request: FunctionCommentCreateRequest - :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._create_ai_decompilation_comment_serialize( - function_id=function_id, - function_comment_create_request=function_comment_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "BaseResponseCommentResponse", - '422': "BaseResponse", - '400': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_ai_decompilation_comment_serialize( - self, - function_id, - function_comment_create_request, - _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 - if function_comment_create_request is not None: - _body_params = function_comment_create_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # 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] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v2/functions/{function_id}/ai-decompilation/comments', - 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 create_ai_decompilation_task( - self, - function_id: Annotated[StrictInt, Field(description="The ID of the function for which we are creating the decompilation task")], - _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, - ) -> BaseResponse: - """(Deprecated) Begins AI Decompilation Process - - Begins the AI Decompilation Process - - :param function_id: The ID of the function for which we are creating the decompilation task (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("POST /v2/functions/{function_id}/ai-decompilation is deprecated.", DeprecationWarning) - - _param = self._create_ai_decompilation_task_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]] = { - '201': "BaseResponse", - '422': "BaseResponse", - '403': "BaseResponse", - '402': "BaseResponse", - '409': "BaseResponse", - '400': "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 create_ai_decompilation_task_with_http_info( - self, - function_id: Annotated[StrictInt, Field(description="The ID of the function for which we are creating the decompilation task")], - _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[BaseResponse]: - """(Deprecated) Begins AI Decompilation Process - - Begins the AI Decompilation Process - - :param function_id: The ID of the function for which we are creating the decompilation task (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("POST /v2/functions/{function_id}/ai-decompilation is deprecated.", DeprecationWarning) - - _param = self._create_ai_decompilation_task_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]] = { - '201': "BaseResponse", - '422': "BaseResponse", - '403': "BaseResponse", - '402': "BaseResponse", - '409': "BaseResponse", - '400': "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 create_ai_decompilation_task_without_preload_content( - self, - function_id: Annotated[StrictInt, Field(description="The ID of the function for which we are creating the decompilation task")], - _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) Begins AI Decompilation Process - - Begins the AI Decompilation Process - - :param function_id: The ID of the function for which we are creating the decompilation task (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("POST /v2/functions/{function_id}/ai-decompilation is deprecated.", DeprecationWarning) - - _param = self._create_ai_decompilation_task_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]] = { - '201': "BaseResponse", - '422': "BaseResponse", - '403': "BaseResponse", - '402': "BaseResponse", - '409': "BaseResponse", - '400': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_ai_decompilation_task_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='POST', - 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 delete_ai_decompilation_comment( - self, - comment_id: Annotated[int, Field(strict=True, ge=1)], - function_id: StrictInt, - _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, - ) -> BaseResponseBool: - """Delete a comment - - Deletes an existing comment. Users can only delete their own comments. - - :param comment_id: (required) - :type comment_id: int - :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 - 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._delete_ai_decompilation_comment_serialize( - comment_id=comment_id, - 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': "BaseResponseBool", - '422': "BaseResponse", - '403': "BaseResponse", - '400': "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 delete_ai_decompilation_comment_with_http_info( - self, - comment_id: Annotated[int, Field(strict=True, ge=1)], - function_id: StrictInt, - _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[BaseResponseBool]: - """Delete a comment - - Deletes an existing comment. Users can only delete their own comments. - - :param comment_id: (required) - :type comment_id: int - :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 - 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._delete_ai_decompilation_comment_serialize( - comment_id=comment_id, - 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': "BaseResponseBool", - '422': "BaseResponse", - '403': "BaseResponse", - '400': "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 delete_ai_decompilation_comment_without_preload_content( - self, - comment_id: Annotated[int, Field(strict=True, ge=1)], - function_id: StrictInt, - _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: - """Delete a comment - - Deletes an existing comment. Users can only delete their own comments. - - :param comment_id: (required) - :type comment_id: int - :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 - 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._delete_ai_decompilation_comment_serialize( - comment_id=comment_id, - 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': "BaseResponseBool", - '422': "BaseResponse", - '403': "BaseResponse", - '400': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_ai_decompilation_comment_serialize( - self, - comment_id, - 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 comment_id is not None: - _path_params['comment_id'] = comment_id - 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='DELETE', - resource_path='/v2/functions/{function_id}/ai-decompilation/comments/{comment_id}', - 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 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)], - 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, - ) -> CommentsData: - """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 - - :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 - (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._delete_ai_decompilation_inline_comment_serialize( - function_id=function_id, - line=line, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CommentsData", - '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 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)], - 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[CommentsData]: - """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 - - :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 - (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._delete_ai_decompilation_inline_comment_serialize( - function_id=function_id, - line=line, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CommentsData", - '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 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)], - 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: - """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 - - :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 - (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._delete_ai_decompilation_inline_comment_serialize( - function_id=function_id, - line=line, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CommentsData", - '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 _delete_ai_decompilation_inline_comment_serialize( - self, - function_id, - line, - _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 - if line is not None: - _path_params['line'] = line - # 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='DELETE', - resource_path='/v3/functions/{function_id}/ai-decompilation/inline-comments/{line}', - 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( - self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DecompilationData: - """Get AI decompilation result - - 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: Function ID (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 - - _param = self._get_ai_decompilation_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': "DecompilationData", - '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_ai_decompilation_with_http_info( - self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DecompilationData]: - """Get AI decompilation result - - 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: Function ID (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 - - _param = self._get_ai_decompilation_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': "DecompilationData", - '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_ai_decompilation_without_preload_content( - self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get AI decompilation result - - 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: Function ID (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 - - _param = self._get_ai_decompilation_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': "DecompilationData", - '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_ai_decompilation_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='/v3/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_comments( - self, - function_id: StrictInt, - _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, - ) -> BaseResponseListCommentResponse: - """Get comments for this function - - Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. - - :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 - 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_ai_decompilation_comments_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': "BaseResponseListCommentResponse", - '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_comments_with_http_info( - self, - function_id: StrictInt, - _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[BaseResponseListCommentResponse]: - """Get comments for this function - - Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. - - :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 - 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_ai_decompilation_comments_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': "BaseResponseListCommentResponse", - '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_comments_without_preload_content( - self, - function_id: StrictInt, - _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 comments for this function - - Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. - - :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 - 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_ai_decompilation_comments_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': "BaseResponseListCommentResponse", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_ai_decompilation_comments_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/comments', - 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_inline_comments( + 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)], @@ -2073,12 +382,14 @@ def get_ai_decompilation_inline_comments( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CommentsData: - """Get AI decompilation inline comments + """Delete a single inline comment - 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 + 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 @@ -2101,8 +412,9 @@ def get_ai_decompilation_inline_comments( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ai_decompilation_inline_comments_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, @@ -2128,9 +440,10 @@ def get_ai_decompilation_inline_comments( @validate_call - def get_ai_decompilation_inline_comments_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)], @@ -2144,12 +457,14 @@ def get_ai_decompilation_inline_comments_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CommentsData]: - """Get AI decompilation inline comments + """Delete a single inline comment - 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 + 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 @@ -2172,8 +487,9 @@ 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._delete_ai_decompilation_inline_comment_serialize( function_id=function_id, + line=line, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2199,9 +515,10 @@ def get_ai_decompilation_inline_comments_with_http_info( @validate_call - def get_ai_decompilation_inline_comments_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)], @@ -2215,12 +532,14 @@ 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 + """Delete a single inline comment - 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 + 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 @@ -2243,8 +562,9 @@ 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._delete_ai_decompilation_inline_comment_serialize( function_id=function_id, + line=line, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2265,9 +585,10 @@ def get_ai_decompilation_inline_comments_without_preload_content( return response_data.response - def _get_ai_decompilation_inline_comments_serialize( + def _delete_ai_decompilation_inline_comment_serialize( self, function_id, + line, _request_auth, _content_type, _headers, @@ -2291,6 +612,8 @@ def _get_ai_decompilation_inline_comments_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 @@ -2312,8 +635,8 @@ 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', + 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, @@ -2330,7 +653,7 @@ def _get_ai_decompilation_inline_comments_serialize( @validate_call - def get_ai_decompilation_inline_comments_status( + def get_ai_decompilation( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -2345,10 +668,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 + ) -> DecompilationData: + """Get AI decompilation result - 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 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: Function ID (required) :type function_id: int @@ -2374,7 +697,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_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2383,7 +706,7 @@ def get_ai_decompilation_inline_comments_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkflowProgress", + '200': "DecompilationData", '403': "APIError", '404': "APIError", '422': "APIError", @@ -2401,7 +724,7 @@ def get_ai_decompilation_inline_comments_status( @validate_call - def get_ai_decompilation_inline_comments_status_with_http_info( + def get_ai_decompilation_with_http_info( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -2416,10 +739,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[DecompilationData]: + """Get AI decompilation result - 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 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: Function ID (required) :type function_id: int @@ -2445,7 +768,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_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2454,7 +777,7 @@ def get_ai_decompilation_inline_comments_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkflowProgress", + '200': "DecompilationData", '403': "APIError", '404': "APIError", '422': "APIError", @@ -2472,7 +795,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_without_preload_content( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -2488,9 +811,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 result - 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 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: Function ID (required) :type function_id: int @@ -2516,7 +839,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_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2525,7 +848,7 @@ def get_ai_decompilation_inline_comments_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkflowProgress", + '200': "DecompilationData", '403': "APIError", '404': "APIError", '422': "APIError", @@ -2538,7 +861,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_serialize( self, function_id, _request_auth, @@ -2586,7 +909,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', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2603,9 +926,9 @@ def _get_ai_decompilation_inline_comments_status_serialize( @validate_call - def get_ai_decompilation_rating( + def get_ai_decompilation_inline_comments( 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)], @@ -2618,11 +941,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 + ) -> CommentsData: + """Get AI decompilation inline comments + 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: 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 @@ -2646,7 +970,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_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2655,8 +979,11 @@ def get_ai_decompilation_rating( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseUnionGetAiDecompilationRatingResponseNoneType", - '422': "BaseResponse", + '200': "CommentsData", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -2670,9 +997,9 @@ def get_ai_decompilation_rating( @validate_call - def get_ai_decompilation_rating_with_http_info( + def get_ai_decompilation_inline_comments_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)], @@ -2685,11 +1012,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[CommentsData]: + """Get AI decompilation inline comments + 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: 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 @@ -2713,7 +1041,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_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2722,8 +1050,11 @@ def get_ai_decompilation_rating_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseUnionGetAiDecompilationRatingResponseNoneType", - '422': "BaseResponse", + '200': "CommentsData", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -2737,9 +1068,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_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)], @@ -2753,10 +1084,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 AI decompilation inline comments + 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: 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 @@ -2780,7 +1112,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_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2789,8 +1121,11 @@ def get_ai_decompilation_rating_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseUnionGetAiDecompilationRatingResponseNoneType", - '422': "BaseResponse", + '200': "CommentsData", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -2799,7 +1134,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_serialize( self, function_id, _request_auth, @@ -2847,7 +1182,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', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2864,7 +1199,7 @@ def _get_ai_decompilation_rating_serialize( @validate_call - def get_ai_decompilation_status( + def get_ai_decompilation_inline_comments_status( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -2880,9 +1215,9 @@ def get_ai_decompilation_status( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> WorkflowProgress: - """Get AI decompilation workflow status + """Get inline comments generation workflow status - 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 + 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: Function ID (required) :type function_id: int @@ -2908,7 +1243,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_inline_comments_status_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2935,7 +1270,7 @@ def get_ai_decompilation_status( @validate_call - def get_ai_decompilation_status_with_http_info( + def get_ai_decompilation_inline_comments_status_with_http_info( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -2951,9 +1286,9 @@ def get_ai_decompilation_status_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[WorkflowProgress]: - """Get AI decompilation workflow status + """Get inline comments generation workflow status - 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 + 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: Function ID (required) :type function_id: int @@ -2979,7 +1314,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_inline_comments_status_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3006,7 +1341,7 @@ def get_ai_decompilation_status_with_http_info( @validate_call - def get_ai_decompilation_status_without_preload_content( + def get_ai_decompilation_inline_comments_status_without_preload_content( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -3022,9 +1357,9 @@ 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 inline comments generation workflow status - 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 + 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: Function ID (required) :type function_id: int @@ -3050,7 +1385,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_inline_comments_status_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3072,7 +1407,7 @@ def get_ai_decompilation_status_without_preload_content( return response_data.response - def _get_ai_decompilation_status_serialize( + def _get_ai_decompilation_inline_comments_status_serialize( self, function_id, _request_auth, @@ -3120,7 +1455,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='/v3/functions/{function_id}/ai-decompilation/inline-comments/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3137,9 +1472,9 @@ def _get_ai_decompilation_status_serialize( @validate_call - def get_ai_decompilation_summary( + 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)], @@ -3152,12 +1487,11 @@ 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 + ) -> BaseResponseUnionGetAiDecompilationRatingResponseNoneType: + """Get rating for AI decompilation - 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) + :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 @@ -3181,7 +1515,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_rating_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3190,11 +1524,8 @@ def get_ai_decompilation_summary( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SummaryData", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseUnionGetAiDecompilationRatingResponseNoneType", + '422': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -3208,9 +1539,9 @@ def get_ai_decompilation_summary( @validate_call - def get_ai_decompilation_summary_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)], @@ -3223,12 +1554,11 @@ 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[BaseResponseUnionGetAiDecompilationRatingResponseNoneType]: + """Get rating for AI decompilation - 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) + :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 @@ -3252,7 +1582,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_rating_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3261,11 +1591,8 @@ def get_ai_decompilation_summary_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SummaryData", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseUnionGetAiDecompilationRatingResponseNoneType", + '422': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -3279,9 +1606,9 @@ def get_ai_decompilation_summary_with_http_info( @validate_call - def get_ai_decompilation_summary_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)], @@ -3295,11 +1622,10 @@ 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 rating for AI decompilation - 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) + :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 @@ -3323,7 +1649,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_rating_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3332,11 +1658,8 @@ def get_ai_decompilation_summary_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SummaryData", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseUnionGetAiDecompilationRatingResponseNoneType", + '422': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -3345,7 +1668,7 @@ def get_ai_decompilation_summary_without_preload_content( return response_data.response - def _get_ai_decompilation_summary_serialize( + def _get_ai_decompilation_rating_serialize( self, function_id, _request_auth, @@ -3393,7 +1716,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='/v2/functions/{function_id}/ai-decompilation/rating', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3410,7 +1733,7 @@ def _get_ai_decompilation_summary_serialize( @validate_call - def get_ai_decompilation_summary_status( + def get_ai_decompilation_status( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -3426,9 +1749,9 @@ def get_ai_decompilation_summary_status( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> WorkflowProgress: - """Get summary generation workflow status + """Get AI decompilation workflow status - 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 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 @@ -3454,7 +1777,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_status_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3481,7 +1804,7 @@ def get_ai_decompilation_summary_status( @validate_call - def get_ai_decompilation_summary_status_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[ @@ -3497,9 +1820,9 @@ def get_ai_decompilation_summary_status_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[WorkflowProgress]: - """Get summary generation workflow status + """Get AI decompilation workflow status - 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 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 @@ -3525,7 +1848,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_status_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3552,7 +1875,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_status_without_preload_content( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -3568,9 +1891,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 workflow status - 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 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 @@ -3596,7 +1919,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_status_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3618,7 +1941,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_status_serialize( self, function_id, _request_auth, @@ -3666,7 +1989,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/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3683,12 +2006,9 @@ def _get_ai_decompilation_summary_status_serialize( @validate_call - def get_ai_decompilation_task_result( + def get_ai_decompilation_summary( 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)], @@ -3701,19 +2021,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 + ) -> SummaryData: + """Get AI decompilation summary - Polls the AI Decompilation Process + 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: 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 @@ -3735,13 +2049,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_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, @@ -3749,9 +2059,11 @@ def get_ai_decompilation_task_result( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseGetAiDecompilationTask", - '422': "BaseResponse", - '403': "BaseResponse", + '200': "SummaryData", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -3765,12 +2077,9 @@ def get_ai_decompilation_task_result( @validate_call - def get_ai_decompilation_task_result_with_http_info( + def get_ai_decompilation_summary_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)], @@ -3783,19 +2092,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[SummaryData]: + """Get AI decompilation summary - Polls the AI Decompilation Process + 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: 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 @@ -3817,13 +2120,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_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, @@ -3831,9 +2130,11 @@ def get_ai_decompilation_task_result_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseGetAiDecompilationTask", - '422': "BaseResponse", - '403': "BaseResponse", + '200': "SummaryData", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -3847,12 +2148,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_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)], @@ -3866,18 +2164,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 AI decompilation summary - Polls the AI Decompilation Process + 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: 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 @@ -3899,13 +2191,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_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, @@ -3913,9 +2201,11 @@ def get_ai_decompilation_task_result_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseGetAiDecompilationTask", - '422': "BaseResponse", - '403': "BaseResponse", + '200': "SummaryData", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -3924,12 +2214,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_serialize( self, function_id, - summarise, - generate_inline_comments, - force_regenerate, _request_auth, _content_type, _headers, @@ -3939,7 +2226,6 @@ def _get_ai_decompilation_task_result_serialize( _host = None _collection_formats: Dict[str, str] = { - 'force_regenerate': 'multi', } _path_params: Dict[str, str] = {} @@ -3955,18 +2241,6 @@ 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: - - _query_params.append(('force_regenerate', force_regenerate)) - # process the header parameters # process the form parameters # process the body parameter @@ -3988,7 +2262,7 @@ 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='/v3/functions/{function_id}/ai-decompilation/summary', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4005,9 +2279,9 @@ def _get_ai_decompilation_task_result_serialize( @validate_call - def get_ai_decompilation_task_status( + def get_ai_decompilation_summary_status( 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)], @@ -4020,11 +2294,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 + ) -> WorkflowProgress: + """Get summary generation workflow status + 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 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 @@ -4047,9 +2322,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_summary_status_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -4058,8 +2332,11 @@ def get_ai_decompilation_task_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionTaskResponse", - '422': "BaseResponse", + '200': "WorkflowProgress", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -4073,9 +2350,9 @@ def get_ai_decompilation_task_status( @validate_call - def get_ai_decompilation_task_status_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 checked")], + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4088,11 +2365,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[WorkflowProgress]: + """Get summary generation workflow status + 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 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 @@ -4115,9 +2393,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_summary_status_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -4126,8 +2403,11 @@ def get_ai_decompilation_task_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionTaskResponse", - '422': "BaseResponse", + '200': "WorkflowProgress", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -4141,9 +2421,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_summary_status_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)], @@ -4157,10 +2437,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 summary generation workflow status + 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 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 @@ -4183,9 +2464,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_summary_status_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -4194,8 +2474,11 @@ def get_ai_decompilation_task_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionTaskResponse", - '422': "BaseResponse", + '200': "WorkflowProgress", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -4204,7 +2487,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_summary_status_serialize( self, function_id, _request_auth, @@ -4252,7 +2535,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/summary/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5650,319 +3933,6 @@ def _stream_ai_decompilation_serialize( - @validate_call - def update_ai_decompilation_comment( - self, - comment_id: Annotated[int, Field(strict=True, ge=1)], - function_id: StrictInt, - comment_update_request: CommentUpdateRequest, - _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, - ) -> BaseResponseCommentResponse: - """Update a comment - - Updates the content of an existing comment. Users can only update their own comments. - - :param comment_id: (required) - :type comment_id: int - :param function_id: (required) - :type function_id: int - :param comment_update_request: (required) - :type comment_update_request: CommentUpdateRequest - :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._update_ai_decompilation_comment_serialize( - comment_id=comment_id, - function_id=function_id, - comment_update_request=comment_update_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseCommentResponse", - '422': "BaseResponse", - '403': "BaseResponse", - '400': "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 update_ai_decompilation_comment_with_http_info( - self, - comment_id: Annotated[int, Field(strict=True, ge=1)], - function_id: StrictInt, - comment_update_request: CommentUpdateRequest, - _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[BaseResponseCommentResponse]: - """Update a comment - - Updates the content of an existing comment. Users can only update their own comments. - - :param comment_id: (required) - :type comment_id: int - :param function_id: (required) - :type function_id: int - :param comment_update_request: (required) - :type comment_update_request: CommentUpdateRequest - :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._update_ai_decompilation_comment_serialize( - comment_id=comment_id, - function_id=function_id, - comment_update_request=comment_update_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseCommentResponse", - '422': "BaseResponse", - '403': "BaseResponse", - '400': "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 update_ai_decompilation_comment_without_preload_content( - self, - comment_id: Annotated[int, Field(strict=True, ge=1)], - function_id: StrictInt, - comment_update_request: CommentUpdateRequest, - _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: - """Update a comment - - Updates the content of an existing comment. Users can only update their own comments. - - :param comment_id: (required) - :type comment_id: int - :param function_id: (required) - :type function_id: int - :param comment_update_request: (required) - :type comment_update_request: CommentUpdateRequest - :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._update_ai_decompilation_comment_serialize( - comment_id=comment_id, - function_id=function_id, - comment_update_request=comment_update_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseCommentResponse", - '422': "BaseResponse", - '403': "BaseResponse", - '400': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_ai_decompilation_comment_serialize( - self, - comment_id, - function_id, - comment_update_request, - _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 comment_id is not None: - _path_params['comment_id'] = comment_id - 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 - if comment_update_request is not None: - _body_params = comment_update_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # 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] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/v2/functions/{function_id}/ai-decompilation/comments/{comment_id}', - 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 upsert_ai_decompilation_overrides( self, diff --git a/revengai/api_client.py b/revengai/api_client.py index 89007e3e..3ebca18a 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.93.0/python' + self.user_agent = 'OpenAPI-Generator/v3.94.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 3373189e..f66fa7c8 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.93.0\n"\ - "SDK Package Version: v3.93.0".\ + "Version of the API: v3.94.0\n"\ + "SDK Package Version: v3.94.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 2eab0988..86535ea9 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -20,9 +20,7 @@ from revengai.models.add_user_string_input_body import AddUserStringInputBody from revengai.models.add_user_string_to_function_input_body import AddUserStringToFunctionInputBody from revengai.models.additional_details_status_response import AdditionalDetailsStatusResponse -from revengai.models.addr import Addr from revengai.models.ai_decompilation_rating import AiDecompilationRating -from revengai.models.ai_decompilation_task_status import AiDecompilationTaskStatus from revengai.models.ai_unstrip_request import AiUnstripRequest from revengai.models.analysis_access_info import AnalysisAccessInfo from revengai.models.analysis_basic_info_output_body import AnalysisBasicInfoOutputBody @@ -59,6 +57,7 @@ from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction from revengai.models.app_api_rest_v2_info_types_capability import AppApiRestV2InfoTypesCapability from revengai.models.argument import Argument +from revengai.models.artifact import Artifact from revengai.models.attempt_failed_event import AttemptFailedEvent from revengai.models.attempt_started_event import AttemptStartedEvent from revengai.models.auto_run_agents import AutoRunAgents @@ -102,11 +101,9 @@ from revengai.models.base_response_function_data_types_list import BaseResponseFunctionDataTypesList from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse -from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse from revengai.models.base_response_generate_function_data_types import BaseResponseGenerateFunctionDataTypes from revengai.models.base_response_generation_status_list import BaseResponseGenerationStatusList -from revengai.models.base_response_get_ai_decompilation_task import BaseResponseGetAiDecompilationTask from revengai.models.base_response_get_public_user_response import BaseResponseGetPublicUserResponse from revengai.models.base_response_list_callees_caller_functions_response import BaseResponseListCalleesCallerFunctionsResponse from revengai.models.base_response_list_collection_results import BaseResponseListCollectionResults @@ -175,6 +172,7 @@ from revengai.models.config_response import ConfigResponse from revengai.models.confirm_tool_input_body import ConfirmToolInputBody from revengai.models.connection import Connection +from revengai.models.console_output_entry import ConsoleOutputEntry from revengai.models.context import Context from revengai.models.conversation import Conversation from revengai.models.conversation_context import ConversationContext @@ -235,7 +233,6 @@ from revengai.models.event_warning import EventWarning from revengai.models.export_model import ExportModel from revengai.models.external_response import ExternalResponse -from revengai.models.extracted_file_entry import ExtractedFileEntry from revengai.models.extracted_url import ExtractedURL from revengai.models.file_activity_entry import FileActivityEntry from revengai.models.file_format import FileFormat @@ -247,7 +244,6 @@ from revengai.models.function_blocks_response import FunctionBlocksResponse from revengai.models.function_boundary import FunctionBoundary from revengai.models.function_capability_response import FunctionCapabilityResponse -from revengai.models.function_comment_create_request import FunctionCommentCreateRequest from revengai.models.function_data_types import FunctionDataTypes from revengai.models.function_data_types_list import FunctionDataTypesList from revengai.models.function_data_types_list_item import FunctionDataTypesListItem @@ -260,7 +256,6 @@ from revengai.models.function_list_item import FunctionListItem from revengai.models.function_local_variable_response import FunctionLocalVariableResponse from revengai.models.function_mapping import FunctionMapping -from revengai.models.function_mapping_full import FunctionMappingFull from revengai.models.function_match import FunctionMatch from revengai.models.function_matching_filters import FunctionMatchingFilters from revengai.models.function_matching_request import FunctionMatchingRequest @@ -275,8 +270,6 @@ from revengai.models.function_string import FunctionString from revengai.models.function_string_item import FunctionStringItem from revengai.models.function_strings_response import FunctionStringsResponse -from revengai.models.function_task_response import FunctionTaskResponse -from revengai.models.function_task_status import FunctionTaskStatus from revengai.models.function_type_input import FunctionTypeInput from revengai.models.function_type_output import FunctionTypeOutput from revengai.models.functions_detail_response import FunctionsDetailResponse @@ -287,7 +280,6 @@ from revengai.models.get_additional_details_output_body import GetAdditionalDetailsOutputBody from revengai.models.get_additional_details_status_output_body import GetAdditionalDetailsStatusOutputBody from revengai.models.get_ai_decompilation_rating_response import GetAiDecompilationRatingResponse -from revengai.models.get_ai_decompilation_task import GetAiDecompilationTask from revengai.models.get_analysis_strings_status_output_body import GetAnalysisStringsStatusOutputBody from revengai.models.get_collection_output_body import GetCollectionOutputBody from revengai.models.get_products_output_body import GetProductsOutputBody @@ -302,9 +294,6 @@ from revengai.models.import_model import ImportModel from revengai.models.inline_comment import InlineComment from revengai.models.insert_analysis_log_request import InsertAnalysisLogRequest -from revengai.models.inverse_function_map_item import InverseFunctionMapItem -from revengai.models.inverse_string_map_item import InverseStringMapItem -from revengai.models.inverse_value import InverseValue from revengai.models.list_analysis_strings_output_body import ListAnalysisStringsOutputBody from revengai.models.list_collection_results import ListCollectionResults from revengai.models.list_collections_output_body import ListCollectionsOutputBody @@ -322,7 +311,6 @@ from revengai.models.name_confidence import NameConfidence from revengai.models.name_source_type import NameSourceType from revengai.models.network_activity import NetworkActivity -from revengai.models.numeric_addr import NumericAddr from revengai.models.order import Order from revengai.models.pdb_debug_model import PDBDebugModel from revengai.models.pe_model import PEModel @@ -335,11 +323,11 @@ from revengai.models.patch_collection_tags_input_body import PatchCollectionTagsInputBody from revengai.models.patch_collection_tags_output_body import PatchCollectionTagsOutputBody from revengai.models.patch_comment_body import PatchCommentBody +from revengai.models.pcap_body_info import PcapBodyInfo from revengai.models.platform import Platform from revengai.models.price_output import PriceOutput from revengai.models.price_summary import PriceSummary from revengai.models.process_activity_entry import ProcessActivityEntry -from revengai.models.process_extracted_files import ProcessExtractedFiles from revengai.models.process_memdumps import ProcessMemdumps from revengai.models.process_node import ProcessNode from revengai.models.process_tree import ProcessTree @@ -352,7 +340,6 @@ from revengai.models.re_analysis_form import ReAnalysisForm from revengai.models.recent import Recent from revengai.models.regenerate_output_body import RegenerateOutputBody -from revengai.models.regenerate_target import RegenerateTarget from revengai.models.registry_operation import RegistryOperation from revengai.models.relative_binary_response import RelativeBinaryResponse from revengai.models.rename_applied_event import RenameAppliedEvent @@ -420,10 +407,12 @@ from revengai.models.task_response import TaskResponse from revengai.models.task_status import TaskStatus from revengai.models.task_status_response import TaskStatusResponse +from revengai.models.tcp_carved_file import TcpCarvedFile from revengai.models.timestamp_model import TimestampModel from revengai.models.tokenised_data import TokenisedData from revengai.models.triage_function_response import TriageFunctionResponse from revengai.models.triage_report_response import TriageReportResponse +from revengai.models.trigger_dynamic_execution_input_body import TriggerDynamicExecutionInputBody from revengai.models.ttp import Ttp from revengai.models.type_definition import TypeDefinition from revengai.models.update_function_data_types import UpdateFunctionDataTypes diff --git a/revengai/models/addr.py b/revengai/models/addr.py deleted file mode 100644 index 59e2422c..00000000 --- a/revengai/models/addr.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, ValidationError, field_validator -from typing import Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -ADDR_ANY_OF_SCHEMAS = ["int", "str"] - -class Addr(BaseModel): - """ - Addr - """ - - # data type: int - anyof_schema_1_validator: Optional[StrictInt] = None - # data type: str - anyof_schema_2_validator: Optional[StrictStr] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[int, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "int", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - if v is None: - return v - - instance = Addr.model_construct() - error_messages = [] - # validate data type: int - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: str - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in Addr with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - if json_str is None: - return instance - - error_messages = [] - # deserialize data into int - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into str - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into Addr with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/revengai/models/ai_decomp_inverse_function_map_item.py b/revengai/models/ai_decomp_inverse_function_map_item.py index 97632a11..5a502410 100644 --- a/revengai/models/ai_decomp_inverse_function_map_item.py +++ b/revengai/models/ai_decomp_inverse_function_map_item.py @@ -16,9 +16,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List -from revengai.models.numeric_addr import NumericAddr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,7 +25,7 @@ class AIDecompInverseFunctionMapItem(BaseModel): """ AIDecompInverseFunctionMapItem """ # noqa: E501 - addr: NumericAddr + addr: Optional[StrictInt] is_external: StrictBool name: StrictStr additional_properties: Dict[str, Any] = {} @@ -73,14 +72,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of addr - if self.addr: - _dict['addr'] = self.addr.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value + # set to None if addr (nullable) is None + # and model_fields_set contains the field + if self.addr is None and "addr" in self.model_fields_set: + _dict['addr'] = None + return _dict @classmethod @@ -93,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "addr": NumericAddr.from_dict(obj["addr"]) if obj.get("addr") is not None else None, + "addr": obj.get("addr"), "is_external": obj.get("is_external"), "name": obj.get("name") }) diff --git a/revengai/models/ai_decomp_inverse_string_map_item.py b/revengai/models/ai_decomp_inverse_string_map_item.py index 63330faa..d36c380a 100644 --- a/revengai/models/ai_decomp_inverse_string_map_item.py +++ b/revengai/models/ai_decomp_inverse_string_map_item.py @@ -16,9 +16,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from revengai.models.numeric_addr import NumericAddr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,7 +25,7 @@ class AIDecompInverseStringMapItem(BaseModel): """ AIDecompInverseStringMapItem """ # noqa: E501 - addr: NumericAddr + addr: Optional[StrictInt] string: StrictStr additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["addr", "string"] @@ -72,14 +71,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of addr - if self.addr: - _dict['addr'] = self.addr.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value + # set to None if addr (nullable) is None + # and model_fields_set contains the field + if self.addr is None and "addr" in self.model_fields_set: + _dict['addr'] = None + return _dict @classmethod @@ -92,7 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "addr": NumericAddr.from_dict(obj["addr"]) if obj.get("addr") is not None else None, + "addr": obj.get("addr"), "string": obj.get("string") }) # store additional fields in additional_properties diff --git a/revengai/models/ai_decompilation_task_status.py b/revengai/models/ai_decompilation_task_status.py deleted file mode 100644 index 6119af90..00000000 --- a/revengai/models/ai_decompilation_task_status.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class AiDecompilationTaskStatus(str, Enum): - """ - AiDecompilationTaskStatus - """ - - """ - allowed enum values - """ - UNINITIALISED = 'uninitialised' - ERROR = 'error' - PENDING = 'pending' - SUCCESS = 'success' - UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AiDecompilationTaskStatus from a JSON string""" - return cls(json.loads(json_str)) - - @classmethod - def _missing_(cls, value): - """Fall back to the unknown default for values not defined in the SDK.""" - return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API") - - diff --git a/revengai/models/analysis_log_message.py b/revengai/models/analysis_log_message.py index 67ace13e..6e8fbe71 100644 --- a/revengai/models/analysis_log_message.py +++ b/revengai/models/analysis_log_message.py @@ -17,7 +17,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -25,8 +25,8 @@ class AnalysisLogMessage(BaseModel): """ AnalysisLogMessage """ # noqa: E501 - message: Optional[StrictStr] - time: Optional[StrictStr] + message: StrictStr + time: StrictStr additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["message", "time"] @@ -76,16 +76,6 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if time (nullable) is None - # and model_fields_set contains the field - if self.time is None and "time" in self.model_fields_set: - _dict['time'] = None - return _dict @classmethod diff --git a/revengai/models/analysis_report.py b/revengai/models/analysis_report.py index b3a2587a..8af7db04 100644 --- a/revengai/models/analysis_report.py +++ b/revengai/models/analysis_report.py @@ -16,14 +16,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.artifact import Artifact +from revengai.models.console_output_entry import ConsoleOutputEntry from revengai.models.file_activity_entry import FileActivityEntry from revengai.models.module_load_entry import ModuleLoadEntry from revengai.models.mutex_entry import MutexEntry from revengai.models.network_activity import NetworkActivity from revengai.models.process_activity_entry import ProcessActivityEntry -from revengai.models.process_extracted_files import ProcessExtractedFiles from revengai.models.process_memdumps import ProcessMemdumps from revengai.models.process_tree import ProcessTree from revengai.models.registry_operation import RegistryOperation @@ -39,7 +40,8 @@ class AnalysisReport(BaseModel): """ AnalysisReport """ # noqa: E501 - extracted_files: Optional[List[ProcessExtractedFiles]] = None + artifacts: Optional[List[Artifact]] = None + console_output: Optional[List[ConsoleOutputEntry]] = None file_activity: Optional[List[FileActivityEntry]] = None info: ReportInfo memdumps: Optional[List[ProcessMemdumps]] = None @@ -52,10 +54,9 @@ class AnalysisReport(BaseModel): scheduled_tasks: Optional[List[ScheduledTaskEntry]] = None services: Optional[List[ServiceEntry]] = None startup: Optional[StartupInfo] = None - threat_score: StrictInt ttps: Optional[List[Ttp]] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["extracted_files", "file_activity", "info", "memdumps", "module_load_addresses", "mutexes", "network_activity", "process_activity", "process_tree", "registry_operations", "scheduled_tasks", "services", "startup", "threat_score", "ttps"] + __properties: ClassVar[List[str]] = ["artifacts", "console_output", "file_activity", "info", "memdumps", "module_load_addresses", "mutexes", "network_activity", "process_activity", "process_tree", "registry_operations", "scheduled_tasks", "services", "startup", "ttps"] model_config = ConfigDict( populate_by_name=True, @@ -98,13 +99,20 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in extracted_files (list) + # override the default output from pydantic by calling `to_dict()` of each item in artifacts (list) _items = [] - if self.extracted_files: - for _item_extracted_files in self.extracted_files: - if _item_extracted_files: - _items.append(_item_extracted_files.to_dict()) - _dict['extracted_files'] = _items + if self.artifacts: + for _item_artifacts in self.artifacts: + if _item_artifacts: + _items.append(_item_artifacts.to_dict()) + _dict['artifacts'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in console_output (list) + _items = [] + if self.console_output: + for _item_console_output in self.console_output: + if _item_console_output: + _items.append(_item_console_output.to_dict()) + _dict['console_output'] = _items # override the default output from pydantic by calling `to_dict()` of each item in file_activity (list) _items = [] if self.file_activity: @@ -185,10 +193,15 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if extracted_files (nullable) is None + # set to None if artifacts (nullable) is None + # and model_fields_set contains the field + if self.artifacts is None and "artifacts" in self.model_fields_set: + _dict['artifacts'] = None + + # set to None if console_output (nullable) is None # and model_fields_set contains the field - if self.extracted_files is None and "extracted_files" in self.model_fields_set: - _dict['extracted_files'] = None + if self.console_output is None and "console_output" in self.model_fields_set: + _dict['console_output'] = None # set to None if file_activity (nullable) is None # and model_fields_set contains the field @@ -247,7 +260,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "extracted_files": [ProcessExtractedFiles.from_dict(_item) for _item in obj["extracted_files"]] if obj.get("extracted_files") is not None else None, + "artifacts": [Artifact.from_dict(_item) for _item in obj["artifacts"]] if obj.get("artifacts") is not None else None, + "console_output": [ConsoleOutputEntry.from_dict(_item) for _item in obj["console_output"]] if obj.get("console_output") is not None else None, "file_activity": [FileActivityEntry.from_dict(_item) for _item in obj["file_activity"]] if obj.get("file_activity") is not None else None, "info": ReportInfo.from_dict(obj["info"]) if obj.get("info") is not None else None, "memdumps": [ProcessMemdumps.from_dict(_item) for _item in obj["memdumps"]] if obj.get("memdumps") is not None else None, @@ -260,7 +274,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "scheduled_tasks": [ScheduledTaskEntry.from_dict(_item) for _item in obj["scheduled_tasks"]] if obj.get("scheduled_tasks") is not None else None, "services": [ServiceEntry.from_dict(_item) for _item in obj["services"]] if obj.get("services") is not None else None, "startup": StartupInfo.from_dict(obj["startup"]) if obj.get("startup") is not None else None, - "threat_score": obj.get("threat_score"), "ttps": [Ttp.from_dict(_item) for _item in obj["ttps"]] if obj.get("ttps") is not None else None }) # store additional fields in additional_properties diff --git a/revengai/models/api_call.py b/revengai/models/api_call.py index 8225c980..ede185bb 100644 --- a/revengai/models/api_call.py +++ b/revengai/models/api_call.py @@ -28,7 +28,7 @@ class ApiCall(BaseModel): called_from: Optional[StrictStr] = None called_from_rva: Optional[StrictStr] = None from_module: Optional[StrictStr] = None - method: Optional[StrictStr] + method: StrictStr additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["called_from", "called_from_rva", "from_module", "method"] @@ -78,26 +78,6 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if called_from (nullable) is None - # and model_fields_set contains the field - if self.called_from is None and "called_from" in self.model_fields_set: - _dict['called_from'] = None - - # set to None if called_from_rva (nullable) is None - # and model_fields_set contains the field - if self.called_from_rva is None and "called_from_rva" in self.model_fields_set: - _dict['called_from_rva'] = None - - # set to None if from_module (nullable) is None - # and model_fields_set contains the field - if self.from_module is None and "from_module" in self.model_fields_set: - _dict['from_module'] = None - - # set to None if method (nullable) is None - # and model_fields_set contains the field - if self.method is None and "method" in self.model_fields_set: - _dict['method'] = None - return _dict @classmethod diff --git a/revengai/models/extracted_file_entry.py b/revengai/models/artifact.py similarity index 57% rename from revengai/models/extracted_file_entry.py rename to revengai/models/artifact.py index f4fbf4cb..c8963b37 100644 --- a/revengai/models/extracted_file_entry.py +++ b/revengai/models/artifact.py @@ -16,27 +16,44 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class ExtractedFileEntry(BaseModel): +class Artifact(BaseModel): """ - ExtractedFileEntry + Artifact """ # noqa: E501 - file_hash: Optional[StrictStr] = None - file_size: StrictInt + direction: Optional[StrictStr] = None + dump_addr: Optional[StrictStr] = None + dump_pid: Optional[StrictInt] = None file_type: Optional[StrictStr] = None - filename: Optional[StrictStr] - is_pe: Optional[StrictBool] = None + host: Optional[StrictStr] = None + is_pe: StrictBool mime_type: Optional[StrictStr] = None - reason: Optional[StrictStr] = None - seq_num: StrictInt + name: StrictStr + network_source: Optional[StrictStr] = None + original_filename: Optional[StrictStr] = None + path: StrictStr + process_seqid: Optional[StrictInt] = None + reason: StrictStr + response_status: Optional[StrictInt] = None sha256: Optional[StrictStr] = None - zip_filename: Optional[StrictStr] + size: StrictInt + source: StrictStr + uri: Optional[StrictStr] = None + was_mapped: Optional[StrictBool] = None + yara_hits: Optional[List[StrictStr]] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["file_hash", "file_size", "file_type", "filename", "is_pe", "mime_type", "reason", "seq_num", "sha256", "zip_filename"] + __properties: ClassVar[List[str]] = ["direction", "dump_addr", "dump_pid", "file_type", "host", "is_pe", "mime_type", "name", "network_source", "original_filename", "path", "process_seqid", "reason", "response_status", "sha256", "size", "source", "uri", "was_mapped", "yara_hits"] + + @field_validator('reason') + def reason_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['written_by_target_process', 'binary_detected', 'shellcode_detected', 'file_type_detected', 'yara_match', 'network_request', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('written_by_target_process', 'binary_detected', 'shellcode_detected', 'file_type_detected', 'yara_match', 'network_request', 'unknown_default_open_api')") + return value model_config = ConfigDict( populate_by_name=True, @@ -56,7 +73,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ExtractedFileEntry from a JSON string""" + """Create an instance of Artifact from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -84,46 +101,16 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if file_hash (nullable) is None - # and model_fields_set contains the field - if self.file_hash is None and "file_hash" in self.model_fields_set: - _dict['file_hash'] = None - - # set to None if file_type (nullable) is None - # and model_fields_set contains the field - if self.file_type is None and "file_type" in self.model_fields_set: - _dict['file_type'] = None - - # set to None if filename (nullable) is None - # and model_fields_set contains the field - if self.filename is None and "filename" in self.model_fields_set: - _dict['filename'] = None - - # set to None if mime_type (nullable) is None - # and model_fields_set contains the field - if self.mime_type is None and "mime_type" in self.model_fields_set: - _dict['mime_type'] = None - - # set to None if reason (nullable) is None - # and model_fields_set contains the field - if self.reason is None and "reason" in self.model_fields_set: - _dict['reason'] = None - - # set to None if sha256 (nullable) is None - # and model_fields_set contains the field - if self.sha256 is None and "sha256" in self.model_fields_set: - _dict['sha256'] = None - - # set to None if zip_filename (nullable) is None + # set to None if yara_hits (nullable) is None # and model_fields_set contains the field - if self.zip_filename is None and "zip_filename" in self.model_fields_set: - _dict['zip_filename'] = None + if self.yara_hits is None and "yara_hits" in self.model_fields_set: + _dict['yara_hits'] = None return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ExtractedFileEntry from a dict""" + """Create an instance of Artifact from a dict""" if obj is None: return None @@ -131,16 +118,26 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "file_hash": obj.get("file_hash"), - "file_size": obj.get("file_size"), + "direction": obj.get("direction"), + "dump_addr": obj.get("dump_addr"), + "dump_pid": obj.get("dump_pid"), "file_type": obj.get("file_type"), - "filename": obj.get("filename"), + "host": obj.get("host"), "is_pe": obj.get("is_pe"), "mime_type": obj.get("mime_type"), + "name": obj.get("name"), + "network_source": obj.get("network_source"), + "original_filename": obj.get("original_filename"), + "path": obj.get("path"), + "process_seqid": obj.get("process_seqid"), "reason": obj.get("reason"), - "seq_num": obj.get("seq_num"), + "response_status": obj.get("response_status"), "sha256": obj.get("sha256"), - "zip_filename": obj.get("zip_filename") + "size": obj.get("size"), + "source": obj.get("source"), + "uri": obj.get("uri"), + "was_mapped": obj.get("was_mapped"), + "yara_hits": obj.get("yara_hits") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/base_response_function_task_response.py b/revengai/models/base_response_function_task_response.py deleted file mode 100644 index 71378df7..00000000 --- a/revengai/models/base_response_function_task_response.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.error_model import ErrorModel -from revengai.models.function_task_response import FunctionTaskResponse -from revengai.models.meta_model import MetaModel -from typing import Optional, Set -from typing_extensions import Self - -class BaseResponseFunctionTaskResponse(BaseModel): - """ - BaseResponseFunctionTaskResponse - """ # noqa: E501 - status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[FunctionTaskResponse] = None - message: Optional[StrictStr] = None - errors: Optional[List[ErrorModel]] = None - meta: Optional[MetaModel] = Field(default=None, description="Metadata") - __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] - - 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 BaseResponseFunctionTaskResponse 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item_errors in self.errors: - if _item_errors: - _items.append(_item_errors.to_dict()) - _dict['errors'] = _items - # override the default output from pydantic by calling `to_dict()` of meta - if self.meta: - _dict['meta'] = self.meta.to_dict() - # set to None if data (nullable) is None - # and model_fields_set contains the field - if self.data is None and "data" in self.model_fields_set: - _dict['data'] = None - - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if errors (nullable) is None - # and model_fields_set contains the field - if self.errors is None and "errors" in self.model_fields_set: - _dict['errors'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BaseResponseFunctionTaskResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status") if obj.get("status") is not None else True, - "data": FunctionTaskResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": obj.get("message"), - "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, - "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None - }) - return _obj - - diff --git a/revengai/models/base_response_get_ai_decompilation_task.py b/revengai/models/base_response_get_ai_decompilation_task.py deleted file mode 100644 index 87fd5df7..00000000 --- a/revengai/models/base_response_get_ai_decompilation_task.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.error_model import ErrorModel -from revengai.models.get_ai_decompilation_task import GetAiDecompilationTask -from revengai.models.meta_model import MetaModel -from typing import Optional, Set -from typing_extensions import Self - -class BaseResponseGetAiDecompilationTask(BaseModel): - """ - BaseResponseGetAiDecompilationTask - """ # noqa: E501 - status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[GetAiDecompilationTask] = None - message: Optional[StrictStr] = None - errors: Optional[List[ErrorModel]] = None - meta: Optional[MetaModel] = Field(default=None, description="Metadata") - __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] - - 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 BaseResponseGetAiDecompilationTask 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item_errors in self.errors: - if _item_errors: - _items.append(_item_errors.to_dict()) - _dict['errors'] = _items - # override the default output from pydantic by calling `to_dict()` of meta - if self.meta: - _dict['meta'] = self.meta.to_dict() - # set to None if data (nullable) is None - # and model_fields_set contains the field - if self.data is None and "data" in self.model_fields_set: - _dict['data'] = None - - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if errors (nullable) is None - # and model_fields_set contains the field - if self.errors is None and "errors" in self.model_fields_set: - _dict['errors'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BaseResponseGetAiDecompilationTask from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status") if obj.get("status") is not None else True, - "data": GetAiDecompilationTask.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": obj.get("message"), - "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, - "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None - }) - return _obj - - diff --git a/revengai/models/connection.py b/revengai/models/connection.py index 87b8a895..cdc5760d 100644 --- a/revengai/models/connection.py +++ b/revengai/models/connection.py @@ -16,9 +16,10 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from revengai.models.report_event import ReportEvent +from revengai.models.tcp_carved_file import TcpCarvedFile from typing import Optional, Set from typing_extensions import Self @@ -26,14 +27,19 @@ class Connection(BaseModel): """ Connection """ # noqa: E501 + bytes_received: Optional[StrictInt] = None + bytes_sent: Optional[StrictInt] = None events: Optional[List[ReportEvent]] = None - local_ip: Optional[StrictStr] + ja3: Optional[StrictStr] = None + ja3s: Optional[StrictStr] = None + local_ip: StrictStr local_port: Optional[Any] - protocol: Optional[StrictStr] - remote_ip: Optional[StrictStr] + protocol: StrictStr + remote_ip: StrictStr remote_port: Optional[Any] + tcp_carved_files: Optional[List[TcpCarvedFile]] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["events", "local_ip", "local_port", "protocol", "remote_ip", "remote_port"] + __properties: ClassVar[List[str]] = ["bytes_received", "bytes_sent", "events", "ja3", "ja3s", "local_ip", "local_port", "protocol", "remote_ip", "remote_port", "tcp_carved_files"] model_config = ConfigDict( populate_by_name=True, @@ -83,6 +89,13 @@ def to_dict(self) -> Dict[str, Any]: if _item_events: _items.append(_item_events.to_dict()) _dict['events'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in tcp_carved_files (list) + _items = [] + if self.tcp_carved_files: + for _item_tcp_carved_files in self.tcp_carved_files: + if _item_tcp_carved_files: + _items.append(_item_tcp_carved_files.to_dict()) + _dict['tcp_carved_files'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -93,31 +106,21 @@ def to_dict(self) -> Dict[str, Any]: if self.events is None and "events" in self.model_fields_set: _dict['events'] = None - # set to None if local_ip (nullable) is None - # and model_fields_set contains the field - if self.local_ip is None and "local_ip" in self.model_fields_set: - _dict['local_ip'] = None - # set to None if local_port (nullable) is None # and model_fields_set contains the field if self.local_port is None and "local_port" in self.model_fields_set: _dict['local_port'] = None - # set to None if protocol (nullable) is None - # and model_fields_set contains the field - if self.protocol is None and "protocol" in self.model_fields_set: - _dict['protocol'] = None - - # set to None if remote_ip (nullable) is None - # and model_fields_set contains the field - if self.remote_ip is None and "remote_ip" in self.model_fields_set: - _dict['remote_ip'] = None - # set to None if remote_port (nullable) is None # and model_fields_set contains the field if self.remote_port is None and "remote_port" in self.model_fields_set: _dict['remote_port'] = None + # set to None if tcp_carved_files (nullable) is None + # and model_fields_set contains the field + if self.tcp_carved_files is None and "tcp_carved_files" in self.model_fields_set: + _dict['tcp_carved_files'] = None + return _dict @classmethod @@ -130,12 +133,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "bytes_received": obj.get("bytes_received"), + "bytes_sent": obj.get("bytes_sent"), "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "ja3": obj.get("ja3"), + "ja3s": obj.get("ja3s"), "local_ip": obj.get("local_ip"), "local_port": obj.get("local_port"), "protocol": obj.get("protocol"), "remote_ip": obj.get("remote_ip"), - "remote_port": obj.get("remote_port") + "remote_port": obj.get("remote_port"), + "tcp_carved_files": [TcpCarvedFile.from_dict(_item) for _item in obj["tcp_carved_files"]] if obj.get("tcp_carved_files") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/numeric_addr.py b/revengai/models/console_output_entry.py similarity index 81% rename from revengai/models/numeric_addr.py rename to revengai/models/console_output_entry.py index a3dab85a..9265721f 100644 --- a/revengai/models/numeric_addr.py +++ b/revengai/models/console_output_entry.py @@ -16,18 +16,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class NumericAddr(BaseModel): +class ConsoleOutputEntry(BaseModel): """ - NumericAddr + ConsoleOutputEntry """ # noqa: E501 - value: Optional[StrictInt] = Field(alias="Value") + output: StrictStr + process_seqid: StrictInt additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["Value"] + __properties: ClassVar[List[str]] = ["output", "process_seqid"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NumericAddr from a JSON string""" + """Create an instance of ConsoleOutputEntry from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,16 +76,11 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if value (nullable) is None - # and model_fields_set contains the field - if self.value is None and "value" in self.model_fields_set: - _dict['Value'] = None - return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NumericAddr from a dict""" + """Create an instance of ConsoleOutputEntry from a dict""" if obj is None: return None @@ -92,7 +88,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "Value": obj.get("Value") + "output": obj.get("output"), + "process_seqid": obj.get("process_seqid") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/dns_query.py b/revengai/models/dns_query.py index 7b8a0512..d0c915e1 100644 --- a/revengai/models/dns_query.py +++ b/revengai/models/dns_query.py @@ -16,7 +16,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from revengai.models.report_event import ReportEvent from typing import Optional, Set @@ -26,10 +26,13 @@ class DnsQuery(BaseModel): """ DnsQuery """ # noqa: E501 - domain: Optional[StrictStr] + cname_chain: Optional[List[StrictStr]] = None + domain: StrictStr events: Optional[List[ReportEvent]] = None + min_ttl: Optional[StrictInt] = None + resolved_ips: Optional[List[StrictStr]] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["domain", "events"] + __properties: ClassVar[List[str]] = ["cname_chain", "domain", "events", "min_ttl", "resolved_ips"] model_config = ConfigDict( populate_by_name=True, @@ -84,16 +87,21 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if domain (nullable) is None + # set to None if cname_chain (nullable) is None # and model_fields_set contains the field - if self.domain is None and "domain" in self.model_fields_set: - _dict['domain'] = None + if self.cname_chain is None and "cname_chain" in self.model_fields_set: + _dict['cname_chain'] = None # set to None if events (nullable) is None # and model_fields_set contains the field if self.events is None and "events" in self.model_fields_set: _dict['events'] = None + # set to None if resolved_ips (nullable) is None + # and model_fields_set contains the field + if self.resolved_ips is None and "resolved_ips" in self.model_fields_set: + _dict['resolved_ips'] = None + return _dict @classmethod @@ -106,8 +114,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "cname_chain": obj.get("cname_chain"), "domain": obj.get("domain"), - "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None + "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "min_ttl": obj.get("min_ttl"), + "resolved_ips": obj.get("resolved_ips") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/drakvuf_file_metadata.py b/revengai/models/drakvuf_file_metadata.py index 225e0b45..79c54dd6 100644 --- a/revengai/models/drakvuf_file_metadata.py +++ b/revengai/models/drakvuf_file_metadata.py @@ -26,8 +26,8 @@ class DrakvufFileMetadata(BaseModel): DrakvufFileMetadata """ # noqa: E501 mime_type: Optional[StrictStr] = None - name: Optional[StrictStr] - sha256: Optional[StrictStr] + name: StrictStr + sha256: StrictStr type: Optional[StrictStr] = None type_id: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} @@ -79,31 +79,6 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if mime_type (nullable) is None - # and model_fields_set contains the field - if self.mime_type is None and "mime_type" in self.model_fields_set: - _dict['mime_type'] = None - - # set to None if name (nullable) is None - # and model_fields_set contains the field - if self.name is None and "name" in self.model_fields_set: - _dict['name'] = None - - # set to None if sha256 (nullable) is None - # and model_fields_set contains the field - if self.sha256 is None and "sha256" in self.model_fields_set: - _dict['sha256'] = None - - # set to None if type (nullable) is None - # and model_fields_set contains the field - if self.type is None and "type" in self.model_fields_set: - _dict['type'] = None - - # set to None if type_id (nullable) is None - # and model_fields_set contains the field - if self.type_id is None and "type_id" in self.model_fields_set: - _dict['type_id'] = None - return _dict @classmethod diff --git a/revengai/models/dynamic_execution_status_response.py b/revengai/models/dynamic_execution_status_response.py index 50021544..2fdfa647 100644 --- a/revengai/models/dynamic_execution_status_response.py +++ b/revengai/models/dynamic_execution_status_response.py @@ -26,9 +26,9 @@ class DynamicExecutionStatusResponse(BaseModel): """ DynamicExecutionStatusResponse """ # noqa: E501 - error_message: Optional[StrictStr] = Field(default=None, description="Error detail, set when status is ERROR") + error_message: Optional[StrictStr] = Field(default=None, description="Error detail, set when status is FAILED") logs: AnalysisLogs = Field(description="Sandbox status log messages captured during the run. Contains a single \"No logs available\" message when none have been captured yet.") - status: StrictStr = Field(description="Task status: UNINITIALISED, PENDING, RUNNING, COMPLETED, or ERROR") + status: StrictStr = Field(description="Task status: UNINITIALISED, PENDING, RUNNING, COMPLETED, or FAILED") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["error_message", "logs", "status"] diff --git a/revengai/models/extracted_url.py b/revengai/models/extracted_url.py index e8f1a193..eecaa640 100644 --- a/revengai/models/extracted_url.py +++ b/revengai/models/extracted_url.py @@ -27,7 +27,7 @@ class ExtractedURL(BaseModel): ExtractedURL """ # noqa: E501 events: Optional[List[ReportEvent]] = None - url: Optional[StrictStr] + url: StrictStr additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["events", "url"] @@ -89,11 +89,6 @@ def to_dict(self) -> Dict[str, Any]: if self.events is None and "events" in self.model_fields_set: _dict['events'] = None - # set to None if url (nullable) is None - # and model_fields_set contains the field - if self.url is None and "url" in self.model_fields_set: - _dict['url'] = None - return _dict @classmethod diff --git a/revengai/models/file_activity_entry.py b/revengai/models/file_activity_entry.py index 1fdffcb5..f0393d75 100644 --- a/revengai/models/file_activity_entry.py +++ b/revengai/models/file_activity_entry.py @@ -27,7 +27,7 @@ class FileActivityEntry(BaseModel): FileActivityEntry """ # noqa: E501 events: Optional[List[ReportEvent]] = None - path: Optional[StrictStr] + path: StrictStr additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["events", "path"] @@ -89,11 +89,6 @@ def to_dict(self) -> Dict[str, Any]: if self.events is None and "events" in self.model_fields_set: _dict['events'] = None - # set to None if path (nullable) is None - # and model_fields_set contains the field - if self.path is None and "path" in self.model_fields_set: - _dict['path'] = None - return _dict @classmethod diff --git a/revengai/models/function_comment_create_request.py b/revengai/models/function_comment_create_request.py deleted file mode 100644 index e86d7289..00000000 --- a/revengai/models/function_comment_create_request.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.decompilation_comment_context import DecompilationCommentContext -from typing import Optional, Set -from typing_extensions import Self - -class FunctionCommentCreateRequest(BaseModel): - """ - FunctionCommentCreateRequest - """ # noqa: E501 - content: StrictStr = Field(description="Comment text content") - context: Optional[DecompilationCommentContext] = Field(default=None, description="Comment context for a function decompilation") - __properties: ClassVar[List[str]] = ["content", "context"] - - 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 FunctionCommentCreateRequest 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of context - if self.context: - _dict['context'] = self.context.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FunctionCommentCreateRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "content": obj.get("content"), - "context": DecompilationCommentContext.from_dict(obj["context"]) if obj.get("context") is not None else None - }) - return _obj - - diff --git a/revengai/models/function_mapping_full.py b/revengai/models/function_mapping_full.py deleted file mode 100644 index 7e5233b5..00000000 --- a/revengai/models/function_mapping_full.py +++ /dev/null @@ -1,277 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.inverse_function_map_item import InverseFunctionMapItem -from revengai.models.inverse_string_map_item import InverseStringMapItem -from revengai.models.inverse_value import InverseValue -from typing import Optional, Set -from typing_extensions import Self - -class FunctionMappingFull(BaseModel): - """ - FunctionMappingFull - """ # noqa: E501 - inverse_string_map: Dict[str, InverseStringMapItem] - inverse_function_map: Dict[str, InverseFunctionMapItem] - unmatched_functions: Dict[str, InverseValue] - unmatched_custom_types: Dict[str, InverseValue] - unmatched_strings: Dict[str, InverseValue] - unmatched_vars: Dict[str, InverseValue] - unmatched_go_to_labels: Dict[str, InverseValue] - unmatched_custom_function_pointers: Dict[str, InverseValue] - unmatched_variadic_lists: Dict[str, InverseValue] - unmatched_enums: Dict[str, InverseValue] - unmatched_global_vars: Dict[str, InverseValue] - fields: Dict[str, Dict[str, InverseValue]] - unmatched_external_vars: Optional[Dict[str, InverseValue]] = Field(default=None, description="No longer provided.") - user_override_mappings: Optional[Dict[str, StrictStr]] = None - __properties: ClassVar[List[str]] = ["inverse_string_map", "inverse_function_map", "unmatched_functions", "unmatched_custom_types", "unmatched_strings", "unmatched_vars", "unmatched_go_to_labels", "unmatched_custom_function_pointers", "unmatched_variadic_lists", "unmatched_enums", "unmatched_global_vars", "fields", "unmatched_external_vars", "user_override_mappings"] - - 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 FunctionMappingFull 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each value in inverse_string_map (dict) - _field_dict = {} - if self.inverse_string_map: - for _key_inverse_string_map in self.inverse_string_map: - if self.inverse_string_map[_key_inverse_string_map]: - _field_dict[_key_inverse_string_map] = self.inverse_string_map[_key_inverse_string_map].to_dict() - _dict['inverse_string_map'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of each value in inverse_function_map (dict) - _field_dict = {} - if self.inverse_function_map: - for _key_inverse_function_map in self.inverse_function_map: - if self.inverse_function_map[_key_inverse_function_map]: - _field_dict[_key_inverse_function_map] = self.inverse_function_map[_key_inverse_function_map].to_dict() - _dict['inverse_function_map'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of each value in unmatched_functions (dict) - _field_dict = {} - if self.unmatched_functions: - for _key_unmatched_functions in self.unmatched_functions: - if self.unmatched_functions[_key_unmatched_functions]: - _field_dict[_key_unmatched_functions] = self.unmatched_functions[_key_unmatched_functions].to_dict() - _dict['unmatched_functions'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of each value in unmatched_custom_types (dict) - _field_dict = {} - if self.unmatched_custom_types: - for _key_unmatched_custom_types in self.unmatched_custom_types: - if self.unmatched_custom_types[_key_unmatched_custom_types]: - _field_dict[_key_unmatched_custom_types] = self.unmatched_custom_types[_key_unmatched_custom_types].to_dict() - _dict['unmatched_custom_types'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of each value in unmatched_strings (dict) - _field_dict = {} - if self.unmatched_strings: - for _key_unmatched_strings in self.unmatched_strings: - if self.unmatched_strings[_key_unmatched_strings]: - _field_dict[_key_unmatched_strings] = self.unmatched_strings[_key_unmatched_strings].to_dict() - _dict['unmatched_strings'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of each value in unmatched_vars (dict) - _field_dict = {} - if self.unmatched_vars: - for _key_unmatched_vars in self.unmatched_vars: - if self.unmatched_vars[_key_unmatched_vars]: - _field_dict[_key_unmatched_vars] = self.unmatched_vars[_key_unmatched_vars].to_dict() - _dict['unmatched_vars'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of each value in unmatched_go_to_labels (dict) - _field_dict = {} - if self.unmatched_go_to_labels: - for _key_unmatched_go_to_labels in self.unmatched_go_to_labels: - if self.unmatched_go_to_labels[_key_unmatched_go_to_labels]: - _field_dict[_key_unmatched_go_to_labels] = self.unmatched_go_to_labels[_key_unmatched_go_to_labels].to_dict() - _dict['unmatched_go_to_labels'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of each value in unmatched_custom_function_pointers (dict) - _field_dict = {} - if self.unmatched_custom_function_pointers: - for _key_unmatched_custom_function_pointers in self.unmatched_custom_function_pointers: - if self.unmatched_custom_function_pointers[_key_unmatched_custom_function_pointers]: - _field_dict[_key_unmatched_custom_function_pointers] = self.unmatched_custom_function_pointers[_key_unmatched_custom_function_pointers].to_dict() - _dict['unmatched_custom_function_pointers'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of each value in unmatched_variadic_lists (dict) - _field_dict = {} - if self.unmatched_variadic_lists: - for _key_unmatched_variadic_lists in self.unmatched_variadic_lists: - if self.unmatched_variadic_lists[_key_unmatched_variadic_lists]: - _field_dict[_key_unmatched_variadic_lists] = self.unmatched_variadic_lists[_key_unmatched_variadic_lists].to_dict() - _dict['unmatched_variadic_lists'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of each value in unmatched_enums (dict) - _field_dict = {} - if self.unmatched_enums: - for _key_unmatched_enums in self.unmatched_enums: - if self.unmatched_enums[_key_unmatched_enums]: - _field_dict[_key_unmatched_enums] = self.unmatched_enums[_key_unmatched_enums].to_dict() - _dict['unmatched_enums'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of each value in unmatched_global_vars (dict) - _field_dict = {} - if self.unmatched_global_vars: - for _key_unmatched_global_vars in self.unmatched_global_vars: - if self.unmatched_global_vars[_key_unmatched_global_vars]: - _field_dict[_key_unmatched_global_vars] = self.unmatched_global_vars[_key_unmatched_global_vars].to_dict() - _dict['unmatched_global_vars'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of each value in fields (dict) - _field_dict = {} - if self.fields: - for _key_fields in self.fields: - if self.fields[_key_fields]: - _field_dict[_key_fields] = self.fields[_key_fields].to_dict() - _dict['fields'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of each value in unmatched_external_vars (dict) - _field_dict = {} - if self.unmatched_external_vars: - for _key_unmatched_external_vars in self.unmatched_external_vars: - if self.unmatched_external_vars[_key_unmatched_external_vars]: - _field_dict[_key_unmatched_external_vars] = self.unmatched_external_vars[_key_unmatched_external_vars].to_dict() - _dict['unmatched_external_vars'] = _field_dict - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FunctionMappingFull from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "inverse_string_map": dict( - (_k, InverseStringMapItem.from_dict(_v)) - for _k, _v in obj["inverse_string_map"].items() - ) - if obj.get("inverse_string_map") is not None - else None, - "inverse_function_map": dict( - (_k, InverseFunctionMapItem.from_dict(_v)) - for _k, _v in obj["inverse_function_map"].items() - ) - if obj.get("inverse_function_map") is not None - else None, - "unmatched_functions": dict( - (_k, InverseValue.from_dict(_v)) - for _k, _v in obj["unmatched_functions"].items() - ) - if obj.get("unmatched_functions") is not None - else None, - "unmatched_custom_types": dict( - (_k, InverseValue.from_dict(_v)) - for _k, _v in obj["unmatched_custom_types"].items() - ) - if obj.get("unmatched_custom_types") is not None - else None, - "unmatched_strings": dict( - (_k, InverseValue.from_dict(_v)) - for _k, _v in obj["unmatched_strings"].items() - ) - if obj.get("unmatched_strings") is not None - else None, - "unmatched_vars": dict( - (_k, InverseValue.from_dict(_v)) - for _k, _v in obj["unmatched_vars"].items() - ) - if obj.get("unmatched_vars") is not None - else None, - "unmatched_go_to_labels": dict( - (_k, InverseValue.from_dict(_v)) - for _k, _v in obj["unmatched_go_to_labels"].items() - ) - if obj.get("unmatched_go_to_labels") is not None - else None, - "unmatched_custom_function_pointers": dict( - (_k, InverseValue.from_dict(_v)) - for _k, _v in obj["unmatched_custom_function_pointers"].items() - ) - if obj.get("unmatched_custom_function_pointers") is not None - else None, - "unmatched_variadic_lists": dict( - (_k, InverseValue.from_dict(_v)) - for _k, _v in obj["unmatched_variadic_lists"].items() - ) - if obj.get("unmatched_variadic_lists") is not None - else None, - "unmatched_enums": dict( - (_k, InverseValue.from_dict(_v)) - for _k, _v in obj["unmatched_enums"].items() - ) - if obj.get("unmatched_enums") is not None - else None, - "unmatched_global_vars": dict( - (_k, InverseValue.from_dict(_v)) - for _k, _v in obj["unmatched_global_vars"].items() - ) - if obj.get("unmatched_global_vars") is not None - else None, - "fields": dict( - (_k, dict( - (_ik, InverseValue.from_dict(_iv)) - for _ik, _iv in _v.items() - ) - if _v is not None - else None - ) - for _k, _v in obj.get("fields").items() - ) - if obj.get("fields") is not None - else None, - "unmatched_external_vars": dict( - (_k, InverseValue.from_dict(_v)) - for _k, _v in obj["unmatched_external_vars"].items() - ) - if obj.get("unmatched_external_vars") is not None - else None, - "user_override_mappings": obj.get("user_override_mappings") - }) - return _obj - - diff --git a/revengai/models/function_task_response.py b/revengai/models/function_task_response.py deleted file mode 100644 index 25249e40..00000000 --- a/revengai/models/function_task_response.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.function_task_status import FunctionTaskStatus -from typing import Optional, Set -from typing_extensions import Self - -class FunctionTaskResponse(BaseModel): - """ - FunctionTaskResponse - """ # noqa: E501 - status: Optional[FunctionTaskStatus] = None - error_message: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["status", "error_message"] - - 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 FunctionTaskResponse 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if error_message (nullable) is None - # and model_fields_set contains the field - if self.error_message is None and "error_message" in self.model_fields_set: - _dict['error_message'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FunctionTaskResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status"), - "error_message": obj.get("error_message") - }) - return _obj - - diff --git a/revengai/models/function_task_status.py b/revengai/models/function_task_status.py deleted file mode 100644 index 3358b825..00000000 --- a/revengai/models/function_task_status.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class FunctionTaskStatus(str, Enum): - """ - FunctionTaskStatus - """ - - """ - allowed enum values - """ - UNINITIALISED = 'UNINITIALISED' - PENDING = 'PENDING' - RUNNING = 'RUNNING' - COMPLETED = 'COMPLETED' - FAILED = 'FAILED' - UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of FunctionTaskStatus from a JSON string""" - return cls(json.loads(json_str)) - - @classmethod - def _missing_(cls, value): - """Fall back to the unknown default for values not defined in the SDK.""" - return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API") - - diff --git a/revengai/models/get_ai_decompilation_task.py b/revengai/models/get_ai_decompilation_task.py deleted file mode 100644 index 9dba9542..00000000 --- a/revengai/models/get_ai_decompilation_task.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.ai_decompilation_task_status import AiDecompilationTaskStatus -from revengai.models.function_mapping_full import FunctionMappingFull -from revengai.models.inverse_function_map_item import InverseFunctionMapItem -from typing import Optional, Set -from typing_extensions import Self - -class GetAiDecompilationTask(BaseModel): - """ - GetAiDecompilationTask - """ # noqa: E501 - status: AiDecompilationTaskStatus = Field(description="The status of the AI decompilation task") - decompilation: Optional[StrictStr] - raw_decompilation: Optional[StrictStr] - function_mapping: Optional[Dict[str, InverseFunctionMapItem]] - function_mapping_full: Optional[FunctionMappingFull] - summary: Optional[StrictStr] = None - ai_summary: Optional[StrictStr] = None - raw_ai_summary: Optional[StrictStr] = None - predicted_function_name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["status", "decompilation", "raw_decompilation", "function_mapping", "function_mapping_full", "summary", "ai_summary", "raw_ai_summary", "predicted_function_name"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GetAiDecompilationTask 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each value in function_mapping (dict) - _field_dict = {} - if self.function_mapping: - for _key_function_mapping in self.function_mapping: - if self.function_mapping[_key_function_mapping]: - _field_dict[_key_function_mapping] = self.function_mapping[_key_function_mapping].to_dict() - _dict['function_mapping'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of function_mapping_full - if self.function_mapping_full: - _dict['function_mapping_full'] = self.function_mapping_full.to_dict() - # set to None if decompilation (nullable) is None - # and model_fields_set contains the field - if self.decompilation is None and "decompilation" in self.model_fields_set: - _dict['decompilation'] = None - - # set to None if raw_decompilation (nullable) is None - # and model_fields_set contains the field - if self.raw_decompilation is None and "raw_decompilation" in self.model_fields_set: - _dict['raw_decompilation'] = None - - # set to None if function_mapping (nullable) is None - # and model_fields_set contains the field - if self.function_mapping is None and "function_mapping" in self.model_fields_set: - _dict['function_mapping'] = None - - # set to None if function_mapping_full (nullable) is None - # and model_fields_set contains the field - if self.function_mapping_full is None and "function_mapping_full" in self.model_fields_set: - _dict['function_mapping_full'] = None - - # set to None if summary (nullable) is None - # and model_fields_set contains the field - if self.summary is None and "summary" in self.model_fields_set: - _dict['summary'] = None - - # set to None if ai_summary (nullable) is None - # and model_fields_set contains the field - if self.ai_summary is None and "ai_summary" in self.model_fields_set: - _dict['ai_summary'] = None - - # set to None if raw_ai_summary (nullable) is None - # and model_fields_set contains the field - if self.raw_ai_summary is None and "raw_ai_summary" in self.model_fields_set: - _dict['raw_ai_summary'] = None - - # set to None if predicted_function_name (nullable) is None - # and model_fields_set contains the field - if self.predicted_function_name is None and "predicted_function_name" in self.model_fields_set: - _dict['predicted_function_name'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GetAiDecompilationTask from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status"), - "decompilation": obj.get("decompilation"), - "raw_decompilation": obj.get("raw_decompilation"), - "function_mapping": dict( - (_k, InverseFunctionMapItem.from_dict(_v)) - for _k, _v in obj["function_mapping"].items() - ) - if obj.get("function_mapping") is not None - else None, - "function_mapping_full": FunctionMappingFull.from_dict(obj["function_mapping_full"]) if obj.get("function_mapping_full") is not None else None, - "summary": obj.get("summary"), - "ai_summary": obj.get("ai_summary"), - "raw_ai_summary": obj.get("raw_ai_summary"), - "predicted_function_name": obj.get("predicted_function_name") - }) - return _obj - - diff --git a/revengai/models/http_request.py b/revengai/models/http_request.py index 939eae68..79752c8c 100644 --- a/revengai/models/http_request.py +++ b/revengai/models/http_request.py @@ -18,6 +18,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.pcap_body_info import PcapBodyInfo from revengai.models.report_event import ReportEvent from typing import Optional, Set from typing_extensions import Self @@ -26,15 +27,22 @@ class HttpRequest(BaseModel): """ HttpRequest """ # noqa: E501 + bytes_received: Optional[StrictInt] = None + bytes_sent: Optional[StrictInt] = None events: Optional[List[ReportEvent]] = None extra_headers: Optional[List[StrictStr]] = None flags: Optional[StrictInt] = None password: Optional[StrictStr] = None path: Optional[StrictStr] = None + pcap_stream_id: Optional[StrictInt] = None post_data: Optional[StrictStr] = None proxy: Optional[StrictStr] = None proxy_bypass: Optional[StrictStr] = None referer: Optional[StrictStr] = None + request_body: Optional[PcapBodyInfo] = None + response_body: Optional[PcapBodyInfo] = None + response_status: Optional[StrictInt] = None + server_ip: Optional[StrictStr] = None server_name: Optional[StrictStr] = None server_port: Optional[StrictInt] = None service: Optional[StrictInt] = None @@ -43,7 +51,7 @@ class HttpRequest(BaseModel): verb: Optional[StrictStr] = None version: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["events", "extra_headers", "flags", "password", "path", "post_data", "proxy", "proxy_bypass", "referer", "server_name", "server_port", "service", "user_agent", "username", "verb", "version"] + __properties: ClassVar[List[str]] = ["bytes_received", "bytes_sent", "events", "extra_headers", "flags", "password", "path", "pcap_stream_id", "post_data", "proxy", "proxy_bypass", "referer", "request_body", "response_body", "response_status", "server_ip", "server_name", "server_port", "service", "user_agent", "username", "verb", "version"] model_config = ConfigDict( populate_by_name=True, @@ -93,6 +101,12 @@ def to_dict(self) -> Dict[str, Any]: if _item_events: _items.append(_item_events.to_dict()) _dict['events'] = _items + # override the default output from pydantic by calling `to_dict()` of request_body + if self.request_body: + _dict['request_body'] = self.request_body.to_dict() + # override the default output from pydantic by calling `to_dict()` of response_body + if self.response_body: + _dict['response_body'] = self.response_body.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -108,61 +122,6 @@ def to_dict(self) -> Dict[str, Any]: if self.extra_headers is None and "extra_headers" in self.model_fields_set: _dict['extra_headers'] = None - # set to None if password (nullable) is None - # and model_fields_set contains the field - if self.password is None and "password" in self.model_fields_set: - _dict['password'] = None - - # set to None if path (nullable) is None - # and model_fields_set contains the field - if self.path is None and "path" in self.model_fields_set: - _dict['path'] = None - - # set to None if post_data (nullable) is None - # and model_fields_set contains the field - if self.post_data is None and "post_data" in self.model_fields_set: - _dict['post_data'] = None - - # set to None if proxy (nullable) is None - # and model_fields_set contains the field - if self.proxy is None and "proxy" in self.model_fields_set: - _dict['proxy'] = None - - # set to None if proxy_bypass (nullable) is None - # and model_fields_set contains the field - if self.proxy_bypass is None and "proxy_bypass" in self.model_fields_set: - _dict['proxy_bypass'] = None - - # set to None if referer (nullable) is None - # and model_fields_set contains the field - if self.referer is None and "referer" in self.model_fields_set: - _dict['referer'] = None - - # set to None if server_name (nullable) is None - # and model_fields_set contains the field - if self.server_name is None and "server_name" in self.model_fields_set: - _dict['server_name'] = None - - # set to None if user_agent (nullable) is None - # and model_fields_set contains the field - if self.user_agent is None and "user_agent" in self.model_fields_set: - _dict['user_agent'] = None - - # set to None if username (nullable) is None - # and model_fields_set contains the field - if self.username is None and "username" in self.model_fields_set: - _dict['username'] = None - - # set to None if verb (nullable) is None - # and model_fields_set contains the field - if self.verb is None and "verb" in self.model_fields_set: - _dict['verb'] = None - - # set to None if version (nullable) is None - # and model_fields_set contains the field - if self.version is None and "version" in self.model_fields_set: - _dict['version'] = None - return _dict @classmethod @@ -175,15 +134,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "bytes_received": obj.get("bytes_received"), + "bytes_sent": obj.get("bytes_sent"), "events": [ReportEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, "extra_headers": obj.get("extra_headers"), "flags": obj.get("flags"), "password": obj.get("password"), "path": obj.get("path"), + "pcap_stream_id": obj.get("pcap_stream_id"), "post_data": obj.get("post_data"), "proxy": obj.get("proxy"), "proxy_bypass": obj.get("proxy_bypass"), "referer": obj.get("referer"), + "request_body": PcapBodyInfo.from_dict(obj["request_body"]) if obj.get("request_body") is not None else None, + "response_body": PcapBodyInfo.from_dict(obj["response_body"]) if obj.get("response_body") is not None else None, + "response_status": obj.get("response_status"), + "server_ip": obj.get("server_ip"), "server_name": obj.get("server_name"), "server_port": obj.get("server_port"), "service": obj.get("service"), diff --git a/revengai/models/inverse_function_map_item.py b/revengai/models/inverse_function_map_item.py deleted file mode 100644 index 0d044c28..00000000 --- a/revengai/models/inverse_function_map_item.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.addr import Addr -from typing import Optional, Set -from typing_extensions import Self - -class InverseFunctionMapItem(BaseModel): - """ - InverseFunctionMapItem - """ # noqa: E501 - name: StrictStr - addr: Optional[Addr] - is_external: Optional[StrictBool] = False - __properties: ClassVar[List[str]] = ["name", "addr", "is_external"] - - 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 InverseFunctionMapItem 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of addr - if self.addr: - _dict['addr'] = self.addr.to_dict() - # set to None if addr (nullable) is None - # and model_fields_set contains the field - if self.addr is None and "addr" in self.model_fields_set: - _dict['addr'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InverseFunctionMapItem from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "addr": Addr.from_dict(obj["addr"]) if obj.get("addr") is not None else None, - "is_external": obj.get("is_external") if obj.get("is_external") is not None else False - }) - return _obj - - diff --git a/revengai/models/inverse_value.py b/revengai/models/inverse_value.py deleted file mode 100644 index 7fc5621b..00000000 --- a/revengai/models/inverse_value.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class InverseValue(BaseModel): - """ - InverseValue - """ # noqa: E501 - value: StrictStr - __properties: ClassVar[List[str]] = ["value"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InverseValue 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. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InverseValue from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "value": obj.get("value") - }) - return _obj - - diff --git a/revengai/models/memdump_entry.py b/revengai/models/memdump_entry.py index 72a604f3..31a2414c 100644 --- a/revengai/models/memdump_entry.py +++ b/revengai/models/memdump_entry.py @@ -25,13 +25,13 @@ class MemdumpEntry(BaseModel): """ MemdumpEntry """ # noqa: E501 - address: Optional[StrictStr] - dump_reason: Optional[StrictStr] + address: StrictStr + dump_reason: StrictStr file_type: Optional[StrictStr] = None - filename: Optional[StrictStr] + filename: StrictStr index: StrictInt is_pe: Optional[StrictBool] = None - method: Optional[StrictStr] + method: StrictStr mime_type: Optional[StrictStr] = None sha256: Optional[StrictStr] = None size: StrictInt @@ -86,46 +86,6 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if address (nullable) is None - # and model_fields_set contains the field - if self.address is None and "address" in self.model_fields_set: - _dict['address'] = None - - # set to None if dump_reason (nullable) is None - # and model_fields_set contains the field - if self.dump_reason is None and "dump_reason" in self.model_fields_set: - _dict['dump_reason'] = None - - # set to None if file_type (nullable) is None - # and model_fields_set contains the field - if self.file_type is None and "file_type" in self.model_fields_set: - _dict['file_type'] = None - - # set to None if filename (nullable) is None - # and model_fields_set contains the field - if self.filename is None and "filename" in self.model_fields_set: - _dict['filename'] = None - - # set to None if method (nullable) is None - # and model_fields_set contains the field - if self.method is None and "method" in self.model_fields_set: - _dict['method'] = None - - # set to None if mime_type (nullable) is None - # and model_fields_set contains the field - if self.mime_type is None and "mime_type" in self.model_fields_set: - _dict['mime_type'] = None - - # set to None if sha256 (nullable) is None - # and model_fields_set contains the field - if self.sha256 is None and "sha256" in self.model_fields_set: - _dict['sha256'] = None - - # set to None if target_addr (nullable) is None - # and model_fields_set contains the field - if self.target_addr is None and "target_addr" in self.model_fields_set: - _dict['target_addr'] = None - return _dict @classmethod diff --git a/revengai/models/module_load_entry.py b/revengai/models/module_load_entry.py index 96097280..f36d3d75 100644 --- a/revengai/models/module_load_entry.py +++ b/revengai/models/module_load_entry.py @@ -78,11 +78,6 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if process_name (nullable) is None - # and model_fields_set contains the field - if self.process_name is None and "process_name" in self.model_fields_set: - _dict['process_name'] = None - return _dict @classmethod diff --git a/revengai/models/mutex_entry.py b/revengai/models/mutex_entry.py index cb0465bb..dcddb93d 100644 --- a/revengai/models/mutex_entry.py +++ b/revengai/models/mutex_entry.py @@ -27,7 +27,7 @@ class MutexEntry(BaseModel): MutexEntry """ # noqa: E501 events: Optional[List[ReportEvent]] = None - name: Optional[StrictStr] + name: StrictStr additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["events", "name"] @@ -89,11 +89,6 @@ def to_dict(self) -> Dict[str, Any]: if self.events is None and "events" in self.model_fields_set: _dict['events'] = None - # set to None if name (nullable) is None - # and model_fields_set contains the field - if self.name is None and "name" in self.model_fields_set: - _dict['name'] = None - return _dict @classmethod diff --git a/revengai/models/process_extracted_files.py b/revengai/models/pcap_body_info.py similarity index 72% rename from revengai/models/process_extracted_files.py rename to revengai/models/pcap_body_info.py index aaaf84f1..1b53455e 100644 --- a/revengai/models/process_extracted_files.py +++ b/revengai/models/pcap_body_info.py @@ -16,20 +16,24 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.extracted_file_entry import ExtractedFileEntry from typing import Optional, Set from typing_extensions import Self -class ProcessExtractedFiles(BaseModel): +class PcapBodyInfo(BaseModel): """ - ProcessExtractedFiles + PcapBodyInfo """ # noqa: E501 - files: Optional[List[ExtractedFileEntry]] = None - process_seqid: StrictInt + filename: Optional[StrictStr] = None + is_pe: StrictBool + mime_type: Optional[StrictStr] = None + preview: Optional[StrictStr] = None + sha256: Optional[StrictStr] = None + size: StrictInt + yara_hits: Optional[List[StrictStr]] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["files", "process_seqid"] + __properties: ClassVar[List[str]] = ["filename", "is_pe", "mime_type", "preview", "sha256", "size", "yara_hits"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +53,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ProcessExtractedFiles from a JSON string""" + """Create an instance of PcapBodyInfo from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,28 +76,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in files (list) - _items = [] - if self.files: - for _item_files in self.files: - if _item_files: - _items.append(_item_files.to_dict()) - _dict['files'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if files (nullable) is None + # set to None if yara_hits (nullable) is None # and model_fields_set contains the field - if self.files is None and "files" in self.model_fields_set: - _dict['files'] = None + if self.yara_hits is None and "yara_hits" in self.model_fields_set: + _dict['yara_hits'] = None return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ProcessExtractedFiles from a dict""" + """Create an instance of PcapBodyInfo from a dict""" if obj is None: return None @@ -101,8 +98,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "files": [ExtractedFileEntry.from_dict(_item) for _item in obj["files"]] if obj.get("files") is not None else None, - "process_seqid": obj.get("process_seqid") + "filename": obj.get("filename"), + "is_pe": obj.get("is_pe"), + "mime_type": obj.get("mime_type"), + "preview": obj.get("preview"), + "sha256": obj.get("sha256"), + "size": obj.get("size"), + "yara_hits": obj.get("yara_hits") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/process_activity_entry.py b/revengai/models/process_activity_entry.py index 79a903f1..975d1793 100644 --- a/revengai/models/process_activity_entry.py +++ b/revengai/models/process_activity_entry.py @@ -31,7 +31,7 @@ class ProcessActivityEntry(BaseModel): events: Optional[List[ReportEvent]] = None exit_code: Optional[StrictInt] = None exit_code_str: Optional[StrictStr] = None - name: Optional[StrictStr] + name: StrictStr pid: StrictInt additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["args", "child_seqid", "events", "exit_code", "exit_code_str", "name", "pid"] @@ -99,16 +99,6 @@ def to_dict(self) -> Dict[str, Any]: if self.events is None and "events" in self.model_fields_set: _dict['events'] = None - # set to None if exit_code_str (nullable) is None - # and model_fields_set contains the field - if self.exit_code_str is None and "exit_code_str" in self.model_fields_set: - _dict['exit_code_str'] = None - - # set to None if name (nullable) is None - # and model_fields_set contains the field - if self.name is None and "name" in self.model_fields_set: - _dict['name'] = None - return _dict @classmethod diff --git a/revengai/models/process_node.py b/revengai/models/process_node.py index 6944612f..d17abef1 100644 --- a/revengai/models/process_node.py +++ b/revengai/models/process_node.py @@ -32,7 +32,7 @@ class ProcessNode(BaseModel): exit_code_str: Optional[StrictStr] = None exited_at: Optional[Union[StrictFloat, StrictInt]] = None killed_by: Optional[StrictInt] = None - name: Optional[StrictStr] + name: StrictStr pid: StrictInt seqid: StrictInt started_at: Optional[Union[StrictFloat, StrictInt]] = None @@ -102,16 +102,6 @@ def to_dict(self) -> Dict[str, Any]: if self.children is None and "children" in self.model_fields_set: _dict['children'] = None - # set to None if exit_code_str (nullable) is None - # and model_fields_set contains the field - if self.exit_code_str is None and "exit_code_str" in self.model_fields_set: - _dict['exit_code_str'] = None - - # set to None if name (nullable) is None - # and model_fields_set contains the field - if self.name is None and "name" in self.model_fields_set: - _dict['name'] = None - return _dict @classmethod diff --git a/revengai/models/regenerate_target.py b/revengai/models/regenerate_target.py deleted file mode 100644 index 0e411ce0..00000000 --- a/revengai/models/regenerate_target.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class RegenerateTarget(str, Enum): - """ - RegenerateTarget - """ - - """ - allowed enum values - """ - SUMMARY = 'summary' - COMMENTS = 'comments' - UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of RegenerateTarget from a JSON string""" - return cls(json.loads(json_str)) - - @classmethod - def _missing_(cls, value): - """Fall back to the unknown default for values not defined in the SDK.""" - return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API") - - diff --git a/revengai/models/registry_operation.py b/revengai/models/registry_operation.py index 1d0d6999..198051d4 100644 --- a/revengai/models/registry_operation.py +++ b/revengai/models/registry_operation.py @@ -27,7 +27,7 @@ class RegistryOperation(BaseModel): RegistryOperation """ # noqa: E501 events: Optional[List[ReportEvent]] = None - key: Optional[StrictStr] + key: StrictStr additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["events", "key"] @@ -89,11 +89,6 @@ def to_dict(self) -> Dict[str, Any]: if self.events is None and "events" in self.model_fields_set: _dict['events'] = None - # set to None if key (nullable) is None - # and model_fields_set contains the field - if self.key is None and "key" in self.model_fields_set: - _dict['key'] = None - return _dict @classmethod diff --git a/revengai/models/rename_input_body.py b/revengai/models/rename_input_body.py index e6448a9f..67e9a720 100644 --- a/revengai/models/rename_input_body.py +++ b/revengai/models/rename_input_body.py @@ -16,7 +16,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from typing import Optional, Set @@ -28,8 +28,9 @@ class RenameInputBody(BaseModel): """ # noqa: E501 new_mangled_name: Optional[Annotated[str, Field(strict=True, max_length=512)]] = Field(default=None, description="New mangled function name") new_name: Annotated[str, Field(min_length=1, strict=True, max_length=512)] = Field(description="New function name") + preserve_ai_decompilation: Optional[StrictBool] = Field(default=None, description="Keep the cached AI decompilation, summary and inline comments. Set when the new name comes from the model's own prediction (e.g. Transfer Name) so existing AI output is not discarded and regenerated.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["new_mangled_name", "new_name"] + __properties: ClassVar[List[str]] = ["new_mangled_name", "new_name", "preserve_ai_decompilation"] model_config = ConfigDict( populate_by_name=True, @@ -90,7 +91,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "new_mangled_name": obj.get("new_mangled_name"), - "new_name": obj.get("new_name") + "new_name": obj.get("new_name"), + "preserve_ai_decompilation": obj.get("preserve_ai_decompilation") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/report_event.py b/revengai/models/report_event.py index ff67b6d2..ef2613e8 100644 --- a/revengai/models/report_event.py +++ b/revengai/models/report_event.py @@ -27,14 +27,15 @@ class ReportEvent(BaseModel): ReportEvent """ # noqa: E501 api_calls: Optional[List[ApiCall]] = None + count: Optional[StrictInt] = None + desired_access: Optional[List[StrictStr]] = None process_seqid: Optional[StrictInt] = None - total_bytes_requested: Optional[StrictInt] = None - type: Optional[StrictStr] + total_bytes: Optional[StrictInt] = None + type: StrictStr value: Optional[StrictStr] = None value_name: Optional[StrictStr] = None - write_count: Optional[StrictInt] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["api_calls", "process_seqid", "total_bytes_requested", "type", "value", "value_name", "write_count"] + __properties: ClassVar[List[str]] = ["api_calls", "count", "desired_access", "process_seqid", "total_bytes", "type", "value", "value_name"] model_config = ConfigDict( populate_by_name=True, @@ -94,20 +95,10 @@ def to_dict(self) -> Dict[str, Any]: if self.api_calls is None and "api_calls" in self.model_fields_set: _dict['api_calls'] = None - # set to None if type (nullable) is None + # set to None if desired_access (nullable) is None # and model_fields_set contains the field - if self.type is None and "type" in self.model_fields_set: - _dict['type'] = None - - # set to None if value (nullable) is None - # and model_fields_set contains the field - if self.value is None and "value" in self.model_fields_set: - _dict['value'] = None - - # set to None if value_name (nullable) is None - # and model_fields_set contains the field - if self.value_name is None and "value_name" in self.model_fields_set: - _dict['value_name'] = None + if self.desired_access is None and "desired_access" in self.model_fields_set: + _dict['desired_access'] = None return _dict @@ -122,12 +113,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "api_calls": [ApiCall.from_dict(_item) for _item in obj["api_calls"]] if obj.get("api_calls") is not None else None, + "count": obj.get("count"), + "desired_access": obj.get("desired_access"), "process_seqid": obj.get("process_seqid"), - "total_bytes_requested": obj.get("total_bytes_requested"), + "total_bytes": obj.get("total_bytes"), "type": obj.get("type"), "value": obj.get("value"), - "value_name": obj.get("value_name"), - "write_count": obj.get("write_count") + "value_name": obj.get("value_name") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/report_info.py b/revengai/models/report_info.py index b819950d..50a75147 100644 --- a/revengai/models/report_info.py +++ b/revengai/models/report_info.py @@ -28,7 +28,7 @@ class ReportInfo(BaseModel): ReportInfo """ # noqa: E501 file: Optional[DrakvufFileMetadata] = None - id: Optional[StrictStr] + id: StrictStr options: Optional[ReportOptions] = None os_profile: Optional[StrictStr] = None status: Optional[StrictStr] = None @@ -90,36 +90,6 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if id (nullable) is None - # and model_fields_set contains the field - if self.id is None and "id" in self.model_fields_set: - _dict['id'] = None - - # set to None if os_profile (nullable) is None - # and model_fields_set contains the field - if self.os_profile is None and "os_profile" in self.model_fields_set: - _dict['os_profile'] = None - - # set to None if status (nullable) is None - # and model_fields_set contains the field - if self.status is None and "status" in self.model_fields_set: - _dict['status'] = None - - # set to None if time_analysis_finished (nullable) is None - # and model_fields_set contains the field - if self.time_analysis_finished is None and "time_analysis_finished" in self.model_fields_set: - _dict['time_analysis_finished'] = None - - # set to None if time_execution_started (nullable) is None - # and model_fields_set contains the field - if self.time_execution_started is None and "time_execution_started" in self.model_fields_set: - _dict['time_execution_started'] = None - - # set to None if time_started (nullable) is None - # and model_fields_set contains the field - if self.time_started is None and "time_started" in self.model_fields_set: - _dict['time_started'] = None - return _dict @classmethod diff --git a/revengai/models/report_options.py b/revengai/models/report_options.py index 080520f5..bdcb0d0a 100644 --- a/revengai/models/report_options.py +++ b/revengai/models/report_options.py @@ -86,51 +86,11 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if archive_entry_path (nullable) is None - # and model_fields_set contains the field - if self.archive_entry_path is None and "archive_entry_path" in self.model_fields_set: - _dict['archive_entry_path'] = None - - # set to None if guest_target_directory (nullable) is None - # and model_fields_set contains the field - if self.guest_target_directory is None and "guest_target_directory" in self.model_fields_set: - _dict['guest_target_directory'] = None - - # set to None if guest_working_directory (nullable) is None - # and model_fields_set contains the field - if self.guest_working_directory is None and "guest_working_directory" in self.model_fields_set: - _dict['guest_working_directory'] = None - - # set to None if os_profile (nullable) is None - # and model_fields_set contains the field - if self.os_profile is None and "os_profile" in self.model_fields_set: - _dict['os_profile'] = None - # set to None if plugins (nullable) is None # and model_fields_set contains the field if self.plugins is None and "plugins" in self.model_fields_set: _dict['plugins'] = None - # set to None if preset (nullable) is None - # and model_fields_set contains the field - if self.preset is None and "preset" in self.model_fields_set: - _dict['preset'] = None - - # set to None if sample_filename (nullable) is None - # and model_fields_set contains the field - if self.sample_filename is None and "sample_filename" in self.model_fields_set: - _dict['sample_filename'] = None - - # set to None if start_command (nullable) is None - # and model_fields_set contains the field - if self.start_command is None and "start_command" in self.model_fields_set: - _dict['start_command'] = None - - # set to None if start_method (nullable) is None - # and model_fields_set contains the field - if self.start_method is None and "start_method" in self.model_fields_set: - _dict['start_method'] = None - return _dict @classmethod diff --git a/revengai/models/scheduled_task_entry.py b/revengai/models/scheduled_task_entry.py index d7edf1e7..6bec481d 100644 --- a/revengai/models/scheduled_task_entry.py +++ b/revengai/models/scheduled_task_entry.py @@ -93,61 +93,11 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if command (nullable) is None - # and model_fields_set contains the field - if self.command is None and "command" in self.model_fields_set: - _dict['command'] = None - - # set to None if day (nullable) is None - # and model_fields_set contains the field - if self.day is None and "day" in self.model_fields_set: - _dict['day'] = None - - # set to None if end_date (nullable) is None - # and model_fields_set contains the field - if self.end_date is None and "end_date" in self.model_fields_set: - _dict['end_date'] = None - # set to None if events (nullable) is None # and model_fields_set contains the field if self.events is None and "events" in self.model_fields_set: _dict['events'] = None - # set to None if executable (nullable) is None - # and model_fields_set contains the field - if self.executable is None and "executable" in self.model_fields_set: - _dict['executable'] = None - - # set to None if modifier (nullable) is None - # and model_fields_set contains the field - if self.modifier is None and "modifier" in self.model_fields_set: - _dict['modifier'] = None - - # set to None if run_as (nullable) is None - # and model_fields_set contains the field - if self.run_as is None and "run_as" in self.model_fields_set: - _dict['run_as'] = None - - # set to None if schedule_type (nullable) is None - # and model_fields_set contains the field - if self.schedule_type is None and "schedule_type" in self.model_fields_set: - _dict['schedule_type'] = None - - # set to None if start_date (nullable) is None - # and model_fields_set contains the field - if self.start_date is None and "start_date" in self.model_fields_set: - _dict['start_date'] = None - - # set to None if start_time (nullable) is None - # and model_fields_set contains the field - if self.start_time is None and "start_time" in self.model_fields_set: - _dict['start_time'] = None - - # set to None if task_name (nullable) is None - # and model_fields_set contains the field - if self.task_name is None and "task_name" in self.model_fields_set: - _dict['task_name'] = None - return _dict @classmethod diff --git a/revengai/models/service_entry.py b/revengai/models/service_entry.py index 8999ec8d..3c3e7754 100644 --- a/revengai/models/service_entry.py +++ b/revengai/models/service_entry.py @@ -88,36 +88,11 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if binary_path (nullable) is None - # and model_fields_set contains the field - if self.binary_path is None and "binary_path" in self.model_fields_set: - _dict['binary_path'] = None - - # set to None if display_name (nullable) is None - # and model_fields_set contains the field - if self.display_name is None and "display_name" in self.model_fields_set: - _dict['display_name'] = None - # set to None if events (nullable) is None # and model_fields_set contains the field if self.events is None and "events" in self.model_fields_set: _dict['events'] = None - # set to None if name (nullable) is None - # and model_fields_set contains the field - if self.name is None and "name" in self.model_fields_set: - _dict['name'] = None - - # set to None if service_type (nullable) is None - # and model_fields_set contains the field - if self.service_type is None and "service_type" in self.model_fields_set: - _dict['service_type'] = None - - # set to None if start_type (nullable) is None - # and model_fields_set contains the field - if self.start_type is None and "start_type" in self.model_fields_set: - _dict['start_type'] = None - return _dict @classmethod diff --git a/revengai/models/startup_info.py b/revengai/models/startup_info.py index 2ab615d3..85a170e5 100644 --- a/revengai/models/startup_info.py +++ b/revengai/models/startup_info.py @@ -81,31 +81,6 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if arguments (nullable) is None - # and model_fields_set contains the field - if self.arguments is None and "arguments" in self.model_fields_set: - _dict['arguments'] = None - - # set to None if error (nullable) is None - # and model_fields_set contains the field - if self.error is None and "error" in self.model_fields_set: - _dict['error'] = None - - # set to None if error_code (nullable) is None - # and model_fields_set contains the field - if self.error_code is None and "error_code" in self.model_fields_set: - _dict['error_code'] = None - - # set to None if process_name (nullable) is None - # and model_fields_set contains the field - if self.process_name is None and "process_name" in self.model_fields_set: - _dict['process_name'] = None - - # set to None if status (nullable) is None - # and model_fields_set contains the field - if self.status is None and "status" in self.model_fields_set: - _dict['status'] = None - return _dict @classmethod diff --git a/revengai/models/inverse_string_map_item.py b/revengai/models/tcp_carved_file.py similarity index 57% rename from revengai/models/inverse_string_map_item.py rename to revengai/models/tcp_carved_file.py index daabc4bd..b4f5ae2c 100644 --- a/revengai/models/inverse_string_map_item.py +++ b/revengai/models/tcp_carved_file.py @@ -16,18 +16,25 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class InverseStringMapItem(BaseModel): +class TcpCarvedFile(BaseModel): """ - InverseStringMapItem + TcpCarvedFile """ # noqa: E501 - string: StrictStr - addr: Optional[StrictInt] - __properties: ClassVar[List[str]] = ["string", "addr"] + direction: StrictStr + filename: Optional[StrictStr] = None + is_pe: StrictBool + mime_type: Optional[StrictStr] = None + offset: StrictInt + sha256: StrictStr + size: StrictInt + yara_hits: Optional[List[StrictStr]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["direction", "filename", "is_pe", "mime_type", "offset", "sha256", "size", "yara_hits"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +54,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InverseStringMapItem from a JSON string""" + """Create an instance of TcpCarvedFile from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -59,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,16 +77,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if addr (nullable) is None + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if yara_hits (nullable) is None # and model_fields_set contains the field - if self.addr is None and "addr" in self.model_fields_set: - _dict['addr'] = None + if self.yara_hits is None and "yara_hits" in self.model_fields_set: + _dict['yara_hits'] = None return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InverseStringMapItem from a dict""" + """Create an instance of TcpCarvedFile from a dict""" if obj is None: return None @@ -85,9 +99,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "string": obj.get("string"), - "addr": obj.get("addr") + "direction": obj.get("direction"), + "filename": obj.get("filename"), + "is_pe": obj.get("is_pe"), + "mime_type": obj.get("mime_type"), + "offset": obj.get("offset"), + "sha256": obj.get("sha256"), + "size": obj.get("size"), + "yara_hits": obj.get("yara_hits") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/revengai/models/trigger_dynamic_execution_input_body.py b/revengai/models/trigger_dynamic_execution_input_body.py new file mode 100644 index 00000000..55409723 --- /dev/null +++ b/revengai/models/trigger_dynamic_execution_input_body.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class TriggerDynamicExecutionInputBody(BaseModel): + """ + TriggerDynamicExecutionInputBody + """ # noqa: E501 + command_line_args: Optional[Annotated[str, Field(strict=True, max_length=4096)]] = Field(default=None, description="Command-line arguments passed to the sample when the sandbox launches it") + start_method: Optional[StrictStr] = Field(default=None, description="How the sandbox launches the sample. Defaults to the sandbox's standard behaviour when omitted.") + timeout: Optional[StrictInt] = Field(default=120, description="Maximum sandbox execution time in seconds") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["command_line_args", "start_method", "timeout"] + + @field_validator('start_method') + def start_method_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['standard_user_process', 'administrator_process', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('standard_user_process', 'administrator_process', 'unknown_default_open_api')") + return value + + @field_validator('timeout') + def timeout_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set([120, 180, 300, 600, 11184809]): + raise ValueError("must be one of enum values (120, 180, 300, 600, 11184809)") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TriggerDynamicExecutionInputBody 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 TriggerDynamicExecutionInputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "command_line_args": obj.get("command_line_args"), + "start_method": obj.get("start_method"), + "timeout": obj.get("timeout") if obj.get("timeout") is not None else 120 + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/ttp.py b/revengai/models/ttp.py index 54b5e0f3..67407324 100644 --- a/revengai/models/ttp.py +++ b/revengai/models/ttp.py @@ -90,16 +90,6 @@ def to_dict(self) -> Dict[str, Any]: if self.mbc is None and "mbc" in self.model_fields_set: _dict['mbc'] = None - # set to None if name (nullable) is None - # and model_fields_set contains the field - if self.name is None and "name" in self.model_fields_set: - _dict['name'] = None - - # set to None if namespace (nullable) is None - # and model_fields_set contains the field - if self.namespace is None and "namespace" in self.model_fields_set: - _dict['namespace'] = None - # set to None if process_seqids (nullable) is None # and model_fields_set contains the field if self.process_seqids is None and "process_seqids" in self.model_fields_set: