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.
Files changed (189) hide show
  1. pingram/__init__.py +395 -0
  2. pingram/api/__init__.py +21 -0
  3. pingram/api/account_api.py +2198 -0
  4. pingram/api/addresses_api.py +860 -0
  5. pingram/api/components_api.py +1681 -0
  6. pingram/api/default_api.py +320 -0
  7. pingram/api/domains_api.py +849 -0
  8. pingram/api/editor_api.py +320 -0
  9. pingram/api/environments_api.py +878 -0
  10. pingram/api/health_api.py +287 -0
  11. pingram/api/insights_api.py +321 -0
  12. pingram/api/keys_api.py +849 -0
  13. pingram/api/logs_api.py +1632 -0
  14. pingram/api/members_api.py +1780 -0
  15. pingram/api/sender_api.py +892 -0
  16. pingram/api/templates_api.py +1889 -0
  17. pingram/api/types_api.py +1411 -0
  18. pingram/api/user_api.py +2534 -0
  19. pingram/api/users_api.py +936 -0
  20. pingram/api_client.py +807 -0
  21. pingram/api_response.py +21 -0
  22. pingram/client_wrapper.py +357 -0
  23. pingram/configuration.py +623 -0
  24. pingram/exceptions.py +219 -0
  25. pingram/models/__init__.py +173 -0
  26. pingram/models/account_addresses_response.py +95 -0
  27. pingram/models/account_addresses_response_addresses_inner.py +104 -0
  28. pingram/models/account_get_response.py +143 -0
  29. pingram/models/account_get_response_pending_downgrade_usage_limit.py +99 -0
  30. pingram/models/address_response.py +91 -0
  31. pingram/models/auto_join_get_response.py +89 -0
  32. pingram/models/auto_join_post_response.py +89 -0
  33. pingram/models/auto_join_request_body.py +87 -0
  34. pingram/models/bee_token_v2.py +89 -0
  35. pingram/models/billing_post_request_body.py +91 -0
  36. pingram/models/billing_post_response_body.py +149 -0
  37. pingram/models/billing_post_response_body_pending_downgrade_usage_limit.py +99 -0
  38. pingram/models/channels_enum.py +42 -0
  39. pingram/models/create_account_request_body.py +87 -0
  40. pingram/models/create_account_response.py +89 -0
  41. pingram/models/create_address_request.py +91 -0
  42. pingram/models/create_key_request.py +98 -0
  43. pingram/models/create_key_response.py +104 -0
  44. pingram/models/delete_key_response.py +87 -0
  45. pingram/models/delete_user_response.py +87 -0
  46. pingram/models/email_auth_token_post_request.py +87 -0
  47. pingram/models/email_component_patch_request.py +93 -0
  48. pingram/models/email_component_post_request.py +95 -0
  49. pingram/models/email_component_response.py +120 -0
  50. pingram/models/email_component_response_referenced_by_inner.py +92 -0
  51. pingram/models/environment.py +96 -0
  52. pingram/models/environment_create_request.py +87 -0
  53. pingram/models/environment_patch_request.py +94 -0
  54. pingram/models/get_account_metadata_response.py +91 -0
  55. pingram/models/get_account_metadata_response_user_account_metadata.py +91 -0
  56. pingram/models/get_email_components_response_inner.py +120 -0
  57. pingram/models/get_environments_response_inner.py +96 -0
  58. pingram/models/get_inapp_notifications_response.py +95 -0
  59. pingram/models/get_inapp_notifications_response_notifications_inner.py +137 -0
  60. pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options.py +106 -0
  61. pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_instant.py +93 -0
  62. pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_off.py +87 -0
  63. pingram/models/get_inapp_notifications_response_notifications_inner_replies_inner.py +89 -0
  64. pingram/models/get_inapp_notifications_response_notifications_inner_template.py +136 -0
  65. pingram/models/get_inapp_notifications_response_notifications_inner_template_any_of.py +98 -0
  66. pingram/models/get_keys_response.py +95 -0
  67. pingram/models/get_keys_response_keys_inner.py +110 -0
  68. pingram/models/get_logs_response.py +97 -0
  69. pingram/models/get_logs_response_messages_inner.py +141 -0
  70. pingram/models/get_logs_response_messages_inner_attachments_inner.py +93 -0
  71. pingram/models/get_members_response_inner.py +95 -0
  72. pingram/models/get_metrics_response_inner.py +116 -0
  73. pingram/models/get_metrics_response_inner_messages_inner.py +89 -0
  74. pingram/models/get_notifications_response_inner.py +126 -0
  75. pingram/models/get_notifications_response_inner_deduplication.py +87 -0
  76. pingram/models/get_notifications_response_inner_options.py +122 -0
  77. pingram/models/get_notifications_response_inner_options_email.py +128 -0
  78. pingram/models/get_notifications_response_inner_options_email_daily.py +89 -0
  79. pingram/models/get_notifications_response_inner_options_email_monthly.py +101 -0
  80. pingram/models/get_notifications_response_inner_options_email_weekly.py +91 -0
  81. pingram/models/get_notifications_response_inner_templates_inner.py +90 -0
  82. pingram/models/get_notifications_response_inner_throttling.py +111 -0
  83. pingram/models/get_senders_response_inner.py +128 -0
  84. pingram/models/get_templates_response.py +136 -0
  85. pingram/models/get_users_response.py +99 -0
  86. pingram/models/get_users_response_users_inner.py +133 -0
  87. pingram/models/get_users_response_users_inner_email_suppression_status.py +96 -0
  88. pingram/models/get_users_response_users_inner_push_tokens_inner.py +104 -0
  89. pingram/models/get_users_response_users_inner_push_tokens_inner_device.py +97 -0
  90. pingram/models/get_users_response_users_inner_slack_token.py +140 -0
  91. pingram/models/get_users_response_users_inner_slack_token_authed_user.py +97 -0
  92. pingram/models/get_users_response_users_inner_slack_token_enterprise.py +89 -0
  93. pingram/models/get_users_response_users_inner_slack_token_incoming_webhook.py +93 -0
  94. pingram/models/get_users_response_users_inner_slack_token_response_metadata.py +97 -0
  95. pingram/models/get_users_response_users_inner_web_push_tokens_inner.py +91 -0
  96. pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub.py +93 -0
  97. pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub_keys.py +89 -0
  98. pingram/models/in_app_notification_patch_request.py +112 -0
  99. pingram/models/in_app_notification_unread_clear_request.py +89 -0
  100. pingram/models/inapp_unread_count_response.py +87 -0
  101. pingram/models/inbound_request_body.py +138 -0
  102. pingram/models/inbound_response_body.py +104 -0
  103. pingram/models/inbound_response_body_results_inner.py +103 -0
  104. pingram/models/ingishts_post_request.py +121 -0
  105. pingram/models/ingishts_post_request_label_options.py +87 -0
  106. pingram/models/ingishts_post_request_metric_data_queries_inner.py +103 -0
  107. pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat.py +107 -0
  108. pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric.py +99 -0
  109. pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric_dimensions_inner.py +89 -0
  110. pingram/models/intercom_webhook.py +106 -0
  111. pingram/models/intercom_webhook_data.py +91 -0
  112. pingram/models/intercom_webhook_data_item.py +136 -0
  113. pingram/models/intercom_webhook_data_item_any_of.py +140 -0
  114. pingram/models/intercom_webhook_data_item_any_of_contacts.py +104 -0
  115. pingram/models/intercom_webhook_data_item_any_of_contacts_contacts_inner.py +91 -0
  116. pingram/models/intercom_webhook_data_item_any_of_source.py +101 -0
  117. pingram/models/intercom_webhook_data_item_any_of_source_author.py +93 -0
  118. pingram/models/invite_post_response.py +89 -0
  119. pingram/models/log_query_post_body.py +109 -0
  120. pingram/models/logs_bulk_request.py +87 -0
  121. pingram/models/logs_get_response.py +95 -0
  122. pingram/models/logs_get_response_logs_inner.py +627 -0
  123. pingram/models/logs_query_response.py +87 -0
  124. pingram/models/logs_query_result_response.py +101 -0
  125. pingram/models/logs_retention_response.py +87 -0
  126. pingram/models/logs_tail_response.py +95 -0
  127. pingram/models/member_invite_request.py +89 -0
  128. pingram/models/member_update_request.py +87 -0
  129. pingram/models/message_response.py +87 -0
  130. pingram/models/notification.py +126 -0
  131. pingram/models/notification_create_request.py +97 -0
  132. pingram/models/notification_patch_request.py +112 -0
  133. pingram/models/post_email_test_request.py +99 -0
  134. pingram/models/post_email_test_response.py +89 -0
  135. pingram/models/post_senders_request_body.py +87 -0
  136. pingram/models/post_user_request.py +121 -0
  137. pingram/models/sender_post_body.py +166 -0
  138. pingram/models/sender_post_body_email.py +95 -0
  139. pingram/models/sender_post_body_inapp.py +91 -0
  140. pingram/models/sender_post_body_mobile_push.py +89 -0
  141. pingram/models/sender_post_body_options.py +103 -0
  142. pingram/models/sender_post_body_options_apn.py +99 -0
  143. pingram/models/sender_post_body_options_email.py +107 -0
  144. pingram/models/sender_post_body_options_email_attachments_inner.py +134 -0
  145. pingram/models/sender_post_body_options_email_attachments_inner_any_of.py +89 -0
  146. pingram/models/sender_post_body_options_email_attachments_inner_any_of1.py +91 -0
  147. pingram/models/sender_post_body_options_fcm.py +91 -0
  148. pingram/models/sender_post_body_options_fcm_android.py +103 -0
  149. pingram/models/sender_post_body_slack.py +123 -0
  150. pingram/models/sender_post_body_slack_metadata.py +99 -0
  151. pingram/models/sender_post_body_slack_metadata_entities_inner.py +99 -0
  152. pingram/models/sender_post_body_slack_metadata_entities_inner_external_ref.py +89 -0
  153. pingram/models/sender_post_body_sms.py +93 -0
  154. pingram/models/sender_post_body_sms_auto_reply.py +87 -0
  155. pingram/models/sender_post_body_to.py +133 -0
  156. pingram/models/sender_post_body_user.py +133 -0
  157. pingram/models/sender_post_body_web_push.py +93 -0
  158. pingram/models/sender_post_response.py +89 -0
  159. pingram/models/set_default_template_request.py +97 -0
  160. pingram/models/slack_interactivity_response.py +87 -0
  161. pingram/models/slack_oauth_request.py +89 -0
  162. pingram/models/success_response.py +87 -0
  163. pingram/models/supabase_configure_request.py +93 -0
  164. pingram/models/supabase_configure_response.py +89 -0
  165. pingram/models/supabase_o_auth_request.py +91 -0
  166. pingram/models/supabase_o_auth_response.py +89 -0
  167. pingram/models/supabase_projects_response.py +95 -0
  168. pingram/models/supabase_projects_response_projects_inner.py +95 -0
  169. pingram/models/supabase_status_response.py +93 -0
  170. pingram/models/template.py +98 -0
  171. pingram/models/template_patch_request.py +134 -0
  172. pingram/models/template_patch_request_any_of.py +97 -0
  173. pingram/models/template_patch_request_any_of1.py +103 -0
  174. pingram/models/template_patch_request_any_of1_batch.py +91 -0
  175. pingram/models/template_patch_request_any_of1_instant.py +91 -0
  176. pingram/models/template_post_request.py +131 -0
  177. pingram/models/template_post_request_batch.py +91 -0
  178. pingram/models/template_post_request_instant.py +91 -0
  179. pingram/models/update_address_request.py +91 -0
  180. pingram/models/user.py +133 -0
  181. pingram/models/user_suppression_delete_response.py +91 -0
  182. pingram/models/webhook_response.py +104 -0
  183. pingram/py.typed +0 -0
  184. pingram/rest.py +199 -0
  185. pingram_python-0.1.0.dist-info/METADATA +69 -0
  186. pingram_python-0.1.0.dist-info/RECORD +189 -0
  187. pingram_python-0.1.0.dist-info/WHEEL +5 -0
  188. pingram_python-0.1.0.dist-info/licenses/LICENSE +21 -0
  189. pingram_python-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,892 @@
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_extensions import Annotated
21
+ from pingram.models.message_response import MessageResponse
22
+ from pingram.models.post_email_test_request import PostEmailTestRequest
23
+ from pingram.models.post_email_test_response import PostEmailTestResponse
24
+ from pingram.models.sender_post_body import SenderPostBody
25
+
26
+ from pingram.api_client import ApiClient, RequestSerialized
27
+ from pingram.api_response import ApiResponse
28
+ from pingram.rest import RESTResponseType
29
+
30
+
31
+ class SenderApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ async def sender_delete_schedule(
46
+ self,
47
+ tracking_id: Annotated[StrictStr, Field(description="The tracking ID of the scheduled notification")],
48
+ _request_timeout: Union[
49
+ None,
50
+ Annotated[StrictFloat, Field(gt=0)],
51
+ Tuple[
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Annotated[StrictFloat, Field(gt=0)]
54
+ ]
55
+ ] = None,
56
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
57
+ _content_type: Optional[StrictStr] = None,
58
+ _headers: Optional[Dict[StrictStr, Any]] = None,
59
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
+ ) -> MessageResponse:
61
+ """Delete (unschedule) an already scheduled notification
62
+
63
+
64
+ :param tracking_id: The tracking ID of the scheduled notification (required)
65
+ :type tracking_id: str
66
+ :param _request_timeout: timeout setting for this request. If one
67
+ number provided, it will be total request
68
+ timeout. It can also be a pair (tuple) of
69
+ (connection, read) timeouts.
70
+ :type _request_timeout: int, tuple(int, int), optional
71
+ :param _request_auth: set to override the auth_settings for an a single
72
+ request; this effectively ignores the
73
+ authentication in the spec for a single request.
74
+ :type _request_auth: dict, optional
75
+ :param _content_type: force content-type for the request.
76
+ :type _content_type: str, Optional
77
+ :param _headers: set to override the headers for a single
78
+ request; this effectively ignores the headers
79
+ in the spec for a single request.
80
+ :type _headers: dict, optional
81
+ :param _host_index: set to override the host_index for a single
82
+ request; this effectively ignores the host_index
83
+ in the spec for a single request.
84
+ :type _host_index: int, optional
85
+ :return: Returns the result object.
86
+ """ # noqa: E501
87
+
88
+ _param = self._sender_delete_schedule_serialize(
89
+ tracking_id=tracking_id,
90
+ _request_auth=_request_auth,
91
+ _content_type=_content_type,
92
+ _headers=_headers,
93
+ _host_index=_host_index
94
+ )
95
+
96
+ _response_types_map: Dict[str, Optional[str]] = {
97
+ '200': "MessageResponse",
98
+ '400': None,
99
+ '401': None,
100
+ '500': None,
101
+ }
102
+ response_data = await self.api_client.call_api(
103
+ *_param,
104
+ _request_timeout=_request_timeout
105
+ )
106
+ await 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
+ async def sender_delete_schedule_with_http_info(
115
+ self,
116
+ tracking_id: Annotated[StrictStr, Field(description="The tracking ID of the scheduled notification")],
117
+ _request_timeout: Union[
118
+ None,
119
+ Annotated[StrictFloat, Field(gt=0)],
120
+ Tuple[
121
+ Annotated[StrictFloat, Field(gt=0)],
122
+ Annotated[StrictFloat, Field(gt=0)]
123
+ ]
124
+ ] = None,
125
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
126
+ _content_type: Optional[StrictStr] = None,
127
+ _headers: Optional[Dict[StrictStr, Any]] = None,
128
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
129
+ ) -> ApiResponse[MessageResponse]:
130
+ """Delete (unschedule) an already scheduled notification
131
+
132
+
133
+ :param tracking_id: The tracking ID of the scheduled notification (required)
134
+ :type tracking_id: str
135
+ :param _request_timeout: timeout setting for this request. If one
136
+ number provided, it will be total request
137
+ timeout. It can also be a pair (tuple) of
138
+ (connection, read) timeouts.
139
+ :type _request_timeout: int, tuple(int, int), optional
140
+ :param _request_auth: set to override the auth_settings for an a single
141
+ request; this effectively ignores the
142
+ authentication in the spec for a single request.
143
+ :type _request_auth: dict, optional
144
+ :param _content_type: force content-type for the request.
145
+ :type _content_type: str, Optional
146
+ :param _headers: set to override the headers for a single
147
+ request; this effectively ignores the headers
148
+ in the spec for a single request.
149
+ :type _headers: dict, optional
150
+ :param _host_index: set to override the host_index for a single
151
+ request; this effectively ignores the host_index
152
+ in the spec for a single request.
153
+ :type _host_index: int, optional
154
+ :return: Returns the result object.
155
+ """ # noqa: E501
156
+
157
+ _param = self._sender_delete_schedule_serialize(
158
+ tracking_id=tracking_id,
159
+ _request_auth=_request_auth,
160
+ _content_type=_content_type,
161
+ _headers=_headers,
162
+ _host_index=_host_index
163
+ )
164
+
165
+ _response_types_map: Dict[str, Optional[str]] = {
166
+ '200': "MessageResponse",
167
+ '400': None,
168
+ '401': None,
169
+ '500': None,
170
+ }
171
+ response_data = await self.api_client.call_api(
172
+ *_param,
173
+ _request_timeout=_request_timeout
174
+ )
175
+ await response_data.read()
176
+ return self.api_client.response_deserialize(
177
+ response_data=response_data,
178
+ response_types_map=_response_types_map,
179
+ )
180
+
181
+
182
+ @validate_call
183
+ async def sender_delete_schedule_without_preload_content(
184
+ self,
185
+ tracking_id: Annotated[StrictStr, Field(description="The tracking ID of the scheduled notification")],
186
+ _request_timeout: Union[
187
+ None,
188
+ Annotated[StrictFloat, Field(gt=0)],
189
+ Tuple[
190
+ Annotated[StrictFloat, Field(gt=0)],
191
+ Annotated[StrictFloat, Field(gt=0)]
192
+ ]
193
+ ] = None,
194
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
195
+ _content_type: Optional[StrictStr] = None,
196
+ _headers: Optional[Dict[StrictStr, Any]] = None,
197
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
198
+ ) -> RESTResponseType:
199
+ """Delete (unschedule) an already scheduled notification
200
+
201
+
202
+ :param tracking_id: The tracking ID of the scheduled notification (required)
203
+ :type tracking_id: str
204
+ :param _request_timeout: timeout setting for this request. If one
205
+ number provided, it will be total request
206
+ timeout. It can also be a pair (tuple) of
207
+ (connection, read) timeouts.
208
+ :type _request_timeout: int, tuple(int, int), optional
209
+ :param _request_auth: set to override the auth_settings for an a single
210
+ request; this effectively ignores the
211
+ authentication in the spec for a single request.
212
+ :type _request_auth: dict, optional
213
+ :param _content_type: force content-type for the request.
214
+ :type _content_type: str, Optional
215
+ :param _headers: set to override the headers for a single
216
+ request; this effectively ignores the headers
217
+ in the spec for a single request.
218
+ :type _headers: dict, optional
219
+ :param _host_index: set to override the host_index for a single
220
+ request; this effectively ignores the host_index
221
+ in the spec for a single request.
222
+ :type _host_index: int, optional
223
+ :return: Returns the result object.
224
+ """ # noqa: E501
225
+
226
+ _param = self._sender_delete_schedule_serialize(
227
+ tracking_id=tracking_id,
228
+ _request_auth=_request_auth,
229
+ _content_type=_content_type,
230
+ _headers=_headers,
231
+ _host_index=_host_index
232
+ )
233
+
234
+ _response_types_map: Dict[str, Optional[str]] = {
235
+ '200': "MessageResponse",
236
+ '400': None,
237
+ '401': None,
238
+ '500': None,
239
+ }
240
+ response_data = await self.api_client.call_api(
241
+ *_param,
242
+ _request_timeout=_request_timeout
243
+ )
244
+ return response_data.response
245
+
246
+
247
+ def _sender_delete_schedule_serialize(
248
+ self,
249
+ tracking_id,
250
+ _request_auth,
251
+ _content_type,
252
+ _headers,
253
+ _host_index,
254
+ ) -> RequestSerialized:
255
+
256
+ _host = None
257
+
258
+ _collection_formats: Dict[str, str] = {
259
+ }
260
+
261
+ _path_params: Dict[str, str] = {}
262
+ _query_params: List[Tuple[str, str]] = []
263
+ _header_params: Dict[str, Optional[str]] = _headers or {}
264
+ _form_params: List[Tuple[str, str]] = []
265
+ _files: Dict[
266
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
267
+ ] = {}
268
+ _body_params: Optional[bytes] = None
269
+
270
+ # process the path parameters
271
+ if tracking_id is not None:
272
+ _path_params['trackingId'] = tracking_id
273
+ # process the query parameters
274
+ # process the header parameters
275
+ # process the form parameters
276
+ # process the body parameter
277
+
278
+
279
+ # set the HTTP header `Accept`
280
+ if 'Accept' not in _header_params:
281
+ _header_params['Accept'] = self.api_client.select_header_accept(
282
+ [
283
+ 'application/json'
284
+ ]
285
+ )
286
+
287
+
288
+ # authentication setting
289
+ _auth_settings: List[str] = [
290
+ 'endUserHashed',
291
+ 'endUser',
292
+ 'apiKey',
293
+ 'clientCredentials'
294
+ ]
295
+
296
+ return self.api_client.param_serialize(
297
+ method='DELETE',
298
+ resource_path='/sender/scheduler/{trackingId}',
299
+ path_params=_path_params,
300
+ query_params=_query_params,
301
+ header_params=_header_params,
302
+ body=_body_params,
303
+ post_params=_form_params,
304
+ files=_files,
305
+ auth_settings=_auth_settings,
306
+ collection_formats=_collection_formats,
307
+ _host=_host,
308
+ _request_auth=_request_auth
309
+ )
310
+
311
+
312
+
313
+
314
+ @validate_call
315
+ async def sender_test_email(
316
+ self,
317
+ post_email_test_request: PostEmailTestRequest,
318
+ _request_timeout: Union[
319
+ None,
320
+ Annotated[StrictFloat, Field(gt=0)],
321
+ Tuple[
322
+ Annotated[StrictFloat, Field(gt=0)],
323
+ Annotated[StrictFloat, Field(gt=0)]
324
+ ]
325
+ ] = None,
326
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
327
+ _content_type: Optional[StrictStr] = None,
328
+ _headers: Optional[Dict[StrictStr, Any]] = None,
329
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
330
+ ) -> PostEmailTestResponse:
331
+ """Test the emailer with a sample email
332
+
333
+
334
+ :param post_email_test_request: (required)
335
+ :type post_email_test_request: PostEmailTestRequest
336
+ :param _request_timeout: timeout setting for this request. If one
337
+ number provided, it will be total request
338
+ timeout. It can also be a pair (tuple) of
339
+ (connection, read) timeouts.
340
+ :type _request_timeout: int, tuple(int, int), optional
341
+ :param _request_auth: set to override the auth_settings for an a single
342
+ request; this effectively ignores the
343
+ authentication in the spec for a single request.
344
+ :type _request_auth: dict, optional
345
+ :param _content_type: force content-type for the request.
346
+ :type _content_type: str, Optional
347
+ :param _headers: set to override the headers for a single
348
+ request; this effectively ignores the headers
349
+ in the spec for a single request.
350
+ :type _headers: dict, optional
351
+ :param _host_index: set to override the host_index for a single
352
+ request; this effectively ignores the host_index
353
+ in the spec for a single request.
354
+ :type _host_index: int, optional
355
+ :return: Returns the result object.
356
+ """ # noqa: E501
357
+
358
+ _param = self._sender_test_email_serialize(
359
+ post_email_test_request=post_email_test_request,
360
+ _request_auth=_request_auth,
361
+ _content_type=_content_type,
362
+ _headers=_headers,
363
+ _host_index=_host_index
364
+ )
365
+
366
+ _response_types_map: Dict[str, Optional[str]] = {
367
+ '200': "PostEmailTestResponse",
368
+ '400': None,
369
+ '401': None,
370
+ '500': None,
371
+ }
372
+ response_data = await self.api_client.call_api(
373
+ *_param,
374
+ _request_timeout=_request_timeout
375
+ )
376
+ await response_data.read()
377
+ return self.api_client.response_deserialize(
378
+ response_data=response_data,
379
+ response_types_map=_response_types_map,
380
+ ).data
381
+
382
+
383
+ @validate_call
384
+ async def sender_test_email_with_http_info(
385
+ self,
386
+ post_email_test_request: PostEmailTestRequest,
387
+ _request_timeout: Union[
388
+ None,
389
+ Annotated[StrictFloat, Field(gt=0)],
390
+ Tuple[
391
+ Annotated[StrictFloat, Field(gt=0)],
392
+ Annotated[StrictFloat, Field(gt=0)]
393
+ ]
394
+ ] = None,
395
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
396
+ _content_type: Optional[StrictStr] = None,
397
+ _headers: Optional[Dict[StrictStr, Any]] = None,
398
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
399
+ ) -> ApiResponse[PostEmailTestResponse]:
400
+ """Test the emailer with a sample email
401
+
402
+
403
+ :param post_email_test_request: (required)
404
+ :type post_email_test_request: PostEmailTestRequest
405
+ :param _request_timeout: timeout setting for this request. If one
406
+ number provided, it will be total request
407
+ timeout. It can also be a pair (tuple) of
408
+ (connection, read) timeouts.
409
+ :type _request_timeout: int, tuple(int, int), optional
410
+ :param _request_auth: set to override the auth_settings for an a single
411
+ request; this effectively ignores the
412
+ authentication in the spec for a single request.
413
+ :type _request_auth: dict, optional
414
+ :param _content_type: force content-type for the request.
415
+ :type _content_type: str, Optional
416
+ :param _headers: set to override the headers for a single
417
+ request; this effectively ignores the headers
418
+ in the spec for a single request.
419
+ :type _headers: dict, optional
420
+ :param _host_index: set to override the host_index for a single
421
+ request; this effectively ignores the host_index
422
+ in the spec for a single request.
423
+ :type _host_index: int, optional
424
+ :return: Returns the result object.
425
+ """ # noqa: E501
426
+
427
+ _param = self._sender_test_email_serialize(
428
+ post_email_test_request=post_email_test_request,
429
+ _request_auth=_request_auth,
430
+ _content_type=_content_type,
431
+ _headers=_headers,
432
+ _host_index=_host_index
433
+ )
434
+
435
+ _response_types_map: Dict[str, Optional[str]] = {
436
+ '200': "PostEmailTestResponse",
437
+ '400': None,
438
+ '401': None,
439
+ '500': None,
440
+ }
441
+ response_data = await self.api_client.call_api(
442
+ *_param,
443
+ _request_timeout=_request_timeout
444
+ )
445
+ await response_data.read()
446
+ return self.api_client.response_deserialize(
447
+ response_data=response_data,
448
+ response_types_map=_response_types_map,
449
+ )
450
+
451
+
452
+ @validate_call
453
+ async def sender_test_email_without_preload_content(
454
+ self,
455
+ post_email_test_request: PostEmailTestRequest,
456
+ _request_timeout: Union[
457
+ None,
458
+ Annotated[StrictFloat, Field(gt=0)],
459
+ Tuple[
460
+ Annotated[StrictFloat, Field(gt=0)],
461
+ Annotated[StrictFloat, Field(gt=0)]
462
+ ]
463
+ ] = None,
464
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
465
+ _content_type: Optional[StrictStr] = None,
466
+ _headers: Optional[Dict[StrictStr, Any]] = None,
467
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
468
+ ) -> RESTResponseType:
469
+ """Test the emailer with a sample email
470
+
471
+
472
+ :param post_email_test_request: (required)
473
+ :type post_email_test_request: PostEmailTestRequest
474
+ :param _request_timeout: timeout setting for this request. If one
475
+ number provided, it will be total request
476
+ timeout. It can also be a pair (tuple) of
477
+ (connection, read) timeouts.
478
+ :type _request_timeout: int, tuple(int, int), optional
479
+ :param _request_auth: set to override the auth_settings for an a single
480
+ request; this effectively ignores the
481
+ authentication in the spec for a single request.
482
+ :type _request_auth: dict, optional
483
+ :param _content_type: force content-type for the request.
484
+ :type _content_type: str, Optional
485
+ :param _headers: set to override the headers for a single
486
+ request; this effectively ignores the headers
487
+ in the spec for a single request.
488
+ :type _headers: dict, optional
489
+ :param _host_index: set to override the host_index for a single
490
+ request; this effectively ignores the host_index
491
+ in the spec for a single request.
492
+ :type _host_index: int, optional
493
+ :return: Returns the result object.
494
+ """ # noqa: E501
495
+
496
+ _param = self._sender_test_email_serialize(
497
+ post_email_test_request=post_email_test_request,
498
+ _request_auth=_request_auth,
499
+ _content_type=_content_type,
500
+ _headers=_headers,
501
+ _host_index=_host_index
502
+ )
503
+
504
+ _response_types_map: Dict[str, Optional[str]] = {
505
+ '200': "PostEmailTestResponse",
506
+ '400': None,
507
+ '401': None,
508
+ '500': None,
509
+ }
510
+ response_data = await self.api_client.call_api(
511
+ *_param,
512
+ _request_timeout=_request_timeout
513
+ )
514
+ return response_data.response
515
+
516
+
517
+ def _sender_test_email_serialize(
518
+ self,
519
+ post_email_test_request,
520
+ _request_auth,
521
+ _content_type,
522
+ _headers,
523
+ _host_index,
524
+ ) -> RequestSerialized:
525
+
526
+ _host = None
527
+
528
+ _collection_formats: Dict[str, str] = {
529
+ }
530
+
531
+ _path_params: Dict[str, str] = {}
532
+ _query_params: List[Tuple[str, str]] = []
533
+ _header_params: Dict[str, Optional[str]] = _headers or {}
534
+ _form_params: List[Tuple[str, str]] = []
535
+ _files: Dict[
536
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
537
+ ] = {}
538
+ _body_params: Optional[bytes] = None
539
+
540
+ # process the path parameters
541
+ # process the query parameters
542
+ # process the header parameters
543
+ # process the form parameters
544
+ # process the body parameter
545
+ if post_email_test_request is not None:
546
+ _body_params = post_email_test_request
547
+
548
+
549
+ # set the HTTP header `Accept`
550
+ if 'Accept' not in _header_params:
551
+ _header_params['Accept'] = self.api_client.select_header_accept(
552
+ [
553
+ 'application/json'
554
+ ]
555
+ )
556
+
557
+ # set the HTTP header `Content-Type`
558
+ if _content_type:
559
+ _header_params['Content-Type'] = _content_type
560
+ else:
561
+ _default_content_type = (
562
+ self.api_client.select_header_content_type(
563
+ [
564
+ 'application/json'
565
+ ]
566
+ )
567
+ )
568
+ if _default_content_type is not None:
569
+ _header_params['Content-Type'] = _default_content_type
570
+
571
+ # authentication setting
572
+ _auth_settings: List[str] = [
573
+ 'endUserHashed',
574
+ 'endUser',
575
+ 'apiKey',
576
+ 'clientCredentials'
577
+ ]
578
+
579
+ return self.api_client.param_serialize(
580
+ method='POST',
581
+ resource_path='/sender/test/email',
582
+ path_params=_path_params,
583
+ query_params=_query_params,
584
+ header_params=_header_params,
585
+ body=_body_params,
586
+ post_params=_form_params,
587
+ files=_files,
588
+ auth_settings=_auth_settings,
589
+ collection_formats=_collection_formats,
590
+ _host=_host,
591
+ _request_auth=_request_auth
592
+ )
593
+
594
+
595
+
596
+
597
+ @validate_call
598
+ async def sender_update_schedule(
599
+ self,
600
+ tracking_id: Annotated[StrictStr, Field(description="The tracking ID of the scheduled notification")],
601
+ sender_post_body: SenderPostBody,
602
+ _request_timeout: Union[
603
+ None,
604
+ Annotated[StrictFloat, Field(gt=0)],
605
+ Tuple[
606
+ Annotated[StrictFloat, Field(gt=0)],
607
+ Annotated[StrictFloat, Field(gt=0)]
608
+ ]
609
+ ] = None,
610
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
611
+ _content_type: Optional[StrictStr] = None,
612
+ _headers: Optional[Dict[StrictStr, Any]] = None,
613
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
614
+ ) -> MessageResponse:
615
+ """Update the body or schedule of an already scheduled notification.
616
+
617
+
618
+ :param tracking_id: The tracking ID of the scheduled notification (required)
619
+ :type tracking_id: str
620
+ :param sender_post_body: (required)
621
+ :type sender_post_body: SenderPostBody
622
+ :param _request_timeout: timeout setting for this request. If one
623
+ number provided, it will be total request
624
+ timeout. It can also be a pair (tuple) of
625
+ (connection, read) timeouts.
626
+ :type _request_timeout: int, tuple(int, int), optional
627
+ :param _request_auth: set to override the auth_settings for an a single
628
+ request; this effectively ignores the
629
+ authentication in the spec for a single request.
630
+ :type _request_auth: dict, optional
631
+ :param _content_type: force content-type for the request.
632
+ :type _content_type: str, Optional
633
+ :param _headers: set to override the headers for a single
634
+ request; this effectively ignores the headers
635
+ in the spec for a single request.
636
+ :type _headers: dict, optional
637
+ :param _host_index: set to override the host_index for a single
638
+ request; this effectively ignores the host_index
639
+ in the spec for a single request.
640
+ :type _host_index: int, optional
641
+ :return: Returns the result object.
642
+ """ # noqa: E501
643
+
644
+ _param = self._sender_update_schedule_serialize(
645
+ tracking_id=tracking_id,
646
+ sender_post_body=sender_post_body,
647
+ _request_auth=_request_auth,
648
+ _content_type=_content_type,
649
+ _headers=_headers,
650
+ _host_index=_host_index
651
+ )
652
+
653
+ _response_types_map: Dict[str, Optional[str]] = {
654
+ '200': "MessageResponse",
655
+ '400': None,
656
+ '401': None,
657
+ '500': None,
658
+ }
659
+ response_data = await self.api_client.call_api(
660
+ *_param,
661
+ _request_timeout=_request_timeout
662
+ )
663
+ await response_data.read()
664
+ return self.api_client.response_deserialize(
665
+ response_data=response_data,
666
+ response_types_map=_response_types_map,
667
+ ).data
668
+
669
+
670
+ @validate_call
671
+ async def sender_update_schedule_with_http_info(
672
+ self,
673
+ tracking_id: Annotated[StrictStr, Field(description="The tracking ID of the scheduled notification")],
674
+ sender_post_body: SenderPostBody,
675
+ _request_timeout: Union[
676
+ None,
677
+ Annotated[StrictFloat, Field(gt=0)],
678
+ Tuple[
679
+ Annotated[StrictFloat, Field(gt=0)],
680
+ Annotated[StrictFloat, Field(gt=0)]
681
+ ]
682
+ ] = None,
683
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
684
+ _content_type: Optional[StrictStr] = None,
685
+ _headers: Optional[Dict[StrictStr, Any]] = None,
686
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
687
+ ) -> ApiResponse[MessageResponse]:
688
+ """Update the body or schedule of an already scheduled notification.
689
+
690
+
691
+ :param tracking_id: The tracking ID of the scheduled notification (required)
692
+ :type tracking_id: str
693
+ :param sender_post_body: (required)
694
+ :type sender_post_body: SenderPostBody
695
+ :param _request_timeout: timeout setting for this request. If one
696
+ number provided, it will be total request
697
+ timeout. It can also be a pair (tuple) of
698
+ (connection, read) timeouts.
699
+ :type _request_timeout: int, tuple(int, int), optional
700
+ :param _request_auth: set to override the auth_settings for an a single
701
+ request; this effectively ignores the
702
+ authentication in the spec for a single request.
703
+ :type _request_auth: dict, optional
704
+ :param _content_type: force content-type for the request.
705
+ :type _content_type: str, Optional
706
+ :param _headers: set to override the headers for a single
707
+ request; this effectively ignores the headers
708
+ in the spec for a single request.
709
+ :type _headers: dict, optional
710
+ :param _host_index: set to override the host_index for a single
711
+ request; this effectively ignores the host_index
712
+ in the spec for a single request.
713
+ :type _host_index: int, optional
714
+ :return: Returns the result object.
715
+ """ # noqa: E501
716
+
717
+ _param = self._sender_update_schedule_serialize(
718
+ tracking_id=tracking_id,
719
+ sender_post_body=sender_post_body,
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': "MessageResponse",
728
+ '400': None,
729
+ '401': None,
730
+ '500': None,
731
+ }
732
+ response_data = await self.api_client.call_api(
733
+ *_param,
734
+ _request_timeout=_request_timeout
735
+ )
736
+ await response_data.read()
737
+ return self.api_client.response_deserialize(
738
+ response_data=response_data,
739
+ response_types_map=_response_types_map,
740
+ )
741
+
742
+
743
+ @validate_call
744
+ async def sender_update_schedule_without_preload_content(
745
+ self,
746
+ tracking_id: Annotated[StrictStr, Field(description="The tracking ID of the scheduled notification")],
747
+ sender_post_body: SenderPostBody,
748
+ _request_timeout: Union[
749
+ None,
750
+ Annotated[StrictFloat, Field(gt=0)],
751
+ Tuple[
752
+ Annotated[StrictFloat, Field(gt=0)],
753
+ Annotated[StrictFloat, Field(gt=0)]
754
+ ]
755
+ ] = None,
756
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
757
+ _content_type: Optional[StrictStr] = None,
758
+ _headers: Optional[Dict[StrictStr, Any]] = None,
759
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
760
+ ) -> RESTResponseType:
761
+ """Update the body or schedule of an already scheduled notification.
762
+
763
+
764
+ :param tracking_id: The tracking ID of the scheduled notification (required)
765
+ :type tracking_id: str
766
+ :param sender_post_body: (required)
767
+ :type sender_post_body: SenderPostBody
768
+ :param _request_timeout: timeout setting for this request. If one
769
+ number provided, it will be total request
770
+ timeout. It can also be a pair (tuple) of
771
+ (connection, read) timeouts.
772
+ :type _request_timeout: int, tuple(int, int), optional
773
+ :param _request_auth: set to override the auth_settings for an a single
774
+ request; this effectively ignores the
775
+ authentication in the spec for a single request.
776
+ :type _request_auth: dict, optional
777
+ :param _content_type: force content-type for the request.
778
+ :type _content_type: str, Optional
779
+ :param _headers: set to override the headers for a single
780
+ request; this effectively ignores the headers
781
+ in the spec for a single request.
782
+ :type _headers: dict, optional
783
+ :param _host_index: set to override the host_index for a single
784
+ request; this effectively ignores the host_index
785
+ in the spec for a single request.
786
+ :type _host_index: int, optional
787
+ :return: Returns the result object.
788
+ """ # noqa: E501
789
+
790
+ _param = self._sender_update_schedule_serialize(
791
+ tracking_id=tracking_id,
792
+ sender_post_body=sender_post_body,
793
+ _request_auth=_request_auth,
794
+ _content_type=_content_type,
795
+ _headers=_headers,
796
+ _host_index=_host_index
797
+ )
798
+
799
+ _response_types_map: Dict[str, Optional[str]] = {
800
+ '200': "MessageResponse",
801
+ '400': None,
802
+ '401': None,
803
+ '500': None,
804
+ }
805
+ response_data = await self.api_client.call_api(
806
+ *_param,
807
+ _request_timeout=_request_timeout
808
+ )
809
+ return response_data.response
810
+
811
+
812
+ def _sender_update_schedule_serialize(
813
+ self,
814
+ tracking_id,
815
+ sender_post_body,
816
+ _request_auth,
817
+ _content_type,
818
+ _headers,
819
+ _host_index,
820
+ ) -> RequestSerialized:
821
+
822
+ _host = None
823
+
824
+ _collection_formats: Dict[str, str] = {
825
+ }
826
+
827
+ _path_params: Dict[str, str] = {}
828
+ _query_params: List[Tuple[str, str]] = []
829
+ _header_params: Dict[str, Optional[str]] = _headers or {}
830
+ _form_params: List[Tuple[str, str]] = []
831
+ _files: Dict[
832
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
833
+ ] = {}
834
+ _body_params: Optional[bytes] = None
835
+
836
+ # process the path parameters
837
+ if tracking_id is not None:
838
+ _path_params['trackingId'] = tracking_id
839
+ # process the query parameters
840
+ # process the header parameters
841
+ # process the form parameters
842
+ # process the body parameter
843
+ if sender_post_body is not None:
844
+ _body_params = sender_post_body
845
+
846
+
847
+ # set the HTTP header `Accept`
848
+ if 'Accept' not in _header_params:
849
+ _header_params['Accept'] = self.api_client.select_header_accept(
850
+ [
851
+ 'application/json'
852
+ ]
853
+ )
854
+
855
+ # set the HTTP header `Content-Type`
856
+ if _content_type:
857
+ _header_params['Content-Type'] = _content_type
858
+ else:
859
+ _default_content_type = (
860
+ self.api_client.select_header_content_type(
861
+ [
862
+ 'application/json'
863
+ ]
864
+ )
865
+ )
866
+ if _default_content_type is not None:
867
+ _header_params['Content-Type'] = _default_content_type
868
+
869
+ # authentication setting
870
+ _auth_settings: List[str] = [
871
+ 'endUserHashed',
872
+ 'endUser',
873
+ 'apiKey',
874
+ 'clientCredentials'
875
+ ]
876
+
877
+ return self.api_client.param_serialize(
878
+ method='PUT',
879
+ resource_path='/sender/scheduler/{trackingId}',
880
+ path_params=_path_params,
881
+ query_params=_query_params,
882
+ header_params=_header_params,
883
+ body=_body_params,
884
+ post_params=_form_params,
885
+ files=_files,
886
+ auth_settings=_auth_settings,
887
+ collection_formats=_collection_formats,
888
+ _host=_host,
889
+ _request_auth=_request_auth
890
+ )
891
+
892
+