crypticorn 2.15.0__py3-none-any.whl → 2.17.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.
- crypticorn/__init__.py +2 -2
- crypticorn/auth/client/api/admin_api.py +397 -13
- crypticorn/auth/client/api/auth_api.py +3610 -341
- crypticorn/auth/client/api/service_api.py +249 -7
- crypticorn/auth/client/api/user_api.py +2295 -179
- crypticorn/auth/client/api/wallet_api.py +1468 -81
- crypticorn/auth/client/configuration.py +2 -2
- crypticorn/auth/client/models/create_api_key_request.py +2 -1
- crypticorn/auth/client/models/get_api_keys200_response_inner.py +2 -1
- crypticorn/auth/client/rest.py +23 -4
- crypticorn/auth/main.py +8 -5
- crypticorn/cli/init.py +1 -1
- crypticorn/cli/templates/.env.docker.temp +3 -0
- crypticorn/cli/templates/.env.example.temp +4 -0
- crypticorn/cli/templates/Dockerfile +5 -2
- crypticorn/client.py +226 -59
- crypticorn/common/__init__.py +1 -0
- crypticorn/common/auth.py +45 -14
- crypticorn/common/decorators.py +1 -2
- crypticorn/common/enums.py +0 -2
- crypticorn/common/errors.py +10 -0
- crypticorn/common/metrics.py +30 -0
- crypticorn/common/middleware.py +94 -1
- crypticorn/common/pagination.py +252 -18
- crypticorn/common/router/admin_router.py +2 -2
- crypticorn/common/router/status_router.py +40 -2
- crypticorn/common/scopes.py +2 -0
- crypticorn/common/warnings.py +8 -0
- crypticorn/dex/__init__.py +6 -0
- crypticorn/dex/client/__init__.py +49 -0
- crypticorn/dex/client/api/__init__.py +6 -0
- crypticorn/dex/client/api/admin_api.py +2986 -0
- crypticorn/dex/client/api/signals_api.py +1798 -0
- crypticorn/dex/client/api/status_api.py +892 -0
- crypticorn/dex/client/api_client.py +758 -0
- crypticorn/dex/client/api_response.py +20 -0
- crypticorn/dex/client/configuration.py +620 -0
- crypticorn/dex/client/exceptions.py +220 -0
- crypticorn/dex/client/models/__init__.py +30 -0
- crypticorn/dex/client/models/api_error_identifier.py +121 -0
- crypticorn/dex/client/models/api_error_level.py +37 -0
- crypticorn/dex/client/models/api_error_type.py +37 -0
- crypticorn/dex/client/models/exception_detail.py +117 -0
- crypticorn/dex/client/models/log_level.py +38 -0
- crypticorn/dex/client/models/paginated_response_signal_with_token.py +134 -0
- crypticorn/dex/client/models/risk.py +86 -0
- crypticorn/dex/client/models/signal_overview_stats.py +158 -0
- crypticorn/dex/client/models/signal_volume.py +84 -0
- crypticorn/dex/client/models/signal_with_token.py +163 -0
- crypticorn/dex/client/models/token_data.py +127 -0
- crypticorn/dex/client/models/token_detail.py +116 -0
- crypticorn/dex/client/py.typed +0 -0
- crypticorn/dex/client/rest.py +217 -0
- crypticorn/dex/main.py +1 -0
- crypticorn/hive/client/api/admin_api.py +1173 -47
- crypticorn/hive/client/api/data_api.py +499 -17
- crypticorn/hive/client/api/models_api.py +1595 -87
- crypticorn/hive/client/api/status_api.py +397 -16
- crypticorn/hive/client/api_client.py +0 -5
- crypticorn/hive/client/models/api_error_identifier.py +1 -1
- crypticorn/hive/client/models/coin_info.py +1 -1
- crypticorn/hive/client/models/exception_detail.py +1 -1
- crypticorn/hive/client/models/target_info.py +1 -1
- crypticorn/hive/client/rest.py +23 -4
- crypticorn/hive/main.py +99 -25
- crypticorn/hive/utils.py +2 -2
- crypticorn/klines/client/api/admin_api.py +1173 -47
- crypticorn/klines/client/api/change_in_timeframe_api.py +269 -11
- crypticorn/klines/client/api/funding_rates_api.py +315 -11
- crypticorn/klines/client/api/ohlcv_data_api.py +390 -11
- crypticorn/klines/client/api/status_api.py +397 -16
- crypticorn/klines/client/api/symbols_api.py +216 -11
- crypticorn/klines/client/api/udf_api.py +1268 -51
- crypticorn/klines/client/api_client.py +0 -5
- crypticorn/klines/client/models/api_error_identifier.py +3 -1
- crypticorn/klines/client/models/exception_detail.py +1 -1
- crypticorn/klines/client/models/ohlcv.py +1 -1
- crypticorn/klines/client/models/symbol_group.py +1 -1
- crypticorn/klines/client/models/udf_config.py +1 -1
- crypticorn/klines/client/rest.py +23 -4
- crypticorn/klines/main.py +89 -12
- crypticorn/metrics/client/api/admin_api.py +1173 -47
- crypticorn/metrics/client/api/exchanges_api.py +1370 -145
- crypticorn/metrics/client/api/indicators_api.py +622 -17
- crypticorn/metrics/client/api/logs_api.py +296 -11
- crypticorn/metrics/client/api/marketcap_api.py +1207 -67
- crypticorn/metrics/client/api/markets_api.py +343 -11
- crypticorn/metrics/client/api/quote_currencies_api.py +228 -11
- crypticorn/metrics/client/api/status_api.py +397 -16
- crypticorn/metrics/client/api/tokens_api.py +382 -15
- crypticorn/metrics/client/api_client.py +0 -5
- crypticorn/metrics/client/configuration.py +4 -2
- crypticorn/metrics/client/models/exception_detail.py +1 -1
- crypticorn/metrics/client/models/exchange_mapping.py +1 -1
- crypticorn/metrics/client/models/marketcap_ranking.py +1 -1
- crypticorn/metrics/client/models/marketcap_symbol_ranking.py +1 -1
- crypticorn/metrics/client/models/ohlcv.py +1 -1
- crypticorn/metrics/client/rest.py +23 -4
- crypticorn/metrics/main.py +113 -19
- crypticorn/pay/client/api/admin_api.py +1585 -57
- crypticorn/pay/client/api/now_payments_api.py +961 -39
- crypticorn/pay/client/api/payments_api.py +562 -17
- crypticorn/pay/client/api/products_api.py +880 -30
- crypticorn/pay/client/api/status_api.py +397 -16
- crypticorn/pay/client/api_client.py +0 -5
- crypticorn/pay/client/configuration.py +2 -2
- crypticorn/pay/client/models/api_error_identifier.py +7 -7
- crypticorn/pay/client/models/exception_detail.py +1 -1
- crypticorn/pay/client/models/now_create_invoice_req.py +1 -1
- crypticorn/pay/client/models/now_create_invoice_res.py +1 -1
- crypticorn/pay/client/models/product.py +1 -1
- crypticorn/pay/client/models/product_create.py +1 -1
- crypticorn/pay/client/models/product_update.py +1 -1
- crypticorn/pay/client/models/scope.py +1 -0
- crypticorn/pay/client/rest.py +23 -4
- crypticorn/pay/main.py +10 -6
- crypticorn/trade/client/__init__.py +11 -1
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/admin_api.py +1184 -55
- crypticorn/trade/client/api/api_keys_api.py +1678 -162
- crypticorn/trade/client/api/bots_api.py +7563 -187
- crypticorn/trade/client/api/exchanges_api.py +565 -19
- crypticorn/trade/client/api/notifications_api.py +1290 -116
- crypticorn/trade/client/api/orders_api.py +393 -55
- crypticorn/trade/client/api/status_api.py +397 -13
- crypticorn/trade/client/api/strategies_api.py +1133 -77
- crypticorn/trade/client/api/trading_actions_api.py +786 -65
- crypticorn/trade/client/models/__init__.py +11 -0
- crypticorn/trade/client/models/actions_count.py +88 -0
- crypticorn/trade/client/models/api_error_identifier.py +8 -7
- crypticorn/trade/client/models/bot.py +7 -18
- crypticorn/trade/client/models/bot_create.py +17 -1
- crypticorn/trade/client/models/bot_update.py +17 -1
- crypticorn/trade/client/models/exchange.py +6 -1
- crypticorn/trade/client/models/exchange_key.py +1 -1
- crypticorn/trade/client/models/exchange_key_balance.py +111 -0
- crypticorn/trade/client/models/exchange_key_create.py +17 -1
- crypticorn/trade/client/models/exchange_key_update.py +17 -1
- crypticorn/trade/client/models/execution_ids.py +1 -1
- crypticorn/trade/client/models/futures_balance.py +27 -25
- crypticorn/trade/client/models/futures_trading_action.py +6 -28
- crypticorn/trade/client/models/futures_trading_action_create.py +10 -13
- crypticorn/trade/client/models/notification.py +17 -1
- crypticorn/trade/client/models/notification_create.py +18 -2
- crypticorn/trade/client/models/notification_update.py +17 -1
- crypticorn/trade/client/models/order.py +2 -14
- crypticorn/trade/client/models/orders_count.py +88 -0
- crypticorn/trade/client/models/paginated_response_futures_trading_action.py +134 -0
- crypticorn/trade/client/models/paginated_response_order.py +134 -0
- crypticorn/trade/client/models/pn_l.py +95 -0
- crypticorn/trade/client/models/post_futures_action.py +1 -1
- crypticorn/trade/client/models/spot_balance.py +109 -0
- crypticorn/trade/client/models/spot_trading_action_create.py +4 -1
- crypticorn/trade/client/models/strategy.py +22 -4
- crypticorn/trade/client/models/strategy_create.py +23 -5
- crypticorn/trade/client/models/strategy_exchange_info.py +16 -4
- crypticorn/trade/client/models/strategy_update.py +19 -3
- crypticorn/trade/client/models/tpsl.py +4 -27
- crypticorn/trade/client/models/tpsl_create.py +6 -19
- crypticorn/trade/client/rest.py +23 -4
- crypticorn/trade/main.py +15 -12
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/METADATA +65 -20
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/RECORD +167 -132
- crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/WHEEL +0 -0
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/top_level.txt +0 -0
@@ -11,14 +11,10 @@ Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
Do not edit the class manually.
|
12
12
|
""" # noqa: E501
|
13
13
|
|
14
|
-
import warnings
|
15
14
|
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
16
15
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
16
|
from typing_extensions import Annotated
|
18
17
|
|
19
|
-
from pydantic import Field, StrictInt, StrictStr
|
20
|
-
from typing import Any, List, Optional
|
21
|
-
from typing_extensions import Annotated
|
22
18
|
from crypticorn.pay.client.models.product import Product
|
23
19
|
from crypticorn.pay.client.models.product_create import ProductCreate
|
24
20
|
from crypticorn.pay.client.models.product_update import ProductUpdate
|
@@ -27,6 +23,24 @@ from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
|
|
27
23
|
from crypticorn.pay.client.api_response import ApiResponse
|
28
24
|
from crypticorn.pay.client.rest import RESTResponseType
|
29
25
|
|
26
|
+
# Import async_to_sync for sync methods
|
27
|
+
try:
|
28
|
+
from asgiref.sync import async_to_sync
|
29
|
+
|
30
|
+
_HAS_ASGIREF = True
|
31
|
+
except ImportError:
|
32
|
+
_HAS_ASGIREF = False
|
33
|
+
|
34
|
+
def async_to_sync(async_func):
|
35
|
+
"""Fallback decorator that raises an error if asgiref is not available."""
|
36
|
+
|
37
|
+
def wrapper(*args, **kwargs):
|
38
|
+
raise ImportError(
|
39
|
+
"asgiref is required for sync methods. Install with: pip install asgiref"
|
40
|
+
)
|
41
|
+
|
42
|
+
return wrapper
|
43
|
+
|
30
44
|
|
31
45
|
class ProductsApi:
|
32
46
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
@@ -35,13 +49,126 @@ class ProductsApi:
|
|
35
49
|
Do not edit the class manually.
|
36
50
|
"""
|
37
51
|
|
38
|
-
def __init__(self, api_client=None) -> None:
|
52
|
+
def __init__(self, api_client=None, is_sync: bool = False) -> None:
|
39
53
|
if api_client is None:
|
40
54
|
api_client = ApiClient.get_default()
|
41
55
|
self.api_client = api_client
|
56
|
+
self.is_sync = is_sync
|
57
|
+
|
58
|
+
@validate_call
|
59
|
+
def create_product(
|
60
|
+
self,
|
61
|
+
product_create: ProductCreate,
|
62
|
+
_request_timeout: Union[
|
63
|
+
None,
|
64
|
+
Annotated[StrictFloat, Field(gt=0)],
|
65
|
+
Tuple[
|
66
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
67
|
+
],
|
68
|
+
] = None,
|
69
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
70
|
+
_content_type: Optional[StrictStr] = None,
|
71
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
72
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
73
|
+
) -> Product:
|
74
|
+
"""Create Product"""
|
75
|
+
if self.is_sync:
|
76
|
+
return self._create_product_sync(
|
77
|
+
product_create=product_create,
|
78
|
+
_request_timeout=_request_timeout,
|
79
|
+
_request_auth=_request_auth,
|
80
|
+
_content_type=_content_type,
|
81
|
+
_headers=_headers,
|
82
|
+
_host_index=_host_index,
|
83
|
+
)
|
84
|
+
|
85
|
+
else:
|
86
|
+
return self._create_product_async(
|
87
|
+
product_create=product_create,
|
88
|
+
_request_timeout=_request_timeout,
|
89
|
+
_request_auth=_request_auth,
|
90
|
+
_content_type=_content_type,
|
91
|
+
_headers=_headers,
|
92
|
+
_host_index=_host_index,
|
93
|
+
)
|
94
|
+
|
95
|
+
@validate_call
|
96
|
+
def create_product_with_http_info(
|
97
|
+
self,
|
98
|
+
product_create: ProductCreate,
|
99
|
+
_request_timeout: Union[
|
100
|
+
None,
|
101
|
+
Annotated[StrictFloat, Field(gt=0)],
|
102
|
+
Tuple[
|
103
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
104
|
+
],
|
105
|
+
] = None,
|
106
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
107
|
+
_content_type: Optional[StrictStr] = None,
|
108
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
109
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
110
|
+
) -> ApiResponse[Product]:
|
111
|
+
"""Create Product with HTTP info"""
|
112
|
+
if self.is_sync:
|
113
|
+
return self._create_product_sync_with_http_info(
|
114
|
+
product_create=product_create,
|
115
|
+
_request_timeout=_request_timeout,
|
116
|
+
_request_auth=_request_auth,
|
117
|
+
_content_type=_content_type,
|
118
|
+
_headers=_headers,
|
119
|
+
_host_index=_host_index,
|
120
|
+
)
|
121
|
+
|
122
|
+
else:
|
123
|
+
return self._create_product_async_with_http_info(
|
124
|
+
product_create=product_create,
|
125
|
+
_request_timeout=_request_timeout,
|
126
|
+
_request_auth=_request_auth,
|
127
|
+
_content_type=_content_type,
|
128
|
+
_headers=_headers,
|
129
|
+
_host_index=_host_index,
|
130
|
+
)
|
131
|
+
|
132
|
+
@validate_call
|
133
|
+
def create_product_without_preload_content(
|
134
|
+
self,
|
135
|
+
product_create: ProductCreate,
|
136
|
+
_request_timeout: Union[
|
137
|
+
None,
|
138
|
+
Annotated[StrictFloat, Field(gt=0)],
|
139
|
+
Tuple[
|
140
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
141
|
+
],
|
142
|
+
] = None,
|
143
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
144
|
+
_content_type: Optional[StrictStr] = None,
|
145
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
146
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
147
|
+
) -> RESTResponseType:
|
148
|
+
"""Create Product without preloading content"""
|
149
|
+
if self.is_sync:
|
150
|
+
return self._create_product_sync_without_preload_content(
|
151
|
+
product_create=product_create,
|
152
|
+
_request_timeout=_request_timeout,
|
153
|
+
_request_auth=_request_auth,
|
154
|
+
_content_type=_content_type,
|
155
|
+
_headers=_headers,
|
156
|
+
_host_index=_host_index,
|
157
|
+
)
|
42
158
|
|
159
|
+
else:
|
160
|
+
return self._create_product_async_without_preload_content(
|
161
|
+
product_create=product_create,
|
162
|
+
_request_timeout=_request_timeout,
|
163
|
+
_request_auth=_request_auth,
|
164
|
+
_content_type=_content_type,
|
165
|
+
_headers=_headers,
|
166
|
+
_host_index=_host_index,
|
167
|
+
)
|
168
|
+
|
169
|
+
# Private async implementation methods
|
43
170
|
@validate_call
|
44
|
-
async def
|
171
|
+
async def _create_product_async(
|
45
172
|
self,
|
46
173
|
product_create: ProductCreate,
|
47
174
|
_request_timeout: Union[
|
@@ -105,7 +232,7 @@ class ProductsApi:
|
|
105
232
|
).data
|
106
233
|
|
107
234
|
@validate_call
|
108
|
-
async def
|
235
|
+
async def _create_product_async_with_http_info(
|
109
236
|
self,
|
110
237
|
product_create: ProductCreate,
|
111
238
|
_request_timeout: Union[
|
@@ -164,12 +291,11 @@ class ProductsApi:
|
|
164
291
|
)
|
165
292
|
await response_data.read()
|
166
293
|
return self.api_client.response_deserialize(
|
167
|
-
response_data=response_data,
|
168
|
-
response_types_map=_response_types_map,
|
294
|
+
response_data=response_data, response_types_map=_response_types_map
|
169
295
|
)
|
170
296
|
|
171
297
|
@validate_call
|
172
|
-
async def
|
298
|
+
async def _create_product_async_without_preload_content(
|
173
299
|
self,
|
174
300
|
product_create: ProductCreate,
|
175
301
|
_request_timeout: Union[
|
@@ -226,7 +352,86 @@ class ProductsApi:
|
|
226
352
|
response_data = await self.api_client.call_api(
|
227
353
|
*_param, _request_timeout=_request_timeout
|
228
354
|
)
|
229
|
-
return response_data
|
355
|
+
return response_data
|
356
|
+
|
357
|
+
# Private sync implementation methods
|
358
|
+
@validate_call
|
359
|
+
def _create_product_sync(
|
360
|
+
self,
|
361
|
+
product_create: ProductCreate,
|
362
|
+
_request_timeout: Union[
|
363
|
+
None,
|
364
|
+
Annotated[StrictFloat, Field(gt=0)],
|
365
|
+
Tuple[
|
366
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
367
|
+
],
|
368
|
+
] = None,
|
369
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
370
|
+
_content_type: Optional[StrictStr] = None,
|
371
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
372
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
373
|
+
) -> Product:
|
374
|
+
"""Synchronous version of create_product"""
|
375
|
+
return async_to_sync(self._create_product_async)(
|
376
|
+
product_create=product_create,
|
377
|
+
_request_timeout=_request_timeout,
|
378
|
+
_request_auth=_request_auth,
|
379
|
+
_content_type=_content_type,
|
380
|
+
_headers=_headers,
|
381
|
+
_host_index=_host_index,
|
382
|
+
)
|
383
|
+
|
384
|
+
@validate_call
|
385
|
+
def _create_product_sync_with_http_info(
|
386
|
+
self,
|
387
|
+
product_create: ProductCreate,
|
388
|
+
_request_timeout: Union[
|
389
|
+
None,
|
390
|
+
Annotated[StrictFloat, Field(gt=0)],
|
391
|
+
Tuple[
|
392
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
393
|
+
],
|
394
|
+
] = None,
|
395
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
396
|
+
_content_type: Optional[StrictStr] = None,
|
397
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
398
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
399
|
+
) -> ApiResponse[Product]:
|
400
|
+
"""Synchronous version of create_product_with_http_info"""
|
401
|
+
return async_to_sync(self._create_product_async_with_http_info)(
|
402
|
+
product_create=product_create,
|
403
|
+
_request_timeout=_request_timeout,
|
404
|
+
_request_auth=_request_auth,
|
405
|
+
_content_type=_content_type,
|
406
|
+
_headers=_headers,
|
407
|
+
_host_index=_host_index,
|
408
|
+
)
|
409
|
+
|
410
|
+
@validate_call
|
411
|
+
def _create_product_sync_without_preload_content(
|
412
|
+
self,
|
413
|
+
product_create: ProductCreate,
|
414
|
+
_request_timeout: Union[
|
415
|
+
None,
|
416
|
+
Annotated[StrictFloat, Field(gt=0)],
|
417
|
+
Tuple[
|
418
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
419
|
+
],
|
420
|
+
] = None,
|
421
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
422
|
+
_content_type: Optional[StrictStr] = None,
|
423
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
424
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
425
|
+
) -> RESTResponseType:
|
426
|
+
"""Synchronous version of create_product_without_preload_content"""
|
427
|
+
return async_to_sync(self._create_product_async_without_preload_content)(
|
428
|
+
product_create=product_create,
|
429
|
+
_request_timeout=_request_timeout,
|
430
|
+
_request_auth=_request_auth,
|
431
|
+
_content_type=_content_type,
|
432
|
+
_headers=_headers,
|
433
|
+
_host_index=_host_index,
|
434
|
+
)
|
230
435
|
|
231
436
|
def _create_product_serialize(
|
232
437
|
self,
|
@@ -293,7 +498,110 @@ class ProductsApi:
|
|
293
498
|
)
|
294
499
|
|
295
500
|
@validate_call
|
296
|
-
|
501
|
+
def get_product_usage(
|
502
|
+
self,
|
503
|
+
_request_timeout: Union[
|
504
|
+
None,
|
505
|
+
Annotated[StrictFloat, Field(gt=0)],
|
506
|
+
Tuple[
|
507
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
508
|
+
],
|
509
|
+
] = None,
|
510
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
511
|
+
_content_type: Optional[StrictStr] = None,
|
512
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
513
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
514
|
+
) -> List[List[object]]:
|
515
|
+
"""Get Product Usage"""
|
516
|
+
if self.is_sync:
|
517
|
+
return self._get_product_usage_sync(
|
518
|
+
_request_timeout=_request_timeout,
|
519
|
+
_request_auth=_request_auth,
|
520
|
+
_content_type=_content_type,
|
521
|
+
_headers=_headers,
|
522
|
+
_host_index=_host_index,
|
523
|
+
)
|
524
|
+
|
525
|
+
else:
|
526
|
+
return self._get_product_usage_async(
|
527
|
+
_request_timeout=_request_timeout,
|
528
|
+
_request_auth=_request_auth,
|
529
|
+
_content_type=_content_type,
|
530
|
+
_headers=_headers,
|
531
|
+
_host_index=_host_index,
|
532
|
+
)
|
533
|
+
|
534
|
+
@validate_call
|
535
|
+
def get_product_usage_with_http_info(
|
536
|
+
self,
|
537
|
+
_request_timeout: Union[
|
538
|
+
None,
|
539
|
+
Annotated[StrictFloat, Field(gt=0)],
|
540
|
+
Tuple[
|
541
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
542
|
+
],
|
543
|
+
] = None,
|
544
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
545
|
+
_content_type: Optional[StrictStr] = None,
|
546
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
547
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
548
|
+
) -> ApiResponse[List[List[object]]]:
|
549
|
+
"""Get Product Usage with HTTP info"""
|
550
|
+
if self.is_sync:
|
551
|
+
return self._get_product_usage_sync_with_http_info(
|
552
|
+
_request_timeout=_request_timeout,
|
553
|
+
_request_auth=_request_auth,
|
554
|
+
_content_type=_content_type,
|
555
|
+
_headers=_headers,
|
556
|
+
_host_index=_host_index,
|
557
|
+
)
|
558
|
+
|
559
|
+
else:
|
560
|
+
return self._get_product_usage_async_with_http_info(
|
561
|
+
_request_timeout=_request_timeout,
|
562
|
+
_request_auth=_request_auth,
|
563
|
+
_content_type=_content_type,
|
564
|
+
_headers=_headers,
|
565
|
+
_host_index=_host_index,
|
566
|
+
)
|
567
|
+
|
568
|
+
@validate_call
|
569
|
+
def get_product_usage_without_preload_content(
|
570
|
+
self,
|
571
|
+
_request_timeout: Union[
|
572
|
+
None,
|
573
|
+
Annotated[StrictFloat, Field(gt=0)],
|
574
|
+
Tuple[
|
575
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
576
|
+
],
|
577
|
+
] = None,
|
578
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
579
|
+
_content_type: Optional[StrictStr] = None,
|
580
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
581
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
582
|
+
) -> RESTResponseType:
|
583
|
+
"""Get Product Usage without preloading content"""
|
584
|
+
if self.is_sync:
|
585
|
+
return self._get_product_usage_sync_without_preload_content(
|
586
|
+
_request_timeout=_request_timeout,
|
587
|
+
_request_auth=_request_auth,
|
588
|
+
_content_type=_content_type,
|
589
|
+
_headers=_headers,
|
590
|
+
_host_index=_host_index,
|
591
|
+
)
|
592
|
+
|
593
|
+
else:
|
594
|
+
return self._get_product_usage_async_without_preload_content(
|
595
|
+
_request_timeout=_request_timeout,
|
596
|
+
_request_auth=_request_auth,
|
597
|
+
_content_type=_content_type,
|
598
|
+
_headers=_headers,
|
599
|
+
_host_index=_host_index,
|
600
|
+
)
|
601
|
+
|
602
|
+
# Private async implementation methods
|
603
|
+
@validate_call
|
604
|
+
async def _get_product_usage_async(
|
297
605
|
self,
|
298
606
|
_request_timeout: Union[
|
299
607
|
None,
|
@@ -353,7 +661,7 @@ class ProductsApi:
|
|
353
661
|
).data
|
354
662
|
|
355
663
|
@validate_call
|
356
|
-
async def
|
664
|
+
async def _get_product_usage_async_with_http_info(
|
357
665
|
self,
|
358
666
|
_request_timeout: Union[
|
359
667
|
None,
|
@@ -408,12 +716,11 @@ class ProductsApi:
|
|
408
716
|
)
|
409
717
|
await response_data.read()
|
410
718
|
return self.api_client.response_deserialize(
|
411
|
-
response_data=response_data,
|
412
|
-
response_types_map=_response_types_map,
|
719
|
+
response_data=response_data, response_types_map=_response_types_map
|
413
720
|
)
|
414
721
|
|
415
722
|
@validate_call
|
416
|
-
async def
|
723
|
+
async def _get_product_usage_async_without_preload_content(
|
417
724
|
self,
|
418
725
|
_request_timeout: Union[
|
419
726
|
None,
|
@@ -466,7 +773,80 @@ class ProductsApi:
|
|
466
773
|
response_data = await self.api_client.call_api(
|
467
774
|
*_param, _request_timeout=_request_timeout
|
468
775
|
)
|
469
|
-
return response_data
|
776
|
+
return response_data
|
777
|
+
|
778
|
+
# Private sync implementation methods
|
779
|
+
@validate_call
|
780
|
+
def _get_product_usage_sync(
|
781
|
+
self,
|
782
|
+
_request_timeout: Union[
|
783
|
+
None,
|
784
|
+
Annotated[StrictFloat, Field(gt=0)],
|
785
|
+
Tuple[
|
786
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
787
|
+
],
|
788
|
+
] = None,
|
789
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
790
|
+
_content_type: Optional[StrictStr] = None,
|
791
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
792
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
793
|
+
) -> List[List[object]]:
|
794
|
+
"""Synchronous version of get_product_usage"""
|
795
|
+
return async_to_sync(self._get_product_usage_async)(
|
796
|
+
_request_timeout=_request_timeout,
|
797
|
+
_request_auth=_request_auth,
|
798
|
+
_content_type=_content_type,
|
799
|
+
_headers=_headers,
|
800
|
+
_host_index=_host_index,
|
801
|
+
)
|
802
|
+
|
803
|
+
@validate_call
|
804
|
+
def _get_product_usage_sync_with_http_info(
|
805
|
+
self,
|
806
|
+
_request_timeout: Union[
|
807
|
+
None,
|
808
|
+
Annotated[StrictFloat, Field(gt=0)],
|
809
|
+
Tuple[
|
810
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
811
|
+
],
|
812
|
+
] = None,
|
813
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
814
|
+
_content_type: Optional[StrictStr] = None,
|
815
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
816
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
817
|
+
) -> ApiResponse[List[List[object]]]:
|
818
|
+
"""Synchronous version of get_product_usage_with_http_info"""
|
819
|
+
return async_to_sync(self._get_product_usage_async_with_http_info)(
|
820
|
+
_request_timeout=_request_timeout,
|
821
|
+
_request_auth=_request_auth,
|
822
|
+
_content_type=_content_type,
|
823
|
+
_headers=_headers,
|
824
|
+
_host_index=_host_index,
|
825
|
+
)
|
826
|
+
|
827
|
+
@validate_call
|
828
|
+
def _get_product_usage_sync_without_preload_content(
|
829
|
+
self,
|
830
|
+
_request_timeout: Union[
|
831
|
+
None,
|
832
|
+
Annotated[StrictFloat, Field(gt=0)],
|
833
|
+
Tuple[
|
834
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
835
|
+
],
|
836
|
+
] = None,
|
837
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
838
|
+
_content_type: Optional[StrictStr] = None,
|
839
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
840
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
841
|
+
) -> RESTResponseType:
|
842
|
+
"""Synchronous version of get_product_usage_without_preload_content"""
|
843
|
+
return async_to_sync(self._get_product_usage_async_without_preload_content)(
|
844
|
+
_request_timeout=_request_timeout,
|
845
|
+
_request_auth=_request_auth,
|
846
|
+
_content_type=_content_type,
|
847
|
+
_headers=_headers,
|
848
|
+
_host_index=_host_index,
|
849
|
+
)
|
470
850
|
|
471
851
|
def _get_product_usage_serialize(
|
472
852
|
self,
|
@@ -520,7 +900,7 @@ class ProductsApi:
|
|
520
900
|
)
|
521
901
|
|
522
902
|
@validate_call
|
523
|
-
|
903
|
+
def get_products(
|
524
904
|
self,
|
525
905
|
limit: Annotated[
|
526
906
|
Optional[StrictInt],
|
@@ -546,7 +926,158 @@ class ProductsApi:
|
|
546
926
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
547
927
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
548
928
|
) -> List[Product]:
|
549
|
-
"""Get Products
|
929
|
+
"""Get Products"""
|
930
|
+
if self.is_sync:
|
931
|
+
return self._get_products_sync(
|
932
|
+
limit=limit,
|
933
|
+
offset=offset,
|
934
|
+
_request_timeout=_request_timeout,
|
935
|
+
_request_auth=_request_auth,
|
936
|
+
_content_type=_content_type,
|
937
|
+
_headers=_headers,
|
938
|
+
_host_index=_host_index,
|
939
|
+
)
|
940
|
+
|
941
|
+
else:
|
942
|
+
return self._get_products_async(
|
943
|
+
limit=limit,
|
944
|
+
offset=offset,
|
945
|
+
_request_timeout=_request_timeout,
|
946
|
+
_request_auth=_request_auth,
|
947
|
+
_content_type=_content_type,
|
948
|
+
_headers=_headers,
|
949
|
+
_host_index=_host_index,
|
950
|
+
)
|
951
|
+
|
952
|
+
@validate_call
|
953
|
+
def get_products_with_http_info(
|
954
|
+
self,
|
955
|
+
limit: Annotated[
|
956
|
+
Optional[StrictInt],
|
957
|
+
Field(
|
958
|
+
description="Limit the number of products returned. 0 means no limit."
|
959
|
+
),
|
960
|
+
] = None,
|
961
|
+
offset: Annotated[
|
962
|
+
Optional[StrictInt],
|
963
|
+
Field(
|
964
|
+
description="Offset the number of products returned. 0 means no offset."
|
965
|
+
),
|
966
|
+
] = None,
|
967
|
+
_request_timeout: Union[
|
968
|
+
None,
|
969
|
+
Annotated[StrictFloat, Field(gt=0)],
|
970
|
+
Tuple[
|
971
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
972
|
+
],
|
973
|
+
] = None,
|
974
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
975
|
+
_content_type: Optional[StrictStr] = None,
|
976
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
977
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
978
|
+
) -> ApiResponse[List[Product]]:
|
979
|
+
"""Get Products with HTTP info"""
|
980
|
+
if self.is_sync:
|
981
|
+
return self._get_products_sync_with_http_info(
|
982
|
+
limit=limit,
|
983
|
+
offset=offset,
|
984
|
+
_request_timeout=_request_timeout,
|
985
|
+
_request_auth=_request_auth,
|
986
|
+
_content_type=_content_type,
|
987
|
+
_headers=_headers,
|
988
|
+
_host_index=_host_index,
|
989
|
+
)
|
990
|
+
|
991
|
+
else:
|
992
|
+
return self._get_products_async_with_http_info(
|
993
|
+
limit=limit,
|
994
|
+
offset=offset,
|
995
|
+
_request_timeout=_request_timeout,
|
996
|
+
_request_auth=_request_auth,
|
997
|
+
_content_type=_content_type,
|
998
|
+
_headers=_headers,
|
999
|
+
_host_index=_host_index,
|
1000
|
+
)
|
1001
|
+
|
1002
|
+
@validate_call
|
1003
|
+
def get_products_without_preload_content(
|
1004
|
+
self,
|
1005
|
+
limit: Annotated[
|
1006
|
+
Optional[StrictInt],
|
1007
|
+
Field(
|
1008
|
+
description="Limit the number of products returned. 0 means no limit."
|
1009
|
+
),
|
1010
|
+
] = None,
|
1011
|
+
offset: Annotated[
|
1012
|
+
Optional[StrictInt],
|
1013
|
+
Field(
|
1014
|
+
description="Offset the number of products returned. 0 means no offset."
|
1015
|
+
),
|
1016
|
+
] = None,
|
1017
|
+
_request_timeout: Union[
|
1018
|
+
None,
|
1019
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1020
|
+
Tuple[
|
1021
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1022
|
+
],
|
1023
|
+
] = None,
|
1024
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1025
|
+
_content_type: Optional[StrictStr] = None,
|
1026
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1027
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1028
|
+
) -> RESTResponseType:
|
1029
|
+
"""Get Products without preloading content"""
|
1030
|
+
if self.is_sync:
|
1031
|
+
return self._get_products_sync_without_preload_content(
|
1032
|
+
limit=limit,
|
1033
|
+
offset=offset,
|
1034
|
+
_request_timeout=_request_timeout,
|
1035
|
+
_request_auth=_request_auth,
|
1036
|
+
_content_type=_content_type,
|
1037
|
+
_headers=_headers,
|
1038
|
+
_host_index=_host_index,
|
1039
|
+
)
|
1040
|
+
|
1041
|
+
else:
|
1042
|
+
return self._get_products_async_without_preload_content(
|
1043
|
+
limit=limit,
|
1044
|
+
offset=offset,
|
1045
|
+
_request_timeout=_request_timeout,
|
1046
|
+
_request_auth=_request_auth,
|
1047
|
+
_content_type=_content_type,
|
1048
|
+
_headers=_headers,
|
1049
|
+
_host_index=_host_index,
|
1050
|
+
)
|
1051
|
+
|
1052
|
+
# Private async implementation methods
|
1053
|
+
@validate_call
|
1054
|
+
async def _get_products_async(
|
1055
|
+
self,
|
1056
|
+
limit: Annotated[
|
1057
|
+
Optional[StrictInt],
|
1058
|
+
Field(
|
1059
|
+
description="Limit the number of products returned. 0 means no limit."
|
1060
|
+
),
|
1061
|
+
] = None,
|
1062
|
+
offset: Annotated[
|
1063
|
+
Optional[StrictInt],
|
1064
|
+
Field(
|
1065
|
+
description="Offset the number of products returned. 0 means no offset."
|
1066
|
+
),
|
1067
|
+
] = None,
|
1068
|
+
_request_timeout: Union[
|
1069
|
+
None,
|
1070
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1071
|
+
Tuple[
|
1072
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1073
|
+
],
|
1074
|
+
] = None,
|
1075
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1076
|
+
_content_type: Optional[StrictStr] = None,
|
1077
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1078
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1079
|
+
) -> List[Product]:
|
1080
|
+
"""Get Products
|
550
1081
|
|
551
1082
|
Get all software products from Crypticorn
|
552
1083
|
|
@@ -598,7 +1129,7 @@ class ProductsApi:
|
|
598
1129
|
).data
|
599
1130
|
|
600
1131
|
@validate_call
|
601
|
-
async def
|
1132
|
+
async def _get_products_async_with_http_info(
|
602
1133
|
self,
|
603
1134
|
limit: Annotated[
|
604
1135
|
Optional[StrictInt],
|
@@ -671,12 +1202,11 @@ class ProductsApi:
|
|
671
1202
|
)
|
672
1203
|
await response_data.read()
|
673
1204
|
return self.api_client.response_deserialize(
|
674
|
-
response_data=response_data,
|
675
|
-
response_types_map=_response_types_map,
|
1205
|
+
response_data=response_data, response_types_map=_response_types_map
|
676
1206
|
)
|
677
1207
|
|
678
1208
|
@validate_call
|
679
|
-
async def
|
1209
|
+
async def _get_products_async_without_preload_content(
|
680
1210
|
self,
|
681
1211
|
limit: Annotated[
|
682
1212
|
Optional[StrictInt],
|
@@ -747,7 +1277,122 @@ class ProductsApi:
|
|
747
1277
|
response_data = await self.api_client.call_api(
|
748
1278
|
*_param, _request_timeout=_request_timeout
|
749
1279
|
)
|
750
|
-
return response_data
|
1280
|
+
return response_data
|
1281
|
+
|
1282
|
+
# Private sync implementation methods
|
1283
|
+
@validate_call
|
1284
|
+
def _get_products_sync(
|
1285
|
+
self,
|
1286
|
+
limit: Annotated[
|
1287
|
+
Optional[StrictInt],
|
1288
|
+
Field(
|
1289
|
+
description="Limit the number of products returned. 0 means no limit."
|
1290
|
+
),
|
1291
|
+
] = None,
|
1292
|
+
offset: Annotated[
|
1293
|
+
Optional[StrictInt],
|
1294
|
+
Field(
|
1295
|
+
description="Offset the number of products returned. 0 means no offset."
|
1296
|
+
),
|
1297
|
+
] = None,
|
1298
|
+
_request_timeout: Union[
|
1299
|
+
None,
|
1300
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1301
|
+
Tuple[
|
1302
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1303
|
+
],
|
1304
|
+
] = None,
|
1305
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1306
|
+
_content_type: Optional[StrictStr] = None,
|
1307
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1308
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1309
|
+
) -> List[Product]:
|
1310
|
+
"""Synchronous version of get_products"""
|
1311
|
+
return async_to_sync(self._get_products_async)(
|
1312
|
+
limit=limit,
|
1313
|
+
offset=offset,
|
1314
|
+
_request_timeout=_request_timeout,
|
1315
|
+
_request_auth=_request_auth,
|
1316
|
+
_content_type=_content_type,
|
1317
|
+
_headers=_headers,
|
1318
|
+
_host_index=_host_index,
|
1319
|
+
)
|
1320
|
+
|
1321
|
+
@validate_call
|
1322
|
+
def _get_products_sync_with_http_info(
|
1323
|
+
self,
|
1324
|
+
limit: Annotated[
|
1325
|
+
Optional[StrictInt],
|
1326
|
+
Field(
|
1327
|
+
description="Limit the number of products returned. 0 means no limit."
|
1328
|
+
),
|
1329
|
+
] = None,
|
1330
|
+
offset: Annotated[
|
1331
|
+
Optional[StrictInt],
|
1332
|
+
Field(
|
1333
|
+
description="Offset the number of products returned. 0 means no offset."
|
1334
|
+
),
|
1335
|
+
] = None,
|
1336
|
+
_request_timeout: Union[
|
1337
|
+
None,
|
1338
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1339
|
+
Tuple[
|
1340
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1341
|
+
],
|
1342
|
+
] = None,
|
1343
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1344
|
+
_content_type: Optional[StrictStr] = None,
|
1345
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1346
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1347
|
+
) -> ApiResponse[List[Product]]:
|
1348
|
+
"""Synchronous version of get_products_with_http_info"""
|
1349
|
+
return async_to_sync(self._get_products_async_with_http_info)(
|
1350
|
+
limit=limit,
|
1351
|
+
offset=offset,
|
1352
|
+
_request_timeout=_request_timeout,
|
1353
|
+
_request_auth=_request_auth,
|
1354
|
+
_content_type=_content_type,
|
1355
|
+
_headers=_headers,
|
1356
|
+
_host_index=_host_index,
|
1357
|
+
)
|
1358
|
+
|
1359
|
+
@validate_call
|
1360
|
+
def _get_products_sync_without_preload_content(
|
1361
|
+
self,
|
1362
|
+
limit: Annotated[
|
1363
|
+
Optional[StrictInt],
|
1364
|
+
Field(
|
1365
|
+
description="Limit the number of products returned. 0 means no limit."
|
1366
|
+
),
|
1367
|
+
] = None,
|
1368
|
+
offset: Annotated[
|
1369
|
+
Optional[StrictInt],
|
1370
|
+
Field(
|
1371
|
+
description="Offset the number of products returned. 0 means no offset."
|
1372
|
+
),
|
1373
|
+
] = None,
|
1374
|
+
_request_timeout: Union[
|
1375
|
+
None,
|
1376
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1377
|
+
Tuple[
|
1378
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1379
|
+
],
|
1380
|
+
] = None,
|
1381
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1382
|
+
_content_type: Optional[StrictStr] = None,
|
1383
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1384
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1385
|
+
) -> RESTResponseType:
|
1386
|
+
"""Synchronous version of get_products_without_preload_content"""
|
1387
|
+
return async_to_sync(self._get_products_async_without_preload_content)(
|
1388
|
+
limit=limit,
|
1389
|
+
offset=offset,
|
1390
|
+
_request_timeout=_request_timeout,
|
1391
|
+
_request_auth=_request_auth,
|
1392
|
+
_content_type=_content_type,
|
1393
|
+
_headers=_headers,
|
1394
|
+
_host_index=_host_index,
|
1395
|
+
)
|
751
1396
|
|
752
1397
|
def _get_products_serialize(
|
753
1398
|
self,
|
@@ -811,7 +1456,128 @@ class ProductsApi:
|
|
811
1456
|
)
|
812
1457
|
|
813
1458
|
@validate_call
|
814
|
-
|
1459
|
+
def update_product(
|
1460
|
+
self,
|
1461
|
+
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
1462
|
+
product_update: ProductUpdate,
|
1463
|
+
_request_timeout: Union[
|
1464
|
+
None,
|
1465
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1466
|
+
Tuple[
|
1467
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1468
|
+
],
|
1469
|
+
] = None,
|
1470
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1471
|
+
_content_type: Optional[StrictStr] = None,
|
1472
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1473
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1474
|
+
) -> Product:
|
1475
|
+
"""Update Product"""
|
1476
|
+
if self.is_sync:
|
1477
|
+
return self._update_product_sync(
|
1478
|
+
id=id,
|
1479
|
+
product_update=product_update,
|
1480
|
+
_request_timeout=_request_timeout,
|
1481
|
+
_request_auth=_request_auth,
|
1482
|
+
_content_type=_content_type,
|
1483
|
+
_headers=_headers,
|
1484
|
+
_host_index=_host_index,
|
1485
|
+
)
|
1486
|
+
|
1487
|
+
else:
|
1488
|
+
return self._update_product_async(
|
1489
|
+
id=id,
|
1490
|
+
product_update=product_update,
|
1491
|
+
_request_timeout=_request_timeout,
|
1492
|
+
_request_auth=_request_auth,
|
1493
|
+
_content_type=_content_type,
|
1494
|
+
_headers=_headers,
|
1495
|
+
_host_index=_host_index,
|
1496
|
+
)
|
1497
|
+
|
1498
|
+
@validate_call
|
1499
|
+
def update_product_with_http_info(
|
1500
|
+
self,
|
1501
|
+
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
1502
|
+
product_update: ProductUpdate,
|
1503
|
+
_request_timeout: Union[
|
1504
|
+
None,
|
1505
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1506
|
+
Tuple[
|
1507
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1508
|
+
],
|
1509
|
+
] = None,
|
1510
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1511
|
+
_content_type: Optional[StrictStr] = None,
|
1512
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1513
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1514
|
+
) -> ApiResponse[Product]:
|
1515
|
+
"""Update Product with HTTP info"""
|
1516
|
+
if self.is_sync:
|
1517
|
+
return self._update_product_sync_with_http_info(
|
1518
|
+
id=id,
|
1519
|
+
product_update=product_update,
|
1520
|
+
_request_timeout=_request_timeout,
|
1521
|
+
_request_auth=_request_auth,
|
1522
|
+
_content_type=_content_type,
|
1523
|
+
_headers=_headers,
|
1524
|
+
_host_index=_host_index,
|
1525
|
+
)
|
1526
|
+
|
1527
|
+
else:
|
1528
|
+
return self._update_product_async_with_http_info(
|
1529
|
+
id=id,
|
1530
|
+
product_update=product_update,
|
1531
|
+
_request_timeout=_request_timeout,
|
1532
|
+
_request_auth=_request_auth,
|
1533
|
+
_content_type=_content_type,
|
1534
|
+
_headers=_headers,
|
1535
|
+
_host_index=_host_index,
|
1536
|
+
)
|
1537
|
+
|
1538
|
+
@validate_call
|
1539
|
+
def update_product_without_preload_content(
|
1540
|
+
self,
|
1541
|
+
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
1542
|
+
product_update: ProductUpdate,
|
1543
|
+
_request_timeout: Union[
|
1544
|
+
None,
|
1545
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1546
|
+
Tuple[
|
1547
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1548
|
+
],
|
1549
|
+
] = None,
|
1550
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1551
|
+
_content_type: Optional[StrictStr] = None,
|
1552
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1553
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1554
|
+
) -> RESTResponseType:
|
1555
|
+
"""Update Product without preloading content"""
|
1556
|
+
if self.is_sync:
|
1557
|
+
return self._update_product_sync_without_preload_content(
|
1558
|
+
id=id,
|
1559
|
+
product_update=product_update,
|
1560
|
+
_request_timeout=_request_timeout,
|
1561
|
+
_request_auth=_request_auth,
|
1562
|
+
_content_type=_content_type,
|
1563
|
+
_headers=_headers,
|
1564
|
+
_host_index=_host_index,
|
1565
|
+
)
|
1566
|
+
|
1567
|
+
else:
|
1568
|
+
return self._update_product_async_without_preload_content(
|
1569
|
+
id=id,
|
1570
|
+
product_update=product_update,
|
1571
|
+
_request_timeout=_request_timeout,
|
1572
|
+
_request_auth=_request_auth,
|
1573
|
+
_content_type=_content_type,
|
1574
|
+
_headers=_headers,
|
1575
|
+
_host_index=_host_index,
|
1576
|
+
)
|
1577
|
+
|
1578
|
+
# Private async implementation methods
|
1579
|
+
@validate_call
|
1580
|
+
async def _update_product_async(
|
815
1581
|
self,
|
816
1582
|
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
817
1583
|
product_update: ProductUpdate,
|
@@ -879,7 +1645,7 @@ class ProductsApi:
|
|
879
1645
|
).data
|
880
1646
|
|
881
1647
|
@validate_call
|
882
|
-
async def
|
1648
|
+
async def _update_product_async_with_http_info(
|
883
1649
|
self,
|
884
1650
|
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
885
1651
|
product_update: ProductUpdate,
|
@@ -942,12 +1708,11 @@ class ProductsApi:
|
|
942
1708
|
)
|
943
1709
|
await response_data.read()
|
944
1710
|
return self.api_client.response_deserialize(
|
945
|
-
response_data=response_data,
|
946
|
-
response_types_map=_response_types_map,
|
1711
|
+
response_data=response_data, response_types_map=_response_types_map
|
947
1712
|
)
|
948
1713
|
|
949
1714
|
@validate_call
|
950
|
-
async def
|
1715
|
+
async def _update_product_async_without_preload_content(
|
951
1716
|
self,
|
952
1717
|
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
953
1718
|
product_update: ProductUpdate,
|
@@ -1008,7 +1773,92 @@ class ProductsApi:
|
|
1008
1773
|
response_data = await self.api_client.call_api(
|
1009
1774
|
*_param, _request_timeout=_request_timeout
|
1010
1775
|
)
|
1011
|
-
return response_data
|
1776
|
+
return response_data
|
1777
|
+
|
1778
|
+
# Private sync implementation methods
|
1779
|
+
@validate_call
|
1780
|
+
def _update_product_sync(
|
1781
|
+
self,
|
1782
|
+
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
1783
|
+
product_update: ProductUpdate,
|
1784
|
+
_request_timeout: Union[
|
1785
|
+
None,
|
1786
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1787
|
+
Tuple[
|
1788
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1789
|
+
],
|
1790
|
+
] = None,
|
1791
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1792
|
+
_content_type: Optional[StrictStr] = None,
|
1793
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1794
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1795
|
+
) -> Product:
|
1796
|
+
"""Synchronous version of update_product"""
|
1797
|
+
return async_to_sync(self._update_product_async)(
|
1798
|
+
id=id,
|
1799
|
+
product_update=product_update,
|
1800
|
+
_request_timeout=_request_timeout,
|
1801
|
+
_request_auth=_request_auth,
|
1802
|
+
_content_type=_content_type,
|
1803
|
+
_headers=_headers,
|
1804
|
+
_host_index=_host_index,
|
1805
|
+
)
|
1806
|
+
|
1807
|
+
@validate_call
|
1808
|
+
def _update_product_sync_with_http_info(
|
1809
|
+
self,
|
1810
|
+
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
1811
|
+
product_update: ProductUpdate,
|
1812
|
+
_request_timeout: Union[
|
1813
|
+
None,
|
1814
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1815
|
+
Tuple[
|
1816
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1817
|
+
],
|
1818
|
+
] = None,
|
1819
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1820
|
+
_content_type: Optional[StrictStr] = None,
|
1821
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1822
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1823
|
+
) -> ApiResponse[Product]:
|
1824
|
+
"""Synchronous version of update_product_with_http_info"""
|
1825
|
+
return async_to_sync(self._update_product_async_with_http_info)(
|
1826
|
+
id=id,
|
1827
|
+
product_update=product_update,
|
1828
|
+
_request_timeout=_request_timeout,
|
1829
|
+
_request_auth=_request_auth,
|
1830
|
+
_content_type=_content_type,
|
1831
|
+
_headers=_headers,
|
1832
|
+
_host_index=_host_index,
|
1833
|
+
)
|
1834
|
+
|
1835
|
+
@validate_call
|
1836
|
+
def _update_product_sync_without_preload_content(
|
1837
|
+
self,
|
1838
|
+
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
1839
|
+
product_update: ProductUpdate,
|
1840
|
+
_request_timeout: Union[
|
1841
|
+
None,
|
1842
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1843
|
+
Tuple[
|
1844
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1845
|
+
],
|
1846
|
+
] = None,
|
1847
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1848
|
+
_content_type: Optional[StrictStr] = None,
|
1849
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1850
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1851
|
+
) -> RESTResponseType:
|
1852
|
+
"""Synchronous version of update_product_without_preload_content"""
|
1853
|
+
return async_to_sync(self._update_product_async_without_preload_content)(
|
1854
|
+
id=id,
|
1855
|
+
product_update=product_update,
|
1856
|
+
_request_timeout=_request_timeout,
|
1857
|
+
_request_auth=_request_auth,
|
1858
|
+
_content_type=_content_type,
|
1859
|
+
_headers=_headers,
|
1860
|
+
_host_index=_host_index,
|
1861
|
+
)
|
1012
1862
|
|
1013
1863
|
def _update_product_serialize(
|
1014
1864
|
self,
|