diff --git a/.sdk-version b/.sdk-version index acacdbd..494f957 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v1.81.0 +v1.81.2 diff --git a/docs/AutoUnstripRequest.md b/docs/AutoUnstripRequest.md index ca93df8..8c9ef89 100644 --- a/docs/AutoUnstripRequest.md +++ b/docs/AutoUnstripRequest.md @@ -7,6 +7,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **min_similarity** | **float** | Minimum similarity expected for a match, default is 0.9 | [optional] [default to 0.9] **apply** | **bool** | Whether to apply the matched function names to the target binary, default is False | [optional] [default to False] +**confidence_threshold** | **float** | Confidence threshold for applying function names, default is 0.9 | [optional] [default to 0.9] +**min_group_size** | **int** | Minimum number of matching functions required to consider for a match, default is 10 | [optional] [default to 10] ## Example diff --git a/docs/AutoUnstripResponse.md b/docs/AutoUnstripResponse.md index c9374f9..374310d 100644 --- a/docs/AutoUnstripResponse.md +++ b/docs/AutoUnstripResponse.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **total_time** | **int** | | [optional] **matches** | [**List[MatchedFunctionSuggestion]**](MatchedFunctionSuggestion.md) | | [optional] **applied** | **bool** | | [optional] +**error_message** | **str** | | [optional] ## Example diff --git a/revengai/__init__.py b/revengai/__init__.py index c1bdac4..e447009 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v1.81.0" +__version__ = "v1.81.2" # Define package exports __all__ = [ diff --git a/revengai/api_client.py b/revengai/api_client.py index 803ea99..65a52bf 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/v1.81.0/python' + self.user_agent = 'OpenAPI-Generator/v1.81.2/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index c20f7e7..2dba4df 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -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.81.0\n"\ - "SDK Package Version: v1.81.0".\ + "Version of the API: v1.81.2\n"\ + "SDK Package Version: v1.81.2".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/revengai/models/auto_unstrip_request.py b/revengai/models/auto_unstrip_request.py index 659c609..2edf670 100644 --- a/revengai/models/auto_unstrip_request.py +++ b/revengai/models/auto_unstrip_request.py @@ -28,7 +28,9 @@ class AutoUnstripRequest(BaseModel): """ # noqa: E501 min_similarity: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.9, description="Minimum similarity expected for a match, default is 0.9") apply: Optional[StrictBool] = Field(default=False, description="Whether to apply the matched function names to the target binary, default is False") - __properties: ClassVar[List[str]] = ["min_similarity", "apply"] + confidence_threshold: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.9, description="Confidence threshold for applying function names, default is 0.9") + min_group_size: Optional[Annotated[int, Field(le=20, strict=True, ge=1)]] = Field(default=10, description="Minimum number of matching functions required to consider for a match, default is 10") + __properties: ClassVar[List[str]] = ["min_similarity", "apply", "confidence_threshold", "min_group_size"] model_config = ConfigDict( populate_by_name=True, @@ -82,7 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 0.9, - "apply": obj.get("apply") if obj.get("apply") is not None else False + "apply": obj.get("apply") if obj.get("apply") is not None else False, + "confidence_threshold": obj.get("confidence_threshold") if obj.get("confidence_threshold") is not None else 0.9, + "min_group_size": obj.get("min_group_size") if obj.get("min_group_size") is not None else 10 }) return _obj diff --git a/revengai/models/auto_unstrip_response.py b/revengai/models/auto_unstrip_response.py index ead3b94..10284dd 100644 --- a/revengai/models/auto_unstrip_response.py +++ b/revengai/models/auto_unstrip_response.py @@ -31,7 +31,8 @@ class AutoUnstripResponse(BaseModel): total_time: Optional[StrictInt] = None matches: Optional[List[MatchedFunctionSuggestion]] = None applied: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["progress", "status", "total_time", "matches", "applied"] + error_message: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["progress", "status", "total_time", "matches", "applied", "error_message"] model_config = ConfigDict( populate_by_name=True, @@ -99,6 +100,11 @@ def to_dict(self) -> Dict[str, Any]: if self.applied is None and "applied" in self.model_fields_set: _dict['applied'] = None + # set to None if error_message (nullable) is None + # and model_fields_set contains the field + if self.error_message is None and "error_message" in self.model_fields_set: + _dict['error_message'] = None + return _dict @classmethod @@ -115,7 +121,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status": obj.get("status"), "total_time": obj.get("total_time"), "matches": [MatchedFunctionSuggestion.from_dict(_item) for _item in obj["matches"]] if obj.get("matches") is not None else None, - "applied": obj.get("applied") + "applied": obj.get("applied"), + "error_message": obj.get("error_message") }) return _obj diff --git a/test/test_auto_unstrip_request.py b/test/test_auto_unstrip_request.py index 4c1dc9d..a4a1b0d 100644 --- a/test/test_auto_unstrip_request.py +++ b/test/test_auto_unstrip_request.py @@ -35,7 +35,9 @@ def make_instance(self, include_optional) -> AutoUnstripRequest: if include_optional: return AutoUnstripRequest( min_similarity = 0.0, - apply = True + apply = True, + confidence_threshold = 0.0, + min_group_size = 1.0 ) else: return AutoUnstripRequest( diff --git a/test/test_auto_unstrip_response.py b/test/test_auto_unstrip_response.py index f502c6e..0d42410 100644 --- a/test/test_auto_unstrip_response.py +++ b/test/test_auto_unstrip_response.py @@ -43,7 +43,8 @@ def make_instance(self, include_optional) -> AutoUnstripResponse: function_vaddr = 56, suggested_name = '', ) ], - applied = True + applied = True, + error_message = '' ) else: return AutoUnstripResponse(