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/keys_api.py
ADDED
|
@@ -0,0 +1,849 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
NotificationAPI
|
|
5
|
+
|
|
6
|
+
Internal API for notification delivery and management
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictStr
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from pingram.models.create_key_request import CreateKeyRequest
|
|
22
|
+
from pingram.models.create_key_response import CreateKeyResponse
|
|
23
|
+
from pingram.models.delete_key_response import DeleteKeyResponse
|
|
24
|
+
from pingram.models.get_keys_response import GetKeysResponse
|
|
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 KeysApi:
|
|
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 keys_create_api_key(
|
|
46
|
+
self,
|
|
47
|
+
create_key_request: CreateKeyRequest,
|
|
48
|
+
_request_timeout: Union[
|
|
49
|
+
None,
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Tuple[
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
54
|
+
]
|
|
55
|
+
] = None,
|
|
56
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_content_type: Optional[StrictStr] = None,
|
|
58
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
+
) -> CreateKeyResponse:
|
|
61
|
+
"""Create a new API key (secret or public) for an environment
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
:param create_key_request: (required)
|
|
65
|
+
:type create_key_request: CreateKeyRequest
|
|
66
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
67
|
+
number provided, it will be total request
|
|
68
|
+
timeout. It can also be a pair (tuple) of
|
|
69
|
+
(connection, read) timeouts.
|
|
70
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
71
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
72
|
+
request; this effectively ignores the
|
|
73
|
+
authentication in the spec for a single request.
|
|
74
|
+
:type _request_auth: dict, optional
|
|
75
|
+
:param _content_type: force content-type for the request.
|
|
76
|
+
:type _content_type: str, Optional
|
|
77
|
+
:param _headers: set to override the headers for a single
|
|
78
|
+
request; this effectively ignores the headers
|
|
79
|
+
in the spec for a single request.
|
|
80
|
+
:type _headers: dict, optional
|
|
81
|
+
:param _host_index: set to override the host_index for a single
|
|
82
|
+
request; this effectively ignores the host_index
|
|
83
|
+
in the spec for a single request.
|
|
84
|
+
:type _host_index: int, optional
|
|
85
|
+
:return: Returns the result object.
|
|
86
|
+
""" # noqa: E501
|
|
87
|
+
|
|
88
|
+
_param = self._keys_create_api_key_serialize(
|
|
89
|
+
create_key_request=create_key_request,
|
|
90
|
+
_request_auth=_request_auth,
|
|
91
|
+
_content_type=_content_type,
|
|
92
|
+
_headers=_headers,
|
|
93
|
+
_host_index=_host_index
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
97
|
+
'200': "CreateKeyResponse",
|
|
98
|
+
'400': None,
|
|
99
|
+
'401': None,
|
|
100
|
+
'500': None,
|
|
101
|
+
}
|
|
102
|
+
response_data = await self.api_client.call_api(
|
|
103
|
+
*_param,
|
|
104
|
+
_request_timeout=_request_timeout
|
|
105
|
+
)
|
|
106
|
+
await response_data.read()
|
|
107
|
+
return self.api_client.response_deserialize(
|
|
108
|
+
response_data=response_data,
|
|
109
|
+
response_types_map=_response_types_map,
|
|
110
|
+
).data
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
@validate_call
|
|
114
|
+
async def keys_create_api_key_with_http_info(
|
|
115
|
+
self,
|
|
116
|
+
create_key_request: CreateKeyRequest,
|
|
117
|
+
_request_timeout: Union[
|
|
118
|
+
None,
|
|
119
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
120
|
+
Tuple[
|
|
121
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
123
|
+
]
|
|
124
|
+
] = None,
|
|
125
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
126
|
+
_content_type: Optional[StrictStr] = None,
|
|
127
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
128
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
129
|
+
) -> ApiResponse[CreateKeyResponse]:
|
|
130
|
+
"""Create a new API key (secret or public) for an environment
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
:param create_key_request: (required)
|
|
134
|
+
:type create_key_request: CreateKeyRequest
|
|
135
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
136
|
+
number provided, it will be total request
|
|
137
|
+
timeout. It can also be a pair (tuple) of
|
|
138
|
+
(connection, read) timeouts.
|
|
139
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
140
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
141
|
+
request; this effectively ignores the
|
|
142
|
+
authentication in the spec for a single request.
|
|
143
|
+
:type _request_auth: dict, optional
|
|
144
|
+
:param _content_type: force content-type for the request.
|
|
145
|
+
:type _content_type: str, Optional
|
|
146
|
+
:param _headers: set to override the headers for a single
|
|
147
|
+
request; this effectively ignores the headers
|
|
148
|
+
in the spec for a single request.
|
|
149
|
+
:type _headers: dict, optional
|
|
150
|
+
:param _host_index: set to override the host_index for a single
|
|
151
|
+
request; this effectively ignores the host_index
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _host_index: int, optional
|
|
154
|
+
:return: Returns the result object.
|
|
155
|
+
""" # noqa: E501
|
|
156
|
+
|
|
157
|
+
_param = self._keys_create_api_key_serialize(
|
|
158
|
+
create_key_request=create_key_request,
|
|
159
|
+
_request_auth=_request_auth,
|
|
160
|
+
_content_type=_content_type,
|
|
161
|
+
_headers=_headers,
|
|
162
|
+
_host_index=_host_index
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
166
|
+
'200': "CreateKeyResponse",
|
|
167
|
+
'400': None,
|
|
168
|
+
'401': None,
|
|
169
|
+
'500': None,
|
|
170
|
+
}
|
|
171
|
+
response_data = await self.api_client.call_api(
|
|
172
|
+
*_param,
|
|
173
|
+
_request_timeout=_request_timeout
|
|
174
|
+
)
|
|
175
|
+
await response_data.read()
|
|
176
|
+
return self.api_client.response_deserialize(
|
|
177
|
+
response_data=response_data,
|
|
178
|
+
response_types_map=_response_types_map,
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
@validate_call
|
|
183
|
+
async def keys_create_api_key_without_preload_content(
|
|
184
|
+
self,
|
|
185
|
+
create_key_request: CreateKeyRequest,
|
|
186
|
+
_request_timeout: Union[
|
|
187
|
+
None,
|
|
188
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
189
|
+
Tuple[
|
|
190
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
191
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
192
|
+
]
|
|
193
|
+
] = None,
|
|
194
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
195
|
+
_content_type: Optional[StrictStr] = None,
|
|
196
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
197
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
198
|
+
) -> RESTResponseType:
|
|
199
|
+
"""Create a new API key (secret or public) for an environment
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
:param create_key_request: (required)
|
|
203
|
+
:type create_key_request: CreateKeyRequest
|
|
204
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
205
|
+
number provided, it will be total request
|
|
206
|
+
timeout. It can also be a pair (tuple) of
|
|
207
|
+
(connection, read) timeouts.
|
|
208
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
209
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
210
|
+
request; this effectively ignores the
|
|
211
|
+
authentication in the spec for a single request.
|
|
212
|
+
:type _request_auth: dict, optional
|
|
213
|
+
:param _content_type: force content-type for the request.
|
|
214
|
+
:type _content_type: str, Optional
|
|
215
|
+
:param _headers: set to override the headers for a single
|
|
216
|
+
request; this effectively ignores the headers
|
|
217
|
+
in the spec for a single request.
|
|
218
|
+
:type _headers: dict, optional
|
|
219
|
+
:param _host_index: set to override the host_index for a single
|
|
220
|
+
request; this effectively ignores the host_index
|
|
221
|
+
in the spec for a single request.
|
|
222
|
+
:type _host_index: int, optional
|
|
223
|
+
:return: Returns the result object.
|
|
224
|
+
""" # noqa: E501
|
|
225
|
+
|
|
226
|
+
_param = self._keys_create_api_key_serialize(
|
|
227
|
+
create_key_request=create_key_request,
|
|
228
|
+
_request_auth=_request_auth,
|
|
229
|
+
_content_type=_content_type,
|
|
230
|
+
_headers=_headers,
|
|
231
|
+
_host_index=_host_index
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
235
|
+
'200': "CreateKeyResponse",
|
|
236
|
+
'400': None,
|
|
237
|
+
'401': None,
|
|
238
|
+
'500': None,
|
|
239
|
+
}
|
|
240
|
+
response_data = await self.api_client.call_api(
|
|
241
|
+
*_param,
|
|
242
|
+
_request_timeout=_request_timeout
|
|
243
|
+
)
|
|
244
|
+
return response_data.response
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
def _keys_create_api_key_serialize(
|
|
248
|
+
self,
|
|
249
|
+
create_key_request,
|
|
250
|
+
_request_auth,
|
|
251
|
+
_content_type,
|
|
252
|
+
_headers,
|
|
253
|
+
_host_index,
|
|
254
|
+
) -> RequestSerialized:
|
|
255
|
+
|
|
256
|
+
_host = None
|
|
257
|
+
|
|
258
|
+
_collection_formats: Dict[str, str] = {
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
_path_params: Dict[str, str] = {}
|
|
262
|
+
_query_params: List[Tuple[str, str]] = []
|
|
263
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
264
|
+
_form_params: List[Tuple[str, str]] = []
|
|
265
|
+
_files: Dict[
|
|
266
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
267
|
+
] = {}
|
|
268
|
+
_body_params: Optional[bytes] = None
|
|
269
|
+
|
|
270
|
+
# process the path parameters
|
|
271
|
+
# process the query parameters
|
|
272
|
+
# process the header parameters
|
|
273
|
+
# process the form parameters
|
|
274
|
+
# process the body parameter
|
|
275
|
+
if create_key_request is not None:
|
|
276
|
+
_body_params = create_key_request
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
# set the HTTP header `Accept`
|
|
280
|
+
if 'Accept' not in _header_params:
|
|
281
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
282
|
+
[
|
|
283
|
+
'application/json'
|
|
284
|
+
]
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
# set the HTTP header `Content-Type`
|
|
288
|
+
if _content_type:
|
|
289
|
+
_header_params['Content-Type'] = _content_type
|
|
290
|
+
else:
|
|
291
|
+
_default_content_type = (
|
|
292
|
+
self.api_client.select_header_content_type(
|
|
293
|
+
[
|
|
294
|
+
'application/json'
|
|
295
|
+
]
|
|
296
|
+
)
|
|
297
|
+
)
|
|
298
|
+
if _default_content_type is not None:
|
|
299
|
+
_header_params['Content-Type'] = _default_content_type
|
|
300
|
+
|
|
301
|
+
# authentication setting
|
|
302
|
+
_auth_settings: List[str] = [
|
|
303
|
+
'endUserHashed',
|
|
304
|
+
'endUser',
|
|
305
|
+
'apiKey',
|
|
306
|
+
'clientCredentials'
|
|
307
|
+
]
|
|
308
|
+
|
|
309
|
+
return self.api_client.param_serialize(
|
|
310
|
+
method='POST',
|
|
311
|
+
resource_path='/keys',
|
|
312
|
+
path_params=_path_params,
|
|
313
|
+
query_params=_query_params,
|
|
314
|
+
header_params=_header_params,
|
|
315
|
+
body=_body_params,
|
|
316
|
+
post_params=_form_params,
|
|
317
|
+
files=_files,
|
|
318
|
+
auth_settings=_auth_settings,
|
|
319
|
+
collection_formats=_collection_formats,
|
|
320
|
+
_host=_host,
|
|
321
|
+
_request_auth=_request_auth
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
@validate_call
|
|
328
|
+
async def keys_list_api_keys(
|
|
329
|
+
self,
|
|
330
|
+
_request_timeout: Union[
|
|
331
|
+
None,
|
|
332
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
333
|
+
Tuple[
|
|
334
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
335
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
336
|
+
]
|
|
337
|
+
] = None,
|
|
338
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
339
|
+
_content_type: Optional[StrictStr] = None,
|
|
340
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
341
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
342
|
+
) -> GetKeysResponse:
|
|
343
|
+
"""List all API keys for the authenticated user's account
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
347
|
+
number provided, it will be total request
|
|
348
|
+
timeout. It can also be a pair (tuple) of
|
|
349
|
+
(connection, read) timeouts.
|
|
350
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
351
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
352
|
+
request; this effectively ignores the
|
|
353
|
+
authentication in the spec for a single request.
|
|
354
|
+
:type _request_auth: dict, optional
|
|
355
|
+
:param _content_type: force content-type for the request.
|
|
356
|
+
:type _content_type: str, Optional
|
|
357
|
+
:param _headers: set to override the headers for a single
|
|
358
|
+
request; this effectively ignores the headers
|
|
359
|
+
in the spec for a single request.
|
|
360
|
+
:type _headers: dict, optional
|
|
361
|
+
:param _host_index: set to override the host_index for a single
|
|
362
|
+
request; this effectively ignores the host_index
|
|
363
|
+
in the spec for a single request.
|
|
364
|
+
:type _host_index: int, optional
|
|
365
|
+
:return: Returns the result object.
|
|
366
|
+
""" # noqa: E501
|
|
367
|
+
|
|
368
|
+
_param = self._keys_list_api_keys_serialize(
|
|
369
|
+
_request_auth=_request_auth,
|
|
370
|
+
_content_type=_content_type,
|
|
371
|
+
_headers=_headers,
|
|
372
|
+
_host_index=_host_index
|
|
373
|
+
)
|
|
374
|
+
|
|
375
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
376
|
+
'200': "GetKeysResponse",
|
|
377
|
+
'400': None,
|
|
378
|
+
'401': None,
|
|
379
|
+
'500': None,
|
|
380
|
+
}
|
|
381
|
+
response_data = await self.api_client.call_api(
|
|
382
|
+
*_param,
|
|
383
|
+
_request_timeout=_request_timeout
|
|
384
|
+
)
|
|
385
|
+
await response_data.read()
|
|
386
|
+
return self.api_client.response_deserialize(
|
|
387
|
+
response_data=response_data,
|
|
388
|
+
response_types_map=_response_types_map,
|
|
389
|
+
).data
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
@validate_call
|
|
393
|
+
async def keys_list_api_keys_with_http_info(
|
|
394
|
+
self,
|
|
395
|
+
_request_timeout: Union[
|
|
396
|
+
None,
|
|
397
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
398
|
+
Tuple[
|
|
399
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
400
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
401
|
+
]
|
|
402
|
+
] = None,
|
|
403
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
404
|
+
_content_type: Optional[StrictStr] = None,
|
|
405
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
406
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
407
|
+
) -> ApiResponse[GetKeysResponse]:
|
|
408
|
+
"""List all API keys for the authenticated user's account
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
412
|
+
number provided, it will be total request
|
|
413
|
+
timeout. It can also be a pair (tuple) of
|
|
414
|
+
(connection, read) timeouts.
|
|
415
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
416
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
417
|
+
request; this effectively ignores the
|
|
418
|
+
authentication in the spec for a single request.
|
|
419
|
+
:type _request_auth: dict, optional
|
|
420
|
+
:param _content_type: force content-type for the request.
|
|
421
|
+
:type _content_type: str, Optional
|
|
422
|
+
:param _headers: set to override the headers for a single
|
|
423
|
+
request; this effectively ignores the headers
|
|
424
|
+
in the spec for a single request.
|
|
425
|
+
:type _headers: dict, optional
|
|
426
|
+
:param _host_index: set to override the host_index for a single
|
|
427
|
+
request; this effectively ignores the host_index
|
|
428
|
+
in the spec for a single request.
|
|
429
|
+
:type _host_index: int, optional
|
|
430
|
+
:return: Returns the result object.
|
|
431
|
+
""" # noqa: E501
|
|
432
|
+
|
|
433
|
+
_param = self._keys_list_api_keys_serialize(
|
|
434
|
+
_request_auth=_request_auth,
|
|
435
|
+
_content_type=_content_type,
|
|
436
|
+
_headers=_headers,
|
|
437
|
+
_host_index=_host_index
|
|
438
|
+
)
|
|
439
|
+
|
|
440
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
441
|
+
'200': "GetKeysResponse",
|
|
442
|
+
'400': None,
|
|
443
|
+
'401': None,
|
|
444
|
+
'500': None,
|
|
445
|
+
}
|
|
446
|
+
response_data = await self.api_client.call_api(
|
|
447
|
+
*_param,
|
|
448
|
+
_request_timeout=_request_timeout
|
|
449
|
+
)
|
|
450
|
+
await response_data.read()
|
|
451
|
+
return self.api_client.response_deserialize(
|
|
452
|
+
response_data=response_data,
|
|
453
|
+
response_types_map=_response_types_map,
|
|
454
|
+
)
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
@validate_call
|
|
458
|
+
async def keys_list_api_keys_without_preload_content(
|
|
459
|
+
self,
|
|
460
|
+
_request_timeout: Union[
|
|
461
|
+
None,
|
|
462
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
463
|
+
Tuple[
|
|
464
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
465
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
466
|
+
]
|
|
467
|
+
] = None,
|
|
468
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
469
|
+
_content_type: Optional[StrictStr] = None,
|
|
470
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
471
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
472
|
+
) -> RESTResponseType:
|
|
473
|
+
"""List all API keys for the authenticated user's account
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
477
|
+
number provided, it will be total request
|
|
478
|
+
timeout. It can also be a pair (tuple) of
|
|
479
|
+
(connection, read) timeouts.
|
|
480
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
481
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
482
|
+
request; this effectively ignores the
|
|
483
|
+
authentication in the spec for a single request.
|
|
484
|
+
:type _request_auth: dict, optional
|
|
485
|
+
:param _content_type: force content-type for the request.
|
|
486
|
+
:type _content_type: str, Optional
|
|
487
|
+
:param _headers: set to override the headers for a single
|
|
488
|
+
request; this effectively ignores the headers
|
|
489
|
+
in the spec for a single request.
|
|
490
|
+
:type _headers: dict, optional
|
|
491
|
+
:param _host_index: set to override the host_index for a single
|
|
492
|
+
request; this effectively ignores the host_index
|
|
493
|
+
in the spec for a single request.
|
|
494
|
+
:type _host_index: int, optional
|
|
495
|
+
:return: Returns the result object.
|
|
496
|
+
""" # noqa: E501
|
|
497
|
+
|
|
498
|
+
_param = self._keys_list_api_keys_serialize(
|
|
499
|
+
_request_auth=_request_auth,
|
|
500
|
+
_content_type=_content_type,
|
|
501
|
+
_headers=_headers,
|
|
502
|
+
_host_index=_host_index
|
|
503
|
+
)
|
|
504
|
+
|
|
505
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
506
|
+
'200': "GetKeysResponse",
|
|
507
|
+
'400': None,
|
|
508
|
+
'401': None,
|
|
509
|
+
'500': None,
|
|
510
|
+
}
|
|
511
|
+
response_data = await self.api_client.call_api(
|
|
512
|
+
*_param,
|
|
513
|
+
_request_timeout=_request_timeout
|
|
514
|
+
)
|
|
515
|
+
return response_data.response
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
def _keys_list_api_keys_serialize(
|
|
519
|
+
self,
|
|
520
|
+
_request_auth,
|
|
521
|
+
_content_type,
|
|
522
|
+
_headers,
|
|
523
|
+
_host_index,
|
|
524
|
+
) -> RequestSerialized:
|
|
525
|
+
|
|
526
|
+
_host = None
|
|
527
|
+
|
|
528
|
+
_collection_formats: Dict[str, str] = {
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
_path_params: Dict[str, str] = {}
|
|
532
|
+
_query_params: List[Tuple[str, str]] = []
|
|
533
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
534
|
+
_form_params: List[Tuple[str, str]] = []
|
|
535
|
+
_files: Dict[
|
|
536
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
537
|
+
] = {}
|
|
538
|
+
_body_params: Optional[bytes] = None
|
|
539
|
+
|
|
540
|
+
# process the path parameters
|
|
541
|
+
# process the query parameters
|
|
542
|
+
# process the header parameters
|
|
543
|
+
# process the form parameters
|
|
544
|
+
# process the body parameter
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
# set the HTTP header `Accept`
|
|
548
|
+
if 'Accept' not in _header_params:
|
|
549
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
550
|
+
[
|
|
551
|
+
'application/json'
|
|
552
|
+
]
|
|
553
|
+
)
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
# authentication setting
|
|
557
|
+
_auth_settings: List[str] = [
|
|
558
|
+
'endUserHashed',
|
|
559
|
+
'endUser',
|
|
560
|
+
'apiKey',
|
|
561
|
+
'clientCredentials'
|
|
562
|
+
]
|
|
563
|
+
|
|
564
|
+
return self.api_client.param_serialize(
|
|
565
|
+
method='GET',
|
|
566
|
+
resource_path='/keys',
|
|
567
|
+
path_params=_path_params,
|
|
568
|
+
query_params=_query_params,
|
|
569
|
+
header_params=_header_params,
|
|
570
|
+
body=_body_params,
|
|
571
|
+
post_params=_form_params,
|
|
572
|
+
files=_files,
|
|
573
|
+
auth_settings=_auth_settings,
|
|
574
|
+
collection_formats=_collection_formats,
|
|
575
|
+
_host=_host,
|
|
576
|
+
_request_auth=_request_auth
|
|
577
|
+
)
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
@validate_call
|
|
583
|
+
async def keys_revoke_api_key(
|
|
584
|
+
self,
|
|
585
|
+
key_id: Annotated[StrictStr, Field(description="The API key ID (jti)")],
|
|
586
|
+
_request_timeout: Union[
|
|
587
|
+
None,
|
|
588
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
589
|
+
Tuple[
|
|
590
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
591
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
592
|
+
]
|
|
593
|
+
] = None,
|
|
594
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
595
|
+
_content_type: Optional[StrictStr] = None,
|
|
596
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
597
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
598
|
+
) -> DeleteKeyResponse:
|
|
599
|
+
"""Revoke an API key
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
:param key_id: The API key ID (jti) (required)
|
|
603
|
+
:type key_id: str
|
|
604
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
605
|
+
number provided, it will be total request
|
|
606
|
+
timeout. It can also be a pair (tuple) of
|
|
607
|
+
(connection, read) timeouts.
|
|
608
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
609
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
610
|
+
request; this effectively ignores the
|
|
611
|
+
authentication in the spec for a single request.
|
|
612
|
+
:type _request_auth: dict, optional
|
|
613
|
+
:param _content_type: force content-type for the request.
|
|
614
|
+
:type _content_type: str, Optional
|
|
615
|
+
:param _headers: set to override the headers for a single
|
|
616
|
+
request; this effectively ignores the headers
|
|
617
|
+
in the spec for a single request.
|
|
618
|
+
:type _headers: dict, optional
|
|
619
|
+
:param _host_index: set to override the host_index for a single
|
|
620
|
+
request; this effectively ignores the host_index
|
|
621
|
+
in the spec for a single request.
|
|
622
|
+
:type _host_index: int, optional
|
|
623
|
+
:return: Returns the result object.
|
|
624
|
+
""" # noqa: E501
|
|
625
|
+
|
|
626
|
+
_param = self._keys_revoke_api_key_serialize(
|
|
627
|
+
key_id=key_id,
|
|
628
|
+
_request_auth=_request_auth,
|
|
629
|
+
_content_type=_content_type,
|
|
630
|
+
_headers=_headers,
|
|
631
|
+
_host_index=_host_index
|
|
632
|
+
)
|
|
633
|
+
|
|
634
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
635
|
+
'200': "DeleteKeyResponse",
|
|
636
|
+
'400': None,
|
|
637
|
+
'401': None,
|
|
638
|
+
'500': None,
|
|
639
|
+
}
|
|
640
|
+
response_data = await self.api_client.call_api(
|
|
641
|
+
*_param,
|
|
642
|
+
_request_timeout=_request_timeout
|
|
643
|
+
)
|
|
644
|
+
await response_data.read()
|
|
645
|
+
return self.api_client.response_deserialize(
|
|
646
|
+
response_data=response_data,
|
|
647
|
+
response_types_map=_response_types_map,
|
|
648
|
+
).data
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
@validate_call
|
|
652
|
+
async def keys_revoke_api_key_with_http_info(
|
|
653
|
+
self,
|
|
654
|
+
key_id: Annotated[StrictStr, Field(description="The API key ID (jti)")],
|
|
655
|
+
_request_timeout: Union[
|
|
656
|
+
None,
|
|
657
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
658
|
+
Tuple[
|
|
659
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
660
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
661
|
+
]
|
|
662
|
+
] = None,
|
|
663
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
664
|
+
_content_type: Optional[StrictStr] = None,
|
|
665
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
666
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
667
|
+
) -> ApiResponse[DeleteKeyResponse]:
|
|
668
|
+
"""Revoke an API key
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
:param key_id: The API key ID (jti) (required)
|
|
672
|
+
:type key_id: str
|
|
673
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
674
|
+
number provided, it will be total request
|
|
675
|
+
timeout. It can also be a pair (tuple) of
|
|
676
|
+
(connection, read) timeouts.
|
|
677
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
678
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
679
|
+
request; this effectively ignores the
|
|
680
|
+
authentication in the spec for a single request.
|
|
681
|
+
:type _request_auth: dict, optional
|
|
682
|
+
:param _content_type: force content-type for the request.
|
|
683
|
+
:type _content_type: str, Optional
|
|
684
|
+
:param _headers: set to override the headers for a single
|
|
685
|
+
request; this effectively ignores the headers
|
|
686
|
+
in the spec for a single request.
|
|
687
|
+
:type _headers: dict, optional
|
|
688
|
+
:param _host_index: set to override the host_index for a single
|
|
689
|
+
request; this effectively ignores the host_index
|
|
690
|
+
in the spec for a single request.
|
|
691
|
+
:type _host_index: int, optional
|
|
692
|
+
:return: Returns the result object.
|
|
693
|
+
""" # noqa: E501
|
|
694
|
+
|
|
695
|
+
_param = self._keys_revoke_api_key_serialize(
|
|
696
|
+
key_id=key_id,
|
|
697
|
+
_request_auth=_request_auth,
|
|
698
|
+
_content_type=_content_type,
|
|
699
|
+
_headers=_headers,
|
|
700
|
+
_host_index=_host_index
|
|
701
|
+
)
|
|
702
|
+
|
|
703
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
704
|
+
'200': "DeleteKeyResponse",
|
|
705
|
+
'400': None,
|
|
706
|
+
'401': None,
|
|
707
|
+
'500': None,
|
|
708
|
+
}
|
|
709
|
+
response_data = await self.api_client.call_api(
|
|
710
|
+
*_param,
|
|
711
|
+
_request_timeout=_request_timeout
|
|
712
|
+
)
|
|
713
|
+
await response_data.read()
|
|
714
|
+
return self.api_client.response_deserialize(
|
|
715
|
+
response_data=response_data,
|
|
716
|
+
response_types_map=_response_types_map,
|
|
717
|
+
)
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
@validate_call
|
|
721
|
+
async def keys_revoke_api_key_without_preload_content(
|
|
722
|
+
self,
|
|
723
|
+
key_id: Annotated[StrictStr, Field(description="The API key ID (jti)")],
|
|
724
|
+
_request_timeout: Union[
|
|
725
|
+
None,
|
|
726
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
727
|
+
Tuple[
|
|
728
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
729
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
730
|
+
]
|
|
731
|
+
] = None,
|
|
732
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
733
|
+
_content_type: Optional[StrictStr] = None,
|
|
734
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
735
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
736
|
+
) -> RESTResponseType:
|
|
737
|
+
"""Revoke an API key
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
:param key_id: The API key ID (jti) (required)
|
|
741
|
+
:type key_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._keys_revoke_api_key_serialize(
|
|
765
|
+
key_id=key_id,
|
|
766
|
+
_request_auth=_request_auth,
|
|
767
|
+
_content_type=_content_type,
|
|
768
|
+
_headers=_headers,
|
|
769
|
+
_host_index=_host_index
|
|
770
|
+
)
|
|
771
|
+
|
|
772
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
773
|
+
'200': "DeleteKeyResponse",
|
|
774
|
+
'400': None,
|
|
775
|
+
'401': None,
|
|
776
|
+
'500': None,
|
|
777
|
+
}
|
|
778
|
+
response_data = await self.api_client.call_api(
|
|
779
|
+
*_param,
|
|
780
|
+
_request_timeout=_request_timeout
|
|
781
|
+
)
|
|
782
|
+
return response_data.response
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
def _keys_revoke_api_key_serialize(
|
|
786
|
+
self,
|
|
787
|
+
key_id,
|
|
788
|
+
_request_auth,
|
|
789
|
+
_content_type,
|
|
790
|
+
_headers,
|
|
791
|
+
_host_index,
|
|
792
|
+
) -> RequestSerialized:
|
|
793
|
+
|
|
794
|
+
_host = None
|
|
795
|
+
|
|
796
|
+
_collection_formats: Dict[str, str] = {
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
_path_params: Dict[str, str] = {}
|
|
800
|
+
_query_params: List[Tuple[str, str]] = []
|
|
801
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
802
|
+
_form_params: List[Tuple[str, str]] = []
|
|
803
|
+
_files: Dict[
|
|
804
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
805
|
+
] = {}
|
|
806
|
+
_body_params: Optional[bytes] = None
|
|
807
|
+
|
|
808
|
+
# process the path parameters
|
|
809
|
+
if key_id is not None:
|
|
810
|
+
_path_params['keyId'] = key_id
|
|
811
|
+
# process the query parameters
|
|
812
|
+
# process the header parameters
|
|
813
|
+
# process the form parameters
|
|
814
|
+
# process the body parameter
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
# set the HTTP header `Accept`
|
|
818
|
+
if 'Accept' not in _header_params:
|
|
819
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
820
|
+
[
|
|
821
|
+
'application/json'
|
|
822
|
+
]
|
|
823
|
+
)
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
# authentication setting
|
|
827
|
+
_auth_settings: List[str] = [
|
|
828
|
+
'endUserHashed',
|
|
829
|
+
'endUser',
|
|
830
|
+
'apiKey',
|
|
831
|
+
'clientCredentials'
|
|
832
|
+
]
|
|
833
|
+
|
|
834
|
+
return self.api_client.param_serialize(
|
|
835
|
+
method='DELETE',
|
|
836
|
+
resource_path='/keys/{keyId}',
|
|
837
|
+
path_params=_path_params,
|
|
838
|
+
query_params=_query_params,
|
|
839
|
+
header_params=_header_params,
|
|
840
|
+
body=_body_params,
|
|
841
|
+
post_params=_form_params,
|
|
842
|
+
files=_files,
|
|
843
|
+
auth_settings=_auth_settings,
|
|
844
|
+
collection_formats=_collection_formats,
|
|
845
|
+
_host=_host,
|
|
846
|
+
_request_auth=_request_auth
|
|
847
|
+
)
|
|
848
|
+
|
|
849
|
+
|