From 110b9c75c1b1e14911b296a65c7e6fefc19f60fc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 Oct 2025 06:12:35 +0000 Subject: [PATCH] Update SDK to version v2.14.1 - Generated from OpenAPI spec version v2.14.1 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- docs/AnalysisFunctionMatchingRequest.md | 1 + docs/AutoUnstripRequest.md | 1 + docs/FunctionMatchingBatchResponse.md | 2 +- docs/FunctionMatchingRequest.md | 1 + revengai/__init__.py | 2 +- revengai/api_client.py | 2 +- revengai/configuration.py | 4 ++-- .../analysis_function_matching_request.py | 4 +++- revengai/models/auto_unstrip_request.py | 4 +++- .../function_matching_batch_response.py | 7 +++++- revengai/models/function_matching_request.py | 4 +++- ...test_analysis_function_matching_request.py | 1 + test/test_auto_unstrip_request.py | 1 + test/test_function_matching_batch_response.py | 23 ------------------- test/test_function_matching_request.py | 1 + 16 files changed, 27 insertions(+), 33 deletions(-) diff --git a/.sdk-version b/.sdk-version index c757c98..9119877 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v2.13.0 +v2.14.1 diff --git a/docs/AnalysisFunctionMatchingRequest.md b/docs/AnalysisFunctionMatchingRequest.md index 7a71905..6246b4c 100644 --- a/docs/AnalysisFunctionMatchingRequest.md +++ b/docs/AnalysisFunctionMatchingRequest.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **results_per_function** | **int** | Maximum number of matches to return per function, default is 1, max is 10 | [optional] [default to 1] **page** | **int** | Page number for paginated results, default is 1 (first page) | [optional] [default to 1] **page_size** | **int** | Number of functions to return per page, default is 0 (all functions), max is 1000 | [optional] [default to 0] +**status_only** | **bool** | If set to true, only returns the status of the matching operation without the actual results | [optional] [default to False] **no_cache** | **bool** | If set to true, forces the system to bypass any cached results and perform a fresh computation | [optional] [default to False] ## Example diff --git a/docs/AutoUnstripRequest.md b/docs/AutoUnstripRequest.md index c717dd8..9487aea 100644 --- a/docs/AutoUnstripRequest.md +++ b/docs/AutoUnstripRequest.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **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 as a percentage, default is 90 | [optional] [default to 90.0] **min_group_size** | **int** | Minimum number of matching functions required to consider for a match, default is 10 | [optional] [default to 10] +**status_only** | **bool** | If set to true, only returns the status of the auto-unstrip operation without the actual results | [optional] [default to False] **no_cache** | **bool** | If set to true, forces the system to bypass any cached results and perform a fresh computation | [optional] [default to False] ## Example diff --git a/docs/FunctionMatchingBatchResponse.md b/docs/FunctionMatchingBatchResponse.md index 18d133a..a8895c1 100644 --- a/docs/FunctionMatchingBatchResponse.md +++ b/docs/FunctionMatchingBatchResponse.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **error_message** | **str** | | [optional] **current_page** | **int** | | [optional] **total_pages** | **int** | | [optional] -**matches** | [**List[FunctionMatchingResultWithBestMatch]**](FunctionMatchingResultWithBestMatch.md) | | +**matches** | [**List[FunctionMatchingResultWithBestMatch]**](FunctionMatchingResultWithBestMatch.md) | | [optional] ## Example diff --git a/docs/FunctionMatchingRequest.md b/docs/FunctionMatchingRequest.md index 17b54c4..f75bb47 100644 --- a/docs/FunctionMatchingRequest.md +++ b/docs/FunctionMatchingRequest.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **results_per_function** | **int** | Maximum number of matches to return per function, default is 1, max is 50 | [optional] [default to 1] **page** | **int** | Page number for paginated results, default is 1 (first page) | [optional] [default to 1] **page_size** | **int** | Number of functions to return per page, default is 0 (all functions), max is 1000 | [optional] [default to 0] +**status_only** | **bool** | If set to true, only returns the status of the matching operation without the actual results | [optional] [default to False] **no_cache** | **bool** | If set to true, forces the system to bypass any cached results and perform a fresh computation | [optional] [default to False] ## Example diff --git a/revengai/__init__.py b/revengai/__init__.py index 365d702..3b4753e 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v2.13.0" +__version__ = "v2.14.1" # Define package exports __all__ = [ diff --git a/revengai/api_client.py b/revengai/api_client.py index 2965fd0..3bd416c 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/v2.13.0/python' + self.user_agent = 'OpenAPI-Generator/v2.14.1/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 85e04e2..6f7bf11 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: v2.13.0\n"\ - "SDK Package Version: v2.13.0".\ + "Version of the API: v2.14.1\n"\ + "SDK Package Version: v2.14.1".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/revengai/models/analysis_function_matching_request.py b/revengai/models/analysis_function_matching_request.py index 486ee06..e7dfaa9 100644 --- a/revengai/models/analysis_function_matching_request.py +++ b/revengai/models/analysis_function_matching_request.py @@ -32,8 +32,9 @@ class AnalysisFunctionMatchingRequest(BaseModel): results_per_function: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=1, description="Maximum number of matches to return per function, default is 1, max is 10") page: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Page number for paginated results, default is 1 (first page)") page_size: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = Field(default=0, description="Number of functions to return per page, default is 0 (all functions), max is 1000") + status_only: Optional[StrictBool] = Field(default=False, description="If set to true, only returns the status of the matching operation without the actual results") no_cache: Optional[StrictBool] = Field(default=False, description="If set to true, forces the system to bypass any cached results and perform a fresh computation") - __properties: ClassVar[List[str]] = ["min_similarity", "filters", "results_per_function", "page", "page_size", "no_cache"] + __properties: ClassVar[List[str]] = ["min_similarity", "filters", "results_per_function", "page", "page_size", "status_only", "no_cache"] model_config = ConfigDict( populate_by_name=True, @@ -99,6 +100,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "results_per_function": obj.get("results_per_function") if obj.get("results_per_function") is not None else 1, "page": obj.get("page") if obj.get("page") is not None else 1, "page_size": obj.get("page_size") if obj.get("page_size") is not None else 0, + "status_only": obj.get("status_only") if obj.get("status_only") is not None else False, "no_cache": obj.get("no_cache") if obj.get("no_cache") is not None else False }) return _obj diff --git a/revengai/models/auto_unstrip_request.py b/revengai/models/auto_unstrip_request.py index 375ebeb..68e5754 100644 --- a/revengai/models/auto_unstrip_request.py +++ b/revengai/models/auto_unstrip_request.py @@ -30,8 +30,9 @@ class AutoUnstripRequest(BaseModel): apply: Optional[StrictBool] = Field(default=False, description="Whether to apply the matched function names to the target binary, default is False") confidence_threshold: Optional[Union[Annotated[float, Field(le=100.0, strict=True, ge=0.0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=90.0, description="Confidence threshold for applying function names as a percentage, default is 90") 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") + status_only: Optional[StrictBool] = Field(default=False, description="If set to true, only returns the status of the auto-unstrip operation without the actual results") no_cache: Optional[StrictBool] = Field(default=False, description="If set to true, forces the system to bypass any cached results and perform a fresh computation") - __properties: ClassVar[List[str]] = ["min_similarity", "apply", "confidence_threshold", "min_group_size", "no_cache"] + __properties: ClassVar[List[str]] = ["min_similarity", "apply", "confidence_threshold", "min_group_size", "status_only", "no_cache"] model_config = ConfigDict( populate_by_name=True, @@ -88,6 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "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 90.0, "min_group_size": obj.get("min_group_size") if obj.get("min_group_size") is not None else 10, + "status_only": obj.get("status_only") if obj.get("status_only") is not None else False, "no_cache": obj.get("no_cache") if obj.get("no_cache") is not None else False }) return _obj diff --git a/revengai/models/function_matching_batch_response.py b/revengai/models/function_matching_batch_response.py index 95ee9b2..de8c5f2 100644 --- a/revengai/models/function_matching_batch_response.py +++ b/revengai/models/function_matching_batch_response.py @@ -32,7 +32,7 @@ class FunctionMatchingBatchResponse(BaseModel): error_message: Optional[StrictStr] = None current_page: Optional[StrictInt] = None total_pages: Optional[StrictInt] = None - matches: List[FunctionMatchingResultWithBestMatch] + matches: Optional[List[FunctionMatchingResultWithBestMatch]] = None __properties: ClassVar[List[str]] = ["progress", "status", "total_time", "error_message", "current_page", "total_pages", "matches"] model_config = ConfigDict( @@ -106,6 +106,11 @@ def to_dict(self) -> Dict[str, Any]: if self.total_pages is None and "total_pages" in self.model_fields_set: _dict['total_pages'] = None + # set to None if matches (nullable) is None + # and model_fields_set contains the field + if self.matches is None and "matches" in self.model_fields_set: + _dict['matches'] = None + return _dict @classmethod diff --git a/revengai/models/function_matching_request.py b/revengai/models/function_matching_request.py index 66678a4..f5d9d03 100644 --- a/revengai/models/function_matching_request.py +++ b/revengai/models/function_matching_request.py @@ -34,8 +34,9 @@ class FunctionMatchingRequest(BaseModel): results_per_function: Optional[Annotated[int, Field(le=50, strict=True, ge=1)]] = Field(default=1, description="Maximum number of matches to return per function, default is 1, max is 50") page: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Page number for paginated results, default is 1 (first page)") page_size: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = Field(default=0, description="Number of functions to return per page, default is 0 (all functions), max is 1000") + status_only: Optional[StrictBool] = Field(default=False, description="If set to true, only returns the status of the matching operation without the actual results") no_cache: Optional[StrictBool] = Field(default=False, description="If set to true, forces the system to bypass any cached results and perform a fresh computation") - __properties: ClassVar[List[str]] = ["model_id", "function_ids", "min_similarity", "filters", "results_per_function", "page", "page_size", "no_cache"] + __properties: ClassVar[List[str]] = ["model_id", "function_ids", "min_similarity", "filters", "results_per_function", "page", "page_size", "status_only", "no_cache"] model_config = ConfigDict( populate_by_name=True, @@ -103,6 +104,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "results_per_function": obj.get("results_per_function") if obj.get("results_per_function") is not None else 1, "page": obj.get("page") if obj.get("page") is not None else 1, "page_size": obj.get("page_size") if obj.get("page_size") is not None else 0, + "status_only": obj.get("status_only") if obj.get("status_only") is not None else False, "no_cache": obj.get("no_cache") if obj.get("no_cache") is not None else False }) return _obj diff --git a/test/test_analysis_function_matching_request.py b/test/test_analysis_function_matching_request.py index 93ca8fd..02a5bc1 100644 --- a/test/test_analysis_function_matching_request.py +++ b/test/test_analysis_function_matching_request.py @@ -51,6 +51,7 @@ def make_instance(self, include_optional) -> AnalysisFunctionMatchingRequest: results_per_function = 1.0, page = 1.0, page_size = 0.0, + status_only = True, no_cache = True ) else: diff --git a/test/test_auto_unstrip_request.py b/test/test_auto_unstrip_request.py index c23ab97..f221093 100644 --- a/test/test_auto_unstrip_request.py +++ b/test/test_auto_unstrip_request.py @@ -38,6 +38,7 @@ def make_instance(self, include_optional) -> AutoUnstripRequest: apply = True, confidence_threshold = 0.0, min_group_size = 1.0, + status_only = True, no_cache = True ) else: diff --git a/test/test_function_matching_batch_response.py b/test/test_function_matching_batch_response.py index d738658..cd44770 100644 --- a/test/test_function_matching_batch_response.py +++ b/test/test_function_matching_batch_response.py @@ -66,29 +66,6 @@ def make_instance(self, include_optional) -> FunctionMatchingBatchResponse: ) else: return FunctionMatchingBatchResponse( - matches = [ - revengai.models.function_matching_result_with_best_match.FunctionMatchingResultWithBestMatch( - function_id = 56, - matched_functions = [ - revengai.models.matched_function.MatchedFunction( - function_id = 56, - binary_id = 56, - function_name = '', - function_vaddr = 56, - mangled_name = '', - debug = True, - binary_name = '', - sha_256_hash = '', - analysis_id = 56, - similarity = 1.337, - confidence = 1.337, ) - ], - confidences = [ - revengai.models.name_confidence.NameConfidence( - name = '', - confidence = 0.0, ) - ], ) - ], ) """ diff --git a/test/test_function_matching_request.py b/test/test_function_matching_request.py index 9809054..d785e14 100644 --- a/test/test_function_matching_request.py +++ b/test/test_function_matching_request.py @@ -55,6 +55,7 @@ def make_instance(self, include_optional) -> FunctionMatchingRequest: results_per_function = 1.0, page = 1.0, page_size = 0.0, + status_only = True, no_cache = True ) else: