revengai 1.85.0__py3-none-any.whl → 1.88.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of revengai might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: revengai
3
- Version: 1.85.0
3
+ Version: 1.88.0
4
4
  Summary: RevEng.AI API
5
5
  Project-URL: Repository, https://github.com/RevEngAI/revengai-python
6
6
  Keywords: RevEng.AI API
@@ -59,6 +59,7 @@ Class | Method | HTTP request | Description
59
59
  *AnalysesCommentsApi* | [**delete_analysis_comment**](docs/AnalysesCommentsApi.md#delete_analysis_comment) | **DELETE** /v2/analyses/{analysis_id}/comments/{comment_id} | Delete a comment
60
60
  *AnalysesCommentsApi* | [**get_analysis_comments**](docs/AnalysesCommentsApi.md#get_analysis_comments) | **GET** /v2/analyses/{analysis_id}/comments | Get comments for this analysis
61
61
  *AnalysesCommentsApi* | [**update_analysis_comment**](docs/AnalysesCommentsApi.md#update_analysis_comment) | **PATCH** /v2/analyses/{analysis_id}/comments/{comment_id} | Update a comment
62
+ *AnalysesCoreApi* | [**batch_symbol_ann**](docs/AnalysesCoreApi.md#batch_symbol_ann) | **POST** /v1/ann/symbol/batch | Batch Symbol ANN using function IDs
62
63
  *AnalysesCoreApi* | [**create_analysis**](docs/AnalysesCoreApi.md#create_analysis) | **POST** /v2/analyses | Create Analysis
63
64
  *AnalysesCoreApi* | [**delete_analysis**](docs/AnalysesCoreApi.md#delete_analysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis
64
65
  *AnalysesCoreApi* | [**find_similar_functions_batch**](docs/AnalysesCoreApi.md#find_similar_functions_batch) | **POST** /v2/analyses/{analysis_id}/similarity/functions | Batch Symbol ANN using Analysis ID
@@ -135,7 +136,9 @@ Class | Method | HTTP request | Description
135
136
  *FunctionsBlockCommentsApi* | [**generate_block_comments_for_function**](docs/FunctionsBlockCommentsApi.md#generate_block_comments_for_function) | **POST** /v2/functions/{function_id}/block-comments | Generate block comments for a function
136
137
  *FunctionsBlockCommentsApi* | [**generate_overview_comment_for_function**](docs/FunctionsBlockCommentsApi.md#generate_overview_comment_for_function) | **POST** /v2/functions/{function_id}/block-comments/overview | Generate overview comment for a function
137
138
  *FunctionsCoreApi* | [**ai_unstrip**](docs/FunctionsCoreApi.md#ai_unstrip) | **POST** /v2/analyses/{analysis_id}/functions/ai-unstrip | Performs matching and auto-unstrip for an analysis and its functions
139
+ *FunctionsCoreApi* | [**analysis_function_matching**](docs/FunctionsCoreApi.md#analysis_function_matching) | **POST** /v2/analyses/{analysis_id}/functions/matches | Perform matching for the functions of an analysis
138
140
  *FunctionsCoreApi* | [**auto_unstrip**](docs/FunctionsCoreApi.md#auto_unstrip) | **POST** /v2/analyses/{analysis_id}/functions/auto-unstrip | Performs matching and auto-unstrip for an analysis and its functions
141
+ *FunctionsCoreApi* | [**batch_function_matching**](docs/FunctionsCoreApi.md#batch_function_matching) | **POST** /v2/functions/matches | Perform function matching for an arbitrary batch of functions, binaries or collections
139
142
  *FunctionsCoreApi* | [**cancel_ai_unstrip**](docs/FunctionsCoreApi.md#cancel_ai_unstrip) | **DELETE** /v2/analyses/{analysis_id}/functions/ai-unstrip/cancel | Cancels a running ai-unstrip
140
143
  *FunctionsCoreApi* | [**cancel_auto_unstrip**](docs/FunctionsCoreApi.md#cancel_auto_unstrip) | **DELETE** /v2/analyses/{analysis_id}/functions/unstrip/cancel | Cancels a running auto-unstrip
141
144
  *FunctionsCoreApi* | [**get_analysis_strings**](docs/FunctionsCoreApi.md#get_analysis_strings) | **GET** /v2/analyses/{analysis_id}/functions/strings | Get string information found in the Analysis
@@ -169,7 +172,6 @@ Class | Method | HTTP request | Description
169
172
  *SearchApi* | [**search_collections**](docs/SearchApi.md#search_collections) | **GET** /v2/search/collections | Collections search
170
173
  *SearchApi* | [**search_functions**](docs/SearchApi.md#search_functions) | **GET** /v2/search/functions | Functions search
171
174
  *SearchApi* | [**search_tags**](docs/SearchApi.md#search_tags) | **GET** /v2/search/tags | Tags search
172
- *V1Api* | [**batch_symbol_ann**](docs/V1Api.md#batch_symbol_ann) | **POST** /v1/ann/symbol/batch | Batch Symbol ANN using function IDs
173
175
 
174
176
 
175
177
  ## Documentation For Models
@@ -183,6 +185,7 @@ Class | Method | HTTP request | Description
183
185
  - [AnalysisCreateResponse](docs/AnalysisCreateResponse.md)
184
186
  - [AnalysisDetailResponse](docs/AnalysisDetailResponse.md)
185
187
  - [AnalysisFunctionMapping](docs/AnalysisFunctionMapping.md)
188
+ - [AnalysisFunctionMatchingRequest](docs/AnalysisFunctionMatchingRequest.md)
186
189
  - [AnalysisFunctions](docs/AnalysisFunctions.md)
187
190
  - [AnalysisRecord](docs/AnalysisRecord.md)
188
191
  - [AnalysisScope](docs/AnalysisScope.md)
@@ -369,6 +372,10 @@ Class | Method | HTTP request | Description
369
372
  - [FunctionLocalVariableResponse](docs/FunctionLocalVariableResponse.md)
370
373
  - [FunctionMapping](docs/FunctionMapping.md)
371
374
  - [FunctionMappingFull](docs/FunctionMappingFull.md)
375
+ - [FunctionMatchingBatchRequest](docs/FunctionMatchingBatchRequest.md)
376
+ - [FunctionMatchingBatchResponse](docs/FunctionMatchingBatchResponse.md)
377
+ - [FunctionMatchingResultWithBestMatch](docs/FunctionMatchingResultWithBestMatch.md)
378
+ - [FunctionMatchingScopeRequest](docs/FunctionMatchingScopeRequest.md)
372
379
  - [FunctionNameConfidenceBody](docs/FunctionNameConfidenceBody.md)
373
380
  - [FunctionNameHistory](docs/FunctionNameHistory.md)
374
381
  - [FunctionNameInput](docs/FunctionNameInput.md)
@@ -403,6 +410,7 @@ Class | Method | HTTP request | Description
403
410
  - [LoginRequest](docs/LoginRequest.md)
404
411
  - [LoginResponse](docs/LoginResponse.md)
405
412
  - [Logs](docs/Logs.md)
413
+ - [MatchedFunction](docs/MatchedFunction.md)
406
414
  - [MatchedFunctionSuggestion](docs/MatchedFunctionSuggestion.md)
407
415
  - [MetaModel](docs/MetaModel.md)
408
416
  - [ModelName](docs/ModelName.md)
@@ -1,13 +1,13 @@
1
- revengai/__init__.py,sha256=PC0qsp-xovTuno-1xEpQ6fLMIL60yi1UwtkTWWif48w,43237
2
- revengai/api_client.py,sha256=J1pGmZsFtjoBi2WM8W_6w6xIFGN_Z1qu9xpi-gphLKY,27670
1
+ revengai/__init__.py,sha256=_KhODX4mC5rGW-lY85afxaagC8E-taZYD4orDETrfL0,44111
2
+ revengai/api_client.py,sha256=JXp94hTVTMK3l1O7kmVfjyBrmfDyBCQwFLxZySvAQ0c,27670
3
3
  revengai/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
4
- revengai/configuration.py,sha256=4PS822_qFlTBXp4bt-Ck3O0cZaXPdSSOOc2kLCLlkcA,18749
4
+ revengai/configuration.py,sha256=Wq_tH7EvqS6l71GKCmmxrsP1WuqcNe_tpAr1sHJ3PJ0,18749
5
5
  revengai/exceptions.py,sha256=IvdI9ZIZ9b2lSSKtIKMQDlG-5UPAedrjm3U4xfmGkso,6385
6
6
  revengai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  revengai/rest.py,sha256=T6Q2dcazhntqm288H33BKC1hf8NVdvmQWgaymlJo158,9376
8
- revengai/api/__init__.py,sha256=ouKXi3c7Z-a9BtW-WbThk2Tspt6o5rnyLY65DWGiTf0,1434
8
+ revengai/api/__init__.py,sha256=KS_1v_pNTcR2cIzEuwGEFq0f_-HmC6aGSgb1qaq2k90,1396
9
9
  revengai/api/analyses_comments_api.py,sha256=L6NuM8bS3NJRt1b3WKdnZlYVE0YgdcZivNwGuQe5Gb4,49575
10
- revengai/api/analyses_core_api.py,sha256=RZsIrHfm0skMUEYHKiUea7vLYVBbd1G7ghuzMTnppKE,185121
10
+ revengai/api/analyses_core_api.py,sha256=NepmPQlWZ2YnBpAPHoK0rXjvsgw6lWjghaJWd8v-Sk0,197484
11
11
  revengai/api/analyses_dynamic_execution_api.py,sha256=4vNnupRsuwNVNk7cPa-VFx2nnLtrokJpHu4YUOPwX_o,77682
12
12
  revengai/api/analyses_results_metadata_api.py,sha256=NlwPugWgnvFLcth_p4DRk8kwBk76offi7y9zxHL5mxk,90181
13
13
  revengai/api/analyses_security_checks_api.py,sha256=b1phfsLDO2kvmLaYtGjMVUkHUhRp63EEN3aJvTyX16o,35691
@@ -19,15 +19,14 @@ revengai/api/external_sources_api.py,sha256=JMyVAoivo6AsgeNekXnSk5BZh02APn9bzojo
19
19
  revengai/api/firmware_api.py,sha256=IPkGAJ-gxmuNcz2sUM6ip-9N2DZujqLJWwhiLvUQBOA,24150
20
20
  revengai/api/functions_ai_decompilation_api.py,sha256=ecFO-ENq9W7EoikKueY3McecKAw2fz44ZchYw6QJ29c,109824
21
21
  revengai/api/functions_block_comments_api.py,sha256=SilDkZYrrJ2_6j-Hh-ZNTUZKp1G9XE9aUwVbDzev5Co,35480
22
- revengai/api/functions_core_api.py,sha256=c-_C24moDb5Eh2TCUEuVd5AkWGwweyt4Ufcliy23yRw,137529
22
+ revengai/api/functions_core_api.py,sha256=bLfWVWEv37WlYBGiwIVwVRMhflTDRIZPS2TYrA72Sl0,162885
23
23
  revengai/api/functions_data_types_api.py,sha256=Fzu4oI6kTwSE820_cGjr09N_G3uGOa4DUiyPFwOqvx4,73869
24
24
  revengai/api/functions_decompilation_api.py,sha256=nEvYHPFoonmKSAf_t4_voC3SfoDd-O9sisSfA-5hiJo,83262
25
25
  revengai/api/functions_renaming_history_api.py,sha256=L2CDadLnZrA0oNxhJfTSLLiMDz0Z4583Q8zLEj-Ze2I,47441
26
26
  revengai/api/functions_threat_score_api.py,sha256=RYbCaX71r2ssv7VxUrcezT8dSdU5K5ipHD6yR592k6I,23867
27
27
  revengai/api/models_api.py,sha256=bqukeUMctErkaX5mH8Rm3iPKEHQOCx-JT-P8_KV_iP8,11319
28
28
  revengai/api/search_api.py,sha256=Kzo7KfP4nY1-YsoCHxVOQm3Vn89kFjcnUV7oNdaw5z0,65835
29
- revengai/api/v1_api.py,sha256=YblSm_5lTCdcW_Gtsx9HOVBNRRYv0XBDf25YbHo3-GE,13671
30
- revengai/models/__init__.py,sha256=A40qaEs21K8MhzEhH-IEdR3ZnKRzpJkN9_yj-pYnH7I,23238
29
+ revengai/models/__init__.py,sha256=as1xTAygTAl78qz6MuhGayFHGeQNwL_kd0c4caiK4M0,23768
31
30
  revengai/models/addr.py,sha256=-2N-UQsOiZ0eyEAQ7ssk0of8W2fBrXeYdTZXuVt3SZs,4787
32
31
  revengai/models/ai_decompilation_rating.py,sha256=gyay27QJwToUNtK9NARyw731Sg8GFRTufGGUABVYyfo,722
33
32
  revengai/models/ai_unstrip_request.py,sha256=loSXNdHATJmY5yttiUCE-lLEOkuE63qVDTz8U0eCAIc,2596
@@ -37,6 +36,7 @@ revengai/models/analysis_create_request.py,sha256=6hU94Fi47hrxXQ-wX1jRuDrDi1GQym
37
36
  revengai/models/analysis_create_response.py,sha256=aaO3-lJ65iBGe5lnyW8exHb9qByDaWfF2hOVKrWkN-I,2628
38
37
  revengai/models/analysis_detail_response.py,sha256=KPyzlSbu9TU7itVlhGusJVSszrZAkuC8dMg1welYZeM,4170
39
38
  revengai/models/analysis_function_mapping.py,sha256=_8LOSaBOgsFKLeqvoizbU2FSHtekA7aNrM7deIJyM4k,2886
39
+ revengai/models/analysis_function_matching_request.py,sha256=75L4lftAF3V82OEF7_PrJPGFMF2zrnPnxFmbM78CvS8,2797
40
40
  revengai/models/analysis_functions.py,sha256=N1TKQuw33I9dw-i07kLus36k2bcAXQVm2oc1Ycfrgdw,3067
41
41
  revengai/models/analysis_record.py,sha256=DxnERhF-s5AilH804yKtMAOyXhhjWQsq0ned1ji5t5Q,5516
42
42
  revengai/models/analysis_scope.py,sha256=azpsUux2axe4QKwQ4FbW30HbazYYVFP-e68F9zp33-4,668
@@ -223,6 +223,10 @@ revengai/models/function_info_output.py,sha256=iIxkZ6_KFSoz0NhbBXyNi7knPvWcIp-hm
223
223
  revengai/models/function_local_variable_response.py,sha256=llv5alvfVXqxE3Cs6vt7qnQNyfwj4PBoxq_Sim65jic,2733
224
224
  revengai/models/function_mapping.py,sha256=X4fa-lcMfO-40eVMtSTUPRpJlxdSZNEdzPTEOR0uAlg,2924
225
225
  revengai/models/function_mapping_full.py,sha256=dax345vnk25zSPVVpAmCFrrOWXzFXW6OnhSs9zVIKpI,11948
226
+ revengai/models/function_matching_batch_request.py,sha256=5weNPPU3rmXbZtBJZaQT8_Rh16vskWTI9xBOAw9g3pI,3041
227
+ revengai/models/function_matching_batch_response.py,sha256=VT-WIbiOfLl2HPbRUTyKC8a5l6D1XLgNsJQfgiaW1_I,4270
228
+ revengai/models/function_matching_result_with_best_match.py,sha256=F-XmQjBoM1imsTMoNOsI40vqOHG_XG-Xeg1Nxw-Fbjk,3466
229
+ revengai/models/function_matching_scope_request.py,sha256=_ggfcz8fYyEkNUmqgpJRMFTVWzuhiFPBhmiTcs1cTdQ,4132
226
230
  revengai/models/function_name_confidence_body.py,sha256=Dz8HvTUDn5YcyCie-KMXmOdy8yF8PD-m0XzwpRyyQmg,3415
227
231
  revengai/models/function_name_history.py,sha256=INu3KWYUpQMFfWy6oWl5iSaxrlayKr-wvuiahRCzinI,3265
228
232
  revengai/models/function_name_input.py,sha256=zKzb0qAJBZKadixsWnRfkTnFHdNGtS2i13QgSeHr4c0,2538
@@ -257,6 +261,7 @@ revengai/models/list_collection_results.py,sha256=ZYGFTvOQfI234u67tURX8J0jwb6q-A
257
261
  revengai/models/login_request.py,sha256=48uYtkWFL_Q-hN64P1f15ExGJvbab9XLymBtDduQvg0,2684
258
262
  revengai/models/login_response.py,sha256=O35cqntoQ68IdYCBtHTYhPXlDqw8CIlnK-bNjf6QMO0,2461
259
263
  revengai/models/logs.py,sha256=cV_V-xN6q-yTd7eL-X89ugqz5ifWPsFPo6qYFgpS_Pw,2419
264
+ revengai/models/matched_function.py,sha256=PaGTuFUlpR_jLL8JZGA4Raa-wGtcoeGuyyIwB4EYX5w,3802
260
265
  revengai/models/matched_function_suggestion.py,sha256=eNMKuAyJ94joT5It020lSujrporie50-ii_OCOk3KhY,2900
261
266
  revengai/models/meta_model.py,sha256=GbyFJZ9kwvK1Gqg8QnJ1GHpaMs8cMht6j-MY1k0YSt0,2943
262
267
  revengai/models/model_name.py,sha256=lVKok5pWyLcN1rhq1IYccC7uQQrPdyz1oohYRUMRrmw,1271
@@ -334,6 +339,6 @@ revengai/models/vulnerabilities.py,sha256=9t6uoZd3svWyfcZJjmj6zP731Dp47Apb25y8Qt
334
339
  revengai/models/vulnerability.py,sha256=P7rAOAYU5JLLpcRr824-YJgZba5kPb_J9ALV3tSNfLQ,3688
335
340
  revengai/models/vulnerability_type.py,sha256=SyOgfMmELYYc_H84oPkikBpjwngtG5Qw9Q_86a2TPr8,866
336
341
  revengai/models/workspace.py,sha256=chjU62GFvByEmaNd6luMNQVQLP3wlPx1zJgGJ_yyMLA,676
337
- revengai-1.85.0.dist-info/METADATA,sha256=aujkpswxjk1tP3LIN_hl8nfV9jahsm1GVbjDA-fUL9E,41550
338
- revengai-1.85.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
339
- revengai-1.85.0.dist-info/RECORD,,
342
+ revengai-1.88.0.dist-info/METADATA,sha256=IdwVmgEkns5jwaxUnI5tXms4nSXKRAFYpq0knLiL1C8,42436
343
+ revengai-1.88.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
344
+ revengai-1.88.0.dist-info/RECORD,,
revengai/api/v1_api.py DELETED
@@ -1,334 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- RevEng.AI API
5
-
6
- RevEng.AI is Similarity Search Engine for executable binaries
7
-
8
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
-
10
- Do not edit the class manually.
11
- """ # noqa: E501
12
-
13
- import warnings
14
- from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
- from typing import Any, Dict, List, Optional, Tuple, Union
16
- from typing_extensions import Annotated
17
-
18
- from pydantic import Field, StrictStr
19
- from typing import Optional
20
- from typing_extensions import Annotated
21
- from revengai.models.app_api_rest_v1_ann_schema_ann_function import AppApiRestV1AnnSchemaANNFunction
22
- from revengai.models.function_batch_ann import FunctionBatchAnn
23
-
24
- from revengai.api_client import ApiClient, RequestSerialized
25
- from revengai.api_response import ApiResponse
26
- from revengai.rest import RESTResponseType
27
-
28
-
29
- class V1Api:
30
- """NOTE: This class is auto generated by OpenAPI Generator
31
- Ref: https://openapi-generator.tech
32
-
33
- Do not edit the class manually.
34
- """
35
-
36
- def __init__(self, api_client=None) -> None:
37
- if api_client is None:
38
- api_client = ApiClient.get_default()
39
- self.api_client = api_client
40
-
41
-
42
- @validate_call
43
- def batch_symbol_ann(
44
- self,
45
- app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction,
46
- authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
47
- _request_timeout: Union[
48
- None,
49
- Annotated[StrictFloat, Field(gt=0)],
50
- Tuple[
51
- Annotated[StrictFloat, Field(gt=0)],
52
- Annotated[StrictFloat, Field(gt=0)]
53
- ]
54
- ] = None,
55
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
56
- _content_type: Optional[StrictStr] = None,
57
- _headers: Optional[Dict[StrictStr, Any]] = None,
58
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
59
- ) -> FunctionBatchAnn:
60
- """(Deprecated) Batch Symbol ANN using function IDs
61
-
62
- Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the database
63
-
64
- :param app_api_rest_v1_ann_schema_ann_function: (required)
65
- :type app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction
66
- :param authorization: API Key bearer token
67
- :type authorization: str
68
- :param _request_timeout: timeout setting for this request. If one
69
- number provided, it will be total request
70
- timeout. It can also be a pair (tuple) of
71
- (connection, read) timeouts.
72
- :type _request_timeout: int, tuple(int, int), optional
73
- :param _request_auth: set to override the auth_settings for an a single
74
- request; this effectively ignores the
75
- authentication in the spec for a single request.
76
- :type _request_auth: dict, optional
77
- :param _content_type: force content-type for the request.
78
- :type _content_type: str, Optional
79
- :param _headers: set to override the headers for a single
80
- request; this effectively ignores the headers
81
- in the spec for a single request.
82
- :type _headers: dict, optional
83
- :param _host_index: set to override the host_index for a single
84
- request; this effectively ignores the host_index
85
- in the spec for a single request.
86
- :type _host_index: int, optional
87
- :return: Returns the result object.
88
- """ # noqa: E501
89
- warnings.warn("POST /v1/ann/symbol/batch is deprecated.", DeprecationWarning)
90
-
91
- _param = self._batch_symbol_ann_serialize(
92
- app_api_rest_v1_ann_schema_ann_function=app_api_rest_v1_ann_schema_ann_function,
93
- authorization=authorization,
94
- _request_auth=_request_auth,
95
- _content_type=_content_type,
96
- _headers=_headers,
97
- _host_index=_host_index
98
- )
99
-
100
- _response_types_map: Dict[str, Optional[str]] = {
101
- '200': "FunctionBatchAnn",
102
- '422': "BaseResponse",
103
- }
104
- response_data = self.api_client.call_api(
105
- *_param,
106
- _request_timeout=_request_timeout
107
- )
108
- response_data.read()
109
- return self.api_client.response_deserialize(
110
- response_data=response_data,
111
- response_types_map=_response_types_map,
112
- ).data
113
-
114
-
115
- @validate_call
116
- def batch_symbol_ann_with_http_info(
117
- self,
118
- app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction,
119
- authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
120
- _request_timeout: Union[
121
- None,
122
- Annotated[StrictFloat, Field(gt=0)],
123
- Tuple[
124
- Annotated[StrictFloat, Field(gt=0)],
125
- Annotated[StrictFloat, Field(gt=0)]
126
- ]
127
- ] = None,
128
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
129
- _content_type: Optional[StrictStr] = None,
130
- _headers: Optional[Dict[StrictStr, Any]] = None,
131
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
132
- ) -> ApiResponse[FunctionBatchAnn]:
133
- """(Deprecated) Batch Symbol ANN using function IDs
134
-
135
- Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the database
136
-
137
- :param app_api_rest_v1_ann_schema_ann_function: (required)
138
- :type app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction
139
- :param authorization: API Key bearer token
140
- :type authorization: str
141
- :param _request_timeout: timeout setting for this request. If one
142
- number provided, it will be total request
143
- timeout. It can also be a pair (tuple) of
144
- (connection, read) timeouts.
145
- :type _request_timeout: int, tuple(int, int), optional
146
- :param _request_auth: set to override the auth_settings for an a single
147
- request; this effectively ignores the
148
- authentication in the spec for a single request.
149
- :type _request_auth: dict, optional
150
- :param _content_type: force content-type for the request.
151
- :type _content_type: str, Optional
152
- :param _headers: set to override the headers for a single
153
- request; this effectively ignores the headers
154
- in the spec for a single request.
155
- :type _headers: dict, optional
156
- :param _host_index: set to override the host_index for a single
157
- request; this effectively ignores the host_index
158
- in the spec for a single request.
159
- :type _host_index: int, optional
160
- :return: Returns the result object.
161
- """ # noqa: E501
162
- warnings.warn("POST /v1/ann/symbol/batch is deprecated.", DeprecationWarning)
163
-
164
- _param = self._batch_symbol_ann_serialize(
165
- app_api_rest_v1_ann_schema_ann_function=app_api_rest_v1_ann_schema_ann_function,
166
- authorization=authorization,
167
- _request_auth=_request_auth,
168
- _content_type=_content_type,
169
- _headers=_headers,
170
- _host_index=_host_index
171
- )
172
-
173
- _response_types_map: Dict[str, Optional[str]] = {
174
- '200': "FunctionBatchAnn",
175
- '422': "BaseResponse",
176
- }
177
- response_data = self.api_client.call_api(
178
- *_param,
179
- _request_timeout=_request_timeout
180
- )
181
- response_data.read()
182
- return self.api_client.response_deserialize(
183
- response_data=response_data,
184
- response_types_map=_response_types_map,
185
- )
186
-
187
-
188
- @validate_call
189
- def batch_symbol_ann_without_preload_content(
190
- self,
191
- app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction,
192
- authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
193
- _request_timeout: Union[
194
- None,
195
- Annotated[StrictFloat, Field(gt=0)],
196
- Tuple[
197
- Annotated[StrictFloat, Field(gt=0)],
198
- Annotated[StrictFloat, Field(gt=0)]
199
- ]
200
- ] = None,
201
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
202
- _content_type: Optional[StrictStr] = None,
203
- _headers: Optional[Dict[StrictStr, Any]] = None,
204
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
205
- ) -> RESTResponseType:
206
- """(Deprecated) Batch Symbol ANN using function IDs
207
-
208
- Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the database
209
-
210
- :param app_api_rest_v1_ann_schema_ann_function: (required)
211
- :type app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction
212
- :param authorization: API Key bearer token
213
- :type authorization: str
214
- :param _request_timeout: timeout setting for this request. If one
215
- number provided, it will be total request
216
- timeout. It can also be a pair (tuple) of
217
- (connection, read) timeouts.
218
- :type _request_timeout: int, tuple(int, int), optional
219
- :param _request_auth: set to override the auth_settings for an a single
220
- request; this effectively ignores the
221
- authentication in the spec for a single request.
222
- :type _request_auth: dict, optional
223
- :param _content_type: force content-type for the request.
224
- :type _content_type: str, Optional
225
- :param _headers: set to override the headers for a single
226
- request; this effectively ignores the headers
227
- in the spec for a single request.
228
- :type _headers: dict, optional
229
- :param _host_index: set to override the host_index for a single
230
- request; this effectively ignores the host_index
231
- in the spec for a single request.
232
- :type _host_index: int, optional
233
- :return: Returns the result object.
234
- """ # noqa: E501
235
- warnings.warn("POST /v1/ann/symbol/batch is deprecated.", DeprecationWarning)
236
-
237
- _param = self._batch_symbol_ann_serialize(
238
- app_api_rest_v1_ann_schema_ann_function=app_api_rest_v1_ann_schema_ann_function,
239
- authorization=authorization,
240
- _request_auth=_request_auth,
241
- _content_type=_content_type,
242
- _headers=_headers,
243
- _host_index=_host_index
244
- )
245
-
246
- _response_types_map: Dict[str, Optional[str]] = {
247
- '200': "FunctionBatchAnn",
248
- '422': "BaseResponse",
249
- }
250
- response_data = self.api_client.call_api(
251
- *_param,
252
- _request_timeout=_request_timeout
253
- )
254
- return response_data.response
255
-
256
-
257
- def _batch_symbol_ann_serialize(
258
- self,
259
- app_api_rest_v1_ann_schema_ann_function,
260
- authorization,
261
- _request_auth,
262
- _content_type,
263
- _headers,
264
- _host_index,
265
- ) -> RequestSerialized:
266
-
267
- _host = None
268
-
269
- _collection_formats: Dict[str, str] = {
270
- }
271
-
272
- _path_params: Dict[str, str] = {}
273
- _query_params: List[Tuple[str, str]] = []
274
- _header_params: Dict[str, Optional[str]] = _headers or {}
275
- _form_params: List[Tuple[str, str]] = []
276
- _files: Dict[
277
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
278
- ] = {}
279
- _body_params: Optional[bytes] = None
280
-
281
- # process the path parameters
282
- # process the query parameters
283
- # process the header parameters
284
- if authorization is not None:
285
- _header_params['authorization'] = authorization
286
- # process the form parameters
287
- # process the body parameter
288
- if app_api_rest_v1_ann_schema_ann_function is not None:
289
- _body_params = app_api_rest_v1_ann_schema_ann_function
290
-
291
-
292
- # set the HTTP header `Accept`
293
- if 'Accept' not in _header_params:
294
- _header_params['Accept'] = self.api_client.select_header_accept(
295
- [
296
- 'application/json'
297
- ]
298
- )
299
-
300
- # set the HTTP header `Content-Type`
301
- if _content_type:
302
- _header_params['Content-Type'] = _content_type
303
- else:
304
- _default_content_type = (
305
- self.api_client.select_header_content_type(
306
- [
307
- 'application/json'
308
- ]
309
- )
310
- )
311
- if _default_content_type is not None:
312
- _header_params['Content-Type'] = _default_content_type
313
-
314
- # authentication setting
315
- _auth_settings: List[str] = [
316
- 'APIKey'
317
- ]
318
-
319
- return self.api_client.param_serialize(
320
- method='POST',
321
- resource_path='/v1/ann/symbol/batch',
322
- path_params=_path_params,
323
- query_params=_query_params,
324
- header_params=_header_params,
325
- body=_body_params,
326
- post_params=_form_params,
327
- files=_files,
328
- auth_settings=_auth_settings,
329
- collection_formats=_collection_formats,
330
- _host=_host,
331
- _request_auth=_request_auth
332
- )
333
-
334
-