crypticorn 2.4.7__py3-none-any.whl → 2.5.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/cli/init.py +7 -4
- crypticorn/common/__init__.py +1 -0
- crypticorn/common/auth.py +7 -3
- crypticorn/common/exceptions.py +27 -0
- crypticorn/common/utils.py +7 -2
- crypticorn/klines/client/__init__.py +10 -3
- crypticorn/klines/client/api/__init__.py +1 -0
- crypticorn/klines/client/api/change_in_timeframe_api.py +331 -0
- crypticorn/klines/client/api/funding_rates_api.py +13 -13
- crypticorn/klines/client/api/health_check_api.py +8 -8
- crypticorn/klines/client/api/ohlcv_data_api.py +38 -26
- crypticorn/klines/client/api/symbols_api.py +26 -20
- crypticorn/klines/client/api/udf_api.py +229 -229
- crypticorn/klines/client/api_client.py +8 -5
- crypticorn/klines/client/configuration.py +80 -37
- crypticorn/klines/client/models/__init__.py +9 -3
- crypticorn/klines/client/models/base_response_list_change_in_timeframe_response.py +123 -0
- crypticorn/klines/client/models/change_in_timeframe_response.py +86 -0
- crypticorn/klines/client/models/market_type.py +35 -0
- crypticorn/klines/client/models/response_get_udf_history.py +198 -0
- crypticorn/klines/client/rest.py +111 -159
- crypticorn/metrics/main.py +1 -0
- crypticorn/pay/client/__init__.py +0 -3
- crypticorn/pay/client/api/now_payments_api.py +1 -53
- crypticorn/pay/client/models/__init__.py +0 -3
- crypticorn/pay/client/models/payment.py +3 -3
- crypticorn/pay/client/models/scope.py +6 -1
- crypticorn/trade/client/__init__.py +8 -6
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/api_keys_api.py +167 -273
- crypticorn/trade/client/api/bots_api.py +140 -226
- crypticorn/trade/client/api/exchanges_api.py +31 -51
- crypticorn/trade/client/api/futures_trading_panel_api.py +169 -272
- crypticorn/trade/client/api/notifications_api.py +200 -323
- crypticorn/trade/client/api/orders_api.py +40 -60
- crypticorn/trade/client/api/status_api.py +31 -49
- crypticorn/trade/client/api/strategies_api.py +137 -223
- crypticorn/trade/client/api/trading_actions_api.py +106 -170
- crypticorn/trade/client/api_client.py +111 -153
- crypticorn/trade/client/api_response.py +2 -3
- crypticorn/trade/client/configuration.py +128 -115
- crypticorn/trade/client/exceptions.py +25 -21
- crypticorn/trade/client/models/__init__.py +8 -6
- crypticorn/trade/client/models/action_model.py +108 -54
- crypticorn/trade/client/models/api_error_identifier.py +76 -72
- crypticorn/trade/client/models/api_error_level.py +9 -11
- crypticorn/trade/client/models/api_error_type.py +9 -11
- crypticorn/trade/client/models/bot_model.py +57 -36
- crypticorn/trade/client/models/bot_status.py +9 -11
- crypticorn/trade/client/models/exchange.py +7 -9
- crypticorn/trade/client/models/exchange_key_model.py +43 -32
- crypticorn/trade/client/models/execution_ids.py +18 -18
- crypticorn/trade/client/models/futures_balance.py +43 -27
- crypticorn/trade/client/models/futures_trading_action.py +102 -50
- crypticorn/trade/client/models/http_validation_error.py +19 -15
- crypticorn/trade/client/models/margin_mode.py +7 -9
- crypticorn/trade/client/models/market_type.py +7 -9
- crypticorn/trade/client/models/notification_model.py +52 -32
- crypticorn/trade/client/models/order_model.py +112 -72
- crypticorn/trade/client/models/order_status.py +10 -12
- crypticorn/trade/client/models/post_futures_action.py +20 -16
- crypticorn/trade/client/models/strategy_exchange_info.py +15 -16
- crypticorn/trade/client/models/strategy_model_input.py +61 -33
- crypticorn/trade/client/models/strategy_model_output.py +61 -33
- crypticorn/trade/client/models/tpsl.py +39 -25
- crypticorn/trade/client/models/trading_action_type.py +9 -11
- crypticorn/trade/client/models/validation_error.py +24 -18
- crypticorn/trade/client/models/validation_error_loc_inner.py +37 -16
- crypticorn/trade/client/rest.py +23 -38
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0rc2.dist-info}/METADATA +1 -1
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0rc2.dist-info}/RECORD +74 -68
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0rc2.dist-info}/WHEEL +1 -1
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0rc2.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0rc2.dist-info}/top_level.txt +0 -0
@@ -1,14 +1,14 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
3
|
"""
|
4
|
-
|
4
|
+
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
|
-
|
11
|
+
Do not edit the class manually.
|
12
12
|
""" # noqa: E501
|
13
13
|
|
14
14
|
import warnings
|
@@ -37,7 +37,6 @@ class BotsApi:
|
|
37
37
|
api_client = ApiClient.get_default()
|
38
38
|
self.api_client = api_client
|
39
39
|
|
40
|
-
|
41
40
|
@validate_call
|
42
41
|
async def create_bot(
|
43
42
|
self,
|
@@ -46,9 +45,8 @@ class BotsApi:
|
|
46
45
|
None,
|
47
46
|
Annotated[StrictFloat, Field(gt=0)],
|
48
47
|
Tuple[
|
49
|
-
Annotated[StrictFloat, Field(gt=0)],
|
50
|
-
|
51
|
-
]
|
48
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
49
|
+
],
|
52
50
|
] = None,
|
53
51
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
54
52
|
_content_type: Optional[StrictStr] = None,
|
@@ -81,23 +79,22 @@ class BotsApi:
|
|
81
79
|
in the spec for a single request.
|
82
80
|
:type _host_index: int, optional
|
83
81
|
:return: Returns the result object.
|
84
|
-
"""
|
82
|
+
""" # noqa: E501
|
85
83
|
|
86
84
|
_param = self._create_bot_serialize(
|
87
85
|
bot_model=bot_model,
|
88
86
|
_request_auth=_request_auth,
|
89
87
|
_content_type=_content_type,
|
90
88
|
_headers=_headers,
|
91
|
-
_host_index=_host_index
|
89
|
+
_host_index=_host_index,
|
92
90
|
)
|
93
91
|
|
94
92
|
_response_types_map: Dict[str, Optional[str]] = {
|
95
|
-
|
96
|
-
|
93
|
+
"201": "object",
|
94
|
+
"422": "HTTPValidationError",
|
97
95
|
}
|
98
96
|
response_data = await self.api_client.call_api(
|
99
|
-
*_param,
|
100
|
-
_request_timeout=_request_timeout
|
97
|
+
*_param, _request_timeout=_request_timeout
|
101
98
|
)
|
102
99
|
await response_data.read()
|
103
100
|
return self.api_client.response_deserialize(
|
@@ -105,7 +102,6 @@ class BotsApi:
|
|
105
102
|
response_types_map=_response_types_map,
|
106
103
|
).data
|
107
104
|
|
108
|
-
|
109
105
|
@validate_call
|
110
106
|
async def create_bot_with_http_info(
|
111
107
|
self,
|
@@ -114,9 +110,8 @@ class BotsApi:
|
|
114
110
|
None,
|
115
111
|
Annotated[StrictFloat, Field(gt=0)],
|
116
112
|
Tuple[
|
117
|
-
Annotated[StrictFloat, Field(gt=0)],
|
118
|
-
|
119
|
-
]
|
113
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
114
|
+
],
|
120
115
|
] = None,
|
121
116
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
122
117
|
_content_type: Optional[StrictStr] = None,
|
@@ -149,23 +144,22 @@ class BotsApi:
|
|
149
144
|
in the spec for a single request.
|
150
145
|
:type _host_index: int, optional
|
151
146
|
:return: Returns the result object.
|
152
|
-
"""
|
147
|
+
""" # noqa: E501
|
153
148
|
|
154
149
|
_param = self._create_bot_serialize(
|
155
150
|
bot_model=bot_model,
|
156
151
|
_request_auth=_request_auth,
|
157
152
|
_content_type=_content_type,
|
158
153
|
_headers=_headers,
|
159
|
-
_host_index=_host_index
|
154
|
+
_host_index=_host_index,
|
160
155
|
)
|
161
156
|
|
162
157
|
_response_types_map: Dict[str, Optional[str]] = {
|
163
|
-
|
164
|
-
|
158
|
+
"201": "object",
|
159
|
+
"422": "HTTPValidationError",
|
165
160
|
}
|
166
161
|
response_data = await self.api_client.call_api(
|
167
|
-
*_param,
|
168
|
-
_request_timeout=_request_timeout
|
162
|
+
*_param, _request_timeout=_request_timeout
|
169
163
|
)
|
170
164
|
await response_data.read()
|
171
165
|
return self.api_client.response_deserialize(
|
@@ -173,7 +167,6 @@ class BotsApi:
|
|
173
167
|
response_types_map=_response_types_map,
|
174
168
|
)
|
175
169
|
|
176
|
-
|
177
170
|
@validate_call
|
178
171
|
async def create_bot_without_preload_content(
|
179
172
|
self,
|
@@ -182,9 +175,8 @@ class BotsApi:
|
|
182
175
|
None,
|
183
176
|
Annotated[StrictFloat, Field(gt=0)],
|
184
177
|
Tuple[
|
185
|
-
Annotated[StrictFloat, Field(gt=0)],
|
186
|
-
|
187
|
-
]
|
178
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
179
|
+
],
|
188
180
|
] = None,
|
189
181
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
190
182
|
_content_type: Optional[StrictStr] = None,
|
@@ -217,27 +209,25 @@ class BotsApi:
|
|
217
209
|
in the spec for a single request.
|
218
210
|
:type _host_index: int, optional
|
219
211
|
:return: Returns the result object.
|
220
|
-
"""
|
212
|
+
""" # noqa: E501
|
221
213
|
|
222
214
|
_param = self._create_bot_serialize(
|
223
215
|
bot_model=bot_model,
|
224
216
|
_request_auth=_request_auth,
|
225
217
|
_content_type=_content_type,
|
226
218
|
_headers=_headers,
|
227
|
-
_host_index=_host_index
|
219
|
+
_host_index=_host_index,
|
228
220
|
)
|
229
221
|
|
230
222
|
_response_types_map: Dict[str, Optional[str]] = {
|
231
|
-
|
232
|
-
|
223
|
+
"201": "object",
|
224
|
+
"422": "HTTPValidationError",
|
233
225
|
}
|
234
226
|
response_data = await self.api_client.call_api(
|
235
|
-
*_param,
|
236
|
-
_request_timeout=_request_timeout
|
227
|
+
*_param, _request_timeout=_request_timeout
|
237
228
|
)
|
238
229
|
return response_data.response
|
239
230
|
|
240
|
-
|
241
231
|
def _create_bot_serialize(
|
242
232
|
self,
|
243
233
|
bot_model,
|
@@ -249,8 +239,7 @@ class BotsApi:
|
|
249
239
|
|
250
240
|
_host = None
|
251
241
|
|
252
|
-
_collection_formats: Dict[str, str] = {
|
253
|
-
}
|
242
|
+
_collection_formats: Dict[str, str] = {}
|
254
243
|
|
255
244
|
_path_params: Dict[str, str] = {}
|
256
245
|
_query_params: List[Tuple[str, str]] = []
|
@@ -269,38 +258,28 @@ class BotsApi:
|
|
269
258
|
if bot_model is not None:
|
270
259
|
_body_params = bot_model
|
271
260
|
|
272
|
-
|
273
261
|
# set the HTTP header `Accept`
|
274
|
-
if
|
275
|
-
_header_params[
|
276
|
-
[
|
277
|
-
'application/json'
|
278
|
-
]
|
262
|
+
if "Accept" not in _header_params:
|
263
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
264
|
+
["application/json"]
|
279
265
|
)
|
280
266
|
|
281
267
|
# set the HTTP header `Content-Type`
|
282
268
|
if _content_type:
|
283
|
-
_header_params[
|
269
|
+
_header_params["Content-Type"] = _content_type
|
284
270
|
else:
|
285
|
-
_default_content_type = (
|
286
|
-
|
287
|
-
[
|
288
|
-
'application/json'
|
289
|
-
]
|
290
|
-
)
|
271
|
+
_default_content_type = self.api_client.select_header_content_type(
|
272
|
+
["application/json"]
|
291
273
|
)
|
292
274
|
if _default_content_type is not None:
|
293
|
-
_header_params[
|
275
|
+
_header_params["Content-Type"] = _default_content_type
|
294
276
|
|
295
277
|
# authentication setting
|
296
|
-
_auth_settings: List[str] = [
|
297
|
-
'APIKeyHeader',
|
298
|
-
'HTTPBearer'
|
299
|
-
]
|
278
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
300
279
|
|
301
280
|
return self.api_client.param_serialize(
|
302
|
-
method=
|
303
|
-
resource_path=
|
281
|
+
method="POST",
|
282
|
+
resource_path="/bots",
|
304
283
|
path_params=_path_params,
|
305
284
|
query_params=_query_params,
|
306
285
|
header_params=_header_params,
|
@@ -310,12 +289,9 @@ class BotsApi:
|
|
310
289
|
auth_settings=_auth_settings,
|
311
290
|
collection_formats=_collection_formats,
|
312
291
|
_host=_host,
|
313
|
-
_request_auth=_request_auth
|
292
|
+
_request_auth=_request_auth,
|
314
293
|
)
|
315
294
|
|
316
|
-
|
317
|
-
|
318
|
-
|
319
295
|
@validate_call
|
320
296
|
async def delete_bot(
|
321
297
|
self,
|
@@ -324,9 +300,8 @@ class BotsApi:
|
|
324
300
|
None,
|
325
301
|
Annotated[StrictFloat, Field(gt=0)],
|
326
302
|
Tuple[
|
327
|
-
Annotated[StrictFloat, Field(gt=0)],
|
328
|
-
|
329
|
-
]
|
303
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
304
|
+
],
|
330
305
|
] = None,
|
331
306
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
332
307
|
_content_type: Optional[StrictStr] = None,
|
@@ -359,23 +334,22 @@ class BotsApi:
|
|
359
334
|
in the spec for a single request.
|
360
335
|
:type _host_index: int, optional
|
361
336
|
:return: Returns the result object.
|
362
|
-
"""
|
337
|
+
""" # noqa: E501
|
363
338
|
|
364
339
|
_param = self._delete_bot_serialize(
|
365
340
|
id=id,
|
366
341
|
_request_auth=_request_auth,
|
367
342
|
_content_type=_content_type,
|
368
343
|
_headers=_headers,
|
369
|
-
_host_index=_host_index
|
344
|
+
_host_index=_host_index,
|
370
345
|
)
|
371
346
|
|
372
347
|
_response_types_map: Dict[str, Optional[str]] = {
|
373
|
-
|
374
|
-
|
348
|
+
"200": "object",
|
349
|
+
"422": "HTTPValidationError",
|
375
350
|
}
|
376
351
|
response_data = await self.api_client.call_api(
|
377
|
-
*_param,
|
378
|
-
_request_timeout=_request_timeout
|
352
|
+
*_param, _request_timeout=_request_timeout
|
379
353
|
)
|
380
354
|
await response_data.read()
|
381
355
|
return self.api_client.response_deserialize(
|
@@ -383,7 +357,6 @@ class BotsApi:
|
|
383
357
|
response_types_map=_response_types_map,
|
384
358
|
).data
|
385
359
|
|
386
|
-
|
387
360
|
@validate_call
|
388
361
|
async def delete_bot_with_http_info(
|
389
362
|
self,
|
@@ -392,9 +365,8 @@ class BotsApi:
|
|
392
365
|
None,
|
393
366
|
Annotated[StrictFloat, Field(gt=0)],
|
394
367
|
Tuple[
|
395
|
-
Annotated[StrictFloat, Field(gt=0)],
|
396
|
-
|
397
|
-
]
|
368
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
369
|
+
],
|
398
370
|
] = None,
|
399
371
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
400
372
|
_content_type: Optional[StrictStr] = None,
|
@@ -427,23 +399,22 @@ class BotsApi:
|
|
427
399
|
in the spec for a single request.
|
428
400
|
:type _host_index: int, optional
|
429
401
|
:return: Returns the result object.
|
430
|
-
"""
|
402
|
+
""" # noqa: E501
|
431
403
|
|
432
404
|
_param = self._delete_bot_serialize(
|
433
405
|
id=id,
|
434
406
|
_request_auth=_request_auth,
|
435
407
|
_content_type=_content_type,
|
436
408
|
_headers=_headers,
|
437
|
-
_host_index=_host_index
|
409
|
+
_host_index=_host_index,
|
438
410
|
)
|
439
411
|
|
440
412
|
_response_types_map: Dict[str, Optional[str]] = {
|
441
|
-
|
442
|
-
|
413
|
+
"200": "object",
|
414
|
+
"422": "HTTPValidationError",
|
443
415
|
}
|
444
416
|
response_data = await self.api_client.call_api(
|
445
|
-
*_param,
|
446
|
-
_request_timeout=_request_timeout
|
417
|
+
*_param, _request_timeout=_request_timeout
|
447
418
|
)
|
448
419
|
await response_data.read()
|
449
420
|
return self.api_client.response_deserialize(
|
@@ -451,7 +422,6 @@ class BotsApi:
|
|
451
422
|
response_types_map=_response_types_map,
|
452
423
|
)
|
453
424
|
|
454
|
-
|
455
425
|
@validate_call
|
456
426
|
async def delete_bot_without_preload_content(
|
457
427
|
self,
|
@@ -460,9 +430,8 @@ class BotsApi:
|
|
460
430
|
None,
|
461
431
|
Annotated[StrictFloat, Field(gt=0)],
|
462
432
|
Tuple[
|
463
|
-
Annotated[StrictFloat, Field(gt=0)],
|
464
|
-
|
465
|
-
]
|
433
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
434
|
+
],
|
466
435
|
] = None,
|
467
436
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
468
437
|
_content_type: Optional[StrictStr] = None,
|
@@ -495,27 +464,25 @@ class BotsApi:
|
|
495
464
|
in the spec for a single request.
|
496
465
|
:type _host_index: int, optional
|
497
466
|
:return: Returns the result object.
|
498
|
-
"""
|
467
|
+
""" # noqa: E501
|
499
468
|
|
500
469
|
_param = self._delete_bot_serialize(
|
501
470
|
id=id,
|
502
471
|
_request_auth=_request_auth,
|
503
472
|
_content_type=_content_type,
|
504
473
|
_headers=_headers,
|
505
|
-
_host_index=_host_index
|
474
|
+
_host_index=_host_index,
|
506
475
|
)
|
507
476
|
|
508
477
|
_response_types_map: Dict[str, Optional[str]] = {
|
509
|
-
|
510
|
-
|
478
|
+
"200": "object",
|
479
|
+
"422": "HTTPValidationError",
|
511
480
|
}
|
512
481
|
response_data = await self.api_client.call_api(
|
513
|
-
*_param,
|
514
|
-
_request_timeout=_request_timeout
|
482
|
+
*_param, _request_timeout=_request_timeout
|
515
483
|
)
|
516
484
|
return response_data.response
|
517
485
|
|
518
|
-
|
519
486
|
def _delete_bot_serialize(
|
520
487
|
self,
|
521
488
|
id,
|
@@ -527,8 +494,7 @@ class BotsApi:
|
|
527
494
|
|
528
495
|
_host = None
|
529
496
|
|
530
|
-
_collection_formats: Dict[str, str] = {
|
531
|
-
}
|
497
|
+
_collection_formats: Dict[str, str] = {}
|
532
498
|
|
533
499
|
_path_params: Dict[str, str] = {}
|
534
500
|
_query_params: List[Tuple[str, str]] = []
|
@@ -541,31 +507,24 @@ class BotsApi:
|
|
541
507
|
|
542
508
|
# process the path parameters
|
543
509
|
if id is not None:
|
544
|
-
_path_params[
|
510
|
+
_path_params["id"] = id
|
545
511
|
# process the query parameters
|
546
512
|
# process the header parameters
|
547
513
|
# process the form parameters
|
548
514
|
# process the body parameter
|
549
515
|
|
550
|
-
|
551
516
|
# set the HTTP header `Accept`
|
552
|
-
if
|
553
|
-
_header_params[
|
554
|
-
[
|
555
|
-
'application/json'
|
556
|
-
]
|
517
|
+
if "Accept" not in _header_params:
|
518
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
519
|
+
["application/json"]
|
557
520
|
)
|
558
521
|
|
559
|
-
|
560
522
|
# authentication setting
|
561
|
-
_auth_settings: List[str] = [
|
562
|
-
'APIKeyHeader',
|
563
|
-
'HTTPBearer'
|
564
|
-
]
|
523
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
565
524
|
|
566
525
|
return self.api_client.param_serialize(
|
567
|
-
method=
|
568
|
-
resource_path=
|
526
|
+
method="DELETE",
|
527
|
+
resource_path="/bots/{id}",
|
569
528
|
path_params=_path_params,
|
570
529
|
query_params=_query_params,
|
571
530
|
header_params=_header_params,
|
@@ -575,12 +534,9 @@ class BotsApi:
|
|
575
534
|
auth_settings=_auth_settings,
|
576
535
|
collection_formats=_collection_formats,
|
577
536
|
_host=_host,
|
578
|
-
_request_auth=_request_auth
|
537
|
+
_request_auth=_request_auth,
|
579
538
|
)
|
580
539
|
|
581
|
-
|
582
|
-
|
583
|
-
|
584
540
|
@validate_call
|
585
541
|
async def get_bots(
|
586
542
|
self,
|
@@ -591,9 +547,8 @@ class BotsApi:
|
|
591
547
|
None,
|
592
548
|
Annotated[StrictFloat, Field(gt=0)],
|
593
549
|
Tuple[
|
594
|
-
Annotated[StrictFloat, Field(gt=0)],
|
595
|
-
|
596
|
-
]
|
550
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
551
|
+
],
|
597
552
|
] = None,
|
598
553
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
599
554
|
_content_type: Optional[StrictStr] = None,
|
@@ -629,7 +584,7 @@ class BotsApi:
|
|
629
584
|
in the spec for a single request.
|
630
585
|
:type _host_index: int, optional
|
631
586
|
:return: Returns the result object.
|
632
|
-
"""
|
587
|
+
""" # noqa: E501
|
633
588
|
|
634
589
|
_param = self._get_bots_serialize(
|
635
590
|
include_deleted=include_deleted,
|
@@ -638,16 +593,15 @@ class BotsApi:
|
|
638
593
|
_request_auth=_request_auth,
|
639
594
|
_content_type=_content_type,
|
640
595
|
_headers=_headers,
|
641
|
-
_host_index=_host_index
|
596
|
+
_host_index=_host_index,
|
642
597
|
)
|
643
598
|
|
644
599
|
_response_types_map: Dict[str, Optional[str]] = {
|
645
|
-
|
646
|
-
|
600
|
+
"200": "List[BotModel]",
|
601
|
+
"422": "HTTPValidationError",
|
647
602
|
}
|
648
603
|
response_data = await self.api_client.call_api(
|
649
|
-
*_param,
|
650
|
-
_request_timeout=_request_timeout
|
604
|
+
*_param, _request_timeout=_request_timeout
|
651
605
|
)
|
652
606
|
await response_data.read()
|
653
607
|
return self.api_client.response_deserialize(
|
@@ -655,7 +609,6 @@ class BotsApi:
|
|
655
609
|
response_types_map=_response_types_map,
|
656
610
|
).data
|
657
611
|
|
658
|
-
|
659
612
|
@validate_call
|
660
613
|
async def get_bots_with_http_info(
|
661
614
|
self,
|
@@ -666,9 +619,8 @@ class BotsApi:
|
|
666
619
|
None,
|
667
620
|
Annotated[StrictFloat, Field(gt=0)],
|
668
621
|
Tuple[
|
669
|
-
Annotated[StrictFloat, Field(gt=0)],
|
670
|
-
|
671
|
-
]
|
622
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
623
|
+
],
|
672
624
|
] = None,
|
673
625
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
674
626
|
_content_type: Optional[StrictStr] = None,
|
@@ -704,7 +656,7 @@ class BotsApi:
|
|
704
656
|
in the spec for a single request.
|
705
657
|
:type _host_index: int, optional
|
706
658
|
:return: Returns the result object.
|
707
|
-
"""
|
659
|
+
""" # noqa: E501
|
708
660
|
|
709
661
|
_param = self._get_bots_serialize(
|
710
662
|
include_deleted=include_deleted,
|
@@ -713,16 +665,15 @@ class BotsApi:
|
|
713
665
|
_request_auth=_request_auth,
|
714
666
|
_content_type=_content_type,
|
715
667
|
_headers=_headers,
|
716
|
-
_host_index=_host_index
|
668
|
+
_host_index=_host_index,
|
717
669
|
)
|
718
670
|
|
719
671
|
_response_types_map: Dict[str, Optional[str]] = {
|
720
|
-
|
721
|
-
|
672
|
+
"200": "List[BotModel]",
|
673
|
+
"422": "HTTPValidationError",
|
722
674
|
}
|
723
675
|
response_data = await self.api_client.call_api(
|
724
|
-
*_param,
|
725
|
-
_request_timeout=_request_timeout
|
676
|
+
*_param, _request_timeout=_request_timeout
|
726
677
|
)
|
727
678
|
await response_data.read()
|
728
679
|
return self.api_client.response_deserialize(
|
@@ -730,7 +681,6 @@ class BotsApi:
|
|
730
681
|
response_types_map=_response_types_map,
|
731
682
|
)
|
732
683
|
|
733
|
-
|
734
684
|
@validate_call
|
735
685
|
async def get_bots_without_preload_content(
|
736
686
|
self,
|
@@ -741,9 +691,8 @@ class BotsApi:
|
|
741
691
|
None,
|
742
692
|
Annotated[StrictFloat, Field(gt=0)],
|
743
693
|
Tuple[
|
744
|
-
Annotated[StrictFloat, Field(gt=0)],
|
745
|
-
|
746
|
-
]
|
694
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
695
|
+
],
|
747
696
|
] = None,
|
748
697
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
749
698
|
_content_type: Optional[StrictStr] = None,
|
@@ -779,7 +728,7 @@ class BotsApi:
|
|
779
728
|
in the spec for a single request.
|
780
729
|
:type _host_index: int, optional
|
781
730
|
:return: Returns the result object.
|
782
|
-
"""
|
731
|
+
""" # noqa: E501
|
783
732
|
|
784
733
|
_param = self._get_bots_serialize(
|
785
734
|
include_deleted=include_deleted,
|
@@ -788,20 +737,18 @@ class BotsApi:
|
|
788
737
|
_request_auth=_request_auth,
|
789
738
|
_content_type=_content_type,
|
790
739
|
_headers=_headers,
|
791
|
-
_host_index=_host_index
|
740
|
+
_host_index=_host_index,
|
792
741
|
)
|
793
742
|
|
794
743
|
_response_types_map: Dict[str, Optional[str]] = {
|
795
|
-
|
796
|
-
|
744
|
+
"200": "List[BotModel]",
|
745
|
+
"422": "HTTPValidationError",
|
797
746
|
}
|
798
747
|
response_data = await self.api_client.call_api(
|
799
|
-
*_param,
|
800
|
-
_request_timeout=_request_timeout
|
748
|
+
*_param, _request_timeout=_request_timeout
|
801
749
|
)
|
802
750
|
return response_data.response
|
803
751
|
|
804
|
-
|
805
752
|
def _get_bots_serialize(
|
806
753
|
self,
|
807
754
|
include_deleted,
|
@@ -815,8 +762,7 @@ class BotsApi:
|
|
815
762
|
|
816
763
|
_host = None
|
817
764
|
|
818
|
-
_collection_formats: Dict[str, str] = {
|
819
|
-
}
|
765
|
+
_collection_formats: Dict[str, str] = {}
|
820
766
|
|
821
767
|
_path_params: Dict[str, str] = {}
|
822
768
|
_query_params: List[Tuple[str, str]] = []
|
@@ -830,40 +776,33 @@ class BotsApi:
|
|
830
776
|
# process the path parameters
|
831
777
|
# process the query parameters
|
832
778
|
if include_deleted is not None:
|
833
|
-
|
834
|
-
_query_params.append((
|
835
|
-
|
779
|
+
|
780
|
+
_query_params.append(("include_deleted", include_deleted))
|
781
|
+
|
836
782
|
if limit is not None:
|
837
|
-
|
838
|
-
_query_params.append((
|
839
|
-
|
783
|
+
|
784
|
+
_query_params.append(("limit", limit))
|
785
|
+
|
840
786
|
if offset is not None:
|
841
|
-
|
842
|
-
_query_params.append((
|
843
|
-
|
787
|
+
|
788
|
+
_query_params.append(("offset", offset))
|
789
|
+
|
844
790
|
# process the header parameters
|
845
791
|
# process the form parameters
|
846
792
|
# process the body parameter
|
847
793
|
|
848
|
-
|
849
794
|
# set the HTTP header `Accept`
|
850
|
-
if
|
851
|
-
_header_params[
|
852
|
-
[
|
853
|
-
'application/json'
|
854
|
-
]
|
795
|
+
if "Accept" not in _header_params:
|
796
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
797
|
+
["application/json"]
|
855
798
|
)
|
856
799
|
|
857
|
-
|
858
800
|
# authentication setting
|
859
|
-
_auth_settings: List[str] = [
|
860
|
-
'APIKeyHeader',
|
861
|
-
'HTTPBearer'
|
862
|
-
]
|
801
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
863
802
|
|
864
803
|
return self.api_client.param_serialize(
|
865
|
-
method=
|
866
|
-
resource_path=
|
804
|
+
method="GET",
|
805
|
+
resource_path="/bots",
|
867
806
|
path_params=_path_params,
|
868
807
|
query_params=_query_params,
|
869
808
|
header_params=_header_params,
|
@@ -873,12 +812,9 @@ class BotsApi:
|
|
873
812
|
auth_settings=_auth_settings,
|
874
813
|
collection_formats=_collection_formats,
|
875
814
|
_host=_host,
|
876
|
-
_request_auth=_request_auth
|
815
|
+
_request_auth=_request_auth,
|
877
816
|
)
|
878
817
|
|
879
|
-
|
880
|
-
|
881
|
-
|
882
818
|
@validate_call
|
883
819
|
async def update_bot(
|
884
820
|
self,
|
@@ -888,9 +824,8 @@ class BotsApi:
|
|
888
824
|
None,
|
889
825
|
Annotated[StrictFloat, Field(gt=0)],
|
890
826
|
Tuple[
|
891
|
-
Annotated[StrictFloat, Field(gt=0)],
|
892
|
-
|
893
|
-
]
|
827
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
828
|
+
],
|
894
829
|
] = None,
|
895
830
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
896
831
|
_content_type: Optional[StrictStr] = None,
|
@@ -925,7 +860,7 @@ class BotsApi:
|
|
925
860
|
in the spec for a single request.
|
926
861
|
:type _host_index: int, optional
|
927
862
|
:return: Returns the result object.
|
928
|
-
"""
|
863
|
+
""" # noqa: E501
|
929
864
|
|
930
865
|
_param = self._update_bot_serialize(
|
931
866
|
id=id,
|
@@ -933,16 +868,15 @@ class BotsApi:
|
|
933
868
|
_request_auth=_request_auth,
|
934
869
|
_content_type=_content_type,
|
935
870
|
_headers=_headers,
|
936
|
-
_host_index=_host_index
|
871
|
+
_host_index=_host_index,
|
937
872
|
)
|
938
873
|
|
939
874
|
_response_types_map: Dict[str, Optional[str]] = {
|
940
|
-
|
941
|
-
|
875
|
+
"200": "object",
|
876
|
+
"422": "HTTPValidationError",
|
942
877
|
}
|
943
878
|
response_data = await self.api_client.call_api(
|
944
|
-
*_param,
|
945
|
-
_request_timeout=_request_timeout
|
879
|
+
*_param, _request_timeout=_request_timeout
|
946
880
|
)
|
947
881
|
await response_data.read()
|
948
882
|
return self.api_client.response_deserialize(
|
@@ -950,7 +884,6 @@ class BotsApi:
|
|
950
884
|
response_types_map=_response_types_map,
|
951
885
|
).data
|
952
886
|
|
953
|
-
|
954
887
|
@validate_call
|
955
888
|
async def update_bot_with_http_info(
|
956
889
|
self,
|
@@ -960,9 +893,8 @@ class BotsApi:
|
|
960
893
|
None,
|
961
894
|
Annotated[StrictFloat, Field(gt=0)],
|
962
895
|
Tuple[
|
963
|
-
Annotated[StrictFloat, Field(gt=0)],
|
964
|
-
|
965
|
-
]
|
896
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
897
|
+
],
|
966
898
|
] = None,
|
967
899
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
968
900
|
_content_type: Optional[StrictStr] = None,
|
@@ -997,7 +929,7 @@ class BotsApi:
|
|
997
929
|
in the spec for a single request.
|
998
930
|
:type _host_index: int, optional
|
999
931
|
:return: Returns the result object.
|
1000
|
-
"""
|
932
|
+
""" # noqa: E501
|
1001
933
|
|
1002
934
|
_param = self._update_bot_serialize(
|
1003
935
|
id=id,
|
@@ -1005,16 +937,15 @@ class BotsApi:
|
|
1005
937
|
_request_auth=_request_auth,
|
1006
938
|
_content_type=_content_type,
|
1007
939
|
_headers=_headers,
|
1008
|
-
_host_index=_host_index
|
940
|
+
_host_index=_host_index,
|
1009
941
|
)
|
1010
942
|
|
1011
943
|
_response_types_map: Dict[str, Optional[str]] = {
|
1012
|
-
|
1013
|
-
|
944
|
+
"200": "object",
|
945
|
+
"422": "HTTPValidationError",
|
1014
946
|
}
|
1015
947
|
response_data = await self.api_client.call_api(
|
1016
|
-
*_param,
|
1017
|
-
_request_timeout=_request_timeout
|
948
|
+
*_param, _request_timeout=_request_timeout
|
1018
949
|
)
|
1019
950
|
await response_data.read()
|
1020
951
|
return self.api_client.response_deserialize(
|
@@ -1022,7 +953,6 @@ class BotsApi:
|
|
1022
953
|
response_types_map=_response_types_map,
|
1023
954
|
)
|
1024
955
|
|
1025
|
-
|
1026
956
|
@validate_call
|
1027
957
|
async def update_bot_without_preload_content(
|
1028
958
|
self,
|
@@ -1032,9 +962,8 @@ class BotsApi:
|
|
1032
962
|
None,
|
1033
963
|
Annotated[StrictFloat, Field(gt=0)],
|
1034
964
|
Tuple[
|
1035
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1036
|
-
|
1037
|
-
]
|
965
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
966
|
+
],
|
1038
967
|
] = None,
|
1039
968
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1040
969
|
_content_type: Optional[StrictStr] = None,
|
@@ -1069,7 +998,7 @@ class BotsApi:
|
|
1069
998
|
in the spec for a single request.
|
1070
999
|
:type _host_index: int, optional
|
1071
1000
|
:return: Returns the result object.
|
1072
|
-
"""
|
1001
|
+
""" # noqa: E501
|
1073
1002
|
|
1074
1003
|
_param = self._update_bot_serialize(
|
1075
1004
|
id=id,
|
@@ -1077,20 +1006,18 @@ class BotsApi:
|
|
1077
1006
|
_request_auth=_request_auth,
|
1078
1007
|
_content_type=_content_type,
|
1079
1008
|
_headers=_headers,
|
1080
|
-
_host_index=_host_index
|
1009
|
+
_host_index=_host_index,
|
1081
1010
|
)
|
1082
1011
|
|
1083
1012
|
_response_types_map: Dict[str, Optional[str]] = {
|
1084
|
-
|
1085
|
-
|
1013
|
+
"200": "object",
|
1014
|
+
"422": "HTTPValidationError",
|
1086
1015
|
}
|
1087
1016
|
response_data = await self.api_client.call_api(
|
1088
|
-
*_param,
|
1089
|
-
_request_timeout=_request_timeout
|
1017
|
+
*_param, _request_timeout=_request_timeout
|
1090
1018
|
)
|
1091
1019
|
return response_data.response
|
1092
1020
|
|
1093
|
-
|
1094
1021
|
def _update_bot_serialize(
|
1095
1022
|
self,
|
1096
1023
|
id,
|
@@ -1103,8 +1030,7 @@ class BotsApi:
|
|
1103
1030
|
|
1104
1031
|
_host = None
|
1105
1032
|
|
1106
|
-
_collection_formats: Dict[str, str] = {
|
1107
|
-
}
|
1033
|
+
_collection_formats: Dict[str, str] = {}
|
1108
1034
|
|
1109
1035
|
_path_params: Dict[str, str] = {}
|
1110
1036
|
_query_params: List[Tuple[str, str]] = []
|
@@ -1117,7 +1043,7 @@ class BotsApi:
|
|
1117
1043
|
|
1118
1044
|
# process the path parameters
|
1119
1045
|
if id is not None:
|
1120
|
-
_path_params[
|
1046
|
+
_path_params["id"] = id
|
1121
1047
|
# process the query parameters
|
1122
1048
|
# process the header parameters
|
1123
1049
|
# process the form parameters
|
@@ -1125,38 +1051,28 @@ class BotsApi:
|
|
1125
1051
|
if bot_model is not None:
|
1126
1052
|
_body_params = bot_model
|
1127
1053
|
|
1128
|
-
|
1129
1054
|
# set the HTTP header `Accept`
|
1130
|
-
if
|
1131
|
-
_header_params[
|
1132
|
-
[
|
1133
|
-
'application/json'
|
1134
|
-
]
|
1055
|
+
if "Accept" not in _header_params:
|
1056
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
1057
|
+
["application/json"]
|
1135
1058
|
)
|
1136
1059
|
|
1137
1060
|
# set the HTTP header `Content-Type`
|
1138
1061
|
if _content_type:
|
1139
|
-
_header_params[
|
1062
|
+
_header_params["Content-Type"] = _content_type
|
1140
1063
|
else:
|
1141
|
-
_default_content_type = (
|
1142
|
-
|
1143
|
-
[
|
1144
|
-
'application/json'
|
1145
|
-
]
|
1146
|
-
)
|
1064
|
+
_default_content_type = self.api_client.select_header_content_type(
|
1065
|
+
["application/json"]
|
1147
1066
|
)
|
1148
1067
|
if _default_content_type is not None:
|
1149
|
-
_header_params[
|
1068
|
+
_header_params["Content-Type"] = _default_content_type
|
1150
1069
|
|
1151
1070
|
# authentication setting
|
1152
|
-
_auth_settings: List[str] = [
|
1153
|
-
'APIKeyHeader',
|
1154
|
-
'HTTPBearer'
|
1155
|
-
]
|
1071
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
1156
1072
|
|
1157
1073
|
return self.api_client.param_serialize(
|
1158
|
-
method=
|
1159
|
-
resource_path=
|
1074
|
+
method="PUT",
|
1075
|
+
resource_path="/bots/{id}",
|
1160
1076
|
path_params=_path_params,
|
1161
1077
|
query_params=_query_params,
|
1162
1078
|
header_params=_header_params,
|
@@ -1166,7 +1082,5 @@ class BotsApi:
|
|
1166
1082
|
auth_settings=_auth_settings,
|
1167
1083
|
collection_formats=_collection_formats,
|
1168
1084
|
_host=_host,
|
1169
|
-
_request_auth=_request_auth
|
1085
|
+
_request_auth=_request_auth,
|
1170
1086
|
)
|
1171
|
-
|
1172
|
-
|