Skip to content
Merged
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.74.0
v2.75.0
1 change: 1 addition & 0 deletions docs/FunctionListItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | Function id |
**name** | **str** | Name of the function |
**name_source_type** | **str** | The source (process) the function name came from |
**mangled_name** | **str** | Mangled name of the function |
**vaddr** | **int** | Function virtual address |
**size** | **int** | Function size in bytes |
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.74.0"
__version__ = "v2.75.0"

# Define package exports
__all__ = [
Expand Down
9 changes: 6 additions & 3 deletions revengai/api/analyses_results_metadata_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ def get_functions_list(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> BaseResponseAnalysisFunctions:
"""Gets functions from analysis
"""(Deprecated) Gets functions from analysis

Gets the functions identified during analysis

Expand Down Expand Up @@ -934,6 +934,7 @@ def get_functions_list(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
warnings.warn("GET /v2/analyses/{analysis_id}/functions/list is deprecated.", DeprecationWarning)

_param = self._get_functions_list_serialize(
analysis_id=analysis_id,
Expand Down Expand Up @@ -981,7 +982,7 @@ def get_functions_list_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[BaseResponseAnalysisFunctions]:
"""Gets functions from analysis
"""(Deprecated) Gets functions from analysis

Gets the functions identified during analysis

Expand Down Expand Up @@ -1014,6 +1015,7 @@ def get_functions_list_with_http_info(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
warnings.warn("GET /v2/analyses/{analysis_id}/functions/list is deprecated.", DeprecationWarning)

_param = self._get_functions_list_serialize(
analysis_id=analysis_id,
Expand Down Expand Up @@ -1061,7 +1063,7 @@ def get_functions_list_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Gets functions from analysis
"""(Deprecated) Gets functions from analysis

Gets the functions identified during analysis

Expand Down Expand Up @@ -1094,6 +1096,7 @@ def get_functions_list_without_preload_content(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
warnings.warn("GET /v2/analyses/{analysis_id}/functions/list is deprecated.", DeprecationWarning)

_param = self._get_functions_list_serialize(
analysis_id=analysis_id,
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.74.0/python'
self.user_agent = 'OpenAPI-Generator/v2.75.0/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.74.0\n"\
"SDK Package Version: v2.74.0".\
"Version of the API: v2.75.0\n"\
"SDK Package Version: v2.75.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
13 changes: 11 additions & 2 deletions revengai/models/function_list_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
Expand All @@ -27,11 +27,19 @@ class FunctionListItem(BaseModel):
""" # noqa: E501
id: StrictInt = Field(description="Function id")
name: StrictStr = Field(description="Name of the function")
name_source_type: StrictStr = Field(description="The source (process) the function name came from")
mangled_name: StrictStr = Field(description="Mangled name of the function")
vaddr: StrictInt = Field(description="Function virtual address")
size: StrictInt = Field(description="Function size in bytes")
debug: StrictBool = Field(description="Whether the function has debug information")
__properties: ClassVar[List[str]] = ["id", "name", "mangled_name", "vaddr", "size", "debug"]
__properties: ClassVar[List[str]] = ["id", "name", "name_source_type", "mangled_name", "vaddr", "size", "debug"]

@field_validator('name_source_type')
def name_source_type_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(['SYSTEM', 'USER', 'AUTO_UNSTRIP', 'EXTERNAL', 'AI_UNSTRIP']):
raise ValueError("must be one of enum values ('SYSTEM', 'USER', 'AUTO_UNSTRIP', 'EXTERNAL', 'AI_UNSTRIP')")
return value

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -86,6 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"id": obj.get("id"),
"name": obj.get("name"),
"name_source_type": obj.get("name_source_type"),
"mangled_name": obj.get("mangled_name"),
"vaddr": obj.get("vaddr"),
"size": obj.get("size"),
Expand Down
2 changes: 2 additions & 0 deletions test/test_analysis_functions_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def make_instance(self, include_optional) -> AnalysisFunctionsList:
revengai.models.function_list_item.FunctionListItem(
id = 56,
name = '',
name_source_type = 'SYSTEM',
mangled_name = '',
vaddr = 56,
size = 56,
Expand All @@ -50,6 +51,7 @@ def make_instance(self, include_optional) -> AnalysisFunctionsList:
revengai.models.function_list_item.FunctionListItem(
id = 56,
name = '',
name_source_type = 'SYSTEM',
mangled_name = '',
vaddr = 56,
size = 56,
Expand Down
1 change: 1 addition & 0 deletions test/test_base_response_analysis_functions_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def make_instance(self, include_optional) -> BaseResponseAnalysisFunctionsList:
revengai.models.function_list_item.FunctionListItem(
id = 56,
name = '',
name_source_type = 'SYSTEM',
mangled_name = '',
vaddr = 56,
size = 56,
Expand Down
2 changes: 2 additions & 0 deletions test/test_function_list_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def make_instance(self, include_optional) -> FunctionListItem:
return FunctionListItem(
id = 56,
name = '',
name_source_type = 'SYSTEM',
mangled_name = '',
vaddr = 56,
size = 56,
Expand All @@ -45,6 +46,7 @@ def make_instance(self, include_optional) -> FunctionListItem:
return FunctionListItem(
id = 56,
name = '',
name_source_type = 'SYSTEM',
mangled_name = '',
vaddr = 56,
size = 56,
Expand Down