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 @@
v1.96.1
v1.98.1
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,6 @@ Class | Method | HTTP request | Description
- [SBOMPackage](docs/SBOMPackage.md)
- [SandboxOptions](docs/SandboxOptions.md)
- [ScrapeThirdPartyConfig](docs/ScrapeThirdPartyConfig.md)
- [SearchBinaryIds](docs/SearchBinaryIds.md)
- [SearchFunctionIds](docs/SearchFunctionIds.md)
- [SectionModel](docs/SectionModel.md)
- [SecurityChecksResponse](docs/SecurityChecksResponse.md)
- [SecurityChecksResult](docs/SecurityChecksResult.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/AppApiRestV2SimilaritySchemaANNFunction.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Name | Type | Description | Notes
**distance** | **float** | The distance between two neighbours | [optional] [default to 0.1]
**analysis_search_ids** | **List[Optional[int]]** | Perform a search on functions within a list of analyses | [optional] [default to []]
**collection_search_ids** | **List[Optional[int]]** | Search only within these collections | [optional] [default to []]
**search_binary_ids** | [**SearchBinaryIds**](SearchBinaryIds.md) | | [optional]
**search_function_ids** | [**SearchFunctionIds**](SearchFunctionIds.md) | | [optional]
**search_binary_ids** | **List[int]** | | [optional]
**search_function_ids** | **List[int]** | | [optional]
**debug_only** | **bool** | Searches for only functions which are debug | [optional] [default to False]

## Example
Expand Down
3 changes: 2 additions & 1 deletion docs/MatchedFunctionSuggestion.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**function_id** | **int** | Unique identifier of the matched function |
**function_vaddr** | **int** | Virtual address of the matched function |
**suggested_name** | **str** | Name of the function group that contains the matched functions |
**suggested_name** | **str** | | [optional]
**suggested_demangled_name** | **str** | De-mangled name of the function group that contains the matched functions |

## Example

Expand Down
29 changes: 0 additions & 29 deletions docs/SearchBinaryIds.md

This file was deleted.

29 changes: 0 additions & 29 deletions docs/SearchFunctionIds.md

This file was deleted.

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


__version__ = "v1.96.1"
__version__ = "v1.98.1"

# Define package exports
__all__ = [
Expand Down Expand Up @@ -307,8 +307,6 @@
"SBOMPackage",
"SandboxOptions",
"ScrapeThirdPartyConfig",
"SearchBinaryIds",
"SearchFunctionIds",
"SectionModel",
"SecurityChecksResponse",
"SecurityChecksResult",
Expand Down Expand Up @@ -649,8 +647,6 @@
from revengai.models.sbom_package import SBOMPackage as SBOMPackage
from revengai.models.sandbox_options import SandboxOptions as SandboxOptions
from revengai.models.scrape_third_party_config import ScrapeThirdPartyConfig as ScrapeThirdPartyConfig
from revengai.models.search_binary_ids import SearchBinaryIds as SearchBinaryIds
from revengai.models.search_function_ids import SearchFunctionIds as SearchFunctionIds
from revengai.models.section_model import SectionModel as SectionModel
from revengai.models.security_checks_response import SecurityChecksResponse as SecurityChecksResponse
from revengai.models.security_checks_result import SecurityChecksResult as SecurityChecksResult
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/v1.96.1/python'
self.user_agent = 'OpenAPI-Generator/v1.98.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 @@ -529,8 +529,8 @@ def to_debug_report(self) -> str:
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v1.96.1\n"\
"SDK Package Version: v1.96.1".\
"Version of the API: v1.98.1\n"\
"SDK Package Version: v1.98.1".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
2 changes: 0 additions & 2 deletions revengai/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,6 @@
from revengai.models.sbom_package import SBOMPackage
from revengai.models.sandbox_options import SandboxOptions
from revengai.models.scrape_third_party_config import ScrapeThirdPartyConfig
from revengai.models.search_binary_ids import SearchBinaryIds
from revengai.models.search_function_ids import SearchFunctionIds
from revengai.models.section_model import SectionModel
from revengai.models.security_checks_response import SecurityChecksResponse
from revengai.models.security_checks_result import SecurityChecksResult
Expand Down
26 changes: 14 additions & 12 deletions revengai/models/app_api_rest_v2_similarity_schema_ann_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing_extensions import Annotated
from revengai.models.search_binary_ids import SearchBinaryIds
from revengai.models.search_function_ids import SearchFunctionIds
from typing import Optional, Set
from typing_extensions import Self

Expand All @@ -32,8 +30,8 @@ class AppApiRestV2SimilaritySchemaANNFunction(BaseModel):
distance: Optional[Union[StrictFloat, StrictInt]] = Field(default=0.1, description="The distance between two neighbours")
analysis_search_ids: Optional[List[Optional[StrictInt]]] = Field(default=None, description="Perform a search on functions within a list of analyses")
collection_search_ids: Optional[Annotated[List[Optional[StrictInt]], Field(max_length=5)]] = Field(default=None, description="Search only within these collections")
search_binary_ids: Optional[SearchBinaryIds] = None
search_function_ids: Optional[SearchFunctionIds] = None
search_binary_ids: Optional[List[StrictInt]] = None
search_function_ids: Optional[List[StrictInt]] = None
debug_only: Optional[StrictBool] = Field(default=False, description="Searches for only functions which are debug")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["limit", "distance", "analysis_search_ids", "collection_search_ids", "search_binary_ids", "search_function_ids", "debug_only"]
Expand Down Expand Up @@ -79,17 +77,21 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of search_binary_ids
if self.search_binary_ids:
_dict['search_binary_ids'] = self.search_binary_ids.to_dict()
# override the default output from pydantic by calling `to_dict()` of search_function_ids
if self.search_function_ids:
_dict['search_function_ids'] = self.search_function_ids.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

# set to None if search_binary_ids (nullable) is None
# and model_fields_set contains the field
if self.search_binary_ids is None and "search_binary_ids" in self.model_fields_set:
_dict['search_binary_ids'] = None

# set to None if search_function_ids (nullable) is None
# and model_fields_set contains the field
if self.search_function_ids is None and "search_function_ids" in self.model_fields_set:
_dict['search_function_ids'] = None

return _dict

@classmethod
Expand All @@ -106,8 +108,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"distance": obj.get("distance") if obj.get("distance") is not None else 0.1,
"analysis_search_ids": obj.get("analysis_search_ids"),
"collection_search_ids": obj.get("collection_search_ids"),
"search_binary_ids": SearchBinaryIds.from_dict(obj["search_binary_ids"]) if obj.get("search_binary_ids") is not None else None,
"search_function_ids": SearchFunctionIds.from_dict(obj["search_function_ids"]) if obj.get("search_function_ids") is not None else None,
"search_binary_ids": obj.get("search_binary_ids"),
"search_function_ids": obj.get("search_function_ids"),
"debug_only": obj.get("debug_only") if obj.get("debug_only") is not None else False
})
# store additional fields in additional_properties
Expand Down
15 changes: 11 additions & 4 deletions revengai/models/matched_function_suggestion.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import json

from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self

Expand All @@ -27,8 +27,9 @@ class MatchedFunctionSuggestion(BaseModel):
""" # noqa: E501
function_id: StrictInt = Field(description="Unique identifier of the matched function")
function_vaddr: StrictInt = Field(description="Virtual address of the matched function")
suggested_name: StrictStr = Field(description="Name of the function group that contains the matched functions")
__properties: ClassVar[List[str]] = ["function_id", "function_vaddr", "suggested_name"]
suggested_name: Optional[StrictStr] = None
suggested_demangled_name: StrictStr = Field(description="De-mangled name of the function group that contains the matched functions")
__properties: ClassVar[List[str]] = ["function_id", "function_vaddr", "suggested_name", "suggested_demangled_name"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -69,6 +70,11 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# set to None if suggested_name (nullable) is None
# and model_fields_set contains the field
if self.suggested_name is None and "suggested_name" in self.model_fields_set:
_dict['suggested_name'] = None

return _dict

@classmethod
Expand All @@ -83,7 +89,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"function_id": obj.get("function_id"),
"function_vaddr": obj.get("function_vaddr"),
"suggested_name": obj.get("suggested_name")
"suggested_name": obj.get("suggested_name"),
"suggested_demangled_name": obj.get("suggested_demangled_name")
})
return _obj

Expand Down
137 changes: 0 additions & 137 deletions revengai/models/search_binary_ids.py

This file was deleted.

Loading