From 25bcc77427b01a9a480167e31085f4903f527e7e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 24 Apr 2026 06:49:46 +0000 Subject: [PATCH] Update SDK to version v3.74.1 - Generated from OpenAPI spec version v3.74.1 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- README.md | 4 - docs/AuthenticationUsersApi.md | 83 ------ docs/BaseResponseLoginResponse.md | 33 -- docs/LoginRequest.md | 30 -- docs/LoginResponse.md | 29 -- docs/TaskStatusResponse.md | 1 + revengai/__init__.py | 8 +- revengai/api/authentication_users_api.py | 282 ------------------ revengai/api_client.py | 2 +- revengai/configuration.py | 4 +- revengai/models/__init__.py | 3 - .../models/base_response_login_response.py | 125 -------- revengai/models/login_request.py | 89 ------ revengai/models/login_response.py | 86 ------ revengai/models/task_status_response.py | 16 +- test/test_authentication_users_api.py | 7 - test/test_base_response_login_response.py | 63 ---- ...test_base_response_task_status_response.py | 7 +- test/test_login_request.py | 53 ---- test/test_login_response.py | 51 ---- test/test_task_status_response.py | 7 +- 22 files changed, 30 insertions(+), 955 deletions(-) delete mode 100644 docs/BaseResponseLoginResponse.md delete mode 100644 docs/LoginRequest.md delete mode 100644 docs/LoginResponse.md delete mode 100644 revengai/models/base_response_login_response.py delete mode 100644 revengai/models/login_request.py delete mode 100644 revengai/models/login_response.py delete mode 100644 test/test_base_response_login_response.py delete mode 100644 test/test_login_request.py delete mode 100644 test/test_login_response.py diff --git a/.sdk-version b/.sdk-version index 800e0bc..612e3f5 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.72.0 +v3.74.1 diff --git a/README.md b/README.md index b74df2f..277236e 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,6 @@ 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* | [**get_user_comments**](docs/AuthenticationUsersApi.md#get_user_comments) | **GET** /v2/users/me/comments | Get comments by user -*AuthenticationUsersApi* | [**login_user**](docs/AuthenticationUsersApi.md#login_user) | **POST** /v2/auth/login | Authenticate a user *AuthenticationUsersApi* | [**submit_user_feedback**](docs/AuthenticationUsersApi.md#submit_user_feedback) | **POST** /v2/users/feedback | Submit feedback about the application *BinariesApi* | [**download_zipped_binary**](docs/BinariesApi.md#download_zipped_binary) | **GET** /v2/binaries/{binary_id}/download-zipped | Downloads a zipped binary with password protection *BinariesApi* | [**get_binary_additional_details**](docs/BinariesApi.md#get_binary_additional_details) | **GET** /v2/binaries/{binary_id}/additional-details | Gets the additional details of a binary @@ -252,7 +251,6 @@ Class | Method | HTTP request | Description - [BaseResponseListFunctionNameHistory](docs/BaseResponseListFunctionNameHistory.md) - [BaseResponseListSBOM](docs/BaseResponseListSBOM.md) - [BaseResponseListUserActivityResponse](docs/BaseResponseListUserActivityResponse.md) - - [BaseResponseLoginResponse](docs/BaseResponseLoginResponse.md) - [BaseResponseLogs](docs/BaseResponseLogs.md) - [BaseResponseModelsResponse](docs/BaseResponseModelsResponse.md) - [BaseResponseNetworkOverviewResponse](docs/BaseResponseNetworkOverviewResponse.md) @@ -387,8 +385,6 @@ Class | Method | HTTP request | Description - [InverseStringMapItem](docs/InverseStringMapItem.md) - [InverseValue](docs/InverseValue.md) - [ListCollectionResults](docs/ListCollectionResults.md) - - [LoginRequest](docs/LoginRequest.md) - - [LoginResponse](docs/LoginResponse.md) - [Logs](docs/Logs.md) - [MITRETechnique](docs/MITRETechnique.md) - [MatchedFunction](docs/MatchedFunction.md) diff --git a/docs/AuthenticationUsersApi.md b/docs/AuthenticationUsersApi.md index fa87325..40307c7 100644 --- a/docs/AuthenticationUsersApi.md +++ b/docs/AuthenticationUsersApi.md @@ -8,7 +8,6 @@ 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 [**get_user_comments**](AuthenticationUsersApi.md#get_user_comments) | **GET** /v2/users/me/comments | Get comments by user -[**login_user**](AuthenticationUsersApi.md#login_user) | **POST** /v2/auth/login | Authenticate a user [**submit_user_feedback**](AuthenticationUsersApi.md#submit_user_feedback) | **POST** /v2/users/feedback | Submit feedback about the application @@ -328,88 +327,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) -# **login_user** -> BaseResponseLoginResponse login_user(login_request) - -Authenticate a user - -Authenticates a user and returns a token. - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_login_response import BaseResponseLoginResponse -from revengai.models.login_request import LoginRequest -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.AuthenticationUsersApi(api_client) - login_request = revengai.LoginRequest() # LoginRequest | - - try: - # Authenticate a user - api_response = api_instance.login_user(login_request) - print("The response of AuthenticationUsersApi->login_user:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AuthenticationUsersApi->login_user: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **login_request** | [**LoginRequest**](LoginRequest.md)| | - -### Return type - -[**BaseResponseLoginResponse**](BaseResponseLoginResponse.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | -**401** | Invalid credentials | - | - -[[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) - # **submit_user_feedback** > BaseResponse submit_user_feedback(submit_user_feedback_request) diff --git a/docs/BaseResponseLoginResponse.md b/docs/BaseResponseLoginResponse.md deleted file mode 100644 index bc053d2..0000000 --- a/docs/BaseResponseLoginResponse.md +++ /dev/null @@ -1,33 +0,0 @@ -# BaseResponseLoginResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | [**LoginResponse**](LoginResponse.md) | | [optional] -**message** | **str** | | [optional] -**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] -**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] - -## Example - -```python -from revengai.models.base_response_login_response import BaseResponseLoginResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseResponseLoginResponse from a JSON string -base_response_login_response_instance = BaseResponseLoginResponse.from_json(json) -# print the JSON string representation of the object -print(BaseResponseLoginResponse.to_json()) - -# convert the object into a dict -base_response_login_response_dict = base_response_login_response_instance.to_dict() -# create an instance of BaseResponseLoginResponse from a dict -base_response_login_response_from_dict = BaseResponseLoginResponse.from_dict(base_response_login_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LoginRequest.md b/docs/LoginRequest.md deleted file mode 100644 index d7f0729..0000000 --- a/docs/LoginRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# LoginRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **str** | User's username or email | -**password** | **str** | User's password | - -## Example - -```python -from revengai.models.login_request import LoginRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of LoginRequest from a JSON string -login_request_instance = LoginRequest.from_json(json) -# print the JSON string representation of the object -print(LoginRequest.to_json()) - -# convert the object into a dict -login_request_dict = login_request_instance.to_dict() -# create an instance of LoginRequest from a dict -login_request_from_dict = LoginRequest.from_dict(login_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LoginResponse.md b/docs/LoginResponse.md deleted file mode 100644 index f2989cc..0000000 --- a/docs/LoginResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# LoginResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**token** | **str** | Authentication token for subsequent requests | - -## Example - -```python -from revengai.models.login_response import LoginResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of LoginResponse from a JSON string -login_response_instance = LoginResponse.from_json(json) -# print the JSON string representation of the object -print(LoginResponse.to_json()) - -# convert the object into a dict -login_response_dict = login_response_instance.to_dict() -# create an instance of LoginResponse from a dict -login_response_from_dict = LoginResponse.from_dict(login_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TaskStatusResponse.md b/docs/TaskStatusResponse.md index a327df9..1e96c46 100644 --- a/docs/TaskStatusResponse.md +++ b/docs/TaskStatusResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | [**BinaryTaskStatus**](BinaryTaskStatus.md) | | +**log_history** | **List[List[object]]** | | [optional] ## Example diff --git a/revengai/__init__.py b/revengai/__init__.py index fbb196e..db9551d 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v3.72.0" +__version__ = "v3.74.1" # Define package exports __all__ = [ @@ -141,7 +141,6 @@ "BaseResponseListFunctionNameHistory", "BaseResponseListSBOM", "BaseResponseListUserActivityResponse", - "BaseResponseLoginResponse", "BaseResponseLogs", "BaseResponseModelsResponse", "BaseResponseNetworkOverviewResponse", @@ -276,8 +275,6 @@ "InverseStringMapItem", "InverseValue", "ListCollectionResults", - "LoginRequest", - "LoginResponse", "Logs", "MITRETechnique", "MatchedFunction", @@ -495,7 +492,6 @@ from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory as BaseResponseListFunctionNameHistory from revengai.models.base_response_list_sbom import BaseResponseListSBOM as BaseResponseListSBOM from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse as BaseResponseListUserActivityResponse -from revengai.models.base_response_login_response import BaseResponseLoginResponse as BaseResponseLoginResponse from revengai.models.base_response_logs import BaseResponseLogs as BaseResponseLogs from revengai.models.base_response_models_response import BaseResponseModelsResponse as BaseResponseModelsResponse from revengai.models.base_response_network_overview_response import BaseResponseNetworkOverviewResponse as BaseResponseNetworkOverviewResponse @@ -630,8 +626,6 @@ from revengai.models.inverse_string_map_item import InverseStringMapItem as InverseStringMapItem from revengai.models.inverse_value import InverseValue as InverseValue from revengai.models.list_collection_results import ListCollectionResults as ListCollectionResults -from revengai.models.login_request import LoginRequest as LoginRequest -from revengai.models.login_response import LoginResponse as LoginResponse from revengai.models.logs import Logs as Logs from revengai.models.mitre_technique import MITRETechnique as MITRETechnique from revengai.models.matched_function import MatchedFunction as MatchedFunction diff --git a/revengai/api/authentication_users_api.py b/revengai/api/authentication_users_api.py index e604d3a..5950bab 100644 --- a/revengai/api/authentication_users_api.py +++ b/revengai/api/authentication_users_api.py @@ -22,8 +22,6 @@ from revengai.models.base_response_get_public_user_response import BaseResponseGetPublicUserResponse from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse -from revengai.models.base_response_login_response import BaseResponseLoginResponse -from revengai.models.login_request import LoginRequest from revengai.models.submit_user_feedback_request import SubmitUserFeedbackRequest from revengai.api_client import ApiClient, RequestSerialized @@ -1148,286 +1146,6 @@ def _get_user_comments_serialize( - @validate_call - def login_user( - self, - login_request: LoginRequest, - _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, - ) -> BaseResponseLoginResponse: - """Authenticate a user - - Authenticates a user and returns a token. - - :param login_request: (required) - :type login_request: LoginRequest - :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._login_user_serialize( - login_request=login_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseLoginResponse", - '422': "BaseResponse", - '401': None, - } - 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 login_user_with_http_info( - self, - login_request: LoginRequest, - _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[BaseResponseLoginResponse]: - """Authenticate a user - - Authenticates a user and returns a token. - - :param login_request: (required) - :type login_request: LoginRequest - :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._login_user_serialize( - login_request=login_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseLoginResponse", - '422': "BaseResponse", - '401': None, - } - 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 login_user_without_preload_content( - self, - login_request: LoginRequest, - _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: - """Authenticate a user - - Authenticates a user and returns a token. - - :param login_request: (required) - :type login_request: LoginRequest - :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._login_user_serialize( - login_request=login_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseLoginResponse", - '422': "BaseResponse", - '401': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _login_user_serialize( - self, - login_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if login_request is not None: - _body_params = login_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v2/auth/login', - 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 submit_user_feedback( self, diff --git a/revengai/api_client.py b/revengai/api_client.py index 8f9d7a3..5d122d7 100644 --- a/revengai/api_client.py +++ b/revengai/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/v3.72.0/python' + self.user_agent = 'OpenAPI-Generator/v3.74.1/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index b063f75..d823cd1 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -533,8 +533,8 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v3.72.0\n"\ - "SDK Package Version: v3.72.0".\ + "Version of the API: v3.74.1\n"\ + "SDK Package Version: v3.74.1".\ 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 df65b5c..4047de7 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -107,7 +107,6 @@ from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory from revengai.models.base_response_list_sbom import BaseResponseListSBOM from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse -from revengai.models.base_response_login_response import BaseResponseLoginResponse from revengai.models.base_response_logs import BaseResponseLogs from revengai.models.base_response_models_response import BaseResponseModelsResponse from revengai.models.base_response_network_overview_response import BaseResponseNetworkOverviewResponse @@ -242,8 +241,6 @@ from revengai.models.inverse_string_map_item import InverseStringMapItem from revengai.models.inverse_value import InverseValue from revengai.models.list_collection_results import ListCollectionResults -from revengai.models.login_request import LoginRequest -from revengai.models.login_response import LoginResponse from revengai.models.logs import Logs from revengai.models.mitre_technique import MITRETechnique from revengai.models.matched_function import MatchedFunction diff --git a/revengai/models/base_response_login_response.py b/revengai/models/base_response_login_response.py deleted file mode 100644 index 7206a37..0000000 --- a/revengai/models/base_response_login_response.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.error_model import ErrorModel -from revengai.models.login_response import LoginResponse -from revengai.models.meta_model import MetaModel -from typing import Optional, Set -from typing_extensions import Self - -class BaseResponseLoginResponse(BaseModel): - """ - BaseResponseLoginResponse - """ # noqa: E501 - status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[LoginResponse] = None - message: Optional[StrictStr] = None - errors: Optional[List[ErrorModel]] = None - meta: Optional[MetaModel] = Field(default=None, description="Metadata") - __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of BaseResponseLoginResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item_errors in self.errors: - if _item_errors: - _items.append(_item_errors.to_dict()) - _dict['errors'] = _items - # override the default output from pydantic by calling `to_dict()` of meta - if self.meta: - _dict['meta'] = self.meta.to_dict() - # set to None if data (nullable) is None - # and model_fields_set contains the field - if self.data is None and "data" in self.model_fields_set: - _dict['data'] = None - - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if errors (nullable) is None - # and model_fields_set contains the field - if self.errors is None and "errors" in self.model_fields_set: - _dict['errors'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BaseResponseLoginResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status") if obj.get("status") is not None else True, - "data": LoginResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": obj.get("message"), - "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, - "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None - }) - return _obj - - diff --git a/revengai/models/login_request.py b/revengai/models/login_request.py deleted file mode 100644 index d711248..0000000 --- a/revengai/models/login_request.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class LoginRequest(BaseModel): - """ - LoginRequest - """ # noqa: E501 - username: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="User's username or email") - password: Annotated[str, Field(min_length=1, strict=True)] = Field(description="User's password") - __properties: ClassVar[List[str]] = ["username", "password"] - - 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 LoginRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of LoginRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "username": obj.get("username"), - "password": obj.get("password") - }) - return _obj - - diff --git a/revengai/models/login_response.py b/revengai/models/login_response.py deleted file mode 100644 index b4113d3..0000000 --- a/revengai/models/login_response.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class LoginResponse(BaseModel): - """ - LoginResponse - """ # noqa: E501 - token: StrictStr = Field(description="Authentication token for subsequent requests") - __properties: ClassVar[List[str]] = ["token"] - - 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 LoginResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of LoginResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "token": obj.get("token") - }) - return _obj - - diff --git a/revengai/models/task_status_response.py b/revengai/models/task_status_response.py index a1c3f3f..9a1493f 100644 --- a/revengai/models/task_status_response.py +++ b/revengai/models/task_status_response.py @@ -16,8 +16,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from revengai.models.binary_task_status import BinaryTaskStatus from typing import Optional, Set from typing_extensions import Self @@ -27,7 +28,8 @@ class TaskStatusResponse(BaseModel): TaskStatusResponse """ # noqa: E501 status: BinaryTaskStatus - __properties: ClassVar[List[str]] = ["status"] + log_history: Optional[List[Annotated[List[Any], Field(min_length=2, max_length=2)]]] = None + __properties: ClassVar[List[str]] = ["status", "log_history"] model_config = ConfigDict( populate_by_name=True, @@ -68,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if log_history (nullable) is None + # and model_fields_set contains the field + if self.log_history is None and "log_history" in self.model_fields_set: + _dict['log_history'] = None + return _dict @classmethod @@ -80,7 +87,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "status": obj.get("status") + "status": obj.get("status"), + "log_history": obj.get("log_history") }) return _obj diff --git a/test/test_authentication_users_api.py b/test/test_authentication_users_api.py index 5a6dd20..65fa656 100644 --- a/test/test_authentication_users_api.py +++ b/test/test_authentication_users_api.py @@ -53,13 +53,6 @@ def test_get_user_comments(self) -> None: """ pass - def test_login_user(self) -> None: - """Test case for login_user - - Authenticate a user - """ - pass - def test_submit_user_feedback(self) -> None: """Test case for submit_user_feedback diff --git a/test/test_base_response_login_response.py b/test/test_base_response_login_response.py deleted file mode 100644 index 027f629..0000000 --- a/test/test_base_response_login_response.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.base_response_login_response import BaseResponseLoginResponse - -class TestBaseResponseLoginResponse(unittest.TestCase): - """BaseResponseLoginResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BaseResponseLoginResponse: - """Test BaseResponseLoginResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `BaseResponseLoginResponse` - """ - model = BaseResponseLoginResponse() - if include_optional: - return BaseResponseLoginResponse( - status = True, - data = revengai.models.login_response.LoginResponse( - token = '', ), - message = '', - errors = [ - revengai.models.error_model.ErrorModel( - code = '', - message = '', ) - ], - meta = revengai.models.meta_model.MetaModel( - pagination = revengai.models.pagination_model.PaginationModel( - page_size = 56, - page_number = 56, - has_next_page = True, ), ) - ) - else: - return BaseResponseLoginResponse( - ) - """ - - def testBaseResponseLoginResponse(self): - """Test BaseResponseLoginResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_base_response_task_status_response.py b/test/test_base_response_task_status_response.py index b757097..5972359 100644 --- a/test/test_base_response_task_status_response.py +++ b/test/test_base_response_task_status_response.py @@ -36,7 +36,12 @@ def make_instance(self, include_optional) -> BaseResponseTaskStatusResponse: return BaseResponseTaskStatusResponse( status = True, data = revengai.models.task_status_response.TaskStatusResponse( - status = 'UNINITIALISED', ), + status = 'UNINITIALISED', + log_history = [ + [ + null + ] + ], ), message = '', errors = [ revengai.models.error_model.ErrorModel( diff --git a/test/test_login_request.py b/test/test_login_request.py deleted file mode 100644 index c96102c..0000000 --- a/test/test_login_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.login_request import LoginRequest - -class TestLoginRequest(unittest.TestCase): - """LoginRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> LoginRequest: - """Test LoginRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `LoginRequest` - """ - model = LoginRequest() - if include_optional: - return LoginRequest( - username = '0', - password = '0' - ) - else: - return LoginRequest( - username = '0', - password = '0', - ) - """ - - def testLoginRequest(self): - """Test LoginRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_login_response.py b/test/test_login_response.py deleted file mode 100644 index 86ff69e..0000000 --- a/test/test_login_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.login_response import LoginResponse - -class TestLoginResponse(unittest.TestCase): - """LoginResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> LoginResponse: - """Test LoginResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `LoginResponse` - """ - model = LoginResponse() - if include_optional: - return LoginResponse( - token = '' - ) - else: - return LoginResponse( - token = '', - ) - """ - - def testLoginResponse(self): - """Test LoginResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_task_status_response.py b/test/test_task_status_response.py index 4403d34..958800e 100644 --- a/test/test_task_status_response.py +++ b/test/test_task_status_response.py @@ -34,7 +34,12 @@ def make_instance(self, include_optional) -> TaskStatusResponse: model = TaskStatusResponse() if include_optional: return TaskStatusResponse( - status = 'UNINITIALISED' + status = 'UNINITIALISED', + log_history = [ + [ + null + ] + ] ) else: return TaskStatusResponse(