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,849 @@
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_senders_response_inner import GetSendersResponseInner
23
+ from pingram.models.post_senders_request_body import PostSendersRequestBody
24
+ from pingram.models.success_response import SuccessResponse
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 DomainsApi:
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 domains_add_domain(
46
+ self,
47
+ post_senders_request_body: PostSendersRequestBody,
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
+ ) -> List[GetSendersResponseInner]:
61
+ """Request to verify a new sender domain or email address
62
+
63
+
64
+ :param post_senders_request_body: (required)
65
+ :type post_senders_request_body: PostSendersRequestBody
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._domains_add_domain_serialize(
89
+ post_senders_request_body=post_senders_request_body,
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': "List[GetSendersResponseInner]",
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 domains_add_domain_with_http_info(
115
+ self,
116
+ post_senders_request_body: PostSendersRequestBody,
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[List[GetSendersResponseInner]]:
130
+ """Request to verify a new sender domain or email address
131
+
132
+
133
+ :param post_senders_request_body: (required)
134
+ :type post_senders_request_body: PostSendersRequestBody
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._domains_add_domain_serialize(
158
+ post_senders_request_body=post_senders_request_body,
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': "List[GetSendersResponseInner]",
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 domains_add_domain_without_preload_content(
184
+ self,
185
+ post_senders_request_body: PostSendersRequestBody,
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
+ """Request to verify a new sender domain or email address
200
+
201
+
202
+ :param post_senders_request_body: (required)
203
+ :type post_senders_request_body: PostSendersRequestBody
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._domains_add_domain_serialize(
227
+ post_senders_request_body=post_senders_request_body,
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': "List[GetSendersResponseInner]",
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 _domains_add_domain_serialize(
248
+ self,
249
+ post_senders_request_body,
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
+ # process the query parameters
272
+ # process the header parameters
273
+ # process the form parameters
274
+ # process the body parameter
275
+ if post_senders_request_body is not None:
276
+ _body_params = post_senders_request_body
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
+ # set the HTTP header `Content-Type`
288
+ if _content_type:
289
+ _header_params['Content-Type'] = _content_type
290
+ else:
291
+ _default_content_type = (
292
+ self.api_client.select_header_content_type(
293
+ [
294
+ 'application/json'
295
+ ]
296
+ )
297
+ )
298
+ if _default_content_type is not None:
299
+ _header_params['Content-Type'] = _default_content_type
300
+
301
+ # authentication setting
302
+ _auth_settings: List[str] = [
303
+ 'endUserHashed',
304
+ 'endUser',
305
+ 'apiKey',
306
+ 'clientCredentials'
307
+ ]
308
+
309
+ return self.api_client.param_serialize(
310
+ method='POST',
311
+ resource_path='/domains',
312
+ path_params=_path_params,
313
+ query_params=_query_params,
314
+ header_params=_header_params,
315
+ body=_body_params,
316
+ post_params=_form_params,
317
+ files=_files,
318
+ auth_settings=_auth_settings,
319
+ collection_formats=_collection_formats,
320
+ _host=_host,
321
+ _request_auth=_request_auth
322
+ )
323
+
324
+
325
+
326
+
327
+ @validate_call
328
+ async def domains_delete_domain(
329
+ self,
330
+ sender: Annotated[StrictStr, Field(description="Sender domain or email address (URL encoded)")],
331
+ _request_timeout: Union[
332
+ None,
333
+ Annotated[StrictFloat, Field(gt=0)],
334
+ Tuple[
335
+ Annotated[StrictFloat, Field(gt=0)],
336
+ Annotated[StrictFloat, Field(gt=0)]
337
+ ]
338
+ ] = None,
339
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
340
+ _content_type: Optional[StrictStr] = None,
341
+ _headers: Optional[Dict[StrictStr, Any]] = None,
342
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
343
+ ) -> SuccessResponse:
344
+ """Delete a sender domain or email address
345
+
346
+
347
+ :param sender: Sender domain or email address (URL encoded) (required)
348
+ :type sender: str
349
+ :param _request_timeout: timeout setting for this request. If one
350
+ number provided, it will be total request
351
+ timeout. It can also be a pair (tuple) of
352
+ (connection, read) timeouts.
353
+ :type _request_timeout: int, tuple(int, int), optional
354
+ :param _request_auth: set to override the auth_settings for an a single
355
+ request; this effectively ignores the
356
+ authentication in the spec for a single request.
357
+ :type _request_auth: dict, optional
358
+ :param _content_type: force content-type for the request.
359
+ :type _content_type: str, Optional
360
+ :param _headers: set to override the headers for a single
361
+ request; this effectively ignores the headers
362
+ in the spec for a single request.
363
+ :type _headers: dict, optional
364
+ :param _host_index: set to override the host_index for a single
365
+ request; this effectively ignores the host_index
366
+ in the spec for a single request.
367
+ :type _host_index: int, optional
368
+ :return: Returns the result object.
369
+ """ # noqa: E501
370
+
371
+ _param = self._domains_delete_domain_serialize(
372
+ sender=sender,
373
+ _request_auth=_request_auth,
374
+ _content_type=_content_type,
375
+ _headers=_headers,
376
+ _host_index=_host_index
377
+ )
378
+
379
+ _response_types_map: Dict[str, Optional[str]] = {
380
+ '200': "SuccessResponse",
381
+ '400': None,
382
+ '401': None,
383
+ '500': None,
384
+ }
385
+ response_data = await self.api_client.call_api(
386
+ *_param,
387
+ _request_timeout=_request_timeout
388
+ )
389
+ await response_data.read()
390
+ return self.api_client.response_deserialize(
391
+ response_data=response_data,
392
+ response_types_map=_response_types_map,
393
+ ).data
394
+
395
+
396
+ @validate_call
397
+ async def domains_delete_domain_with_http_info(
398
+ self,
399
+ sender: Annotated[StrictStr, Field(description="Sender domain or email address (URL encoded)")],
400
+ _request_timeout: Union[
401
+ None,
402
+ Annotated[StrictFloat, Field(gt=0)],
403
+ Tuple[
404
+ Annotated[StrictFloat, Field(gt=0)],
405
+ Annotated[StrictFloat, Field(gt=0)]
406
+ ]
407
+ ] = None,
408
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
409
+ _content_type: Optional[StrictStr] = None,
410
+ _headers: Optional[Dict[StrictStr, Any]] = None,
411
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
412
+ ) -> ApiResponse[SuccessResponse]:
413
+ """Delete a sender domain or email address
414
+
415
+
416
+ :param sender: Sender domain or email address (URL encoded) (required)
417
+ :type sender: str
418
+ :param _request_timeout: timeout setting for this request. If one
419
+ number provided, it will be total request
420
+ timeout. It can also be a pair (tuple) of
421
+ (connection, read) timeouts.
422
+ :type _request_timeout: int, tuple(int, int), optional
423
+ :param _request_auth: set to override the auth_settings for an a single
424
+ request; this effectively ignores the
425
+ authentication in the spec for a single request.
426
+ :type _request_auth: dict, optional
427
+ :param _content_type: force content-type for the request.
428
+ :type _content_type: str, Optional
429
+ :param _headers: set to override the headers for a single
430
+ request; this effectively ignores the headers
431
+ in the spec for a single request.
432
+ :type _headers: dict, optional
433
+ :param _host_index: set to override the host_index for a single
434
+ request; this effectively ignores the host_index
435
+ in the spec for a single request.
436
+ :type _host_index: int, optional
437
+ :return: Returns the result object.
438
+ """ # noqa: E501
439
+
440
+ _param = self._domains_delete_domain_serialize(
441
+ sender=sender,
442
+ _request_auth=_request_auth,
443
+ _content_type=_content_type,
444
+ _headers=_headers,
445
+ _host_index=_host_index
446
+ )
447
+
448
+ _response_types_map: Dict[str, Optional[str]] = {
449
+ '200': "SuccessResponse",
450
+ '400': None,
451
+ '401': None,
452
+ '500': None,
453
+ }
454
+ response_data = await self.api_client.call_api(
455
+ *_param,
456
+ _request_timeout=_request_timeout
457
+ )
458
+ await response_data.read()
459
+ return self.api_client.response_deserialize(
460
+ response_data=response_data,
461
+ response_types_map=_response_types_map,
462
+ )
463
+
464
+
465
+ @validate_call
466
+ async def domains_delete_domain_without_preload_content(
467
+ self,
468
+ sender: Annotated[StrictStr, Field(description="Sender domain or email address (URL encoded)")],
469
+ _request_timeout: Union[
470
+ None,
471
+ Annotated[StrictFloat, Field(gt=0)],
472
+ Tuple[
473
+ Annotated[StrictFloat, Field(gt=0)],
474
+ Annotated[StrictFloat, Field(gt=0)]
475
+ ]
476
+ ] = None,
477
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
478
+ _content_type: Optional[StrictStr] = None,
479
+ _headers: Optional[Dict[StrictStr, Any]] = None,
480
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
481
+ ) -> RESTResponseType:
482
+ """Delete a sender domain or email address
483
+
484
+
485
+ :param sender: Sender domain or email address (URL encoded) (required)
486
+ :type sender: str
487
+ :param _request_timeout: timeout setting for this request. If one
488
+ number provided, it will be total request
489
+ timeout. It can also be a pair (tuple) of
490
+ (connection, read) timeouts.
491
+ :type _request_timeout: int, tuple(int, int), optional
492
+ :param _request_auth: set to override the auth_settings for an a single
493
+ request; this effectively ignores the
494
+ authentication in the spec for a single request.
495
+ :type _request_auth: dict, optional
496
+ :param _content_type: force content-type for the request.
497
+ :type _content_type: str, Optional
498
+ :param _headers: set to override the headers for a single
499
+ request; this effectively ignores the headers
500
+ in the spec for a single request.
501
+ :type _headers: dict, optional
502
+ :param _host_index: set to override the host_index for a single
503
+ request; this effectively ignores the host_index
504
+ in the spec for a single request.
505
+ :type _host_index: int, optional
506
+ :return: Returns the result object.
507
+ """ # noqa: E501
508
+
509
+ _param = self._domains_delete_domain_serialize(
510
+ sender=sender,
511
+ _request_auth=_request_auth,
512
+ _content_type=_content_type,
513
+ _headers=_headers,
514
+ _host_index=_host_index
515
+ )
516
+
517
+ _response_types_map: Dict[str, Optional[str]] = {
518
+ '200': "SuccessResponse",
519
+ '400': None,
520
+ '401': None,
521
+ '500': None,
522
+ }
523
+ response_data = await self.api_client.call_api(
524
+ *_param,
525
+ _request_timeout=_request_timeout
526
+ )
527
+ return response_data.response
528
+
529
+
530
+ def _domains_delete_domain_serialize(
531
+ self,
532
+ sender,
533
+ _request_auth,
534
+ _content_type,
535
+ _headers,
536
+ _host_index,
537
+ ) -> RequestSerialized:
538
+
539
+ _host = None
540
+
541
+ _collection_formats: Dict[str, str] = {
542
+ }
543
+
544
+ _path_params: Dict[str, str] = {}
545
+ _query_params: List[Tuple[str, str]] = []
546
+ _header_params: Dict[str, Optional[str]] = _headers or {}
547
+ _form_params: List[Tuple[str, str]] = []
548
+ _files: Dict[
549
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
550
+ ] = {}
551
+ _body_params: Optional[bytes] = None
552
+
553
+ # process the path parameters
554
+ if sender is not None:
555
+ _path_params['sender'] = sender
556
+ # process the query parameters
557
+ # process the header parameters
558
+ # process the form parameters
559
+ # process the body parameter
560
+
561
+
562
+ # set the HTTP header `Accept`
563
+ if 'Accept' not in _header_params:
564
+ _header_params['Accept'] = self.api_client.select_header_accept(
565
+ [
566
+ 'application/json'
567
+ ]
568
+ )
569
+
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='DELETE',
581
+ resource_path='/domains/{sender}',
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 domains_list_domains(
599
+ self,
600
+ _request_timeout: Union[
601
+ None,
602
+ Annotated[StrictFloat, Field(gt=0)],
603
+ Tuple[
604
+ Annotated[StrictFloat, Field(gt=0)],
605
+ Annotated[StrictFloat, Field(gt=0)]
606
+ ]
607
+ ] = None,
608
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
609
+ _content_type: Optional[StrictStr] = None,
610
+ _headers: Optional[Dict[StrictStr, Any]] = None,
611
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
612
+ ) -> List[GetSendersResponseInner]:
613
+ """Get all sender domains and email addresses configured for the account
614
+
615
+
616
+ :param _request_timeout: timeout setting for this request. If one
617
+ number provided, it will be total request
618
+ timeout. It can also be a pair (tuple) of
619
+ (connection, read) timeouts.
620
+ :type _request_timeout: int, tuple(int, int), optional
621
+ :param _request_auth: set to override the auth_settings for an a single
622
+ request; this effectively ignores the
623
+ authentication in the spec for a single request.
624
+ :type _request_auth: dict, optional
625
+ :param _content_type: force content-type for the request.
626
+ :type _content_type: str, Optional
627
+ :param _headers: set to override the headers for a single
628
+ request; this effectively ignores the headers
629
+ in the spec for a single request.
630
+ :type _headers: dict, optional
631
+ :param _host_index: set to override the host_index for a single
632
+ request; this effectively ignores the host_index
633
+ in the spec for a single request.
634
+ :type _host_index: int, optional
635
+ :return: Returns the result object.
636
+ """ # noqa: E501
637
+
638
+ _param = self._domains_list_domains_serialize(
639
+ _request_auth=_request_auth,
640
+ _content_type=_content_type,
641
+ _headers=_headers,
642
+ _host_index=_host_index
643
+ )
644
+
645
+ _response_types_map: Dict[str, Optional[str]] = {
646
+ '200': "List[GetSendersResponseInner]",
647
+ '400': None,
648
+ '401': None,
649
+ '500': None,
650
+ }
651
+ response_data = await self.api_client.call_api(
652
+ *_param,
653
+ _request_timeout=_request_timeout
654
+ )
655
+ await response_data.read()
656
+ return self.api_client.response_deserialize(
657
+ response_data=response_data,
658
+ response_types_map=_response_types_map,
659
+ ).data
660
+
661
+
662
+ @validate_call
663
+ async def domains_list_domains_with_http_info(
664
+ self,
665
+ _request_timeout: Union[
666
+ None,
667
+ Annotated[StrictFloat, Field(gt=0)],
668
+ Tuple[
669
+ Annotated[StrictFloat, Field(gt=0)],
670
+ Annotated[StrictFloat, Field(gt=0)]
671
+ ]
672
+ ] = None,
673
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
674
+ _content_type: Optional[StrictStr] = None,
675
+ _headers: Optional[Dict[StrictStr, Any]] = None,
676
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
677
+ ) -> ApiResponse[List[GetSendersResponseInner]]:
678
+ """Get all sender domains and email addresses configured for the account
679
+
680
+
681
+ :param _request_timeout: timeout setting for this request. If one
682
+ number provided, it will be total request
683
+ timeout. It can also be a pair (tuple) of
684
+ (connection, read) timeouts.
685
+ :type _request_timeout: int, tuple(int, int), optional
686
+ :param _request_auth: set to override the auth_settings for an a single
687
+ request; this effectively ignores the
688
+ authentication in the spec for a single request.
689
+ :type _request_auth: dict, optional
690
+ :param _content_type: force content-type for the request.
691
+ :type _content_type: str, Optional
692
+ :param _headers: set to override the headers for a single
693
+ request; this effectively ignores the headers
694
+ in the spec for a single request.
695
+ :type _headers: dict, optional
696
+ :param _host_index: set to override the host_index for a single
697
+ request; this effectively ignores the host_index
698
+ in the spec for a single request.
699
+ :type _host_index: int, optional
700
+ :return: Returns the result object.
701
+ """ # noqa: E501
702
+
703
+ _param = self._domains_list_domains_serialize(
704
+ _request_auth=_request_auth,
705
+ _content_type=_content_type,
706
+ _headers=_headers,
707
+ _host_index=_host_index
708
+ )
709
+
710
+ _response_types_map: Dict[str, Optional[str]] = {
711
+ '200': "List[GetSendersResponseInner]",
712
+ '400': None,
713
+ '401': None,
714
+ '500': None,
715
+ }
716
+ response_data = await self.api_client.call_api(
717
+ *_param,
718
+ _request_timeout=_request_timeout
719
+ )
720
+ await response_data.read()
721
+ return self.api_client.response_deserialize(
722
+ response_data=response_data,
723
+ response_types_map=_response_types_map,
724
+ )
725
+
726
+
727
+ @validate_call
728
+ async def domains_list_domains_without_preload_content(
729
+ self,
730
+ _request_timeout: Union[
731
+ None,
732
+ Annotated[StrictFloat, Field(gt=0)],
733
+ Tuple[
734
+ Annotated[StrictFloat, Field(gt=0)],
735
+ Annotated[StrictFloat, Field(gt=0)]
736
+ ]
737
+ ] = None,
738
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
739
+ _content_type: Optional[StrictStr] = None,
740
+ _headers: Optional[Dict[StrictStr, Any]] = None,
741
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
742
+ ) -> RESTResponseType:
743
+ """Get all sender domains and email addresses configured for the account
744
+
745
+
746
+ :param _request_timeout: timeout setting for this request. If one
747
+ number provided, it will be total request
748
+ timeout. It can also be a pair (tuple) of
749
+ (connection, read) timeouts.
750
+ :type _request_timeout: int, tuple(int, int), optional
751
+ :param _request_auth: set to override the auth_settings for an a single
752
+ request; this effectively ignores the
753
+ authentication in the spec for a single request.
754
+ :type _request_auth: dict, optional
755
+ :param _content_type: force content-type for the request.
756
+ :type _content_type: str, Optional
757
+ :param _headers: set to override the headers for a single
758
+ request; this effectively ignores the headers
759
+ in the spec for a single request.
760
+ :type _headers: dict, optional
761
+ :param _host_index: set to override the host_index for a single
762
+ request; this effectively ignores the host_index
763
+ in the spec for a single request.
764
+ :type _host_index: int, optional
765
+ :return: Returns the result object.
766
+ """ # noqa: E501
767
+
768
+ _param = self._domains_list_domains_serialize(
769
+ _request_auth=_request_auth,
770
+ _content_type=_content_type,
771
+ _headers=_headers,
772
+ _host_index=_host_index
773
+ )
774
+
775
+ _response_types_map: Dict[str, Optional[str]] = {
776
+ '200': "List[GetSendersResponseInner]",
777
+ '400': None,
778
+ '401': None,
779
+ '500': None,
780
+ }
781
+ response_data = await self.api_client.call_api(
782
+ *_param,
783
+ _request_timeout=_request_timeout
784
+ )
785
+ return response_data.response
786
+
787
+
788
+ def _domains_list_domains_serialize(
789
+ self,
790
+ _request_auth,
791
+ _content_type,
792
+ _headers,
793
+ _host_index,
794
+ ) -> RequestSerialized:
795
+
796
+ _host = None
797
+
798
+ _collection_formats: Dict[str, str] = {
799
+ }
800
+
801
+ _path_params: Dict[str, str] = {}
802
+ _query_params: List[Tuple[str, str]] = []
803
+ _header_params: Dict[str, Optional[str]] = _headers or {}
804
+ _form_params: List[Tuple[str, str]] = []
805
+ _files: Dict[
806
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
807
+ ] = {}
808
+ _body_params: Optional[bytes] = None
809
+
810
+ # process the path parameters
811
+ # process the query parameters
812
+ # process the header parameters
813
+ # process the form parameters
814
+ # process the body parameter
815
+
816
+
817
+ # set the HTTP header `Accept`
818
+ if 'Accept' not in _header_params:
819
+ _header_params['Accept'] = self.api_client.select_header_accept(
820
+ [
821
+ 'application/json'
822
+ ]
823
+ )
824
+
825
+
826
+ # authentication setting
827
+ _auth_settings: List[str] = [
828
+ 'endUserHashed',
829
+ 'endUser',
830
+ 'apiKey',
831
+ 'clientCredentials'
832
+ ]
833
+
834
+ return self.api_client.param_serialize(
835
+ method='GET',
836
+ resource_path='/domains',
837
+ path_params=_path_params,
838
+ query_params=_query_params,
839
+ header_params=_header_params,
840
+ body=_body_params,
841
+ post_params=_form_params,
842
+ files=_files,
843
+ auth_settings=_auth_settings,
844
+ collection_formats=_collection_formats,
845
+ _host=_host,
846
+ _request_auth=_request_auth
847
+ )
848
+
849
+