From f9e9919a0e7dc53fb1f13415fa41c69efb4a6d5d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 28 Sep 2026 06:42:14 +0000 Subject: [PATCH] Update SDK to version v4.64.0 - Generated from OpenAPI spec version v4.64.0 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- README.md | 27 +- docs/ActivityBody.md | 34 + docs/AnalysesCoreApi.md | 105 --- docs/ApiKeyBody.md | 29 + docs/AuthenticationUsersApi.md | 268 ++++++ docs/CreateRequest.md | 2 +- docs/CreateSecretStoreInputBody.md | 31 + docs/ExternalSourcesApi.md | 191 +++++ docs/FunctionsAIDecompilationApi.md | 190 ++++ docs/FunctionsCoreApi.md | 94 ++ docs/GetAPIKeysOutputBody.md | 29 + docs/GetFunctionMapsOutputBody.md | 31 + docs/GetPublicUserOutputBody.md | 30 + docs/GetUserActivityOutputBody.md | 29 + docs/ListSecretStoreOutputBody.md | 29 + ...usTotalScanMetadataVirusTotalScanResult.md | 33 + docs/RatingOutputBody.md | 30 + docs/ResendVerificationEmailInputBody.md | 29 + docs/SecretBody.md | 37 + docs/SubmitFeedbackBody.md | 31 + docs/SubmitFeedbackOutputBody.md | 29 + docs/UpdateSecretStoreInputBody.md | 30 + docs/UpsertRatingInputBody.md | 30 + docs/VirusTotalScanMetadata.md | 29 + docs/VirusTotalScanResult.md | 31 + revengai/__init__.py | 38 +- revengai/api/analyses_core_api.py | 315 ------- revengai/api/authentication_users_api.py | 809 +++++++++++++++++- revengai/api/external_sources_api.py | 555 +++++++++++- .../api/functions_ai_decompilation_api.py | 578 +++++++++++++ revengai/api/functions_core_api.py | 275 ++++++ revengai/api_client.py | 2 +- revengai/configuration.py | 4 +- revengai/models/__init__.py | 18 + revengai/models/activity_body.py | 131 +++ revengai/models/api_key_body.py | 99 +++ revengai/models/create_request.py | 2 +- .../models/create_secret_store_input_body.py | 111 +++ revengai/models/error_body.py | 4 +- revengai/models/get_api_keys_output_body.py | 112 +++ .../models/get_function_maps_output_body.py | 103 +++ .../models/get_public_user_output_body.py | 101 +++ .../models/get_user_activity_output_body.py | 112 +++ .../models/list_secret_store_output_body.py | 112 +++ ...l_scan_metadata_virus_total_scan_result.py | 119 +++ revengai/models/rating_output_body.py | 121 +++ .../resend_verification_email_input_body.py | 99 +++ revengai/models/secret_body.py | 123 +++ revengai/models/status.py | 4 +- revengai/models/submit_feedback_body.py | 103 +++ .../models/submit_feedback_output_body.py | 99 +++ .../models/update_secret_store_input_body.py | 102 +++ revengai/models/upsert_rating_input_body.py | 108 +++ revengai/models/virus_total_scan_metadata.py | 106 +++ revengai/models/virus_total_scan_result.py | 109 +++ 56 files changed, 5570 insertions(+), 434 deletions(-) create mode 100644 docs/ActivityBody.md create mode 100644 docs/ApiKeyBody.md create mode 100644 docs/CreateSecretStoreInputBody.md create mode 100644 docs/GetAPIKeysOutputBody.md create mode 100644 docs/GetFunctionMapsOutputBody.md create mode 100644 docs/GetPublicUserOutputBody.md create mode 100644 docs/GetUserActivityOutputBody.md create mode 100644 docs/ListSecretStoreOutputBody.md create mode 100644 docs/OperationVirusTotalScanMetadataVirusTotalScanResult.md create mode 100644 docs/RatingOutputBody.md create mode 100644 docs/ResendVerificationEmailInputBody.md create mode 100644 docs/SecretBody.md create mode 100644 docs/SubmitFeedbackBody.md create mode 100644 docs/SubmitFeedbackOutputBody.md create mode 100644 docs/UpdateSecretStoreInputBody.md create mode 100644 docs/UpsertRatingInputBody.md create mode 100644 docs/VirusTotalScanMetadata.md create mode 100644 docs/VirusTotalScanResult.md create mode 100644 revengai/models/activity_body.py create mode 100644 revengai/models/api_key_body.py create mode 100644 revengai/models/create_secret_store_input_body.py create mode 100644 revengai/models/get_api_keys_output_body.py create mode 100644 revengai/models/get_function_maps_output_body.py create mode 100644 revengai/models/get_public_user_output_body.py create mode 100644 revengai/models/get_user_activity_output_body.py create mode 100644 revengai/models/list_secret_store_output_body.py create mode 100644 revengai/models/operation_virus_total_scan_metadata_virus_total_scan_result.py create mode 100644 revengai/models/rating_output_body.py create mode 100644 revengai/models/resend_verification_email_input_body.py create mode 100644 revengai/models/secret_body.py create mode 100644 revengai/models/submit_feedback_body.py create mode 100644 revengai/models/submit_feedback_output_body.py create mode 100644 revengai/models/update_secret_store_input_body.py create mode 100644 revengai/models/upsert_rating_input_body.py create mode 100644 revengai/models/virus_total_scan_metadata.py create mode 100644 revengai/models/virus_total_scan_result.py diff --git a/.sdk-version b/.sdk-version index 18ef7889..90009ae0 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v4.60.1 +v4.64.0 diff --git a/README.md b/README.md index 328893b8..cb6771d6 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,6 @@ Class | Method | HTTP request | Description *AnalysesCoreApi* | [**update_analysis**](docs/AnalysesCoreApi.md#update_analysis) | **PATCH** /v2/analyses/{analysis_id} | Update Analysis *AnalysesCoreApi* | [**update_analysis_tags**](docs/AnalysesCoreApi.md#update_analysis_tags) | **PATCH** /v2/analyses/{analysis_id}/tags | Update Analysis Tags *AnalysesCoreApi* | [**upload_file**](docs/AnalysesCoreApi.md#upload_file) | **POST** /v2/upload | Upload File -*AnalysesCoreApi* | [**v3_create_analysis**](docs/AnalysesCoreApi.md#v3_create_analysis) | **POST** /v3/analyses | Create an analysis *AnalysesCoreApi* | [**v3_delete_analysis**](docs/AnalysesCoreApi.md#v3_delete_analysis) | **DELETE** /v3/analyses/{analysis_id} | Delete an analysis. *AnalysesCoreApi* | [**v3_download_binary_export**](docs/AnalysesCoreApi.md#v3_download_binary_export) | **GET** /v3/analyses/{analysis_id}/binary-export | Download a binary export *AnalysesCoreApi* | [**v3_get_analysis**](docs/AnalysesCoreApi.md#v3_get_analysis) | **GET** /v3/analyses/{analysis_id} | Get an analysis. @@ -157,6 +156,9 @@ Class | Method | HTTP request | Description *AuthenticationUsersApi* | [**get_user**](docs/AuthenticationUsersApi.md#get_user) | **GET** /v2/users/{user_id} | Get a user's public information *AuthenticationUsersApi* | [**get_user_activity**](docs/AuthenticationUsersApi.md#get_user_activity) | **GET** /v2/users/activity | Get auth user activity *AuthenticationUsersApi* | [**submit_user_feedback**](docs/AuthenticationUsersApi.md#submit_user_feedback) | **POST** /v2/users/feedback | Submit feedback about the application +*AuthenticationUsersApi* | [**v3_get_user**](docs/AuthenticationUsersApi.md#v3_get_user) | **GET** /v3/users/{user_id} | Get a user's public information +*AuthenticationUsersApi* | [**v3_get_user_activity**](docs/AuthenticationUsersApi.md#v3_get_user_activity) | **GET** /v3/users/activity | Get the caller's activity feed +*AuthenticationUsersApi* | [**v3_submit_user_feedback**](docs/AuthenticationUsersApi.md#v3_submit_user_feedback) | **POST** /v3/users/feedback | Submit feedback *BinariesApi* | [**download_zipped_binary**](docs/BinariesApi.md#download_zipped_binary) | **GET** /v2/binaries/{binary_id}/download-zipped | Downloads a zipped binary with password protection *BinariesApi* | [**get_binary_additional_details**](docs/BinariesApi.md#get_binary_additional_details) | **GET** /v2/binaries/{binary_id}/additional-details | Gets the additional details of a binary *BinariesApi* | [**get_binary_additional_details_0**](docs/BinariesApi.md#get_binary_additional_details_0) | **GET** /v3/binaries/{binary_id}/additional-details | Get additional details for a binary. @@ -214,6 +216,8 @@ Class | Method | HTTP request | Description *ExternalSourcesApi* | [**create_external_task_vt**](docs/ExternalSourcesApi.md#create_external_task_vt) | **POST** /v2/analysis/{analysis_id}/external/vt | Pulls data from VirusTotal *ExternalSourcesApi* | [**get_vt_data**](docs/ExternalSourcesApi.md#get_vt_data) | **GET** /v2/analysis/{analysis_id}/external/vt | Get VirusTotal data *ExternalSourcesApi* | [**get_vt_task_status**](docs/ExternalSourcesApi.md#get_vt_task_status) | **GET** /v2/analysis/{analysis_id}/external/vt/status | Check the status of VirusTotal data retrieval +*ExternalSourcesApi* | [**v3_get_virustotal_scan_operation**](docs/ExternalSourcesApi.md#v3_get_virustotal_scan_operation) | **GET** /v3/operations/virustotal-scan/{binary_id} | Get a VirusTotal scan operation. +*ExternalSourcesApi* | [**v3_run_virustotal_scan**](docs/ExternalSourcesApi.md#v3_run_virustotal_scan) | **POST** /v3/binaries/{binary_id}/virustotal-scan:run | Trigger a VirusTotal lookup for a binary. *FunctionsAIDecompilationApi* | [**create_ai_decompilation**](docs/FunctionsAIDecompilationApi.md#create_ai_decompilation) | **POST** /v3/functions/{function_id}/ai-decompilation | Start AI decompilation *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 @@ -230,9 +234,11 @@ Class | Method | HTTP request | Description *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 *FunctionsAIDecompilationApi* | [**v3_accept_ai_decompilation_type_suggestions**](docs/FunctionsAIDecompilationApi.md#v3_accept_ai_decompilation_type_suggestions) | **POST** /v3/functions/{function_id}/ai-decompilation/type-suggestions/accept | Accept AI decompilation type suggestions *FunctionsAIDecompilationApi* | [**v3_get_ai_decompilation_line_attributions**](docs/FunctionsAIDecompilationApi.md#v3_get_ai_decompilation_line_attributions) | **GET** /v3/functions/{function_id}/ai-decompilation/line-attributions | Get AI decompilation line attributions +*FunctionsAIDecompilationApi* | [**v3_get_ai_decompilation_rating**](docs/FunctionsAIDecompilationApi.md#v3_get_ai_decompilation_rating) | **GET** /v3/functions/{function_id}/ai-decompilation/rating | Get AI decompilation rating *FunctionsAIDecompilationApi* | [**v3_get_ai_decompilation_tokens**](docs/FunctionsAIDecompilationApi.md#v3_get_ai_decompilation_tokens) | **GET** /v3/functions/{function_id}/ai-decompilation/tokens | Get AI decompilation tokens and user overrides *FunctionsAIDecompilationApi* | [**v3_get_ai_decompilation_type_suggestions**](docs/FunctionsAIDecompilationApi.md#v3_get_ai_decompilation_type_suggestions) | **GET** /v3/functions/{function_id}/ai-decompilation/type-suggestions | Get AI decompilation type suggestions *FunctionsAIDecompilationApi* | [**v3_upsert_ai_decompilation_overrides**](docs/FunctionsAIDecompilationApi.md#v3_upsert_ai_decompilation_overrides) | **PATCH** /v3/functions/{function_id}/ai-decompilation/overrides | Upsert variable/function name overrides +*FunctionsAIDecompilationApi* | [**v3_upsert_ai_decompilation_rating**](docs/FunctionsAIDecompilationApi.md#v3_upsert_ai_decompilation_rating) | **PATCH** /v3/functions/{function_id}/ai-decompilation/rating | Upsert AI decompilation rating *FunctionsCoreApi* | [**add_function_callee**](docs/FunctionsCoreApi.md#add_function_callee) | **POST** /v3/functions/{function_id}/callees | Add a callee to a function *FunctionsCoreApi* | [**add_user_string_to_function**](docs/FunctionsCoreApi.md#add_user_string_to_function) | **POST** /v3/functions/{function_id}/user-provided-strings | Add a user-provided string to a function. *FunctionsCoreApi* | [**get_analysis_strings**](docs/FunctionsCoreApi.md#get_analysis_strings) | **GET** /v2/analyses/{analysis_id}/functions/strings | Get string information found in the Analysis @@ -257,6 +263,7 @@ Class | Method | HTTP request | Description *FunctionsCoreApi* | [**list_imported_functions**](docs/FunctionsCoreApi.md#list_imported_functions) | **GET** /v3/analyses/{analysis_id}/imported-functions | List imported functions in an analysis *FunctionsCoreApi* | [**start_functions_matching**](docs/FunctionsCoreApi.md#start_functions_matching) | **POST** /v3/functions/matches | Start function matching for an explicit set of functions *FunctionsCoreApi* | [**v3_canonicalize_function_names**](docs/FunctionsCoreApi.md#v3_canonicalize_function_names) | **POST** /v3/functions/canonical-names | Canonicalize a batch of function names +*FunctionsCoreApi* | [**v3_get_analysis_func_maps**](docs/FunctionsCoreApi.md#v3_get_analysis_func_maps) | **GET** /v3/analyses/{analysis_id}/func-maps | Get function ID/address maps for an analysis *FunctionsCoreApi* | [**v3_search_functions**](docs/FunctionsCoreApi.md#v3_search_functions) | **GET** /v3/functions | Search functions *FunctionsRenamingHistoryApi* | [**batch_rename_function**](docs/FunctionsRenamingHistoryApi.md#batch_rename_function) | **POST** /v2/functions/rename/batch | Batch Rename Functions *FunctionsRenamingHistoryApi* | [**batch_rename_functions**](docs/FunctionsRenamingHistoryApi.md#batch_rename_functions) | **POST** /v3/functions/rename | Batch rename functions @@ -284,6 +291,7 @@ Class | Method | HTTP request | Description - [AcceptTypeSuggestionsInputBody](docs/AcceptTypeSuggestionsInputBody.md) - [AcceptTypeSuggestionsOutputBody](docs/AcceptTypeSuggestionsOutputBody.md) - [AcceptedType](docs/AcceptedType.md) + - [ActivityBody](docs/ActivityBody.md) - [AddCalleeInputBody](docs/AddCalleeInputBody.md) - [AddCollectionBinariesInputBody](docs/AddCollectionBinariesInputBody.md) - [AddIssuerDomainInputBody](docs/AddIssuerDomainInputBody.md) @@ -337,6 +345,7 @@ Class | Method | HTTP request | Description - [AnalysisXrefOutputBody](docs/AnalysisXrefOutputBody.md) - [ApiCall](docs/ApiCall.md) - [ApiCombinationEvidence](docs/ApiCombinationEvidence.md) + - [ApiKeyBody](docs/ApiKeyBody.md) - [AppApiRestV2AgentSchemaCapability](docs/AppApiRestV2AgentSchemaCapability.md) - [AppApiRestV2AnalysesEnumsOrderBy](docs/AppApiRestV2AnalysesEnumsOrderBy.md) - [AppApiRestV2CollectionsEnumsOrderBy](docs/AppApiRestV2CollectionsEnumsOrderBy.md) @@ -515,6 +524,7 @@ Class | Method | HTTP request | Description - [CreatePortalSessionInputBody](docs/CreatePortalSessionInputBody.md) - [CreateRequest](docs/CreateRequest.md) - [CreateResult](docs/CreateResult.md) + - [CreateSecretStoreInputBody](docs/CreateSecretStoreInputBody.md) - [CreateStructDataType](docs/CreateStructDataType.md) - [CreateTeamInputBody](docs/CreateTeamInputBody.md) - [CreateTypedefDataType](docs/CreateTypedefDataType.md) @@ -665,6 +675,7 @@ Class | Method | HTTP request | Description - [FunctionsListRename](docs/FunctionsListRename.md) - [FunctionsProgressOutputBody](docs/FunctionsProgressOutputBody.md) - [GeneratePDFOutputBody](docs/GeneratePDFOutputBody.md) + - [GetAPIKeysOutputBody](docs/GetAPIKeysOutputBody.md) - [GetAdditionalDetailsOutputBody](docs/GetAdditionalDetailsOutputBody.md) - [GetAdditionalDetailsStatusOutputBody](docs/GetAdditionalDetailsStatusOutputBody.md) - [GetAiDecompilationRatingResponse](docs/GetAiDecompilationRatingResponse.md) @@ -675,16 +686,19 @@ Class | Method | HTTP request | Description - [GetConfigOutputBody](docs/GetConfigOutputBody.md) - [GetDataTypeHistoryBody](docs/GetDataTypeHistoryBody.md) - [GetDieInfoOutputBody](docs/GetDieInfoOutputBody.md) + - [GetFunctionMapsOutputBody](docs/GetFunctionMapsOutputBody.md) - [GetFunctionSignatureHistoryBody](docs/GetFunctionSignatureHistoryBody.md) - [GetMatchesOutputBody](docs/GetMatchesOutputBody.md) - [GetMatchesStatusOutputBody](docs/GetMatchesStatusOutputBody.md) - [GetModelsOutputBody](docs/GetModelsOutputBody.md) - [GetProductsOutputBody](docs/GetProductsOutputBody.md) + - [GetPublicUserOutputBody](docs/GetPublicUserOutputBody.md) - [GetPublicUserResponse](docs/GetPublicUserResponse.md) - [GetRelatedBinariesOutputBody](docs/GetRelatedBinariesOutputBody.md) - [GetRelatedStatusOutputBody](docs/GetRelatedStatusOutputBody.md) - [GetSubscriptionOutputBody](docs/GetSubscriptionOutputBody.md) - [GetTokensResponse](docs/GetTokensResponse.md) + - [GetUserActivityOutputBody](docs/GetUserActivityOutputBody.md) - [HardcodedSecretEvidence](docs/HardcodedSecretEvidence.md) - [HistoryActor](docs/HistoryActor.md) - [HistoryEntry](docs/HistoryEntry.md) @@ -721,6 +735,7 @@ Class | Method | HTTP request | Description - [ListFunctionSignaturesOutputBody](docs/ListFunctionSignaturesOutputBody.md) - [ListFunctionStringsOutputBody](docs/ListFunctionStringsOutputBody.md) - [ListImportedFunctionsOutputBody](docs/ListImportedFunctionsOutputBody.md) + - [ListSecretStoreOutputBody](docs/ListSecretStoreOutputBody.md) - [ListTeamsOutputBody](docs/ListTeamsOutputBody.md) - [ListUsersOutputBody](docs/ListUsersOutputBody.md) - [LocationOutputBody](docs/LocationOutputBody.md) @@ -770,6 +785,7 @@ Class | Method | HTTP request | Description - [OperationNetworkingExplainMetadataNetworkingExplainResult](docs/OperationNetworkingExplainMetadataNetworkingExplainResult.md) - [OperationNetworkingScanMetadataNetworkingScanResult](docs/OperationNetworkingScanMetadataNetworkingScanResult.md) - [OperationSecurityScanMetadataSecurityScanResult](docs/OperationSecurityScanMetadataSecurityScanResult.md) + - [OperationVirusTotalScanMetadataVirusTotalScanResult](docs/OperationVirusTotalScanMetadataVirusTotalScanResult.md) - [OperationWorkflowProgressResultBody](docs/OperationWorkflowProgressResultBody.md) - [Order](docs/Order.md) - [Organisation](docs/Organisation.md) @@ -806,6 +822,7 @@ Class | Method | HTTP request | Description - [ProtocolsAgentResponse](docs/ProtocolsAgentResponse.md) - [PutAnalysisStringsRequest](docs/PutAnalysisStringsRequest.md) - [QueuedWorkflowTaskResponse](docs/QueuedWorkflowTaskResponse.md) + - [RatingOutputBody](docs/RatingOutputBody.md) - [ReAnalysisForm](docs/ReAnalysisForm.md) - [Recent](docs/Recent.md) - [ReferencedConstant](docs/ReferencedConstant.md) @@ -832,6 +849,7 @@ Class | Method | HTTP request | Description - [ReportReachabilityStatus](docs/ReportReachabilityStatus.md) - [ReportResult](docs/ReportResult.md) - [RequestedConfigBody](docs/RequestedConfigBody.md) + - [ResendVerificationEmailInputBody](docs/ResendVerificationEmailInputBody.md) - [ResolvedEntity](docs/ResolvedEntity.md) - [ResultBody](docs/ResultBody.md) - [RevokeBody](docs/RevokeBody.md) @@ -849,6 +867,7 @@ Class | Method | HTTP request | Description - [SearchBinariesOutputBody](docs/SearchBinariesOutputBody.md) - [SearchFunctionsOutputBody](docs/SearchFunctionsOutputBody.md) - [SearchTagsOutputBody](docs/SearchTagsOutputBody.md) + - [SecretBody](docs/SecretBody.md) - [SecretsAgentResponse](docs/SecretsAgentResponse.md) - [SectionModel](docs/SectionModel.md) - [SecurityFinding](docs/SecurityFinding.md) @@ -910,7 +929,9 @@ Class | Method | HTTP request | Description - [SubjectAnyOf1](docs/SubjectAnyOf1.md) - [SubjectAnyOf2](docs/SubjectAnyOf2.md) - [SubjectAnyOf3](docs/SubjectAnyOf3.md) + - [SubmitFeedbackBody](docs/SubmitFeedbackBody.md) - [SubmitFeedbackInputBody](docs/SubmitFeedbackInputBody.md) + - [SubmitFeedbackOutputBody](docs/SubmitFeedbackOutputBody.md) - [SubmitUserFeedbackRequest](docs/SubmitUserFeedbackRequest.md) - [SuggestedHole](docs/SuggestedHole.md) - [SuggestedMemberView](docs/SuggestedMemberView.md) @@ -972,6 +993,7 @@ Class | Method | HTTP request | Description - [UpdatePasswordInputBody](docs/UpdatePasswordInputBody.md) - [UpdatePointerDataType](docs/UpdatePointerDataType.md) - [UpdateProfileInputBody](docs/UpdateProfileInputBody.md) + - [UpdateSecretStoreInputBody](docs/UpdateSecretStoreInputBody.md) - [UpdateStructDataType](docs/UpdateStructDataType.md) - [UpdateTagsInputBody](docs/UpdateTagsInputBody.md) - [UpdateTeamInputBody](docs/UpdateTeamInputBody.md) @@ -988,11 +1010,14 @@ Class | Method | HTTP request | Description - [UpsertAiDecomplationRatingRequest](docs/UpsertAiDecomplationRatingRequest.md) - [UpsertOverridesData](docs/UpsertOverridesData.md) - [UpsertOverridesInputBody](docs/UpsertOverridesInputBody.md) + - [UpsertRatingInputBody](docs/UpsertRatingInputBody.md) - [User](docs/User.md) - [UserActivityResponse](docs/UserActivityResponse.md) - [UserCredits](docs/UserCredits.md) - [UserIdentity](docs/UserIdentity.md) - [UserProfile](docs/UserProfile.md) + - [VirusTotalScanMetadata](docs/VirusTotalScanMetadata.md) + - [VirusTotalScanResult](docs/VirusTotalScanResult.md) - [WarningEvent](docs/WarningEvent.md) - [WorkflowDayBody](docs/WorkflowDayBody.md) - [WorkflowProgress](docs/WorkflowProgress.md) diff --git a/docs/ActivityBody.md b/docs/ActivityBody.md new file mode 100644 index 00000000..e7597391 --- /dev/null +++ b/docs/ActivityBody.md @@ -0,0 +1,34 @@ +# ActivityBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actions** | **str** | The kind of action taken | +**activity_scope** | **str** | Who can see this activity entry | +**created_at** | **datetime** | When the action happened | +**message** | **str** | Human-readable description of the action | +**sources** | **str** | The resource kind the action applied to | +**username** | **str** | The user who performed the action | + +## Example + +```python +from revengai.models.activity_body import ActivityBody + +# TODO update the JSON string below +json = "{}" +# create an instance of ActivityBody from a JSON string +activity_body_instance = ActivityBody.from_json(json) +# print the JSON string representation of the object +print(ActivityBody.to_json()) + +# convert the object into a dict +activity_body_dict = activity_body_instance.to_dict() +# create an instance of ActivityBody from a dict +activity_body_from_dict = ActivityBody.from_dict(activity_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index 2381aea7..91b96f52 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -27,7 +27,6 @@ Method | HTTP request | Description [**update_analysis**](AnalysesCoreApi.md#update_analysis) | **PATCH** /v2/analyses/{analysis_id} | Update Analysis [**update_analysis_tags**](AnalysesCoreApi.md#update_analysis_tags) | **PATCH** /v2/analyses/{analysis_id}/tags | Update Analysis Tags [**upload_file**](AnalysesCoreApi.md#upload_file) | **POST** /v2/upload | Upload File -[**v3_create_analysis**](AnalysesCoreApi.md#v3_create_analysis) | **POST** /v3/analyses | Create an analysis [**v3_delete_analysis**](AnalysesCoreApi.md#v3_delete_analysis) | **DELETE** /v3/analyses/{analysis_id} | Delete an analysis. [**v3_download_binary_export**](AnalysesCoreApi.md#v3_download_binary_export) | **GET** /v3/analyses/{analysis_id}/binary-export | Download a binary export [**v3_get_analysis**](AnalysesCoreApi.md#v3_get_analysis) | **GET** /v3/analyses/{analysis_id} | Get an analysis. @@ -2152,110 +2151,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) -# **v3_create_analysis** -> OperationCreateMetadataCreateResult v3_create_analysis(create_request, x_rev_eng_application=x_rev_eng_application) - -Create an analysis - -Queues a new Analysis for an uploaded Binary and returns the created Operation. - -**Error codes:** -- `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request -- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied -- `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits -- `409` [`CONFLICT`](/errors/CONFLICT) — Conflict -- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found -- `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large - -### Example - -* Api Key Authentication (APIKey): -* Bearer Authentication (bearerAuth): - -```python -import revengai -from revengai.models.create_request import CreateRequest -from revengai.models.operation_create_metadata_create_result import OperationCreateMetadataCreateResult -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' - -# Configure Bearer authorization: bearerAuth -configuration = revengai.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# 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) - create_request = revengai.CreateRequest() # CreateRequest | - x_rev_eng_application = 'x_rev_eng_application_example' # str | Identifies the calling RevEng application. Recorded on the Analysis log. (optional) - - try: - # Create an analysis - api_response = api_instance.v3_create_analysis(create_request, x_rev_eng_application=x_rev_eng_application) - print("The response of AnalysesCoreApi->v3_create_analysis:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AnalysesCoreApi->v3_create_analysis: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_request** | [**CreateRequest**](CreateRequest.md)| | - **x_rev_eng_application** | **str**| Identifies the calling RevEng application. Recorded on the Analysis log. | [optional] - -### Return type - -[**OperationCreateMetadataCreateResult**](OperationCreateMetadataCreateResult.md) - -### Authorization - -[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Created | - | -**400** | Bad Request | - | -**402** | Payment Required | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**409** | Conflict | - | -**413** | Request Entity Too Large | - | -**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) - # **v3_delete_analysis** > v3_delete_analysis(analysis_id) diff --git a/docs/ApiKeyBody.md b/docs/ApiKeyBody.md new file mode 100644 index 00000000..d90dc397 --- /dev/null +++ b/docs/ApiKeyBody.md @@ -0,0 +1,29 @@ +# ApiKeyBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_key** | **str** | The API key | + +## Example + +```python +from revengai.models.api_key_body import ApiKeyBody + +# TODO update the JSON string below +json = "{}" +# create an instance of ApiKeyBody from a JSON string +api_key_body_instance = ApiKeyBody.from_json(json) +# print the JSON string representation of the object +print(ApiKeyBody.to_json()) + +# convert the object into a dict +api_key_body_dict = api_key_body_instance.to_dict() +# create an instance of ApiKeyBody from a dict +api_key_body_from_dict = ApiKeyBody.from_dict(api_key_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthenticationUsersApi.md b/docs/AuthenticationUsersApi.md index f1dfa2bc..6b206979 100644 --- a/docs/AuthenticationUsersApi.md +++ b/docs/AuthenticationUsersApi.md @@ -7,6 +7,9 @@ Method | HTTP request | Description [**get_user**](AuthenticationUsersApi.md#get_user) | **GET** /v2/users/{user_id} | Get a user's public information [**get_user_activity**](AuthenticationUsersApi.md#get_user_activity) | **GET** /v2/users/activity | Get auth user activity [**submit_user_feedback**](AuthenticationUsersApi.md#submit_user_feedback) | **POST** /v2/users/feedback | Submit feedback about the application +[**v3_get_user**](AuthenticationUsersApi.md#v3_get_user) | **GET** /v3/users/{user_id} | Get a user's public information +[**v3_get_user_activity**](AuthenticationUsersApi.md#v3_get_user_activity) | **GET** /v3/users/activity | Get the caller's activity feed +[**v3_submit_user_feedback**](AuthenticationUsersApi.md#v3_submit_user_feedback) | **POST** /v3/users/feedback | Submit feedback # **get_user** @@ -260,3 +263,268 @@ 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) +# **v3_get_user** +> GetPublicUserOutputBody v3_get_user(user_id) + +Get a user's public information + +Returns a user's username. Any authenticated caller may look up any user by ID. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.get_public_user_output_body import GetPublicUserOutputBody +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' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# 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.AuthenticationUsersApi(api_client) + user_id = 56 # int | User ID + + try: + # Get a user's public information + api_response = api_instance.v3_get_user(user_id) + print("The response of AuthenticationUsersApi->v3_get_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationUsersApi->v3_get_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **int**| User ID | + +### Return type + +[**GetPublicUserOutputBody**](GetPublicUserOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_user_activity** +> GetUserActivityOutputBody v3_get_user_activity() + +Get the caller's activity feed + +Returns the caller's own recent activity, their team's, and everyone's public activity, newest first. + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.get_user_activity_output_body import GetUserActivityOutputBody +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' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# 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.AuthenticationUsersApi(api_client) + + try: + # Get the caller's activity feed + api_response = api_instance.v3_get_user_activity() + print("The response of AuthenticationUsersApi->v3_get_user_activity:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationUsersApi->v3_get_user_activity: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**GetUserActivityOutputBody**](GetUserActivityOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**0** | 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) + +# **v3_submit_user_feedback** +> SubmitFeedbackOutputBody v3_submit_user_feedback(submit_feedback_body) + +Submit feedback + +Submits feedback about the application to a Slack channel. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.submit_feedback_body import SubmitFeedbackBody +from revengai.models.submit_feedback_output_body import SubmitFeedbackOutputBody +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' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# 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.AuthenticationUsersApi(api_client) + submit_feedback_body = revengai.SubmitFeedbackBody() # SubmitFeedbackBody | + + try: + # Submit feedback + api_response = api_instance.v3_submit_user_feedback(submit_feedback_body) + print("The response of AuthenticationUsersApi->v3_submit_user_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationUsersApi->v3_submit_user_feedback: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **submit_feedback_body** | [**SubmitFeedbackBody**](SubmitFeedbackBody.md)| | + +### Return type + +[**SubmitFeedbackOutputBody**](SubmitFeedbackOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CreateRequest.md b/docs/CreateRequest.md index 1df151aa..128c2aac 100644 --- a/docs/CreateRequest.md +++ b/docs/CreateRequest.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **filename** | **str** | | **sha_256_hash** | **str** | | **symbols** | [**Symbols**](Symbols.md) | | [optional] -**tags** | **List[str]** | | [optional] +**tags** | **List[Optional[str]]** | | [optional] ## Example diff --git a/docs/CreateSecretStoreInputBody.md b/docs/CreateSecretStoreInputBody.md new file mode 100644 index 00000000..66fb632f --- /dev/null +++ b/docs/CreateSecretStoreInputBody.md @@ -0,0 +1,31 @@ +# CreateSecretStoreInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_provider** | **str** | | +**key** | **str** | The provider's API key, encrypted before storage. | +**team_id** | **int** | Registers a team secret when set; the caller must administer that team. Registers a personal secret when omitted. | [optional] + +## Example + +```python +from revengai.models.create_secret_store_input_body import CreateSecretStoreInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateSecretStoreInputBody from a JSON string +create_secret_store_input_body_instance = CreateSecretStoreInputBody.from_json(json) +# print the JSON string representation of the object +print(CreateSecretStoreInputBody.to_json()) + +# convert the object into a dict +create_secret_store_input_body_dict = create_secret_store_input_body_instance.to_dict() +# create an instance of CreateSecretStoreInputBody from a dict +create_secret_store_input_body_from_dict = CreateSecretStoreInputBody.from_dict(create_secret_store_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExternalSourcesApi.md b/docs/ExternalSourcesApi.md index 10c98d0f..281f8fc4 100644 --- a/docs/ExternalSourcesApi.md +++ b/docs/ExternalSourcesApi.md @@ -7,6 +7,8 @@ Method | HTTP request | Description [**create_external_task_vt**](ExternalSourcesApi.md#create_external_task_vt) | **POST** /v2/analysis/{analysis_id}/external/vt | Pulls data from VirusTotal [**get_vt_data**](ExternalSourcesApi.md#get_vt_data) | **GET** /v2/analysis/{analysis_id}/external/vt | Get VirusTotal data [**get_vt_task_status**](ExternalSourcesApi.md#get_vt_task_status) | **GET** /v2/analysis/{analysis_id}/external/vt/status | Check the status of VirusTotal data retrieval +[**v3_get_virustotal_scan_operation**](ExternalSourcesApi.md#v3_get_virustotal_scan_operation) | **GET** /v3/operations/virustotal-scan/{binary_id} | Get a VirusTotal scan operation. +[**v3_run_virustotal_scan**](ExternalSourcesApi.md#v3_run_virustotal_scan) | **POST** /v3/binaries/{binary_id}/virustotal-scan:run | Trigger a VirusTotal lookup for a binary. # **create_external_task_vt** @@ -263,3 +265,192 @@ 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) +# **v3_get_virustotal_scan_operation** +> OperationVirusTotalScanMetadataVirusTotalScanResult v3_get_virustotal_scan_operation(binary_id) + +Get a VirusTotal scan operation. + +Returns the current state of the most recently triggered VirusTotal lookup for this binary. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_virus_total_scan_metadata_virus_total_scan_result import OperationVirusTotalScanMetadataVirusTotalScanResult +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' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# 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.ExternalSourcesApi(api_client) + binary_id = 56 # int | Binary ID + + try: + # Get a VirusTotal scan operation. + api_response = api_instance.v3_get_virustotal_scan_operation(binary_id) + print("The response of ExternalSourcesApi->v3_get_virustotal_scan_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExternalSourcesApi->v3_get_virustotal_scan_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **binary_id** | **int**| Binary ID | + +### Return type + +[**OperationVirusTotalScanMetadataVirusTotalScanResult**](OperationVirusTotalScanMetadataVirusTotalScanResult.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_run_virustotal_scan** +> OperationVirusTotalScanMetadataVirusTotalScanResult v3_run_virustotal_scan(binary_id) + +Trigger a VirusTotal lookup for a binary. + +Starts a lookup of the binary's content hash against VirusTotal, using the team's registered API key, and returns the operation to poll for its outcome. Returns 403 if the team has no valid key registered, and 409 while a lookup is already in progress for this binary. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `409` [`CONFLICT`](/errors/CONFLICT) — Conflict +- `403` [`NO_VIRUSTOTAL_KEY`](/errors/NO_VIRUSTOTAL_KEY) — No VirusTotal Key + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_virus_total_scan_metadata_virus_total_scan_result import OperationVirusTotalScanMetadataVirusTotalScanResult +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' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# 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.ExternalSourcesApi(api_client) + binary_id = 56 # int | Binary ID + + try: + # Trigger a VirusTotal lookup for a binary. + api_response = api_instance.v3_run_virustotal_scan(binary_id) + print("The response of ExternalSourcesApi->v3_run_virustotal_scan:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExternalSourcesApi->v3_run_virustotal_scan: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **binary_id** | **int**| Binary ID | + +### Return type + +[**OperationVirusTotalScanMetadataVirusTotalScanResult**](OperationVirusTotalScanMetadataVirusTotalScanResult.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**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) + diff --git a/docs/FunctionsAIDecompilationApi.md b/docs/FunctionsAIDecompilationApi.md index 3838a6df..b15d57fe 100644 --- a/docs/FunctionsAIDecompilationApi.md +++ b/docs/FunctionsAIDecompilationApi.md @@ -20,9 +20,11 @@ Method | HTTP request | Description [**upsert_ai_decompilation_rating**](FunctionsAIDecompilationApi.md#upsert_ai_decompilation_rating) | **PATCH** /v2/functions/{function_id}/ai-decompilation/rating | Upsert rating for AI decompilation [**v3_accept_ai_decompilation_type_suggestions**](FunctionsAIDecompilationApi.md#v3_accept_ai_decompilation_type_suggestions) | **POST** /v3/functions/{function_id}/ai-decompilation/type-suggestions/accept | Accept AI decompilation type suggestions [**v3_get_ai_decompilation_line_attributions**](FunctionsAIDecompilationApi.md#v3_get_ai_decompilation_line_attributions) | **GET** /v3/functions/{function_id}/ai-decompilation/line-attributions | Get AI decompilation line attributions +[**v3_get_ai_decompilation_rating**](FunctionsAIDecompilationApi.md#v3_get_ai_decompilation_rating) | **GET** /v3/functions/{function_id}/ai-decompilation/rating | Get AI decompilation rating [**v3_get_ai_decompilation_tokens**](FunctionsAIDecompilationApi.md#v3_get_ai_decompilation_tokens) | **GET** /v3/functions/{function_id}/ai-decompilation/tokens | Get AI decompilation tokens and user overrides [**v3_get_ai_decompilation_type_suggestions**](FunctionsAIDecompilationApi.md#v3_get_ai_decompilation_type_suggestions) | **GET** /v3/functions/{function_id}/ai-decompilation/type-suggestions | Get AI decompilation type suggestions [**v3_upsert_ai_decompilation_overrides**](FunctionsAIDecompilationApi.md#v3_upsert_ai_decompilation_overrides) | **PATCH** /v3/functions/{function_id}/ai-decompilation/overrides | Upsert variable/function name overrides +[**v3_upsert_ai_decompilation_rating**](FunctionsAIDecompilationApi.md#v3_upsert_ai_decompilation_rating) | **PATCH** /v3/functions/{function_id}/ai-decompilation/rating | Upsert AI decompilation rating # **create_ai_decompilation** @@ -1531,6 +1533,100 @@ 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) +# **v3_get_ai_decompilation_rating** +> RatingOutputBody v3_get_ai_decompilation_rating(function_id) + +Get AI decompilation rating + +Returns the caller's rating and reason for a function's AI decompilation, or null fields when they have not rated it yet. + +**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 + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.rating_output_body import RatingOutputBody +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' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.FunctionsAIDecompilationApi(api_client) + function_id = 56 # int | Function ID + + try: + # Get AI decompilation rating + api_response = api_instance.v3_get_ai_decompilation_rating(function_id) + print("The response of FunctionsAIDecompilationApi->v3_get_ai_decompilation_rating:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsAIDecompilationApi->v3_get_ai_decompilation_rating: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| Function ID | + +### Return type + +[**RatingOutputBody**](RatingOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **v3_get_ai_decompilation_tokens** > GetTokensResponse v3_get_ai_decompilation_tokens(function_id) @@ -1818,3 +1914,97 @@ 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) +# **v3_upsert_ai_decompilation_rating** +> v3_upsert_ai_decompilation_rating(function_id, upsert_rating_input_body) + +Upsert AI decompilation rating + +Records the caller's rating and optional reason for a function's AI decompilation, replacing any they recorded before. Requires an existing decompilation. + +**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 + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.upsert_rating_input_body import UpsertRatingInputBody +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' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.FunctionsAIDecompilationApi(api_client) + function_id = 56 # int | Function ID + upsert_rating_input_body = revengai.UpsertRatingInputBody() # UpsertRatingInputBody | + + try: + # Upsert AI decompilation rating + api_instance.v3_upsert_ai_decompilation_rating(function_id, upsert_rating_input_body) + except Exception as e: + print("Exception when calling FunctionsAIDecompilationApi->v3_upsert_ai_decompilation_rating: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| Function ID | + **upsert_rating_input_body** | [**UpsertRatingInputBody**](UpsertRatingInputBody.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/FunctionsCoreApi.md b/docs/FunctionsCoreApi.md index 648307a8..8cfc37d1 100644 --- a/docs/FunctionsCoreApi.md +++ b/docs/FunctionsCoreApi.md @@ -28,6 +28,7 @@ Method | HTTP request | Description [**list_imported_functions**](FunctionsCoreApi.md#list_imported_functions) | **GET** /v3/analyses/{analysis_id}/imported-functions | List imported functions in an analysis [**start_functions_matching**](FunctionsCoreApi.md#start_functions_matching) | **POST** /v3/functions/matches | Start function matching for an explicit set of functions [**v3_canonicalize_function_names**](FunctionsCoreApi.md#v3_canonicalize_function_names) | **POST** /v3/functions/canonical-names | Canonicalize a batch of function names +[**v3_get_analysis_func_maps**](FunctionsCoreApi.md#v3_get_analysis_func_maps) | **GET** /v3/analyses/{analysis_id}/func-maps | Get function ID/address maps for an analysis [**v3_search_functions**](FunctionsCoreApi.md#v3_search_functions) | **GET** /v3/functions | Search functions @@ -2257,6 +2258,99 @@ 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) +# **v3_get_analysis_func_maps** +> GetFunctionMapsOutputBody v3_get_analysis_func_maps(analysis_id) + +Get function ID/address maps for an analysis + +Returns three maps built from every function in the analysis's binary: function ID to virtual address, its inverse, and virtual address to mangled name. Empty maps for a binary with no functions yet. + +**Error codes:** +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.get_function_maps_output_body import GetFunctionMapsOutputBody +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' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# 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.FunctionsCoreApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # Get function ID/address maps for an analysis + api_response = api_instance.v3_get_analysis_func_maps(analysis_id) + print("The response of FunctionsCoreApi->v3_get_analysis_func_maps:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsCoreApi->v3_get_analysis_func_maps: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**GetFunctionMapsOutputBody**](GetFunctionMapsOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **v3_search_functions** > SearchFunctionsOutputBody v3_search_functions(partial_name=partial_name, model_name=model_name, limit=limit, offset=offset) diff --git a/docs/GetAPIKeysOutputBody.md b/docs/GetAPIKeysOutputBody.md new file mode 100644 index 00000000..202e502d --- /dev/null +++ b/docs/GetAPIKeysOutputBody.md @@ -0,0 +1,29 @@ +# GetAPIKeysOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**keys** | [**List[ApiKeyBody]**](ApiKeyBody.md) | The caller's active API keys. Currently always exactly one, created on first request if the caller doesn't have one yet | + +## Example + +```python +from revengai.models.get_api_keys_output_body import GetAPIKeysOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of GetAPIKeysOutputBody from a JSON string +get_api_keys_output_body_instance = GetAPIKeysOutputBody.from_json(json) +# print the JSON string representation of the object +print(GetAPIKeysOutputBody.to_json()) + +# convert the object into a dict +get_api_keys_output_body_dict = get_api_keys_output_body_instance.to_dict() +# create an instance of GetAPIKeysOutputBody from a dict +get_api_keys_output_body_from_dict = GetAPIKeysOutputBody.from_dict(get_api_keys_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetFunctionMapsOutputBody.md b/docs/GetFunctionMapsOutputBody.md new file mode 100644 index 00000000..69869ad1 --- /dev/null +++ b/docs/GetFunctionMapsOutputBody.md @@ -0,0 +1,31 @@ +# GetFunctionMapsOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_map** | **Dict[str, int]** | Function ID (as a string key) to virtual address, for every function in the analysis's binary. | +**inverse_function_map** | **Dict[str, int]** | Virtual address (as a string key) to function ID — the inverse of function_map. | +**name_map** | **Dict[str, str]** | Virtual address (as a string key) to mangled function name. Empty string for a function with no mangled name. | + +## Example + +```python +from revengai.models.get_function_maps_output_body import GetFunctionMapsOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of GetFunctionMapsOutputBody from a JSON string +get_function_maps_output_body_instance = GetFunctionMapsOutputBody.from_json(json) +# print the JSON string representation of the object +print(GetFunctionMapsOutputBody.to_json()) + +# convert the object into a dict +get_function_maps_output_body_dict = get_function_maps_output_body_instance.to_dict() +# create an instance of GetFunctionMapsOutputBody from a dict +get_function_maps_output_body_from_dict = GetFunctionMapsOutputBody.from_dict(get_function_maps_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetPublicUserOutputBody.md b/docs/GetPublicUserOutputBody.md new file mode 100644 index 00000000..b6aee6c3 --- /dev/null +++ b/docs/GetPublicUserOutputBody.md @@ -0,0 +1,30 @@ +# GetPublicUserOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **int** | The user's ID | +**username** | **str** | The user's display name | + +## Example + +```python +from revengai.models.get_public_user_output_body import GetPublicUserOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of GetPublicUserOutputBody from a JSON string +get_public_user_output_body_instance = GetPublicUserOutputBody.from_json(json) +# print the JSON string representation of the object +print(GetPublicUserOutputBody.to_json()) + +# convert the object into a dict +get_public_user_output_body_dict = get_public_user_output_body_instance.to_dict() +# create an instance of GetPublicUserOutputBody from a dict +get_public_user_output_body_from_dict = GetPublicUserOutputBody.from_dict(get_public_user_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetUserActivityOutputBody.md b/docs/GetUserActivityOutputBody.md new file mode 100644 index 00000000..606a0c1c --- /dev/null +++ b/docs/GetUserActivityOutputBody.md @@ -0,0 +1,29 @@ +# GetUserActivityOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**activities** | [**List[ActivityBody]**](ActivityBody.md) | Recent activity visible to the caller: their own private activity, their team's, and everyone's public activity | + +## Example + +```python +from revengai.models.get_user_activity_output_body import GetUserActivityOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of GetUserActivityOutputBody from a JSON string +get_user_activity_output_body_instance = GetUserActivityOutputBody.from_json(json) +# print the JSON string representation of the object +print(GetUserActivityOutputBody.to_json()) + +# convert the object into a dict +get_user_activity_output_body_dict = get_user_activity_output_body_instance.to_dict() +# create an instance of GetUserActivityOutputBody from a dict +get_user_activity_output_body_from_dict = GetUserActivityOutputBody.from_dict(get_user_activity_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListSecretStoreOutputBody.md b/docs/ListSecretStoreOutputBody.md new file mode 100644 index 00000000..319d7524 --- /dev/null +++ b/docs/ListSecretStoreOutputBody.md @@ -0,0 +1,29 @@ +# ListSecretStoreOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**secrets** | [**List[SecretBody]**](SecretBody.md) | | + +## Example + +```python +from revengai.models.list_secret_store_output_body import ListSecretStoreOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of ListSecretStoreOutputBody from a JSON string +list_secret_store_output_body_instance = ListSecretStoreOutputBody.from_json(json) +# print the JSON string representation of the object +print(ListSecretStoreOutputBody.to_json()) + +# convert the object into a dict +list_secret_store_output_body_dict = list_secret_store_output_body_instance.to_dict() +# create an instance of ListSecretStoreOutputBody from a dict +list_secret_store_output_body_from_dict = ListSecretStoreOutputBody.from_dict(list_secret_store_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationVirusTotalScanMetadataVirusTotalScanResult.md b/docs/OperationVirusTotalScanMetadataVirusTotalScanResult.md new file mode 100644 index 00000000..97bd2814 --- /dev/null +++ b/docs/OperationVirusTotalScanMetadataVirusTotalScanResult.md @@ -0,0 +1,33 @@ +# OperationVirusTotalScanMetadataVirusTotalScanResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**done** | **bool** | Whether the operation has reached a terminal state. | +**error** | [**Status**](Status.md) | Failure detail, populated only when done is true and the operation failed. | [optional] +**metadata** | [**VirusTotalScanMetadata**](VirusTotalScanMetadata.md) | In-flight information and details. | [optional] +**name** | **str** | API resource name. | +**response** | [**VirusTotalScanResult**](VirusTotalScanResult.md) | Result, set only when done is true and the operation succeeded. | [optional] + +## Example + +```python +from revengai.models.operation_virus_total_scan_metadata_virus_total_scan_result import OperationVirusTotalScanMetadataVirusTotalScanResult + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationVirusTotalScanMetadataVirusTotalScanResult from a JSON string +operation_virus_total_scan_metadata_virus_total_scan_result_instance = OperationVirusTotalScanMetadataVirusTotalScanResult.from_json(json) +# print the JSON string representation of the object +print(OperationVirusTotalScanMetadataVirusTotalScanResult.to_json()) + +# convert the object into a dict +operation_virus_total_scan_metadata_virus_total_scan_result_dict = operation_virus_total_scan_metadata_virus_total_scan_result_instance.to_dict() +# create an instance of OperationVirusTotalScanMetadataVirusTotalScanResult from a dict +operation_virus_total_scan_metadata_virus_total_scan_result_from_dict = OperationVirusTotalScanMetadataVirusTotalScanResult.from_dict(operation_virus_total_scan_metadata_virus_total_scan_result_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/RatingOutputBody.md b/docs/RatingOutputBody.md new file mode 100644 index 00000000..0d6d37db --- /dev/null +++ b/docs/RatingOutputBody.md @@ -0,0 +1,30 @@ +# RatingOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rating** | **str** | The rating the caller recorded, or null when they have not rated it yet | +**reason** | **str** | The reason the caller gave, or null | + +## Example + +```python +from revengai.models.rating_output_body import RatingOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of RatingOutputBody from a JSON string +rating_output_body_instance = RatingOutputBody.from_json(json) +# print the JSON string representation of the object +print(RatingOutputBody.to_json()) + +# convert the object into a dict +rating_output_body_dict = rating_output_body_instance.to_dict() +# create an instance of RatingOutputBody from a dict +rating_output_body_from_dict = RatingOutputBody.from_dict(rating_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResendVerificationEmailInputBody.md b/docs/ResendVerificationEmailInputBody.md new file mode 100644 index 00000000..b8ebc58f --- /dev/null +++ b/docs/ResendVerificationEmailInputBody.md @@ -0,0 +1,29 @@ +# ResendVerificationEmailInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email address of the account to resend a verification code to | + +## Example + +```python +from revengai.models.resend_verification_email_input_body import ResendVerificationEmailInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of ResendVerificationEmailInputBody from a JSON string +resend_verification_email_input_body_instance = ResendVerificationEmailInputBody.from_json(json) +# print the JSON string representation of the object +print(ResendVerificationEmailInputBody.to_json()) + +# convert the object into a dict +resend_verification_email_input_body_dict = resend_verification_email_input_body_instance.to_dict() +# create an instance of ResendVerificationEmailInputBody from a dict +resend_verification_email_input_body_from_dict = ResendVerificationEmailInputBody.from_dict(resend_verification_email_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SecretBody.md b/docs/SecretBody.md new file mode 100644 index 00000000..fa04fb48 --- /dev/null +++ b/docs/SecretBody.md @@ -0,0 +1,37 @@ +# SecretBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | | +**api_provider** | **str** | | +**creation** | **datetime** | | +**disabled_at** | **datetime** | | [optional] +**id** | **int** | | +**key** | **str** | Masked API key showing only the last 4 characters | +**team_id** | **int** | Null for a personal secret | [optional] +**user_id** | **int** | | +**valid** | **bool** | | + +## Example + +```python +from revengai.models.secret_body import SecretBody + +# TODO update the JSON string below +json = "{}" +# create an instance of SecretBody from a JSON string +secret_body_instance = SecretBody.from_json(json) +# print the JSON string representation of the object +print(SecretBody.to_json()) + +# convert the object into a dict +secret_body_dict = secret_body_instance.to_dict() +# create an instance of SecretBody from a dict +secret_body_from_dict = SecretBody.from_dict(secret_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubmitFeedbackBody.md b/docs/SubmitFeedbackBody.md new file mode 100644 index 00000000..c4005cbc --- /dev/null +++ b/docs/SubmitFeedbackBody.md @@ -0,0 +1,31 @@ +# SubmitFeedbackBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**current_route** | **str** | The route the caller was on when they submitted feedback | +**feedback** | **str** | The feedback text | +**screen_capture_url** | **str** | Optional URL to a screen capture related to the feedback | [optional] + +## Example + +```python +from revengai.models.submit_feedback_body import SubmitFeedbackBody + +# TODO update the JSON string below +json = "{}" +# create an instance of SubmitFeedbackBody from a JSON string +submit_feedback_body_instance = SubmitFeedbackBody.from_json(json) +# print the JSON string representation of the object +print(SubmitFeedbackBody.to_json()) + +# convert the object into a dict +submit_feedback_body_dict = submit_feedback_body_instance.to_dict() +# create an instance of SubmitFeedbackBody from a dict +submit_feedback_body_from_dict = SubmitFeedbackBody.from_dict(submit_feedback_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubmitFeedbackOutputBody.md b/docs/SubmitFeedbackOutputBody.md new file mode 100644 index 00000000..04ebbfc6 --- /dev/null +++ b/docs/SubmitFeedbackOutputBody.md @@ -0,0 +1,29 @@ +# SubmitFeedbackOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | Confirmation message | + +## Example + +```python +from revengai.models.submit_feedback_output_body import SubmitFeedbackOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of SubmitFeedbackOutputBody from a JSON string +submit_feedback_output_body_instance = SubmitFeedbackOutputBody.from_json(json) +# print the JSON string representation of the object +print(SubmitFeedbackOutputBody.to_json()) + +# convert the object into a dict +submit_feedback_output_body_dict = submit_feedback_output_body_instance.to_dict() +# create an instance of SubmitFeedbackOutputBody from a dict +submit_feedback_output_body_from_dict = SubmitFeedbackOutputBody.from_dict(submit_feedback_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateSecretStoreInputBody.md b/docs/UpdateSecretStoreInputBody.md new file mode 100644 index 00000000..0d7c9806 --- /dev/null +++ b/docs/UpdateSecretStoreInputBody.md @@ -0,0 +1,30 @@ +# UpdateSecretStoreInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | Activates or deactivates the secret. Omit to leave unchanged. | [optional] +**key** | **str** | New API key. Omit to leave the current key unchanged. | [optional] + +## Example + +```python +from revengai.models.update_secret_store_input_body import UpdateSecretStoreInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSecretStoreInputBody from a JSON string +update_secret_store_input_body_instance = UpdateSecretStoreInputBody.from_json(json) +# print the JSON string representation of the object +print(UpdateSecretStoreInputBody.to_json()) + +# convert the object into a dict +update_secret_store_input_body_dict = update_secret_store_input_body_instance.to_dict() +# create an instance of UpdateSecretStoreInputBody from a dict +update_secret_store_input_body_from_dict = UpdateSecretStoreInputBody.from_dict(update_secret_store_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpsertRatingInputBody.md b/docs/UpsertRatingInputBody.md new file mode 100644 index 00000000..8433bc76 --- /dev/null +++ b/docs/UpsertRatingInputBody.md @@ -0,0 +1,30 @@ +# UpsertRatingInputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rating** | **str** | How useful the caller found this AI decompilation | +**reason** | **str** | Optional free-text reason for the rating | [optional] + +## Example + +```python +from revengai.models.upsert_rating_input_body import UpsertRatingInputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of UpsertRatingInputBody from a JSON string +upsert_rating_input_body_instance = UpsertRatingInputBody.from_json(json) +# print the JSON string representation of the object +print(UpsertRatingInputBody.to_json()) + +# convert the object into a dict +upsert_rating_input_body_dict = upsert_rating_input_body_instance.to_dict() +# create an instance of UpsertRatingInputBody from a dict +upsert_rating_input_body_from_dict = UpsertRatingInputBody.from_dict(upsert_rating_input_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VirusTotalScanMetadata.md b/docs/VirusTotalScanMetadata.md new file mode 100644 index 00000000..f7aba9e7 --- /dev/null +++ b/docs/VirusTotalScanMetadata.md @@ -0,0 +1,29 @@ +# VirusTotalScanMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | Lookup status. UNINITIALISED means this binary has never had a lookup triggered. | + +## Example + +```python +from revengai.models.virus_total_scan_metadata import VirusTotalScanMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of VirusTotalScanMetadata from a JSON string +virus_total_scan_metadata_instance = VirusTotalScanMetadata.from_json(json) +# print the JSON string representation of the object +print(VirusTotalScanMetadata.to_json()) + +# convert the object into a dict +virus_total_scan_metadata_dict = virus_total_scan_metadata_instance.to_dict() +# create an instance of VirusTotalScanMetadata from a dict +virus_total_scan_metadata_from_dict = VirusTotalScanMetadata.from_dict(virus_total_scan_metadata_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/VirusTotalScanResult.md b/docs/VirusTotalScanResult.md new file mode 100644 index 00000000..0f0843a0 --- /dev/null +++ b/docs/VirusTotalScanResult.md @@ -0,0 +1,31 @@ +# VirusTotalScanResult + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sha_256_hash** | **str** | Content hash the lookup was keyed by | +**vt** | **object** | | +**vt_last_updated** | **datetime** | When this result was recorded | + +## Example + +```python +from revengai.models.virus_total_scan_result import VirusTotalScanResult + +# TODO update the JSON string below +json = "{}" +# create an instance of VirusTotalScanResult from a JSON string +virus_total_scan_result_instance = VirusTotalScanResult.from_json(json) +# print the JSON string representation of the object +print(VirusTotalScanResult.to_json()) + +# convert the object into a dict +virus_total_scan_result_dict = virus_total_scan_result_instance.to_dict() +# create an instance of VirusTotalScanResult from a dict +virus_total_scan_result_from_dict = VirusTotalScanResult.from_dict(virus_total_scan_result_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 08222693..3ab1b0e0 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v4.60.1" +__version__ = "v4.64.0" # Define package exports __all__ = [ @@ -50,6 +50,7 @@ "AcceptTypeSuggestionsInputBody", "AcceptTypeSuggestionsOutputBody", "AcceptedType", + "ActivityBody", "AddCalleeInputBody", "AddCollectionBinariesInputBody", "AddIssuerDomainInputBody", @@ -103,6 +104,7 @@ "AnalysisXrefOutputBody", "ApiCall", "ApiCombinationEvidence", + "ApiKeyBody", "AppApiRestV2AgentSchemaCapability", "AppApiRestV2AnalysesEnumsOrderBy", "AppApiRestV2CollectionsEnumsOrderBy", @@ -281,6 +283,7 @@ "CreatePortalSessionInputBody", "CreateRequest", "CreateResult", + "CreateSecretStoreInputBody", "CreateStructDataType", "CreateTeamInputBody", "CreateTypedefDataType", @@ -431,6 +434,7 @@ "FunctionsListRename", "FunctionsProgressOutputBody", "GeneratePDFOutputBody", + "GetAPIKeysOutputBody", "GetAdditionalDetailsOutputBody", "GetAdditionalDetailsStatusOutputBody", "GetAiDecompilationRatingResponse", @@ -441,16 +445,19 @@ "GetConfigOutputBody", "GetDataTypeHistoryBody", "GetDieInfoOutputBody", + "GetFunctionMapsOutputBody", "GetFunctionSignatureHistoryBody", "GetMatchesOutputBody", "GetMatchesStatusOutputBody", "GetModelsOutputBody", "GetProductsOutputBody", + "GetPublicUserOutputBody", "GetPublicUserResponse", "GetRelatedBinariesOutputBody", "GetRelatedStatusOutputBody", "GetSubscriptionOutputBody", "GetTokensResponse", + "GetUserActivityOutputBody", "HardcodedSecretEvidence", "HistoryActor", "HistoryEntry", @@ -487,6 +494,7 @@ "ListFunctionSignaturesOutputBody", "ListFunctionStringsOutputBody", "ListImportedFunctionsOutputBody", + "ListSecretStoreOutputBody", "ListTeamsOutputBody", "ListUsersOutputBody", "LocationOutputBody", @@ -536,6 +544,7 @@ "OperationNetworkingExplainMetadataNetworkingExplainResult", "OperationNetworkingScanMetadataNetworkingScanResult", "OperationSecurityScanMetadataSecurityScanResult", + "OperationVirusTotalScanMetadataVirusTotalScanResult", "OperationWorkflowProgressResultBody", "Order", "Organisation", @@ -572,6 +581,7 @@ "ProtocolsAgentResponse", "PutAnalysisStringsRequest", "QueuedWorkflowTaskResponse", + "RatingOutputBody", "ReAnalysisForm", "Recent", "ReferencedConstant", @@ -598,6 +608,7 @@ "ReportReachabilityStatus", "ReportResult", "RequestedConfigBody", + "ResendVerificationEmailInputBody", "ResolvedEntity", "ResultBody", "RevokeBody", @@ -615,6 +626,7 @@ "SearchBinariesOutputBody", "SearchFunctionsOutputBody", "SearchTagsOutputBody", + "SecretBody", "SecretsAgentResponse", "SectionModel", "SecurityFinding", @@ -676,7 +688,9 @@ "SubjectAnyOf1", "SubjectAnyOf2", "SubjectAnyOf3", + "SubmitFeedbackBody", "SubmitFeedbackInputBody", + "SubmitFeedbackOutputBody", "SubmitUserFeedbackRequest", "SuggestedHole", "SuggestedMemberView", @@ -738,6 +752,7 @@ "UpdatePasswordInputBody", "UpdatePointerDataType", "UpdateProfileInputBody", + "UpdateSecretStoreInputBody", "UpdateStructDataType", "UpdateTagsInputBody", "UpdateTeamInputBody", @@ -754,11 +769,14 @@ "UpsertAiDecomplationRatingRequest", "UpsertOverridesData", "UpsertOverridesInputBody", + "UpsertRatingInputBody", "User", "UserActivityResponse", "UserCredits", "UserIdentity", "UserProfile", + "VirusTotalScanMetadata", + "VirusTotalScanResult", "WarningEvent", "WorkflowDayBody", "WorkflowProgress", @@ -809,6 +827,7 @@ from revengai.models.accept_type_suggestions_input_body import AcceptTypeSuggestionsInputBody as AcceptTypeSuggestionsInputBody from revengai.models.accept_type_suggestions_output_body import AcceptTypeSuggestionsOutputBody as AcceptTypeSuggestionsOutputBody from revengai.models.accepted_type import AcceptedType as AcceptedType +from revengai.models.activity_body import ActivityBody as ActivityBody from revengai.models.add_callee_input_body import AddCalleeInputBody as AddCalleeInputBody from revengai.models.add_collection_binaries_input_body import AddCollectionBinariesInputBody as AddCollectionBinariesInputBody from revengai.models.add_issuer_domain_input_body import AddIssuerDomainInputBody as AddIssuerDomainInputBody @@ -862,6 +881,7 @@ from revengai.models.analysis_xref_output_body import AnalysisXrefOutputBody as AnalysisXrefOutputBody from revengai.models.api_call import ApiCall as ApiCall from revengai.models.api_combination_evidence import ApiCombinationEvidence as ApiCombinationEvidence +from revengai.models.api_key_body import ApiKeyBody as ApiKeyBody from revengai.models.app_api_rest_v2_agent_schema_capability import AppApiRestV2AgentSchemaCapability as AppApiRestV2AgentSchemaCapability from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy as AppApiRestV2AnalysesEnumsOrderBy from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy as AppApiRestV2CollectionsEnumsOrderBy @@ -1040,6 +1060,7 @@ from revengai.models.create_portal_session_input_body import CreatePortalSessionInputBody as CreatePortalSessionInputBody from revengai.models.create_request import CreateRequest as CreateRequest from revengai.models.create_result import CreateResult as CreateResult +from revengai.models.create_secret_store_input_body import CreateSecretStoreInputBody as CreateSecretStoreInputBody from revengai.models.create_struct_data_type import CreateStructDataType as CreateStructDataType from revengai.models.create_team_input_body import CreateTeamInputBody as CreateTeamInputBody from revengai.models.create_typedef_data_type import CreateTypedefDataType as CreateTypedefDataType @@ -1190,6 +1211,7 @@ from revengai.models.functions_list_rename import FunctionsListRename as FunctionsListRename from revengai.models.functions_progress_output_body import FunctionsProgressOutputBody as FunctionsProgressOutputBody from revengai.models.generate_pdf_output_body import GeneratePDFOutputBody as GeneratePDFOutputBody +from revengai.models.get_api_keys_output_body import GetAPIKeysOutputBody as GetAPIKeysOutputBody 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 @@ -1200,16 +1222,19 @@ from revengai.models.get_config_output_body import GetConfigOutputBody as GetConfigOutputBody from revengai.models.get_data_type_history_body import GetDataTypeHistoryBody as GetDataTypeHistoryBody from revengai.models.get_die_info_output_body import GetDieInfoOutputBody as GetDieInfoOutputBody +from revengai.models.get_function_maps_output_body import GetFunctionMapsOutputBody as GetFunctionMapsOutputBody from revengai.models.get_function_signature_history_body import GetFunctionSignatureHistoryBody as GetFunctionSignatureHistoryBody from revengai.models.get_matches_output_body import GetMatchesOutputBody as GetMatchesOutputBody from revengai.models.get_matches_status_output_body import GetMatchesStatusOutputBody as GetMatchesStatusOutputBody from revengai.models.get_models_output_body import GetModelsOutputBody as GetModelsOutputBody from revengai.models.get_products_output_body import GetProductsOutputBody as GetProductsOutputBody +from revengai.models.get_public_user_output_body import GetPublicUserOutputBody as GetPublicUserOutputBody from revengai.models.get_public_user_response import GetPublicUserResponse as GetPublicUserResponse from revengai.models.get_related_binaries_output_body import GetRelatedBinariesOutputBody as GetRelatedBinariesOutputBody from revengai.models.get_related_status_output_body import GetRelatedStatusOutputBody as GetRelatedStatusOutputBody from revengai.models.get_subscription_output_body import GetSubscriptionOutputBody as GetSubscriptionOutputBody from revengai.models.get_tokens_response import GetTokensResponse as GetTokensResponse +from revengai.models.get_user_activity_output_body import GetUserActivityOutputBody as GetUserActivityOutputBody from revengai.models.hardcoded_secret_evidence import HardcodedSecretEvidence as HardcodedSecretEvidence from revengai.models.history_actor import HistoryActor as HistoryActor from revengai.models.history_entry import HistoryEntry as HistoryEntry @@ -1246,6 +1271,7 @@ from revengai.models.list_function_signatures_output_body import ListFunctionSignaturesOutputBody as ListFunctionSignaturesOutputBody from revengai.models.list_function_strings_output_body import ListFunctionStringsOutputBody as ListFunctionStringsOutputBody from revengai.models.list_imported_functions_output_body import ListImportedFunctionsOutputBody as ListImportedFunctionsOutputBody +from revengai.models.list_secret_store_output_body import ListSecretStoreOutputBody as ListSecretStoreOutputBody from revengai.models.list_teams_output_body import ListTeamsOutputBody as ListTeamsOutputBody from revengai.models.list_users_output_body import ListUsersOutputBody as ListUsersOutputBody from revengai.models.location_output_body import LocationOutputBody as LocationOutputBody @@ -1295,6 +1321,7 @@ from revengai.models.operation_networking_explain_metadata_networking_explain_result import OperationNetworkingExplainMetadataNetworkingExplainResult as OperationNetworkingExplainMetadataNetworkingExplainResult from revengai.models.operation_networking_scan_metadata_networking_scan_result import OperationNetworkingScanMetadataNetworkingScanResult as OperationNetworkingScanMetadataNetworkingScanResult from revengai.models.operation_security_scan_metadata_security_scan_result import OperationSecurityScanMetadataSecurityScanResult as OperationSecurityScanMetadataSecurityScanResult +from revengai.models.operation_virus_total_scan_metadata_virus_total_scan_result import OperationVirusTotalScanMetadataVirusTotalScanResult as OperationVirusTotalScanMetadataVirusTotalScanResult from revengai.models.operation_workflow_progress_result_body import OperationWorkflowProgressResultBody as OperationWorkflowProgressResultBody from revengai.models.order import Order as Order from revengai.models.organisation import Organisation as Organisation @@ -1331,6 +1358,7 @@ from revengai.models.protocols_agent_response import ProtocolsAgentResponse as ProtocolsAgentResponse from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest as PutAnalysisStringsRequest from revengai.models.queued_workflow_task_response import QueuedWorkflowTaskResponse as QueuedWorkflowTaskResponse +from revengai.models.rating_output_body import RatingOutputBody as RatingOutputBody from revengai.models.re_analysis_form import ReAnalysisForm as ReAnalysisForm from revengai.models.recent import Recent as Recent from revengai.models.referenced_constant import ReferencedConstant as ReferencedConstant @@ -1357,6 +1385,7 @@ from revengai.models.report_reachability_status import ReportReachabilityStatus as ReportReachabilityStatus from revengai.models.report_result import ReportResult as ReportResult from revengai.models.requested_config_body import RequestedConfigBody as RequestedConfigBody +from revengai.models.resend_verification_email_input_body import ResendVerificationEmailInputBody as ResendVerificationEmailInputBody from revengai.models.resolved_entity import ResolvedEntity as ResolvedEntity from revengai.models.result_body import ResultBody as ResultBody from revengai.models.revoke_body import RevokeBody as RevokeBody @@ -1374,6 +1403,7 @@ from revengai.models.search_binaries_output_body import SearchBinariesOutputBody as SearchBinariesOutputBody from revengai.models.search_functions_output_body import SearchFunctionsOutputBody as SearchFunctionsOutputBody from revengai.models.search_tags_output_body import SearchTagsOutputBody as SearchTagsOutputBody +from revengai.models.secret_body import SecretBody as SecretBody from revengai.models.secrets_agent_response import SecretsAgentResponse as SecretsAgentResponse from revengai.models.section_model import SectionModel as SectionModel from revengai.models.security_finding import SecurityFinding as SecurityFinding @@ -1435,7 +1465,9 @@ from revengai.models.subject_any_of1 import SubjectAnyOf1 as SubjectAnyOf1 from revengai.models.subject_any_of2 import SubjectAnyOf2 as SubjectAnyOf2 from revengai.models.subject_any_of3 import SubjectAnyOf3 as SubjectAnyOf3 +from revengai.models.submit_feedback_body import SubmitFeedbackBody as SubmitFeedbackBody from revengai.models.submit_feedback_input_body import SubmitFeedbackInputBody as SubmitFeedbackInputBody +from revengai.models.submit_feedback_output_body import SubmitFeedbackOutputBody as SubmitFeedbackOutputBody from revengai.models.submit_user_feedback_request import SubmitUserFeedbackRequest as SubmitUserFeedbackRequest from revengai.models.suggested_hole import SuggestedHole as SuggestedHole from revengai.models.suggested_member_view import SuggestedMemberView as SuggestedMemberView @@ -1497,6 +1529,7 @@ from revengai.models.update_password_input_body import UpdatePasswordInputBody as UpdatePasswordInputBody from revengai.models.update_pointer_data_type import UpdatePointerDataType as UpdatePointerDataType from revengai.models.update_profile_input_body import UpdateProfileInputBody as UpdateProfileInputBody +from revengai.models.update_secret_store_input_body import UpdateSecretStoreInputBody as UpdateSecretStoreInputBody from revengai.models.update_struct_data_type import UpdateStructDataType as UpdateStructDataType from revengai.models.update_tags_input_body import UpdateTagsInputBody as UpdateTagsInputBody from revengai.models.update_team_input_body import UpdateTeamInputBody as UpdateTeamInputBody @@ -1513,11 +1546,14 @@ from revengai.models.upsert_ai_decomplation_rating_request import UpsertAiDecomplationRatingRequest as UpsertAiDecomplationRatingRequest from revengai.models.upsert_overrides_data import UpsertOverridesData as UpsertOverridesData from revengai.models.upsert_overrides_input_body import UpsertOverridesInputBody as UpsertOverridesInputBody +from revengai.models.upsert_rating_input_body import UpsertRatingInputBody as UpsertRatingInputBody from revengai.models.user import User as User from revengai.models.user_activity_response import UserActivityResponse as UserActivityResponse from revengai.models.user_credits import UserCredits as UserCredits from revengai.models.user_identity import UserIdentity as UserIdentity from revengai.models.user_profile import UserProfile as UserProfile +from revengai.models.virus_total_scan_metadata import VirusTotalScanMetadata as VirusTotalScanMetadata +from revengai.models.virus_total_scan_result import VirusTotalScanResult as VirusTotalScanResult from revengai.models.warning_event import WarningEvent as WarningEvent from revengai.models.workflow_day_body import WorkflowDayBody as WorkflowDayBody from revengai.models.workflow_progress import WorkflowProgress as WorkflowProgress diff --git a/revengai/api/analyses_core_api.py b/revengai/api/analyses_core_api.py index a74cccfe..0b66270e 100644 --- a/revengai/api/analyses_core_api.py +++ b/revengai/api/analyses_core_api.py @@ -41,7 +41,6 @@ from revengai.models.base_response_recent import BaseResponseRecent from revengai.models.base_response_status import BaseResponseStatus from revengai.models.base_response_upload_response import BaseResponseUploadResponse -from revengai.models.create_request import CreateRequest from revengai.models.dynamic_execution_status import DynamicExecutionStatus from revengai.models.dynamic_execution_status_response import DynamicExecutionStatusResponse from revengai.models.functions_progress_output_body import FunctionsProgressOutputBody @@ -6838,320 +6837,6 @@ def _upload_file_serialize( - @validate_call - def v3_create_analysis( - self, - create_request: CreateRequest, - x_rev_eng_application: Annotated[Optional[StrictStr], Field(description="Identifies the calling RevEng application. Recorded on the Analysis log.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OperationCreateMetadataCreateResult: - """Create an analysis - - Queues a new Analysis for an uploaded Binary and returns the created Operation. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large - - :param create_request: (required) - :type create_request: CreateRequest - :param x_rev_eng_application: Identifies the calling RevEng application. Recorded on the Analysis log. - :type x_rev_eng_application: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (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._v3_create_analysis_serialize( - create_request=create_request, - x_rev_eng_application=x_rev_eng_application, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "OperationCreateMetadataCreateResult", - '400': "APIError", - '402': "APIError", - '403': "APIError", - '404': "APIError", - '409': "APIError", - '413': "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 v3_create_analysis_with_http_info( - self, - create_request: CreateRequest, - x_rev_eng_application: Annotated[Optional[StrictStr], Field(description="Identifies the calling RevEng application. Recorded on the Analysis log.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OperationCreateMetadataCreateResult]: - """Create an analysis - - Queues a new Analysis for an uploaded Binary and returns the created Operation. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large - - :param create_request: (required) - :type create_request: CreateRequest - :param x_rev_eng_application: Identifies the calling RevEng application. Recorded on the Analysis log. - :type x_rev_eng_application: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (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._v3_create_analysis_serialize( - create_request=create_request, - x_rev_eng_application=x_rev_eng_application, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "OperationCreateMetadataCreateResult", - '400': "APIError", - '402': "APIError", - '403': "APIError", - '404': "APIError", - '409': "APIError", - '413': "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 v3_create_analysis_without_preload_content( - self, - create_request: CreateRequest, - x_rev_eng_application: Annotated[Optional[StrictStr], Field(description="Identifies the calling RevEng application. Recorded on the Analysis log.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create an analysis - - Queues a new Analysis for an uploaded Binary and returns the created Operation. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large - - :param create_request: (required) - :type create_request: CreateRequest - :param x_rev_eng_application: Identifies the calling RevEng application. Recorded on the Analysis log. - :type x_rev_eng_application: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (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._v3_create_analysis_serialize( - create_request=create_request, - x_rev_eng_application=x_rev_eng_application, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "OperationCreateMetadataCreateResult", - '400': "APIError", - '402': "APIError", - '403': "APIError", - '404': "APIError", - '409': "APIError", - '413': "APIError", - '422': "APIError", - '500': "APIError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _v3_create_analysis_serialize( - self, - create_request, - x_rev_eng_application, - _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 - # process the query parameters - # process the header parameters - if x_rev_eng_application is not None: - _header_params['X-RevEng-Application'] = x_rev_eng_application - # process the form parameters - # process the body parameter - if create_request is not None: - _body_params = 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', - 'bearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='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/v3/analyses', - 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 v3_delete_analysis( self, diff --git a/revengai/api/authentication_users_api.py b/revengai/api/authentication_users_api.py index 8d9bac6b..768db76e 100644 --- a/revengai/api/authentication_users_api.py +++ b/revengai/api/authentication_users_api.py @@ -15,10 +15,15 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictInt +from pydantic import Field, StrictInt +from typing_extensions import Annotated from revengai.models.base_response import BaseResponse from revengai.models.base_response_get_public_user_response import BaseResponseGetPublicUserResponse from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse +from revengai.models.get_public_user_output_body import GetPublicUserOutputBody +from revengai.models.get_user_activity_output_body import GetUserActivityOutputBody +from revengai.models.submit_feedback_body import SubmitFeedbackBody +from revengai.models.submit_feedback_output_body import SubmitFeedbackOutputBody from revengai.models.submit_user_feedback_request import SubmitUserFeedbackRequest from revengai.api_client import ApiClient, RequestSerialized @@ -824,3 +829,805 @@ def _submit_user_feedback_serialize( ) + + + @validate_call + def v3_get_user( + self, + user_id: Annotated[int, Field(strict=True, ge=1, description="User 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, + ) -> GetPublicUserOutputBody: + """Get a user's public information + + Returns a user's username. Any authenticated caller may look up any user by ID. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + + :param user_id: User ID (required) + :type user_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._v3_get_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetPublicUserOutputBody", + '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 v3_get_user_with_http_info( + self, + user_id: Annotated[int, Field(strict=True, ge=1, description="User 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[GetPublicUserOutputBody]: + """Get a user's public information + + Returns a user's username. Any authenticated caller may look up any user by ID. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + + :param user_id: User ID (required) + :type user_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._v3_get_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetPublicUserOutputBody", + '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 v3_get_user_without_preload_content( + self, + user_id: Annotated[int, Field(strict=True, ge=1, description="User 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 a user's public information + + Returns a user's username. Any authenticated caller may look up any user by ID. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + + :param user_id: User ID (required) + :type user_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._v3_get_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetPublicUserOutputBody", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_user_serialize( + self, + user_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 user_id is not None: + _path_params['user_id'] = user_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', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/users/{user_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 v3_get_user_activity( + self, + _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, + ) -> GetUserActivityOutputBody: + """Get the caller's activity feed + + Returns the caller's own recent activity, their team's, and everyone's public activity, newest first. + + :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._v3_get_user_activity_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetUserActivityOutputBody", + } + 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 v3_get_user_activity_with_http_info( + self, + _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[GetUserActivityOutputBody]: + """Get the caller's activity feed + + Returns the caller's own recent activity, their team's, and everyone's public activity, newest first. + + :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._v3_get_user_activity_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetUserActivityOutputBody", + } + 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 v3_get_user_activity_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the caller's activity feed + + Returns the caller's own recent activity, their team's, and everyone's public activity, newest first. + + :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._v3_get_user_activity_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetUserActivityOutputBody", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_user_activity_serialize( + self, + _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 + # 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', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/users/activity', + 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 v3_submit_user_feedback( + self, + submit_feedback_body: SubmitFeedbackBody, + _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, + ) -> SubmitFeedbackOutputBody: + """Submit feedback + + Submits feedback about the application to a Slack channel. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + + :param submit_feedback_body: (required) + :type submit_feedback_body: SubmitFeedbackBody + :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._v3_submit_user_feedback_serialize( + submit_feedback_body=submit_feedback_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SubmitFeedbackOutputBody", + '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 v3_submit_user_feedback_with_http_info( + self, + submit_feedback_body: SubmitFeedbackBody, + _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[SubmitFeedbackOutputBody]: + """Submit feedback + + Submits feedback about the application to a Slack channel. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + + :param submit_feedback_body: (required) + :type submit_feedback_body: SubmitFeedbackBody + :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._v3_submit_user_feedback_serialize( + submit_feedback_body=submit_feedback_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SubmitFeedbackOutputBody", + '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 v3_submit_user_feedback_without_preload_content( + self, + submit_feedback_body: SubmitFeedbackBody, + _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: + """Submit feedback + + Submits feedback about the application to a Slack channel. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + + :param submit_feedback_body: (required) + :type submit_feedback_body: SubmitFeedbackBody + :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._v3_submit_user_feedback_serialize( + submit_feedback_body=submit_feedback_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SubmitFeedbackOutputBody", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_submit_user_feedback_serialize( + self, + submit_feedback_body, + _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 + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if submit_feedback_body is not None: + _body_params = submit_feedback_body + + + # 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', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/users/feedback', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/revengai/api/external_sources_api.py b/revengai/api/external_sources_api.py index c130ca49..f0969885 100644 --- a/revengai/api/external_sources_api.py +++ b/revengai/api/external_sources_api.py @@ -15,10 +15,12 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictInt +from pydantic import Field, StrictInt +from typing_extensions import Annotated from revengai.models.base_response_external_response import BaseResponseExternalResponse from revengai.models.base_response_str import BaseResponseStr from revengai.models.base_response_task_response import BaseResponseTaskResponse +from revengai.models.operation_virus_total_scan_metadata_virus_total_scan_result import OperationVirusTotalScanMetadataVirusTotalScanResult from revengai.api_client import ApiClient, RequestSerialized from revengai.api_response import ApiResponse @@ -828,3 +830,554 @@ def _get_vt_task_status_serialize( ) + + + @validate_call + def v3_get_virustotal_scan_operation( + self, + binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationVirusTotalScanMetadataVirusTotalScanResult: + """Get a VirusTotal scan operation. + + Returns the current state of the most recently triggered VirusTotal lookup for this binary. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param binary_id: Binary ID (required) + :type binary_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_virustotal_scan_operation_serialize( + binary_id=binary_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationVirusTotalScanMetadataVirusTotalScanResult", + '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 v3_get_virustotal_scan_operation_with_http_info( + self, + binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationVirusTotalScanMetadataVirusTotalScanResult]: + """Get a VirusTotal scan operation. + + Returns the current state of the most recently triggered VirusTotal lookup for this binary. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param binary_id: Binary ID (required) + :type binary_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_virustotal_scan_operation_serialize( + binary_id=binary_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationVirusTotalScanMetadataVirusTotalScanResult", + '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 v3_get_virustotal_scan_operation_without_preload_content( + self, + binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a VirusTotal scan operation. + + Returns the current state of the most recently triggered VirusTotal lookup for this binary. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param binary_id: Binary ID (required) + :type binary_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_virustotal_scan_operation_serialize( + binary_id=binary_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationVirusTotalScanMetadataVirusTotalScanResult", + '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 _v3_get_virustotal_scan_operation_serialize( + self, + binary_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if binary_id is not None: + _path_params['binary_id'] = binary_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/virustotal-scan/{binary_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 v3_run_virustotal_scan( + self, + binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> OperationVirusTotalScanMetadataVirusTotalScanResult: + """Trigger a VirusTotal lookup for a binary. + + Starts a lookup of the binary's content hash against VirusTotal, using the team's registered API key, and returns the operation to poll for its outcome. Returns 403 if the team has no valid key registered, and 409 while a lookup is already in progress for this binary. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `403` [`NO_VIRUSTOTAL_KEY`](/errors/NO_VIRUSTOTAL_KEY) — No VirusTotal Key + + :param binary_id: Binary ID (required) + :type binary_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_virustotal_scan_serialize( + binary_id=binary_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationVirusTotalScanMetadataVirusTotalScanResult", + '403': "APIError", + '404': "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 v3_run_virustotal_scan_with_http_info( + self, + binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[OperationVirusTotalScanMetadataVirusTotalScanResult]: + """Trigger a VirusTotal lookup for a binary. + + Starts a lookup of the binary's content hash against VirusTotal, using the team's registered API key, and returns the operation to poll for its outcome. Returns 403 if the team has no valid key registered, and 409 while a lookup is already in progress for this binary. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `403` [`NO_VIRUSTOTAL_KEY`](/errors/NO_VIRUSTOTAL_KEY) — No VirusTotal Key + + :param binary_id: Binary ID (required) + :type binary_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_virustotal_scan_serialize( + binary_id=binary_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationVirusTotalScanMetadataVirusTotalScanResult", + '403': "APIError", + '404': "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 v3_run_virustotal_scan_without_preload_content( + self, + binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Trigger a VirusTotal lookup for a binary. + + Starts a lookup of the binary's content hash against VirusTotal, using the team's registered API key, and returns the operation to poll for its outcome. Returns 403 if the team has no valid key registered, and 409 while a lookup is already in progress for this binary. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `403` [`NO_VIRUSTOTAL_KEY`](/errors/NO_VIRUSTOTAL_KEY) — No VirusTotal Key + + :param binary_id: Binary ID (required) + :type binary_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_run_virustotal_scan_serialize( + binary_id=binary_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationVirusTotalScanMetadataVirusTotalScanResult", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_run_virustotal_scan_serialize( + self, + binary_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if binary_id is not None: + _path_params['binary_id'] = binary_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v3/binaries/{binary_id}/virustotal-scan:run', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/revengai/api/functions_ai_decompilation_api.py b/revengai/api/functions_ai_decompilation_api.py index 4b62c30e..9a8ca742 100644 --- a/revengai/api/functions_ai_decompilation_api.py +++ b/revengai/api/functions_ai_decompilation_api.py @@ -28,6 +28,7 @@ from revengai.models.get_tokens_response import GetTokensResponse from revengai.models.line_attributions_data import LineAttributionsData from revengai.models.patch_comment_body import PatchCommentBody +from revengai.models.rating_output_body import RatingOutputBody from revengai.models.regenerate_output_body import RegenerateOutputBody from revengai.models.stream_ai_decompilation200_response_inner import StreamAiDecompilation200ResponseInner from revengai.models.summary_data import SummaryData @@ -35,6 +36,7 @@ from revengai.models.upsert_ai_decomplation_rating_request import UpsertAiDecomplationRatingRequest from revengai.models.upsert_overrides_data import UpsertOverridesData from revengai.models.upsert_overrides_input_body import UpsertOverridesInputBody +from revengai.models.upsert_rating_input_body import UpsertRatingInputBody from revengai.models.workflow_progress import WorkflowProgress from revengai.api_client import ApiClient, RequestSerialized @@ -4558,6 +4560,280 @@ def _v3_get_ai_decompilation_line_attributions_serialize( + @validate_call + def v3_get_ai_decompilation_rating( + 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, + ) -> RatingOutputBody: + """Get AI decompilation rating + + Returns the caller's rating and reason for a function's AI decompilation, or null fields when they have not rated it yet. **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._v3_get_ai_decompilation_rating_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': "RatingOutputBody", + '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 v3_get_ai_decompilation_rating_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[RatingOutputBody]: + """Get AI decompilation rating + + Returns the caller's rating and reason for a function's AI decompilation, or null fields when they have not rated it yet. **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._v3_get_ai_decompilation_rating_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': "RatingOutputBody", + '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 v3_get_ai_decompilation_rating_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 rating + + Returns the caller's rating and reason for a function's AI decompilation, or null fields when they have not rated it yet. **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._v3_get_ai_decompilation_rating_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': "RatingOutputBody", + '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 _v3_get_ai_decompilation_rating_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', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/functions/{function_id}/ai-decompilation/rating', + 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 v3_get_ai_decompilation_tokens( self, @@ -5409,3 +5685,305 @@ def _v3_upsert_ai_decompilation_overrides_serialize( ) + + + @validate_call + def v3_upsert_ai_decompilation_rating( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + upsert_rating_input_body: UpsertRatingInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Upsert AI decompilation rating + + Records the caller's rating and optional reason for a function's AI decompilation, replacing any they recorded before. Requires an existing decompilation. **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 upsert_rating_input_body: (required) + :type upsert_rating_input_body: UpsertRatingInputBody + :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._v3_upsert_ai_decompilation_rating_serialize( + function_id=function_id, + upsert_rating_input_body=upsert_rating_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '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 v3_upsert_ai_decompilation_rating_with_http_info( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + upsert_rating_input_body: UpsertRatingInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Upsert AI decompilation rating + + Records the caller's rating and optional reason for a function's AI decompilation, replacing any they recorded before. Requires an existing decompilation. **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 upsert_rating_input_body: (required) + :type upsert_rating_input_body: UpsertRatingInputBody + :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._v3_upsert_ai_decompilation_rating_serialize( + function_id=function_id, + upsert_rating_input_body=upsert_rating_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '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 v3_upsert_ai_decompilation_rating_without_preload_content( + self, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + upsert_rating_input_body: UpsertRatingInputBody, + _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: + """Upsert AI decompilation rating + + Records the caller's rating and optional reason for a function's AI decompilation, replacing any they recorded before. Requires an existing decompilation. **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 upsert_rating_input_body: (required) + :type upsert_rating_input_body: UpsertRatingInputBody + :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._v3_upsert_ai_decompilation_rating_serialize( + function_id=function_id, + upsert_rating_input_body=upsert_rating_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '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 _v3_upsert_ai_decompilation_rating_serialize( + self, + function_id, + upsert_rating_input_body, + _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 upsert_rating_input_body is not None: + _body_params = upsert_rating_input_body + + + # 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', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v3/functions/{function_id}/ai-decompilation/rating', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/revengai/api/functions_core_api.py b/revengai/api/functions_core_api.py index 6f69605a..c4b61552 100644 --- a/revengai/api/functions_core_api.py +++ b/revengai/api/functions_core_api.py @@ -34,6 +34,7 @@ from revengai.models.capabilities_output_body import CapabilitiesOutputBody from revengai.models.disassembly_output_body import DisassemblyOutputBody from revengai.models.function_details_output_body import FunctionDetailsOutputBody +from revengai.models.get_function_maps_output_body import GetFunctionMapsOutputBody from revengai.models.get_matches_output_body import GetMatchesOutputBody from revengai.models.get_matches_status_output_body import GetMatchesStatusOutputBody from revengai.models.imported_function_detail_output_body import ImportedFunctionDetailOutputBody @@ -7018,6 +7019,280 @@ def _v3_canonicalize_function_names_serialize( + @validate_call + def v3_get_analysis_func_maps( + 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, + ) -> GetFunctionMapsOutputBody: + """Get function ID/address maps for an analysis + + Returns three maps built from every function in the analysis's binary: function ID to virtual address, its inverse, and virtual address to mangled name. Empty maps for a binary with no functions yet. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _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._v3_get_analysis_func_maps_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': "GetFunctionMapsOutputBody", + '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 v3_get_analysis_func_maps_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[GetFunctionMapsOutputBody]: + """Get function ID/address maps for an analysis + + Returns three maps built from every function in the analysis's binary: function ID to virtual address, its inverse, and virtual address to mangled name. Empty maps for a binary with no functions yet. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _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._v3_get_analysis_func_maps_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': "GetFunctionMapsOutputBody", + '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 v3_get_analysis_func_maps_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 function ID/address maps for an analysis + + Returns three maps built from every function in the analysis's binary: function ID to virtual address, its inverse, and virtual address to mangled name. Empty maps for a binary with no functions yet. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param _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._v3_get_analysis_func_maps_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': "GetFunctionMapsOutputBody", + '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 _v3_get_analysis_func_maps_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', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/analyses/{analysis_id}/func-maps', + 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 v3_search_functions( self, diff --git a/revengai/api_client.py b/revengai/api_client.py index a647e4f9..44063189 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/v4.60.1/python' + self.user_agent = 'OpenAPI-Generator/v4.64.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 16cb7e3f..ef4c1efe 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -541,8 +541,8 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v4.60.1\n"\ - "SDK Package Version: v4.60.1".\ + "Version of the API: v4.64.0\n"\ + "SDK Package Version: v4.64.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 dc4e741c..b71ea4a0 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -16,6 +16,7 @@ from revengai.models.accept_type_suggestions_input_body import AcceptTypeSuggestionsInputBody from revengai.models.accept_type_suggestions_output_body import AcceptTypeSuggestionsOutputBody from revengai.models.accepted_type import AcceptedType +from revengai.models.activity_body import ActivityBody from revengai.models.add_callee_input_body import AddCalleeInputBody from revengai.models.add_collection_binaries_input_body import AddCollectionBinariesInputBody from revengai.models.add_issuer_domain_input_body import AddIssuerDomainInputBody @@ -69,6 +70,7 @@ from revengai.models.analysis_xref_output_body import AnalysisXrefOutputBody from revengai.models.api_call import ApiCall from revengai.models.api_combination_evidence import ApiCombinationEvidence +from revengai.models.api_key_body import ApiKeyBody from revengai.models.app_api_rest_v2_agent_schema_capability import AppApiRestV2AgentSchemaCapability from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy @@ -247,6 +249,7 @@ from revengai.models.create_portal_session_input_body import CreatePortalSessionInputBody from revengai.models.create_request import CreateRequest from revengai.models.create_result import CreateResult +from revengai.models.create_secret_store_input_body import CreateSecretStoreInputBody from revengai.models.create_struct_data_type import CreateStructDataType from revengai.models.create_team_input_body import CreateTeamInputBody from revengai.models.create_typedef_data_type import CreateTypedefDataType @@ -397,6 +400,7 @@ from revengai.models.functions_list_rename import FunctionsListRename from revengai.models.functions_progress_output_body import FunctionsProgressOutputBody from revengai.models.generate_pdf_output_body import GeneratePDFOutputBody +from revengai.models.get_api_keys_output_body import GetAPIKeysOutputBody 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 @@ -407,16 +411,19 @@ from revengai.models.get_config_output_body import GetConfigOutputBody from revengai.models.get_data_type_history_body import GetDataTypeHistoryBody from revengai.models.get_die_info_output_body import GetDieInfoOutputBody +from revengai.models.get_function_maps_output_body import GetFunctionMapsOutputBody from revengai.models.get_function_signature_history_body import GetFunctionSignatureHistoryBody from revengai.models.get_matches_output_body import GetMatchesOutputBody from revengai.models.get_matches_status_output_body import GetMatchesStatusOutputBody from revengai.models.get_models_output_body import GetModelsOutputBody from revengai.models.get_products_output_body import GetProductsOutputBody +from revengai.models.get_public_user_output_body import GetPublicUserOutputBody from revengai.models.get_public_user_response import GetPublicUserResponse from revengai.models.get_related_binaries_output_body import GetRelatedBinariesOutputBody from revengai.models.get_related_status_output_body import GetRelatedStatusOutputBody from revengai.models.get_subscription_output_body import GetSubscriptionOutputBody from revengai.models.get_tokens_response import GetTokensResponse +from revengai.models.get_user_activity_output_body import GetUserActivityOutputBody from revengai.models.hardcoded_secret_evidence import HardcodedSecretEvidence from revengai.models.history_actor import HistoryActor from revengai.models.history_entry import HistoryEntry @@ -453,6 +460,7 @@ from revengai.models.list_function_signatures_output_body import ListFunctionSignaturesOutputBody from revengai.models.list_function_strings_output_body import ListFunctionStringsOutputBody from revengai.models.list_imported_functions_output_body import ListImportedFunctionsOutputBody +from revengai.models.list_secret_store_output_body import ListSecretStoreOutputBody from revengai.models.list_teams_output_body import ListTeamsOutputBody from revengai.models.list_users_output_body import ListUsersOutputBody from revengai.models.location_output_body import LocationOutputBody @@ -502,6 +510,7 @@ from revengai.models.operation_networking_explain_metadata_networking_explain_result import OperationNetworkingExplainMetadataNetworkingExplainResult from revengai.models.operation_networking_scan_metadata_networking_scan_result import OperationNetworkingScanMetadataNetworkingScanResult from revengai.models.operation_security_scan_metadata_security_scan_result import OperationSecurityScanMetadataSecurityScanResult +from revengai.models.operation_virus_total_scan_metadata_virus_total_scan_result import OperationVirusTotalScanMetadataVirusTotalScanResult from revengai.models.operation_workflow_progress_result_body import OperationWorkflowProgressResultBody from revengai.models.order import Order from revengai.models.organisation import Organisation @@ -538,6 +547,7 @@ from revengai.models.protocols_agent_response import ProtocolsAgentResponse from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest from revengai.models.queued_workflow_task_response import QueuedWorkflowTaskResponse +from revengai.models.rating_output_body import RatingOutputBody from revengai.models.re_analysis_form import ReAnalysisForm from revengai.models.recent import Recent from revengai.models.referenced_constant import ReferencedConstant @@ -564,6 +574,7 @@ from revengai.models.report_reachability_status import ReportReachabilityStatus from revengai.models.report_result import ReportResult from revengai.models.requested_config_body import RequestedConfigBody +from revengai.models.resend_verification_email_input_body import ResendVerificationEmailInputBody from revengai.models.resolved_entity import ResolvedEntity from revengai.models.result_body import ResultBody from revengai.models.revoke_body import RevokeBody @@ -581,6 +592,7 @@ from revengai.models.search_binaries_output_body import SearchBinariesOutputBody from revengai.models.search_functions_output_body import SearchFunctionsOutputBody from revengai.models.search_tags_output_body import SearchTagsOutputBody +from revengai.models.secret_body import SecretBody from revengai.models.secrets_agent_response import SecretsAgentResponse from revengai.models.section_model import SectionModel from revengai.models.security_finding import SecurityFinding @@ -642,7 +654,9 @@ from revengai.models.subject_any_of1 import SubjectAnyOf1 from revengai.models.subject_any_of2 import SubjectAnyOf2 from revengai.models.subject_any_of3 import SubjectAnyOf3 +from revengai.models.submit_feedback_body import SubmitFeedbackBody from revengai.models.submit_feedback_input_body import SubmitFeedbackInputBody +from revengai.models.submit_feedback_output_body import SubmitFeedbackOutputBody from revengai.models.submit_user_feedback_request import SubmitUserFeedbackRequest from revengai.models.suggested_hole import SuggestedHole from revengai.models.suggested_member_view import SuggestedMemberView @@ -704,6 +718,7 @@ from revengai.models.update_password_input_body import UpdatePasswordInputBody from revengai.models.update_pointer_data_type import UpdatePointerDataType from revengai.models.update_profile_input_body import UpdateProfileInputBody +from revengai.models.update_secret_store_input_body import UpdateSecretStoreInputBody from revengai.models.update_struct_data_type import UpdateStructDataType from revengai.models.update_tags_input_body import UpdateTagsInputBody from revengai.models.update_team_input_body import UpdateTeamInputBody @@ -720,11 +735,14 @@ from revengai.models.upsert_ai_decomplation_rating_request import UpsertAiDecomplationRatingRequest from revengai.models.upsert_overrides_data import UpsertOverridesData from revengai.models.upsert_overrides_input_body import UpsertOverridesInputBody +from revengai.models.upsert_rating_input_body import UpsertRatingInputBody from revengai.models.user import User from revengai.models.user_activity_response import UserActivityResponse from revengai.models.user_credits import UserCredits from revengai.models.user_identity import UserIdentity from revengai.models.user_profile import UserProfile +from revengai.models.virus_total_scan_metadata import VirusTotalScanMetadata +from revengai.models.virus_total_scan_result import VirusTotalScanResult from revengai.models.warning_event import WarningEvent from revengai.models.workflow_day_body import WorkflowDayBody from revengai.models.workflow_progress import WorkflowProgress diff --git a/revengai/models/activity_body.py b/revengai/models/activity_body.py new file mode 100644 index 00000000..7009ba0e --- /dev/null +++ b/revengai/models/activity_body.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ActivityBody(BaseModel): + """ + ActivityBody + """ # noqa: E501 + actions: StrictStr = Field(description="The kind of action taken") + activity_scope: StrictStr = Field(description="Who can see this activity entry") + created_at: datetime = Field(description="When the action happened") + message: StrictStr = Field(description="Human-readable description of the action") + sources: StrictStr = Field(description="The resource kind the action applied to") + username: StrictStr = Field(description="The user who performed the action") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["actions", "activity_scope", "created_at", "message", "sources", "username"] + + @field_validator('actions') + def actions_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UPLOADED', 'COMPLETED', 'CREATED', 'REGISTERED', 'REPUTATION', 'LEADERBOARD', 'EDITED', 'DELETED', 'ERROR', 'RENAME', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('UPLOADED', 'COMPLETED', 'CREATED', 'REGISTERED', 'REPUTATION', 'LEADERBOARD', 'EDITED', 'DELETED', 'ERROR', 'RENAME', 'unknown_default_open_api')") + return value + + @field_validator('activity_scope') + def activity_scope_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['PUBLIC', 'PRIVATE', 'TEAM', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('PUBLIC', 'PRIVATE', 'TEAM', 'unknown_default_open_api')") + return value + + @field_validator('sources') + def sources_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['USERS', 'ANALYSES', 'MATCHES', 'COLLECTIONS', 'HISTORY', 'FILES', 'FUNCTION', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('USERS', 'ANALYSES', 'MATCHES', 'COLLECTIONS', 'HISTORY', 'FILES', 'FUNCTION', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActivityBody 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 ActivityBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "actions": obj.get("actions"), + "activity_scope": obj.get("activity_scope"), + "created_at": obj.get("created_at"), + "message": obj.get("message"), + "sources": obj.get("sources"), + "username": obj.get("username") + }) + # 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/api_key_body.py b/revengai/models/api_key_body.py new file mode 100644 index 00000000..9943afa9 --- /dev/null +++ b/revengai/models/api_key_body.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApiKeyBody(BaseModel): + """ + ApiKeyBody + """ # noqa: E501 + api_key: StrictStr = Field(description="The API key") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["api_key"] + + 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 ApiKeyBody 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 ApiKeyBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "api_key": obj.get("api_key") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/create_request.py b/revengai/models/create_request.py index 804f8277..2140c66d 100644 --- a/revengai/models/create_request.py +++ b/revengai/models/create_request.py @@ -38,7 +38,7 @@ class CreateRequest(BaseModel): filename: Annotated[str, Field(min_length=1, strict=True, max_length=255)] sha_256_hash: Annotated[str, Field(strict=True)] symbols: Optional[Symbols] = None - tags: Optional[Annotated[List[StrictStr], Field(max_length=64)]] = None + tags: Optional[Annotated[List[Optional[StrictStr]], Field(max_length=64)]] = None additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["analysis_config", "analysis_scope", "auto_run_agents", "binary_config", "debug_hash", "filename", "sha_256_hash", "symbols", "tags"] diff --git a/revengai/models/create_secret_store_input_body.py b/revengai/models/create_secret_store_input_body.py new file mode 100644 index 00000000..18405513 --- /dev/null +++ b/revengai/models/create_secret_store_input_body.py @@ -0,0 +1,111 @@ +# 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 CreateSecretStoreInputBody(BaseModel): + """ + CreateSecretStoreInputBody + """ # noqa: E501 + api_provider: StrictStr + key: Annotated[str, Field(min_length=10, strict=True)] = Field(description="The provider's API key, encrypted before storage.") + team_id: Optional[StrictInt] = Field(default=None, description="Registers a team secret when set; the caller must administer that team. Registers a personal secret when omitted.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["api_provider", "key", "team_id"] + + @field_validator('api_provider') + def api_provider_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['virus_total', 'malware_bazaar', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('virus_total', 'malware_bazaar', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateSecretStoreInputBody 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 CreateSecretStoreInputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "api_provider": obj.get("api_provider"), + "key": obj.get("key"), + "team_id": obj.get("team_id") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/error_body.py b/revengai/models/error_body.py index d001c554..9442dec9 100644 --- a/revengai/models/error_body.py +++ b/revengai/models/error_body.py @@ -36,8 +36,8 @@ class ErrorBody(BaseModel): @field_validator('code') def code_validate_enum(cls, value): """Validates the enum""" - if value not in set(['ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api']): - raise ValueError("must be one of enum values ('ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api')") + if value not in set(['ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'NO_VIRUSTOTAL_KEY', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'NO_VIRUSTOTAL_KEY', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api')") return value model_config = ConfigDict( diff --git a/revengai/models/get_api_keys_output_body.py b/revengai/models/get_api_keys_output_body.py new file mode 100644 index 00000000..b610e520 --- /dev/null +++ b/revengai/models/get_api_keys_output_body.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.api_key_body import ApiKeyBody +from typing import Optional, Set +from typing_extensions import Self + +class GetAPIKeysOutputBody(BaseModel): + """ + GetAPIKeysOutputBody + """ # noqa: E501 + keys: Optional[List[ApiKeyBody]] = Field(description="The caller's active API keys. Currently always exactly one, created on first request if the caller doesn't have one yet") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["keys"] + + 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 GetAPIKeysOutputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in keys (list) + _items = [] + if self.keys: + for _item_keys in self.keys: + if _item_keys: + _items.append(_item_keys.to_dict()) + _dict['keys'] = _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 keys (nullable) is None + # and model_fields_set contains the field + if self.keys is None and "keys" in self.model_fields_set: + _dict['keys'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetAPIKeysOutputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "keys": [ApiKeyBody.from_dict(_item) for _item in obj["keys"]] if obj.get("keys") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/get_function_maps_output_body.py b/revengai/models/get_function_maps_output_body.py new file mode 100644 index 00000000..3a20676d --- /dev/null +++ b/revengai/models/get_function_maps_output_body.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GetFunctionMapsOutputBody(BaseModel): + """ + GetFunctionMapsOutputBody + """ # noqa: E501 + function_map: Dict[str, StrictInt] = Field(description="Function ID (as a string key) to virtual address, for every function in the analysis's binary.") + inverse_function_map: Dict[str, StrictInt] = Field(description="Virtual address (as a string key) to function ID — the inverse of function_map.") + name_map: Dict[str, StrictStr] = Field(description="Virtual address (as a string key) to mangled function name. Empty string for a function with no mangled name.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["function_map", "inverse_function_map", "name_map"] + + 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 GetFunctionMapsOutputBody 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 GetFunctionMapsOutputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_map": obj.get("function_map"), + "inverse_function_map": obj.get("inverse_function_map"), + "name_map": obj.get("name_map") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/get_public_user_output_body.py b/revengai/models/get_public_user_output_body.py new file mode 100644 index 00000000..56615481 --- /dev/null +++ b/revengai/models/get_public_user_output_body.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class GetPublicUserOutputBody(BaseModel): + """ + GetPublicUserOutputBody + """ # noqa: E501 + user_id: StrictInt = Field(description="The user's ID") + username: StrictStr = Field(description="The user's display name") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["user_id", "username"] + + 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 GetPublicUserOutputBody 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 GetPublicUserOutputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "user_id": obj.get("user_id"), + "username": obj.get("username") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/get_user_activity_output_body.py b/revengai/models/get_user_activity_output_body.py new file mode 100644 index 00000000..4b55bce0 --- /dev/null +++ b/revengai/models/get_user_activity_output_body.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.activity_body import ActivityBody +from typing import Optional, Set +from typing_extensions import Self + +class GetUserActivityOutputBody(BaseModel): + """ + GetUserActivityOutputBody + """ # noqa: E501 + activities: Optional[List[ActivityBody]] = Field(description="Recent activity visible to the caller: their own private activity, their team's, and everyone's public activity") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["activities"] + + 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 GetUserActivityOutputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in activities (list) + _items = [] + if self.activities: + for _item_activities in self.activities: + if _item_activities: + _items.append(_item_activities.to_dict()) + _dict['activities'] = _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 activities (nullable) is None + # and model_fields_set contains the field + if self.activities is None and "activities" in self.model_fields_set: + _dict['activities'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetUserActivityOutputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "activities": [ActivityBody.from_dict(_item) for _item in obj["activities"]] if obj.get("activities") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/list_secret_store_output_body.py b/revengai/models/list_secret_store_output_body.py new file mode 100644 index 00000000..62bccdd0 --- /dev/null +++ b/revengai/models/list_secret_store_output_body.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.secret_body import SecretBody +from typing import Optional, Set +from typing_extensions import Self + +class ListSecretStoreOutputBody(BaseModel): + """ + ListSecretStoreOutputBody + """ # noqa: E501 + secrets: Optional[List[SecretBody]] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["secrets"] + + 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 ListSecretStoreOutputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in secrets (list) + _items = [] + if self.secrets: + for _item_secrets in self.secrets: + if _item_secrets: + _items.append(_item_secrets.to_dict()) + _dict['secrets'] = _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 secrets (nullable) is None + # and model_fields_set contains the field + if self.secrets is None and "secrets" in self.model_fields_set: + _dict['secrets'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListSecretStoreOutputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "secrets": [SecretBody.from_dict(_item) for _item in obj["secrets"]] if obj.get("secrets") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/operation_virus_total_scan_metadata_virus_total_scan_result.py b/revengai/models/operation_virus_total_scan_metadata_virus_total_scan_result.py new file mode 100644 index 00000000..36a100d2 --- /dev/null +++ b/revengai/models/operation_virus_total_scan_metadata_virus_total_scan_result.py @@ -0,0 +1,119 @@ +# 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.status import Status +from revengai.models.virus_total_scan_metadata import VirusTotalScanMetadata +from revengai.models.virus_total_scan_result import VirusTotalScanResult +from typing import Optional, Set +from typing_extensions import Self + +class OperationVirusTotalScanMetadataVirusTotalScanResult(BaseModel): + """ + OperationVirusTotalScanMetadataVirusTotalScanResult + """ # noqa: E501 + done: StrictBool = Field(description="Whether the operation has reached a terminal state.") + error: Optional[Status] = Field(default=None, description="Failure detail, populated only when done is true and the operation failed.") + metadata: Optional[VirusTotalScanMetadata] = Field(default=None, description="In-flight information and details.") + name: StrictStr = Field(description="API resource name.") + response: Optional[VirusTotalScanResult] = Field(default=None, description="Result, set only when done is true and the operation succeeded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["done", "error", "metadata", "name", "response"] + + 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 OperationVirusTotalScanMetadataVirusTotalScanResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OperationVirusTotalScanMetadataVirusTotalScanResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "done": obj.get("done"), + "error": Status.from_dict(obj["error"]) if obj.get("error") is not None else None, + "metadata": VirusTotalScanMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "name": obj.get("name"), + "response": VirusTotalScanResult.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/rating_output_body.py b/revengai/models/rating_output_body.py new file mode 100644 index 00000000..e4bffadd --- /dev/null +++ b/revengai/models/rating_output_body.py @@ -0,0 +1,121 @@ +# 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RatingOutputBody(BaseModel): + """ + RatingOutputBody + """ # noqa: E501 + rating: Optional[StrictStr] = Field(description="The rating the caller recorded, or null when they have not rated it yet") + reason: Optional[StrictStr] = Field(description="The reason the caller gave, or null") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["rating", "reason"] + + @field_validator('rating') + def rating_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['POSITIVE', 'NEUTRAL', 'NEGATIVE', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('POSITIVE', 'NEUTRAL', 'NEGATIVE', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RatingOutputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if rating (nullable) is None + # and model_fields_set contains the field + if self.rating is None and "rating" in self.model_fields_set: + _dict['rating'] = 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 + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RatingOutputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rating": obj.get("rating"), + "reason": obj.get("reason") + }) + # 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/resend_verification_email_input_body.py b/revengai/models/resend_verification_email_input_body.py new file mode 100644 index 00000000..1bab51bd --- /dev/null +++ b/revengai/models/resend_verification_email_input_body.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ResendVerificationEmailInputBody(BaseModel): + """ + ResendVerificationEmailInputBody + """ # noqa: E501 + email: StrictStr = Field(description="Email address of the account to resend a verification code to") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["email"] + + 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 ResendVerificationEmailInputBody 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 ResendVerificationEmailInputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email") + }) + # 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/secret_body.py b/revengai/models/secret_body.py new file mode 100644 index 00000000..7a25e62c --- /dev/null +++ b/revengai/models/secret_body.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SecretBody(BaseModel): + """ + SecretBody + """ # noqa: E501 + active: StrictBool + api_provider: StrictStr + creation: datetime + disabled_at: Optional[datetime] = None + id: StrictInt + key: StrictStr = Field(description="Masked API key showing only the last 4 characters") + team_id: Optional[StrictInt] = Field(default=None, description="Null for a personal secret") + user_id: StrictInt + valid: StrictBool + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["active", "api_provider", "creation", "disabled_at", "id", "key", "team_id", "user_id", "valid"] + + @field_validator('api_provider') + def api_provider_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['virus_total', 'malware_bazaar', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('virus_total', 'malware_bazaar', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SecretBody 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 SecretBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "active": obj.get("active"), + "api_provider": obj.get("api_provider"), + "creation": obj.get("creation"), + "disabled_at": obj.get("disabled_at"), + "id": obj.get("id"), + "key": obj.get("key"), + "team_id": obj.get("team_id"), + "user_id": obj.get("user_id"), + "valid": obj.get("valid") + }) + # 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/status.py b/revengai/models/status.py index d3440ed5..0a94bed2 100644 --- a/revengai/models/status.py +++ b/revengai/models/status.py @@ -36,8 +36,8 @@ class Status(BaseModel): @field_validator('code') def code_validate_enum(cls, value): """Validates the enum""" - if value not in set(['ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api']): - raise ValueError("must be one of enum values ('ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api')") + if value not in set(['ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'NO_VIRUSTOTAL_KEY', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'NO_VIRUSTOTAL_KEY', 'OIDC_DISCOVERY_FAILED', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api')") return value model_config = ConfigDict( diff --git a/revengai/models/submit_feedback_body.py b/revengai/models/submit_feedback_body.py new file mode 100644 index 00000000..044849c4 --- /dev/null +++ b/revengai/models/submit_feedback_body.py @@ -0,0 +1,103 @@ +# 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 typing import Optional, Set +from typing_extensions import Self + +class SubmitFeedbackBody(BaseModel): + """ + SubmitFeedbackBody + """ # noqa: E501 + current_route: StrictStr = Field(description="The route the caller was on when they submitted feedback") + feedback: StrictStr = Field(description="The feedback text") + screen_capture_url: Optional[StrictStr] = Field(default=None, description="Optional URL to a screen capture related to the feedback") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["current_route", "feedback", "screen_capture_url"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubmitFeedbackBody 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 SubmitFeedbackBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "current_route": obj.get("current_route"), + "feedback": obj.get("feedback"), + "screen_capture_url": obj.get("screen_capture_url") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/submit_feedback_output_body.py b/revengai/models/submit_feedback_output_body.py new file mode 100644 index 00000000..156b3a9d --- /dev/null +++ b/revengai/models/submit_feedback_output_body.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SubmitFeedbackOutputBody(BaseModel): + """ + SubmitFeedbackOutputBody + """ # noqa: E501 + message: StrictStr = Field(description="Confirmation message") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["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 SubmitFeedbackOutputBody 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 SubmitFeedbackOutputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message") + }) + # 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/update_secret_store_input_body.py b/revengai/models/update_secret_store_input_body.py new file mode 100644 index 00000000..dc078f18 --- /dev/null +++ b/revengai/models/update_secret_store_input_body.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateSecretStoreInputBody(BaseModel): + """ + UpdateSecretStoreInputBody + """ # noqa: E501 + active: Optional[StrictBool] = Field(default=None, description="Activates or deactivates the secret. Omit to leave unchanged.") + key: Optional[Annotated[str, Field(min_length=10, strict=True)]] = Field(default=None, description="New API key. Omit to leave the current key unchanged.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["active", "key"] + + 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 UpdateSecretStoreInputBody 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 UpdateSecretStoreInputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "active": obj.get("active"), + "key": obj.get("key") + }) + # 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/upsert_rating_input_body.py b/revengai/models/upsert_rating_input_body.py new file mode 100644 index 00000000..ec9371b7 --- /dev/null +++ b/revengai/models/upsert_rating_input_body.py @@ -0,0 +1,108 @@ +# 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpsertRatingInputBody(BaseModel): + """ + UpsertRatingInputBody + """ # noqa: E501 + rating: StrictStr = Field(description="How useful the caller found this AI decompilation") + reason: Optional[StrictStr] = Field(default=None, description="Optional free-text reason for the rating") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["rating", "reason"] + + @field_validator('rating') + def rating_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['POSITIVE', 'NEUTRAL', 'NEGATIVE', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('POSITIVE', 'NEUTRAL', 'NEGATIVE', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpsertRatingInputBody 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 UpsertRatingInputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rating": obj.get("rating"), + "reason": obj.get("reason") + }) + # 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/virus_total_scan_metadata.py b/revengai/models/virus_total_scan_metadata.py new file mode 100644 index 00000000..2b180988 --- /dev/null +++ b/revengai/models/virus_total_scan_metadata.py @@ -0,0 +1,106 @@ +# 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, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class VirusTotalScanMetadata(BaseModel): + """ + VirusTotalScanMetadata + """ # noqa: E501 + status: StrictStr = Field(description="Lookup status. UNINITIALISED means this binary has never had a lookup triggered.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VirusTotalScanMetadata 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 VirusTotalScanMetadata 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") + }) + # 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/virus_total_scan_result.py b/revengai/models/virus_total_scan_result.py new file mode 100644 index 00000000..b966941f --- /dev/null +++ b/revengai/models/virus_total_scan_result.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class VirusTotalScanResult(BaseModel): + """ + VirusTotalScanResult + """ # noqa: E501 + sha_256_hash: StrictStr = Field(description="Content hash the lookup was keyed by") + vt: Optional[Any] + vt_last_updated: datetime = Field(description="When this result was recorded") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sha_256_hash", "vt", "vt_last_updated"] + + 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 VirusTotalScanResult from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if vt (nullable) is None + # and model_fields_set contains the field + if self.vt is None and "vt" in self.model_fields_set: + _dict['vt'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VirusTotalScanResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sha_256_hash": obj.get("sha_256_hash"), + "vt": obj.get("vt"), + "vt_last_updated": obj.get("vt_last_updated") + }) + # 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 + +