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 @@
v3.101.0
v3.102.0
2 changes: 1 addition & 1 deletion docs/AnalysisBasicInfoOutputBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Name | Type | Description | Notes
**binary_id** | **int** | Binary ID |
**binary_name** | **str** | Binary filename |
**binary_size** | **int** | Binary size in bytes |
**binary_uuid** | **str** | UUID of the binary, omitted when not set | [optional]
**binary_uuid** | **str** | UUID of the binary, omitted when not set |
**creation** | **datetime** | When the binary was uploaded |
**debug** | **bool** | True when the binary was analysed with debug symbols |
**function_count** | **int** | Number of functions in the binary |
Expand Down
1 change: 1 addition & 0 deletions docs/DataTypesEntry.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data_types** | [**FunctionInfo**](FunctionInfo.md) | | [optional]
**data_types_version** | **int** | Current version of the function data types. Pass this back on the next write to satisfy the CAS check. |
**function_id** | **int** | |

## Example
Expand Down
1 change: 1 addition & 0 deletions docs/FunctionDetailsOutputBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**analysis_id** | **int** | |
**binary_id** | **int** | |
**creation** | **datetime** | |
**debug** | **bool** | |
Expand Down
1 change: 1 addition & 0 deletions docs/StartMatchingForFunctionsInputBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**function_ids** | **List[int]** | Source function IDs to match against the rest of the corpus. |
**min_similarity** | **float** | Similarity floor as a percentage. Defaults to 90. | [optional]
**results_per_function** | **int** | Max matches returned per source function. Defaults to 1. | [optional]
**use_canonical_names** | **bool** | Collapse near-duplicate candidate names into canonical buckets and return per-name confidences (the response 'confidences' array). Adds a canonicalisation step; defaults to false. | [optional]

## Example

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__ = "v3.101.0"
__version__ = "v3.102.0"

# Define package exports
__all__ = [
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/v3.101.0/python'
self.user_agent = 'OpenAPI-Generator/v3.102.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 @@ -541,8 +541,8 @@ def to_debug_report(self) -> str:
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v3.101.0\n"\
"SDK Package Version: v3.101.0".\
"Version of the API: v3.102.0\n"\
"SDK Package Version: v3.102.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
2 changes: 1 addition & 1 deletion revengai/models/analysis_basic_info_output_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class AnalysisBasicInfoOutputBody(BaseModel):
binary_id: StrictInt = Field(description="Binary ID")
binary_name: StrictStr = Field(description="Binary filename")
binary_size: StrictInt = Field(description="Binary size in bytes")
binary_uuid: Optional[StrictStr] = Field(default=None, description="UUID of the binary, omitted when not set")
binary_uuid: StrictStr = Field(description="UUID of the binary, omitted when not set")
creation: datetime = Field(description="When the binary was uploaded")
debug: StrictBool = Field(description="True when the binary was analysed with debug symbols")
function_count: StrictInt = Field(description="Number of functions in the binary")
Expand Down
6 changes: 4 additions & 2 deletions revengai/models/data_types_entry.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, StrictInt
from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from revengai.models.function_info import FunctionInfo
from typing import Optional, Set
Expand All @@ -27,9 +27,10 @@ class DataTypesEntry(BaseModel):
DataTypesEntry
""" # noqa: E501
data_types: Optional[FunctionInfo] = None
data_types_version: StrictInt = Field(description="Current version of the function data types. Pass this back on the next write to satisfy the CAS check.")
function_id: StrictInt
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["data_types", "function_id"]
__properties: ClassVar[List[str]] = ["data_types", "data_types_version", "function_id"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -93,6 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate({
"data_types": FunctionInfo.from_dict(obj["data_types"]) if obj.get("data_types") is not None else None,
"data_types_version": obj.get("data_types_version"),
"function_id": obj.get("function_id")
})
# store additional fields in additional_properties
Expand Down
4 changes: 3 additions & 1 deletion revengai/models/function_details_output_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class FunctionDetailsOutputBody(BaseModel):
"""
FunctionDetailsOutputBody
""" # noqa: E501
analysis_id: StrictInt
binary_id: StrictInt
creation: datetime
debug: StrictBool
Expand All @@ -36,7 +37,7 @@ class FunctionDetailsOutputBody(BaseModel):
mangled_name: Optional[StrictStr] = None
source_function_id: Optional[StrictInt] = None
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["binary_id", "creation", "debug", "function_id", "function_name", "function_size", "function_vaddr", "mangled_name", "source_function_id"]
__properties: ClassVar[List[str]] = ["analysis_id", "binary_id", "creation", "debug", "function_id", "function_name", "function_size", "function_vaddr", "mangled_name", "source_function_id"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -96,6 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)

_obj = cls.model_validate({
"analysis_id": obj.get("analysis_id"),
"binary_id": obj.get("binary_id"),
"creation": obj.get("creation"),
"debug": obj.get("debug"),
Expand Down
8 changes: 5 additions & 3 deletions revengai/models/start_matching_for_functions_input_body.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, StrictInt
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing_extensions import Annotated
from revengai.models.match_filters import MatchFilters
Expand All @@ -31,8 +31,9 @@ class StartMatchingForFunctionsInputBody(BaseModel):
function_ids: Optional[Annotated[List[StrictInt], Field(min_length=1)]] = Field(description="Source function IDs to match against the rest of the corpus.")
min_similarity: Optional[Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=None, description="Similarity floor as a percentage. Defaults to 90.")
results_per_function: Optional[Annotated[int, Field(le=30, strict=True, ge=1)]] = Field(default=None, description="Max matches returned per source function. Defaults to 1.")
use_canonical_names: Optional[StrictBool] = Field(default=None, description="Collapse near-duplicate candidate names into canonical buckets and return per-name confidences (the response 'confidences' array). Adds a canonicalisation step; defaults to false.")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["filters", "function_ids", "min_similarity", "results_per_function"]
__properties: ClassVar[List[str]] = ["filters", "function_ids", "min_similarity", "results_per_function", "use_canonical_names"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -103,7 +104,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"filters": MatchFilters.from_dict(obj["filters"]) if obj.get("filters") is not None else None,
"function_ids": obj.get("function_ids"),
"min_similarity": obj.get("min_similarity"),
"results_per_function": obj.get("results_per_function")
"results_per_function": obj.get("results_per_function"),
"use_canonical_names": obj.get("use_canonical_names")
})
# store additional fields in additional_properties
for _key in obj.keys():
Expand Down