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,878 @@
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.environment import Environment
23
+ from pingram.models.environment_create_request import EnvironmentCreateRequest
24
+ from pingram.models.environment_patch_request import EnvironmentPatchRequest
25
+ from pingram.models.get_environments_response_inner import GetEnvironmentsResponseInner
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 EnvironmentsApi:
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 environments_create_environment(
47
+ self,
48
+ environment_create_request: EnvironmentCreateRequest,
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
+ ) -> Environment:
62
+ """Create a new environment for the account
63
+
64
+
65
+ :param environment_create_request: (required)
66
+ :type environment_create_request: EnvironmentCreateRequest
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._environments_create_environment_serialize(
90
+ environment_create_request=environment_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': "Environment",
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 environments_create_environment_with_http_info(
116
+ self,
117
+ environment_create_request: EnvironmentCreateRequest,
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[Environment]:
131
+ """Create a new environment for the account
132
+
133
+
134
+ :param environment_create_request: (required)
135
+ :type environment_create_request: EnvironmentCreateRequest
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._environments_create_environment_serialize(
159
+ environment_create_request=environment_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': "Environment",
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 environments_create_environment_without_preload_content(
185
+ self,
186
+ environment_create_request: EnvironmentCreateRequest,
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 environment for the account
201
+
202
+
203
+ :param environment_create_request: (required)
204
+ :type environment_create_request: EnvironmentCreateRequest
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._environments_create_environment_serialize(
228
+ environment_create_request=environment_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': "Environment",
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 _environments_create_environment_serialize(
249
+ self,
250
+ environment_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 environment_create_request is not None:
277
+ _body_params = environment_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='/environments',
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 environments_list_environments(
330
+ self,
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
+ ) -> List[GetEnvironmentsResponseInner]:
344
+ """Get all environments for the authenticated account
345
+
346
+
347
+ :param _request_timeout: timeout setting for this request. If one
348
+ number provided, it will be total request
349
+ timeout. It can also be a pair (tuple) of
350
+ (connection, read) timeouts.
351
+ :type _request_timeout: int, tuple(int, int), optional
352
+ :param _request_auth: set to override the auth_settings for an a single
353
+ request; this effectively ignores the
354
+ authentication in the spec for a single request.
355
+ :type _request_auth: dict, optional
356
+ :param _content_type: force content-type for the request.
357
+ :type _content_type: str, Optional
358
+ :param _headers: set to override the headers for a single
359
+ request; this effectively ignores the headers
360
+ in the spec for a single request.
361
+ :type _headers: dict, optional
362
+ :param _host_index: set to override the host_index for a single
363
+ request; this effectively ignores the host_index
364
+ in the spec for a single request.
365
+ :type _host_index: int, optional
366
+ :return: Returns the result object.
367
+ """ # noqa: E501
368
+
369
+ _param = self._environments_list_environments_serialize(
370
+ _request_auth=_request_auth,
371
+ _content_type=_content_type,
372
+ _headers=_headers,
373
+ _host_index=_host_index
374
+ )
375
+
376
+ _response_types_map: Dict[str, Optional[str]] = {
377
+ '200': "List[GetEnvironmentsResponseInner]",
378
+ '400': None,
379
+ '401': None,
380
+ '500': None,
381
+ }
382
+ response_data = await self.api_client.call_api(
383
+ *_param,
384
+ _request_timeout=_request_timeout
385
+ )
386
+ await response_data.read()
387
+ return self.api_client.response_deserialize(
388
+ response_data=response_data,
389
+ response_types_map=_response_types_map,
390
+ ).data
391
+
392
+
393
+ @validate_call
394
+ async def environments_list_environments_with_http_info(
395
+ self,
396
+ _request_timeout: Union[
397
+ None,
398
+ Annotated[StrictFloat, Field(gt=0)],
399
+ Tuple[
400
+ Annotated[StrictFloat, Field(gt=0)],
401
+ Annotated[StrictFloat, Field(gt=0)]
402
+ ]
403
+ ] = None,
404
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
405
+ _content_type: Optional[StrictStr] = None,
406
+ _headers: Optional[Dict[StrictStr, Any]] = None,
407
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
408
+ ) -> ApiResponse[List[GetEnvironmentsResponseInner]]:
409
+ """Get all environments for the authenticated account
410
+
411
+
412
+ :param _request_timeout: timeout setting for this request. If one
413
+ number provided, it will be total request
414
+ timeout. It can also be a pair (tuple) of
415
+ (connection, read) timeouts.
416
+ :type _request_timeout: int, tuple(int, int), optional
417
+ :param _request_auth: set to override the auth_settings for an a single
418
+ request; this effectively ignores the
419
+ authentication in the spec for a single request.
420
+ :type _request_auth: dict, optional
421
+ :param _content_type: force content-type for the request.
422
+ :type _content_type: str, Optional
423
+ :param _headers: set to override the headers for a single
424
+ request; this effectively ignores the headers
425
+ in the spec for a single request.
426
+ :type _headers: dict, optional
427
+ :param _host_index: set to override the host_index for a single
428
+ request; this effectively ignores the host_index
429
+ in the spec for a single request.
430
+ :type _host_index: int, optional
431
+ :return: Returns the result object.
432
+ """ # noqa: E501
433
+
434
+ _param = self._environments_list_environments_serialize(
435
+ _request_auth=_request_auth,
436
+ _content_type=_content_type,
437
+ _headers=_headers,
438
+ _host_index=_host_index
439
+ )
440
+
441
+ _response_types_map: Dict[str, Optional[str]] = {
442
+ '200': "List[GetEnvironmentsResponseInner]",
443
+ '400': None,
444
+ '401': None,
445
+ '500': None,
446
+ }
447
+ response_data = await self.api_client.call_api(
448
+ *_param,
449
+ _request_timeout=_request_timeout
450
+ )
451
+ await response_data.read()
452
+ return self.api_client.response_deserialize(
453
+ response_data=response_data,
454
+ response_types_map=_response_types_map,
455
+ )
456
+
457
+
458
+ @validate_call
459
+ async def environments_list_environments_without_preload_content(
460
+ self,
461
+ _request_timeout: Union[
462
+ None,
463
+ Annotated[StrictFloat, Field(gt=0)],
464
+ Tuple[
465
+ Annotated[StrictFloat, Field(gt=0)],
466
+ Annotated[StrictFloat, Field(gt=0)]
467
+ ]
468
+ ] = None,
469
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
470
+ _content_type: Optional[StrictStr] = None,
471
+ _headers: Optional[Dict[StrictStr, Any]] = None,
472
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
473
+ ) -> RESTResponseType:
474
+ """Get all environments for the authenticated account
475
+
476
+
477
+ :param _request_timeout: timeout setting for this request. If one
478
+ number provided, it will be total request
479
+ timeout. It can also be a pair (tuple) of
480
+ (connection, read) timeouts.
481
+ :type _request_timeout: int, tuple(int, int), optional
482
+ :param _request_auth: set to override the auth_settings for an a single
483
+ request; this effectively ignores the
484
+ authentication in the spec for a single request.
485
+ :type _request_auth: dict, optional
486
+ :param _content_type: force content-type for the request.
487
+ :type _content_type: str, Optional
488
+ :param _headers: set to override the headers for a single
489
+ request; this effectively ignores the headers
490
+ in the spec for a single request.
491
+ :type _headers: dict, optional
492
+ :param _host_index: set to override the host_index for a single
493
+ request; this effectively ignores the host_index
494
+ in the spec for a single request.
495
+ :type _host_index: int, optional
496
+ :return: Returns the result object.
497
+ """ # noqa: E501
498
+
499
+ _param = self._environments_list_environments_serialize(
500
+ _request_auth=_request_auth,
501
+ _content_type=_content_type,
502
+ _headers=_headers,
503
+ _host_index=_host_index
504
+ )
505
+
506
+ _response_types_map: Dict[str, Optional[str]] = {
507
+ '200': "List[GetEnvironmentsResponseInner]",
508
+ '400': None,
509
+ '401': None,
510
+ '500': None,
511
+ }
512
+ response_data = await self.api_client.call_api(
513
+ *_param,
514
+ _request_timeout=_request_timeout
515
+ )
516
+ return response_data.response
517
+
518
+
519
+ def _environments_list_environments_serialize(
520
+ self,
521
+ _request_auth,
522
+ _content_type,
523
+ _headers,
524
+ _host_index,
525
+ ) -> RequestSerialized:
526
+
527
+ _host = None
528
+
529
+ _collection_formats: Dict[str, str] = {
530
+ }
531
+
532
+ _path_params: Dict[str, str] = {}
533
+ _query_params: List[Tuple[str, str]] = []
534
+ _header_params: Dict[str, Optional[str]] = _headers or {}
535
+ _form_params: List[Tuple[str, str]] = []
536
+ _files: Dict[
537
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
538
+ ] = {}
539
+ _body_params: Optional[bytes] = None
540
+
541
+ # process the path parameters
542
+ # process the query parameters
543
+ # process the header parameters
544
+ # process the form parameters
545
+ # process the body parameter
546
+
547
+
548
+ # set the HTTP header `Accept`
549
+ if 'Accept' not in _header_params:
550
+ _header_params['Accept'] = self.api_client.select_header_accept(
551
+ [
552
+ 'application/json'
553
+ ]
554
+ )
555
+
556
+
557
+ # authentication setting
558
+ _auth_settings: List[str] = [
559
+ 'endUserHashed',
560
+ 'endUser',
561
+ 'apiKey',
562
+ 'clientCredentials'
563
+ ]
564
+
565
+ return self.api_client.param_serialize(
566
+ method='GET',
567
+ resource_path='/environments',
568
+ path_params=_path_params,
569
+ query_params=_query_params,
570
+ header_params=_header_params,
571
+ body=_body_params,
572
+ post_params=_form_params,
573
+ files=_files,
574
+ auth_settings=_auth_settings,
575
+ collection_formats=_collection_formats,
576
+ _host=_host,
577
+ _request_auth=_request_auth
578
+ )
579
+
580
+
581
+
582
+
583
+ @validate_call
584
+ async def environments_update_environment(
585
+ self,
586
+ client_id: Annotated[StrictStr, Field(description="Environment client ID")],
587
+ environment_patch_request: EnvironmentPatchRequest,
588
+ _request_timeout: Union[
589
+ None,
590
+ Annotated[StrictFloat, Field(gt=0)],
591
+ Tuple[
592
+ Annotated[StrictFloat, Field(gt=0)],
593
+ Annotated[StrictFloat, Field(gt=0)]
594
+ ]
595
+ ] = None,
596
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
597
+ _content_type: Optional[StrictStr] = None,
598
+ _headers: Optional[Dict[StrictStr, Any]] = None,
599
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
600
+ ) -> Environment:
601
+ """Update environment settings (title, secret, disable sending, secure mode)
602
+
603
+
604
+ :param client_id: Environment client ID (required)
605
+ :type client_id: str
606
+ :param environment_patch_request: (required)
607
+ :type environment_patch_request: EnvironmentPatchRequest
608
+ :param _request_timeout: timeout setting for this request. If one
609
+ number provided, it will be total request
610
+ timeout. It can also be a pair (tuple) of
611
+ (connection, read) timeouts.
612
+ :type _request_timeout: int, tuple(int, int), optional
613
+ :param _request_auth: set to override the auth_settings for an a single
614
+ request; this effectively ignores the
615
+ authentication in the spec for a single request.
616
+ :type _request_auth: dict, optional
617
+ :param _content_type: force content-type for the request.
618
+ :type _content_type: str, Optional
619
+ :param _headers: set to override the headers for a single
620
+ request; this effectively ignores the headers
621
+ in the spec for a single request.
622
+ :type _headers: dict, optional
623
+ :param _host_index: set to override the host_index for a single
624
+ request; this effectively ignores the host_index
625
+ in the spec for a single request.
626
+ :type _host_index: int, optional
627
+ :return: Returns the result object.
628
+ """ # noqa: E501
629
+
630
+ _param = self._environments_update_environment_serialize(
631
+ client_id=client_id,
632
+ environment_patch_request=environment_patch_request,
633
+ _request_auth=_request_auth,
634
+ _content_type=_content_type,
635
+ _headers=_headers,
636
+ _host_index=_host_index
637
+ )
638
+
639
+ _response_types_map: Dict[str, Optional[str]] = {
640
+ '200': "Environment",
641
+ '400': None,
642
+ '401': None,
643
+ '500': None,
644
+ }
645
+ response_data = await self.api_client.call_api(
646
+ *_param,
647
+ _request_timeout=_request_timeout
648
+ )
649
+ await response_data.read()
650
+ return self.api_client.response_deserialize(
651
+ response_data=response_data,
652
+ response_types_map=_response_types_map,
653
+ ).data
654
+
655
+
656
+ @validate_call
657
+ async def environments_update_environment_with_http_info(
658
+ self,
659
+ client_id: Annotated[StrictStr, Field(description="Environment client ID")],
660
+ environment_patch_request: EnvironmentPatchRequest,
661
+ _request_timeout: Union[
662
+ None,
663
+ Annotated[StrictFloat, Field(gt=0)],
664
+ Tuple[
665
+ Annotated[StrictFloat, Field(gt=0)],
666
+ Annotated[StrictFloat, Field(gt=0)]
667
+ ]
668
+ ] = None,
669
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
670
+ _content_type: Optional[StrictStr] = None,
671
+ _headers: Optional[Dict[StrictStr, Any]] = None,
672
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
673
+ ) -> ApiResponse[Environment]:
674
+ """Update environment settings (title, secret, disable sending, secure mode)
675
+
676
+
677
+ :param client_id: Environment client ID (required)
678
+ :type client_id: str
679
+ :param environment_patch_request: (required)
680
+ :type environment_patch_request: EnvironmentPatchRequest
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._environments_update_environment_serialize(
704
+ client_id=client_id,
705
+ environment_patch_request=environment_patch_request,
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': "Environment",
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 environments_update_environment_without_preload_content(
731
+ self,
732
+ client_id: Annotated[StrictStr, Field(description="Environment client ID")],
733
+ environment_patch_request: EnvironmentPatchRequest,
734
+ _request_timeout: Union[
735
+ None,
736
+ Annotated[StrictFloat, Field(gt=0)],
737
+ Tuple[
738
+ Annotated[StrictFloat, Field(gt=0)],
739
+ Annotated[StrictFloat, Field(gt=0)]
740
+ ]
741
+ ] = None,
742
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
743
+ _content_type: Optional[StrictStr] = None,
744
+ _headers: Optional[Dict[StrictStr, Any]] = None,
745
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
746
+ ) -> RESTResponseType:
747
+ """Update environment settings (title, secret, disable sending, secure mode)
748
+
749
+
750
+ :param client_id: Environment client ID (required)
751
+ :type client_id: str
752
+ :param environment_patch_request: (required)
753
+ :type environment_patch_request: EnvironmentPatchRequest
754
+ :param _request_timeout: timeout setting for this request. If one
755
+ number provided, it will be total request
756
+ timeout. It can also be a pair (tuple) of
757
+ (connection, read) timeouts.
758
+ :type _request_timeout: int, tuple(int, int), optional
759
+ :param _request_auth: set to override the auth_settings for an a single
760
+ request; this effectively ignores the
761
+ authentication in the spec for a single request.
762
+ :type _request_auth: dict, optional
763
+ :param _content_type: force content-type for the request.
764
+ :type _content_type: str, Optional
765
+ :param _headers: set to override the headers for a single
766
+ request; this effectively ignores the headers
767
+ in the spec for a single request.
768
+ :type _headers: dict, optional
769
+ :param _host_index: set to override the host_index for a single
770
+ request; this effectively ignores the host_index
771
+ in the spec for a single request.
772
+ :type _host_index: int, optional
773
+ :return: Returns the result object.
774
+ """ # noqa: E501
775
+
776
+ _param = self._environments_update_environment_serialize(
777
+ client_id=client_id,
778
+ environment_patch_request=environment_patch_request,
779
+ _request_auth=_request_auth,
780
+ _content_type=_content_type,
781
+ _headers=_headers,
782
+ _host_index=_host_index
783
+ )
784
+
785
+ _response_types_map: Dict[str, Optional[str]] = {
786
+ '200': "Environment",
787
+ '400': None,
788
+ '401': None,
789
+ '500': None,
790
+ }
791
+ response_data = await self.api_client.call_api(
792
+ *_param,
793
+ _request_timeout=_request_timeout
794
+ )
795
+ return response_data.response
796
+
797
+
798
+ def _environments_update_environment_serialize(
799
+ self,
800
+ client_id,
801
+ environment_patch_request,
802
+ _request_auth,
803
+ _content_type,
804
+ _headers,
805
+ _host_index,
806
+ ) -> RequestSerialized:
807
+
808
+ _host = None
809
+
810
+ _collection_formats: Dict[str, str] = {
811
+ }
812
+
813
+ _path_params: Dict[str, str] = {}
814
+ _query_params: List[Tuple[str, str]] = []
815
+ _header_params: Dict[str, Optional[str]] = _headers or {}
816
+ _form_params: List[Tuple[str, str]] = []
817
+ _files: Dict[
818
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
819
+ ] = {}
820
+ _body_params: Optional[bytes] = None
821
+
822
+ # process the path parameters
823
+ if client_id is not None:
824
+ _path_params['clientId'] = client_id
825
+ # process the query parameters
826
+ # process the header parameters
827
+ # process the form parameters
828
+ # process the body parameter
829
+ if environment_patch_request is not None:
830
+ _body_params = environment_patch_request
831
+
832
+
833
+ # set the HTTP header `Accept`
834
+ if 'Accept' not in _header_params:
835
+ _header_params['Accept'] = self.api_client.select_header_accept(
836
+ [
837
+ 'application/json'
838
+ ]
839
+ )
840
+
841
+ # set the HTTP header `Content-Type`
842
+ if _content_type:
843
+ _header_params['Content-Type'] = _content_type
844
+ else:
845
+ _default_content_type = (
846
+ self.api_client.select_header_content_type(
847
+ [
848
+ 'application/json'
849
+ ]
850
+ )
851
+ )
852
+ if _default_content_type is not None:
853
+ _header_params['Content-Type'] = _default_content_type
854
+
855
+ # authentication setting
856
+ _auth_settings: List[str] = [
857
+ 'endUserHashed',
858
+ 'endUser',
859
+ 'apiKey',
860
+ 'clientCredentials'
861
+ ]
862
+
863
+ return self.api_client.param_serialize(
864
+ method='PATCH',
865
+ resource_path='/environments/{clientId}',
866
+ path_params=_path_params,
867
+ query_params=_query_params,
868
+ header_params=_header_params,
869
+ body=_body_params,
870
+ post_params=_form_params,
871
+ files=_files,
872
+ auth_settings=_auth_settings,
873
+ collection_formats=_collection_formats,
874
+ _host=_host,
875
+ _request_auth=_request_auth
876
+ )
877
+
878
+