crypticorn 1.0.1__py3-none-any.whl → 1.0.2rc2__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 +3 -3
- crypticorn/client.py +722 -0
- crypticorn/hive/__init__.py +1 -0
- crypticorn/{api.py → hive/main.py} +6 -6
- crypticorn/hive/requirements.txt +4 -0
- crypticorn/{utils.py → hive/utils.py} +2 -2
- crypticorn/klines/__init__.py +2 -0
- crypticorn/klines/client/__init__.py +62 -0
- crypticorn/klines/client/api/__init__.py +9 -0
- crypticorn/klines/client/api/funding_rates_api.py +362 -0
- crypticorn/klines/client/api/health_check_api.py +281 -0
- crypticorn/klines/client/api/ohlcv_data_api.py +409 -0
- crypticorn/klines/client/api/symbols_api.py +308 -0
- crypticorn/klines/client/api/udf_api.py +1929 -0
- crypticorn/klines/client/api_client.py +797 -0
- crypticorn/klines/client/api_response.py +21 -0
- crypticorn/klines/client/configuration.py +565 -0
- crypticorn/klines/client/exceptions.py +216 -0
- crypticorn/klines/client/models/__init__.py +41 -0
- crypticorn/klines/client/models/base_response_health_check_response.py +108 -0
- crypticorn/klines/client/models/base_response_list_funding_rate_response.py +112 -0
- crypticorn/klines/client/models/base_response_list_str.py +104 -0
- crypticorn/klines/client/models/base_response_ohlcv_response.py +108 -0
- crypticorn/klines/client/models/error_response.py +101 -0
- crypticorn/{models/deleted.py → klines/client/models/exchange.py} +15 -11
- crypticorn/klines/client/models/funding_rate_response.py +92 -0
- crypticorn/klines/client/models/health_check_response.py +89 -0
- crypticorn/{models/create_api_key_response.py → klines/client/models/history_error_response.py} +12 -22
- crypticorn/klines/client/models/history_no_data_response.py +99 -0
- crypticorn/klines/client/models/history_success_response.py +99 -0
- crypticorn/klines/client/models/http_validation_error.py +95 -0
- crypticorn/klines/client/models/market.py +37 -0
- crypticorn/klines/client/models/ohlcv_response.py +98 -0
- crypticorn/klines/client/models/resolution.py +40 -0
- crypticorn/klines/client/models/response_get_history_udf_history_get.py +149 -0
- crypticorn/klines/client/models/search_symbol_response.py +97 -0
- crypticorn/klines/client/models/sort_direction.py +37 -0
- crypticorn/{models/futures_balance_error.py → klines/client/models/symbol_group_response.py} +12 -14
- crypticorn/klines/client/models/symbol_info_response.py +115 -0
- crypticorn/{models/id.py → klines/client/models/symbol_type.py} +13 -11
- crypticorn/klines/client/models/timeframe.py +40 -0
- crypticorn/klines/client/models/udf_config_response.py +121 -0
- crypticorn/klines/client/models/validation_error.py +99 -0
- crypticorn/{models/get_futures_balance200_response_inner.py → klines/client/models/validation_error_loc_inner.py} +39 -35
- crypticorn/klines/client/py.typed +0 -0
- crypticorn/klines/client/rest.py +257 -0
- crypticorn/klines/main.py +42 -0
- crypticorn/klines/requirements.txt +4 -0
- crypticorn/klines/test/__init__.py +0 -0
- crypticorn/klines/test/test_base_response_health_check_response.py +56 -0
- crypticorn/klines/test/test_base_response_list_funding_rate_response.py +59 -0
- crypticorn/klines/test/test_base_response_list_str.py +56 -0
- crypticorn/klines/test/test_base_response_ohlcv_response.py +72 -0
- crypticorn/klines/test/test_error_response.py +57 -0
- crypticorn/klines/test/test_exchange.py +56 -0
- crypticorn/klines/test/test_funding_rate_response.py +56 -0
- crypticorn/klines/test/test_funding_rates_api.py +38 -0
- crypticorn/klines/test/test_health_check_api.py +38 -0
- crypticorn/klines/test/test_health_check_response.py +52 -0
- crypticorn/klines/test/test_history_error_response.py +53 -0
- crypticorn/klines/test/test_history_no_data_response.py +69 -0
- crypticorn/klines/test/test_history_success_response.py +87 -0
- crypticorn/klines/test/test_http_validation_error.py +58 -0
- crypticorn/klines/test/test_market.py +33 -0
- crypticorn/klines/test/test_ohlcv_data_api.py +38 -0
- crypticorn/klines/test/test_ohlcv_response.py +86 -0
- crypticorn/klines/test/test_resolution.py +33 -0
- crypticorn/klines/test/test_response_get_history_udf_history_get.py +89 -0
- crypticorn/klines/test/test_search_symbol_response.py +62 -0
- crypticorn/klines/test/test_sort_direction.py +33 -0
- crypticorn/klines/test/test_symbol_group_response.py +53 -0
- crypticorn/klines/test/test_symbol_info_response.py +84 -0
- crypticorn/klines/test/test_symbol_type.py +54 -0
- crypticorn/klines/test/test_symbols_api.py +38 -0
- crypticorn/klines/test/test_timeframe.py +33 -0
- crypticorn/klines/test/test_udf_api.py +80 -0
- crypticorn/klines/test/test_udf_config_response.py +95 -0
- crypticorn/klines/test/test_validation_error.py +60 -0
- crypticorn/klines/test/test_validation_error_loc_inner.py +50 -0
- crypticorn/trade/__init__.py +2 -0
- crypticorn/trade/client/__init__.py +63 -0
- crypticorn/trade/client/api/__init__.py +13 -0
- crypticorn/trade/client/api/api_keys_api.py +1468 -0
- crypticorn/trade/client/api/bots_api.py +1211 -0
- crypticorn/trade/client/api/exchanges_api.py +297 -0
- crypticorn/trade/client/api/futures_trading_panel_api.py +1463 -0
- crypticorn/trade/client/api/notifications_api.py +1767 -0
- crypticorn/trade/client/api/orders_api.py +331 -0
- crypticorn/trade/client/api/status_api.py +278 -0
- crypticorn/trade/client/api/strategies_api.py +331 -0
- crypticorn/trade/client/api/trading_actions_api.py +898 -0
- crypticorn/trade/client/api_client.py +797 -0
- crypticorn/trade/client/api_response.py +21 -0
- crypticorn/trade/client/configuration.py +574 -0
- crypticorn/trade/client/exceptions.py +216 -0
- crypticorn/trade/client/models/__init__.py +38 -0
- crypticorn/{models → trade/client/models}/action_model.py +17 -20
- crypticorn/{models → trade/client/models}/api_error_identifier.py +3 -1
- crypticorn/{models → trade/client/models}/api_key_model.py +5 -8
- crypticorn/{models → trade/client/models}/bot_model.py +15 -11
- crypticorn/{models → trade/client/models}/futures_trading_action.py +12 -12
- crypticorn/{models → trade/client/models}/http_validation_error.py +1 -1
- crypticorn/{models → trade/client/models}/notification_model.py +8 -6
- crypticorn/{models → trade/client/models}/order_model.py +12 -15
- crypticorn/{models → trade/client/models}/post_futures_action.py +1 -1
- crypticorn/{models → trade/client/models}/strategy_exchange_info.py +1 -1
- crypticorn/{models → trade/client/models}/strategy_model.py +6 -2
- crypticorn/{models → trade/client/models}/validation_error.py +1 -1
- crypticorn/trade/client/py.typed +0 -0
- crypticorn/trade/client/rest.py +257 -0
- crypticorn/trade/main.py +39 -0
- crypticorn/trade/requirements.txt +4 -0
- crypticorn-1.0.2rc2.dist-info/METADATA +47 -0
- crypticorn-1.0.2rc2.dist-info/RECORD +128 -0
- {crypticorn-1.0.1.dist-info → crypticorn-1.0.2rc2.dist-info}/WHEEL +1 -1
- crypticorn/models/__init__.py +0 -31
- crypticorn/models/modified.py +0 -87
- crypticorn-1.0.1.dist-info/METADATA +0 -40
- crypticorn-1.0.1.dist-info/RECORD +0 -38
- /crypticorn/{models → trade/client/models}/exchange.py +0 -0
- /crypticorn/{models → trade/client/models}/execution_ids.py +0 -0
- /crypticorn/{models → trade/client/models}/futures_balance.py +0 -0
- /crypticorn/{models → trade/client/models}/margin_mode.py +0 -0
- /crypticorn/{models → trade/client/models}/market_type.py +0 -0
- /crypticorn/{models → trade/client/models}/notification_type.py +0 -0
- /crypticorn/{models → trade/client/models}/order_status.py +0 -0
- /crypticorn/{models → trade/client/models}/tpsl.py +0 -0
- /crypticorn/{models → trade/client/models}/trading_action_type.py +0 -0
- /crypticorn/{models → trade/client/models}/update_notification.py +0 -0
- /crypticorn/{models → trade/client/models}/validation_error_loc_inner.py +0 -0
- {crypticorn-1.0.1.dist-info → crypticorn-1.0.2rc2.dist-info}/LICENSE.md +0 -0
- {crypticorn-1.0.1.dist-info → crypticorn-1.0.2rc2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1767 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
FastAPI
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
import warnings
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
|
+
from typing_extensions import Annotated
|
18
|
+
|
19
|
+
from pydantic import StrictBool, StrictInt, StrictStr
|
20
|
+
from typing import Any, List, Optional
|
21
|
+
from crypticorn.trade.client.models.notification_model import NotificationModel
|
22
|
+
|
23
|
+
from crypticorn.trade.client.api_client import ApiClient, RequestSerialized
|
24
|
+
from crypticorn.trade.client.api_response import ApiResponse
|
25
|
+
from crypticorn.trade.client.rest import RESTResponseType
|
26
|
+
|
27
|
+
|
28
|
+
class NotificationsApi:
|
29
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
30
|
+
Ref: https://openapi-generator.tech
|
31
|
+
|
32
|
+
Do not edit the class manually.
|
33
|
+
"""
|
34
|
+
|
35
|
+
def __init__(self, api_client=None) -> None:
|
36
|
+
if api_client is None:
|
37
|
+
api_client = ApiClient.get_default()
|
38
|
+
self.api_client = api_client
|
39
|
+
|
40
|
+
|
41
|
+
@validate_call
|
42
|
+
def create_notification(
|
43
|
+
self,
|
44
|
+
notification_model: NotificationModel,
|
45
|
+
access_token: Optional[StrictStr] = None,
|
46
|
+
_request_timeout: Union[
|
47
|
+
None,
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
49
|
+
Tuple[
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
51
|
+
Annotated[StrictFloat, Field(gt=0)]
|
52
|
+
]
|
53
|
+
] = None,
|
54
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
55
|
+
_content_type: Optional[StrictStr] = None,
|
56
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
57
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
58
|
+
) -> object:
|
59
|
+
"""Create Notification
|
60
|
+
|
61
|
+
Create a new notification
|
62
|
+
|
63
|
+
:param notification_model: (required)
|
64
|
+
:type notification_model: NotificationModel
|
65
|
+
:param access_token:
|
66
|
+
:type access_token: str
|
67
|
+
:param _request_timeout: timeout setting for this request. If one
|
68
|
+
number provided, it will be total request
|
69
|
+
timeout. It can also be a pair (tuple) of
|
70
|
+
(connection, read) timeouts.
|
71
|
+
:type _request_timeout: int, tuple(int, int), optional
|
72
|
+
:param _request_auth: set to override the auth_settings for an a single
|
73
|
+
request; this effectively ignores the
|
74
|
+
authentication in the spec for a single request.
|
75
|
+
:type _request_auth: dict, optional
|
76
|
+
:param _content_type: force content-type for the request.
|
77
|
+
:type _content_type: str, Optional
|
78
|
+
:param _headers: set to override the headers for a single
|
79
|
+
request; this effectively ignores the headers
|
80
|
+
in the spec for a single request.
|
81
|
+
:type _headers: dict, optional
|
82
|
+
:param _host_index: set to override the host_index for a single
|
83
|
+
request; this effectively ignores the host_index
|
84
|
+
in the spec for a single request.
|
85
|
+
:type _host_index: int, optional
|
86
|
+
:return: Returns the result object.
|
87
|
+
""" # noqa: E501
|
88
|
+
|
89
|
+
_param = self._create_notification_serialize(
|
90
|
+
notification_model=notification_model,
|
91
|
+
access_token=access_token,
|
92
|
+
_request_auth=_request_auth,
|
93
|
+
_content_type=_content_type,
|
94
|
+
_headers=_headers,
|
95
|
+
_host_index=_host_index
|
96
|
+
)
|
97
|
+
|
98
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
99
|
+
'200': "object",
|
100
|
+
'422': "HTTPValidationError",
|
101
|
+
}
|
102
|
+
response_data = self.api_client.call_api(
|
103
|
+
*_param,
|
104
|
+
_request_timeout=_request_timeout
|
105
|
+
)
|
106
|
+
response_data.read()
|
107
|
+
return self.api_client.response_deserialize(
|
108
|
+
response_data=response_data,
|
109
|
+
response_types_map=_response_types_map,
|
110
|
+
).data
|
111
|
+
|
112
|
+
|
113
|
+
@validate_call
|
114
|
+
def create_notification_with_http_info(
|
115
|
+
self,
|
116
|
+
notification_model: NotificationModel,
|
117
|
+
access_token: Optional[StrictStr] = None,
|
118
|
+
_request_timeout: Union[
|
119
|
+
None,
|
120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
121
|
+
Tuple[
|
122
|
+
Annotated[StrictFloat, Field(gt=0)],
|
123
|
+
Annotated[StrictFloat, Field(gt=0)]
|
124
|
+
]
|
125
|
+
] = None,
|
126
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
127
|
+
_content_type: Optional[StrictStr] = None,
|
128
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
129
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
130
|
+
) -> ApiResponse[object]:
|
131
|
+
"""Create Notification
|
132
|
+
|
133
|
+
Create a new notification
|
134
|
+
|
135
|
+
:param notification_model: (required)
|
136
|
+
:type notification_model: NotificationModel
|
137
|
+
:param access_token:
|
138
|
+
:type access_token: str
|
139
|
+
:param _request_timeout: timeout setting for this request. If one
|
140
|
+
number provided, it will be total request
|
141
|
+
timeout. It can also be a pair (tuple) of
|
142
|
+
(connection, read) timeouts.
|
143
|
+
:type _request_timeout: int, tuple(int, int), optional
|
144
|
+
:param _request_auth: set to override the auth_settings for an a single
|
145
|
+
request; this effectively ignores the
|
146
|
+
authentication in the spec for a single request.
|
147
|
+
:type _request_auth: dict, optional
|
148
|
+
:param _content_type: force content-type for the request.
|
149
|
+
:type _content_type: str, Optional
|
150
|
+
:param _headers: set to override the headers for a single
|
151
|
+
request; this effectively ignores the headers
|
152
|
+
in the spec for a single request.
|
153
|
+
:type _headers: dict, optional
|
154
|
+
:param _host_index: set to override the host_index for a single
|
155
|
+
request; this effectively ignores the host_index
|
156
|
+
in the spec for a single request.
|
157
|
+
:type _host_index: int, optional
|
158
|
+
:return: Returns the result object.
|
159
|
+
""" # noqa: E501
|
160
|
+
|
161
|
+
_param = self._create_notification_serialize(
|
162
|
+
notification_model=notification_model,
|
163
|
+
access_token=access_token,
|
164
|
+
_request_auth=_request_auth,
|
165
|
+
_content_type=_content_type,
|
166
|
+
_headers=_headers,
|
167
|
+
_host_index=_host_index
|
168
|
+
)
|
169
|
+
|
170
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
171
|
+
'200': "object",
|
172
|
+
'422': "HTTPValidationError",
|
173
|
+
}
|
174
|
+
response_data = self.api_client.call_api(
|
175
|
+
*_param,
|
176
|
+
_request_timeout=_request_timeout
|
177
|
+
)
|
178
|
+
response_data.read()
|
179
|
+
return self.api_client.response_deserialize(
|
180
|
+
response_data=response_data,
|
181
|
+
response_types_map=_response_types_map,
|
182
|
+
)
|
183
|
+
|
184
|
+
|
185
|
+
@validate_call
|
186
|
+
def create_notification_without_preload_content(
|
187
|
+
self,
|
188
|
+
notification_model: NotificationModel,
|
189
|
+
access_token: Optional[StrictStr] = None,
|
190
|
+
_request_timeout: Union[
|
191
|
+
None,
|
192
|
+
Annotated[StrictFloat, Field(gt=0)],
|
193
|
+
Tuple[
|
194
|
+
Annotated[StrictFloat, Field(gt=0)],
|
195
|
+
Annotated[StrictFloat, Field(gt=0)]
|
196
|
+
]
|
197
|
+
] = None,
|
198
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
199
|
+
_content_type: Optional[StrictStr] = None,
|
200
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
201
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
202
|
+
) -> RESTResponseType:
|
203
|
+
"""Create Notification
|
204
|
+
|
205
|
+
Create a new notification
|
206
|
+
|
207
|
+
:param notification_model: (required)
|
208
|
+
:type notification_model: NotificationModel
|
209
|
+
:param access_token:
|
210
|
+
:type access_token: str
|
211
|
+
:param _request_timeout: timeout setting for this request. If one
|
212
|
+
number provided, it will be total request
|
213
|
+
timeout. It can also be a pair (tuple) of
|
214
|
+
(connection, read) timeouts.
|
215
|
+
:type _request_timeout: int, tuple(int, int), optional
|
216
|
+
:param _request_auth: set to override the auth_settings for an a single
|
217
|
+
request; this effectively ignores the
|
218
|
+
authentication in the spec for a single request.
|
219
|
+
:type _request_auth: dict, optional
|
220
|
+
:param _content_type: force content-type for the request.
|
221
|
+
:type _content_type: str, Optional
|
222
|
+
:param _headers: set to override the headers for a single
|
223
|
+
request; this effectively ignores the headers
|
224
|
+
in the spec for a single request.
|
225
|
+
:type _headers: dict, optional
|
226
|
+
:param _host_index: set to override the host_index for a single
|
227
|
+
request; this effectively ignores the host_index
|
228
|
+
in the spec for a single request.
|
229
|
+
:type _host_index: int, optional
|
230
|
+
:return: Returns the result object.
|
231
|
+
""" # noqa: E501
|
232
|
+
|
233
|
+
_param = self._create_notification_serialize(
|
234
|
+
notification_model=notification_model,
|
235
|
+
access_token=access_token,
|
236
|
+
_request_auth=_request_auth,
|
237
|
+
_content_type=_content_type,
|
238
|
+
_headers=_headers,
|
239
|
+
_host_index=_host_index
|
240
|
+
)
|
241
|
+
|
242
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
243
|
+
'200': "object",
|
244
|
+
'422': "HTTPValidationError",
|
245
|
+
}
|
246
|
+
response_data = self.api_client.call_api(
|
247
|
+
*_param,
|
248
|
+
_request_timeout=_request_timeout
|
249
|
+
)
|
250
|
+
return response_data.response
|
251
|
+
|
252
|
+
|
253
|
+
def _create_notification_serialize(
|
254
|
+
self,
|
255
|
+
notification_model,
|
256
|
+
access_token,
|
257
|
+
_request_auth,
|
258
|
+
_content_type,
|
259
|
+
_headers,
|
260
|
+
_host_index,
|
261
|
+
) -> RequestSerialized:
|
262
|
+
|
263
|
+
_host = None
|
264
|
+
|
265
|
+
_collection_formats: Dict[str, str] = {
|
266
|
+
}
|
267
|
+
|
268
|
+
_path_params: Dict[str, str] = {}
|
269
|
+
_query_params: List[Tuple[str, str]] = []
|
270
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
271
|
+
_form_params: List[Tuple[str, str]] = []
|
272
|
+
_files: Dict[
|
273
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
274
|
+
] = {}
|
275
|
+
_body_params: Optional[bytes] = None
|
276
|
+
|
277
|
+
# process the path parameters
|
278
|
+
# process the query parameters
|
279
|
+
# process the header parameters
|
280
|
+
# process the form parameters
|
281
|
+
# process the body parameter
|
282
|
+
if notification_model is not None:
|
283
|
+
_body_params = notification_model
|
284
|
+
|
285
|
+
|
286
|
+
# set the HTTP header `Accept`
|
287
|
+
if 'Accept' not in _header_params:
|
288
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
289
|
+
[
|
290
|
+
'application/json'
|
291
|
+
]
|
292
|
+
)
|
293
|
+
|
294
|
+
# set the HTTP header `Content-Type`
|
295
|
+
if _content_type:
|
296
|
+
_header_params['Content-Type'] = _content_type
|
297
|
+
else:
|
298
|
+
_default_content_type = (
|
299
|
+
self.api_client.select_header_content_type(
|
300
|
+
[
|
301
|
+
'application/json'
|
302
|
+
]
|
303
|
+
)
|
304
|
+
)
|
305
|
+
if _default_content_type is not None:
|
306
|
+
_header_params['Content-Type'] = _default_content_type
|
307
|
+
|
308
|
+
# authentication setting
|
309
|
+
_auth_settings: List[str] = [
|
310
|
+
'OAuth2PasswordBearer'
|
311
|
+
]
|
312
|
+
|
313
|
+
return self.api_client.param_serialize(
|
314
|
+
method='POST',
|
315
|
+
resource_path='/notifications',
|
316
|
+
path_params=_path_params,
|
317
|
+
query_params=_query_params,
|
318
|
+
header_params=_header_params,
|
319
|
+
body=_body_params,
|
320
|
+
post_params=_form_params,
|
321
|
+
files=_files,
|
322
|
+
auth_settings=_auth_settings,
|
323
|
+
collection_formats=_collection_formats,
|
324
|
+
_host=_host,
|
325
|
+
_request_auth=_request_auth
|
326
|
+
)
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
@validate_call
|
332
|
+
def delete_notification(
|
333
|
+
self,
|
334
|
+
id: StrictStr,
|
335
|
+
access_token: Optional[StrictStr] = None,
|
336
|
+
_request_timeout: Union[
|
337
|
+
None,
|
338
|
+
Annotated[StrictFloat, Field(gt=0)],
|
339
|
+
Tuple[
|
340
|
+
Annotated[StrictFloat, Field(gt=0)],
|
341
|
+
Annotated[StrictFloat, Field(gt=0)]
|
342
|
+
]
|
343
|
+
] = None,
|
344
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
345
|
+
_content_type: Optional[StrictStr] = None,
|
346
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
347
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
348
|
+
) -> object:
|
349
|
+
"""Delete Notification
|
350
|
+
|
351
|
+
|
352
|
+
:param id: (required)
|
353
|
+
:type id: str
|
354
|
+
:param access_token:
|
355
|
+
:type access_token: str
|
356
|
+
:param _request_timeout: timeout setting for this request. If one
|
357
|
+
number provided, it will be total request
|
358
|
+
timeout. It can also be a pair (tuple) of
|
359
|
+
(connection, read) timeouts.
|
360
|
+
:type _request_timeout: int, tuple(int, int), optional
|
361
|
+
:param _request_auth: set to override the auth_settings for an a single
|
362
|
+
request; this effectively ignores the
|
363
|
+
authentication in the spec for a single request.
|
364
|
+
:type _request_auth: dict, optional
|
365
|
+
:param _content_type: force content-type for the request.
|
366
|
+
:type _content_type: str, Optional
|
367
|
+
:param _headers: set to override the headers for a single
|
368
|
+
request; this effectively ignores the headers
|
369
|
+
in the spec for a single request.
|
370
|
+
:type _headers: dict, optional
|
371
|
+
:param _host_index: set to override the host_index for a single
|
372
|
+
request; this effectively ignores the host_index
|
373
|
+
in the spec for a single request.
|
374
|
+
:type _host_index: int, optional
|
375
|
+
:return: Returns the result object.
|
376
|
+
""" # noqa: E501
|
377
|
+
|
378
|
+
_param = self._delete_notification_serialize(
|
379
|
+
id=id,
|
380
|
+
access_token=access_token,
|
381
|
+
_request_auth=_request_auth,
|
382
|
+
_content_type=_content_type,
|
383
|
+
_headers=_headers,
|
384
|
+
_host_index=_host_index
|
385
|
+
)
|
386
|
+
|
387
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
388
|
+
'200': "object",
|
389
|
+
'422': "HTTPValidationError",
|
390
|
+
}
|
391
|
+
response_data = self.api_client.call_api(
|
392
|
+
*_param,
|
393
|
+
_request_timeout=_request_timeout
|
394
|
+
)
|
395
|
+
response_data.read()
|
396
|
+
return self.api_client.response_deserialize(
|
397
|
+
response_data=response_data,
|
398
|
+
response_types_map=_response_types_map,
|
399
|
+
).data
|
400
|
+
|
401
|
+
|
402
|
+
@validate_call
|
403
|
+
def delete_notification_with_http_info(
|
404
|
+
self,
|
405
|
+
id: StrictStr,
|
406
|
+
access_token: Optional[StrictStr] = None,
|
407
|
+
_request_timeout: Union[
|
408
|
+
None,
|
409
|
+
Annotated[StrictFloat, Field(gt=0)],
|
410
|
+
Tuple[
|
411
|
+
Annotated[StrictFloat, Field(gt=0)],
|
412
|
+
Annotated[StrictFloat, Field(gt=0)]
|
413
|
+
]
|
414
|
+
] = None,
|
415
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
416
|
+
_content_type: Optional[StrictStr] = None,
|
417
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
418
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
419
|
+
) -> ApiResponse[object]:
|
420
|
+
"""Delete Notification
|
421
|
+
|
422
|
+
|
423
|
+
:param id: (required)
|
424
|
+
:type id: str
|
425
|
+
:param access_token:
|
426
|
+
:type access_token: str
|
427
|
+
:param _request_timeout: timeout setting for this request. If one
|
428
|
+
number provided, it will be total request
|
429
|
+
timeout. It can also be a pair (tuple) of
|
430
|
+
(connection, read) timeouts.
|
431
|
+
:type _request_timeout: int, tuple(int, int), optional
|
432
|
+
:param _request_auth: set to override the auth_settings for an a single
|
433
|
+
request; this effectively ignores the
|
434
|
+
authentication in the spec for a single request.
|
435
|
+
:type _request_auth: dict, optional
|
436
|
+
:param _content_type: force content-type for the request.
|
437
|
+
:type _content_type: str, Optional
|
438
|
+
:param _headers: set to override the headers for a single
|
439
|
+
request; this effectively ignores the headers
|
440
|
+
in the spec for a single request.
|
441
|
+
:type _headers: dict, optional
|
442
|
+
:param _host_index: set to override the host_index for a single
|
443
|
+
request; this effectively ignores the host_index
|
444
|
+
in the spec for a single request.
|
445
|
+
:type _host_index: int, optional
|
446
|
+
:return: Returns the result object.
|
447
|
+
""" # noqa: E501
|
448
|
+
|
449
|
+
_param = self._delete_notification_serialize(
|
450
|
+
id=id,
|
451
|
+
access_token=access_token,
|
452
|
+
_request_auth=_request_auth,
|
453
|
+
_content_type=_content_type,
|
454
|
+
_headers=_headers,
|
455
|
+
_host_index=_host_index
|
456
|
+
)
|
457
|
+
|
458
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
459
|
+
'200': "object",
|
460
|
+
'422': "HTTPValidationError",
|
461
|
+
}
|
462
|
+
response_data = self.api_client.call_api(
|
463
|
+
*_param,
|
464
|
+
_request_timeout=_request_timeout
|
465
|
+
)
|
466
|
+
response_data.read()
|
467
|
+
return self.api_client.response_deserialize(
|
468
|
+
response_data=response_data,
|
469
|
+
response_types_map=_response_types_map,
|
470
|
+
)
|
471
|
+
|
472
|
+
|
473
|
+
@validate_call
|
474
|
+
def delete_notification_without_preload_content(
|
475
|
+
self,
|
476
|
+
id: StrictStr,
|
477
|
+
access_token: Optional[StrictStr] = None,
|
478
|
+
_request_timeout: Union[
|
479
|
+
None,
|
480
|
+
Annotated[StrictFloat, Field(gt=0)],
|
481
|
+
Tuple[
|
482
|
+
Annotated[StrictFloat, Field(gt=0)],
|
483
|
+
Annotated[StrictFloat, Field(gt=0)]
|
484
|
+
]
|
485
|
+
] = None,
|
486
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
487
|
+
_content_type: Optional[StrictStr] = None,
|
488
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
489
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
490
|
+
) -> RESTResponseType:
|
491
|
+
"""Delete Notification
|
492
|
+
|
493
|
+
|
494
|
+
:param id: (required)
|
495
|
+
:type id: str
|
496
|
+
:param access_token:
|
497
|
+
:type access_token: str
|
498
|
+
:param _request_timeout: timeout setting for this request. If one
|
499
|
+
number provided, it will be total request
|
500
|
+
timeout. It can also be a pair (tuple) of
|
501
|
+
(connection, read) timeouts.
|
502
|
+
:type _request_timeout: int, tuple(int, int), optional
|
503
|
+
:param _request_auth: set to override the auth_settings for an a single
|
504
|
+
request; this effectively ignores the
|
505
|
+
authentication in the spec for a single request.
|
506
|
+
:type _request_auth: dict, optional
|
507
|
+
:param _content_type: force content-type for the request.
|
508
|
+
:type _content_type: str, Optional
|
509
|
+
:param _headers: set to override the headers for a single
|
510
|
+
request; this effectively ignores the headers
|
511
|
+
in the spec for a single request.
|
512
|
+
:type _headers: dict, optional
|
513
|
+
:param _host_index: set to override the host_index for a single
|
514
|
+
request; this effectively ignores the host_index
|
515
|
+
in the spec for a single request.
|
516
|
+
:type _host_index: int, optional
|
517
|
+
:return: Returns the result object.
|
518
|
+
""" # noqa: E501
|
519
|
+
|
520
|
+
_param = self._delete_notification_serialize(
|
521
|
+
id=id,
|
522
|
+
access_token=access_token,
|
523
|
+
_request_auth=_request_auth,
|
524
|
+
_content_type=_content_type,
|
525
|
+
_headers=_headers,
|
526
|
+
_host_index=_host_index
|
527
|
+
)
|
528
|
+
|
529
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
530
|
+
'200': "object",
|
531
|
+
'422': "HTTPValidationError",
|
532
|
+
}
|
533
|
+
response_data = self.api_client.call_api(
|
534
|
+
*_param,
|
535
|
+
_request_timeout=_request_timeout
|
536
|
+
)
|
537
|
+
return response_data.response
|
538
|
+
|
539
|
+
|
540
|
+
def _delete_notification_serialize(
|
541
|
+
self,
|
542
|
+
id,
|
543
|
+
access_token,
|
544
|
+
_request_auth,
|
545
|
+
_content_type,
|
546
|
+
_headers,
|
547
|
+
_host_index,
|
548
|
+
) -> RequestSerialized:
|
549
|
+
|
550
|
+
_host = None
|
551
|
+
|
552
|
+
_collection_formats: Dict[str, str] = {
|
553
|
+
}
|
554
|
+
|
555
|
+
_path_params: Dict[str, str] = {}
|
556
|
+
_query_params: List[Tuple[str, str]] = []
|
557
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
558
|
+
_form_params: List[Tuple[str, str]] = []
|
559
|
+
_files: Dict[
|
560
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
561
|
+
] = {}
|
562
|
+
_body_params: Optional[bytes] = None
|
563
|
+
|
564
|
+
# process the path parameters
|
565
|
+
if id is not None:
|
566
|
+
_path_params['id'] = id
|
567
|
+
# process the query parameters
|
568
|
+
# process the header parameters
|
569
|
+
# process the form parameters
|
570
|
+
# process the body parameter
|
571
|
+
|
572
|
+
|
573
|
+
# set the HTTP header `Accept`
|
574
|
+
if 'Accept' not in _header_params:
|
575
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
576
|
+
[
|
577
|
+
'application/json'
|
578
|
+
]
|
579
|
+
)
|
580
|
+
|
581
|
+
|
582
|
+
# authentication setting
|
583
|
+
_auth_settings: List[str] = [
|
584
|
+
'OAuth2PasswordBearer'
|
585
|
+
]
|
586
|
+
|
587
|
+
return self.api_client.param_serialize(
|
588
|
+
method='DELETE',
|
589
|
+
resource_path='/notifications/{id}',
|
590
|
+
path_params=_path_params,
|
591
|
+
query_params=_query_params,
|
592
|
+
header_params=_header_params,
|
593
|
+
body=_body_params,
|
594
|
+
post_params=_form_params,
|
595
|
+
files=_files,
|
596
|
+
auth_settings=_auth_settings,
|
597
|
+
collection_formats=_collection_formats,
|
598
|
+
_host=_host,
|
599
|
+
_request_auth=_request_auth
|
600
|
+
)
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
@validate_call
|
606
|
+
def delete_notifications(
|
607
|
+
self,
|
608
|
+
access_token: Optional[StrictStr] = None,
|
609
|
+
_request_timeout: Union[
|
610
|
+
None,
|
611
|
+
Annotated[StrictFloat, Field(gt=0)],
|
612
|
+
Tuple[
|
613
|
+
Annotated[StrictFloat, Field(gt=0)],
|
614
|
+
Annotated[StrictFloat, Field(gt=0)]
|
615
|
+
]
|
616
|
+
] = None,
|
617
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
618
|
+
_content_type: Optional[StrictStr] = None,
|
619
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
620
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
621
|
+
) -> object:
|
622
|
+
"""Delete Notifications
|
623
|
+
|
624
|
+
Delete all notifications for the authenticated user
|
625
|
+
|
626
|
+
:param access_token:
|
627
|
+
:type access_token: str
|
628
|
+
:param _request_timeout: timeout setting for this request. If one
|
629
|
+
number provided, it will be total request
|
630
|
+
timeout. It can also be a pair (tuple) of
|
631
|
+
(connection, read) timeouts.
|
632
|
+
:type _request_timeout: int, tuple(int, int), optional
|
633
|
+
:param _request_auth: set to override the auth_settings for an a single
|
634
|
+
request; this effectively ignores the
|
635
|
+
authentication in the spec for a single request.
|
636
|
+
:type _request_auth: dict, optional
|
637
|
+
:param _content_type: force content-type for the request.
|
638
|
+
:type _content_type: str, Optional
|
639
|
+
:param _headers: set to override the headers for a single
|
640
|
+
request; this effectively ignores the headers
|
641
|
+
in the spec for a single request.
|
642
|
+
:type _headers: dict, optional
|
643
|
+
:param _host_index: set to override the host_index for a single
|
644
|
+
request; this effectively ignores the host_index
|
645
|
+
in the spec for a single request.
|
646
|
+
:type _host_index: int, optional
|
647
|
+
:return: Returns the result object.
|
648
|
+
""" # noqa: E501
|
649
|
+
|
650
|
+
_param = self._delete_notifications_serialize(
|
651
|
+
access_token=access_token,
|
652
|
+
_request_auth=_request_auth,
|
653
|
+
_content_type=_content_type,
|
654
|
+
_headers=_headers,
|
655
|
+
_host_index=_host_index
|
656
|
+
)
|
657
|
+
|
658
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
659
|
+
'200': "object",
|
660
|
+
'422': "HTTPValidationError",
|
661
|
+
}
|
662
|
+
response_data = self.api_client.call_api(
|
663
|
+
*_param,
|
664
|
+
_request_timeout=_request_timeout
|
665
|
+
)
|
666
|
+
response_data.read()
|
667
|
+
return self.api_client.response_deserialize(
|
668
|
+
response_data=response_data,
|
669
|
+
response_types_map=_response_types_map,
|
670
|
+
).data
|
671
|
+
|
672
|
+
|
673
|
+
@validate_call
|
674
|
+
def delete_notifications_with_http_info(
|
675
|
+
self,
|
676
|
+
access_token: Optional[StrictStr] = None,
|
677
|
+
_request_timeout: Union[
|
678
|
+
None,
|
679
|
+
Annotated[StrictFloat, Field(gt=0)],
|
680
|
+
Tuple[
|
681
|
+
Annotated[StrictFloat, Field(gt=0)],
|
682
|
+
Annotated[StrictFloat, Field(gt=0)]
|
683
|
+
]
|
684
|
+
] = None,
|
685
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
686
|
+
_content_type: Optional[StrictStr] = None,
|
687
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
688
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
689
|
+
) -> ApiResponse[object]:
|
690
|
+
"""Delete Notifications
|
691
|
+
|
692
|
+
Delete all notifications for the authenticated user
|
693
|
+
|
694
|
+
:param access_token:
|
695
|
+
:type access_token: str
|
696
|
+
:param _request_timeout: timeout setting for this request. If one
|
697
|
+
number provided, it will be total request
|
698
|
+
timeout. It can also be a pair (tuple) of
|
699
|
+
(connection, read) timeouts.
|
700
|
+
:type _request_timeout: int, tuple(int, int), optional
|
701
|
+
:param _request_auth: set to override the auth_settings for an a single
|
702
|
+
request; this effectively ignores the
|
703
|
+
authentication in the spec for a single request.
|
704
|
+
:type _request_auth: dict, optional
|
705
|
+
:param _content_type: force content-type for the request.
|
706
|
+
:type _content_type: str, Optional
|
707
|
+
:param _headers: set to override the headers for a single
|
708
|
+
request; this effectively ignores the headers
|
709
|
+
in the spec for a single request.
|
710
|
+
:type _headers: dict, optional
|
711
|
+
:param _host_index: set to override the host_index for a single
|
712
|
+
request; this effectively ignores the host_index
|
713
|
+
in the spec for a single request.
|
714
|
+
:type _host_index: int, optional
|
715
|
+
:return: Returns the result object.
|
716
|
+
""" # noqa: E501
|
717
|
+
|
718
|
+
_param = self._delete_notifications_serialize(
|
719
|
+
access_token=access_token,
|
720
|
+
_request_auth=_request_auth,
|
721
|
+
_content_type=_content_type,
|
722
|
+
_headers=_headers,
|
723
|
+
_host_index=_host_index
|
724
|
+
)
|
725
|
+
|
726
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
727
|
+
'200': "object",
|
728
|
+
'422': "HTTPValidationError",
|
729
|
+
}
|
730
|
+
response_data = self.api_client.call_api(
|
731
|
+
*_param,
|
732
|
+
_request_timeout=_request_timeout
|
733
|
+
)
|
734
|
+
response_data.read()
|
735
|
+
return self.api_client.response_deserialize(
|
736
|
+
response_data=response_data,
|
737
|
+
response_types_map=_response_types_map,
|
738
|
+
)
|
739
|
+
|
740
|
+
|
741
|
+
@validate_call
|
742
|
+
def delete_notifications_without_preload_content(
|
743
|
+
self,
|
744
|
+
access_token: Optional[StrictStr] = None,
|
745
|
+
_request_timeout: Union[
|
746
|
+
None,
|
747
|
+
Annotated[StrictFloat, Field(gt=0)],
|
748
|
+
Tuple[
|
749
|
+
Annotated[StrictFloat, Field(gt=0)],
|
750
|
+
Annotated[StrictFloat, Field(gt=0)]
|
751
|
+
]
|
752
|
+
] = None,
|
753
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
754
|
+
_content_type: Optional[StrictStr] = None,
|
755
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
756
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
757
|
+
) -> RESTResponseType:
|
758
|
+
"""Delete Notifications
|
759
|
+
|
760
|
+
Delete all notifications for the authenticated user
|
761
|
+
|
762
|
+
:param access_token:
|
763
|
+
:type access_token: str
|
764
|
+
:param _request_timeout: timeout setting for this request. If one
|
765
|
+
number provided, it will be total request
|
766
|
+
timeout. It can also be a pair (tuple) of
|
767
|
+
(connection, read) timeouts.
|
768
|
+
:type _request_timeout: int, tuple(int, int), optional
|
769
|
+
:param _request_auth: set to override the auth_settings for an a single
|
770
|
+
request; this effectively ignores the
|
771
|
+
authentication in the spec for a single request.
|
772
|
+
:type _request_auth: dict, optional
|
773
|
+
:param _content_type: force content-type for the request.
|
774
|
+
:type _content_type: str, Optional
|
775
|
+
:param _headers: set to override the headers for a single
|
776
|
+
request; this effectively ignores the headers
|
777
|
+
in the spec for a single request.
|
778
|
+
:type _headers: dict, optional
|
779
|
+
:param _host_index: set to override the host_index for a single
|
780
|
+
request; this effectively ignores the host_index
|
781
|
+
in the spec for a single request.
|
782
|
+
:type _host_index: int, optional
|
783
|
+
:return: Returns the result object.
|
784
|
+
""" # noqa: E501
|
785
|
+
|
786
|
+
_param = self._delete_notifications_serialize(
|
787
|
+
access_token=access_token,
|
788
|
+
_request_auth=_request_auth,
|
789
|
+
_content_type=_content_type,
|
790
|
+
_headers=_headers,
|
791
|
+
_host_index=_host_index
|
792
|
+
)
|
793
|
+
|
794
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
795
|
+
'200': "object",
|
796
|
+
'422': "HTTPValidationError",
|
797
|
+
}
|
798
|
+
response_data = self.api_client.call_api(
|
799
|
+
*_param,
|
800
|
+
_request_timeout=_request_timeout
|
801
|
+
)
|
802
|
+
return response_data.response
|
803
|
+
|
804
|
+
|
805
|
+
def _delete_notifications_serialize(
|
806
|
+
self,
|
807
|
+
access_token,
|
808
|
+
_request_auth,
|
809
|
+
_content_type,
|
810
|
+
_headers,
|
811
|
+
_host_index,
|
812
|
+
) -> RequestSerialized:
|
813
|
+
|
814
|
+
_host = None
|
815
|
+
|
816
|
+
_collection_formats: Dict[str, str] = {
|
817
|
+
}
|
818
|
+
|
819
|
+
_path_params: Dict[str, str] = {}
|
820
|
+
_query_params: List[Tuple[str, str]] = []
|
821
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
822
|
+
_form_params: List[Tuple[str, str]] = []
|
823
|
+
_files: Dict[
|
824
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
825
|
+
] = {}
|
826
|
+
_body_params: Optional[bytes] = None
|
827
|
+
|
828
|
+
# process the path parameters
|
829
|
+
# process the query parameters
|
830
|
+
# process the header parameters
|
831
|
+
# process the form parameters
|
832
|
+
# process the body parameter
|
833
|
+
|
834
|
+
|
835
|
+
# set the HTTP header `Accept`
|
836
|
+
if 'Accept' not in _header_params:
|
837
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
838
|
+
[
|
839
|
+
'application/json'
|
840
|
+
]
|
841
|
+
)
|
842
|
+
|
843
|
+
|
844
|
+
# authentication setting
|
845
|
+
_auth_settings: List[str] = [
|
846
|
+
'OAuth2PasswordBearer'
|
847
|
+
]
|
848
|
+
|
849
|
+
return self.api_client.param_serialize(
|
850
|
+
method='DELETE',
|
851
|
+
resource_path='/notifications',
|
852
|
+
path_params=_path_params,
|
853
|
+
query_params=_query_params,
|
854
|
+
header_params=_header_params,
|
855
|
+
body=_body_params,
|
856
|
+
post_params=_form_params,
|
857
|
+
files=_files,
|
858
|
+
auth_settings=_auth_settings,
|
859
|
+
collection_formats=_collection_formats,
|
860
|
+
_host=_host,
|
861
|
+
_request_auth=_request_auth
|
862
|
+
)
|
863
|
+
|
864
|
+
|
865
|
+
|
866
|
+
|
867
|
+
@validate_call
|
868
|
+
def get_notifications(
|
869
|
+
self,
|
870
|
+
limit: Optional[StrictInt] = None,
|
871
|
+
offset: Optional[StrictInt] = None,
|
872
|
+
access_token: Optional[StrictStr] = None,
|
873
|
+
_request_timeout: Union[
|
874
|
+
None,
|
875
|
+
Annotated[StrictFloat, Field(gt=0)],
|
876
|
+
Tuple[
|
877
|
+
Annotated[StrictFloat, Field(gt=0)],
|
878
|
+
Annotated[StrictFloat, Field(gt=0)]
|
879
|
+
]
|
880
|
+
] = None,
|
881
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
882
|
+
_content_type: Optional[StrictStr] = None,
|
883
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
884
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
885
|
+
) -> List[NotificationModel]:
|
886
|
+
"""Get Notifications
|
887
|
+
|
888
|
+
Get all notifications for the authenticated user
|
889
|
+
|
890
|
+
:param limit:
|
891
|
+
:type limit: int
|
892
|
+
:param offset:
|
893
|
+
:type offset: int
|
894
|
+
:param access_token:
|
895
|
+
:type access_token: str
|
896
|
+
:param _request_timeout: timeout setting for this request. If one
|
897
|
+
number provided, it will be total request
|
898
|
+
timeout. It can also be a pair (tuple) of
|
899
|
+
(connection, read) timeouts.
|
900
|
+
:type _request_timeout: int, tuple(int, int), optional
|
901
|
+
:param _request_auth: set to override the auth_settings for an a single
|
902
|
+
request; this effectively ignores the
|
903
|
+
authentication in the spec for a single request.
|
904
|
+
:type _request_auth: dict, optional
|
905
|
+
:param _content_type: force content-type for the request.
|
906
|
+
:type _content_type: str, Optional
|
907
|
+
:param _headers: set to override the headers for a single
|
908
|
+
request; this effectively ignores the headers
|
909
|
+
in the spec for a single request.
|
910
|
+
:type _headers: dict, optional
|
911
|
+
:param _host_index: set to override the host_index for a single
|
912
|
+
request; this effectively ignores the host_index
|
913
|
+
in the spec for a single request.
|
914
|
+
:type _host_index: int, optional
|
915
|
+
:return: Returns the result object.
|
916
|
+
""" # noqa: E501
|
917
|
+
|
918
|
+
_param = self._get_notifications_serialize(
|
919
|
+
limit=limit,
|
920
|
+
offset=offset,
|
921
|
+
access_token=access_token,
|
922
|
+
_request_auth=_request_auth,
|
923
|
+
_content_type=_content_type,
|
924
|
+
_headers=_headers,
|
925
|
+
_host_index=_host_index
|
926
|
+
)
|
927
|
+
|
928
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
929
|
+
'200': "List[NotificationModel]",
|
930
|
+
'422': "HTTPValidationError",
|
931
|
+
}
|
932
|
+
response_data = self.api_client.call_api(
|
933
|
+
*_param,
|
934
|
+
_request_timeout=_request_timeout
|
935
|
+
)
|
936
|
+
response_data.read()
|
937
|
+
return self.api_client.response_deserialize(
|
938
|
+
response_data=response_data,
|
939
|
+
response_types_map=_response_types_map,
|
940
|
+
).data
|
941
|
+
|
942
|
+
|
943
|
+
@validate_call
|
944
|
+
def get_notifications_with_http_info(
|
945
|
+
self,
|
946
|
+
limit: Optional[StrictInt] = None,
|
947
|
+
offset: Optional[StrictInt] = None,
|
948
|
+
access_token: Optional[StrictStr] = None,
|
949
|
+
_request_timeout: Union[
|
950
|
+
None,
|
951
|
+
Annotated[StrictFloat, Field(gt=0)],
|
952
|
+
Tuple[
|
953
|
+
Annotated[StrictFloat, Field(gt=0)],
|
954
|
+
Annotated[StrictFloat, Field(gt=0)]
|
955
|
+
]
|
956
|
+
] = None,
|
957
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
958
|
+
_content_type: Optional[StrictStr] = None,
|
959
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
960
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
961
|
+
) -> ApiResponse[List[NotificationModel]]:
|
962
|
+
"""Get Notifications
|
963
|
+
|
964
|
+
Get all notifications for the authenticated user
|
965
|
+
|
966
|
+
:param limit:
|
967
|
+
:type limit: int
|
968
|
+
:param offset:
|
969
|
+
:type offset: int
|
970
|
+
:param access_token:
|
971
|
+
:type access_token: str
|
972
|
+
:param _request_timeout: timeout setting for this request. If one
|
973
|
+
number provided, it will be total request
|
974
|
+
timeout. It can also be a pair (tuple) of
|
975
|
+
(connection, read) timeouts.
|
976
|
+
:type _request_timeout: int, tuple(int, int), optional
|
977
|
+
:param _request_auth: set to override the auth_settings for an a single
|
978
|
+
request; this effectively ignores the
|
979
|
+
authentication in the spec for a single request.
|
980
|
+
:type _request_auth: dict, optional
|
981
|
+
:param _content_type: force content-type for the request.
|
982
|
+
:type _content_type: str, Optional
|
983
|
+
:param _headers: set to override the headers for a single
|
984
|
+
request; this effectively ignores the headers
|
985
|
+
in the spec for a single request.
|
986
|
+
:type _headers: dict, optional
|
987
|
+
:param _host_index: set to override the host_index for a single
|
988
|
+
request; this effectively ignores the host_index
|
989
|
+
in the spec for a single request.
|
990
|
+
:type _host_index: int, optional
|
991
|
+
:return: Returns the result object.
|
992
|
+
""" # noqa: E501
|
993
|
+
|
994
|
+
_param = self._get_notifications_serialize(
|
995
|
+
limit=limit,
|
996
|
+
offset=offset,
|
997
|
+
access_token=access_token,
|
998
|
+
_request_auth=_request_auth,
|
999
|
+
_content_type=_content_type,
|
1000
|
+
_headers=_headers,
|
1001
|
+
_host_index=_host_index
|
1002
|
+
)
|
1003
|
+
|
1004
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1005
|
+
'200': "List[NotificationModel]",
|
1006
|
+
'422': "HTTPValidationError",
|
1007
|
+
}
|
1008
|
+
response_data = self.api_client.call_api(
|
1009
|
+
*_param,
|
1010
|
+
_request_timeout=_request_timeout
|
1011
|
+
)
|
1012
|
+
response_data.read()
|
1013
|
+
return self.api_client.response_deserialize(
|
1014
|
+
response_data=response_data,
|
1015
|
+
response_types_map=_response_types_map,
|
1016
|
+
)
|
1017
|
+
|
1018
|
+
|
1019
|
+
@validate_call
|
1020
|
+
def get_notifications_without_preload_content(
|
1021
|
+
self,
|
1022
|
+
limit: Optional[StrictInt] = None,
|
1023
|
+
offset: Optional[StrictInt] = None,
|
1024
|
+
access_token: Optional[StrictStr] = None,
|
1025
|
+
_request_timeout: Union[
|
1026
|
+
None,
|
1027
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1028
|
+
Tuple[
|
1029
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1030
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1031
|
+
]
|
1032
|
+
] = None,
|
1033
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1034
|
+
_content_type: Optional[StrictStr] = None,
|
1035
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1036
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1037
|
+
) -> RESTResponseType:
|
1038
|
+
"""Get Notifications
|
1039
|
+
|
1040
|
+
Get all notifications for the authenticated user
|
1041
|
+
|
1042
|
+
:param limit:
|
1043
|
+
:type limit: int
|
1044
|
+
:param offset:
|
1045
|
+
:type offset: int
|
1046
|
+
:param access_token:
|
1047
|
+
:type access_token: str
|
1048
|
+
:param _request_timeout: timeout setting for this request. If one
|
1049
|
+
number provided, it will be total request
|
1050
|
+
timeout. It can also be a pair (tuple) of
|
1051
|
+
(connection, read) timeouts.
|
1052
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1053
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1054
|
+
request; this effectively ignores the
|
1055
|
+
authentication in the spec for a single request.
|
1056
|
+
:type _request_auth: dict, optional
|
1057
|
+
:param _content_type: force content-type for the request.
|
1058
|
+
:type _content_type: str, Optional
|
1059
|
+
:param _headers: set to override the headers for a single
|
1060
|
+
request; this effectively ignores the headers
|
1061
|
+
in the spec for a single request.
|
1062
|
+
:type _headers: dict, optional
|
1063
|
+
:param _host_index: set to override the host_index for a single
|
1064
|
+
request; this effectively ignores the host_index
|
1065
|
+
in the spec for a single request.
|
1066
|
+
:type _host_index: int, optional
|
1067
|
+
:return: Returns the result object.
|
1068
|
+
""" # noqa: E501
|
1069
|
+
|
1070
|
+
_param = self._get_notifications_serialize(
|
1071
|
+
limit=limit,
|
1072
|
+
offset=offset,
|
1073
|
+
access_token=access_token,
|
1074
|
+
_request_auth=_request_auth,
|
1075
|
+
_content_type=_content_type,
|
1076
|
+
_headers=_headers,
|
1077
|
+
_host_index=_host_index
|
1078
|
+
)
|
1079
|
+
|
1080
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1081
|
+
'200': "List[NotificationModel]",
|
1082
|
+
'422': "HTTPValidationError",
|
1083
|
+
}
|
1084
|
+
response_data = self.api_client.call_api(
|
1085
|
+
*_param,
|
1086
|
+
_request_timeout=_request_timeout
|
1087
|
+
)
|
1088
|
+
return response_data.response
|
1089
|
+
|
1090
|
+
|
1091
|
+
def _get_notifications_serialize(
|
1092
|
+
self,
|
1093
|
+
limit,
|
1094
|
+
offset,
|
1095
|
+
access_token,
|
1096
|
+
_request_auth,
|
1097
|
+
_content_type,
|
1098
|
+
_headers,
|
1099
|
+
_host_index,
|
1100
|
+
) -> RequestSerialized:
|
1101
|
+
|
1102
|
+
_host = None
|
1103
|
+
|
1104
|
+
_collection_formats: Dict[str, str] = {
|
1105
|
+
}
|
1106
|
+
|
1107
|
+
_path_params: Dict[str, str] = {}
|
1108
|
+
_query_params: List[Tuple[str, str]] = []
|
1109
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1110
|
+
_form_params: List[Tuple[str, str]] = []
|
1111
|
+
_files: Dict[
|
1112
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1113
|
+
] = {}
|
1114
|
+
_body_params: Optional[bytes] = None
|
1115
|
+
|
1116
|
+
# process the path parameters
|
1117
|
+
# process the query parameters
|
1118
|
+
if limit is not None:
|
1119
|
+
|
1120
|
+
_query_params.append(('limit', limit))
|
1121
|
+
|
1122
|
+
if offset is not None:
|
1123
|
+
|
1124
|
+
_query_params.append(('offset', offset))
|
1125
|
+
|
1126
|
+
# process the header parameters
|
1127
|
+
# process the form parameters
|
1128
|
+
# process the body parameter
|
1129
|
+
|
1130
|
+
|
1131
|
+
# set the HTTP header `Accept`
|
1132
|
+
if 'Accept' not in _header_params:
|
1133
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1134
|
+
[
|
1135
|
+
'application/json'
|
1136
|
+
]
|
1137
|
+
)
|
1138
|
+
|
1139
|
+
|
1140
|
+
# authentication setting
|
1141
|
+
_auth_settings: List[str] = [
|
1142
|
+
'OAuth2PasswordBearer'
|
1143
|
+
]
|
1144
|
+
|
1145
|
+
return self.api_client.param_serialize(
|
1146
|
+
method='GET',
|
1147
|
+
resource_path='/notifications',
|
1148
|
+
path_params=_path_params,
|
1149
|
+
query_params=_query_params,
|
1150
|
+
header_params=_header_params,
|
1151
|
+
body=_body_params,
|
1152
|
+
post_params=_form_params,
|
1153
|
+
files=_files,
|
1154
|
+
auth_settings=_auth_settings,
|
1155
|
+
collection_formats=_collection_formats,
|
1156
|
+
_host=_host,
|
1157
|
+
_request_auth=_request_auth
|
1158
|
+
)
|
1159
|
+
|
1160
|
+
|
1161
|
+
|
1162
|
+
|
1163
|
+
@validate_call
|
1164
|
+
def update_notification(
|
1165
|
+
self,
|
1166
|
+
id: StrictStr,
|
1167
|
+
viewed: StrictBool,
|
1168
|
+
sent: StrictBool,
|
1169
|
+
access_token: Optional[StrictStr] = None,
|
1170
|
+
_request_timeout: Union[
|
1171
|
+
None,
|
1172
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1173
|
+
Tuple[
|
1174
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1175
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1176
|
+
]
|
1177
|
+
] = None,
|
1178
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1179
|
+
_content_type: Optional[StrictStr] = None,
|
1180
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1181
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1182
|
+
) -> object:
|
1183
|
+
"""Update Notification
|
1184
|
+
|
1185
|
+
Update a notification's viewed status
|
1186
|
+
|
1187
|
+
:param id: (required)
|
1188
|
+
:type id: str
|
1189
|
+
:param viewed: (required)
|
1190
|
+
:type viewed: bool
|
1191
|
+
:param sent: (required)
|
1192
|
+
:type sent: bool
|
1193
|
+
:param access_token:
|
1194
|
+
:type access_token: str
|
1195
|
+
:param _request_timeout: timeout setting for this request. If one
|
1196
|
+
number provided, it will be total request
|
1197
|
+
timeout. It can also be a pair (tuple) of
|
1198
|
+
(connection, read) timeouts.
|
1199
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1200
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1201
|
+
request; this effectively ignores the
|
1202
|
+
authentication in the spec for a single request.
|
1203
|
+
:type _request_auth: dict, optional
|
1204
|
+
:param _content_type: force content-type for the request.
|
1205
|
+
:type _content_type: str, Optional
|
1206
|
+
:param _headers: set to override the headers for a single
|
1207
|
+
request; this effectively ignores the headers
|
1208
|
+
in the spec for a single request.
|
1209
|
+
:type _headers: dict, optional
|
1210
|
+
:param _host_index: set to override the host_index for a single
|
1211
|
+
request; this effectively ignores the host_index
|
1212
|
+
in the spec for a single request.
|
1213
|
+
:type _host_index: int, optional
|
1214
|
+
:return: Returns the result object.
|
1215
|
+
""" # noqa: E501
|
1216
|
+
|
1217
|
+
_param = self._update_notification_serialize(
|
1218
|
+
id=id,
|
1219
|
+
viewed=viewed,
|
1220
|
+
sent=sent,
|
1221
|
+
access_token=access_token,
|
1222
|
+
_request_auth=_request_auth,
|
1223
|
+
_content_type=_content_type,
|
1224
|
+
_headers=_headers,
|
1225
|
+
_host_index=_host_index
|
1226
|
+
)
|
1227
|
+
|
1228
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1229
|
+
'200': "object",
|
1230
|
+
'422': "HTTPValidationError",
|
1231
|
+
}
|
1232
|
+
response_data = self.api_client.call_api(
|
1233
|
+
*_param,
|
1234
|
+
_request_timeout=_request_timeout
|
1235
|
+
)
|
1236
|
+
response_data.read()
|
1237
|
+
return self.api_client.response_deserialize(
|
1238
|
+
response_data=response_data,
|
1239
|
+
response_types_map=_response_types_map,
|
1240
|
+
).data
|
1241
|
+
|
1242
|
+
|
1243
|
+
@validate_call
|
1244
|
+
def update_notification_with_http_info(
|
1245
|
+
self,
|
1246
|
+
id: StrictStr,
|
1247
|
+
viewed: StrictBool,
|
1248
|
+
sent: StrictBool,
|
1249
|
+
access_token: Optional[StrictStr] = None,
|
1250
|
+
_request_timeout: Union[
|
1251
|
+
None,
|
1252
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1253
|
+
Tuple[
|
1254
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1255
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1256
|
+
]
|
1257
|
+
] = None,
|
1258
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1259
|
+
_content_type: Optional[StrictStr] = None,
|
1260
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1261
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1262
|
+
) -> ApiResponse[object]:
|
1263
|
+
"""Update Notification
|
1264
|
+
|
1265
|
+
Update a notification's viewed status
|
1266
|
+
|
1267
|
+
:param id: (required)
|
1268
|
+
:type id: str
|
1269
|
+
:param viewed: (required)
|
1270
|
+
:type viewed: bool
|
1271
|
+
:param sent: (required)
|
1272
|
+
:type sent: bool
|
1273
|
+
:param access_token:
|
1274
|
+
:type access_token: str
|
1275
|
+
:param _request_timeout: timeout setting for this request. If one
|
1276
|
+
number provided, it will be total request
|
1277
|
+
timeout. It can also be a pair (tuple) of
|
1278
|
+
(connection, read) timeouts.
|
1279
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1280
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1281
|
+
request; this effectively ignores the
|
1282
|
+
authentication in the spec for a single request.
|
1283
|
+
:type _request_auth: dict, optional
|
1284
|
+
:param _content_type: force content-type for the request.
|
1285
|
+
:type _content_type: str, Optional
|
1286
|
+
:param _headers: set to override the headers for a single
|
1287
|
+
request; this effectively ignores the headers
|
1288
|
+
in the spec for a single request.
|
1289
|
+
:type _headers: dict, optional
|
1290
|
+
:param _host_index: set to override the host_index for a single
|
1291
|
+
request; this effectively ignores the host_index
|
1292
|
+
in the spec for a single request.
|
1293
|
+
:type _host_index: int, optional
|
1294
|
+
:return: Returns the result object.
|
1295
|
+
""" # noqa: E501
|
1296
|
+
|
1297
|
+
_param = self._update_notification_serialize(
|
1298
|
+
id=id,
|
1299
|
+
viewed=viewed,
|
1300
|
+
sent=sent,
|
1301
|
+
access_token=access_token,
|
1302
|
+
_request_auth=_request_auth,
|
1303
|
+
_content_type=_content_type,
|
1304
|
+
_headers=_headers,
|
1305
|
+
_host_index=_host_index
|
1306
|
+
)
|
1307
|
+
|
1308
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1309
|
+
'200': "object",
|
1310
|
+
'422': "HTTPValidationError",
|
1311
|
+
}
|
1312
|
+
response_data = self.api_client.call_api(
|
1313
|
+
*_param,
|
1314
|
+
_request_timeout=_request_timeout
|
1315
|
+
)
|
1316
|
+
response_data.read()
|
1317
|
+
return self.api_client.response_deserialize(
|
1318
|
+
response_data=response_data,
|
1319
|
+
response_types_map=_response_types_map,
|
1320
|
+
)
|
1321
|
+
|
1322
|
+
|
1323
|
+
@validate_call
|
1324
|
+
def update_notification_without_preload_content(
|
1325
|
+
self,
|
1326
|
+
id: StrictStr,
|
1327
|
+
viewed: StrictBool,
|
1328
|
+
sent: StrictBool,
|
1329
|
+
access_token: Optional[StrictStr] = None,
|
1330
|
+
_request_timeout: Union[
|
1331
|
+
None,
|
1332
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1333
|
+
Tuple[
|
1334
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1335
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1336
|
+
]
|
1337
|
+
] = None,
|
1338
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1339
|
+
_content_type: Optional[StrictStr] = None,
|
1340
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1341
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1342
|
+
) -> RESTResponseType:
|
1343
|
+
"""Update Notification
|
1344
|
+
|
1345
|
+
Update a notification's viewed status
|
1346
|
+
|
1347
|
+
:param id: (required)
|
1348
|
+
:type id: str
|
1349
|
+
:param viewed: (required)
|
1350
|
+
:type viewed: bool
|
1351
|
+
:param sent: (required)
|
1352
|
+
:type sent: bool
|
1353
|
+
:param access_token:
|
1354
|
+
:type access_token: str
|
1355
|
+
:param _request_timeout: timeout setting for this request. If one
|
1356
|
+
number provided, it will be total request
|
1357
|
+
timeout. It can also be a pair (tuple) of
|
1358
|
+
(connection, read) timeouts.
|
1359
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1360
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1361
|
+
request; this effectively ignores the
|
1362
|
+
authentication in the spec for a single request.
|
1363
|
+
:type _request_auth: dict, optional
|
1364
|
+
:param _content_type: force content-type for the request.
|
1365
|
+
:type _content_type: str, Optional
|
1366
|
+
:param _headers: set to override the headers for a single
|
1367
|
+
request; this effectively ignores the headers
|
1368
|
+
in the spec for a single request.
|
1369
|
+
:type _headers: dict, optional
|
1370
|
+
:param _host_index: set to override the host_index for a single
|
1371
|
+
request; this effectively ignores the host_index
|
1372
|
+
in the spec for a single request.
|
1373
|
+
:type _host_index: int, optional
|
1374
|
+
:return: Returns the result object.
|
1375
|
+
""" # noqa: E501
|
1376
|
+
|
1377
|
+
_param = self._update_notification_serialize(
|
1378
|
+
id=id,
|
1379
|
+
viewed=viewed,
|
1380
|
+
sent=sent,
|
1381
|
+
access_token=access_token,
|
1382
|
+
_request_auth=_request_auth,
|
1383
|
+
_content_type=_content_type,
|
1384
|
+
_headers=_headers,
|
1385
|
+
_host_index=_host_index
|
1386
|
+
)
|
1387
|
+
|
1388
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1389
|
+
'200': "object",
|
1390
|
+
'422': "HTTPValidationError",
|
1391
|
+
}
|
1392
|
+
response_data = self.api_client.call_api(
|
1393
|
+
*_param,
|
1394
|
+
_request_timeout=_request_timeout
|
1395
|
+
)
|
1396
|
+
return response_data.response
|
1397
|
+
|
1398
|
+
|
1399
|
+
def _update_notification_serialize(
|
1400
|
+
self,
|
1401
|
+
id,
|
1402
|
+
viewed,
|
1403
|
+
sent,
|
1404
|
+
access_token,
|
1405
|
+
_request_auth,
|
1406
|
+
_content_type,
|
1407
|
+
_headers,
|
1408
|
+
_host_index,
|
1409
|
+
) -> RequestSerialized:
|
1410
|
+
|
1411
|
+
_host = None
|
1412
|
+
|
1413
|
+
_collection_formats: Dict[str, str] = {
|
1414
|
+
}
|
1415
|
+
|
1416
|
+
_path_params: Dict[str, str] = {}
|
1417
|
+
_query_params: List[Tuple[str, str]] = []
|
1418
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1419
|
+
_form_params: List[Tuple[str, str]] = []
|
1420
|
+
_files: Dict[
|
1421
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1422
|
+
] = {}
|
1423
|
+
_body_params: Optional[bytes] = None
|
1424
|
+
|
1425
|
+
# process the path parameters
|
1426
|
+
if id is not None:
|
1427
|
+
_path_params['id'] = id
|
1428
|
+
# process the query parameters
|
1429
|
+
if viewed is not None:
|
1430
|
+
|
1431
|
+
_query_params.append(('viewed', viewed))
|
1432
|
+
|
1433
|
+
if sent is not None:
|
1434
|
+
|
1435
|
+
_query_params.append(('sent', sent))
|
1436
|
+
|
1437
|
+
# process the header parameters
|
1438
|
+
# process the form parameters
|
1439
|
+
# process the body parameter
|
1440
|
+
|
1441
|
+
|
1442
|
+
# set the HTTP header `Accept`
|
1443
|
+
if 'Accept' not in _header_params:
|
1444
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1445
|
+
[
|
1446
|
+
'application/json'
|
1447
|
+
]
|
1448
|
+
)
|
1449
|
+
|
1450
|
+
|
1451
|
+
# authentication setting
|
1452
|
+
_auth_settings: List[str] = [
|
1453
|
+
'OAuth2PasswordBearer'
|
1454
|
+
]
|
1455
|
+
|
1456
|
+
return self.api_client.param_serialize(
|
1457
|
+
method='PUT',
|
1458
|
+
resource_path='/notifications/{id}',
|
1459
|
+
path_params=_path_params,
|
1460
|
+
query_params=_query_params,
|
1461
|
+
header_params=_header_params,
|
1462
|
+
body=_body_params,
|
1463
|
+
post_params=_form_params,
|
1464
|
+
files=_files,
|
1465
|
+
auth_settings=_auth_settings,
|
1466
|
+
collection_formats=_collection_formats,
|
1467
|
+
_host=_host,
|
1468
|
+
_request_auth=_request_auth
|
1469
|
+
)
|
1470
|
+
|
1471
|
+
|
1472
|
+
|
1473
|
+
|
1474
|
+
@validate_call
|
1475
|
+
def update_notifications(
|
1476
|
+
self,
|
1477
|
+
viewed: StrictBool,
|
1478
|
+
sent: StrictBool,
|
1479
|
+
access_token: Optional[StrictStr] = None,
|
1480
|
+
_request_timeout: Union[
|
1481
|
+
None,
|
1482
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1483
|
+
Tuple[
|
1484
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1485
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1486
|
+
]
|
1487
|
+
] = None,
|
1488
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1489
|
+
_content_type: Optional[StrictStr] = None,
|
1490
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1491
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1492
|
+
) -> object:
|
1493
|
+
"""Update Notifications
|
1494
|
+
|
1495
|
+
Bulk update notifications
|
1496
|
+
|
1497
|
+
:param viewed: (required)
|
1498
|
+
:type viewed: bool
|
1499
|
+
:param sent: (required)
|
1500
|
+
:type sent: bool
|
1501
|
+
:param access_token:
|
1502
|
+
:type access_token: str
|
1503
|
+
:param _request_timeout: timeout setting for this request. If one
|
1504
|
+
number provided, it will be total request
|
1505
|
+
timeout. It can also be a pair (tuple) of
|
1506
|
+
(connection, read) timeouts.
|
1507
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1508
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1509
|
+
request; this effectively ignores the
|
1510
|
+
authentication in the spec for a single request.
|
1511
|
+
:type _request_auth: dict, optional
|
1512
|
+
:param _content_type: force content-type for the request.
|
1513
|
+
:type _content_type: str, Optional
|
1514
|
+
:param _headers: set to override the headers for a single
|
1515
|
+
request; this effectively ignores the headers
|
1516
|
+
in the spec for a single request.
|
1517
|
+
:type _headers: dict, optional
|
1518
|
+
:param _host_index: set to override the host_index for a single
|
1519
|
+
request; this effectively ignores the host_index
|
1520
|
+
in the spec for a single request.
|
1521
|
+
:type _host_index: int, optional
|
1522
|
+
:return: Returns the result object.
|
1523
|
+
""" # noqa: E501
|
1524
|
+
|
1525
|
+
_param = self._update_notifications_serialize(
|
1526
|
+
viewed=viewed,
|
1527
|
+
sent=sent,
|
1528
|
+
access_token=access_token,
|
1529
|
+
_request_auth=_request_auth,
|
1530
|
+
_content_type=_content_type,
|
1531
|
+
_headers=_headers,
|
1532
|
+
_host_index=_host_index
|
1533
|
+
)
|
1534
|
+
|
1535
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1536
|
+
'200': "object",
|
1537
|
+
'422': "HTTPValidationError",
|
1538
|
+
}
|
1539
|
+
response_data = self.api_client.call_api(
|
1540
|
+
*_param,
|
1541
|
+
_request_timeout=_request_timeout
|
1542
|
+
)
|
1543
|
+
response_data.read()
|
1544
|
+
return self.api_client.response_deserialize(
|
1545
|
+
response_data=response_data,
|
1546
|
+
response_types_map=_response_types_map,
|
1547
|
+
).data
|
1548
|
+
|
1549
|
+
|
1550
|
+
@validate_call
|
1551
|
+
def update_notifications_with_http_info(
|
1552
|
+
self,
|
1553
|
+
viewed: StrictBool,
|
1554
|
+
sent: StrictBool,
|
1555
|
+
access_token: Optional[StrictStr] = None,
|
1556
|
+
_request_timeout: Union[
|
1557
|
+
None,
|
1558
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1559
|
+
Tuple[
|
1560
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1561
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1562
|
+
]
|
1563
|
+
] = None,
|
1564
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1565
|
+
_content_type: Optional[StrictStr] = None,
|
1566
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1567
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1568
|
+
) -> ApiResponse[object]:
|
1569
|
+
"""Update Notifications
|
1570
|
+
|
1571
|
+
Bulk update notifications
|
1572
|
+
|
1573
|
+
:param viewed: (required)
|
1574
|
+
:type viewed: bool
|
1575
|
+
:param sent: (required)
|
1576
|
+
:type sent: bool
|
1577
|
+
:param access_token:
|
1578
|
+
:type access_token: str
|
1579
|
+
:param _request_timeout: timeout setting for this request. If one
|
1580
|
+
number provided, it will be total request
|
1581
|
+
timeout. It can also be a pair (tuple) of
|
1582
|
+
(connection, read) timeouts.
|
1583
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1584
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1585
|
+
request; this effectively ignores the
|
1586
|
+
authentication in the spec for a single request.
|
1587
|
+
:type _request_auth: dict, optional
|
1588
|
+
:param _content_type: force content-type for the request.
|
1589
|
+
:type _content_type: str, Optional
|
1590
|
+
:param _headers: set to override the headers for a single
|
1591
|
+
request; this effectively ignores the headers
|
1592
|
+
in the spec for a single request.
|
1593
|
+
:type _headers: dict, optional
|
1594
|
+
:param _host_index: set to override the host_index for a single
|
1595
|
+
request; this effectively ignores the host_index
|
1596
|
+
in the spec for a single request.
|
1597
|
+
:type _host_index: int, optional
|
1598
|
+
:return: Returns the result object.
|
1599
|
+
""" # noqa: E501
|
1600
|
+
|
1601
|
+
_param = self._update_notifications_serialize(
|
1602
|
+
viewed=viewed,
|
1603
|
+
sent=sent,
|
1604
|
+
access_token=access_token,
|
1605
|
+
_request_auth=_request_auth,
|
1606
|
+
_content_type=_content_type,
|
1607
|
+
_headers=_headers,
|
1608
|
+
_host_index=_host_index
|
1609
|
+
)
|
1610
|
+
|
1611
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1612
|
+
'200': "object",
|
1613
|
+
'422': "HTTPValidationError",
|
1614
|
+
}
|
1615
|
+
response_data = self.api_client.call_api(
|
1616
|
+
*_param,
|
1617
|
+
_request_timeout=_request_timeout
|
1618
|
+
)
|
1619
|
+
response_data.read()
|
1620
|
+
return self.api_client.response_deserialize(
|
1621
|
+
response_data=response_data,
|
1622
|
+
response_types_map=_response_types_map,
|
1623
|
+
)
|
1624
|
+
|
1625
|
+
|
1626
|
+
@validate_call
|
1627
|
+
def update_notifications_without_preload_content(
|
1628
|
+
self,
|
1629
|
+
viewed: StrictBool,
|
1630
|
+
sent: StrictBool,
|
1631
|
+
access_token: Optional[StrictStr] = None,
|
1632
|
+
_request_timeout: Union[
|
1633
|
+
None,
|
1634
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1635
|
+
Tuple[
|
1636
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1637
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1638
|
+
]
|
1639
|
+
] = None,
|
1640
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1641
|
+
_content_type: Optional[StrictStr] = None,
|
1642
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1643
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1644
|
+
) -> RESTResponseType:
|
1645
|
+
"""Update Notifications
|
1646
|
+
|
1647
|
+
Bulk update notifications
|
1648
|
+
|
1649
|
+
:param viewed: (required)
|
1650
|
+
:type viewed: bool
|
1651
|
+
:param sent: (required)
|
1652
|
+
:type sent: bool
|
1653
|
+
:param access_token:
|
1654
|
+
:type access_token: str
|
1655
|
+
:param _request_timeout: timeout setting for this request. If one
|
1656
|
+
number provided, it will be total request
|
1657
|
+
timeout. It can also be a pair (tuple) of
|
1658
|
+
(connection, read) timeouts.
|
1659
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1660
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1661
|
+
request; this effectively ignores the
|
1662
|
+
authentication in the spec for a single request.
|
1663
|
+
:type _request_auth: dict, optional
|
1664
|
+
:param _content_type: force content-type for the request.
|
1665
|
+
:type _content_type: str, Optional
|
1666
|
+
:param _headers: set to override the headers for a single
|
1667
|
+
request; this effectively ignores the headers
|
1668
|
+
in the spec for a single request.
|
1669
|
+
:type _headers: dict, optional
|
1670
|
+
:param _host_index: set to override the host_index for a single
|
1671
|
+
request; this effectively ignores the host_index
|
1672
|
+
in the spec for a single request.
|
1673
|
+
:type _host_index: int, optional
|
1674
|
+
:return: Returns the result object.
|
1675
|
+
""" # noqa: E501
|
1676
|
+
|
1677
|
+
_param = self._update_notifications_serialize(
|
1678
|
+
viewed=viewed,
|
1679
|
+
sent=sent,
|
1680
|
+
access_token=access_token,
|
1681
|
+
_request_auth=_request_auth,
|
1682
|
+
_content_type=_content_type,
|
1683
|
+
_headers=_headers,
|
1684
|
+
_host_index=_host_index
|
1685
|
+
)
|
1686
|
+
|
1687
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1688
|
+
'200': "object",
|
1689
|
+
'422': "HTTPValidationError",
|
1690
|
+
}
|
1691
|
+
response_data = self.api_client.call_api(
|
1692
|
+
*_param,
|
1693
|
+
_request_timeout=_request_timeout
|
1694
|
+
)
|
1695
|
+
return response_data.response
|
1696
|
+
|
1697
|
+
|
1698
|
+
def _update_notifications_serialize(
|
1699
|
+
self,
|
1700
|
+
viewed,
|
1701
|
+
sent,
|
1702
|
+
access_token,
|
1703
|
+
_request_auth,
|
1704
|
+
_content_type,
|
1705
|
+
_headers,
|
1706
|
+
_host_index,
|
1707
|
+
) -> RequestSerialized:
|
1708
|
+
|
1709
|
+
_host = None
|
1710
|
+
|
1711
|
+
_collection_formats: Dict[str, str] = {
|
1712
|
+
}
|
1713
|
+
|
1714
|
+
_path_params: Dict[str, str] = {}
|
1715
|
+
_query_params: List[Tuple[str, str]] = []
|
1716
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1717
|
+
_form_params: List[Tuple[str, str]] = []
|
1718
|
+
_files: Dict[
|
1719
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1720
|
+
] = {}
|
1721
|
+
_body_params: Optional[bytes] = None
|
1722
|
+
|
1723
|
+
# process the path parameters
|
1724
|
+
# process the query parameters
|
1725
|
+
if viewed is not None:
|
1726
|
+
|
1727
|
+
_query_params.append(('viewed', viewed))
|
1728
|
+
|
1729
|
+
if sent is not None:
|
1730
|
+
|
1731
|
+
_query_params.append(('sent', sent))
|
1732
|
+
|
1733
|
+
# process the header parameters
|
1734
|
+
# process the form parameters
|
1735
|
+
# process the body parameter
|
1736
|
+
|
1737
|
+
|
1738
|
+
# set the HTTP header `Accept`
|
1739
|
+
if 'Accept' not in _header_params:
|
1740
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1741
|
+
[
|
1742
|
+
'application/json'
|
1743
|
+
]
|
1744
|
+
)
|
1745
|
+
|
1746
|
+
|
1747
|
+
# authentication setting
|
1748
|
+
_auth_settings: List[str] = [
|
1749
|
+
'OAuth2PasswordBearer'
|
1750
|
+
]
|
1751
|
+
|
1752
|
+
return self.api_client.param_serialize(
|
1753
|
+
method='PUT',
|
1754
|
+
resource_path='/notifications',
|
1755
|
+
path_params=_path_params,
|
1756
|
+
query_params=_query_params,
|
1757
|
+
header_params=_header_params,
|
1758
|
+
body=_body_params,
|
1759
|
+
post_params=_form_params,
|
1760
|
+
files=_files,
|
1761
|
+
auth_settings=_auth_settings,
|
1762
|
+
collection_formats=_collection_formats,
|
1763
|
+
_host=_host,
|
1764
|
+
_request_auth=_request_auth
|
1765
|
+
)
|
1766
|
+
|
1767
|
+
|