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,1681 @@
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 Any, List
21
+ from typing_extensions import Annotated
22
+ from pingram.models.email_component_patch_request import EmailComponentPatchRequest
23
+ from pingram.models.email_component_post_request import EmailComponentPostRequest
24
+ from pingram.models.email_component_response import EmailComponentResponse
25
+ from pingram.models.get_email_components_response_inner import GetEmailComponentsResponseInner
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 ComponentsApi:
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 components_create_component(
47
+ self,
48
+ email_component_post_request: EmailComponentPostRequest,
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
+ ) -> EmailComponentResponse:
62
+ """Create a new component
63
+
64
+
65
+ :param email_component_post_request: (required)
66
+ :type email_component_post_request: EmailComponentPostRequest
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._components_create_component_serialize(
90
+ email_component_post_request=email_component_post_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': "EmailComponentResponse",
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 components_create_component_with_http_info(
116
+ self,
117
+ email_component_post_request: EmailComponentPostRequest,
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[EmailComponentResponse]:
131
+ """Create a new component
132
+
133
+
134
+ :param email_component_post_request: (required)
135
+ :type email_component_post_request: EmailComponentPostRequest
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._components_create_component_serialize(
159
+ email_component_post_request=email_component_post_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': "EmailComponentResponse",
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 components_create_component_without_preload_content(
185
+ self,
186
+ email_component_post_request: EmailComponentPostRequest,
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 component
201
+
202
+
203
+ :param email_component_post_request: (required)
204
+ :type email_component_post_request: EmailComponentPostRequest
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._components_create_component_serialize(
228
+ email_component_post_request=email_component_post_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': "EmailComponentResponse",
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 _components_create_component_serialize(
249
+ self,
250
+ email_component_post_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 email_component_post_request is not None:
277
+ _body_params = email_component_post_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='/components',
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 components_delete_component(
330
+ self,
331
+ component_id: StrictStr,
332
+ _request_timeout: Union[
333
+ None,
334
+ Annotated[StrictFloat, Field(gt=0)],
335
+ Tuple[
336
+ Annotated[StrictFloat, Field(gt=0)],
337
+ Annotated[StrictFloat, Field(gt=0)]
338
+ ]
339
+ ] = None,
340
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
341
+ _content_type: Optional[StrictStr] = None,
342
+ _headers: Optional[Dict[StrictStr, Any]] = None,
343
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
344
+ ) -> None:
345
+ """Delete a component
346
+
347
+
348
+ :param component_id: (required)
349
+ :type component_id: str
350
+ :param _request_timeout: timeout setting for this request. If one
351
+ number provided, it will be total request
352
+ timeout. It can also be a pair (tuple) of
353
+ (connection, read) timeouts.
354
+ :type _request_timeout: int, tuple(int, int), optional
355
+ :param _request_auth: set to override the auth_settings for an a single
356
+ request; this effectively ignores the
357
+ authentication in the spec for a single request.
358
+ :type _request_auth: dict, optional
359
+ :param _content_type: force content-type for the request.
360
+ :type _content_type: str, Optional
361
+ :param _headers: set to override the headers for a single
362
+ request; this effectively ignores the headers
363
+ in the spec for a single request.
364
+ :type _headers: dict, optional
365
+ :param _host_index: set to override the host_index for a single
366
+ request; this effectively ignores the host_index
367
+ in the spec for a single request.
368
+ :type _host_index: int, optional
369
+ :return: Returns the result object.
370
+ """ # noqa: E501
371
+
372
+ _param = self._components_delete_component_serialize(
373
+ component_id=component_id,
374
+ _request_auth=_request_auth,
375
+ _content_type=_content_type,
376
+ _headers=_headers,
377
+ _host_index=_host_index
378
+ )
379
+
380
+ _response_types_map: Dict[str, Optional[str]] = {
381
+ '204': None,
382
+ '400': None,
383
+ '401': None,
384
+ '500': None,
385
+ }
386
+ response_data = await self.api_client.call_api(
387
+ *_param,
388
+ _request_timeout=_request_timeout
389
+ )
390
+ await response_data.read()
391
+ return self.api_client.response_deserialize(
392
+ response_data=response_data,
393
+ response_types_map=_response_types_map,
394
+ ).data
395
+
396
+
397
+ @validate_call
398
+ async def components_delete_component_with_http_info(
399
+ self,
400
+ component_id: StrictStr,
401
+ _request_timeout: Union[
402
+ None,
403
+ Annotated[StrictFloat, Field(gt=0)],
404
+ Tuple[
405
+ Annotated[StrictFloat, Field(gt=0)],
406
+ Annotated[StrictFloat, Field(gt=0)]
407
+ ]
408
+ ] = None,
409
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
410
+ _content_type: Optional[StrictStr] = None,
411
+ _headers: Optional[Dict[StrictStr, Any]] = None,
412
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
413
+ ) -> ApiResponse[None]:
414
+ """Delete a component
415
+
416
+
417
+ :param component_id: (required)
418
+ :type component_id: str
419
+ :param _request_timeout: timeout setting for this request. If one
420
+ number provided, it will be total request
421
+ timeout. It can also be a pair (tuple) of
422
+ (connection, read) timeouts.
423
+ :type _request_timeout: int, tuple(int, int), optional
424
+ :param _request_auth: set to override the auth_settings for an a single
425
+ request; this effectively ignores the
426
+ authentication in the spec for a single request.
427
+ :type _request_auth: dict, optional
428
+ :param _content_type: force content-type for the request.
429
+ :type _content_type: str, Optional
430
+ :param _headers: set to override the headers for a single
431
+ request; this effectively ignores the headers
432
+ in the spec for a single request.
433
+ :type _headers: dict, optional
434
+ :param _host_index: set to override the host_index for a single
435
+ request; this effectively ignores the host_index
436
+ in the spec for a single request.
437
+ :type _host_index: int, optional
438
+ :return: Returns the result object.
439
+ """ # noqa: E501
440
+
441
+ _param = self._components_delete_component_serialize(
442
+ component_id=component_id,
443
+ _request_auth=_request_auth,
444
+ _content_type=_content_type,
445
+ _headers=_headers,
446
+ _host_index=_host_index
447
+ )
448
+
449
+ _response_types_map: Dict[str, Optional[str]] = {
450
+ '204': None,
451
+ '400': None,
452
+ '401': None,
453
+ '500': None,
454
+ }
455
+ response_data = await self.api_client.call_api(
456
+ *_param,
457
+ _request_timeout=_request_timeout
458
+ )
459
+ await response_data.read()
460
+ return self.api_client.response_deserialize(
461
+ response_data=response_data,
462
+ response_types_map=_response_types_map,
463
+ )
464
+
465
+
466
+ @validate_call
467
+ async def components_delete_component_without_preload_content(
468
+ self,
469
+ component_id: StrictStr,
470
+ _request_timeout: Union[
471
+ None,
472
+ Annotated[StrictFloat, Field(gt=0)],
473
+ Tuple[
474
+ Annotated[StrictFloat, Field(gt=0)],
475
+ Annotated[StrictFloat, Field(gt=0)]
476
+ ]
477
+ ] = None,
478
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
479
+ _content_type: Optional[StrictStr] = None,
480
+ _headers: Optional[Dict[StrictStr, Any]] = None,
481
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
482
+ ) -> RESTResponseType:
483
+ """Delete a component
484
+
485
+
486
+ :param component_id: (required)
487
+ :type component_id: str
488
+ :param _request_timeout: timeout setting for this request. If one
489
+ number provided, it will be total request
490
+ timeout. It can also be a pair (tuple) of
491
+ (connection, read) timeouts.
492
+ :type _request_timeout: int, tuple(int, int), optional
493
+ :param _request_auth: set to override the auth_settings for an a single
494
+ request; this effectively ignores the
495
+ authentication in the spec for a single request.
496
+ :type _request_auth: dict, optional
497
+ :param _content_type: force content-type for the request.
498
+ :type _content_type: str, Optional
499
+ :param _headers: set to override the headers for a single
500
+ request; this effectively ignores the headers
501
+ in the spec for a single request.
502
+ :type _headers: dict, optional
503
+ :param _host_index: set to override the host_index for a single
504
+ request; this effectively ignores the host_index
505
+ in the spec for a single request.
506
+ :type _host_index: int, optional
507
+ :return: Returns the result object.
508
+ """ # noqa: E501
509
+
510
+ _param = self._components_delete_component_serialize(
511
+ component_id=component_id,
512
+ _request_auth=_request_auth,
513
+ _content_type=_content_type,
514
+ _headers=_headers,
515
+ _host_index=_host_index
516
+ )
517
+
518
+ _response_types_map: Dict[str, Optional[str]] = {
519
+ '204': None,
520
+ '400': None,
521
+ '401': None,
522
+ '500': None,
523
+ }
524
+ response_data = await self.api_client.call_api(
525
+ *_param,
526
+ _request_timeout=_request_timeout
527
+ )
528
+ return response_data.response
529
+
530
+
531
+ def _components_delete_component_serialize(
532
+ self,
533
+ component_id,
534
+ _request_auth,
535
+ _content_type,
536
+ _headers,
537
+ _host_index,
538
+ ) -> RequestSerialized:
539
+
540
+ _host = None
541
+
542
+ _collection_formats: Dict[str, str] = {
543
+ }
544
+
545
+ _path_params: Dict[str, str] = {}
546
+ _query_params: List[Tuple[str, str]] = []
547
+ _header_params: Dict[str, Optional[str]] = _headers or {}
548
+ _form_params: List[Tuple[str, str]] = []
549
+ _files: Dict[
550
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
551
+ ] = {}
552
+ _body_params: Optional[bytes] = None
553
+
554
+ # process the path parameters
555
+ if component_id is not None:
556
+ _path_params['componentId'] = component_id
557
+ # process the query parameters
558
+ # process the header parameters
559
+ # process the form parameters
560
+ # process the body parameter
561
+
562
+
563
+
564
+
565
+ # authentication setting
566
+ _auth_settings: List[str] = [
567
+ 'endUserHashed',
568
+ 'endUser',
569
+ 'apiKey',
570
+ 'clientCredentials'
571
+ ]
572
+
573
+ return self.api_client.param_serialize(
574
+ method='DELETE',
575
+ resource_path='/components/{componentId}',
576
+ path_params=_path_params,
577
+ query_params=_query_params,
578
+ header_params=_header_params,
579
+ body=_body_params,
580
+ post_params=_form_params,
581
+ files=_files,
582
+ auth_settings=_auth_settings,
583
+ collection_formats=_collection_formats,
584
+ _host=_host,
585
+ _request_auth=_request_auth
586
+ )
587
+
588
+
589
+
590
+
591
+ @validate_call
592
+ async def components_get_component(
593
+ self,
594
+ component_id: Annotated[StrictStr, Field(description="Component ID")],
595
+ _request_timeout: Union[
596
+ None,
597
+ Annotated[StrictFloat, Field(gt=0)],
598
+ Tuple[
599
+ Annotated[StrictFloat, Field(gt=0)],
600
+ Annotated[StrictFloat, Field(gt=0)]
601
+ ]
602
+ ] = None,
603
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
604
+ _content_type: Optional[StrictStr] = None,
605
+ _headers: Optional[Dict[StrictStr, Any]] = None,
606
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
607
+ ) -> EmailComponentResponse:
608
+ """Get a specific component by ID
609
+
610
+
611
+ :param component_id: Component ID (required)
612
+ :type component_id: str
613
+ :param _request_timeout: timeout setting for this request. If one
614
+ number provided, it will be total request
615
+ timeout. It can also be a pair (tuple) of
616
+ (connection, read) timeouts.
617
+ :type _request_timeout: int, tuple(int, int), optional
618
+ :param _request_auth: set to override the auth_settings for an a single
619
+ request; this effectively ignores the
620
+ authentication in the spec for a single request.
621
+ :type _request_auth: dict, optional
622
+ :param _content_type: force content-type for the request.
623
+ :type _content_type: str, Optional
624
+ :param _headers: set to override the headers for a single
625
+ request; this effectively ignores the headers
626
+ in the spec for a single request.
627
+ :type _headers: dict, optional
628
+ :param _host_index: set to override the host_index for a single
629
+ request; this effectively ignores the host_index
630
+ in the spec for a single request.
631
+ :type _host_index: int, optional
632
+ :return: Returns the result object.
633
+ """ # noqa: E501
634
+
635
+ _param = self._components_get_component_serialize(
636
+ component_id=component_id,
637
+ _request_auth=_request_auth,
638
+ _content_type=_content_type,
639
+ _headers=_headers,
640
+ _host_index=_host_index
641
+ )
642
+
643
+ _response_types_map: Dict[str, Optional[str]] = {
644
+ '200': "EmailComponentResponse",
645
+ '400': None,
646
+ '401': None,
647
+ '500': None,
648
+ }
649
+ response_data = await self.api_client.call_api(
650
+ *_param,
651
+ _request_timeout=_request_timeout
652
+ )
653
+ await response_data.read()
654
+ return self.api_client.response_deserialize(
655
+ response_data=response_data,
656
+ response_types_map=_response_types_map,
657
+ ).data
658
+
659
+
660
+ @validate_call
661
+ async def components_get_component_with_http_info(
662
+ self,
663
+ component_id: Annotated[StrictStr, Field(description="Component ID")],
664
+ _request_timeout: Union[
665
+ None,
666
+ Annotated[StrictFloat, Field(gt=0)],
667
+ Tuple[
668
+ Annotated[StrictFloat, Field(gt=0)],
669
+ Annotated[StrictFloat, Field(gt=0)]
670
+ ]
671
+ ] = None,
672
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
673
+ _content_type: Optional[StrictStr] = None,
674
+ _headers: Optional[Dict[StrictStr, Any]] = None,
675
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
676
+ ) -> ApiResponse[EmailComponentResponse]:
677
+ """Get a specific component by ID
678
+
679
+
680
+ :param component_id: Component ID (required)
681
+ :type component_id: str
682
+ :param _request_timeout: timeout setting for this request. If one
683
+ number provided, it will be total request
684
+ timeout. It can also be a pair (tuple) of
685
+ (connection, read) timeouts.
686
+ :type _request_timeout: int, tuple(int, int), optional
687
+ :param _request_auth: set to override the auth_settings for an a single
688
+ request; this effectively ignores the
689
+ authentication in the spec for a single request.
690
+ :type _request_auth: dict, optional
691
+ :param _content_type: force content-type for the request.
692
+ :type _content_type: str, Optional
693
+ :param _headers: set to override the headers for a single
694
+ request; this effectively ignores the headers
695
+ in the spec for a single request.
696
+ :type _headers: dict, optional
697
+ :param _host_index: set to override the host_index for a single
698
+ request; this effectively ignores the host_index
699
+ in the spec for a single request.
700
+ :type _host_index: int, optional
701
+ :return: Returns the result object.
702
+ """ # noqa: E501
703
+
704
+ _param = self._components_get_component_serialize(
705
+ component_id=component_id,
706
+ _request_auth=_request_auth,
707
+ _content_type=_content_type,
708
+ _headers=_headers,
709
+ _host_index=_host_index
710
+ )
711
+
712
+ _response_types_map: Dict[str, Optional[str]] = {
713
+ '200': "EmailComponentResponse",
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 components_get_component_without_preload_content(
731
+ self,
732
+ component_id: Annotated[StrictStr, Field(description="Component ID")],
733
+ _request_timeout: Union[
734
+ None,
735
+ Annotated[StrictFloat, Field(gt=0)],
736
+ Tuple[
737
+ Annotated[StrictFloat, Field(gt=0)],
738
+ Annotated[StrictFloat, Field(gt=0)]
739
+ ]
740
+ ] = None,
741
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
742
+ _content_type: Optional[StrictStr] = None,
743
+ _headers: Optional[Dict[StrictStr, Any]] = None,
744
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
745
+ ) -> RESTResponseType:
746
+ """Get a specific component by ID
747
+
748
+
749
+ :param component_id: Component ID (required)
750
+ :type component_id: str
751
+ :param _request_timeout: timeout setting for this request. If one
752
+ number provided, it will be total request
753
+ timeout. It can also be a pair (tuple) of
754
+ (connection, read) timeouts.
755
+ :type _request_timeout: int, tuple(int, int), optional
756
+ :param _request_auth: set to override the auth_settings for an a single
757
+ request; this effectively ignores the
758
+ authentication in the spec for a single request.
759
+ :type _request_auth: dict, optional
760
+ :param _content_type: force content-type for the request.
761
+ :type _content_type: str, Optional
762
+ :param _headers: set to override the headers for a single
763
+ request; this effectively ignores the headers
764
+ in the spec for a single request.
765
+ :type _headers: dict, optional
766
+ :param _host_index: set to override the host_index for a single
767
+ request; this effectively ignores the host_index
768
+ in the spec for a single request.
769
+ :type _host_index: int, optional
770
+ :return: Returns the result object.
771
+ """ # noqa: E501
772
+
773
+ _param = self._components_get_component_serialize(
774
+ component_id=component_id,
775
+ _request_auth=_request_auth,
776
+ _content_type=_content_type,
777
+ _headers=_headers,
778
+ _host_index=_host_index
779
+ )
780
+
781
+ _response_types_map: Dict[str, Optional[str]] = {
782
+ '200': "EmailComponentResponse",
783
+ '400': None,
784
+ '401': None,
785
+ '500': None,
786
+ }
787
+ response_data = await self.api_client.call_api(
788
+ *_param,
789
+ _request_timeout=_request_timeout
790
+ )
791
+ return response_data.response
792
+
793
+
794
+ def _components_get_component_serialize(
795
+ self,
796
+ component_id,
797
+ _request_auth,
798
+ _content_type,
799
+ _headers,
800
+ _host_index,
801
+ ) -> RequestSerialized:
802
+
803
+ _host = None
804
+
805
+ _collection_formats: Dict[str, str] = {
806
+ }
807
+
808
+ _path_params: Dict[str, str] = {}
809
+ _query_params: List[Tuple[str, str]] = []
810
+ _header_params: Dict[str, Optional[str]] = _headers or {}
811
+ _form_params: List[Tuple[str, str]] = []
812
+ _files: Dict[
813
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
814
+ ] = {}
815
+ _body_params: Optional[bytes] = None
816
+
817
+ # process the path parameters
818
+ if component_id is not None:
819
+ _path_params['componentId'] = component_id
820
+ # process the query parameters
821
+ # process the header parameters
822
+ # process the form parameters
823
+ # process the body parameter
824
+
825
+
826
+ # set the HTTP header `Accept`
827
+ if 'Accept' not in _header_params:
828
+ _header_params['Accept'] = self.api_client.select_header_accept(
829
+ [
830
+ 'application/json'
831
+ ]
832
+ )
833
+
834
+
835
+ # authentication setting
836
+ _auth_settings: List[str] = [
837
+ 'endUserHashed',
838
+ 'endUser',
839
+ 'apiKey',
840
+ 'clientCredentials'
841
+ ]
842
+
843
+ return self.api_client.param_serialize(
844
+ method='GET',
845
+ resource_path='/components/{componentId}',
846
+ path_params=_path_params,
847
+ query_params=_query_params,
848
+ header_params=_header_params,
849
+ body=_body_params,
850
+ post_params=_form_params,
851
+ files=_files,
852
+ auth_settings=_auth_settings,
853
+ collection_formats=_collection_formats,
854
+ _host=_host,
855
+ _request_auth=_request_auth
856
+ )
857
+
858
+
859
+
860
+
861
+ @validate_call
862
+ async def components_list_components(
863
+ self,
864
+ channel: Annotated[StrictStr, Field(description="Channel type (EMAIL, SMS, etc.)")],
865
+ _request_timeout: Union[
866
+ None,
867
+ Annotated[StrictFloat, Field(gt=0)],
868
+ Tuple[
869
+ Annotated[StrictFloat, Field(gt=0)],
870
+ Annotated[StrictFloat, Field(gt=0)]
871
+ ]
872
+ ] = None,
873
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
874
+ _content_type: Optional[StrictStr] = None,
875
+ _headers: Optional[Dict[StrictStr, Any]] = None,
876
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
877
+ ) -> List[GetEmailComponentsResponseInner]:
878
+ """List email components
879
+
880
+
881
+ :param channel: Channel type (EMAIL, SMS, etc.) (required)
882
+ :type channel: str
883
+ :param _request_timeout: timeout setting for this request. If one
884
+ number provided, it will be total request
885
+ timeout. It can also be a pair (tuple) of
886
+ (connection, read) timeouts.
887
+ :type _request_timeout: int, tuple(int, int), optional
888
+ :param _request_auth: set to override the auth_settings for an a single
889
+ request; this effectively ignores the
890
+ authentication in the spec for a single request.
891
+ :type _request_auth: dict, optional
892
+ :param _content_type: force content-type for the request.
893
+ :type _content_type: str, Optional
894
+ :param _headers: set to override the headers for a single
895
+ request; this effectively ignores the headers
896
+ in the spec for a single request.
897
+ :type _headers: dict, optional
898
+ :param _host_index: set to override the host_index for a single
899
+ request; this effectively ignores the host_index
900
+ in the spec for a single request.
901
+ :type _host_index: int, optional
902
+ :return: Returns the result object.
903
+ """ # noqa: E501
904
+
905
+ _param = self._components_list_components_serialize(
906
+ channel=channel,
907
+ _request_auth=_request_auth,
908
+ _content_type=_content_type,
909
+ _headers=_headers,
910
+ _host_index=_host_index
911
+ )
912
+
913
+ _response_types_map: Dict[str, Optional[str]] = {
914
+ '200': "List[GetEmailComponentsResponseInner]",
915
+ '400': None,
916
+ '401': None,
917
+ '500': None,
918
+ }
919
+ response_data = await self.api_client.call_api(
920
+ *_param,
921
+ _request_timeout=_request_timeout
922
+ )
923
+ await response_data.read()
924
+ return self.api_client.response_deserialize(
925
+ response_data=response_data,
926
+ response_types_map=_response_types_map,
927
+ ).data
928
+
929
+
930
+ @validate_call
931
+ async def components_list_components_with_http_info(
932
+ self,
933
+ channel: Annotated[StrictStr, Field(description="Channel type (EMAIL, SMS, etc.)")],
934
+ _request_timeout: Union[
935
+ None,
936
+ Annotated[StrictFloat, Field(gt=0)],
937
+ Tuple[
938
+ Annotated[StrictFloat, Field(gt=0)],
939
+ Annotated[StrictFloat, Field(gt=0)]
940
+ ]
941
+ ] = None,
942
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
943
+ _content_type: Optional[StrictStr] = None,
944
+ _headers: Optional[Dict[StrictStr, Any]] = None,
945
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
946
+ ) -> ApiResponse[List[GetEmailComponentsResponseInner]]:
947
+ """List email components
948
+
949
+
950
+ :param channel: Channel type (EMAIL, SMS, etc.) (required)
951
+ :type channel: str
952
+ :param _request_timeout: timeout setting for this request. If one
953
+ number provided, it will be total request
954
+ timeout. It can also be a pair (tuple) of
955
+ (connection, read) timeouts.
956
+ :type _request_timeout: int, tuple(int, int), optional
957
+ :param _request_auth: set to override the auth_settings for an a single
958
+ request; this effectively ignores the
959
+ authentication in the spec for a single request.
960
+ :type _request_auth: dict, optional
961
+ :param _content_type: force content-type for the request.
962
+ :type _content_type: str, Optional
963
+ :param _headers: set to override the headers for a single
964
+ request; this effectively ignores the headers
965
+ in the spec for a single request.
966
+ :type _headers: dict, optional
967
+ :param _host_index: set to override the host_index for a single
968
+ request; this effectively ignores the host_index
969
+ in the spec for a single request.
970
+ :type _host_index: int, optional
971
+ :return: Returns the result object.
972
+ """ # noqa: E501
973
+
974
+ _param = self._components_list_components_serialize(
975
+ channel=channel,
976
+ _request_auth=_request_auth,
977
+ _content_type=_content_type,
978
+ _headers=_headers,
979
+ _host_index=_host_index
980
+ )
981
+
982
+ _response_types_map: Dict[str, Optional[str]] = {
983
+ '200': "List[GetEmailComponentsResponseInner]",
984
+ '400': None,
985
+ '401': None,
986
+ '500': None,
987
+ }
988
+ response_data = await self.api_client.call_api(
989
+ *_param,
990
+ _request_timeout=_request_timeout
991
+ )
992
+ await response_data.read()
993
+ return self.api_client.response_deserialize(
994
+ response_data=response_data,
995
+ response_types_map=_response_types_map,
996
+ )
997
+
998
+
999
+ @validate_call
1000
+ async def components_list_components_without_preload_content(
1001
+ self,
1002
+ channel: Annotated[StrictStr, Field(description="Channel type (EMAIL, SMS, etc.)")],
1003
+ _request_timeout: Union[
1004
+ None,
1005
+ Annotated[StrictFloat, Field(gt=0)],
1006
+ Tuple[
1007
+ Annotated[StrictFloat, Field(gt=0)],
1008
+ Annotated[StrictFloat, Field(gt=0)]
1009
+ ]
1010
+ ] = None,
1011
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1012
+ _content_type: Optional[StrictStr] = None,
1013
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1014
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1015
+ ) -> RESTResponseType:
1016
+ """List email components
1017
+
1018
+
1019
+ :param channel: Channel type (EMAIL, SMS, etc.) (required)
1020
+ :type channel: str
1021
+ :param _request_timeout: timeout setting for this request. If one
1022
+ number provided, it will be total request
1023
+ timeout. It can also be a pair (tuple) of
1024
+ (connection, read) timeouts.
1025
+ :type _request_timeout: int, tuple(int, int), optional
1026
+ :param _request_auth: set to override the auth_settings for an a single
1027
+ request; this effectively ignores the
1028
+ authentication in the spec for a single request.
1029
+ :type _request_auth: dict, optional
1030
+ :param _content_type: force content-type for the request.
1031
+ :type _content_type: str, Optional
1032
+ :param _headers: set to override the headers for a single
1033
+ request; this effectively ignores the headers
1034
+ in the spec for a single request.
1035
+ :type _headers: dict, optional
1036
+ :param _host_index: set to override the host_index for a single
1037
+ request; this effectively ignores the host_index
1038
+ in the spec for a single request.
1039
+ :type _host_index: int, optional
1040
+ :return: Returns the result object.
1041
+ """ # noqa: E501
1042
+
1043
+ _param = self._components_list_components_serialize(
1044
+ channel=channel,
1045
+ _request_auth=_request_auth,
1046
+ _content_type=_content_type,
1047
+ _headers=_headers,
1048
+ _host_index=_host_index
1049
+ )
1050
+
1051
+ _response_types_map: Dict[str, Optional[str]] = {
1052
+ '200': "List[GetEmailComponentsResponseInner]",
1053
+ '400': None,
1054
+ '401': None,
1055
+ '500': None,
1056
+ }
1057
+ response_data = await self.api_client.call_api(
1058
+ *_param,
1059
+ _request_timeout=_request_timeout
1060
+ )
1061
+ return response_data.response
1062
+
1063
+
1064
+ def _components_list_components_serialize(
1065
+ self,
1066
+ channel,
1067
+ _request_auth,
1068
+ _content_type,
1069
+ _headers,
1070
+ _host_index,
1071
+ ) -> RequestSerialized:
1072
+
1073
+ _host = None
1074
+
1075
+ _collection_formats: Dict[str, str] = {
1076
+ }
1077
+
1078
+ _path_params: Dict[str, str] = {}
1079
+ _query_params: List[Tuple[str, str]] = []
1080
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1081
+ _form_params: List[Tuple[str, str]] = []
1082
+ _files: Dict[
1083
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1084
+ ] = {}
1085
+ _body_params: Optional[bytes] = None
1086
+
1087
+ # process the path parameters
1088
+ if channel is not None:
1089
+ _path_params['channel'] = channel
1090
+ # process the query parameters
1091
+ # process the header parameters
1092
+ # process the form parameters
1093
+ # process the body parameter
1094
+
1095
+
1096
+ # set the HTTP header `Accept`
1097
+ if 'Accept' not in _header_params:
1098
+ _header_params['Accept'] = self.api_client.select_header_accept(
1099
+ [
1100
+ 'application/json'
1101
+ ]
1102
+ )
1103
+
1104
+
1105
+ # authentication setting
1106
+ _auth_settings: List[str] = [
1107
+ 'endUserHashed',
1108
+ 'endUser',
1109
+ 'apiKey',
1110
+ 'clientCredentials'
1111
+ ]
1112
+
1113
+ return self.api_client.param_serialize(
1114
+ method='GET',
1115
+ resource_path='/components',
1116
+ path_params=_path_params,
1117
+ query_params=_query_params,
1118
+ header_params=_header_params,
1119
+ body=_body_params,
1120
+ post_params=_form_params,
1121
+ files=_files,
1122
+ auth_settings=_auth_settings,
1123
+ collection_formats=_collection_formats,
1124
+ _host=_host,
1125
+ _request_auth=_request_auth
1126
+ )
1127
+
1128
+
1129
+
1130
+
1131
+ @validate_call
1132
+ async def components_list_components_parsed(
1133
+ self,
1134
+ _request_timeout: Union[
1135
+ None,
1136
+ Annotated[StrictFloat, Field(gt=0)],
1137
+ Tuple[
1138
+ Annotated[StrictFloat, Field(gt=0)],
1139
+ Annotated[StrictFloat, Field(gt=0)]
1140
+ ]
1141
+ ] = None,
1142
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1143
+ _content_type: Optional[StrictStr] = None,
1144
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1145
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1146
+ ) -> List[object]:
1147
+ """List all account components with the internal JSON parsed
1148
+
1149
+
1150
+ :param _request_timeout: timeout setting for this request. If one
1151
+ number provided, it will be total request
1152
+ timeout. It can also be a pair (tuple) of
1153
+ (connection, read) timeouts.
1154
+ :type _request_timeout: int, tuple(int, int), optional
1155
+ :param _request_auth: set to override the auth_settings for an a single
1156
+ request; this effectively ignores the
1157
+ authentication in the spec for a single request.
1158
+ :type _request_auth: dict, optional
1159
+ :param _content_type: force content-type for the request.
1160
+ :type _content_type: str, Optional
1161
+ :param _headers: set to override the headers for a single
1162
+ request; this effectively ignores the headers
1163
+ in the spec for a single request.
1164
+ :type _headers: dict, optional
1165
+ :param _host_index: set to override the host_index for a single
1166
+ request; this effectively ignores the host_index
1167
+ in the spec for a single request.
1168
+ :type _host_index: int, optional
1169
+ :return: Returns the result object.
1170
+ """ # noqa: E501
1171
+
1172
+ _param = self._components_list_components_parsed_serialize(
1173
+ _request_auth=_request_auth,
1174
+ _content_type=_content_type,
1175
+ _headers=_headers,
1176
+ _host_index=_host_index
1177
+ )
1178
+
1179
+ _response_types_map: Dict[str, Optional[str]] = {
1180
+ '200': "List[object]",
1181
+ '400': None,
1182
+ '401': None,
1183
+ '500': None,
1184
+ }
1185
+ response_data = await self.api_client.call_api(
1186
+ *_param,
1187
+ _request_timeout=_request_timeout
1188
+ )
1189
+ await response_data.read()
1190
+ return self.api_client.response_deserialize(
1191
+ response_data=response_data,
1192
+ response_types_map=_response_types_map,
1193
+ ).data
1194
+
1195
+
1196
+ @validate_call
1197
+ async def components_list_components_parsed_with_http_info(
1198
+ self,
1199
+ _request_timeout: Union[
1200
+ None,
1201
+ Annotated[StrictFloat, Field(gt=0)],
1202
+ Tuple[
1203
+ Annotated[StrictFloat, Field(gt=0)],
1204
+ Annotated[StrictFloat, Field(gt=0)]
1205
+ ]
1206
+ ] = None,
1207
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1208
+ _content_type: Optional[StrictStr] = None,
1209
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1210
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1211
+ ) -> ApiResponse[List[object]]:
1212
+ """List all account components with the internal JSON parsed
1213
+
1214
+
1215
+ :param _request_timeout: timeout setting for this request. If one
1216
+ number provided, it will be total request
1217
+ timeout. It can also be a pair (tuple) of
1218
+ (connection, read) timeouts.
1219
+ :type _request_timeout: int, tuple(int, int), optional
1220
+ :param _request_auth: set to override the auth_settings for an a single
1221
+ request; this effectively ignores the
1222
+ authentication in the spec for a single request.
1223
+ :type _request_auth: dict, optional
1224
+ :param _content_type: force content-type for the request.
1225
+ :type _content_type: str, Optional
1226
+ :param _headers: set to override the headers for a single
1227
+ request; this effectively ignores the headers
1228
+ in the spec for a single request.
1229
+ :type _headers: dict, optional
1230
+ :param _host_index: set to override the host_index for a single
1231
+ request; this effectively ignores the host_index
1232
+ in the spec for a single request.
1233
+ :type _host_index: int, optional
1234
+ :return: Returns the result object.
1235
+ """ # noqa: E501
1236
+
1237
+ _param = self._components_list_components_parsed_serialize(
1238
+ _request_auth=_request_auth,
1239
+ _content_type=_content_type,
1240
+ _headers=_headers,
1241
+ _host_index=_host_index
1242
+ )
1243
+
1244
+ _response_types_map: Dict[str, Optional[str]] = {
1245
+ '200': "List[object]",
1246
+ '400': None,
1247
+ '401': None,
1248
+ '500': None,
1249
+ }
1250
+ response_data = await self.api_client.call_api(
1251
+ *_param,
1252
+ _request_timeout=_request_timeout
1253
+ )
1254
+ await response_data.read()
1255
+ return self.api_client.response_deserialize(
1256
+ response_data=response_data,
1257
+ response_types_map=_response_types_map,
1258
+ )
1259
+
1260
+
1261
+ @validate_call
1262
+ async def components_list_components_parsed_without_preload_content(
1263
+ self,
1264
+ _request_timeout: Union[
1265
+ None,
1266
+ Annotated[StrictFloat, Field(gt=0)],
1267
+ Tuple[
1268
+ Annotated[StrictFloat, Field(gt=0)],
1269
+ Annotated[StrictFloat, Field(gt=0)]
1270
+ ]
1271
+ ] = None,
1272
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1273
+ _content_type: Optional[StrictStr] = None,
1274
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1275
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1276
+ ) -> RESTResponseType:
1277
+ """List all account components with the internal JSON parsed
1278
+
1279
+
1280
+ :param _request_timeout: timeout setting for this request. If one
1281
+ number provided, it will be total request
1282
+ timeout. It can also be a pair (tuple) of
1283
+ (connection, read) timeouts.
1284
+ :type _request_timeout: int, tuple(int, int), optional
1285
+ :param _request_auth: set to override the auth_settings for an a single
1286
+ request; this effectively ignores the
1287
+ authentication in the spec for a single request.
1288
+ :type _request_auth: dict, optional
1289
+ :param _content_type: force content-type for the request.
1290
+ :type _content_type: str, Optional
1291
+ :param _headers: set to override the headers for a single
1292
+ request; this effectively ignores the headers
1293
+ in the spec for a single request.
1294
+ :type _headers: dict, optional
1295
+ :param _host_index: set to override the host_index for a single
1296
+ request; this effectively ignores the host_index
1297
+ in the spec for a single request.
1298
+ :type _host_index: int, optional
1299
+ :return: Returns the result object.
1300
+ """ # noqa: E501
1301
+
1302
+ _param = self._components_list_components_parsed_serialize(
1303
+ _request_auth=_request_auth,
1304
+ _content_type=_content_type,
1305
+ _headers=_headers,
1306
+ _host_index=_host_index
1307
+ )
1308
+
1309
+ _response_types_map: Dict[str, Optional[str]] = {
1310
+ '200': "List[object]",
1311
+ '400': None,
1312
+ '401': None,
1313
+ '500': None,
1314
+ }
1315
+ response_data = await self.api_client.call_api(
1316
+ *_param,
1317
+ _request_timeout=_request_timeout
1318
+ )
1319
+ return response_data.response
1320
+
1321
+
1322
+ def _components_list_components_parsed_serialize(
1323
+ self,
1324
+ _request_auth,
1325
+ _content_type,
1326
+ _headers,
1327
+ _host_index,
1328
+ ) -> RequestSerialized:
1329
+
1330
+ _host = None
1331
+
1332
+ _collection_formats: Dict[str, str] = {
1333
+ }
1334
+
1335
+ _path_params: Dict[str, str] = {}
1336
+ _query_params: List[Tuple[str, str]] = []
1337
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1338
+ _form_params: List[Tuple[str, str]] = []
1339
+ _files: Dict[
1340
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1341
+ ] = {}
1342
+ _body_params: Optional[bytes] = None
1343
+
1344
+ # process the path parameters
1345
+ # process the query parameters
1346
+ # process the header parameters
1347
+ # process the form parameters
1348
+ # process the body parameter
1349
+
1350
+
1351
+ # set the HTTP header `Accept`
1352
+ if 'Accept' not in _header_params:
1353
+ _header_params['Accept'] = self.api_client.select_header_accept(
1354
+ [
1355
+ 'application/json'
1356
+ ]
1357
+ )
1358
+
1359
+
1360
+ # authentication setting
1361
+ _auth_settings: List[str] = [
1362
+ 'endUserHashed',
1363
+ 'endUser',
1364
+ 'apiKey',
1365
+ 'clientCredentials'
1366
+ ]
1367
+
1368
+ return self.api_client.param_serialize(
1369
+ method='GET',
1370
+ resource_path='/components/public',
1371
+ path_params=_path_params,
1372
+ query_params=_query_params,
1373
+ header_params=_header_params,
1374
+ body=_body_params,
1375
+ post_params=_form_params,
1376
+ files=_files,
1377
+ auth_settings=_auth_settings,
1378
+ collection_formats=_collection_formats,
1379
+ _host=_host,
1380
+ _request_auth=_request_auth
1381
+ )
1382
+
1383
+
1384
+
1385
+
1386
+ @validate_call
1387
+ async def components_patch_component(
1388
+ self,
1389
+ component_id: Annotated[StrictStr, Field(description="Component ID")],
1390
+ email_component_patch_request: EmailComponentPatchRequest,
1391
+ _request_timeout: Union[
1392
+ None,
1393
+ Annotated[StrictFloat, Field(gt=0)],
1394
+ Tuple[
1395
+ Annotated[StrictFloat, Field(gt=0)],
1396
+ Annotated[StrictFloat, Field(gt=0)]
1397
+ ]
1398
+ ] = None,
1399
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1400
+ _content_type: Optional[StrictStr] = None,
1401
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1402
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1403
+ ) -> EmailComponentResponse:
1404
+ """Update a component's properties
1405
+
1406
+
1407
+ :param component_id: Component ID (required)
1408
+ :type component_id: str
1409
+ :param email_component_patch_request: (required)
1410
+ :type email_component_patch_request: EmailComponentPatchRequest
1411
+ :param _request_timeout: timeout setting for this request. If one
1412
+ number provided, it will be total request
1413
+ timeout. It can also be a pair (tuple) of
1414
+ (connection, read) timeouts.
1415
+ :type _request_timeout: int, tuple(int, int), optional
1416
+ :param _request_auth: set to override the auth_settings for an a single
1417
+ request; this effectively ignores the
1418
+ authentication in the spec for a single request.
1419
+ :type _request_auth: dict, optional
1420
+ :param _content_type: force content-type for the request.
1421
+ :type _content_type: str, Optional
1422
+ :param _headers: set to override the headers for a single
1423
+ request; this effectively ignores the headers
1424
+ in the spec for a single request.
1425
+ :type _headers: dict, optional
1426
+ :param _host_index: set to override the host_index for a single
1427
+ request; this effectively ignores the host_index
1428
+ in the spec for a single request.
1429
+ :type _host_index: int, optional
1430
+ :return: Returns the result object.
1431
+ """ # noqa: E501
1432
+
1433
+ _param = self._components_patch_component_serialize(
1434
+ component_id=component_id,
1435
+ email_component_patch_request=email_component_patch_request,
1436
+ _request_auth=_request_auth,
1437
+ _content_type=_content_type,
1438
+ _headers=_headers,
1439
+ _host_index=_host_index
1440
+ )
1441
+
1442
+ _response_types_map: Dict[str, Optional[str]] = {
1443
+ '200': "EmailComponentResponse",
1444
+ '400': None,
1445
+ '401': None,
1446
+ '500': None,
1447
+ }
1448
+ response_data = await self.api_client.call_api(
1449
+ *_param,
1450
+ _request_timeout=_request_timeout
1451
+ )
1452
+ await response_data.read()
1453
+ return self.api_client.response_deserialize(
1454
+ response_data=response_data,
1455
+ response_types_map=_response_types_map,
1456
+ ).data
1457
+
1458
+
1459
+ @validate_call
1460
+ async def components_patch_component_with_http_info(
1461
+ self,
1462
+ component_id: Annotated[StrictStr, Field(description="Component ID")],
1463
+ email_component_patch_request: EmailComponentPatchRequest,
1464
+ _request_timeout: Union[
1465
+ None,
1466
+ Annotated[StrictFloat, Field(gt=0)],
1467
+ Tuple[
1468
+ Annotated[StrictFloat, Field(gt=0)],
1469
+ Annotated[StrictFloat, Field(gt=0)]
1470
+ ]
1471
+ ] = None,
1472
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1473
+ _content_type: Optional[StrictStr] = None,
1474
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1475
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1476
+ ) -> ApiResponse[EmailComponentResponse]:
1477
+ """Update a component's properties
1478
+
1479
+
1480
+ :param component_id: Component ID (required)
1481
+ :type component_id: str
1482
+ :param email_component_patch_request: (required)
1483
+ :type email_component_patch_request: EmailComponentPatchRequest
1484
+ :param _request_timeout: timeout setting for this request. If one
1485
+ number provided, it will be total request
1486
+ timeout. It can also be a pair (tuple) of
1487
+ (connection, read) timeouts.
1488
+ :type _request_timeout: int, tuple(int, int), optional
1489
+ :param _request_auth: set to override the auth_settings for an a single
1490
+ request; this effectively ignores the
1491
+ authentication in the spec for a single request.
1492
+ :type _request_auth: dict, optional
1493
+ :param _content_type: force content-type for the request.
1494
+ :type _content_type: str, Optional
1495
+ :param _headers: set to override the headers for a single
1496
+ request; this effectively ignores the headers
1497
+ in the spec for a single request.
1498
+ :type _headers: dict, optional
1499
+ :param _host_index: set to override the host_index for a single
1500
+ request; this effectively ignores the host_index
1501
+ in the spec for a single request.
1502
+ :type _host_index: int, optional
1503
+ :return: Returns the result object.
1504
+ """ # noqa: E501
1505
+
1506
+ _param = self._components_patch_component_serialize(
1507
+ component_id=component_id,
1508
+ email_component_patch_request=email_component_patch_request,
1509
+ _request_auth=_request_auth,
1510
+ _content_type=_content_type,
1511
+ _headers=_headers,
1512
+ _host_index=_host_index
1513
+ )
1514
+
1515
+ _response_types_map: Dict[str, Optional[str]] = {
1516
+ '200': "EmailComponentResponse",
1517
+ '400': None,
1518
+ '401': None,
1519
+ '500': None,
1520
+ }
1521
+ response_data = await self.api_client.call_api(
1522
+ *_param,
1523
+ _request_timeout=_request_timeout
1524
+ )
1525
+ await response_data.read()
1526
+ return self.api_client.response_deserialize(
1527
+ response_data=response_data,
1528
+ response_types_map=_response_types_map,
1529
+ )
1530
+
1531
+
1532
+ @validate_call
1533
+ async def components_patch_component_without_preload_content(
1534
+ self,
1535
+ component_id: Annotated[StrictStr, Field(description="Component ID")],
1536
+ email_component_patch_request: EmailComponentPatchRequest,
1537
+ _request_timeout: Union[
1538
+ None,
1539
+ Annotated[StrictFloat, Field(gt=0)],
1540
+ Tuple[
1541
+ Annotated[StrictFloat, Field(gt=0)],
1542
+ Annotated[StrictFloat, Field(gt=0)]
1543
+ ]
1544
+ ] = None,
1545
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1546
+ _content_type: Optional[StrictStr] = None,
1547
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1548
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1549
+ ) -> RESTResponseType:
1550
+ """Update a component's properties
1551
+
1552
+
1553
+ :param component_id: Component ID (required)
1554
+ :type component_id: str
1555
+ :param email_component_patch_request: (required)
1556
+ :type email_component_patch_request: EmailComponentPatchRequest
1557
+ :param _request_timeout: timeout setting for this request. If one
1558
+ number provided, it will be total request
1559
+ timeout. It can also be a pair (tuple) of
1560
+ (connection, read) timeouts.
1561
+ :type _request_timeout: int, tuple(int, int), optional
1562
+ :param _request_auth: set to override the auth_settings for an a single
1563
+ request; this effectively ignores the
1564
+ authentication in the spec for a single request.
1565
+ :type _request_auth: dict, optional
1566
+ :param _content_type: force content-type for the request.
1567
+ :type _content_type: str, Optional
1568
+ :param _headers: set to override the headers for a single
1569
+ request; this effectively ignores the headers
1570
+ in the spec for a single request.
1571
+ :type _headers: dict, optional
1572
+ :param _host_index: set to override the host_index for a single
1573
+ request; this effectively ignores the host_index
1574
+ in the spec for a single request.
1575
+ :type _host_index: int, optional
1576
+ :return: Returns the result object.
1577
+ """ # noqa: E501
1578
+
1579
+ _param = self._components_patch_component_serialize(
1580
+ component_id=component_id,
1581
+ email_component_patch_request=email_component_patch_request,
1582
+ _request_auth=_request_auth,
1583
+ _content_type=_content_type,
1584
+ _headers=_headers,
1585
+ _host_index=_host_index
1586
+ )
1587
+
1588
+ _response_types_map: Dict[str, Optional[str]] = {
1589
+ '200': "EmailComponentResponse",
1590
+ '400': None,
1591
+ '401': None,
1592
+ '500': None,
1593
+ }
1594
+ response_data = await self.api_client.call_api(
1595
+ *_param,
1596
+ _request_timeout=_request_timeout
1597
+ )
1598
+ return response_data.response
1599
+
1600
+
1601
+ def _components_patch_component_serialize(
1602
+ self,
1603
+ component_id,
1604
+ email_component_patch_request,
1605
+ _request_auth,
1606
+ _content_type,
1607
+ _headers,
1608
+ _host_index,
1609
+ ) -> RequestSerialized:
1610
+
1611
+ _host = None
1612
+
1613
+ _collection_formats: Dict[str, str] = {
1614
+ }
1615
+
1616
+ _path_params: Dict[str, str] = {}
1617
+ _query_params: List[Tuple[str, str]] = []
1618
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1619
+ _form_params: List[Tuple[str, str]] = []
1620
+ _files: Dict[
1621
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1622
+ ] = {}
1623
+ _body_params: Optional[bytes] = None
1624
+
1625
+ # process the path parameters
1626
+ if component_id is not None:
1627
+ _path_params['componentId'] = component_id
1628
+ # process the query parameters
1629
+ # process the header parameters
1630
+ # process the form parameters
1631
+ # process the body parameter
1632
+ if email_component_patch_request is not None:
1633
+ _body_params = email_component_patch_request
1634
+
1635
+
1636
+ # set the HTTP header `Accept`
1637
+ if 'Accept' not in _header_params:
1638
+ _header_params['Accept'] = self.api_client.select_header_accept(
1639
+ [
1640
+ 'application/json'
1641
+ ]
1642
+ )
1643
+
1644
+ # set the HTTP header `Content-Type`
1645
+ if _content_type:
1646
+ _header_params['Content-Type'] = _content_type
1647
+ else:
1648
+ _default_content_type = (
1649
+ self.api_client.select_header_content_type(
1650
+ [
1651
+ 'application/json'
1652
+ ]
1653
+ )
1654
+ )
1655
+ if _default_content_type is not None:
1656
+ _header_params['Content-Type'] = _default_content_type
1657
+
1658
+ # authentication setting
1659
+ _auth_settings: List[str] = [
1660
+ 'endUserHashed',
1661
+ 'endUser',
1662
+ 'apiKey',
1663
+ 'clientCredentials'
1664
+ ]
1665
+
1666
+ return self.api_client.param_serialize(
1667
+ method='PATCH',
1668
+ resource_path='/components/{componentId}',
1669
+ path_params=_path_params,
1670
+ query_params=_query_params,
1671
+ header_params=_header_params,
1672
+ body=_body_params,
1673
+ post_params=_form_params,
1674
+ files=_files,
1675
+ auth_settings=_auth_settings,
1676
+ collection_formats=_collection_formats,
1677
+ _host=_host,
1678
+ _request_auth=_request_auth
1679
+ )
1680
+
1681
+