crypticorn 2.4.6__py3-none-any.whl → 2.4.7__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/common/auth.py +7 -9
- crypticorn/common/errors.py +5 -0
- crypticorn/common/utils.py +15 -5
- crypticorn/klines/main.py +10 -5
- crypticorn/metrics/main.py +5 -4
- crypticorn/trade/client/__init__.py +6 -8
- crypticorn/trade/client/api/__init__.py +1 -0
- crypticorn/trade/client/api/api_keys_api.py +273 -167
- crypticorn/trade/client/api/bots_api.py +226 -140
- crypticorn/trade/client/api/exchanges_api.py +51 -31
- crypticorn/trade/client/api/futures_trading_panel_api.py +272 -169
- crypticorn/trade/client/api/notifications_api.py +323 -200
- crypticorn/trade/client/api/orders_api.py +60 -40
- crypticorn/trade/client/api/status_api.py +49 -31
- crypticorn/trade/client/api/strategies_api.py +223 -137
- crypticorn/trade/client/api/trading_actions_api.py +170 -106
- crypticorn/trade/client/api_client.py +153 -111
- crypticorn/trade/client/api_response.py +3 -2
- crypticorn/trade/client/configuration.py +115 -128
- crypticorn/trade/client/exceptions.py +21 -25
- crypticorn/trade/client/models/__init__.py +6 -8
- crypticorn/trade/client/models/action_model.py +54 -108
- crypticorn/trade/client/models/api_error_identifier.py +72 -76
- crypticorn/trade/client/models/api_error_level.py +11 -9
- crypticorn/trade/client/models/api_error_type.py +11 -9
- crypticorn/trade/client/models/bot_model.py +36 -57
- crypticorn/trade/client/models/bot_status.py +11 -9
- crypticorn/trade/client/models/exchange.py +9 -7
- crypticorn/trade/client/models/exchange_key_model.py +34 -44
- crypticorn/trade/client/models/execution_ids.py +18 -18
- crypticorn/trade/client/models/futures_balance.py +27 -43
- crypticorn/trade/client/models/futures_trading_action.py +50 -102
- crypticorn/trade/client/models/http_validation_error.py +15 -19
- crypticorn/trade/client/models/margin_mode.py +9 -7
- crypticorn/trade/client/models/market_type.py +9 -7
- crypticorn/trade/client/models/notification_model.py +32 -52
- crypticorn/trade/client/models/order_model.py +72 -112
- crypticorn/trade/client/models/order_status.py +12 -10
- crypticorn/trade/client/models/post_futures_action.py +16 -20
- crypticorn/trade/client/models/strategy_exchange_info.py +16 -15
- crypticorn/trade/client/models/strategy_model_input.py +33 -61
- crypticorn/trade/client/models/strategy_model_output.py +33 -61
- crypticorn/trade/client/models/tpsl.py +25 -39
- crypticorn/trade/client/models/trading_action_type.py +11 -9
- crypticorn/trade/client/models/validation_error.py +18 -24
- crypticorn/trade/client/models/validation_error_loc_inner.py +16 -37
- crypticorn/trade/client/rest.py +38 -23
- {crypticorn-2.4.6.dist-info → crypticorn-2.4.7.dist-info}/METADATA +8 -2
- {crypticorn-2.4.6.dist-info → crypticorn-2.4.7.dist-info}/RECORD +52 -52
- {crypticorn-2.4.6.dist-info → crypticorn-2.4.7.dist-info}/WHEEL +0 -0
- {crypticorn-2.4.6.dist-info → crypticorn-2.4.7.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.4.6.dist-info → crypticorn-2.4.7.dist-info}/top_level.txt +0 -0
@@ -1,14 +1,14 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
3
|
"""
|
4
|
-
Trading API
|
4
|
+
Trading API
|
5
5
|
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
7
|
|
8
|
-
The version of the OpenAPI document: 0.1.0
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
|
-
Do not edit the class manually.
|
11
|
+
Do not edit the class manually.
|
12
12
|
""" # noqa: E501
|
13
13
|
|
14
14
|
import warnings
|
@@ -37,6 +37,7 @@ class NotificationsApi:
|
|
37
37
|
api_client = ApiClient.get_default()
|
38
38
|
self.api_client = api_client
|
39
39
|
|
40
|
+
|
40
41
|
@validate_call
|
41
42
|
async def create_notification(
|
42
43
|
self,
|
@@ -45,8 +46,9 @@ class NotificationsApi:
|
|
45
46
|
None,
|
46
47
|
Annotated[StrictFloat, Field(gt=0)],
|
47
48
|
Tuple[
|
48
|
-
Annotated[StrictFloat, Field(gt=0)],
|
49
|
-
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
50
|
+
Annotated[StrictFloat, Field(gt=0)]
|
51
|
+
]
|
50
52
|
] = None,
|
51
53
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
52
54
|
_content_type: Optional[StrictStr] = None,
|
@@ -79,22 +81,23 @@ class NotificationsApi:
|
|
79
81
|
in the spec for a single request.
|
80
82
|
:type _host_index: int, optional
|
81
83
|
:return: Returns the result object.
|
82
|
-
"""
|
84
|
+
""" # noqa: E501
|
83
85
|
|
84
86
|
_param = self._create_notification_serialize(
|
85
87
|
notification_model=notification_model,
|
86
88
|
_request_auth=_request_auth,
|
87
89
|
_content_type=_content_type,
|
88
90
|
_headers=_headers,
|
89
|
-
_host_index=_host_index
|
91
|
+
_host_index=_host_index
|
90
92
|
)
|
91
93
|
|
92
94
|
_response_types_map: Dict[str, Optional[str]] = {
|
93
|
-
|
94
|
-
|
95
|
+
'200': "object",
|
96
|
+
'422': "HTTPValidationError",
|
95
97
|
}
|
96
98
|
response_data = await self.api_client.call_api(
|
97
|
-
*_param,
|
99
|
+
*_param,
|
100
|
+
_request_timeout=_request_timeout
|
98
101
|
)
|
99
102
|
await response_data.read()
|
100
103
|
return self.api_client.response_deserialize(
|
@@ -102,6 +105,7 @@ class NotificationsApi:
|
|
102
105
|
response_types_map=_response_types_map,
|
103
106
|
).data
|
104
107
|
|
108
|
+
|
105
109
|
@validate_call
|
106
110
|
async def create_notification_with_http_info(
|
107
111
|
self,
|
@@ -110,8 +114,9 @@ class NotificationsApi:
|
|
110
114
|
None,
|
111
115
|
Annotated[StrictFloat, Field(gt=0)],
|
112
116
|
Tuple[
|
113
|
-
Annotated[StrictFloat, Field(gt=0)],
|
114
|
-
|
117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
118
|
+
Annotated[StrictFloat, Field(gt=0)]
|
119
|
+
]
|
115
120
|
] = None,
|
116
121
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
117
122
|
_content_type: Optional[StrictStr] = None,
|
@@ -144,22 +149,23 @@ class NotificationsApi:
|
|
144
149
|
in the spec for a single request.
|
145
150
|
:type _host_index: int, optional
|
146
151
|
:return: Returns the result object.
|
147
|
-
"""
|
152
|
+
""" # noqa: E501
|
148
153
|
|
149
154
|
_param = self._create_notification_serialize(
|
150
155
|
notification_model=notification_model,
|
151
156
|
_request_auth=_request_auth,
|
152
157
|
_content_type=_content_type,
|
153
158
|
_headers=_headers,
|
154
|
-
_host_index=_host_index
|
159
|
+
_host_index=_host_index
|
155
160
|
)
|
156
161
|
|
157
162
|
_response_types_map: Dict[str, Optional[str]] = {
|
158
|
-
|
159
|
-
|
163
|
+
'200': "object",
|
164
|
+
'422': "HTTPValidationError",
|
160
165
|
}
|
161
166
|
response_data = await self.api_client.call_api(
|
162
|
-
*_param,
|
167
|
+
*_param,
|
168
|
+
_request_timeout=_request_timeout
|
163
169
|
)
|
164
170
|
await response_data.read()
|
165
171
|
return self.api_client.response_deserialize(
|
@@ -167,6 +173,7 @@ class NotificationsApi:
|
|
167
173
|
response_types_map=_response_types_map,
|
168
174
|
)
|
169
175
|
|
176
|
+
|
170
177
|
@validate_call
|
171
178
|
async def create_notification_without_preload_content(
|
172
179
|
self,
|
@@ -175,8 +182,9 @@ class NotificationsApi:
|
|
175
182
|
None,
|
176
183
|
Annotated[StrictFloat, Field(gt=0)],
|
177
184
|
Tuple[
|
178
|
-
Annotated[StrictFloat, Field(gt=0)],
|
179
|
-
|
185
|
+
Annotated[StrictFloat, Field(gt=0)],
|
186
|
+
Annotated[StrictFloat, Field(gt=0)]
|
187
|
+
]
|
180
188
|
] = None,
|
181
189
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
182
190
|
_content_type: Optional[StrictStr] = None,
|
@@ -209,25 +217,27 @@ class NotificationsApi:
|
|
209
217
|
in the spec for a single request.
|
210
218
|
:type _host_index: int, optional
|
211
219
|
:return: Returns the result object.
|
212
|
-
"""
|
220
|
+
""" # noqa: E501
|
213
221
|
|
214
222
|
_param = self._create_notification_serialize(
|
215
223
|
notification_model=notification_model,
|
216
224
|
_request_auth=_request_auth,
|
217
225
|
_content_type=_content_type,
|
218
226
|
_headers=_headers,
|
219
|
-
_host_index=_host_index
|
227
|
+
_host_index=_host_index
|
220
228
|
)
|
221
229
|
|
222
230
|
_response_types_map: Dict[str, Optional[str]] = {
|
223
|
-
|
224
|
-
|
231
|
+
'200': "object",
|
232
|
+
'422': "HTTPValidationError",
|
225
233
|
}
|
226
234
|
response_data = await self.api_client.call_api(
|
227
|
-
*_param,
|
235
|
+
*_param,
|
236
|
+
_request_timeout=_request_timeout
|
228
237
|
)
|
229
238
|
return response_data.response
|
230
239
|
|
240
|
+
|
231
241
|
def _create_notification_serialize(
|
232
242
|
self,
|
233
243
|
notification_model,
|
@@ -239,7 +249,8 @@ class NotificationsApi:
|
|
239
249
|
|
240
250
|
_host = None
|
241
251
|
|
242
|
-
_collection_formats: Dict[str, str] = {
|
252
|
+
_collection_formats: Dict[str, str] = {
|
253
|
+
}
|
243
254
|
|
244
255
|
_path_params: Dict[str, str] = {}
|
245
256
|
_query_params: List[Tuple[str, str]] = []
|
@@ -258,28 +269,38 @@ class NotificationsApi:
|
|
258
269
|
if notification_model is not None:
|
259
270
|
_body_params = notification_model
|
260
271
|
|
272
|
+
|
261
273
|
# set the HTTP header `Accept`
|
262
|
-
if
|
263
|
-
_header_params[
|
264
|
-
[
|
274
|
+
if 'Accept' not in _header_params:
|
275
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
276
|
+
[
|
277
|
+
'application/json'
|
278
|
+
]
|
265
279
|
)
|
266
280
|
|
267
281
|
# set the HTTP header `Content-Type`
|
268
282
|
if _content_type:
|
269
|
-
_header_params[
|
283
|
+
_header_params['Content-Type'] = _content_type
|
270
284
|
else:
|
271
|
-
_default_content_type =
|
272
|
-
|
285
|
+
_default_content_type = (
|
286
|
+
self.api_client.select_header_content_type(
|
287
|
+
[
|
288
|
+
'application/json'
|
289
|
+
]
|
290
|
+
)
|
273
291
|
)
|
274
292
|
if _default_content_type is not None:
|
275
|
-
_header_params[
|
293
|
+
_header_params['Content-Type'] = _default_content_type
|
276
294
|
|
277
295
|
# authentication setting
|
278
|
-
_auth_settings: List[str] = [
|
296
|
+
_auth_settings: List[str] = [
|
297
|
+
'APIKeyHeader',
|
298
|
+
'HTTPBearer'
|
299
|
+
]
|
279
300
|
|
280
301
|
return self.api_client.param_serialize(
|
281
|
-
method=
|
282
|
-
resource_path=
|
302
|
+
method='POST',
|
303
|
+
resource_path='/notifications',
|
283
304
|
path_params=_path_params,
|
284
305
|
query_params=_query_params,
|
285
306
|
header_params=_header_params,
|
@@ -289,9 +310,12 @@ class NotificationsApi:
|
|
289
310
|
auth_settings=_auth_settings,
|
290
311
|
collection_formats=_collection_formats,
|
291
312
|
_host=_host,
|
292
|
-
_request_auth=_request_auth
|
313
|
+
_request_auth=_request_auth
|
293
314
|
)
|
294
315
|
|
316
|
+
|
317
|
+
|
318
|
+
|
295
319
|
@validate_call
|
296
320
|
async def delete_notification(
|
297
321
|
self,
|
@@ -300,8 +324,9 @@ class NotificationsApi:
|
|
300
324
|
None,
|
301
325
|
Annotated[StrictFloat, Field(gt=0)],
|
302
326
|
Tuple[
|
303
|
-
Annotated[StrictFloat, Field(gt=0)],
|
304
|
-
|
327
|
+
Annotated[StrictFloat, Field(gt=0)],
|
328
|
+
Annotated[StrictFloat, Field(gt=0)]
|
329
|
+
]
|
305
330
|
] = None,
|
306
331
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
307
332
|
_content_type: Optional[StrictStr] = None,
|
@@ -333,22 +358,23 @@ class NotificationsApi:
|
|
333
358
|
in the spec for a single request.
|
334
359
|
:type _host_index: int, optional
|
335
360
|
:return: Returns the result object.
|
336
|
-
"""
|
361
|
+
""" # noqa: E501
|
337
362
|
|
338
363
|
_param = self._delete_notification_serialize(
|
339
364
|
id=id,
|
340
365
|
_request_auth=_request_auth,
|
341
366
|
_content_type=_content_type,
|
342
367
|
_headers=_headers,
|
343
|
-
_host_index=_host_index
|
368
|
+
_host_index=_host_index
|
344
369
|
)
|
345
370
|
|
346
371
|
_response_types_map: Dict[str, Optional[str]] = {
|
347
|
-
|
348
|
-
|
372
|
+
'200': "object",
|
373
|
+
'422': "HTTPValidationError",
|
349
374
|
}
|
350
375
|
response_data = await self.api_client.call_api(
|
351
|
-
*_param,
|
376
|
+
*_param,
|
377
|
+
_request_timeout=_request_timeout
|
352
378
|
)
|
353
379
|
await response_data.read()
|
354
380
|
return self.api_client.response_deserialize(
|
@@ -356,6 +382,7 @@ class NotificationsApi:
|
|
356
382
|
response_types_map=_response_types_map,
|
357
383
|
).data
|
358
384
|
|
385
|
+
|
359
386
|
@validate_call
|
360
387
|
async def delete_notification_with_http_info(
|
361
388
|
self,
|
@@ -364,8 +391,9 @@ class NotificationsApi:
|
|
364
391
|
None,
|
365
392
|
Annotated[StrictFloat, Field(gt=0)],
|
366
393
|
Tuple[
|
367
|
-
Annotated[StrictFloat, Field(gt=0)],
|
368
|
-
|
394
|
+
Annotated[StrictFloat, Field(gt=0)],
|
395
|
+
Annotated[StrictFloat, Field(gt=0)]
|
396
|
+
]
|
369
397
|
] = None,
|
370
398
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
371
399
|
_content_type: Optional[StrictStr] = None,
|
@@ -397,22 +425,23 @@ class NotificationsApi:
|
|
397
425
|
in the spec for a single request.
|
398
426
|
:type _host_index: int, optional
|
399
427
|
:return: Returns the result object.
|
400
|
-
"""
|
428
|
+
""" # noqa: E501
|
401
429
|
|
402
430
|
_param = self._delete_notification_serialize(
|
403
431
|
id=id,
|
404
432
|
_request_auth=_request_auth,
|
405
433
|
_content_type=_content_type,
|
406
434
|
_headers=_headers,
|
407
|
-
_host_index=_host_index
|
435
|
+
_host_index=_host_index
|
408
436
|
)
|
409
437
|
|
410
438
|
_response_types_map: Dict[str, Optional[str]] = {
|
411
|
-
|
412
|
-
|
439
|
+
'200': "object",
|
440
|
+
'422': "HTTPValidationError",
|
413
441
|
}
|
414
442
|
response_data = await self.api_client.call_api(
|
415
|
-
*_param,
|
443
|
+
*_param,
|
444
|
+
_request_timeout=_request_timeout
|
416
445
|
)
|
417
446
|
await response_data.read()
|
418
447
|
return self.api_client.response_deserialize(
|
@@ -420,6 +449,7 @@ class NotificationsApi:
|
|
420
449
|
response_types_map=_response_types_map,
|
421
450
|
)
|
422
451
|
|
452
|
+
|
423
453
|
@validate_call
|
424
454
|
async def delete_notification_without_preload_content(
|
425
455
|
self,
|
@@ -428,8 +458,9 @@ class NotificationsApi:
|
|
428
458
|
None,
|
429
459
|
Annotated[StrictFloat, Field(gt=0)],
|
430
460
|
Tuple[
|
431
|
-
Annotated[StrictFloat, Field(gt=0)],
|
432
|
-
|
461
|
+
Annotated[StrictFloat, Field(gt=0)],
|
462
|
+
Annotated[StrictFloat, Field(gt=0)]
|
463
|
+
]
|
433
464
|
] = None,
|
434
465
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
435
466
|
_content_type: Optional[StrictStr] = None,
|
@@ -461,25 +492,27 @@ class NotificationsApi:
|
|
461
492
|
in the spec for a single request.
|
462
493
|
:type _host_index: int, optional
|
463
494
|
:return: Returns the result object.
|
464
|
-
"""
|
495
|
+
""" # noqa: E501
|
465
496
|
|
466
497
|
_param = self._delete_notification_serialize(
|
467
498
|
id=id,
|
468
499
|
_request_auth=_request_auth,
|
469
500
|
_content_type=_content_type,
|
470
501
|
_headers=_headers,
|
471
|
-
_host_index=_host_index
|
502
|
+
_host_index=_host_index
|
472
503
|
)
|
473
504
|
|
474
505
|
_response_types_map: Dict[str, Optional[str]] = {
|
475
|
-
|
476
|
-
|
506
|
+
'200': "object",
|
507
|
+
'422': "HTTPValidationError",
|
477
508
|
}
|
478
509
|
response_data = await self.api_client.call_api(
|
479
|
-
*_param,
|
510
|
+
*_param,
|
511
|
+
_request_timeout=_request_timeout
|
480
512
|
)
|
481
513
|
return response_data.response
|
482
514
|
|
515
|
+
|
483
516
|
def _delete_notification_serialize(
|
484
517
|
self,
|
485
518
|
id,
|
@@ -491,7 +524,8 @@ class NotificationsApi:
|
|
491
524
|
|
492
525
|
_host = None
|
493
526
|
|
494
|
-
_collection_formats: Dict[str, str] = {
|
527
|
+
_collection_formats: Dict[str, str] = {
|
528
|
+
}
|
495
529
|
|
496
530
|
_path_params: Dict[str, str] = {}
|
497
531
|
_query_params: List[Tuple[str, str]] = []
|
@@ -504,24 +538,31 @@ class NotificationsApi:
|
|
504
538
|
|
505
539
|
# process the path parameters
|
506
540
|
if id is not None:
|
507
|
-
_path_params[
|
541
|
+
_path_params['id'] = id
|
508
542
|
# process the query parameters
|
509
543
|
# process the header parameters
|
510
544
|
# process the form parameters
|
511
545
|
# process the body parameter
|
512
546
|
|
547
|
+
|
513
548
|
# set the HTTP header `Accept`
|
514
|
-
if
|
515
|
-
_header_params[
|
516
|
-
[
|
549
|
+
if 'Accept' not in _header_params:
|
550
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
551
|
+
[
|
552
|
+
'application/json'
|
553
|
+
]
|
517
554
|
)
|
518
555
|
|
556
|
+
|
519
557
|
# authentication setting
|
520
|
-
_auth_settings: List[str] = [
|
558
|
+
_auth_settings: List[str] = [
|
559
|
+
'APIKeyHeader',
|
560
|
+
'HTTPBearer'
|
561
|
+
]
|
521
562
|
|
522
563
|
return self.api_client.param_serialize(
|
523
|
-
method=
|
524
|
-
resource_path=
|
564
|
+
method='DELETE',
|
565
|
+
resource_path='/notifications/{id}',
|
525
566
|
path_params=_path_params,
|
526
567
|
query_params=_query_params,
|
527
568
|
header_params=_header_params,
|
@@ -531,9 +572,12 @@ class NotificationsApi:
|
|
531
572
|
auth_settings=_auth_settings,
|
532
573
|
collection_formats=_collection_formats,
|
533
574
|
_host=_host,
|
534
|
-
_request_auth=_request_auth
|
575
|
+
_request_auth=_request_auth
|
535
576
|
)
|
536
577
|
|
578
|
+
|
579
|
+
|
580
|
+
|
537
581
|
@validate_call
|
538
582
|
async def delete_notifications(
|
539
583
|
self,
|
@@ -541,8 +585,9 @@ class NotificationsApi:
|
|
541
585
|
None,
|
542
586
|
Annotated[StrictFloat, Field(gt=0)],
|
543
587
|
Tuple[
|
544
|
-
Annotated[StrictFloat, Field(gt=0)],
|
545
|
-
|
588
|
+
Annotated[StrictFloat, Field(gt=0)],
|
589
|
+
Annotated[StrictFloat, Field(gt=0)]
|
590
|
+
]
|
546
591
|
] = None,
|
547
592
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
548
593
|
_content_type: Optional[StrictStr] = None,
|
@@ -573,20 +618,21 @@ class NotificationsApi:
|
|
573
618
|
in the spec for a single request.
|
574
619
|
:type _host_index: int, optional
|
575
620
|
:return: Returns the result object.
|
576
|
-
"""
|
621
|
+
""" # noqa: E501
|
577
622
|
|
578
623
|
_param = self._delete_notifications_serialize(
|
579
624
|
_request_auth=_request_auth,
|
580
625
|
_content_type=_content_type,
|
581
626
|
_headers=_headers,
|
582
|
-
_host_index=_host_index
|
627
|
+
_host_index=_host_index
|
583
628
|
)
|
584
629
|
|
585
630
|
_response_types_map: Dict[str, Optional[str]] = {
|
586
|
-
|
631
|
+
'200': "object",
|
587
632
|
}
|
588
633
|
response_data = await self.api_client.call_api(
|
589
|
-
*_param,
|
634
|
+
*_param,
|
635
|
+
_request_timeout=_request_timeout
|
590
636
|
)
|
591
637
|
await response_data.read()
|
592
638
|
return self.api_client.response_deserialize(
|
@@ -594,6 +640,7 @@ class NotificationsApi:
|
|
594
640
|
response_types_map=_response_types_map,
|
595
641
|
).data
|
596
642
|
|
643
|
+
|
597
644
|
@validate_call
|
598
645
|
async def delete_notifications_with_http_info(
|
599
646
|
self,
|
@@ -601,8 +648,9 @@ class NotificationsApi:
|
|
601
648
|
None,
|
602
649
|
Annotated[StrictFloat, Field(gt=0)],
|
603
650
|
Tuple[
|
604
|
-
Annotated[StrictFloat, Field(gt=0)],
|
605
|
-
|
651
|
+
Annotated[StrictFloat, Field(gt=0)],
|
652
|
+
Annotated[StrictFloat, Field(gt=0)]
|
653
|
+
]
|
606
654
|
] = None,
|
607
655
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
608
656
|
_content_type: Optional[StrictStr] = None,
|
@@ -633,20 +681,21 @@ class NotificationsApi:
|
|
633
681
|
in the spec for a single request.
|
634
682
|
:type _host_index: int, optional
|
635
683
|
:return: Returns the result object.
|
636
|
-
"""
|
684
|
+
""" # noqa: E501
|
637
685
|
|
638
686
|
_param = self._delete_notifications_serialize(
|
639
687
|
_request_auth=_request_auth,
|
640
688
|
_content_type=_content_type,
|
641
689
|
_headers=_headers,
|
642
|
-
_host_index=_host_index
|
690
|
+
_host_index=_host_index
|
643
691
|
)
|
644
692
|
|
645
693
|
_response_types_map: Dict[str, Optional[str]] = {
|
646
|
-
|
694
|
+
'200': "object",
|
647
695
|
}
|
648
696
|
response_data = await self.api_client.call_api(
|
649
|
-
*_param,
|
697
|
+
*_param,
|
698
|
+
_request_timeout=_request_timeout
|
650
699
|
)
|
651
700
|
await response_data.read()
|
652
701
|
return self.api_client.response_deserialize(
|
@@ -654,6 +703,7 @@ class NotificationsApi:
|
|
654
703
|
response_types_map=_response_types_map,
|
655
704
|
)
|
656
705
|
|
706
|
+
|
657
707
|
@validate_call
|
658
708
|
async def delete_notifications_without_preload_content(
|
659
709
|
self,
|
@@ -661,8 +711,9 @@ class NotificationsApi:
|
|
661
711
|
None,
|
662
712
|
Annotated[StrictFloat, Field(gt=0)],
|
663
713
|
Tuple[
|
664
|
-
Annotated[StrictFloat, Field(gt=0)],
|
665
|
-
|
714
|
+
Annotated[StrictFloat, Field(gt=0)],
|
715
|
+
Annotated[StrictFloat, Field(gt=0)]
|
716
|
+
]
|
666
717
|
] = None,
|
667
718
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
668
719
|
_content_type: Optional[StrictStr] = None,
|
@@ -693,23 +744,25 @@ class NotificationsApi:
|
|
693
744
|
in the spec for a single request.
|
694
745
|
:type _host_index: int, optional
|
695
746
|
:return: Returns the result object.
|
696
|
-
"""
|
747
|
+
""" # noqa: E501
|
697
748
|
|
698
749
|
_param = self._delete_notifications_serialize(
|
699
750
|
_request_auth=_request_auth,
|
700
751
|
_content_type=_content_type,
|
701
752
|
_headers=_headers,
|
702
|
-
_host_index=_host_index
|
753
|
+
_host_index=_host_index
|
703
754
|
)
|
704
755
|
|
705
756
|
_response_types_map: Dict[str, Optional[str]] = {
|
706
|
-
|
757
|
+
'200': "object",
|
707
758
|
}
|
708
759
|
response_data = await self.api_client.call_api(
|
709
|
-
*_param,
|
760
|
+
*_param,
|
761
|
+
_request_timeout=_request_timeout
|
710
762
|
)
|
711
763
|
return response_data.response
|
712
764
|
|
765
|
+
|
713
766
|
def _delete_notifications_serialize(
|
714
767
|
self,
|
715
768
|
_request_auth,
|
@@ -720,7 +773,8 @@ class NotificationsApi:
|
|
720
773
|
|
721
774
|
_host = None
|
722
775
|
|
723
|
-
_collection_formats: Dict[str, str] = {
|
776
|
+
_collection_formats: Dict[str, str] = {
|
777
|
+
}
|
724
778
|
|
725
779
|
_path_params: Dict[str, str] = {}
|
726
780
|
_query_params: List[Tuple[str, str]] = []
|
@@ -737,18 +791,25 @@ class NotificationsApi:
|
|
737
791
|
# process the form parameters
|
738
792
|
# process the body parameter
|
739
793
|
|
794
|
+
|
740
795
|
# set the HTTP header `Accept`
|
741
|
-
if
|
742
|
-
_header_params[
|
743
|
-
[
|
796
|
+
if 'Accept' not in _header_params:
|
797
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
798
|
+
[
|
799
|
+
'application/json'
|
800
|
+
]
|
744
801
|
)
|
745
802
|
|
803
|
+
|
746
804
|
# authentication setting
|
747
|
-
_auth_settings: List[str] = [
|
805
|
+
_auth_settings: List[str] = [
|
806
|
+
'APIKeyHeader',
|
807
|
+
'HTTPBearer'
|
808
|
+
]
|
748
809
|
|
749
810
|
return self.api_client.param_serialize(
|
750
|
-
method=
|
751
|
-
resource_path=
|
811
|
+
method='DELETE',
|
812
|
+
resource_path='/notifications',
|
752
813
|
path_params=_path_params,
|
753
814
|
query_params=_query_params,
|
754
815
|
header_params=_header_params,
|
@@ -758,9 +819,12 @@ class NotificationsApi:
|
|
758
819
|
auth_settings=_auth_settings,
|
759
820
|
collection_formats=_collection_formats,
|
760
821
|
_host=_host,
|
761
|
-
_request_auth=_request_auth
|
822
|
+
_request_auth=_request_auth
|
762
823
|
)
|
763
824
|
|
825
|
+
|
826
|
+
|
827
|
+
|
764
828
|
@validate_call
|
765
829
|
async def get_notifications(
|
766
830
|
self,
|
@@ -770,8 +834,9 @@ class NotificationsApi:
|
|
770
834
|
None,
|
771
835
|
Annotated[StrictFloat, Field(gt=0)],
|
772
836
|
Tuple[
|
773
|
-
Annotated[StrictFloat, Field(gt=0)],
|
774
|
-
|
837
|
+
Annotated[StrictFloat, Field(gt=0)],
|
838
|
+
Annotated[StrictFloat, Field(gt=0)]
|
839
|
+
]
|
775
840
|
] = None,
|
776
841
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
777
842
|
_content_type: Optional[StrictStr] = None,
|
@@ -806,7 +871,7 @@ class NotificationsApi:
|
|
806
871
|
in the spec for a single request.
|
807
872
|
:type _host_index: int, optional
|
808
873
|
:return: Returns the result object.
|
809
|
-
"""
|
874
|
+
""" # noqa: E501
|
810
875
|
|
811
876
|
_param = self._get_notifications_serialize(
|
812
877
|
limit=limit,
|
@@ -814,15 +879,16 @@ class NotificationsApi:
|
|
814
879
|
_request_auth=_request_auth,
|
815
880
|
_content_type=_content_type,
|
816
881
|
_headers=_headers,
|
817
|
-
_host_index=_host_index
|
882
|
+
_host_index=_host_index
|
818
883
|
)
|
819
884
|
|
820
885
|
_response_types_map: Dict[str, Optional[str]] = {
|
821
|
-
|
822
|
-
|
886
|
+
'200': "List[NotificationModel]",
|
887
|
+
'422': "HTTPValidationError",
|
823
888
|
}
|
824
889
|
response_data = await self.api_client.call_api(
|
825
|
-
*_param,
|
890
|
+
*_param,
|
891
|
+
_request_timeout=_request_timeout
|
826
892
|
)
|
827
893
|
await response_data.read()
|
828
894
|
return self.api_client.response_deserialize(
|
@@ -830,6 +896,7 @@ class NotificationsApi:
|
|
830
896
|
response_types_map=_response_types_map,
|
831
897
|
).data
|
832
898
|
|
899
|
+
|
833
900
|
@validate_call
|
834
901
|
async def get_notifications_with_http_info(
|
835
902
|
self,
|
@@ -839,8 +906,9 @@ class NotificationsApi:
|
|
839
906
|
None,
|
840
907
|
Annotated[StrictFloat, Field(gt=0)],
|
841
908
|
Tuple[
|
842
|
-
Annotated[StrictFloat, Field(gt=0)],
|
843
|
-
|
909
|
+
Annotated[StrictFloat, Field(gt=0)],
|
910
|
+
Annotated[StrictFloat, Field(gt=0)]
|
911
|
+
]
|
844
912
|
] = None,
|
845
913
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
846
914
|
_content_type: Optional[StrictStr] = None,
|
@@ -875,7 +943,7 @@ class NotificationsApi:
|
|
875
943
|
in the spec for a single request.
|
876
944
|
:type _host_index: int, optional
|
877
945
|
:return: Returns the result object.
|
878
|
-
"""
|
946
|
+
""" # noqa: E501
|
879
947
|
|
880
948
|
_param = self._get_notifications_serialize(
|
881
949
|
limit=limit,
|
@@ -883,15 +951,16 @@ class NotificationsApi:
|
|
883
951
|
_request_auth=_request_auth,
|
884
952
|
_content_type=_content_type,
|
885
953
|
_headers=_headers,
|
886
|
-
_host_index=_host_index
|
954
|
+
_host_index=_host_index
|
887
955
|
)
|
888
956
|
|
889
957
|
_response_types_map: Dict[str, Optional[str]] = {
|
890
|
-
|
891
|
-
|
958
|
+
'200': "List[NotificationModel]",
|
959
|
+
'422': "HTTPValidationError",
|
892
960
|
}
|
893
961
|
response_data = await self.api_client.call_api(
|
894
|
-
*_param,
|
962
|
+
*_param,
|
963
|
+
_request_timeout=_request_timeout
|
895
964
|
)
|
896
965
|
await response_data.read()
|
897
966
|
return self.api_client.response_deserialize(
|
@@ -899,6 +968,7 @@ class NotificationsApi:
|
|
899
968
|
response_types_map=_response_types_map,
|
900
969
|
)
|
901
970
|
|
971
|
+
|
902
972
|
@validate_call
|
903
973
|
async def get_notifications_without_preload_content(
|
904
974
|
self,
|
@@ -908,8 +978,9 @@ class NotificationsApi:
|
|
908
978
|
None,
|
909
979
|
Annotated[StrictFloat, Field(gt=0)],
|
910
980
|
Tuple[
|
911
|
-
Annotated[StrictFloat, Field(gt=0)],
|
912
|
-
|
981
|
+
Annotated[StrictFloat, Field(gt=0)],
|
982
|
+
Annotated[StrictFloat, Field(gt=0)]
|
983
|
+
]
|
913
984
|
] = None,
|
914
985
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
915
986
|
_content_type: Optional[StrictStr] = None,
|
@@ -944,7 +1015,7 @@ class NotificationsApi:
|
|
944
1015
|
in the spec for a single request.
|
945
1016
|
:type _host_index: int, optional
|
946
1017
|
:return: Returns the result object.
|
947
|
-
"""
|
1018
|
+
""" # noqa: E501
|
948
1019
|
|
949
1020
|
_param = self._get_notifications_serialize(
|
950
1021
|
limit=limit,
|
@@ -952,18 +1023,20 @@ class NotificationsApi:
|
|
952
1023
|
_request_auth=_request_auth,
|
953
1024
|
_content_type=_content_type,
|
954
1025
|
_headers=_headers,
|
955
|
-
_host_index=_host_index
|
1026
|
+
_host_index=_host_index
|
956
1027
|
)
|
957
1028
|
|
958
1029
|
_response_types_map: Dict[str, Optional[str]] = {
|
959
|
-
|
960
|
-
|
1030
|
+
'200': "List[NotificationModel]",
|
1031
|
+
'422': "HTTPValidationError",
|
961
1032
|
}
|
962
1033
|
response_data = await self.api_client.call_api(
|
963
|
-
*_param,
|
1034
|
+
*_param,
|
1035
|
+
_request_timeout=_request_timeout
|
964
1036
|
)
|
965
1037
|
return response_data.response
|
966
1038
|
|
1039
|
+
|
967
1040
|
def _get_notifications_serialize(
|
968
1041
|
self,
|
969
1042
|
limit,
|
@@ -976,7 +1049,8 @@ class NotificationsApi:
|
|
976
1049
|
|
977
1050
|
_host = None
|
978
1051
|
|
979
|
-
_collection_formats: Dict[str, str] = {
|
1052
|
+
_collection_formats: Dict[str, str] = {
|
1053
|
+
}
|
980
1054
|
|
981
1055
|
_path_params: Dict[str, str] = {}
|
982
1056
|
_query_params: List[Tuple[str, str]] = []
|
@@ -990,29 +1064,36 @@ class NotificationsApi:
|
|
990
1064
|
# process the path parameters
|
991
1065
|
# process the query parameters
|
992
1066
|
if limit is not None:
|
993
|
-
|
994
|
-
_query_params.append((
|
995
|
-
|
1067
|
+
|
1068
|
+
_query_params.append(('limit', limit))
|
1069
|
+
|
996
1070
|
if offset is not None:
|
997
|
-
|
998
|
-
_query_params.append((
|
999
|
-
|
1071
|
+
|
1072
|
+
_query_params.append(('offset', offset))
|
1073
|
+
|
1000
1074
|
# process the header parameters
|
1001
1075
|
# process the form parameters
|
1002
1076
|
# process the body parameter
|
1003
1077
|
|
1078
|
+
|
1004
1079
|
# set the HTTP header `Accept`
|
1005
|
-
if
|
1006
|
-
_header_params[
|
1007
|
-
[
|
1080
|
+
if 'Accept' not in _header_params:
|
1081
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1082
|
+
[
|
1083
|
+
'application/json'
|
1084
|
+
]
|
1008
1085
|
)
|
1009
1086
|
|
1087
|
+
|
1010
1088
|
# authentication setting
|
1011
|
-
_auth_settings: List[str] = [
|
1089
|
+
_auth_settings: List[str] = [
|
1090
|
+
'APIKeyHeader',
|
1091
|
+
'HTTPBearer'
|
1092
|
+
]
|
1012
1093
|
|
1013
1094
|
return self.api_client.param_serialize(
|
1014
|
-
method=
|
1015
|
-
resource_path=
|
1095
|
+
method='GET',
|
1096
|
+
resource_path='/notifications',
|
1016
1097
|
path_params=_path_params,
|
1017
1098
|
query_params=_query_params,
|
1018
1099
|
header_params=_header_params,
|
@@ -1022,9 +1103,12 @@ class NotificationsApi:
|
|
1022
1103
|
auth_settings=_auth_settings,
|
1023
1104
|
collection_formats=_collection_formats,
|
1024
1105
|
_host=_host,
|
1025
|
-
_request_auth=_request_auth
|
1106
|
+
_request_auth=_request_auth
|
1026
1107
|
)
|
1027
1108
|
|
1109
|
+
|
1110
|
+
|
1111
|
+
|
1028
1112
|
@validate_call
|
1029
1113
|
async def update_notification(
|
1030
1114
|
self,
|
@@ -1035,8 +1119,9 @@ class NotificationsApi:
|
|
1035
1119
|
None,
|
1036
1120
|
Annotated[StrictFloat, Field(gt=0)],
|
1037
1121
|
Tuple[
|
1038
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1039
|
-
|
1122
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1123
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1124
|
+
]
|
1040
1125
|
] = None,
|
1041
1126
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1042
1127
|
_content_type: Optional[StrictStr] = None,
|
@@ -1073,7 +1158,7 @@ class NotificationsApi:
|
|
1073
1158
|
in the spec for a single request.
|
1074
1159
|
:type _host_index: int, optional
|
1075
1160
|
:return: Returns the result object.
|
1076
|
-
"""
|
1161
|
+
""" # noqa: E501
|
1077
1162
|
|
1078
1163
|
_param = self._update_notification_serialize(
|
1079
1164
|
id=id,
|
@@ -1082,15 +1167,16 @@ class NotificationsApi:
|
|
1082
1167
|
_request_auth=_request_auth,
|
1083
1168
|
_content_type=_content_type,
|
1084
1169
|
_headers=_headers,
|
1085
|
-
_host_index=_host_index
|
1170
|
+
_host_index=_host_index
|
1086
1171
|
)
|
1087
1172
|
|
1088
1173
|
_response_types_map: Dict[str, Optional[str]] = {
|
1089
|
-
|
1090
|
-
|
1174
|
+
'200': "object",
|
1175
|
+
'422': "HTTPValidationError",
|
1091
1176
|
}
|
1092
1177
|
response_data = await self.api_client.call_api(
|
1093
|
-
*_param,
|
1178
|
+
*_param,
|
1179
|
+
_request_timeout=_request_timeout
|
1094
1180
|
)
|
1095
1181
|
await response_data.read()
|
1096
1182
|
return self.api_client.response_deserialize(
|
@@ -1098,6 +1184,7 @@ class NotificationsApi:
|
|
1098
1184
|
response_types_map=_response_types_map,
|
1099
1185
|
).data
|
1100
1186
|
|
1187
|
+
|
1101
1188
|
@validate_call
|
1102
1189
|
async def update_notification_with_http_info(
|
1103
1190
|
self,
|
@@ -1108,8 +1195,9 @@ class NotificationsApi:
|
|
1108
1195
|
None,
|
1109
1196
|
Annotated[StrictFloat, Field(gt=0)],
|
1110
1197
|
Tuple[
|
1111
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1112
|
-
|
1198
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1199
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1200
|
+
]
|
1113
1201
|
] = None,
|
1114
1202
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1115
1203
|
_content_type: Optional[StrictStr] = None,
|
@@ -1146,7 +1234,7 @@ class NotificationsApi:
|
|
1146
1234
|
in the spec for a single request.
|
1147
1235
|
:type _host_index: int, optional
|
1148
1236
|
:return: Returns the result object.
|
1149
|
-
"""
|
1237
|
+
""" # noqa: E501
|
1150
1238
|
|
1151
1239
|
_param = self._update_notification_serialize(
|
1152
1240
|
id=id,
|
@@ -1155,15 +1243,16 @@ class NotificationsApi:
|
|
1155
1243
|
_request_auth=_request_auth,
|
1156
1244
|
_content_type=_content_type,
|
1157
1245
|
_headers=_headers,
|
1158
|
-
_host_index=_host_index
|
1246
|
+
_host_index=_host_index
|
1159
1247
|
)
|
1160
1248
|
|
1161
1249
|
_response_types_map: Dict[str, Optional[str]] = {
|
1162
|
-
|
1163
|
-
|
1250
|
+
'200': "object",
|
1251
|
+
'422': "HTTPValidationError",
|
1164
1252
|
}
|
1165
1253
|
response_data = await self.api_client.call_api(
|
1166
|
-
*_param,
|
1254
|
+
*_param,
|
1255
|
+
_request_timeout=_request_timeout
|
1167
1256
|
)
|
1168
1257
|
await response_data.read()
|
1169
1258
|
return self.api_client.response_deserialize(
|
@@ -1171,6 +1260,7 @@ class NotificationsApi:
|
|
1171
1260
|
response_types_map=_response_types_map,
|
1172
1261
|
)
|
1173
1262
|
|
1263
|
+
|
1174
1264
|
@validate_call
|
1175
1265
|
async def update_notification_without_preload_content(
|
1176
1266
|
self,
|
@@ -1181,8 +1271,9 @@ class NotificationsApi:
|
|
1181
1271
|
None,
|
1182
1272
|
Annotated[StrictFloat, Field(gt=0)],
|
1183
1273
|
Tuple[
|
1184
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1185
|
-
|
1274
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1275
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1276
|
+
]
|
1186
1277
|
] = None,
|
1187
1278
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1188
1279
|
_content_type: Optional[StrictStr] = None,
|
@@ -1219,7 +1310,7 @@ class NotificationsApi:
|
|
1219
1310
|
in the spec for a single request.
|
1220
1311
|
:type _host_index: int, optional
|
1221
1312
|
:return: Returns the result object.
|
1222
|
-
"""
|
1313
|
+
""" # noqa: E501
|
1223
1314
|
|
1224
1315
|
_param = self._update_notification_serialize(
|
1225
1316
|
id=id,
|
@@ -1228,18 +1319,20 @@ class NotificationsApi:
|
|
1228
1319
|
_request_auth=_request_auth,
|
1229
1320
|
_content_type=_content_type,
|
1230
1321
|
_headers=_headers,
|
1231
|
-
_host_index=_host_index
|
1322
|
+
_host_index=_host_index
|
1232
1323
|
)
|
1233
1324
|
|
1234
1325
|
_response_types_map: Dict[str, Optional[str]] = {
|
1235
|
-
|
1236
|
-
|
1326
|
+
'200': "object",
|
1327
|
+
'422': "HTTPValidationError",
|
1237
1328
|
}
|
1238
1329
|
response_data = await self.api_client.call_api(
|
1239
|
-
*_param,
|
1330
|
+
*_param,
|
1331
|
+
_request_timeout=_request_timeout
|
1240
1332
|
)
|
1241
1333
|
return response_data.response
|
1242
1334
|
|
1335
|
+
|
1243
1336
|
def _update_notification_serialize(
|
1244
1337
|
self,
|
1245
1338
|
id,
|
@@ -1253,7 +1346,8 @@ class NotificationsApi:
|
|
1253
1346
|
|
1254
1347
|
_host = None
|
1255
1348
|
|
1256
|
-
_collection_formats: Dict[str, str] = {
|
1349
|
+
_collection_formats: Dict[str, str] = {
|
1350
|
+
}
|
1257
1351
|
|
1258
1352
|
_path_params: Dict[str, str] = {}
|
1259
1353
|
_query_params: List[Tuple[str, str]] = []
|
@@ -1266,32 +1360,39 @@ class NotificationsApi:
|
|
1266
1360
|
|
1267
1361
|
# process the path parameters
|
1268
1362
|
if id is not None:
|
1269
|
-
_path_params[
|
1363
|
+
_path_params['id'] = id
|
1270
1364
|
# process the query parameters
|
1271
1365
|
if viewed is not None:
|
1272
|
-
|
1273
|
-
_query_params.append((
|
1274
|
-
|
1366
|
+
|
1367
|
+
_query_params.append(('viewed', viewed))
|
1368
|
+
|
1275
1369
|
if sent is not None:
|
1276
|
-
|
1277
|
-
_query_params.append((
|
1278
|
-
|
1370
|
+
|
1371
|
+
_query_params.append(('sent', sent))
|
1372
|
+
|
1279
1373
|
# process the header parameters
|
1280
1374
|
# process the form parameters
|
1281
1375
|
# process the body parameter
|
1282
1376
|
|
1377
|
+
|
1283
1378
|
# set the HTTP header `Accept`
|
1284
|
-
if
|
1285
|
-
_header_params[
|
1286
|
-
[
|
1379
|
+
if 'Accept' not in _header_params:
|
1380
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1381
|
+
[
|
1382
|
+
'application/json'
|
1383
|
+
]
|
1287
1384
|
)
|
1288
1385
|
|
1386
|
+
|
1289
1387
|
# authentication setting
|
1290
|
-
_auth_settings: List[str] = [
|
1388
|
+
_auth_settings: List[str] = [
|
1389
|
+
'APIKeyHeader',
|
1390
|
+
'HTTPBearer'
|
1391
|
+
]
|
1291
1392
|
|
1292
1393
|
return self.api_client.param_serialize(
|
1293
|
-
method=
|
1294
|
-
resource_path=
|
1394
|
+
method='PUT',
|
1395
|
+
resource_path='/notifications/{id}',
|
1295
1396
|
path_params=_path_params,
|
1296
1397
|
query_params=_query_params,
|
1297
1398
|
header_params=_header_params,
|
@@ -1301,9 +1402,12 @@ class NotificationsApi:
|
|
1301
1402
|
auth_settings=_auth_settings,
|
1302
1403
|
collection_formats=_collection_formats,
|
1303
1404
|
_host=_host,
|
1304
|
-
_request_auth=_request_auth
|
1405
|
+
_request_auth=_request_auth
|
1305
1406
|
)
|
1306
1407
|
|
1408
|
+
|
1409
|
+
|
1410
|
+
|
1307
1411
|
@validate_call
|
1308
1412
|
async def update_notifications(
|
1309
1413
|
self,
|
@@ -1313,8 +1417,9 @@ class NotificationsApi:
|
|
1313
1417
|
None,
|
1314
1418
|
Annotated[StrictFloat, Field(gt=0)],
|
1315
1419
|
Tuple[
|
1316
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1317
|
-
|
1420
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1421
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1422
|
+
]
|
1318
1423
|
] = None,
|
1319
1424
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1320
1425
|
_content_type: Optional[StrictStr] = None,
|
@@ -1349,7 +1454,7 @@ class NotificationsApi:
|
|
1349
1454
|
in the spec for a single request.
|
1350
1455
|
:type _host_index: int, optional
|
1351
1456
|
:return: Returns the result object.
|
1352
|
-
"""
|
1457
|
+
""" # noqa: E501
|
1353
1458
|
|
1354
1459
|
_param = self._update_notifications_serialize(
|
1355
1460
|
viewed=viewed,
|
@@ -1357,15 +1462,16 @@ class NotificationsApi:
|
|
1357
1462
|
_request_auth=_request_auth,
|
1358
1463
|
_content_type=_content_type,
|
1359
1464
|
_headers=_headers,
|
1360
|
-
_host_index=_host_index
|
1465
|
+
_host_index=_host_index
|
1361
1466
|
)
|
1362
1467
|
|
1363
1468
|
_response_types_map: Dict[str, Optional[str]] = {
|
1364
|
-
|
1365
|
-
|
1469
|
+
'200': "object",
|
1470
|
+
'422': "HTTPValidationError",
|
1366
1471
|
}
|
1367
1472
|
response_data = await self.api_client.call_api(
|
1368
|
-
*_param,
|
1473
|
+
*_param,
|
1474
|
+
_request_timeout=_request_timeout
|
1369
1475
|
)
|
1370
1476
|
await response_data.read()
|
1371
1477
|
return self.api_client.response_deserialize(
|
@@ -1373,6 +1479,7 @@ class NotificationsApi:
|
|
1373
1479
|
response_types_map=_response_types_map,
|
1374
1480
|
).data
|
1375
1481
|
|
1482
|
+
|
1376
1483
|
@validate_call
|
1377
1484
|
async def update_notifications_with_http_info(
|
1378
1485
|
self,
|
@@ -1382,8 +1489,9 @@ class NotificationsApi:
|
|
1382
1489
|
None,
|
1383
1490
|
Annotated[StrictFloat, Field(gt=0)],
|
1384
1491
|
Tuple[
|
1385
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1386
|
-
|
1492
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1493
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1494
|
+
]
|
1387
1495
|
] = None,
|
1388
1496
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1389
1497
|
_content_type: Optional[StrictStr] = None,
|
@@ -1418,7 +1526,7 @@ class NotificationsApi:
|
|
1418
1526
|
in the spec for a single request.
|
1419
1527
|
:type _host_index: int, optional
|
1420
1528
|
:return: Returns the result object.
|
1421
|
-
"""
|
1529
|
+
""" # noqa: E501
|
1422
1530
|
|
1423
1531
|
_param = self._update_notifications_serialize(
|
1424
1532
|
viewed=viewed,
|
@@ -1426,15 +1534,16 @@ class NotificationsApi:
|
|
1426
1534
|
_request_auth=_request_auth,
|
1427
1535
|
_content_type=_content_type,
|
1428
1536
|
_headers=_headers,
|
1429
|
-
_host_index=_host_index
|
1537
|
+
_host_index=_host_index
|
1430
1538
|
)
|
1431
1539
|
|
1432
1540
|
_response_types_map: Dict[str, Optional[str]] = {
|
1433
|
-
|
1434
|
-
|
1541
|
+
'200': "object",
|
1542
|
+
'422': "HTTPValidationError",
|
1435
1543
|
}
|
1436
1544
|
response_data = await self.api_client.call_api(
|
1437
|
-
*_param,
|
1545
|
+
*_param,
|
1546
|
+
_request_timeout=_request_timeout
|
1438
1547
|
)
|
1439
1548
|
await response_data.read()
|
1440
1549
|
return self.api_client.response_deserialize(
|
@@ -1442,6 +1551,7 @@ class NotificationsApi:
|
|
1442
1551
|
response_types_map=_response_types_map,
|
1443
1552
|
)
|
1444
1553
|
|
1554
|
+
|
1445
1555
|
@validate_call
|
1446
1556
|
async def update_notifications_without_preload_content(
|
1447
1557
|
self,
|
@@ -1451,8 +1561,9 @@ class NotificationsApi:
|
|
1451
1561
|
None,
|
1452
1562
|
Annotated[StrictFloat, Field(gt=0)],
|
1453
1563
|
Tuple[
|
1454
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1455
|
-
|
1564
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1565
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1566
|
+
]
|
1456
1567
|
] = None,
|
1457
1568
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1458
1569
|
_content_type: Optional[StrictStr] = None,
|
@@ -1487,7 +1598,7 @@ class NotificationsApi:
|
|
1487
1598
|
in the spec for a single request.
|
1488
1599
|
:type _host_index: int, optional
|
1489
1600
|
:return: Returns the result object.
|
1490
|
-
"""
|
1601
|
+
""" # noqa: E501
|
1491
1602
|
|
1492
1603
|
_param = self._update_notifications_serialize(
|
1493
1604
|
viewed=viewed,
|
@@ -1495,18 +1606,20 @@ class NotificationsApi:
|
|
1495
1606
|
_request_auth=_request_auth,
|
1496
1607
|
_content_type=_content_type,
|
1497
1608
|
_headers=_headers,
|
1498
|
-
_host_index=_host_index
|
1609
|
+
_host_index=_host_index
|
1499
1610
|
)
|
1500
1611
|
|
1501
1612
|
_response_types_map: Dict[str, Optional[str]] = {
|
1502
|
-
|
1503
|
-
|
1613
|
+
'200': "object",
|
1614
|
+
'422': "HTTPValidationError",
|
1504
1615
|
}
|
1505
1616
|
response_data = await self.api_client.call_api(
|
1506
|
-
*_param,
|
1617
|
+
*_param,
|
1618
|
+
_request_timeout=_request_timeout
|
1507
1619
|
)
|
1508
1620
|
return response_data.response
|
1509
1621
|
|
1622
|
+
|
1510
1623
|
def _update_notifications_serialize(
|
1511
1624
|
self,
|
1512
1625
|
viewed,
|
@@ -1519,7 +1632,8 @@ class NotificationsApi:
|
|
1519
1632
|
|
1520
1633
|
_host = None
|
1521
1634
|
|
1522
|
-
_collection_formats: Dict[str, str] = {
|
1635
|
+
_collection_formats: Dict[str, str] = {
|
1636
|
+
}
|
1523
1637
|
|
1524
1638
|
_path_params: Dict[str, str] = {}
|
1525
1639
|
_query_params: List[Tuple[str, str]] = []
|
@@ -1533,29 +1647,36 @@ class NotificationsApi:
|
|
1533
1647
|
# process the path parameters
|
1534
1648
|
# process the query parameters
|
1535
1649
|
if viewed is not None:
|
1536
|
-
|
1537
|
-
_query_params.append((
|
1538
|
-
|
1650
|
+
|
1651
|
+
_query_params.append(('viewed', viewed))
|
1652
|
+
|
1539
1653
|
if sent is not None:
|
1540
|
-
|
1541
|
-
_query_params.append((
|
1542
|
-
|
1654
|
+
|
1655
|
+
_query_params.append(('sent', sent))
|
1656
|
+
|
1543
1657
|
# process the header parameters
|
1544
1658
|
# process the form parameters
|
1545
1659
|
# process the body parameter
|
1546
1660
|
|
1661
|
+
|
1547
1662
|
# set the HTTP header `Accept`
|
1548
|
-
if
|
1549
|
-
_header_params[
|
1550
|
-
[
|
1663
|
+
if 'Accept' not in _header_params:
|
1664
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1665
|
+
[
|
1666
|
+
'application/json'
|
1667
|
+
]
|
1551
1668
|
)
|
1552
1669
|
|
1670
|
+
|
1553
1671
|
# authentication setting
|
1554
|
-
_auth_settings: List[str] = [
|
1672
|
+
_auth_settings: List[str] = [
|
1673
|
+
'APIKeyHeader',
|
1674
|
+
'HTTPBearer'
|
1675
|
+
]
|
1555
1676
|
|
1556
1677
|
return self.api_client.param_serialize(
|
1557
|
-
method=
|
1558
|
-
resource_path=
|
1678
|
+
method='PUT',
|
1679
|
+
resource_path='/notifications',
|
1559
1680
|
path_params=_path_params,
|
1560
1681
|
query_params=_query_params,
|
1561
1682
|
header_params=_header_params,
|
@@ -1565,5 +1686,7 @@ class NotificationsApi:
|
|
1565
1686
|
auth_settings=_auth_settings,
|
1566
1687
|
collection_formats=_collection_formats,
|
1567
1688
|
_host=_host,
|
1568
|
-
_request_auth=_request_auth
|
1689
|
+
_request_auth=_request_auth
|
1569
1690
|
)
|
1691
|
+
|
1692
|
+
|