Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .sdk-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.37.4
v2.41.1
3 changes: 0 additions & 3 deletions docs/AnalysesCoreApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -597,11 +597,8 @@ Gets the most recent analyses provided a scope, this is then paginated, if pages

```python
import revengai
from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy
from revengai.models.base_response_recent import BaseResponseRecent
from revengai.models.dynamic_execution_status_input import DynamicExecutionStatusInput
from revengai.models.model_name import ModelName
from revengai.models.order import Order
from revengai.models.status_input import StatusInput
from revengai.models.workspace import Workspace
from revengai.rest import ApiException
Expand Down
2 changes: 0 additions & 2 deletions docs/CollectionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,8 @@ Returns a list of collections

```python
import revengai
from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy
from revengai.models.base_response_list_collection_results import BaseResponseListCollectionResults
from revengai.models.filters import Filters
from revengai.models.order import Order
from revengai.rest import ApiException
from pprint import pprint

Expand Down
2 changes: 0 additions & 2 deletions docs/SearchApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,8 @@ Searches for a specific collection

```python
import revengai
from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy
from revengai.models.base_response_collection_search_response import BaseResponseCollectionSearchResponse
from revengai.models.filters import Filters
from revengai.models.order import Order
from revengai.rest import ApiException
from pprint import pprint

Expand Down
2 changes: 1 addition & 1 deletion revengai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
""" # noqa: E501


__version__ = "v2.37.4"
__version__ = "v2.41.1"

# Define package exports
__all__ = [
Expand Down
21 changes: 9 additions & 12 deletions revengai/api/analyses_core_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from revengai.models.analysis_create_request import AnalysisCreateRequest
from revengai.models.analysis_update_request import AnalysisUpdateRequest
from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest
from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy
from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse
from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse
from revengai.models.base_response_analysis_function_mapping import BaseResponseAnalysisFunctionMapping
Expand All @@ -34,9 +33,7 @@
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.dynamic_execution_status_input import DynamicExecutionStatusInput
from revengai.models.model_name import ModelName
from revengai.models.order import Order
from revengai.models.re_analysis_form import ReAnalysisForm
from revengai.models.status_input import StatusInput
from revengai.models.upload_file_type import UploadFileType
Expand Down Expand Up @@ -1940,13 +1937,13 @@ def list_analyses(
workspace: Annotated[Optional[List[Workspace]], Field(description="The workspace to be viewed")] = None,
status: Annotated[Optional[List[StatusInput]], Field(description="The status of the analysis")] = None,
model_name: Annotated[Optional[List[ModelName]], Field(description="Show analysis belonging to the model")] = None,
dynamic_execution_status: Annotated[Optional[DynamicExecutionStatusInput], Field(description="Show analysis that have a dynamic execution with the given status")] = None,
dynamic_execution_status: Annotated[Optional[Any], Field(description="Show analysis that have a dynamic execution with the given status")] = None,
usernames: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Show analysis belonging to the user")] = None,
sha256_hash: Optional[StrictStr] = None,
limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None,
offset: Optional[StrictInt] = None,
order_by: Optional[AppApiRestV2AnalysesEnumsOrderBy] = None,
order: Optional[Order] = None,
order_by: Optional[Any] = None,
order: Optional[Any] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -2048,13 +2045,13 @@ def list_analyses_with_http_info(
workspace: Annotated[Optional[List[Workspace]], Field(description="The workspace to be viewed")] = None,
status: Annotated[Optional[List[StatusInput]], Field(description="The status of the analysis")] = None,
model_name: Annotated[Optional[List[ModelName]], Field(description="Show analysis belonging to the model")] = None,
dynamic_execution_status: Annotated[Optional[DynamicExecutionStatusInput], Field(description="Show analysis that have a dynamic execution with the given status")] = None,
dynamic_execution_status: Annotated[Optional[Any], Field(description="Show analysis that have a dynamic execution with the given status")] = None,
usernames: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Show analysis belonging to the user")] = None,
sha256_hash: Optional[StrictStr] = None,
limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None,
offset: Optional[StrictInt] = None,
order_by: Optional[AppApiRestV2AnalysesEnumsOrderBy] = None,
order: Optional[Order] = None,
order_by: Optional[Any] = None,
order: Optional[Any] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -2156,13 +2153,13 @@ def list_analyses_without_preload_content(
workspace: Annotated[Optional[List[Workspace]], Field(description="The workspace to be viewed")] = None,
status: Annotated[Optional[List[StatusInput]], Field(description="The status of the analysis")] = None,
model_name: Annotated[Optional[List[ModelName]], Field(description="Show analysis belonging to the model")] = None,
dynamic_execution_status: Annotated[Optional[DynamicExecutionStatusInput], Field(description="Show analysis that have a dynamic execution with the given status")] = None,
dynamic_execution_status: Annotated[Optional[Any], Field(description="Show analysis that have a dynamic execution with the given status")] = None,
usernames: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Show analysis belonging to the user")] = None,
sha256_hash: Optional[StrictStr] = None,
limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None,
offset: Optional[StrictInt] = None,
order_by: Optional[AppApiRestV2AnalysesEnumsOrderBy] = None,
order: Optional[Order] = None,
order_by: Optional[Any] = None,
order: Optional[Any] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down
16 changes: 7 additions & 9 deletions revengai/api/collections_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
from typing_extensions import Annotated

from pydantic import Field, StrictBool, StrictInt, StrictStr
from typing import List, Optional
from typing import Any, List, Optional
from typing_extensions import Annotated
from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy
from revengai.models.base_response_bool import BaseResponseBool
from revengai.models.base_response_collection_binaries_update_response import BaseResponseCollectionBinariesUpdateResponse
from revengai.models.base_response_collection_response import BaseResponseCollectionResponse
Expand All @@ -29,7 +28,6 @@
from revengai.models.collection_tags_update_request import CollectionTagsUpdateRequest
from revengai.models.collection_update_request import CollectionUpdateRequest
from revengai.models.filters import Filters
from revengai.models.order import Order

from revengai.api_client import ApiClient, RequestSerialized
from revengai.api_response import ApiResponse
Expand Down Expand Up @@ -895,8 +893,8 @@ def list_collections(
filters: Optional[List[Filters]] = None,
limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None,
offset: Optional[StrictInt] = None,
order_by: Optional[AppApiRestV2CollectionsEnumsOrderBy] = None,
order: Optional[Order] = None,
order_by: Optional[Any] = None,
order: Optional[Any] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -983,8 +981,8 @@ def list_collections_with_http_info(
filters: Optional[List[Filters]] = None,
limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None,
offset: Optional[StrictInt] = None,
order_by: Optional[AppApiRestV2CollectionsEnumsOrderBy] = None,
order: Optional[Order] = None,
order_by: Optional[Any] = None,
order: Optional[Any] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -1071,8 +1069,8 @@ def list_collections_without_preload_content(
filters: Optional[List[Filters]] = None,
limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None,
offset: Optional[StrictInt] = None,
order_by: Optional[AppApiRestV2CollectionsEnumsOrderBy] = None,
order: Optional[Order] = None,
order_by: Optional[Any] = None,
order: Optional[Any] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down
16 changes: 7 additions & 9 deletions revengai/api/search_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
from typing_extensions import Annotated

from pydantic import Field, StrictBool, StrictStr
from typing import List, Optional
from typing import Any, List, Optional
from typing_extensions import Annotated
from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy
from revengai.models.base_response_binary_search_response import BaseResponseBinarySearchResponse
from revengai.models.base_response_collection_search_response import BaseResponseCollectionSearchResponse
from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse
from revengai.models.base_response_tag_search_response import BaseResponseTagSearchResponse
from revengai.models.filters import Filters
from revengai.models.order import Order

from revengai.api_client import ApiClient, RequestSerialized
from revengai.api_response import ApiResponse
Expand Down Expand Up @@ -424,8 +422,8 @@ def search_collections(
tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None,
model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None,
order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None,
order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None,
order_by: Annotated[Optional[Any], Field(description="The field to sort the order by in the results")] = None,
order_by_direction: Annotated[Optional[Any], Field(description="The order direction in which to return results")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -529,8 +527,8 @@ def search_collections_with_http_info(
tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None,
model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None,
order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None,
order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None,
order_by: Annotated[Optional[Any], Field(description="The field to sort the order by in the results")] = None,
order_by_direction: Annotated[Optional[Any], Field(description="The order direction in which to return results")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -634,8 +632,8 @@ def search_collections_without_preload_content(
tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None,
model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None,
order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None,
order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None,
order_by: Annotated[Optional[Any], Field(description="The field to sort the order by in the results")] = None,
order_by_direction: Annotated[Optional[Any], Field(description="The order direction in which to return results")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down
2 changes: 1 addition & 1 deletion revengai/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/v2.37.4/python'
self.user_agent = 'OpenAPI-Generator/v2.41.1/python'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
4 changes: 2 additions & 2 deletions revengai/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: v2.37.4\n"\
"SDK Package Version: v2.37.4".\
"Version of the API: v2.41.1\n"\
"SDK Package Version: v2.41.1".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ def to_dict(self) -> Dict[str, Any]:
# 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:
Expand Down
13 changes: 5 additions & 8 deletions test/test_analysis_create_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,17 @@ def make_instance(self, include_optional) -> AnalysisCreateRequest:
], ),
debug_hash = '',
analysis_config = revengai.models.analysis_config.AnalysisConfig(
scrape_third_party_config = revengai.models.scrape_third_party_config.ScrapeThirdPartyConfig(
enabled = True, ),
scrape_third_party_config = null,
generate_cves = True,
generate_sbom = True,
generate_capabilities = True,
no_cache = True,
advanced_analysis = True,
sandbox_config = revengai.models.sandbox_options.SandboxOptions(
enabled = True,
command_line_args = '', ), ),
sandbox_config = null, ),
binary_config = revengai.models.binary_config.BinaryConfig(
isa = 'x86',
platform = 'linux',
file_format = 'pe', )
isa = null,
platform = null,
file_format = null, )
)
else:
return AnalysisCreateRequest(
Expand Down
5 changes: 1 addition & 4 deletions test/test_base_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ def make_instance(self, include_optional) -> BaseResponse:
message = '', )
],
meta = revengai.models.meta_model.MetaModel(
pagination = revengai.models.pagination_model.PaginationModel(
page_size = 56,
page_number = 56,
has_next_page = True, ), )
pagination = null, )
)
else:
return BaseResponse(
Expand Down
5 changes: 1 addition & 4 deletions test/test_base_response_analysis_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ def make_instance(self, include_optional) -> BaseResponseAnalysisCreateResponse:
message = '', )
],
meta = revengai.models.meta_model.MetaModel(
pagination = revengai.models.pagination_model.PaginationModel(
page_size = 56,
page_number = 56,
has_next_page = True, ), )
pagination = null, )
)
else:
return BaseResponseAnalysisCreateResponse(
Expand Down
9 changes: 2 additions & 7 deletions test/test_base_response_analysis_detail_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ def make_instance(self, include_optional) -> BaseResponseAnalysisDetailResponse:
return BaseResponseAnalysisDetailResponse(
status = True,
data = revengai.models.analysis_detail_response.AnalysisDetailResponse(
access = revengai.models.analysis_access_info.AnalysisAccessInfo(
owner = True,
username = '', ),
access = null,
analysis_id = 56,
analysis_scope = '',
architecture = '',
Expand All @@ -61,10 +59,7 @@ def make_instance(self, include_optional) -> BaseResponseAnalysisDetailResponse:
message = '', )
],
meta = revengai.models.meta_model.MetaModel(
pagination = revengai.models.pagination_model.PaginationModel(
page_size = 56,
page_number = 56,
has_next_page = True, ), )
pagination = null, )
)
else:
return BaseResponseAnalysisDetailResponse(
Expand Down
16 changes: 2 additions & 14 deletions test/test_base_response_analysis_function_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,15 @@ def make_instance(self, include_optional) -> BaseResponseAnalysisFunctionMapping
return BaseResponseAnalysisFunctionMapping(
status = True,
data = revengai.models.analysis_function_mapping.AnalysisFunctionMapping(
function_maps = revengai.models.function_mapping.FunctionMapping(
function_map = {
'key' : 56
},
inverse_function_map = {
'key' : 56
},
name_map = {
'key' : ''
}, ), ),
function_maps = null, ),
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, ), )
pagination = null, )
)
else:
return BaseResponseAnalysisFunctionMapping(
Expand Down
Loading