Skip to content

Commit 73b4b91

Browse files
authored
Merge pull request #73 from RevEngAI/sdk-update-v2.75.0
🤖 Update SDK to version v2.75.0
2 parents f7ac389 + d865dcb commit 73b4b91

10 files changed

Lines changed: 28 additions & 10 deletions

.sdk-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2.74.0
1+
v2.75.0

docs/FunctionListItem.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**id** | **int** | Function id |
99
**name** | **str** | Name of the function |
10+
**name_source_type** | **str** | The source (process) the function name came from |
1011
**mangled_name** | **str** | Mangled name of the function |
1112
**vaddr** | **int** | Function virtual address |
1213
**size** | **int** | Function size in bytes |

revengai/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
""" # noqa: E501
1414

1515

16-
__version__ = "v2.74.0"
16+
__version__ = "v2.75.0"
1717

1818
# Define package exports
1919
__all__ = [

revengai/api/analyses_results_metadata_api.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ def get_functions_list(
901901
_headers: Optional[Dict[StrictStr, Any]] = None,
902902
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
903903
) -> BaseResponseAnalysisFunctions:
904-
"""Gets functions from analysis
904+
"""(Deprecated) Gets functions from analysis
905905
906906
Gets the functions identified during analysis
907907
@@ -934,6 +934,7 @@ def get_functions_list(
934934
:type _host_index: int, optional
935935
:return: Returns the result object.
936936
""" # noqa: E501
937+
warnings.warn("GET /v2/analyses/{analysis_id}/functions/list is deprecated.", DeprecationWarning)
937938

938939
_param = self._get_functions_list_serialize(
939940
analysis_id=analysis_id,
@@ -981,7 +982,7 @@ def get_functions_list_with_http_info(
981982
_headers: Optional[Dict[StrictStr, Any]] = None,
982983
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
983984
) -> ApiResponse[BaseResponseAnalysisFunctions]:
984-
"""Gets functions from analysis
985+
"""(Deprecated) Gets functions from analysis
985986
986987
Gets the functions identified during analysis
987988
@@ -1014,6 +1015,7 @@ def get_functions_list_with_http_info(
10141015
:type _host_index: int, optional
10151016
:return: Returns the result object.
10161017
""" # noqa: E501
1018+
warnings.warn("GET /v2/analyses/{analysis_id}/functions/list is deprecated.", DeprecationWarning)
10171019

10181020
_param = self._get_functions_list_serialize(
10191021
analysis_id=analysis_id,
@@ -1061,7 +1063,7 @@ def get_functions_list_without_preload_content(
10611063
_headers: Optional[Dict[StrictStr, Any]] = None,
10621064
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
10631065
) -> RESTResponseType:
1064-
"""Gets functions from analysis
1066+
"""(Deprecated) Gets functions from analysis
10651067
10661068
Gets the functions identified during analysis
10671069
@@ -1094,6 +1096,7 @@ def get_functions_list_without_preload_content(
10941096
:type _host_index: int, optional
10951097
:return: Returns the result object.
10961098
""" # noqa: E501
1099+
warnings.warn("GET /v2/analyses/{analysis_id}/functions/list is deprecated.", DeprecationWarning)
10971100

10981101
_param = self._get_functions_list_serialize(
10991102
analysis_id=analysis_id,

revengai/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __init__(
9090
self.default_headers[header_name] = header_value
9191
self.cookie = cookie
9292
# Set default User-Agent.
93-
self.user_agent = 'OpenAPI-Generator/v2.74.0/python'
93+
self.user_agent = 'OpenAPI-Generator/v2.75.0/python'
9494
self.client_side_validation = configuration.client_side_validation
9595

9696
def __enter__(self):

revengai/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,8 @@ def to_debug_report(self) -> str:
533533
return "Python SDK Debug Report:\n"\
534534
"OS: {env}\n"\
535535
"Python Version: {pyversion}\n"\
536-
"Version of the API: v2.74.0\n"\
537-
"SDK Package Version: v2.74.0".\
536+
"Version of the API: v2.75.0\n"\
537+
"SDK Package Version: v2.75.0".\
538538
format(env=sys.platform, pyversion=sys.version)
539539

540540
def get_host_settings(self) -> List[HostSetting]:

revengai/models/function_list_item.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import re # noqa: F401
1717
import json
1818

19-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
19+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
2020
from typing import Any, ClassVar, Dict, List
2121
from typing import Optional, Set
2222
from typing_extensions import Self
@@ -27,11 +27,19 @@ class FunctionListItem(BaseModel):
2727
""" # noqa: E501
2828
id: StrictInt = Field(description="Function id")
2929
name: StrictStr = Field(description="Name of the function")
30+
name_source_type: StrictStr = Field(description="The source (process) the function name came from")
3031
mangled_name: StrictStr = Field(description="Mangled name of the function")
3132
vaddr: StrictInt = Field(description="Function virtual address")
3233
size: StrictInt = Field(description="Function size in bytes")
3334
debug: StrictBool = Field(description="Whether the function has debug information")
34-
__properties: ClassVar[List[str]] = ["id", "name", "mangled_name", "vaddr", "size", "debug"]
35+
__properties: ClassVar[List[str]] = ["id", "name", "name_source_type", "mangled_name", "vaddr", "size", "debug"]
36+
37+
@field_validator('name_source_type')
38+
def name_source_type_validate_enum(cls, value):
39+
"""Validates the enum"""
40+
if value not in set(['SYSTEM', 'USER', 'AUTO_UNSTRIP', 'EXTERNAL', 'AI_UNSTRIP']):
41+
raise ValueError("must be one of enum values ('SYSTEM', 'USER', 'AUTO_UNSTRIP', 'EXTERNAL', 'AI_UNSTRIP')")
42+
return value
3543

3644
model_config = ConfigDict(
3745
populate_by_name=True,
@@ -86,6 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
8694
_obj = cls.model_validate({
8795
"id": obj.get("id"),
8896
"name": obj.get("name"),
97+
"name_source_type": obj.get("name_source_type"),
8998
"mangled_name": obj.get("mangled_name"),
9099
"vaddr": obj.get("vaddr"),
91100
"size": obj.get("size"),

test/test_analysis_functions_list.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def make_instance(self, include_optional) -> AnalysisFunctionsList:
3838
revengai.models.function_list_item.FunctionListItem(
3939
id = 56,
4040
name = '',
41+
name_source_type = 'SYSTEM',
4142
mangled_name = '',
4243
vaddr = 56,
4344
size = 56,
@@ -50,6 +51,7 @@ def make_instance(self, include_optional) -> AnalysisFunctionsList:
5051
revengai.models.function_list_item.FunctionListItem(
5152
id = 56,
5253
name = '',
54+
name_source_type = 'SYSTEM',
5355
mangled_name = '',
5456
vaddr = 56,
5557
size = 56,

test/test_base_response_analysis_functions_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def make_instance(self, include_optional) -> BaseResponseAnalysisFunctionsList:
4040
revengai.models.function_list_item.FunctionListItem(
4141
id = 56,
4242
name = '',
43+
name_source_type = 'SYSTEM',
4344
mangled_name = '',
4445
vaddr = 56,
4546
size = 56,

test/test_function_list_item.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def make_instance(self, include_optional) -> FunctionListItem:
3636
return FunctionListItem(
3737
id = 56,
3838
name = '',
39+
name_source_type = 'SYSTEM',
3940
mangled_name = '',
4041
vaddr = 56,
4142
size = 56,
@@ -45,6 +46,7 @@ def make_instance(self, include_optional) -> FunctionListItem:
4546
return FunctionListItem(
4647
id = 56,
4748
name = '',
49+
name_source_type = 'SYSTEM',
4850
mangled_name = '',
4951
vaddr = 56,
5052
size = 56,

0 commit comments

Comments
 (0)