crypticorn 2.17.0rc1__py3-none-any.whl → 2.17.0rc2__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 +415 -13
- crypticorn/auth/client/api/auth_api.py +2622 -113
- crypticorn/auth/client/api/service_api.py +258 -7
- crypticorn/auth/client/api/user_api.py +2485 -270
- crypticorn/auth/client/api/wallet_api.py +1518 -77
- 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/client.py +227 -59
- crypticorn/common/__init__.py +0 -1
- crypticorn/common/metrics.py +4 -6
- crypticorn/common/middleware.py +10 -5
- crypticorn/common/pagination.py +137 -18
- crypticorn/common/router/admin_router.py +1 -1
- crypticorn/common/utils.py +2 -1
- crypticorn/common/warnings.py +1 -0
- crypticorn/hive/client/api/admin_api.py +1234 -51
- crypticorn/hive/client/api/data_api.py +517 -13
- crypticorn/hive/client/api/models_api.py +1657 -83
- crypticorn/hive/client/api/status_api.py +415 -13
- crypticorn/hive/client/models/api_error_identifier.py +1 -1
- crypticorn/hive/client/rest.py +23 -4
- crypticorn/hive/main.py +99 -25
- crypticorn/klines/client/api/admin_api.py +1234 -51
- crypticorn/klines/client/api/change_in_timeframe_api.py +278 -7
- crypticorn/klines/client/api/funding_rates_api.py +324 -7
- crypticorn/klines/client/api/ohlcv_data_api.py +399 -7
- crypticorn/klines/client/api/status_api.py +415 -13
- crypticorn/klines/client/api/symbols_api.py +225 -7
- crypticorn/klines/client/api/udf_api.py +1393 -120
- crypticorn/klines/client/models/api_error_identifier.py +3 -1
- crypticorn/klines/client/rest.py +23 -4
- crypticorn/klines/main.py +89 -12
- crypticorn/metrics/client/api/admin_api.py +1234 -51
- crypticorn/metrics/client/api/exchanges_api.py +1405 -140
- crypticorn/metrics/client/api/indicators_api.py +640 -13
- crypticorn/metrics/client/api/logs_api.py +305 -7
- crypticorn/metrics/client/api/marketcap_api.py +1240 -60
- crypticorn/metrics/client/api/markets_api.py +352 -7
- crypticorn/metrics/client/api/quote_currencies_api.py +237 -7
- crypticorn/metrics/client/api/status_api.py +415 -13
- crypticorn/metrics/client/api/tokens_api.py +400 -13
- crypticorn/metrics/client/configuration.py +4 -2
- crypticorn/metrics/client/rest.py +23 -4
- crypticorn/metrics/main.py +113 -19
- crypticorn/pay/client/api/admin_api.py +1720 -126
- crypticorn/pay/client/api/now_payments_api.py +1013 -42
- crypticorn/pay/client/api/payments_api.py +580 -13
- crypticorn/pay/client/api/products_api.py +915 -25
- crypticorn/pay/client/api/status_api.py +415 -13
- crypticorn/pay/client/configuration.py +2 -2
- crypticorn/pay/client/models/api_error_identifier.py +7 -7
- 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 +2 -1
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/admin_api.py +1718 -123
- crypticorn/trade/client/api/api_keys_api.py +1596 -103
- crypticorn/trade/client/api/bots_api.py +1106 -47
- crypticorn/trade/client/api/exchanges_api.py +592 -19
- crypticorn/trade/client/api/notifications_api.py +1340 -112
- crypticorn/trade/client/api/orders_api.py +240 -7
- crypticorn/trade/client/api/status_api.py +415 -13
- crypticorn/trade/client/api/strategies_api.py +1170 -69
- crypticorn/trade/client/api/trading_actions_api.py +650 -19
- crypticorn/trade/client/models/__init__.py +2 -0
- crypticorn/trade/client/models/exchange.py +6 -1
- crypticorn/trade/client/models/exchange_key_balance.py +111 -0
- crypticorn/trade/client/models/futures_balance.py +27 -25
- crypticorn/trade/client/models/spot_balance.py +110 -0
- crypticorn/trade/client/models/strategy.py +5 -3
- crypticorn/trade/client/models/strategy_create.py +6 -4
- crypticorn/trade/client/models/strategy_exchange_info.py +16 -4
- crypticorn/trade/client/models/strategy_update.py +2 -2
- crypticorn/trade/client/rest.py +23 -4
- crypticorn/trade/main.py +15 -12
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/METADATA +64 -20
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/RECORD +85 -84
- crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/WHEEL +0 -0
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/top_level.txt +0 -0
@@ -26,6 +26,24 @@ from crypticorn.trade.client.api_client import ApiClient, RequestSerialized
|
|
26
26
|
from crypticorn.trade.client.api_response import ApiResponse
|
27
27
|
from crypticorn.trade.client.rest import RESTResponseType
|
28
28
|
|
29
|
+
# Import async_to_sync for sync methods
|
30
|
+
try:
|
31
|
+
from asgiref.sync import async_to_sync
|
32
|
+
|
33
|
+
_HAS_ASGIREF = True
|
34
|
+
except ImportError:
|
35
|
+
_HAS_ASGIREF = False
|
36
|
+
|
37
|
+
def async_to_sync(async_func):
|
38
|
+
"""Fallback decorator that raises an error if asgiref is not available."""
|
39
|
+
|
40
|
+
def wrapper(*args, **kwargs):
|
41
|
+
raise ImportError(
|
42
|
+
"asgiref is required for sync methods. Install with: pip install asgiref"
|
43
|
+
)
|
44
|
+
|
45
|
+
return wrapper
|
46
|
+
|
29
47
|
|
30
48
|
class BotsApi:
|
31
49
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
@@ -34,13 +52,135 @@ class BotsApi:
|
|
34
52
|
Do not edit the class manually.
|
35
53
|
"""
|
36
54
|
|
37
|
-
def __init__(self, api_client=None) -> None:
|
55
|
+
def __init__(self, api_client=None, is_sync: bool = False) -> None:
|
38
56
|
if api_client is None:
|
39
57
|
api_client = ApiClient.get_default()
|
40
58
|
self.api_client = api_client
|
59
|
+
self.is_sync = is_sync
|
41
60
|
|
42
61
|
@validate_call
|
43
|
-
|
62
|
+
def create_bot(
|
63
|
+
self,
|
64
|
+
bot_create: BotCreate,
|
65
|
+
_request_timeout: Union[
|
66
|
+
None,
|
67
|
+
Annotated[StrictFloat, Field(gt=0)],
|
68
|
+
Tuple[
|
69
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
70
|
+
],
|
71
|
+
] = None,
|
72
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
73
|
+
_content_type: Optional[StrictStr] = None,
|
74
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
75
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
76
|
+
) -> Bot:
|
77
|
+
"""Create Bot
|
78
|
+
|
79
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
80
|
+
"""
|
81
|
+
if self.is_sync:
|
82
|
+
return self._create_bot_sync(
|
83
|
+
bot_create=bot_create,
|
84
|
+
_request_timeout=_request_timeout,
|
85
|
+
_request_auth=_request_auth,
|
86
|
+
_content_type=_content_type,
|
87
|
+
_headers=_headers,
|
88
|
+
_host_index=_host_index,
|
89
|
+
)
|
90
|
+
|
91
|
+
else:
|
92
|
+
return self._create_bot_async(
|
93
|
+
bot_create=bot_create,
|
94
|
+
_request_timeout=_request_timeout,
|
95
|
+
_request_auth=_request_auth,
|
96
|
+
_content_type=_content_type,
|
97
|
+
_headers=_headers,
|
98
|
+
_host_index=_host_index,
|
99
|
+
)
|
100
|
+
|
101
|
+
@validate_call
|
102
|
+
def create_bot_with_http_info(
|
103
|
+
self,
|
104
|
+
bot_create: BotCreate,
|
105
|
+
_request_timeout: Union[
|
106
|
+
None,
|
107
|
+
Annotated[StrictFloat, Field(gt=0)],
|
108
|
+
Tuple[
|
109
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
110
|
+
],
|
111
|
+
] = None,
|
112
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
113
|
+
_content_type: Optional[StrictStr] = None,
|
114
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
115
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
116
|
+
) -> ApiResponse[Bot]:
|
117
|
+
"""Create Bot with HTTP info
|
118
|
+
|
119
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
120
|
+
"""
|
121
|
+
if self.is_sync:
|
122
|
+
return self._create_bot_sync_with_http_info(
|
123
|
+
bot_create=bot_create,
|
124
|
+
_request_timeout=_request_timeout,
|
125
|
+
_request_auth=_request_auth,
|
126
|
+
_content_type=_content_type,
|
127
|
+
_headers=_headers,
|
128
|
+
_host_index=_host_index,
|
129
|
+
)
|
130
|
+
|
131
|
+
else:
|
132
|
+
return self._create_bot_async_with_http_info(
|
133
|
+
bot_create=bot_create,
|
134
|
+
_request_timeout=_request_timeout,
|
135
|
+
_request_auth=_request_auth,
|
136
|
+
_content_type=_content_type,
|
137
|
+
_headers=_headers,
|
138
|
+
_host_index=_host_index,
|
139
|
+
)
|
140
|
+
|
141
|
+
@validate_call
|
142
|
+
def create_bot_without_preload_content(
|
143
|
+
self,
|
144
|
+
bot_create: BotCreate,
|
145
|
+
_request_timeout: Union[
|
146
|
+
None,
|
147
|
+
Annotated[StrictFloat, Field(gt=0)],
|
148
|
+
Tuple[
|
149
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
150
|
+
],
|
151
|
+
] = None,
|
152
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
153
|
+
_content_type: Optional[StrictStr] = None,
|
154
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
155
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
156
|
+
) -> RESTResponseType:
|
157
|
+
"""Create Bot without preloading content
|
158
|
+
|
159
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
160
|
+
"""
|
161
|
+
if self.is_sync:
|
162
|
+
return self._create_bot_sync_without_preload_content(
|
163
|
+
bot_create=bot_create,
|
164
|
+
_request_timeout=_request_timeout,
|
165
|
+
_request_auth=_request_auth,
|
166
|
+
_content_type=_content_type,
|
167
|
+
_headers=_headers,
|
168
|
+
_host_index=_host_index,
|
169
|
+
)
|
170
|
+
|
171
|
+
else:
|
172
|
+
return self._create_bot_async_without_preload_content(
|
173
|
+
bot_create=bot_create,
|
174
|
+
_request_timeout=_request_timeout,
|
175
|
+
_request_auth=_request_auth,
|
176
|
+
_content_type=_content_type,
|
177
|
+
_headers=_headers,
|
178
|
+
_host_index=_host_index,
|
179
|
+
)
|
180
|
+
|
181
|
+
# Private async implementation methods
|
182
|
+
@validate_call
|
183
|
+
async def _create_bot_async(
|
44
184
|
self,
|
45
185
|
bot_create: BotCreate,
|
46
186
|
_request_timeout: Union[
|
@@ -104,7 +244,7 @@ class BotsApi:
|
|
104
244
|
).data
|
105
245
|
|
106
246
|
@validate_call
|
107
|
-
async def
|
247
|
+
async def _create_bot_async_with_http_info(
|
108
248
|
self,
|
109
249
|
bot_create: BotCreate,
|
110
250
|
_request_timeout: Union[
|
@@ -163,12 +303,11 @@ class BotsApi:
|
|
163
303
|
)
|
164
304
|
await response_data.read()
|
165
305
|
return self.api_client.response_deserialize(
|
166
|
-
response_data=response_data,
|
167
|
-
response_types_map=_response_types_map,
|
306
|
+
response_data=response_data, response_types_map=_response_types_map
|
168
307
|
)
|
169
308
|
|
170
309
|
@validate_call
|
171
|
-
async def
|
310
|
+
async def _create_bot_async_without_preload_content(
|
172
311
|
self,
|
173
312
|
bot_create: BotCreate,
|
174
313
|
_request_timeout: Union[
|
@@ -225,7 +364,86 @@ class BotsApi:
|
|
225
364
|
response_data = await self.api_client.call_api(
|
226
365
|
*_param, _request_timeout=_request_timeout
|
227
366
|
)
|
228
|
-
return response_data
|
367
|
+
return response_data
|
368
|
+
|
369
|
+
# Private sync implementation methods
|
370
|
+
@validate_call
|
371
|
+
def _create_bot_sync(
|
372
|
+
self,
|
373
|
+
bot_create: BotCreate,
|
374
|
+
_request_timeout: Union[
|
375
|
+
None,
|
376
|
+
Annotated[StrictFloat, Field(gt=0)],
|
377
|
+
Tuple[
|
378
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
379
|
+
],
|
380
|
+
] = None,
|
381
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
382
|
+
_content_type: Optional[StrictStr] = None,
|
383
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
384
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
385
|
+
) -> Bot:
|
386
|
+
"""Synchronous version of create_bot"""
|
387
|
+
return async_to_sync(self._create_bot_async)(
|
388
|
+
bot_create=bot_create,
|
389
|
+
_request_timeout=_request_timeout,
|
390
|
+
_request_auth=_request_auth,
|
391
|
+
_content_type=_content_type,
|
392
|
+
_headers=_headers,
|
393
|
+
_host_index=_host_index,
|
394
|
+
)
|
395
|
+
|
396
|
+
@validate_call
|
397
|
+
def _create_bot_sync_with_http_info(
|
398
|
+
self,
|
399
|
+
bot_create: BotCreate,
|
400
|
+
_request_timeout: Union[
|
401
|
+
None,
|
402
|
+
Annotated[StrictFloat, Field(gt=0)],
|
403
|
+
Tuple[
|
404
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
405
|
+
],
|
406
|
+
] = None,
|
407
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
408
|
+
_content_type: Optional[StrictStr] = None,
|
409
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
410
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
411
|
+
) -> ApiResponse[Bot]:
|
412
|
+
"""Synchronous version of create_bot_with_http_info"""
|
413
|
+
return async_to_sync(self._create_bot_async_with_http_info)(
|
414
|
+
bot_create=bot_create,
|
415
|
+
_request_timeout=_request_timeout,
|
416
|
+
_request_auth=_request_auth,
|
417
|
+
_content_type=_content_type,
|
418
|
+
_headers=_headers,
|
419
|
+
_host_index=_host_index,
|
420
|
+
)
|
421
|
+
|
422
|
+
@validate_call
|
423
|
+
def _create_bot_sync_without_preload_content(
|
424
|
+
self,
|
425
|
+
bot_create: BotCreate,
|
426
|
+
_request_timeout: Union[
|
427
|
+
None,
|
428
|
+
Annotated[StrictFloat, Field(gt=0)],
|
429
|
+
Tuple[
|
430
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
431
|
+
],
|
432
|
+
] = None,
|
433
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
434
|
+
_content_type: Optional[StrictStr] = None,
|
435
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
436
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
437
|
+
) -> RESTResponseType:
|
438
|
+
"""Synchronous version of create_bot_without_preload_content"""
|
439
|
+
return async_to_sync(self._create_bot_async_without_preload_content)(
|
440
|
+
bot_create=bot_create,
|
441
|
+
_request_timeout=_request_timeout,
|
442
|
+
_request_auth=_request_auth,
|
443
|
+
_content_type=_content_type,
|
444
|
+
_headers=_headers,
|
445
|
+
_host_index=_host_index,
|
446
|
+
)
|
229
447
|
|
230
448
|
def _create_bot_serialize(
|
231
449
|
self,
|
@@ -292,7 +510,128 @@ class BotsApi:
|
|
292
510
|
)
|
293
511
|
|
294
512
|
@validate_call
|
295
|
-
|
513
|
+
def delete_bot(
|
514
|
+
self,
|
515
|
+
id: StrictStr,
|
516
|
+
_request_timeout: Union[
|
517
|
+
None,
|
518
|
+
Annotated[StrictFloat, Field(gt=0)],
|
519
|
+
Tuple[
|
520
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
521
|
+
],
|
522
|
+
] = None,
|
523
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
524
|
+
_content_type: Optional[StrictStr] = None,
|
525
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
526
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
527
|
+
) -> None:
|
528
|
+
"""Delete Bot
|
529
|
+
|
530
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
531
|
+
"""
|
532
|
+
if self.is_sync:
|
533
|
+
return self._delete_bot_sync(
|
534
|
+
id=id,
|
535
|
+
_request_timeout=_request_timeout,
|
536
|
+
_request_auth=_request_auth,
|
537
|
+
_content_type=_content_type,
|
538
|
+
_headers=_headers,
|
539
|
+
_host_index=_host_index,
|
540
|
+
)
|
541
|
+
|
542
|
+
else:
|
543
|
+
return self._delete_bot_async(
|
544
|
+
id=id,
|
545
|
+
_request_timeout=_request_timeout,
|
546
|
+
_request_auth=_request_auth,
|
547
|
+
_content_type=_content_type,
|
548
|
+
_headers=_headers,
|
549
|
+
_host_index=_host_index,
|
550
|
+
)
|
551
|
+
|
552
|
+
@validate_call
|
553
|
+
def delete_bot_with_http_info(
|
554
|
+
self,
|
555
|
+
id: StrictStr,
|
556
|
+
_request_timeout: Union[
|
557
|
+
None,
|
558
|
+
Annotated[StrictFloat, Field(gt=0)],
|
559
|
+
Tuple[
|
560
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
561
|
+
],
|
562
|
+
] = None,
|
563
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
564
|
+
_content_type: Optional[StrictStr] = None,
|
565
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
566
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
567
|
+
) -> ApiResponse[None]:
|
568
|
+
"""Delete Bot with HTTP info
|
569
|
+
|
570
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
571
|
+
"""
|
572
|
+
if self.is_sync:
|
573
|
+
return self._delete_bot_sync_with_http_info(
|
574
|
+
id=id,
|
575
|
+
_request_timeout=_request_timeout,
|
576
|
+
_request_auth=_request_auth,
|
577
|
+
_content_type=_content_type,
|
578
|
+
_headers=_headers,
|
579
|
+
_host_index=_host_index,
|
580
|
+
)
|
581
|
+
|
582
|
+
else:
|
583
|
+
return self._delete_bot_async_with_http_info(
|
584
|
+
id=id,
|
585
|
+
_request_timeout=_request_timeout,
|
586
|
+
_request_auth=_request_auth,
|
587
|
+
_content_type=_content_type,
|
588
|
+
_headers=_headers,
|
589
|
+
_host_index=_host_index,
|
590
|
+
)
|
591
|
+
|
592
|
+
@validate_call
|
593
|
+
def delete_bot_without_preload_content(
|
594
|
+
self,
|
595
|
+
id: StrictStr,
|
596
|
+
_request_timeout: Union[
|
597
|
+
None,
|
598
|
+
Annotated[StrictFloat, Field(gt=0)],
|
599
|
+
Tuple[
|
600
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
601
|
+
],
|
602
|
+
] = None,
|
603
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
604
|
+
_content_type: Optional[StrictStr] = None,
|
605
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
606
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
607
|
+
) -> RESTResponseType:
|
608
|
+
"""Delete Bot without preloading content
|
609
|
+
|
610
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
611
|
+
"""
|
612
|
+
if self.is_sync:
|
613
|
+
return self._delete_bot_sync_without_preload_content(
|
614
|
+
id=id,
|
615
|
+
_request_timeout=_request_timeout,
|
616
|
+
_request_auth=_request_auth,
|
617
|
+
_content_type=_content_type,
|
618
|
+
_headers=_headers,
|
619
|
+
_host_index=_host_index,
|
620
|
+
)
|
621
|
+
|
622
|
+
else:
|
623
|
+
return self._delete_bot_async_without_preload_content(
|
624
|
+
id=id,
|
625
|
+
_request_timeout=_request_timeout,
|
626
|
+
_request_auth=_request_auth,
|
627
|
+
_content_type=_content_type,
|
628
|
+
_headers=_headers,
|
629
|
+
_host_index=_host_index,
|
630
|
+
)
|
631
|
+
|
632
|
+
# Private async implementation methods
|
633
|
+
@validate_call
|
634
|
+
async def _delete_bot_async(
|
296
635
|
self,
|
297
636
|
id: StrictStr,
|
298
637
|
_request_timeout: Union[
|
@@ -356,7 +695,7 @@ class BotsApi:
|
|
356
695
|
).data
|
357
696
|
|
358
697
|
@validate_call
|
359
|
-
async def
|
698
|
+
async def _delete_bot_async_with_http_info(
|
360
699
|
self,
|
361
700
|
id: StrictStr,
|
362
701
|
_request_timeout: Union[
|
@@ -415,12 +754,11 @@ class BotsApi:
|
|
415
754
|
)
|
416
755
|
await response_data.read()
|
417
756
|
return self.api_client.response_deserialize(
|
418
|
-
response_data=response_data,
|
419
|
-
response_types_map=_response_types_map,
|
757
|
+
response_data=response_data, response_types_map=_response_types_map
|
420
758
|
)
|
421
759
|
|
422
760
|
@validate_call
|
423
|
-
async def
|
761
|
+
async def _delete_bot_async_without_preload_content(
|
424
762
|
self,
|
425
763
|
id: StrictStr,
|
426
764
|
_request_timeout: Union[
|
@@ -477,7 +815,86 @@ class BotsApi:
|
|
477
815
|
response_data = await self.api_client.call_api(
|
478
816
|
*_param, _request_timeout=_request_timeout
|
479
817
|
)
|
480
|
-
return response_data
|
818
|
+
return response_data
|
819
|
+
|
820
|
+
# Private sync implementation methods
|
821
|
+
@validate_call
|
822
|
+
def _delete_bot_sync(
|
823
|
+
self,
|
824
|
+
id: StrictStr,
|
825
|
+
_request_timeout: Union[
|
826
|
+
None,
|
827
|
+
Annotated[StrictFloat, Field(gt=0)],
|
828
|
+
Tuple[
|
829
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
830
|
+
],
|
831
|
+
] = None,
|
832
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
833
|
+
_content_type: Optional[StrictStr] = None,
|
834
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
835
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
836
|
+
) -> None:
|
837
|
+
"""Synchronous version of delete_bot"""
|
838
|
+
return async_to_sync(self._delete_bot_async)(
|
839
|
+
id=id,
|
840
|
+
_request_timeout=_request_timeout,
|
841
|
+
_request_auth=_request_auth,
|
842
|
+
_content_type=_content_type,
|
843
|
+
_headers=_headers,
|
844
|
+
_host_index=_host_index,
|
845
|
+
)
|
846
|
+
|
847
|
+
@validate_call
|
848
|
+
def _delete_bot_sync_with_http_info(
|
849
|
+
self,
|
850
|
+
id: StrictStr,
|
851
|
+
_request_timeout: Union[
|
852
|
+
None,
|
853
|
+
Annotated[StrictFloat, Field(gt=0)],
|
854
|
+
Tuple[
|
855
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
856
|
+
],
|
857
|
+
] = None,
|
858
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
859
|
+
_content_type: Optional[StrictStr] = None,
|
860
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
861
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
862
|
+
) -> ApiResponse[None]:
|
863
|
+
"""Synchronous version of delete_bot_with_http_info"""
|
864
|
+
return async_to_sync(self._delete_bot_async_with_http_info)(
|
865
|
+
id=id,
|
866
|
+
_request_timeout=_request_timeout,
|
867
|
+
_request_auth=_request_auth,
|
868
|
+
_content_type=_content_type,
|
869
|
+
_headers=_headers,
|
870
|
+
_host_index=_host_index,
|
871
|
+
)
|
872
|
+
|
873
|
+
@validate_call
|
874
|
+
def _delete_bot_sync_without_preload_content(
|
875
|
+
self,
|
876
|
+
id: StrictStr,
|
877
|
+
_request_timeout: Union[
|
878
|
+
None,
|
879
|
+
Annotated[StrictFloat, Field(gt=0)],
|
880
|
+
Tuple[
|
881
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
882
|
+
],
|
883
|
+
] = None,
|
884
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
885
|
+
_content_type: Optional[StrictStr] = None,
|
886
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
887
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
888
|
+
) -> RESTResponseType:
|
889
|
+
"""Synchronous version of delete_bot_without_preload_content"""
|
890
|
+
return async_to_sync(self._delete_bot_async_without_preload_content)(
|
891
|
+
id=id,
|
892
|
+
_request_timeout=_request_timeout,
|
893
|
+
_request_auth=_request_auth,
|
894
|
+
_content_type=_content_type,
|
895
|
+
_headers=_headers,
|
896
|
+
_host_index=_host_index,
|
897
|
+
)
|
481
898
|
|
482
899
|
def _delete_bot_serialize(
|
483
900
|
self,
|
@@ -534,7 +951,128 @@ class BotsApi:
|
|
534
951
|
)
|
535
952
|
|
536
953
|
@validate_call
|
537
|
-
|
954
|
+
def get_bot(
|
955
|
+
self,
|
956
|
+
id: StrictStr,
|
957
|
+
_request_timeout: Union[
|
958
|
+
None,
|
959
|
+
Annotated[StrictFloat, Field(gt=0)],
|
960
|
+
Tuple[
|
961
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
962
|
+
],
|
963
|
+
] = None,
|
964
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
965
|
+
_content_type: Optional[StrictStr] = None,
|
966
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
967
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
968
|
+
) -> Bot:
|
969
|
+
"""Get Bot
|
970
|
+
|
971
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
972
|
+
"""
|
973
|
+
if self.is_sync:
|
974
|
+
return self._get_bot_sync(
|
975
|
+
id=id,
|
976
|
+
_request_timeout=_request_timeout,
|
977
|
+
_request_auth=_request_auth,
|
978
|
+
_content_type=_content_type,
|
979
|
+
_headers=_headers,
|
980
|
+
_host_index=_host_index,
|
981
|
+
)
|
982
|
+
|
983
|
+
else:
|
984
|
+
return self._get_bot_async(
|
985
|
+
id=id,
|
986
|
+
_request_timeout=_request_timeout,
|
987
|
+
_request_auth=_request_auth,
|
988
|
+
_content_type=_content_type,
|
989
|
+
_headers=_headers,
|
990
|
+
_host_index=_host_index,
|
991
|
+
)
|
992
|
+
|
993
|
+
@validate_call
|
994
|
+
def get_bot_with_http_info(
|
995
|
+
self,
|
996
|
+
id: StrictStr,
|
997
|
+
_request_timeout: Union[
|
998
|
+
None,
|
999
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1000
|
+
Tuple[
|
1001
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1002
|
+
],
|
1003
|
+
] = None,
|
1004
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1005
|
+
_content_type: Optional[StrictStr] = None,
|
1006
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1007
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1008
|
+
) -> ApiResponse[Bot]:
|
1009
|
+
"""Get Bot with HTTP info
|
1010
|
+
|
1011
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1012
|
+
"""
|
1013
|
+
if self.is_sync:
|
1014
|
+
return self._get_bot_sync_with_http_info(
|
1015
|
+
id=id,
|
1016
|
+
_request_timeout=_request_timeout,
|
1017
|
+
_request_auth=_request_auth,
|
1018
|
+
_content_type=_content_type,
|
1019
|
+
_headers=_headers,
|
1020
|
+
_host_index=_host_index,
|
1021
|
+
)
|
1022
|
+
|
1023
|
+
else:
|
1024
|
+
return self._get_bot_async_with_http_info(
|
1025
|
+
id=id,
|
1026
|
+
_request_timeout=_request_timeout,
|
1027
|
+
_request_auth=_request_auth,
|
1028
|
+
_content_type=_content_type,
|
1029
|
+
_headers=_headers,
|
1030
|
+
_host_index=_host_index,
|
1031
|
+
)
|
1032
|
+
|
1033
|
+
@validate_call
|
1034
|
+
def get_bot_without_preload_content(
|
1035
|
+
self,
|
1036
|
+
id: StrictStr,
|
1037
|
+
_request_timeout: Union[
|
1038
|
+
None,
|
1039
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1040
|
+
Tuple[
|
1041
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1042
|
+
],
|
1043
|
+
] = None,
|
1044
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1045
|
+
_content_type: Optional[StrictStr] = None,
|
1046
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1047
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1048
|
+
) -> RESTResponseType:
|
1049
|
+
"""Get Bot without preloading content
|
1050
|
+
|
1051
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1052
|
+
"""
|
1053
|
+
if self.is_sync:
|
1054
|
+
return self._get_bot_sync_without_preload_content(
|
1055
|
+
id=id,
|
1056
|
+
_request_timeout=_request_timeout,
|
1057
|
+
_request_auth=_request_auth,
|
1058
|
+
_content_type=_content_type,
|
1059
|
+
_headers=_headers,
|
1060
|
+
_host_index=_host_index,
|
1061
|
+
)
|
1062
|
+
|
1063
|
+
else:
|
1064
|
+
return self._get_bot_async_without_preload_content(
|
1065
|
+
id=id,
|
1066
|
+
_request_timeout=_request_timeout,
|
1067
|
+
_request_auth=_request_auth,
|
1068
|
+
_content_type=_content_type,
|
1069
|
+
_headers=_headers,
|
1070
|
+
_host_index=_host_index,
|
1071
|
+
)
|
1072
|
+
|
1073
|
+
# Private async implementation methods
|
1074
|
+
@validate_call
|
1075
|
+
async def _get_bot_async(
|
538
1076
|
self,
|
539
1077
|
id: StrictStr,
|
540
1078
|
_request_timeout: Union[
|
@@ -597,7 +1135,7 @@ class BotsApi:
|
|
597
1135
|
).data
|
598
1136
|
|
599
1137
|
@validate_call
|
600
|
-
async def
|
1138
|
+
async def _get_bot_async_with_http_info(
|
601
1139
|
self,
|
602
1140
|
id: StrictStr,
|
603
1141
|
_request_timeout: Union[
|
@@ -655,12 +1193,11 @@ class BotsApi:
|
|
655
1193
|
)
|
656
1194
|
await response_data.read()
|
657
1195
|
return self.api_client.response_deserialize(
|
658
|
-
response_data=response_data,
|
659
|
-
response_types_map=_response_types_map,
|
1196
|
+
response_data=response_data, response_types_map=_response_types_map
|
660
1197
|
)
|
661
1198
|
|
662
1199
|
@validate_call
|
663
|
-
async def
|
1200
|
+
async def _get_bot_async_without_preload_content(
|
664
1201
|
self,
|
665
1202
|
id: StrictStr,
|
666
1203
|
_request_timeout: Union[
|
@@ -716,7 +1253,86 @@ class BotsApi:
|
|
716
1253
|
response_data = await self.api_client.call_api(
|
717
1254
|
*_param, _request_timeout=_request_timeout
|
718
1255
|
)
|
719
|
-
return response_data
|
1256
|
+
return response_data
|
1257
|
+
|
1258
|
+
# Private sync implementation methods
|
1259
|
+
@validate_call
|
1260
|
+
def _get_bot_sync(
|
1261
|
+
self,
|
1262
|
+
id: StrictStr,
|
1263
|
+
_request_timeout: Union[
|
1264
|
+
None,
|
1265
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1266
|
+
Tuple[
|
1267
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1268
|
+
],
|
1269
|
+
] = None,
|
1270
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1271
|
+
_content_type: Optional[StrictStr] = None,
|
1272
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1273
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1274
|
+
) -> Bot:
|
1275
|
+
"""Synchronous version of get_bot"""
|
1276
|
+
return async_to_sync(self._get_bot_async)(
|
1277
|
+
id=id,
|
1278
|
+
_request_timeout=_request_timeout,
|
1279
|
+
_request_auth=_request_auth,
|
1280
|
+
_content_type=_content_type,
|
1281
|
+
_headers=_headers,
|
1282
|
+
_host_index=_host_index,
|
1283
|
+
)
|
1284
|
+
|
1285
|
+
@validate_call
|
1286
|
+
def _get_bot_sync_with_http_info(
|
1287
|
+
self,
|
1288
|
+
id: StrictStr,
|
1289
|
+
_request_timeout: Union[
|
1290
|
+
None,
|
1291
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1292
|
+
Tuple[
|
1293
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1294
|
+
],
|
1295
|
+
] = None,
|
1296
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1297
|
+
_content_type: Optional[StrictStr] = None,
|
1298
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1299
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1300
|
+
) -> ApiResponse[Bot]:
|
1301
|
+
"""Synchronous version of get_bot_with_http_info"""
|
1302
|
+
return async_to_sync(self._get_bot_async_with_http_info)(
|
1303
|
+
id=id,
|
1304
|
+
_request_timeout=_request_timeout,
|
1305
|
+
_request_auth=_request_auth,
|
1306
|
+
_content_type=_content_type,
|
1307
|
+
_headers=_headers,
|
1308
|
+
_host_index=_host_index,
|
1309
|
+
)
|
1310
|
+
|
1311
|
+
@validate_call
|
1312
|
+
def _get_bot_sync_without_preload_content(
|
1313
|
+
self,
|
1314
|
+
id: StrictStr,
|
1315
|
+
_request_timeout: Union[
|
1316
|
+
None,
|
1317
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1318
|
+
Tuple[
|
1319
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1320
|
+
],
|
1321
|
+
] = None,
|
1322
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1323
|
+
_content_type: Optional[StrictStr] = None,
|
1324
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1325
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1326
|
+
) -> RESTResponseType:
|
1327
|
+
"""Synchronous version of get_bot_without_preload_content"""
|
1328
|
+
return async_to_sync(self._get_bot_async_without_preload_content)(
|
1329
|
+
id=id,
|
1330
|
+
_request_timeout=_request_timeout,
|
1331
|
+
_request_auth=_request_auth,
|
1332
|
+
_content_type=_content_type,
|
1333
|
+
_headers=_headers,
|
1334
|
+
_host_index=_host_index,
|
1335
|
+
)
|
720
1336
|
|
721
1337
|
def _get_bot_serialize(
|
722
1338
|
self,
|
@@ -754,26 +1370,165 @@ class BotsApi:
|
|
754
1370
|
["application/json"]
|
755
1371
|
)
|
756
1372
|
|
757
|
-
# authentication setting
|
758
|
-
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
1373
|
+
# authentication setting
|
1374
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
1375
|
+
|
1376
|
+
return self.api_client.param_serialize(
|
1377
|
+
method="GET",
|
1378
|
+
resource_path="/bots/{id}",
|
1379
|
+
path_params=_path_params,
|
1380
|
+
query_params=_query_params,
|
1381
|
+
header_params=_header_params,
|
1382
|
+
body=_body_params,
|
1383
|
+
post_params=_form_params,
|
1384
|
+
files=_files,
|
1385
|
+
auth_settings=_auth_settings,
|
1386
|
+
collection_formats=_collection_formats,
|
1387
|
+
_host=_host,
|
1388
|
+
_request_auth=_request_auth,
|
1389
|
+
)
|
1390
|
+
|
1391
|
+
@validate_call
|
1392
|
+
def get_bots(
|
1393
|
+
self,
|
1394
|
+
include_deleted: Optional[StrictBool] = None,
|
1395
|
+
limit: Optional[StrictInt] = None,
|
1396
|
+
offset: Optional[StrictInt] = None,
|
1397
|
+
_request_timeout: Union[
|
1398
|
+
None,
|
1399
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1400
|
+
Tuple[
|
1401
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1402
|
+
],
|
1403
|
+
] = None,
|
1404
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1405
|
+
_content_type: Optional[StrictStr] = None,
|
1406
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1407
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1408
|
+
) -> List[Bot]:
|
1409
|
+
"""Get Bots
|
1410
|
+
|
1411
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1412
|
+
"""
|
1413
|
+
if self.is_sync:
|
1414
|
+
return self._get_bots_sync(
|
1415
|
+
include_deleted=include_deleted,
|
1416
|
+
limit=limit,
|
1417
|
+
offset=offset,
|
1418
|
+
_request_timeout=_request_timeout,
|
1419
|
+
_request_auth=_request_auth,
|
1420
|
+
_content_type=_content_type,
|
1421
|
+
_headers=_headers,
|
1422
|
+
_host_index=_host_index,
|
1423
|
+
)
|
1424
|
+
|
1425
|
+
else:
|
1426
|
+
return self._get_bots_async(
|
1427
|
+
include_deleted=include_deleted,
|
1428
|
+
limit=limit,
|
1429
|
+
offset=offset,
|
1430
|
+
_request_timeout=_request_timeout,
|
1431
|
+
_request_auth=_request_auth,
|
1432
|
+
_content_type=_content_type,
|
1433
|
+
_headers=_headers,
|
1434
|
+
_host_index=_host_index,
|
1435
|
+
)
|
1436
|
+
|
1437
|
+
@validate_call
|
1438
|
+
def get_bots_with_http_info(
|
1439
|
+
self,
|
1440
|
+
include_deleted: Optional[StrictBool] = None,
|
1441
|
+
limit: Optional[StrictInt] = None,
|
1442
|
+
offset: Optional[StrictInt] = None,
|
1443
|
+
_request_timeout: Union[
|
1444
|
+
None,
|
1445
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1446
|
+
Tuple[
|
1447
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1448
|
+
],
|
1449
|
+
] = None,
|
1450
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1451
|
+
_content_type: Optional[StrictStr] = None,
|
1452
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1453
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1454
|
+
) -> ApiResponse[List[Bot]]:
|
1455
|
+
"""Get Bots with HTTP info
|
1456
|
+
|
1457
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1458
|
+
"""
|
1459
|
+
if self.is_sync:
|
1460
|
+
return self._get_bots_sync_with_http_info(
|
1461
|
+
include_deleted=include_deleted,
|
1462
|
+
limit=limit,
|
1463
|
+
offset=offset,
|
1464
|
+
_request_timeout=_request_timeout,
|
1465
|
+
_request_auth=_request_auth,
|
1466
|
+
_content_type=_content_type,
|
1467
|
+
_headers=_headers,
|
1468
|
+
_host_index=_host_index,
|
1469
|
+
)
|
1470
|
+
|
1471
|
+
else:
|
1472
|
+
return self._get_bots_async_with_http_info(
|
1473
|
+
include_deleted=include_deleted,
|
1474
|
+
limit=limit,
|
1475
|
+
offset=offset,
|
1476
|
+
_request_timeout=_request_timeout,
|
1477
|
+
_request_auth=_request_auth,
|
1478
|
+
_content_type=_content_type,
|
1479
|
+
_headers=_headers,
|
1480
|
+
_host_index=_host_index,
|
1481
|
+
)
|
1482
|
+
|
1483
|
+
@validate_call
|
1484
|
+
def get_bots_without_preload_content(
|
1485
|
+
self,
|
1486
|
+
include_deleted: Optional[StrictBool] = None,
|
1487
|
+
limit: Optional[StrictInt] = None,
|
1488
|
+
offset: Optional[StrictInt] = None,
|
1489
|
+
_request_timeout: Union[
|
1490
|
+
None,
|
1491
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1492
|
+
Tuple[
|
1493
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1494
|
+
],
|
1495
|
+
] = None,
|
1496
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1497
|
+
_content_type: Optional[StrictStr] = None,
|
1498
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1499
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1500
|
+
) -> RESTResponseType:
|
1501
|
+
"""Get Bots without preloading content
|
1502
|
+
|
1503
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1504
|
+
"""
|
1505
|
+
if self.is_sync:
|
1506
|
+
return self._get_bots_sync_without_preload_content(
|
1507
|
+
include_deleted=include_deleted,
|
1508
|
+
limit=limit,
|
1509
|
+
offset=offset,
|
1510
|
+
_request_timeout=_request_timeout,
|
1511
|
+
_request_auth=_request_auth,
|
1512
|
+
_content_type=_content_type,
|
1513
|
+
_headers=_headers,
|
1514
|
+
_host_index=_host_index,
|
1515
|
+
)
|
759
1516
|
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
_host=_host,
|
772
|
-
_request_auth=_request_auth,
|
773
|
-
)
|
1517
|
+
else:
|
1518
|
+
return self._get_bots_async_without_preload_content(
|
1519
|
+
include_deleted=include_deleted,
|
1520
|
+
limit=limit,
|
1521
|
+
offset=offset,
|
1522
|
+
_request_timeout=_request_timeout,
|
1523
|
+
_request_auth=_request_auth,
|
1524
|
+
_content_type=_content_type,
|
1525
|
+
_headers=_headers,
|
1526
|
+
_host_index=_host_index,
|
1527
|
+
)
|
774
1528
|
|
1529
|
+
# Private async implementation methods
|
775
1530
|
@validate_call
|
776
|
-
async def
|
1531
|
+
async def _get_bots_async(
|
777
1532
|
self,
|
778
1533
|
include_deleted: Optional[StrictBool] = None,
|
779
1534
|
limit: Optional[StrictInt] = None,
|
@@ -844,7 +1599,7 @@ class BotsApi:
|
|
844
1599
|
).data
|
845
1600
|
|
846
1601
|
@validate_call
|
847
|
-
async def
|
1602
|
+
async def _get_bots_async_with_http_info(
|
848
1603
|
self,
|
849
1604
|
include_deleted: Optional[StrictBool] = None,
|
850
1605
|
limit: Optional[StrictInt] = None,
|
@@ -910,12 +1665,11 @@ class BotsApi:
|
|
910
1665
|
)
|
911
1666
|
await response_data.read()
|
912
1667
|
return self.api_client.response_deserialize(
|
913
|
-
response_data=response_data,
|
914
|
-
response_types_map=_response_types_map,
|
1668
|
+
response_data=response_data, response_types_map=_response_types_map
|
915
1669
|
)
|
916
1670
|
|
917
1671
|
@validate_call
|
918
|
-
async def
|
1672
|
+
async def _get_bots_async_without_preload_content(
|
919
1673
|
self,
|
920
1674
|
include_deleted: Optional[StrictBool] = None,
|
921
1675
|
limit: Optional[StrictInt] = None,
|
@@ -979,7 +1733,98 @@ class BotsApi:
|
|
979
1733
|
response_data = await self.api_client.call_api(
|
980
1734
|
*_param, _request_timeout=_request_timeout
|
981
1735
|
)
|
982
|
-
return response_data
|
1736
|
+
return response_data
|
1737
|
+
|
1738
|
+
# Private sync implementation methods
|
1739
|
+
@validate_call
|
1740
|
+
def _get_bots_sync(
|
1741
|
+
self,
|
1742
|
+
include_deleted: Optional[StrictBool] = None,
|
1743
|
+
limit: Optional[StrictInt] = None,
|
1744
|
+
offset: Optional[StrictInt] = None,
|
1745
|
+
_request_timeout: Union[
|
1746
|
+
None,
|
1747
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1748
|
+
Tuple[
|
1749
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1750
|
+
],
|
1751
|
+
] = None,
|
1752
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1753
|
+
_content_type: Optional[StrictStr] = None,
|
1754
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1755
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1756
|
+
) -> List[Bot]:
|
1757
|
+
"""Synchronous version of get_bots"""
|
1758
|
+
return async_to_sync(self._get_bots_async)(
|
1759
|
+
include_deleted=include_deleted,
|
1760
|
+
limit=limit,
|
1761
|
+
offset=offset,
|
1762
|
+
_request_timeout=_request_timeout,
|
1763
|
+
_request_auth=_request_auth,
|
1764
|
+
_content_type=_content_type,
|
1765
|
+
_headers=_headers,
|
1766
|
+
_host_index=_host_index,
|
1767
|
+
)
|
1768
|
+
|
1769
|
+
@validate_call
|
1770
|
+
def _get_bots_sync_with_http_info(
|
1771
|
+
self,
|
1772
|
+
include_deleted: Optional[StrictBool] = None,
|
1773
|
+
limit: Optional[StrictInt] = None,
|
1774
|
+
offset: Optional[StrictInt] = None,
|
1775
|
+
_request_timeout: Union[
|
1776
|
+
None,
|
1777
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1778
|
+
Tuple[
|
1779
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1780
|
+
],
|
1781
|
+
] = None,
|
1782
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1783
|
+
_content_type: Optional[StrictStr] = None,
|
1784
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1785
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1786
|
+
) -> ApiResponse[List[Bot]]:
|
1787
|
+
"""Synchronous version of get_bots_with_http_info"""
|
1788
|
+
return async_to_sync(self._get_bots_async_with_http_info)(
|
1789
|
+
include_deleted=include_deleted,
|
1790
|
+
limit=limit,
|
1791
|
+
offset=offset,
|
1792
|
+
_request_timeout=_request_timeout,
|
1793
|
+
_request_auth=_request_auth,
|
1794
|
+
_content_type=_content_type,
|
1795
|
+
_headers=_headers,
|
1796
|
+
_host_index=_host_index,
|
1797
|
+
)
|
1798
|
+
|
1799
|
+
@validate_call
|
1800
|
+
def _get_bots_sync_without_preload_content(
|
1801
|
+
self,
|
1802
|
+
include_deleted: Optional[StrictBool] = None,
|
1803
|
+
limit: Optional[StrictInt] = None,
|
1804
|
+
offset: Optional[StrictInt] = None,
|
1805
|
+
_request_timeout: Union[
|
1806
|
+
None,
|
1807
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1808
|
+
Tuple[
|
1809
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1810
|
+
],
|
1811
|
+
] = None,
|
1812
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1813
|
+
_content_type: Optional[StrictStr] = None,
|
1814
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1815
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1816
|
+
) -> RESTResponseType:
|
1817
|
+
"""Synchronous version of get_bots_without_preload_content"""
|
1818
|
+
return async_to_sync(self._get_bots_async_without_preload_content)(
|
1819
|
+
include_deleted=include_deleted,
|
1820
|
+
limit=limit,
|
1821
|
+
offset=offset,
|
1822
|
+
_request_timeout=_request_timeout,
|
1823
|
+
_request_auth=_request_auth,
|
1824
|
+
_content_type=_content_type,
|
1825
|
+
_headers=_headers,
|
1826
|
+
_host_index=_host_index,
|
1827
|
+
)
|
983
1828
|
|
984
1829
|
def _get_bots_serialize(
|
985
1830
|
self,
|
@@ -1048,7 +1893,137 @@ class BotsApi:
|
|
1048
1893
|
)
|
1049
1894
|
|
1050
1895
|
@validate_call
|
1051
|
-
|
1896
|
+
def update_bot(
|
1897
|
+
self,
|
1898
|
+
id: StrictStr,
|
1899
|
+
bot_update: BotUpdate,
|
1900
|
+
_request_timeout: Union[
|
1901
|
+
None,
|
1902
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1903
|
+
Tuple[
|
1904
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1905
|
+
],
|
1906
|
+
] = None,
|
1907
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1908
|
+
_content_type: Optional[StrictStr] = None,
|
1909
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1910
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1911
|
+
) -> Bot:
|
1912
|
+
"""Update Bot
|
1913
|
+
|
1914
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1915
|
+
"""
|
1916
|
+
if self.is_sync:
|
1917
|
+
return self._update_bot_sync(
|
1918
|
+
id=id,
|
1919
|
+
bot_update=bot_update,
|
1920
|
+
_request_timeout=_request_timeout,
|
1921
|
+
_request_auth=_request_auth,
|
1922
|
+
_content_type=_content_type,
|
1923
|
+
_headers=_headers,
|
1924
|
+
_host_index=_host_index,
|
1925
|
+
)
|
1926
|
+
|
1927
|
+
else:
|
1928
|
+
return self._update_bot_async(
|
1929
|
+
id=id,
|
1930
|
+
bot_update=bot_update,
|
1931
|
+
_request_timeout=_request_timeout,
|
1932
|
+
_request_auth=_request_auth,
|
1933
|
+
_content_type=_content_type,
|
1934
|
+
_headers=_headers,
|
1935
|
+
_host_index=_host_index,
|
1936
|
+
)
|
1937
|
+
|
1938
|
+
@validate_call
|
1939
|
+
def update_bot_with_http_info(
|
1940
|
+
self,
|
1941
|
+
id: StrictStr,
|
1942
|
+
bot_update: BotUpdate,
|
1943
|
+
_request_timeout: Union[
|
1944
|
+
None,
|
1945
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1946
|
+
Tuple[
|
1947
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1948
|
+
],
|
1949
|
+
] = None,
|
1950
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1951
|
+
_content_type: Optional[StrictStr] = None,
|
1952
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1953
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1954
|
+
) -> ApiResponse[Bot]:
|
1955
|
+
"""Update Bot with HTTP info
|
1956
|
+
|
1957
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1958
|
+
"""
|
1959
|
+
if self.is_sync:
|
1960
|
+
return self._update_bot_sync_with_http_info(
|
1961
|
+
id=id,
|
1962
|
+
bot_update=bot_update,
|
1963
|
+
_request_timeout=_request_timeout,
|
1964
|
+
_request_auth=_request_auth,
|
1965
|
+
_content_type=_content_type,
|
1966
|
+
_headers=_headers,
|
1967
|
+
_host_index=_host_index,
|
1968
|
+
)
|
1969
|
+
|
1970
|
+
else:
|
1971
|
+
return self._update_bot_async_with_http_info(
|
1972
|
+
id=id,
|
1973
|
+
bot_update=bot_update,
|
1974
|
+
_request_timeout=_request_timeout,
|
1975
|
+
_request_auth=_request_auth,
|
1976
|
+
_content_type=_content_type,
|
1977
|
+
_headers=_headers,
|
1978
|
+
_host_index=_host_index,
|
1979
|
+
)
|
1980
|
+
|
1981
|
+
@validate_call
|
1982
|
+
def update_bot_without_preload_content(
|
1983
|
+
self,
|
1984
|
+
id: StrictStr,
|
1985
|
+
bot_update: BotUpdate,
|
1986
|
+
_request_timeout: Union[
|
1987
|
+
None,
|
1988
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1989
|
+
Tuple[
|
1990
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1991
|
+
],
|
1992
|
+
] = None,
|
1993
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1994
|
+
_content_type: Optional[StrictStr] = None,
|
1995
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1996
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1997
|
+
) -> RESTResponseType:
|
1998
|
+
"""Update Bot without preloading content
|
1999
|
+
|
2000
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
2001
|
+
"""
|
2002
|
+
if self.is_sync:
|
2003
|
+
return self._update_bot_sync_without_preload_content(
|
2004
|
+
id=id,
|
2005
|
+
bot_update=bot_update,
|
2006
|
+
_request_timeout=_request_timeout,
|
2007
|
+
_request_auth=_request_auth,
|
2008
|
+
_content_type=_content_type,
|
2009
|
+
_headers=_headers,
|
2010
|
+
_host_index=_host_index,
|
2011
|
+
)
|
2012
|
+
|
2013
|
+
else:
|
2014
|
+
return self._update_bot_async_without_preload_content(
|
2015
|
+
id=id,
|
2016
|
+
bot_update=bot_update,
|
2017
|
+
_request_timeout=_request_timeout,
|
2018
|
+
_request_auth=_request_auth,
|
2019
|
+
_content_type=_content_type,
|
2020
|
+
_headers=_headers,
|
2021
|
+
_host_index=_host_index,
|
2022
|
+
)
|
2023
|
+
|
2024
|
+
# Private async implementation methods
|
2025
|
+
@validate_call
|
2026
|
+
async def _update_bot_async(
|
1052
2027
|
self,
|
1053
2028
|
id: StrictStr,
|
1054
2029
|
bot_update: BotUpdate,
|
@@ -1116,7 +2091,7 @@ class BotsApi:
|
|
1116
2091
|
).data
|
1117
2092
|
|
1118
2093
|
@validate_call
|
1119
|
-
async def
|
2094
|
+
async def _update_bot_async_with_http_info(
|
1120
2095
|
self,
|
1121
2096
|
id: StrictStr,
|
1122
2097
|
bot_update: BotUpdate,
|
@@ -1179,12 +2154,11 @@ class BotsApi:
|
|
1179
2154
|
)
|
1180
2155
|
await response_data.read()
|
1181
2156
|
return self.api_client.response_deserialize(
|
1182
|
-
response_data=response_data,
|
1183
|
-
response_types_map=_response_types_map,
|
2157
|
+
response_data=response_data, response_types_map=_response_types_map
|
1184
2158
|
)
|
1185
2159
|
|
1186
2160
|
@validate_call
|
1187
|
-
async def
|
2161
|
+
async def _update_bot_async_without_preload_content(
|
1188
2162
|
self,
|
1189
2163
|
id: StrictStr,
|
1190
2164
|
bot_update: BotUpdate,
|
@@ -1245,7 +2219,92 @@ class BotsApi:
|
|
1245
2219
|
response_data = await self.api_client.call_api(
|
1246
2220
|
*_param, _request_timeout=_request_timeout
|
1247
2221
|
)
|
1248
|
-
return response_data
|
2222
|
+
return response_data
|
2223
|
+
|
2224
|
+
# Private sync implementation methods
|
2225
|
+
@validate_call
|
2226
|
+
def _update_bot_sync(
|
2227
|
+
self,
|
2228
|
+
id: StrictStr,
|
2229
|
+
bot_update: BotUpdate,
|
2230
|
+
_request_timeout: Union[
|
2231
|
+
None,
|
2232
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2233
|
+
Tuple[
|
2234
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2235
|
+
],
|
2236
|
+
] = None,
|
2237
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2238
|
+
_content_type: Optional[StrictStr] = None,
|
2239
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2240
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2241
|
+
) -> Bot:
|
2242
|
+
"""Synchronous version of update_bot"""
|
2243
|
+
return async_to_sync(self._update_bot_async)(
|
2244
|
+
id=id,
|
2245
|
+
bot_update=bot_update,
|
2246
|
+
_request_timeout=_request_timeout,
|
2247
|
+
_request_auth=_request_auth,
|
2248
|
+
_content_type=_content_type,
|
2249
|
+
_headers=_headers,
|
2250
|
+
_host_index=_host_index,
|
2251
|
+
)
|
2252
|
+
|
2253
|
+
@validate_call
|
2254
|
+
def _update_bot_sync_with_http_info(
|
2255
|
+
self,
|
2256
|
+
id: StrictStr,
|
2257
|
+
bot_update: BotUpdate,
|
2258
|
+
_request_timeout: Union[
|
2259
|
+
None,
|
2260
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2261
|
+
Tuple[
|
2262
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2263
|
+
],
|
2264
|
+
] = None,
|
2265
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2266
|
+
_content_type: Optional[StrictStr] = None,
|
2267
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2268
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2269
|
+
) -> ApiResponse[Bot]:
|
2270
|
+
"""Synchronous version of update_bot_with_http_info"""
|
2271
|
+
return async_to_sync(self._update_bot_async_with_http_info)(
|
2272
|
+
id=id,
|
2273
|
+
bot_update=bot_update,
|
2274
|
+
_request_timeout=_request_timeout,
|
2275
|
+
_request_auth=_request_auth,
|
2276
|
+
_content_type=_content_type,
|
2277
|
+
_headers=_headers,
|
2278
|
+
_host_index=_host_index,
|
2279
|
+
)
|
2280
|
+
|
2281
|
+
@validate_call
|
2282
|
+
def _update_bot_sync_without_preload_content(
|
2283
|
+
self,
|
2284
|
+
id: StrictStr,
|
2285
|
+
bot_update: BotUpdate,
|
2286
|
+
_request_timeout: Union[
|
2287
|
+
None,
|
2288
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2289
|
+
Tuple[
|
2290
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2291
|
+
],
|
2292
|
+
] = None,
|
2293
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2294
|
+
_content_type: Optional[StrictStr] = None,
|
2295
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2296
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2297
|
+
) -> RESTResponseType:
|
2298
|
+
"""Synchronous version of update_bot_without_preload_content"""
|
2299
|
+
return async_to_sync(self._update_bot_async_without_preload_content)(
|
2300
|
+
id=id,
|
2301
|
+
bot_update=bot_update,
|
2302
|
+
_request_timeout=_request_timeout,
|
2303
|
+
_request_auth=_request_auth,
|
2304
|
+
_content_type=_content_type,
|
2305
|
+
_headers=_headers,
|
2306
|
+
_host_index=_host_index,
|
2307
|
+
)
|
1249
2308
|
|
1250
2309
|
def _update_bot_serialize(
|
1251
2310
|
self,
|