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