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.118.9
v3.123.0
2 changes: 2 additions & 0 deletions docs/AnalysisFunctionEntry.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ Name | Type | Description | Notes
**function_size** | **int** | |
**function_vaddr** | **int** | |
**mangled_name** | **str** | | [optional]
**source_analysis_id** | **int** | ID of the analysis the source function belongs to, if any | [optional]
**source_binary_id** | **int** | | [optional]
**source_function_id** | **int** | ID of the source function this name was transferred from, if any | [optional]
**source_type** | **str** | |

## Example
Expand Down
2 changes: 0 additions & 2 deletions docs/AppApiRestV2CollectionsEnumsOrderBy.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

* `COLLECTION` (value: `'collection'`)

* `MODEL` (value: `'model'`)

* `OWNER` (value: `'owner'`)

* `COLLECTION_SIZE` (value: `'collection_size'`)
Expand Down
1 change: 0 additions & 1 deletion docs/CollectionCreateRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Name | Type | Description | Notes
**collection_scope** | [**CollectionScope**](CollectionScope.md) | | [optional]
**tags** | **List[str]** | | [optional]
**binaries** | **List[int]** | | [optional]
**model_id** | **int** | |

## Example

Expand Down
1 change: 0 additions & 1 deletion docs/CollectionListItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Name | Type | Description | Notes
**collection_size** | **int** | The size of the collection |
**collection_id** | **int** | The ID of the collection |
**creation** | **datetime** | The datetime of when the collection was created |
**model_name** | **str** | The model being used for the collection |
**team_id** | **int** | | [optional]

## Example
Expand Down
2 changes: 1 addition & 1 deletion docs/CollectionListItemBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Name | Type | Description | Notes
**collection_tags** | **List[str]** | |
**creation** | **datetime** | |
**description** | **str** | |
**model_name** | **str** | |
**official_collection** | **bool** | |
**team_id** | **int** | |
**updated_at** | **datetime** | |

## Example

Expand Down
1 change: 0 additions & 1 deletion docs/CollectionResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Name | Type | Description | Notes
**collection_id** | **int** | Collection ID |
**collection_name** | **str** | Collection name |
**description** | **str** | Collection description |
**model_id** | **int** | Collection model ID |
**user_id** | **int** | Collection user ID |
**team_id** | **int** | | [optional]
**collection_scope** | [**CollectionScope**](CollectionScope.md) | Collection public status |
Expand Down
2 changes: 0 additions & 2 deletions docs/CollectionSearchResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ Name | Type | Description | Notes
**scope** | **str** | The scope of the collection |
**last_updated_at** | **datetime** | The last update date of the collection |
**created_at** | **datetime** | The creation date of the collection |
**model_id** | **int** | The model ID of the binary |
**model_name** | **str** | The name of the model |
**owned_by** | **str** | The owner of the collection |
**tags** | **List[str]** | | [optional]
**size** | **int** | | [optional]
Expand Down
1 change: 0 additions & 1 deletion docs/CreateCollectionInputBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Name | Type | Description | Notes
**collection_name** | **str** | Collection name. |
**collection_scope** | **str** | Visibility scope. | [default to 'PRIVATE']
**description** | **str** | Collection description. |
**model_id** | **int** | Model ID the collection is associated with. |
**tags** | **List[str]** | Optional tags to attach to the collection. | [optional]

## Example
Expand Down
1 change: 0 additions & 1 deletion docs/CreateCollectionOutputBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Name | Type | Description | Notes
**collection_scope** | **str** | |
**created_at** | **datetime** | |
**description** | **str** | |
**model_id** | **int** | |
**tags** | **List[str]** | | [optional]
**team_id** | **int** | |
**updated_at** | **datetime** | |
Expand Down
1 change: 0 additions & 1 deletion docs/GetCollectionOutputBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Name | Type | Description | Notes
**created_at** | **datetime** | |
**description** | **str** | |
**has_next_page** | **bool** | | [optional]
**model_id** | **int** | |
**page_number** | **int** | | [optional]
**page_size** | **int** | | [optional]
**tags** | **List[str]** | | [optional]
Expand Down
2 changes: 2 additions & 0 deletions docs/HistoryEntry.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Name | Type | Description | Notes
**history_id** | **int** | History record ID |
**is_debug** | **bool** | Whether the function had debug info |
**mangled_name** | **str** | Mangled function name | [optional]
**source_analysis_id** | **int** | ID of the analysis the source function belongs to, if any | [optional]
**source_function_id** | **int** | ID of the source function this name was transferred from, if any | [optional]
**source_type** | **str** | Source of the rename (USER, SYSTEM, AI_UNSTRIP, etc.) |

## Example
Expand Down
3 changes: 3 additions & 0 deletions docs/MatchFilters.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arch** | **str** | Restrict matches to this architecture (multi-platform models only; matches all architectures if omitted). Rejected for single-architecture models. | [optional]
**binary_ids** | **List[int]** | Restrict the candidate pool to these binary IDs. | [optional]
**bits** | **int** | Restrict matches to this word size (multi-platform models only). Rejected for single-architecture models. | [optional]
**collection_ids** | **List[int]** | Restrict the candidate pool to binaries in these collection IDs. | [optional]
**debug_types** | **List[str]** | Restrict matches to candidates with these debug source types. Accepted: SYSTEM, USER. | [optional]
**function_ids** | **List[int]** | Restrict the candidate pool to these function IDs. | [optional]
**platform** | **str** | Restrict matches to this platform (multi-platform models only; matches all platforms if omitted). Rejected for single-architecture models. | [optional]
**user_ids** | **List[int]** | Restrict the candidate pool to functions owned by these user IDs. | [optional]

## Example
Expand Down
1 change: 0 additions & 1 deletion docs/PatchCollectionOutputBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Name | Type | Description | Notes
**collection_scope** | **str** | |
**created_at** | **datetime** | |
**description** | **str** | |
**model_id** | **int** | |
**team_id** | **int** | |
**updated_at** | **datetime** | |
**user_id** | **int** | |
Expand Down
9 changes: 3 additions & 6 deletions docs/SearchApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **search_collections**
> BaseResponseCollectionSearchResponse search_collections(page=page, page_size=page_size, partial_collection_name=partial_collection_name, partial_binary_name=partial_binary_name, partial_binary_sha256=partial_binary_sha256, tags=tags, model_name=model_name, filters=filters, order_by=order_by, order_by_direction=order_by_direction)
> BaseResponseCollectionSearchResponse search_collections(page=page, page_size=page_size, partial_collection_name=partial_collection_name, partial_binary_name=partial_binary_name, partial_binary_sha256=partial_binary_sha256, tags=tags, filters=filters, order_by=order_by, order_by_direction=order_by_direction)

Collections search

Expand Down Expand Up @@ -163,14 +163,13 @@ with revengai.ApiClient(configuration) as api_client:
partial_binary_name = 'partial_binary_name_example' # str | The partial or full name of the binary belonging to the collection (optional)
partial_binary_sha256 = 'partial_binary_sha256_example' # str | The partial or full sha256 of the binary belonging to the collection (optional)
tags = ['tags_example'] # List[str] | The tags to be searched for (optional)
model_name = 'model_name_example' # str | The name of the model used to analyze the binary the function belongs to (optional)
filters = [revengai.Filters()] # List[Filters] | The filters to be used for the search (optional)
order_by = revengai.AppApiRestV2CollectionsEnumsOrderBy() # AppApiRestV2CollectionsEnumsOrderBy | The field to sort the order by in the results (optional)
order_by_direction = revengai.Order() # Order | The order direction in which to return results (optional)

try:
# Collections search
api_response = api_instance.search_collections(page=page, page_size=page_size, partial_collection_name=partial_collection_name, partial_binary_name=partial_binary_name, partial_binary_sha256=partial_binary_sha256, tags=tags, model_name=model_name, filters=filters, order_by=order_by, order_by_direction=order_by_direction)
api_response = api_instance.search_collections(page=page, page_size=page_size, partial_collection_name=partial_collection_name, partial_binary_name=partial_binary_name, partial_binary_sha256=partial_binary_sha256, tags=tags, filters=filters, order_by=order_by, order_by_direction=order_by_direction)
print("The response of SearchApi->search_collections:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -190,7 +189,6 @@ Name | Type | Description | Notes
**partial_binary_name** | **str**| The partial or full name of the binary belonging to the collection | [optional]
**partial_binary_sha256** | **str**| The partial or full sha256 of the binary belonging to the collection | [optional]
**tags** | [**List[str]**](str.md)| The tags to be searched for | [optional]
**model_name** | **str**| The name of the model used to analyze the binary the function belongs to | [optional]
**filters** | [**List[Filters]**](Filters.md)| The filters to be used for the search | [optional]
**order_by** | [**AppApiRestV2CollectionsEnumsOrderBy**](.md)| The field to sort the order by in the results | [optional]
**order_by_direction** | [**Order**](.md)| The order direction in which to return results | [optional]
Expand All @@ -213,8 +211,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**422** | You must provide at least one of the filters; partial_collection_name, partial_binary_name, partial_binary_sha256, tags or model_name to search | - |
**404** | The model name provided does not exist | - |
**422** | You must provide at least one of the filters; partial_collection_name, partial_binary_name, partial_binary_sha256 or tags to search | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

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.118.9"
__version__ = "v3.123.0"

# Define package exports
__all__ = [
Expand Down
20 changes: 0 additions & 20 deletions revengai/api/search_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ def search_collections(
partial_binary_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the binary belonging to the collection")] = None,
partial_binary_sha256: Annotated[Optional[StrictStr], Field(description="The partial or full sha256 of the binary belonging to the collection")] = None,
tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None,
model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None,
order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None,
order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None,
Expand Down Expand Up @@ -473,8 +472,6 @@ def search_collections(
:type partial_binary_sha256: str
:param tags: The tags to be searched for
:type tags: List[str]
:param model_name: The name of the model used to analyze the binary the function belongs to
:type model_name: str
:param filters: The filters to be used for the search
:type filters: List[Filters]
:param order_by: The field to sort the order by in the results
Expand Down Expand Up @@ -510,7 +507,6 @@ def search_collections(
partial_binary_name=partial_binary_name,
partial_binary_sha256=partial_binary_sha256,
tags=tags,
model_name=model_name,
filters=filters,
order_by=order_by,
order_by_direction=order_by_direction,
Expand All @@ -523,7 +519,6 @@ def search_collections(
_response_types_map: Dict[str, Optional[str]] = {
'200': "BaseResponseCollectionSearchResponse",
'422': "BaseResponse",
'404': "BaseResponse",
}
response_data = self.api_client.call_api(
*_param,
Expand All @@ -545,7 +540,6 @@ def search_collections_with_http_info(
partial_binary_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the binary belonging to the collection")] = None,
partial_binary_sha256: Annotated[Optional[StrictStr], Field(description="The partial or full sha256 of the binary belonging to the collection")] = None,
tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None,
model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None,
order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None,
order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None,
Expand Down Expand Up @@ -578,8 +572,6 @@ def search_collections_with_http_info(
:type partial_binary_sha256: str
:param tags: The tags to be searched for
:type tags: List[str]
:param model_name: The name of the model used to analyze the binary the function belongs to
:type model_name: str
:param filters: The filters to be used for the search
:type filters: List[Filters]
:param order_by: The field to sort the order by in the results
Expand Down Expand Up @@ -615,7 +607,6 @@ def search_collections_with_http_info(
partial_binary_name=partial_binary_name,
partial_binary_sha256=partial_binary_sha256,
tags=tags,
model_name=model_name,
filters=filters,
order_by=order_by,
order_by_direction=order_by_direction,
Expand All @@ -628,7 +619,6 @@ def search_collections_with_http_info(
_response_types_map: Dict[str, Optional[str]] = {
'200': "BaseResponseCollectionSearchResponse",
'422': "BaseResponse",
'404': "BaseResponse",
}
response_data = self.api_client.call_api(
*_param,
Expand All @@ -650,7 +640,6 @@ def search_collections_without_preload_content(
partial_binary_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the binary belonging to the collection")] = None,
partial_binary_sha256: Annotated[Optional[StrictStr], Field(description="The partial or full sha256 of the binary belonging to the collection")] = None,
tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None,
model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None,
order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None,
order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None,
Expand Down Expand Up @@ -683,8 +672,6 @@ def search_collections_without_preload_content(
:type partial_binary_sha256: str
:param tags: The tags to be searched for
:type tags: List[str]
:param model_name: The name of the model used to analyze the binary the function belongs to
:type model_name: str
:param filters: The filters to be used for the search
:type filters: List[Filters]
:param order_by: The field to sort the order by in the results
Expand Down Expand Up @@ -720,7 +707,6 @@ def search_collections_without_preload_content(
partial_binary_name=partial_binary_name,
partial_binary_sha256=partial_binary_sha256,
tags=tags,
model_name=model_name,
filters=filters,
order_by=order_by,
order_by_direction=order_by_direction,
Expand All @@ -733,7 +719,6 @@ def search_collections_without_preload_content(
_response_types_map: Dict[str, Optional[str]] = {
'200': "BaseResponseCollectionSearchResponse",
'422': "BaseResponse",
'404': "BaseResponse",
}
response_data = self.api_client.call_api(
*_param,
Expand All @@ -750,7 +735,6 @@ def _search_collections_serialize(
partial_binary_name,
partial_binary_sha256,
tags,
model_name,
filters,
order_by,
order_by_direction,
Expand Down Expand Up @@ -802,10 +786,6 @@ def _search_collections_serialize(

_query_params.append(('tags', tags))

if model_name is not None:

_query_params.append(('model_name', model_name))

if filters is not None:

_query_params.append(('filters', filters))
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.118.9/python'
self.user_agent = 'OpenAPI-Generator/v3.123.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.118.9\n"\
"SDK Package Version: v3.118.9".\
"Version of the API: v3.123.0\n"\
"SDK Package Version: v3.123.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
8 changes: 6 additions & 2 deletions revengai/models/analysis_function_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, StrictBool, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
Expand All @@ -32,10 +32,12 @@ class AnalysisFunctionEntry(BaseModel):
function_size: StrictInt
function_vaddr: StrictInt
mangled_name: Optional[StrictStr] = None
source_analysis_id: Optional[StrictInt] = Field(default=None, description="ID of the analysis the source function belongs to, if any")
source_binary_id: Optional[StrictInt] = None
source_function_id: Optional[StrictInt] = Field(default=None, description="ID of the source function this name was transferred from, if any")
source_type: StrictStr
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["binary_id", "debug", "function_id", "function_name", "function_size", "function_vaddr", "mangled_name", "source_binary_id", "source_type"]
__properties: ClassVar[List[str]] = ["binary_id", "debug", "function_id", "function_name", "function_size", "function_vaddr", "mangled_name", "source_analysis_id", "source_binary_id", "source_function_id", "source_type"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -107,7 +109,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"function_size": obj.get("function_size"),
"function_vaddr": obj.get("function_vaddr"),
"mangled_name": obj.get("mangled_name"),
"source_analysis_id": obj.get("source_analysis_id"),
"source_binary_id": obj.get("source_binary_id"),
"source_function_id": obj.get("source_function_id"),
"source_type": obj.get("source_type")
})
# store additional fields in additional_properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class AppApiRestV2CollectionsEnumsOrderBy(str, Enum):
"""
CREATED = 'created'
COLLECTION = 'collection'
MODEL = 'model'
OWNER = 'owner'
COLLECTION_SIZE = 'collection_size'
UPDATED = 'updated'
Expand Down
Loading