pingram-python 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pingram/__init__.py +395 -0
- pingram/api/__init__.py +21 -0
- pingram/api/account_api.py +2198 -0
- pingram/api/addresses_api.py +860 -0
- pingram/api/components_api.py +1681 -0
- pingram/api/default_api.py +320 -0
- pingram/api/domains_api.py +849 -0
- pingram/api/editor_api.py +320 -0
- pingram/api/environments_api.py +878 -0
- pingram/api/health_api.py +287 -0
- pingram/api/insights_api.py +321 -0
- pingram/api/keys_api.py +849 -0
- pingram/api/logs_api.py +1632 -0
- pingram/api/members_api.py +1780 -0
- pingram/api/sender_api.py +892 -0
- pingram/api/templates_api.py +1889 -0
- pingram/api/types_api.py +1411 -0
- pingram/api/user_api.py +2534 -0
- pingram/api/users_api.py +936 -0
- pingram/api_client.py +807 -0
- pingram/api_response.py +21 -0
- pingram/client_wrapper.py +357 -0
- pingram/configuration.py +623 -0
- pingram/exceptions.py +219 -0
- pingram/models/__init__.py +173 -0
- pingram/models/account_addresses_response.py +95 -0
- pingram/models/account_addresses_response_addresses_inner.py +104 -0
- pingram/models/account_get_response.py +143 -0
- pingram/models/account_get_response_pending_downgrade_usage_limit.py +99 -0
- pingram/models/address_response.py +91 -0
- pingram/models/auto_join_get_response.py +89 -0
- pingram/models/auto_join_post_response.py +89 -0
- pingram/models/auto_join_request_body.py +87 -0
- pingram/models/bee_token_v2.py +89 -0
- pingram/models/billing_post_request_body.py +91 -0
- pingram/models/billing_post_response_body.py +149 -0
- pingram/models/billing_post_response_body_pending_downgrade_usage_limit.py +99 -0
- pingram/models/channels_enum.py +42 -0
- pingram/models/create_account_request_body.py +87 -0
- pingram/models/create_account_response.py +89 -0
- pingram/models/create_address_request.py +91 -0
- pingram/models/create_key_request.py +98 -0
- pingram/models/create_key_response.py +104 -0
- pingram/models/delete_key_response.py +87 -0
- pingram/models/delete_user_response.py +87 -0
- pingram/models/email_auth_token_post_request.py +87 -0
- pingram/models/email_component_patch_request.py +93 -0
- pingram/models/email_component_post_request.py +95 -0
- pingram/models/email_component_response.py +120 -0
- pingram/models/email_component_response_referenced_by_inner.py +92 -0
- pingram/models/environment.py +96 -0
- pingram/models/environment_create_request.py +87 -0
- pingram/models/environment_patch_request.py +94 -0
- pingram/models/get_account_metadata_response.py +91 -0
- pingram/models/get_account_metadata_response_user_account_metadata.py +91 -0
- pingram/models/get_email_components_response_inner.py +120 -0
- pingram/models/get_environments_response_inner.py +96 -0
- pingram/models/get_inapp_notifications_response.py +95 -0
- pingram/models/get_inapp_notifications_response_notifications_inner.py +137 -0
- pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options.py +106 -0
- pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_instant.py +93 -0
- pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_off.py +87 -0
- pingram/models/get_inapp_notifications_response_notifications_inner_replies_inner.py +89 -0
- pingram/models/get_inapp_notifications_response_notifications_inner_template.py +136 -0
- pingram/models/get_inapp_notifications_response_notifications_inner_template_any_of.py +98 -0
- pingram/models/get_keys_response.py +95 -0
- pingram/models/get_keys_response_keys_inner.py +110 -0
- pingram/models/get_logs_response.py +97 -0
- pingram/models/get_logs_response_messages_inner.py +141 -0
- pingram/models/get_logs_response_messages_inner_attachments_inner.py +93 -0
- pingram/models/get_members_response_inner.py +95 -0
- pingram/models/get_metrics_response_inner.py +116 -0
- pingram/models/get_metrics_response_inner_messages_inner.py +89 -0
- pingram/models/get_notifications_response_inner.py +126 -0
- pingram/models/get_notifications_response_inner_deduplication.py +87 -0
- pingram/models/get_notifications_response_inner_options.py +122 -0
- pingram/models/get_notifications_response_inner_options_email.py +128 -0
- pingram/models/get_notifications_response_inner_options_email_daily.py +89 -0
- pingram/models/get_notifications_response_inner_options_email_monthly.py +101 -0
- pingram/models/get_notifications_response_inner_options_email_weekly.py +91 -0
- pingram/models/get_notifications_response_inner_templates_inner.py +90 -0
- pingram/models/get_notifications_response_inner_throttling.py +111 -0
- pingram/models/get_senders_response_inner.py +128 -0
- pingram/models/get_templates_response.py +136 -0
- pingram/models/get_users_response.py +99 -0
- pingram/models/get_users_response_users_inner.py +133 -0
- pingram/models/get_users_response_users_inner_email_suppression_status.py +96 -0
- pingram/models/get_users_response_users_inner_push_tokens_inner.py +104 -0
- pingram/models/get_users_response_users_inner_push_tokens_inner_device.py +97 -0
- pingram/models/get_users_response_users_inner_slack_token.py +140 -0
- pingram/models/get_users_response_users_inner_slack_token_authed_user.py +97 -0
- pingram/models/get_users_response_users_inner_slack_token_enterprise.py +89 -0
- pingram/models/get_users_response_users_inner_slack_token_incoming_webhook.py +93 -0
- pingram/models/get_users_response_users_inner_slack_token_response_metadata.py +97 -0
- pingram/models/get_users_response_users_inner_web_push_tokens_inner.py +91 -0
- pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub.py +93 -0
- pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub_keys.py +89 -0
- pingram/models/in_app_notification_patch_request.py +112 -0
- pingram/models/in_app_notification_unread_clear_request.py +89 -0
- pingram/models/inapp_unread_count_response.py +87 -0
- pingram/models/inbound_request_body.py +138 -0
- pingram/models/inbound_response_body.py +104 -0
- pingram/models/inbound_response_body_results_inner.py +103 -0
- pingram/models/ingishts_post_request.py +121 -0
- pingram/models/ingishts_post_request_label_options.py +87 -0
- pingram/models/ingishts_post_request_metric_data_queries_inner.py +103 -0
- pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat.py +107 -0
- pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric.py +99 -0
- pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric_dimensions_inner.py +89 -0
- pingram/models/intercom_webhook.py +106 -0
- pingram/models/intercom_webhook_data.py +91 -0
- pingram/models/intercom_webhook_data_item.py +136 -0
- pingram/models/intercom_webhook_data_item_any_of.py +140 -0
- pingram/models/intercom_webhook_data_item_any_of_contacts.py +104 -0
- pingram/models/intercom_webhook_data_item_any_of_contacts_contacts_inner.py +91 -0
- pingram/models/intercom_webhook_data_item_any_of_source.py +101 -0
- pingram/models/intercom_webhook_data_item_any_of_source_author.py +93 -0
- pingram/models/invite_post_response.py +89 -0
- pingram/models/log_query_post_body.py +109 -0
- pingram/models/logs_bulk_request.py +87 -0
- pingram/models/logs_get_response.py +95 -0
- pingram/models/logs_get_response_logs_inner.py +627 -0
- pingram/models/logs_query_response.py +87 -0
- pingram/models/logs_query_result_response.py +101 -0
- pingram/models/logs_retention_response.py +87 -0
- pingram/models/logs_tail_response.py +95 -0
- pingram/models/member_invite_request.py +89 -0
- pingram/models/member_update_request.py +87 -0
- pingram/models/message_response.py +87 -0
- pingram/models/notification.py +126 -0
- pingram/models/notification_create_request.py +97 -0
- pingram/models/notification_patch_request.py +112 -0
- pingram/models/post_email_test_request.py +99 -0
- pingram/models/post_email_test_response.py +89 -0
- pingram/models/post_senders_request_body.py +87 -0
- pingram/models/post_user_request.py +121 -0
- pingram/models/sender_post_body.py +166 -0
- pingram/models/sender_post_body_email.py +95 -0
- pingram/models/sender_post_body_inapp.py +91 -0
- pingram/models/sender_post_body_mobile_push.py +89 -0
- pingram/models/sender_post_body_options.py +103 -0
- pingram/models/sender_post_body_options_apn.py +99 -0
- pingram/models/sender_post_body_options_email.py +107 -0
- pingram/models/sender_post_body_options_email_attachments_inner.py +134 -0
- pingram/models/sender_post_body_options_email_attachments_inner_any_of.py +89 -0
- pingram/models/sender_post_body_options_email_attachments_inner_any_of1.py +91 -0
- pingram/models/sender_post_body_options_fcm.py +91 -0
- pingram/models/sender_post_body_options_fcm_android.py +103 -0
- pingram/models/sender_post_body_slack.py +123 -0
- pingram/models/sender_post_body_slack_metadata.py +99 -0
- pingram/models/sender_post_body_slack_metadata_entities_inner.py +99 -0
- pingram/models/sender_post_body_slack_metadata_entities_inner_external_ref.py +89 -0
- pingram/models/sender_post_body_sms.py +93 -0
- pingram/models/sender_post_body_sms_auto_reply.py +87 -0
- pingram/models/sender_post_body_to.py +133 -0
- pingram/models/sender_post_body_user.py +133 -0
- pingram/models/sender_post_body_web_push.py +93 -0
- pingram/models/sender_post_response.py +89 -0
- pingram/models/set_default_template_request.py +97 -0
- pingram/models/slack_interactivity_response.py +87 -0
- pingram/models/slack_oauth_request.py +89 -0
- pingram/models/success_response.py +87 -0
- pingram/models/supabase_configure_request.py +93 -0
- pingram/models/supabase_configure_response.py +89 -0
- pingram/models/supabase_o_auth_request.py +91 -0
- pingram/models/supabase_o_auth_response.py +89 -0
- pingram/models/supabase_projects_response.py +95 -0
- pingram/models/supabase_projects_response_projects_inner.py +95 -0
- pingram/models/supabase_status_response.py +93 -0
- pingram/models/template.py +98 -0
- pingram/models/template_patch_request.py +134 -0
- pingram/models/template_patch_request_any_of.py +97 -0
- pingram/models/template_patch_request_any_of1.py +103 -0
- pingram/models/template_patch_request_any_of1_batch.py +91 -0
- pingram/models/template_patch_request_any_of1_instant.py +91 -0
- pingram/models/template_post_request.py +131 -0
- pingram/models/template_post_request_batch.py +91 -0
- pingram/models/template_post_request_instant.py +91 -0
- pingram/models/update_address_request.py +91 -0
- pingram/models/user.py +133 -0
- pingram/models/user_suppression_delete_response.py +91 -0
- pingram/models/webhook_response.py +104 -0
- pingram/py.typed +0 -0
- pingram/rest.py +199 -0
- pingram_python-0.1.0.dist-info/METADATA +69 -0
- pingram_python-0.1.0.dist-info/RECORD +189 -0
- pingram_python-0.1.0.dist-info/WHEEL +5 -0
- pingram_python-0.1.0.dist-info/licenses/LICENSE +21 -0
- pingram_python-0.1.0.dist-info/top_level.txt +1 -0
pingram/api/types_api.py
ADDED
|
@@ -0,0 +1,1411 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
NotificationAPI
|
|
5
|
+
|
|
6
|
+
Internal API for notification delivery and management
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.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 Field, StrictStr
|
|
20
|
+
from typing import List
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from pingram.models.get_notifications_response_inner import GetNotificationsResponseInner
|
|
23
|
+
from pingram.models.notification import Notification
|
|
24
|
+
from pingram.models.notification_create_request import NotificationCreateRequest
|
|
25
|
+
from pingram.models.notification_patch_request import NotificationPatchRequest
|
|
26
|
+
|
|
27
|
+
from pingram.api_client import ApiClient, RequestSerialized
|
|
28
|
+
from pingram.api_response import ApiResponse
|
|
29
|
+
from pingram.rest import RESTResponseType
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class TypesApi:
|
|
33
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
34
|
+
Ref: https://openapi-generator.tech
|
|
35
|
+
|
|
36
|
+
Do not edit the class manually.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def __init__(self, api_client=None) -> None:
|
|
40
|
+
if api_client is None:
|
|
41
|
+
api_client = ApiClient.get_default()
|
|
42
|
+
self.api_client = api_client
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@validate_call
|
|
46
|
+
async def types_create_notification_type(
|
|
47
|
+
self,
|
|
48
|
+
notification_create_request: NotificationCreateRequest,
|
|
49
|
+
_request_timeout: Union[
|
|
50
|
+
None,
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Tuple[
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
55
|
+
]
|
|
56
|
+
] = None,
|
|
57
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_content_type: Optional[StrictStr] = None,
|
|
59
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
61
|
+
) -> Notification:
|
|
62
|
+
"""Create a new notification
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
:param notification_create_request: (required)
|
|
66
|
+
:type notification_create_request: NotificationCreateRequest
|
|
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._types_create_notification_type_serialize(
|
|
90
|
+
notification_create_request=notification_create_request,
|
|
91
|
+
_request_auth=_request_auth,
|
|
92
|
+
_content_type=_content_type,
|
|
93
|
+
_headers=_headers,
|
|
94
|
+
_host_index=_host_index
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
98
|
+
'200': "Notification",
|
|
99
|
+
'400': None,
|
|
100
|
+
'401': None,
|
|
101
|
+
'500': None,
|
|
102
|
+
}
|
|
103
|
+
response_data = await self.api_client.call_api(
|
|
104
|
+
*_param,
|
|
105
|
+
_request_timeout=_request_timeout
|
|
106
|
+
)
|
|
107
|
+
await response_data.read()
|
|
108
|
+
return self.api_client.response_deserialize(
|
|
109
|
+
response_data=response_data,
|
|
110
|
+
response_types_map=_response_types_map,
|
|
111
|
+
).data
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@validate_call
|
|
115
|
+
async def types_create_notification_type_with_http_info(
|
|
116
|
+
self,
|
|
117
|
+
notification_create_request: NotificationCreateRequest,
|
|
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[Notification]:
|
|
131
|
+
"""Create a new notification
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
:param notification_create_request: (required)
|
|
135
|
+
:type notification_create_request: NotificationCreateRequest
|
|
136
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
137
|
+
number provided, it will be total request
|
|
138
|
+
timeout. It can also be a pair (tuple) of
|
|
139
|
+
(connection, read) timeouts.
|
|
140
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
141
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
142
|
+
request; this effectively ignores the
|
|
143
|
+
authentication in the spec for a single request.
|
|
144
|
+
:type _request_auth: dict, optional
|
|
145
|
+
:param _content_type: force content-type for the request.
|
|
146
|
+
:type _content_type: str, Optional
|
|
147
|
+
:param _headers: set to override the headers for a single
|
|
148
|
+
request; this effectively ignores the headers
|
|
149
|
+
in the spec for a single request.
|
|
150
|
+
:type _headers: dict, optional
|
|
151
|
+
:param _host_index: set to override the host_index for a single
|
|
152
|
+
request; this effectively ignores the host_index
|
|
153
|
+
in the spec for a single request.
|
|
154
|
+
:type _host_index: int, optional
|
|
155
|
+
:return: Returns the result object.
|
|
156
|
+
""" # noqa: E501
|
|
157
|
+
|
|
158
|
+
_param = self._types_create_notification_type_serialize(
|
|
159
|
+
notification_create_request=notification_create_request,
|
|
160
|
+
_request_auth=_request_auth,
|
|
161
|
+
_content_type=_content_type,
|
|
162
|
+
_headers=_headers,
|
|
163
|
+
_host_index=_host_index
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
167
|
+
'200': "Notification",
|
|
168
|
+
'400': None,
|
|
169
|
+
'401': None,
|
|
170
|
+
'500': None,
|
|
171
|
+
}
|
|
172
|
+
response_data = await self.api_client.call_api(
|
|
173
|
+
*_param,
|
|
174
|
+
_request_timeout=_request_timeout
|
|
175
|
+
)
|
|
176
|
+
await response_data.read()
|
|
177
|
+
return self.api_client.response_deserialize(
|
|
178
|
+
response_data=response_data,
|
|
179
|
+
response_types_map=_response_types_map,
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
@validate_call
|
|
184
|
+
async def types_create_notification_type_without_preload_content(
|
|
185
|
+
self,
|
|
186
|
+
notification_create_request: NotificationCreateRequest,
|
|
187
|
+
_request_timeout: Union[
|
|
188
|
+
None,
|
|
189
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
190
|
+
Tuple[
|
|
191
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
192
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
193
|
+
]
|
|
194
|
+
] = None,
|
|
195
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
196
|
+
_content_type: Optional[StrictStr] = None,
|
|
197
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
198
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
199
|
+
) -> RESTResponseType:
|
|
200
|
+
"""Create a new notification
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
:param notification_create_request: (required)
|
|
204
|
+
:type notification_create_request: NotificationCreateRequest
|
|
205
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
206
|
+
number provided, it will be total request
|
|
207
|
+
timeout. It can also be a pair (tuple) of
|
|
208
|
+
(connection, read) timeouts.
|
|
209
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
210
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
211
|
+
request; this effectively ignores the
|
|
212
|
+
authentication in the spec for a single request.
|
|
213
|
+
:type _request_auth: dict, optional
|
|
214
|
+
:param _content_type: force content-type for the request.
|
|
215
|
+
:type _content_type: str, Optional
|
|
216
|
+
:param _headers: set to override the headers for a single
|
|
217
|
+
request; this effectively ignores the headers
|
|
218
|
+
in the spec for a single request.
|
|
219
|
+
:type _headers: dict, optional
|
|
220
|
+
:param _host_index: set to override the host_index for a single
|
|
221
|
+
request; this effectively ignores the host_index
|
|
222
|
+
in the spec for a single request.
|
|
223
|
+
:type _host_index: int, optional
|
|
224
|
+
:return: Returns the result object.
|
|
225
|
+
""" # noqa: E501
|
|
226
|
+
|
|
227
|
+
_param = self._types_create_notification_type_serialize(
|
|
228
|
+
notification_create_request=notification_create_request,
|
|
229
|
+
_request_auth=_request_auth,
|
|
230
|
+
_content_type=_content_type,
|
|
231
|
+
_headers=_headers,
|
|
232
|
+
_host_index=_host_index
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
236
|
+
'200': "Notification",
|
|
237
|
+
'400': None,
|
|
238
|
+
'401': None,
|
|
239
|
+
'500': None,
|
|
240
|
+
}
|
|
241
|
+
response_data = await self.api_client.call_api(
|
|
242
|
+
*_param,
|
|
243
|
+
_request_timeout=_request_timeout
|
|
244
|
+
)
|
|
245
|
+
return response_data.response
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
def _types_create_notification_type_serialize(
|
|
249
|
+
self,
|
|
250
|
+
notification_create_request,
|
|
251
|
+
_request_auth,
|
|
252
|
+
_content_type,
|
|
253
|
+
_headers,
|
|
254
|
+
_host_index,
|
|
255
|
+
) -> RequestSerialized:
|
|
256
|
+
|
|
257
|
+
_host = None
|
|
258
|
+
|
|
259
|
+
_collection_formats: Dict[str, str] = {
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
_path_params: Dict[str, str] = {}
|
|
263
|
+
_query_params: List[Tuple[str, str]] = []
|
|
264
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
265
|
+
_form_params: List[Tuple[str, str]] = []
|
|
266
|
+
_files: Dict[
|
|
267
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
268
|
+
] = {}
|
|
269
|
+
_body_params: Optional[bytes] = None
|
|
270
|
+
|
|
271
|
+
# process the path parameters
|
|
272
|
+
# process the query parameters
|
|
273
|
+
# process the header parameters
|
|
274
|
+
# process the form parameters
|
|
275
|
+
# process the body parameter
|
|
276
|
+
if notification_create_request is not None:
|
|
277
|
+
_body_params = notification_create_request
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
# set the HTTP header `Accept`
|
|
281
|
+
if 'Accept' not in _header_params:
|
|
282
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
283
|
+
[
|
|
284
|
+
'application/json'
|
|
285
|
+
]
|
|
286
|
+
)
|
|
287
|
+
|
|
288
|
+
# set the HTTP header `Content-Type`
|
|
289
|
+
if _content_type:
|
|
290
|
+
_header_params['Content-Type'] = _content_type
|
|
291
|
+
else:
|
|
292
|
+
_default_content_type = (
|
|
293
|
+
self.api_client.select_header_content_type(
|
|
294
|
+
[
|
|
295
|
+
'application/json'
|
|
296
|
+
]
|
|
297
|
+
)
|
|
298
|
+
)
|
|
299
|
+
if _default_content_type is not None:
|
|
300
|
+
_header_params['Content-Type'] = _default_content_type
|
|
301
|
+
|
|
302
|
+
# authentication setting
|
|
303
|
+
_auth_settings: List[str] = [
|
|
304
|
+
'endUserHashed',
|
|
305
|
+
'endUser',
|
|
306
|
+
'apiKey',
|
|
307
|
+
'clientCredentials'
|
|
308
|
+
]
|
|
309
|
+
|
|
310
|
+
return self.api_client.param_serialize(
|
|
311
|
+
method='POST',
|
|
312
|
+
resource_path='/types',
|
|
313
|
+
path_params=_path_params,
|
|
314
|
+
query_params=_query_params,
|
|
315
|
+
header_params=_header_params,
|
|
316
|
+
body=_body_params,
|
|
317
|
+
post_params=_form_params,
|
|
318
|
+
files=_files,
|
|
319
|
+
auth_settings=_auth_settings,
|
|
320
|
+
collection_formats=_collection_formats,
|
|
321
|
+
_host=_host,
|
|
322
|
+
_request_auth=_request_auth
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
@validate_call
|
|
329
|
+
async def types_delete_notification_type(
|
|
330
|
+
self,
|
|
331
|
+
notification_id: Annotated[StrictStr, Field(description="The notification ID")],
|
|
332
|
+
_request_timeout: Union[
|
|
333
|
+
None,
|
|
334
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
335
|
+
Tuple[
|
|
336
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
337
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
338
|
+
]
|
|
339
|
+
] = None,
|
|
340
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
341
|
+
_content_type: Optional[StrictStr] = None,
|
|
342
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
343
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
344
|
+
) -> None:
|
|
345
|
+
"""Delete a notification
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
:param notification_id: The notification ID (required)
|
|
349
|
+
:type notification_id: str
|
|
350
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
351
|
+
number provided, it will be total request
|
|
352
|
+
timeout. It can also be a pair (tuple) of
|
|
353
|
+
(connection, read) timeouts.
|
|
354
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
355
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
356
|
+
request; this effectively ignores the
|
|
357
|
+
authentication in the spec for a single request.
|
|
358
|
+
:type _request_auth: dict, optional
|
|
359
|
+
:param _content_type: force content-type for the request.
|
|
360
|
+
:type _content_type: str, Optional
|
|
361
|
+
:param _headers: set to override the headers for a single
|
|
362
|
+
request; this effectively ignores the headers
|
|
363
|
+
in the spec for a single request.
|
|
364
|
+
:type _headers: dict, optional
|
|
365
|
+
:param _host_index: set to override the host_index for a single
|
|
366
|
+
request; this effectively ignores the host_index
|
|
367
|
+
in the spec for a single request.
|
|
368
|
+
:type _host_index: int, optional
|
|
369
|
+
:return: Returns the result object.
|
|
370
|
+
""" # noqa: E501
|
|
371
|
+
|
|
372
|
+
_param = self._types_delete_notification_type_serialize(
|
|
373
|
+
notification_id=notification_id,
|
|
374
|
+
_request_auth=_request_auth,
|
|
375
|
+
_content_type=_content_type,
|
|
376
|
+
_headers=_headers,
|
|
377
|
+
_host_index=_host_index
|
|
378
|
+
)
|
|
379
|
+
|
|
380
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
381
|
+
'204': None,
|
|
382
|
+
'400': None,
|
|
383
|
+
'401': None,
|
|
384
|
+
'500': None,
|
|
385
|
+
}
|
|
386
|
+
response_data = await self.api_client.call_api(
|
|
387
|
+
*_param,
|
|
388
|
+
_request_timeout=_request_timeout
|
|
389
|
+
)
|
|
390
|
+
await response_data.read()
|
|
391
|
+
return self.api_client.response_deserialize(
|
|
392
|
+
response_data=response_data,
|
|
393
|
+
response_types_map=_response_types_map,
|
|
394
|
+
).data
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
@validate_call
|
|
398
|
+
async def types_delete_notification_type_with_http_info(
|
|
399
|
+
self,
|
|
400
|
+
notification_id: Annotated[StrictStr, Field(description="The notification ID")],
|
|
401
|
+
_request_timeout: Union[
|
|
402
|
+
None,
|
|
403
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
404
|
+
Tuple[
|
|
405
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
406
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
407
|
+
]
|
|
408
|
+
] = None,
|
|
409
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
410
|
+
_content_type: Optional[StrictStr] = None,
|
|
411
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
412
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
413
|
+
) -> ApiResponse[None]:
|
|
414
|
+
"""Delete a notification
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
:param notification_id: The notification ID (required)
|
|
418
|
+
:type notification_id: str
|
|
419
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
420
|
+
number provided, it will be total request
|
|
421
|
+
timeout. It can also be a pair (tuple) of
|
|
422
|
+
(connection, read) timeouts.
|
|
423
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
424
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
425
|
+
request; this effectively ignores the
|
|
426
|
+
authentication in the spec for a single request.
|
|
427
|
+
:type _request_auth: dict, optional
|
|
428
|
+
:param _content_type: force content-type for the request.
|
|
429
|
+
:type _content_type: str, Optional
|
|
430
|
+
:param _headers: set to override the headers for a single
|
|
431
|
+
request; this effectively ignores the headers
|
|
432
|
+
in the spec for a single request.
|
|
433
|
+
:type _headers: dict, optional
|
|
434
|
+
:param _host_index: set to override the host_index for a single
|
|
435
|
+
request; this effectively ignores the host_index
|
|
436
|
+
in the spec for a single request.
|
|
437
|
+
:type _host_index: int, optional
|
|
438
|
+
:return: Returns the result object.
|
|
439
|
+
""" # noqa: E501
|
|
440
|
+
|
|
441
|
+
_param = self._types_delete_notification_type_serialize(
|
|
442
|
+
notification_id=notification_id,
|
|
443
|
+
_request_auth=_request_auth,
|
|
444
|
+
_content_type=_content_type,
|
|
445
|
+
_headers=_headers,
|
|
446
|
+
_host_index=_host_index
|
|
447
|
+
)
|
|
448
|
+
|
|
449
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
450
|
+
'204': None,
|
|
451
|
+
'400': None,
|
|
452
|
+
'401': None,
|
|
453
|
+
'500': None,
|
|
454
|
+
}
|
|
455
|
+
response_data = await self.api_client.call_api(
|
|
456
|
+
*_param,
|
|
457
|
+
_request_timeout=_request_timeout
|
|
458
|
+
)
|
|
459
|
+
await response_data.read()
|
|
460
|
+
return self.api_client.response_deserialize(
|
|
461
|
+
response_data=response_data,
|
|
462
|
+
response_types_map=_response_types_map,
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
@validate_call
|
|
467
|
+
async def types_delete_notification_type_without_preload_content(
|
|
468
|
+
self,
|
|
469
|
+
notification_id: Annotated[StrictStr, Field(description="The notification ID")],
|
|
470
|
+
_request_timeout: Union[
|
|
471
|
+
None,
|
|
472
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
473
|
+
Tuple[
|
|
474
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
475
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
476
|
+
]
|
|
477
|
+
] = None,
|
|
478
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
479
|
+
_content_type: Optional[StrictStr] = None,
|
|
480
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
481
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
482
|
+
) -> RESTResponseType:
|
|
483
|
+
"""Delete a notification
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
:param notification_id: The notification ID (required)
|
|
487
|
+
:type notification_id: str
|
|
488
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
489
|
+
number provided, it will be total request
|
|
490
|
+
timeout. It can also be a pair (tuple) of
|
|
491
|
+
(connection, read) timeouts.
|
|
492
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
493
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
494
|
+
request; this effectively ignores the
|
|
495
|
+
authentication in the spec for a single request.
|
|
496
|
+
:type _request_auth: dict, optional
|
|
497
|
+
:param _content_type: force content-type for the request.
|
|
498
|
+
:type _content_type: str, Optional
|
|
499
|
+
:param _headers: set to override the headers for a single
|
|
500
|
+
request; this effectively ignores the headers
|
|
501
|
+
in the spec for a single request.
|
|
502
|
+
:type _headers: dict, optional
|
|
503
|
+
:param _host_index: set to override the host_index for a single
|
|
504
|
+
request; this effectively ignores the host_index
|
|
505
|
+
in the spec for a single request.
|
|
506
|
+
:type _host_index: int, optional
|
|
507
|
+
:return: Returns the result object.
|
|
508
|
+
""" # noqa: E501
|
|
509
|
+
|
|
510
|
+
_param = self._types_delete_notification_type_serialize(
|
|
511
|
+
notification_id=notification_id,
|
|
512
|
+
_request_auth=_request_auth,
|
|
513
|
+
_content_type=_content_type,
|
|
514
|
+
_headers=_headers,
|
|
515
|
+
_host_index=_host_index
|
|
516
|
+
)
|
|
517
|
+
|
|
518
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
519
|
+
'204': None,
|
|
520
|
+
'400': None,
|
|
521
|
+
'401': None,
|
|
522
|
+
'500': None,
|
|
523
|
+
}
|
|
524
|
+
response_data = await self.api_client.call_api(
|
|
525
|
+
*_param,
|
|
526
|
+
_request_timeout=_request_timeout
|
|
527
|
+
)
|
|
528
|
+
return response_data.response
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
def _types_delete_notification_type_serialize(
|
|
532
|
+
self,
|
|
533
|
+
notification_id,
|
|
534
|
+
_request_auth,
|
|
535
|
+
_content_type,
|
|
536
|
+
_headers,
|
|
537
|
+
_host_index,
|
|
538
|
+
) -> RequestSerialized:
|
|
539
|
+
|
|
540
|
+
_host = None
|
|
541
|
+
|
|
542
|
+
_collection_formats: Dict[str, str] = {
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
_path_params: Dict[str, str] = {}
|
|
546
|
+
_query_params: List[Tuple[str, str]] = []
|
|
547
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
548
|
+
_form_params: List[Tuple[str, str]] = []
|
|
549
|
+
_files: Dict[
|
|
550
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
551
|
+
] = {}
|
|
552
|
+
_body_params: Optional[bytes] = None
|
|
553
|
+
|
|
554
|
+
# process the path parameters
|
|
555
|
+
if notification_id is not None:
|
|
556
|
+
_path_params['notificationId'] = notification_id
|
|
557
|
+
# process the query parameters
|
|
558
|
+
# process the header parameters
|
|
559
|
+
# process the form parameters
|
|
560
|
+
# process the body parameter
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
# authentication setting
|
|
566
|
+
_auth_settings: List[str] = [
|
|
567
|
+
'endUserHashed',
|
|
568
|
+
'endUser',
|
|
569
|
+
'apiKey',
|
|
570
|
+
'clientCredentials'
|
|
571
|
+
]
|
|
572
|
+
|
|
573
|
+
return self.api_client.param_serialize(
|
|
574
|
+
method='DELETE',
|
|
575
|
+
resource_path='/types/{notificationId}',
|
|
576
|
+
path_params=_path_params,
|
|
577
|
+
query_params=_query_params,
|
|
578
|
+
header_params=_header_params,
|
|
579
|
+
body=_body_params,
|
|
580
|
+
post_params=_form_params,
|
|
581
|
+
files=_files,
|
|
582
|
+
auth_settings=_auth_settings,
|
|
583
|
+
collection_formats=_collection_formats,
|
|
584
|
+
_host=_host,
|
|
585
|
+
_request_auth=_request_auth
|
|
586
|
+
)
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
@validate_call
|
|
592
|
+
async def types_get_notification_type(
|
|
593
|
+
self,
|
|
594
|
+
notification_id: Annotated[StrictStr, Field(description="The notification ID")],
|
|
595
|
+
_request_timeout: Union[
|
|
596
|
+
None,
|
|
597
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
598
|
+
Tuple[
|
|
599
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
600
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
601
|
+
]
|
|
602
|
+
] = None,
|
|
603
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
604
|
+
_content_type: Optional[StrictStr] = None,
|
|
605
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
606
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
607
|
+
) -> List[GetNotificationsResponseInner]:
|
|
608
|
+
"""Get a specific notification by ID
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
:param notification_id: The notification ID (required)
|
|
612
|
+
:type notification_id: str
|
|
613
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
614
|
+
number provided, it will be total request
|
|
615
|
+
timeout. It can also be a pair (tuple) of
|
|
616
|
+
(connection, read) timeouts.
|
|
617
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
618
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
619
|
+
request; this effectively ignores the
|
|
620
|
+
authentication in the spec for a single request.
|
|
621
|
+
:type _request_auth: dict, optional
|
|
622
|
+
:param _content_type: force content-type for the request.
|
|
623
|
+
:type _content_type: str, Optional
|
|
624
|
+
:param _headers: set to override the headers for a single
|
|
625
|
+
request; this effectively ignores the headers
|
|
626
|
+
in the spec for a single request.
|
|
627
|
+
:type _headers: dict, optional
|
|
628
|
+
:param _host_index: set to override the host_index for a single
|
|
629
|
+
request; this effectively ignores the host_index
|
|
630
|
+
in the spec for a single request.
|
|
631
|
+
:type _host_index: int, optional
|
|
632
|
+
:return: Returns the result object.
|
|
633
|
+
""" # noqa: E501
|
|
634
|
+
|
|
635
|
+
_param = self._types_get_notification_type_serialize(
|
|
636
|
+
notification_id=notification_id,
|
|
637
|
+
_request_auth=_request_auth,
|
|
638
|
+
_content_type=_content_type,
|
|
639
|
+
_headers=_headers,
|
|
640
|
+
_host_index=_host_index
|
|
641
|
+
)
|
|
642
|
+
|
|
643
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
644
|
+
'200': "List[GetNotificationsResponseInner]",
|
|
645
|
+
'400': None,
|
|
646
|
+
'401': None,
|
|
647
|
+
'500': None,
|
|
648
|
+
}
|
|
649
|
+
response_data = await self.api_client.call_api(
|
|
650
|
+
*_param,
|
|
651
|
+
_request_timeout=_request_timeout
|
|
652
|
+
)
|
|
653
|
+
await response_data.read()
|
|
654
|
+
return self.api_client.response_deserialize(
|
|
655
|
+
response_data=response_data,
|
|
656
|
+
response_types_map=_response_types_map,
|
|
657
|
+
).data
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
@validate_call
|
|
661
|
+
async def types_get_notification_type_with_http_info(
|
|
662
|
+
self,
|
|
663
|
+
notification_id: Annotated[StrictStr, Field(description="The notification ID")],
|
|
664
|
+
_request_timeout: Union[
|
|
665
|
+
None,
|
|
666
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
667
|
+
Tuple[
|
|
668
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
669
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
670
|
+
]
|
|
671
|
+
] = None,
|
|
672
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
673
|
+
_content_type: Optional[StrictStr] = None,
|
|
674
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
675
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
676
|
+
) -> ApiResponse[List[GetNotificationsResponseInner]]:
|
|
677
|
+
"""Get a specific notification by ID
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
:param notification_id: The notification ID (required)
|
|
681
|
+
:type notification_id: str
|
|
682
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
683
|
+
number provided, it will be total request
|
|
684
|
+
timeout. It can also be a pair (tuple) of
|
|
685
|
+
(connection, read) timeouts.
|
|
686
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
687
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
688
|
+
request; this effectively ignores the
|
|
689
|
+
authentication in the spec for a single request.
|
|
690
|
+
:type _request_auth: dict, optional
|
|
691
|
+
:param _content_type: force content-type for the request.
|
|
692
|
+
:type _content_type: str, Optional
|
|
693
|
+
:param _headers: set to override the headers for a single
|
|
694
|
+
request; this effectively ignores the headers
|
|
695
|
+
in the spec for a single request.
|
|
696
|
+
:type _headers: dict, optional
|
|
697
|
+
:param _host_index: set to override the host_index for a single
|
|
698
|
+
request; this effectively ignores the host_index
|
|
699
|
+
in the spec for a single request.
|
|
700
|
+
:type _host_index: int, optional
|
|
701
|
+
:return: Returns the result object.
|
|
702
|
+
""" # noqa: E501
|
|
703
|
+
|
|
704
|
+
_param = self._types_get_notification_type_serialize(
|
|
705
|
+
notification_id=notification_id,
|
|
706
|
+
_request_auth=_request_auth,
|
|
707
|
+
_content_type=_content_type,
|
|
708
|
+
_headers=_headers,
|
|
709
|
+
_host_index=_host_index
|
|
710
|
+
)
|
|
711
|
+
|
|
712
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
713
|
+
'200': "List[GetNotificationsResponseInner]",
|
|
714
|
+
'400': None,
|
|
715
|
+
'401': None,
|
|
716
|
+
'500': None,
|
|
717
|
+
}
|
|
718
|
+
response_data = await self.api_client.call_api(
|
|
719
|
+
*_param,
|
|
720
|
+
_request_timeout=_request_timeout
|
|
721
|
+
)
|
|
722
|
+
await response_data.read()
|
|
723
|
+
return self.api_client.response_deserialize(
|
|
724
|
+
response_data=response_data,
|
|
725
|
+
response_types_map=_response_types_map,
|
|
726
|
+
)
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
@validate_call
|
|
730
|
+
async def types_get_notification_type_without_preload_content(
|
|
731
|
+
self,
|
|
732
|
+
notification_id: Annotated[StrictStr, Field(description="The notification ID")],
|
|
733
|
+
_request_timeout: Union[
|
|
734
|
+
None,
|
|
735
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
736
|
+
Tuple[
|
|
737
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
738
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
739
|
+
]
|
|
740
|
+
] = None,
|
|
741
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
742
|
+
_content_type: Optional[StrictStr] = None,
|
|
743
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
744
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
745
|
+
) -> RESTResponseType:
|
|
746
|
+
"""Get a specific notification by ID
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
:param notification_id: The notification ID (required)
|
|
750
|
+
:type notification_id: str
|
|
751
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
752
|
+
number provided, it will be total request
|
|
753
|
+
timeout. It can also be a pair (tuple) of
|
|
754
|
+
(connection, read) timeouts.
|
|
755
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
756
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
757
|
+
request; this effectively ignores the
|
|
758
|
+
authentication in the spec for a single request.
|
|
759
|
+
:type _request_auth: dict, optional
|
|
760
|
+
:param _content_type: force content-type for the request.
|
|
761
|
+
:type _content_type: str, Optional
|
|
762
|
+
:param _headers: set to override the headers for a single
|
|
763
|
+
request; this effectively ignores the headers
|
|
764
|
+
in the spec for a single request.
|
|
765
|
+
:type _headers: dict, optional
|
|
766
|
+
:param _host_index: set to override the host_index for a single
|
|
767
|
+
request; this effectively ignores the host_index
|
|
768
|
+
in the spec for a single request.
|
|
769
|
+
:type _host_index: int, optional
|
|
770
|
+
:return: Returns the result object.
|
|
771
|
+
""" # noqa: E501
|
|
772
|
+
|
|
773
|
+
_param = self._types_get_notification_type_serialize(
|
|
774
|
+
notification_id=notification_id,
|
|
775
|
+
_request_auth=_request_auth,
|
|
776
|
+
_content_type=_content_type,
|
|
777
|
+
_headers=_headers,
|
|
778
|
+
_host_index=_host_index
|
|
779
|
+
)
|
|
780
|
+
|
|
781
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
782
|
+
'200': "List[GetNotificationsResponseInner]",
|
|
783
|
+
'400': None,
|
|
784
|
+
'401': None,
|
|
785
|
+
'500': None,
|
|
786
|
+
}
|
|
787
|
+
response_data = await self.api_client.call_api(
|
|
788
|
+
*_param,
|
|
789
|
+
_request_timeout=_request_timeout
|
|
790
|
+
)
|
|
791
|
+
return response_data.response
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
def _types_get_notification_type_serialize(
|
|
795
|
+
self,
|
|
796
|
+
notification_id,
|
|
797
|
+
_request_auth,
|
|
798
|
+
_content_type,
|
|
799
|
+
_headers,
|
|
800
|
+
_host_index,
|
|
801
|
+
) -> RequestSerialized:
|
|
802
|
+
|
|
803
|
+
_host = None
|
|
804
|
+
|
|
805
|
+
_collection_formats: Dict[str, str] = {
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
_path_params: Dict[str, str] = {}
|
|
809
|
+
_query_params: List[Tuple[str, str]] = []
|
|
810
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
811
|
+
_form_params: List[Tuple[str, str]] = []
|
|
812
|
+
_files: Dict[
|
|
813
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
814
|
+
] = {}
|
|
815
|
+
_body_params: Optional[bytes] = None
|
|
816
|
+
|
|
817
|
+
# process the path parameters
|
|
818
|
+
if notification_id is not None:
|
|
819
|
+
_path_params['notificationId'] = notification_id
|
|
820
|
+
# process the query parameters
|
|
821
|
+
# process the header parameters
|
|
822
|
+
# process the form parameters
|
|
823
|
+
# process the body parameter
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
# set the HTTP header `Accept`
|
|
827
|
+
if 'Accept' not in _header_params:
|
|
828
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
829
|
+
[
|
|
830
|
+
'application/json'
|
|
831
|
+
]
|
|
832
|
+
)
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
# authentication setting
|
|
836
|
+
_auth_settings: List[str] = [
|
|
837
|
+
'endUserHashed',
|
|
838
|
+
'endUser',
|
|
839
|
+
'apiKey',
|
|
840
|
+
'clientCredentials'
|
|
841
|
+
]
|
|
842
|
+
|
|
843
|
+
return self.api_client.param_serialize(
|
|
844
|
+
method='GET',
|
|
845
|
+
resource_path='/types/{notificationId}',
|
|
846
|
+
path_params=_path_params,
|
|
847
|
+
query_params=_query_params,
|
|
848
|
+
header_params=_header_params,
|
|
849
|
+
body=_body_params,
|
|
850
|
+
post_params=_form_params,
|
|
851
|
+
files=_files,
|
|
852
|
+
auth_settings=_auth_settings,
|
|
853
|
+
collection_formats=_collection_formats,
|
|
854
|
+
_host=_host,
|
|
855
|
+
_request_auth=_request_auth
|
|
856
|
+
)
|
|
857
|
+
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
@validate_call
|
|
862
|
+
async def types_list_notification_types(
|
|
863
|
+
self,
|
|
864
|
+
_request_timeout: Union[
|
|
865
|
+
None,
|
|
866
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
867
|
+
Tuple[
|
|
868
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
869
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
870
|
+
]
|
|
871
|
+
] = None,
|
|
872
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
873
|
+
_content_type: Optional[StrictStr] = None,
|
|
874
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
875
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
876
|
+
) -> List[GetNotificationsResponseInner]:
|
|
877
|
+
"""Get all notifications for an account with their templates
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
881
|
+
number provided, it will be total request
|
|
882
|
+
timeout. It can also be a pair (tuple) of
|
|
883
|
+
(connection, read) timeouts.
|
|
884
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
885
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
886
|
+
request; this effectively ignores the
|
|
887
|
+
authentication in the spec for a single request.
|
|
888
|
+
:type _request_auth: dict, optional
|
|
889
|
+
:param _content_type: force content-type for the request.
|
|
890
|
+
:type _content_type: str, Optional
|
|
891
|
+
:param _headers: set to override the headers for a single
|
|
892
|
+
request; this effectively ignores the headers
|
|
893
|
+
in the spec for a single request.
|
|
894
|
+
:type _headers: dict, optional
|
|
895
|
+
:param _host_index: set to override the host_index for a single
|
|
896
|
+
request; this effectively ignores the host_index
|
|
897
|
+
in the spec for a single request.
|
|
898
|
+
:type _host_index: int, optional
|
|
899
|
+
:return: Returns the result object.
|
|
900
|
+
""" # noqa: E501
|
|
901
|
+
|
|
902
|
+
_param = self._types_list_notification_types_serialize(
|
|
903
|
+
_request_auth=_request_auth,
|
|
904
|
+
_content_type=_content_type,
|
|
905
|
+
_headers=_headers,
|
|
906
|
+
_host_index=_host_index
|
|
907
|
+
)
|
|
908
|
+
|
|
909
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
910
|
+
'200': "List[GetNotificationsResponseInner]",
|
|
911
|
+
'400': None,
|
|
912
|
+
'401': None,
|
|
913
|
+
'500': None,
|
|
914
|
+
}
|
|
915
|
+
response_data = await self.api_client.call_api(
|
|
916
|
+
*_param,
|
|
917
|
+
_request_timeout=_request_timeout
|
|
918
|
+
)
|
|
919
|
+
await response_data.read()
|
|
920
|
+
return self.api_client.response_deserialize(
|
|
921
|
+
response_data=response_data,
|
|
922
|
+
response_types_map=_response_types_map,
|
|
923
|
+
).data
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
@validate_call
|
|
927
|
+
async def types_list_notification_types_with_http_info(
|
|
928
|
+
self,
|
|
929
|
+
_request_timeout: Union[
|
|
930
|
+
None,
|
|
931
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
932
|
+
Tuple[
|
|
933
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
934
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
935
|
+
]
|
|
936
|
+
] = None,
|
|
937
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
938
|
+
_content_type: Optional[StrictStr] = None,
|
|
939
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
940
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
941
|
+
) -> ApiResponse[List[GetNotificationsResponseInner]]:
|
|
942
|
+
"""Get all notifications for an account with their templates
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
946
|
+
number provided, it will be total request
|
|
947
|
+
timeout. It can also be a pair (tuple) of
|
|
948
|
+
(connection, read) timeouts.
|
|
949
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
950
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
951
|
+
request; this effectively ignores the
|
|
952
|
+
authentication in the spec for a single request.
|
|
953
|
+
:type _request_auth: dict, optional
|
|
954
|
+
:param _content_type: force content-type for the request.
|
|
955
|
+
:type _content_type: str, Optional
|
|
956
|
+
:param _headers: set to override the headers for a single
|
|
957
|
+
request; this effectively ignores the headers
|
|
958
|
+
in the spec for a single request.
|
|
959
|
+
:type _headers: dict, optional
|
|
960
|
+
:param _host_index: set to override the host_index for a single
|
|
961
|
+
request; this effectively ignores the host_index
|
|
962
|
+
in the spec for a single request.
|
|
963
|
+
:type _host_index: int, optional
|
|
964
|
+
:return: Returns the result object.
|
|
965
|
+
""" # noqa: E501
|
|
966
|
+
|
|
967
|
+
_param = self._types_list_notification_types_serialize(
|
|
968
|
+
_request_auth=_request_auth,
|
|
969
|
+
_content_type=_content_type,
|
|
970
|
+
_headers=_headers,
|
|
971
|
+
_host_index=_host_index
|
|
972
|
+
)
|
|
973
|
+
|
|
974
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
975
|
+
'200': "List[GetNotificationsResponseInner]",
|
|
976
|
+
'400': None,
|
|
977
|
+
'401': None,
|
|
978
|
+
'500': None,
|
|
979
|
+
}
|
|
980
|
+
response_data = await self.api_client.call_api(
|
|
981
|
+
*_param,
|
|
982
|
+
_request_timeout=_request_timeout
|
|
983
|
+
)
|
|
984
|
+
await response_data.read()
|
|
985
|
+
return self.api_client.response_deserialize(
|
|
986
|
+
response_data=response_data,
|
|
987
|
+
response_types_map=_response_types_map,
|
|
988
|
+
)
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
@validate_call
|
|
992
|
+
async def types_list_notification_types_without_preload_content(
|
|
993
|
+
self,
|
|
994
|
+
_request_timeout: Union[
|
|
995
|
+
None,
|
|
996
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
997
|
+
Tuple[
|
|
998
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
999
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1000
|
+
]
|
|
1001
|
+
] = None,
|
|
1002
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1003
|
+
_content_type: Optional[StrictStr] = None,
|
|
1004
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1005
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1006
|
+
) -> RESTResponseType:
|
|
1007
|
+
"""Get all notifications for an account with their templates
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1011
|
+
number provided, it will be total request
|
|
1012
|
+
timeout. It can also be a pair (tuple) of
|
|
1013
|
+
(connection, read) timeouts.
|
|
1014
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1015
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1016
|
+
request; this effectively ignores the
|
|
1017
|
+
authentication in the spec for a single request.
|
|
1018
|
+
:type _request_auth: dict, optional
|
|
1019
|
+
:param _content_type: force content-type for the request.
|
|
1020
|
+
:type _content_type: str, Optional
|
|
1021
|
+
:param _headers: set to override the headers for a single
|
|
1022
|
+
request; this effectively ignores the headers
|
|
1023
|
+
in the spec for a single request.
|
|
1024
|
+
:type _headers: dict, optional
|
|
1025
|
+
:param _host_index: set to override the host_index for a single
|
|
1026
|
+
request; this effectively ignores the host_index
|
|
1027
|
+
in the spec for a single request.
|
|
1028
|
+
:type _host_index: int, optional
|
|
1029
|
+
:return: Returns the result object.
|
|
1030
|
+
""" # noqa: E501
|
|
1031
|
+
|
|
1032
|
+
_param = self._types_list_notification_types_serialize(
|
|
1033
|
+
_request_auth=_request_auth,
|
|
1034
|
+
_content_type=_content_type,
|
|
1035
|
+
_headers=_headers,
|
|
1036
|
+
_host_index=_host_index
|
|
1037
|
+
)
|
|
1038
|
+
|
|
1039
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1040
|
+
'200': "List[GetNotificationsResponseInner]",
|
|
1041
|
+
'400': None,
|
|
1042
|
+
'401': None,
|
|
1043
|
+
'500': None,
|
|
1044
|
+
}
|
|
1045
|
+
response_data = await self.api_client.call_api(
|
|
1046
|
+
*_param,
|
|
1047
|
+
_request_timeout=_request_timeout
|
|
1048
|
+
)
|
|
1049
|
+
return response_data.response
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
def _types_list_notification_types_serialize(
|
|
1053
|
+
self,
|
|
1054
|
+
_request_auth,
|
|
1055
|
+
_content_type,
|
|
1056
|
+
_headers,
|
|
1057
|
+
_host_index,
|
|
1058
|
+
) -> RequestSerialized:
|
|
1059
|
+
|
|
1060
|
+
_host = None
|
|
1061
|
+
|
|
1062
|
+
_collection_formats: Dict[str, str] = {
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
_path_params: Dict[str, str] = {}
|
|
1066
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1067
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1068
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1069
|
+
_files: Dict[
|
|
1070
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1071
|
+
] = {}
|
|
1072
|
+
_body_params: Optional[bytes] = None
|
|
1073
|
+
|
|
1074
|
+
# process the path parameters
|
|
1075
|
+
# process the query parameters
|
|
1076
|
+
# process the header parameters
|
|
1077
|
+
# process the form parameters
|
|
1078
|
+
# process the body parameter
|
|
1079
|
+
|
|
1080
|
+
|
|
1081
|
+
# set the HTTP header `Accept`
|
|
1082
|
+
if 'Accept' not in _header_params:
|
|
1083
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1084
|
+
[
|
|
1085
|
+
'application/json'
|
|
1086
|
+
]
|
|
1087
|
+
)
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
# authentication setting
|
|
1091
|
+
_auth_settings: List[str] = [
|
|
1092
|
+
'endUserHashed',
|
|
1093
|
+
'endUser',
|
|
1094
|
+
'apiKey',
|
|
1095
|
+
'clientCredentials'
|
|
1096
|
+
]
|
|
1097
|
+
|
|
1098
|
+
return self.api_client.param_serialize(
|
|
1099
|
+
method='GET',
|
|
1100
|
+
resource_path='/types',
|
|
1101
|
+
path_params=_path_params,
|
|
1102
|
+
query_params=_query_params,
|
|
1103
|
+
header_params=_header_params,
|
|
1104
|
+
body=_body_params,
|
|
1105
|
+
post_params=_form_params,
|
|
1106
|
+
files=_files,
|
|
1107
|
+
auth_settings=_auth_settings,
|
|
1108
|
+
collection_formats=_collection_formats,
|
|
1109
|
+
_host=_host,
|
|
1110
|
+
_request_auth=_request_auth
|
|
1111
|
+
)
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
@validate_call
|
|
1117
|
+
async def types_update_notification_type(
|
|
1118
|
+
self,
|
|
1119
|
+
notification_id: Annotated[StrictStr, Field(description="The notification ID")],
|
|
1120
|
+
notification_patch_request: NotificationPatchRequest,
|
|
1121
|
+
_request_timeout: Union[
|
|
1122
|
+
None,
|
|
1123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1124
|
+
Tuple[
|
|
1125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1126
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1127
|
+
]
|
|
1128
|
+
] = None,
|
|
1129
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1130
|
+
_content_type: Optional[StrictStr] = None,
|
|
1131
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1132
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1133
|
+
) -> Notification:
|
|
1134
|
+
"""Update a notification's settings
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
:param notification_id: The notification ID (required)
|
|
1138
|
+
:type notification_id: str
|
|
1139
|
+
:param notification_patch_request: (required)
|
|
1140
|
+
:type notification_patch_request: NotificationPatchRequest
|
|
1141
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1142
|
+
number provided, it will be total request
|
|
1143
|
+
timeout. It can also be a pair (tuple) of
|
|
1144
|
+
(connection, read) timeouts.
|
|
1145
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1146
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1147
|
+
request; this effectively ignores the
|
|
1148
|
+
authentication in the spec for a single request.
|
|
1149
|
+
:type _request_auth: dict, optional
|
|
1150
|
+
:param _content_type: force content-type for the request.
|
|
1151
|
+
:type _content_type: str, Optional
|
|
1152
|
+
:param _headers: set to override the headers for a single
|
|
1153
|
+
request; this effectively ignores the headers
|
|
1154
|
+
in the spec for a single request.
|
|
1155
|
+
:type _headers: dict, optional
|
|
1156
|
+
:param _host_index: set to override the host_index for a single
|
|
1157
|
+
request; this effectively ignores the host_index
|
|
1158
|
+
in the spec for a single request.
|
|
1159
|
+
:type _host_index: int, optional
|
|
1160
|
+
:return: Returns the result object.
|
|
1161
|
+
""" # noqa: E501
|
|
1162
|
+
|
|
1163
|
+
_param = self._types_update_notification_type_serialize(
|
|
1164
|
+
notification_id=notification_id,
|
|
1165
|
+
notification_patch_request=notification_patch_request,
|
|
1166
|
+
_request_auth=_request_auth,
|
|
1167
|
+
_content_type=_content_type,
|
|
1168
|
+
_headers=_headers,
|
|
1169
|
+
_host_index=_host_index
|
|
1170
|
+
)
|
|
1171
|
+
|
|
1172
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1173
|
+
'200': "Notification",
|
|
1174
|
+
'400': None,
|
|
1175
|
+
'401': None,
|
|
1176
|
+
'500': None,
|
|
1177
|
+
}
|
|
1178
|
+
response_data = await self.api_client.call_api(
|
|
1179
|
+
*_param,
|
|
1180
|
+
_request_timeout=_request_timeout
|
|
1181
|
+
)
|
|
1182
|
+
await response_data.read()
|
|
1183
|
+
return self.api_client.response_deserialize(
|
|
1184
|
+
response_data=response_data,
|
|
1185
|
+
response_types_map=_response_types_map,
|
|
1186
|
+
).data
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
@validate_call
|
|
1190
|
+
async def types_update_notification_type_with_http_info(
|
|
1191
|
+
self,
|
|
1192
|
+
notification_id: Annotated[StrictStr, Field(description="The notification ID")],
|
|
1193
|
+
notification_patch_request: NotificationPatchRequest,
|
|
1194
|
+
_request_timeout: Union[
|
|
1195
|
+
None,
|
|
1196
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1197
|
+
Tuple[
|
|
1198
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1199
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1200
|
+
]
|
|
1201
|
+
] = None,
|
|
1202
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1203
|
+
_content_type: Optional[StrictStr] = None,
|
|
1204
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1205
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1206
|
+
) -> ApiResponse[Notification]:
|
|
1207
|
+
"""Update a notification's settings
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
:param notification_id: The notification ID (required)
|
|
1211
|
+
:type notification_id: str
|
|
1212
|
+
:param notification_patch_request: (required)
|
|
1213
|
+
:type notification_patch_request: NotificationPatchRequest
|
|
1214
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1215
|
+
number provided, it will be total request
|
|
1216
|
+
timeout. It can also be a pair (tuple) of
|
|
1217
|
+
(connection, read) timeouts.
|
|
1218
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1219
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1220
|
+
request; this effectively ignores the
|
|
1221
|
+
authentication in the spec for a single request.
|
|
1222
|
+
:type _request_auth: dict, optional
|
|
1223
|
+
:param _content_type: force content-type for the request.
|
|
1224
|
+
:type _content_type: str, Optional
|
|
1225
|
+
:param _headers: set to override the headers for a single
|
|
1226
|
+
request; this effectively ignores the headers
|
|
1227
|
+
in the spec for a single request.
|
|
1228
|
+
:type _headers: dict, optional
|
|
1229
|
+
:param _host_index: set to override the host_index for a single
|
|
1230
|
+
request; this effectively ignores the host_index
|
|
1231
|
+
in the spec for a single request.
|
|
1232
|
+
:type _host_index: int, optional
|
|
1233
|
+
:return: Returns the result object.
|
|
1234
|
+
""" # noqa: E501
|
|
1235
|
+
|
|
1236
|
+
_param = self._types_update_notification_type_serialize(
|
|
1237
|
+
notification_id=notification_id,
|
|
1238
|
+
notification_patch_request=notification_patch_request,
|
|
1239
|
+
_request_auth=_request_auth,
|
|
1240
|
+
_content_type=_content_type,
|
|
1241
|
+
_headers=_headers,
|
|
1242
|
+
_host_index=_host_index
|
|
1243
|
+
)
|
|
1244
|
+
|
|
1245
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1246
|
+
'200': "Notification",
|
|
1247
|
+
'400': None,
|
|
1248
|
+
'401': None,
|
|
1249
|
+
'500': None,
|
|
1250
|
+
}
|
|
1251
|
+
response_data = await self.api_client.call_api(
|
|
1252
|
+
*_param,
|
|
1253
|
+
_request_timeout=_request_timeout
|
|
1254
|
+
)
|
|
1255
|
+
await response_data.read()
|
|
1256
|
+
return self.api_client.response_deserialize(
|
|
1257
|
+
response_data=response_data,
|
|
1258
|
+
response_types_map=_response_types_map,
|
|
1259
|
+
)
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
@validate_call
|
|
1263
|
+
async def types_update_notification_type_without_preload_content(
|
|
1264
|
+
self,
|
|
1265
|
+
notification_id: Annotated[StrictStr, Field(description="The notification ID")],
|
|
1266
|
+
notification_patch_request: NotificationPatchRequest,
|
|
1267
|
+
_request_timeout: Union[
|
|
1268
|
+
None,
|
|
1269
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1270
|
+
Tuple[
|
|
1271
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1272
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1273
|
+
]
|
|
1274
|
+
] = None,
|
|
1275
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1276
|
+
_content_type: Optional[StrictStr] = None,
|
|
1277
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1278
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1279
|
+
) -> RESTResponseType:
|
|
1280
|
+
"""Update a notification's settings
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
:param notification_id: The notification ID (required)
|
|
1284
|
+
:type notification_id: str
|
|
1285
|
+
:param notification_patch_request: (required)
|
|
1286
|
+
:type notification_patch_request: NotificationPatchRequest
|
|
1287
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1288
|
+
number provided, it will be total request
|
|
1289
|
+
timeout. It can also be a pair (tuple) of
|
|
1290
|
+
(connection, read) timeouts.
|
|
1291
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1292
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1293
|
+
request; this effectively ignores the
|
|
1294
|
+
authentication in the spec for a single request.
|
|
1295
|
+
:type _request_auth: dict, optional
|
|
1296
|
+
:param _content_type: force content-type for the request.
|
|
1297
|
+
:type _content_type: str, Optional
|
|
1298
|
+
:param _headers: set to override the headers for a single
|
|
1299
|
+
request; this effectively ignores the headers
|
|
1300
|
+
in the spec for a single request.
|
|
1301
|
+
:type _headers: dict, optional
|
|
1302
|
+
:param _host_index: set to override the host_index for a single
|
|
1303
|
+
request; this effectively ignores the host_index
|
|
1304
|
+
in the spec for a single request.
|
|
1305
|
+
:type _host_index: int, optional
|
|
1306
|
+
:return: Returns the result object.
|
|
1307
|
+
""" # noqa: E501
|
|
1308
|
+
|
|
1309
|
+
_param = self._types_update_notification_type_serialize(
|
|
1310
|
+
notification_id=notification_id,
|
|
1311
|
+
notification_patch_request=notification_patch_request,
|
|
1312
|
+
_request_auth=_request_auth,
|
|
1313
|
+
_content_type=_content_type,
|
|
1314
|
+
_headers=_headers,
|
|
1315
|
+
_host_index=_host_index
|
|
1316
|
+
)
|
|
1317
|
+
|
|
1318
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1319
|
+
'200': "Notification",
|
|
1320
|
+
'400': None,
|
|
1321
|
+
'401': None,
|
|
1322
|
+
'500': None,
|
|
1323
|
+
}
|
|
1324
|
+
response_data = await self.api_client.call_api(
|
|
1325
|
+
*_param,
|
|
1326
|
+
_request_timeout=_request_timeout
|
|
1327
|
+
)
|
|
1328
|
+
return response_data.response
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
def _types_update_notification_type_serialize(
|
|
1332
|
+
self,
|
|
1333
|
+
notification_id,
|
|
1334
|
+
notification_patch_request,
|
|
1335
|
+
_request_auth,
|
|
1336
|
+
_content_type,
|
|
1337
|
+
_headers,
|
|
1338
|
+
_host_index,
|
|
1339
|
+
) -> RequestSerialized:
|
|
1340
|
+
|
|
1341
|
+
_host = None
|
|
1342
|
+
|
|
1343
|
+
_collection_formats: Dict[str, str] = {
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
_path_params: Dict[str, str] = {}
|
|
1347
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1348
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1349
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1350
|
+
_files: Dict[
|
|
1351
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1352
|
+
] = {}
|
|
1353
|
+
_body_params: Optional[bytes] = None
|
|
1354
|
+
|
|
1355
|
+
# process the path parameters
|
|
1356
|
+
if notification_id is not None:
|
|
1357
|
+
_path_params['notificationId'] = notification_id
|
|
1358
|
+
# process the query parameters
|
|
1359
|
+
# process the header parameters
|
|
1360
|
+
# process the form parameters
|
|
1361
|
+
# process the body parameter
|
|
1362
|
+
if notification_patch_request is not None:
|
|
1363
|
+
_body_params = notification_patch_request
|
|
1364
|
+
|
|
1365
|
+
|
|
1366
|
+
# set the HTTP header `Accept`
|
|
1367
|
+
if 'Accept' not in _header_params:
|
|
1368
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1369
|
+
[
|
|
1370
|
+
'application/json'
|
|
1371
|
+
]
|
|
1372
|
+
)
|
|
1373
|
+
|
|
1374
|
+
# set the HTTP header `Content-Type`
|
|
1375
|
+
if _content_type:
|
|
1376
|
+
_header_params['Content-Type'] = _content_type
|
|
1377
|
+
else:
|
|
1378
|
+
_default_content_type = (
|
|
1379
|
+
self.api_client.select_header_content_type(
|
|
1380
|
+
[
|
|
1381
|
+
'application/json'
|
|
1382
|
+
]
|
|
1383
|
+
)
|
|
1384
|
+
)
|
|
1385
|
+
if _default_content_type is not None:
|
|
1386
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1387
|
+
|
|
1388
|
+
# authentication setting
|
|
1389
|
+
_auth_settings: List[str] = [
|
|
1390
|
+
'endUserHashed',
|
|
1391
|
+
'endUser',
|
|
1392
|
+
'apiKey',
|
|
1393
|
+
'clientCredentials'
|
|
1394
|
+
]
|
|
1395
|
+
|
|
1396
|
+
return self.api_client.param_serialize(
|
|
1397
|
+
method='PATCH',
|
|
1398
|
+
resource_path='/types/{notificationId}',
|
|
1399
|
+
path_params=_path_params,
|
|
1400
|
+
query_params=_query_params,
|
|
1401
|
+
header_params=_header_params,
|
|
1402
|
+
body=_body_params,
|
|
1403
|
+
post_params=_form_params,
|
|
1404
|
+
files=_files,
|
|
1405
|
+
auth_settings=_auth_settings,
|
|
1406
|
+
collection_formats=_collection_formats,
|
|
1407
|
+
_host=_host,
|
|
1408
|
+
_request_auth=_request_auth
|
|
1409
|
+
)
|
|
1410
|
+
|
|
1411
|
+
|