agentmail-clone-v1 0.1.0
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.
- package/.env.example +20 -0
- package/.github/workflows/docs-deploy.yml +37 -0
- package/.github/workflows/landing-preview.yml +43 -0
- package/.github/workflows/openapi-lint.yml +31 -0
- package/.github/workflows/sdk-generate-check.yml +66 -0
- package/.github/workflows/sdk-release.yml +62 -0
- package/CHANGELOG.md +10 -0
- package/README.md +208 -0
- package/RELEASING.md +43 -0
- package/docs/api-reference/api-keys.mdx +11 -0
- package/docs/api-reference/domains.mdx +13 -0
- package/docs/api-reference/emails.mdx +26 -0
- package/docs/api-reference/inboxes.mdx +13 -0
- package/docs/api-reference/metrics.mdx +10 -0
- package/docs/authentication.mdx +25 -0
- package/docs/docs.json +35 -0
- package/docs/errors.mdx +34 -0
- package/docs/favicon.svg +5 -0
- package/docs/idempotency.mdx +18 -0
- package/docs/index.mdx +24 -0
- package/docs/quickstart.mdx +134 -0
- package/landing/DEPLOYING.md +33 -0
- package/landing/favicon.svg +5 -0
- package/landing/index.html +129 -0
- package/landing/main.js +45 -0
- package/landing/privacy.html +29 -0
- package/landing/styles.css +356 -0
- package/landing/terms.html +29 -0
- package/netlify.toml +15 -0
- package/openapi/openapi.yaml +1016 -0
- package/package.json +34 -0
- package/render.yaml +48 -0
- package/scripts/generate-sdk-py.sh +16 -0
- package/scripts/generate-sdk-ts.sh +16 -0
- package/scripts/migrate.js +66 -0
- package/scripts/validate-docs.js +56 -0
- package/scripts/validate-landing.js +39 -0
- package/sdks/python/README.md +40 -0
- package/sdks/python/emailagent_sdk/__init__.py +157 -0
- package/sdks/python/generated/.openapi-generator/FILES +101 -0
- package/sdks/python/generated/.openapi-generator/VERSION +1 -0
- package/sdks/python/generated/.openapi-generator-ignore +23 -0
- package/sdks/python/generated/emailagent_sdk_generated/__init__.py +105 -0
- package/sdks/python/generated/emailagent_sdk_generated/api/__init__.py +9 -0
- package/sdks/python/generated/emailagent_sdk_generated/api/api_keys_api.py +1162 -0
- package/sdks/python/generated/emailagent_sdk_generated/api/domains_api.py +1168 -0
- package/sdks/python/generated/emailagent_sdk_generated/api/emails_api.py +1232 -0
- package/sdks/python/generated/emailagent_sdk_generated/api/inboxes_api.py +1191 -0
- package/sdks/python/generated/emailagent_sdk_generated/api/metrics_api.py +285 -0
- package/sdks/python/generated/emailagent_sdk_generated/api_client.py +801 -0
- package/sdks/python/generated/emailagent_sdk_generated/api_response.py +21 -0
- package/sdks/python/generated/emailagent_sdk_generated/configuration.py +586 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/APIKeysApi.md +334 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/ApiKeyCreated.md +35 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/ApiKeyCreatedResponse.md +29 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/ApiKeyListItem.md +35 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/ApiKeyListResponse.md +29 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/CreateApiKeyRequest.md +30 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/CreateApiKeyRequestScopes.md +29 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/CreateDomainRequest.md +29 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/CreateInboxRequest.md +31 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/Domain.md +37 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/DomainListResponse.md +29 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/DomainResponse.md +29 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/DomainsApi.md +336 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/Email.md +43 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/EmailListResponse.md +29 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/EmailResponse.md +29 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/EmailsApi.md +353 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/ErrorResponse.md +29 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/Inbox.md +38 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/InboxListResponse.md +29 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/InboxResponse.md +29 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/InboxesApi.md +337 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/MetricsApi.md +83 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/MetricsData.md +35 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/MetricsResponse.md +29 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/OkResponse.md +29 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/PlanLimits.md +32 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/SendEmailRequest.md +32 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/UpdateEmailReadRequest.md +29 -0
- package/sdks/python/generated/emailagent_sdk_generated/docs/UpdateInboxRequest.md +29 -0
- package/sdks/python/generated/emailagent_sdk_generated/exceptions.py +216 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/__init__.py +41 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/api_key_created.py +113 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/api_key_created_response.py +91 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/api_key_list_item.py +123 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/api_key_list_response.py +95 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/create_api_key_request.py +93 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/create_api_key_request_scopes.py +143 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/create_domain_request.py +87 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/create_inbox_request.py +91 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/domain.py +134 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/domain_list_response.py +95 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/domain_response.py +91 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/email.py +175 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/email_list_response.py +95 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/email_response.py +91 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/error_response.py +87 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/inbox.py +136 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/inbox_list_response.py +95 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/inbox_response.py +91 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/metrics_data.py +110 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/metrics_response.py +91 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/ok_response.py +87 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/plan_limits.py +93 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/send_email_request.py +93 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/update_email_read_request.py +87 -0
- package/sdks/python/generated/emailagent_sdk_generated/models/update_inbox_request.py +92 -0
- package/sdks/python/generated/emailagent_sdk_generated/rest.py +258 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/__init__.py +0 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_api_key_created.py +68 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_api_key_created_response.py +52 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_api_key_list_item.py +66 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_api_key_list_response.py +56 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_api_keys_api.py +59 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_create_api_key_request.py +53 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_create_api_key_request_scopes.py +50 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_create_domain_request.py +52 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_create_inbox_request.py +54 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_domain.py +70 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_domain_list_response.py +56 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_domain_response.py +52 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_domains_api.py +59 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_email.py +79 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_email_list_response.py +56 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_email_response.py +52 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_emails_api.py +59 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_error_response.py +52 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_inbox.py +68 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_inbox_list_response.py +56 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_inbox_response.py +52 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_inboxes_api.py +59 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_metrics_api.py +38 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_metrics_data.py +72 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_metrics_response.py +74 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_ok_response.py +52 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_plan_limits.py +58 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_send_email_request.py +56 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_update_email_read_request.py +52 -0
- package/sdks/python/generated/emailagent_sdk_generated/test/test_update_inbox_request.py +52 -0
- package/sdks/python/generated/emailagent_sdk_generated_README.md +140 -0
- package/sdks/python/openapitools.json +7 -0
- package/sdks/python/pyproject.toml +19 -0
- package/sdks/typescript/README.md +41 -0
- package/sdks/typescript/generated/.openapi-generator/FILES +41 -0
- package/sdks/typescript/generated/.openapi-generator/VERSION +1 -0
- package/sdks/typescript/generated/.openapi-generator-ignore +23 -0
- package/sdks/typescript/generated/package.json +21 -0
- package/sdks/typescript/generated/src/apis/APIKeysApi.ts +314 -0
- package/sdks/typescript/generated/src/apis/DomainsApi.ts +314 -0
- package/sdks/typescript/generated/src/apis/EmailsApi.ts +350 -0
- package/sdks/typescript/generated/src/apis/InboxesApi.ts +329 -0
- package/sdks/typescript/generated/src/apis/MetricsApi.ts +93 -0
- package/sdks/typescript/generated/src/apis/index.ts +7 -0
- package/sdks/typescript/generated/src/index.ts +5 -0
- package/sdks/typescript/generated/src/models/ApiKeyCreated.ts +123 -0
- package/sdks/typescript/generated/src/models/ApiKeyCreatedResponse.ts +74 -0
- package/sdks/typescript/generated/src/models/ApiKeyListItem.ts +121 -0
- package/sdks/typescript/generated/src/models/ApiKeyListResponse.ts +74 -0
- package/sdks/typescript/generated/src/models/CreateApiKeyRequest.ts +82 -0
- package/sdks/typescript/generated/src/models/CreateApiKeyRequestScopes.ts +45 -0
- package/sdks/typescript/generated/src/models/CreateDomainRequest.ts +66 -0
- package/sdks/typescript/generated/src/models/CreateInboxRequest.ts +82 -0
- package/sdks/typescript/generated/src/models/Domain.ts +152 -0
- package/sdks/typescript/generated/src/models/DomainListResponse.ts +74 -0
- package/sdks/typescript/generated/src/models/DomainResponse.ts +74 -0
- package/sdks/typescript/generated/src/models/Email.ts +222 -0
- package/sdks/typescript/generated/src/models/EmailListResponse.ts +74 -0
- package/sdks/typescript/generated/src/models/EmailResponse.ts +74 -0
- package/sdks/typescript/generated/src/models/ErrorResponse.ts +66 -0
- package/sdks/typescript/generated/src/models/Inbox.ts +159 -0
- package/sdks/typescript/generated/src/models/InboxListResponse.ts +74 -0
- package/sdks/typescript/generated/src/models/InboxResponse.ts +74 -0
- package/sdks/typescript/generated/src/models/MetricsData.ts +139 -0
- package/sdks/typescript/generated/src/models/MetricsResponse.ts +74 -0
- package/sdks/typescript/generated/src/models/OkResponse.ts +66 -0
- package/sdks/typescript/generated/src/models/PlanLimits.ts +93 -0
- package/sdks/typescript/generated/src/models/SendEmailRequest.ts +91 -0
- package/sdks/typescript/generated/src/models/UpdateEmailReadRequest.ts +66 -0
- package/sdks/typescript/generated/src/models/UpdateInboxRequest.ts +66 -0
- package/sdks/typescript/generated/src/models/index.ts +27 -0
- package/sdks/typescript/generated/src/runtime.ts +432 -0
- package/sdks/typescript/generated/tsconfig.esm.json +7 -0
- package/sdks/typescript/generated/tsconfig.json +16 -0
- package/sdks/typescript/openapitools.json +8 -0
- package/sdks/typescript/package.json +27 -0
- package/sdks/typescript/src/index.ts +138 -0
- package/sdks/typescript/tsconfig.json +14 -0
- package/sql/001_init.sql +143 -0
- package/sql/002_local_auth.sql +38 -0
- package/sql/003_domain_routes.sql +2 -0
- package/sql/004_reliability_primitives.sql +75 -0
- package/sql/005_auth_email_flows.sql +22 -0
- package/src/config.js +30 -0
- package/src/db.js +25 -0
- package/src/lib/api-auth.js +55 -0
- package/src/lib/auth.js +71 -0
- package/src/lib/csrf.js +46 -0
- package/src/lib/dodo.js +67 -0
- package/src/lib/email-templates.js +67 -0
- package/src/lib/idempotency.js +85 -0
- package/src/lib/mailgun.js +188 -0
- package/src/lib/plan.js +24 -0
- package/src/lib/rate-limit.js +43 -0
- package/src/lib/security.js +62 -0
- package/src/lib/session.js +21 -0
- package/src/lib/store.js +638 -0
- package/src/lib/transactional-mailer.js +54 -0
- package/src/lib/validation.js +30 -0
- package/src/routes/api.js +485 -0
- package/src/routes/app.js +699 -0
- package/src/routes/auth.js +404 -0
- package/src/routes/webhooks.js +257 -0
- package/src/server.js +79 -0
- package/src/views/pages/admin.ejs +58 -0
- package/src/views/pages/api-keys.ejs +56 -0
- package/src/views/pages/billing.ejs +71 -0
- package/src/views/pages/domains.ejs +106 -0
- package/src/views/pages/inboxes.ejs +127 -0
- package/src/views/pages/login.ejs +57 -0
- package/src/views/pages/metrics.ejs +34 -0
- package/src/views/pages/reset-password.ejs +19 -0
- package/src/views/partials/bottom.ejs +3 -0
- package/src/views/partials/csrf-field.ejs +3 -0
- package/src/views/partials/flash.ejs +3 -0
- package/src/views/partials/top.ejs +130 -0
|
@@ -0,0 +1,1168 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
EmailAgent API
|
|
5
|
+
|
|
6
|
+
API for creating agent inboxes, sending emails, managing custom domains, managing API keys, and reading usage metrics. Authentication uses API keys via `Authorization: Bearer <api_key>`. For mutating endpoints, send an optional `Idempotency-Key` header. - Replaying the same key with the same payload returns the original response. - Reusing a key with a different payload returns `409`.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictStr
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from emailagent_sdk_generated.models.create_domain_request import CreateDomainRequest
|
|
23
|
+
from emailagent_sdk_generated.models.domain_list_response import DomainListResponse
|
|
24
|
+
from emailagent_sdk_generated.models.domain_response import DomainResponse
|
|
25
|
+
from emailagent_sdk_generated.models.ok_response import OkResponse
|
|
26
|
+
|
|
27
|
+
from emailagent_sdk_generated.api_client import ApiClient, RequestSerialized
|
|
28
|
+
from emailagent_sdk_generated.api_response import ApiResponse
|
|
29
|
+
from emailagent_sdk_generated.rest import RESTResponseType
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class DomainsApi:
|
|
33
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
34
|
+
Ref: https://openapi-generator.tech
|
|
35
|
+
|
|
36
|
+
Do not edit the class manually.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def __init__(self, api_client=None) -> None:
|
|
40
|
+
if api_client is None:
|
|
41
|
+
api_client = ApiClient.get_default()
|
|
42
|
+
self.api_client = api_client
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@validate_call
|
|
46
|
+
def create_domain(
|
|
47
|
+
self,
|
|
48
|
+
create_domain_request: CreateDomainRequest,
|
|
49
|
+
idempotency_key: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]], Field(description="Optional key for safe retries of mutating operations.")] = None,
|
|
50
|
+
_request_timeout: Union[
|
|
51
|
+
None,
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Tuple[
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
56
|
+
]
|
|
57
|
+
] = None,
|
|
58
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_content_type: Optional[StrictStr] = None,
|
|
60
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
62
|
+
) -> DomainResponse:
|
|
63
|
+
"""Create custom domain
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
:param create_domain_request: (required)
|
|
67
|
+
:type create_domain_request: CreateDomainRequest
|
|
68
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
69
|
+
:type idempotency_key: str
|
|
70
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
71
|
+
number provided, it will be total request
|
|
72
|
+
timeout. It can also be a pair (tuple) of
|
|
73
|
+
(connection, read) timeouts.
|
|
74
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
75
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
76
|
+
request; this effectively ignores the
|
|
77
|
+
authentication in the spec for a single request.
|
|
78
|
+
:type _request_auth: dict, optional
|
|
79
|
+
:param _content_type: force content-type for the request.
|
|
80
|
+
:type _content_type: str, Optional
|
|
81
|
+
:param _headers: set to override the headers for a single
|
|
82
|
+
request; this effectively ignores the headers
|
|
83
|
+
in the spec for a single request.
|
|
84
|
+
:type _headers: dict, optional
|
|
85
|
+
:param _host_index: set to override the host_index for a single
|
|
86
|
+
request; this effectively ignores the host_index
|
|
87
|
+
in the spec for a single request.
|
|
88
|
+
:type _host_index: int, optional
|
|
89
|
+
:return: Returns the result object.
|
|
90
|
+
""" # noqa: E501
|
|
91
|
+
|
|
92
|
+
_param = self._create_domain_serialize(
|
|
93
|
+
create_domain_request=create_domain_request,
|
|
94
|
+
idempotency_key=idempotency_key,
|
|
95
|
+
_request_auth=_request_auth,
|
|
96
|
+
_content_type=_content_type,
|
|
97
|
+
_headers=_headers,
|
|
98
|
+
_host_index=_host_index
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
102
|
+
'201': "DomainResponse",
|
|
103
|
+
'400': "ErrorResponse",
|
|
104
|
+
'401': "ErrorResponse",
|
|
105
|
+
'403': "ErrorResponse",
|
|
106
|
+
'409': "ErrorResponse",
|
|
107
|
+
'422': "ErrorResponse",
|
|
108
|
+
'500': "ErrorResponse",
|
|
109
|
+
}
|
|
110
|
+
response_data = self.api_client.call_api(
|
|
111
|
+
*_param,
|
|
112
|
+
_request_timeout=_request_timeout
|
|
113
|
+
)
|
|
114
|
+
response_data.read()
|
|
115
|
+
return self.api_client.response_deserialize(
|
|
116
|
+
response_data=response_data,
|
|
117
|
+
response_types_map=_response_types_map,
|
|
118
|
+
).data
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
@validate_call
|
|
122
|
+
def create_domain_with_http_info(
|
|
123
|
+
self,
|
|
124
|
+
create_domain_request: CreateDomainRequest,
|
|
125
|
+
idempotency_key: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]], Field(description="Optional key for safe retries of mutating operations.")] = None,
|
|
126
|
+
_request_timeout: Union[
|
|
127
|
+
None,
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Tuple[
|
|
130
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
132
|
+
]
|
|
133
|
+
] = None,
|
|
134
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_content_type: Optional[StrictStr] = None,
|
|
136
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
137
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
138
|
+
) -> ApiResponse[DomainResponse]:
|
|
139
|
+
"""Create custom domain
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
:param create_domain_request: (required)
|
|
143
|
+
:type create_domain_request: CreateDomainRequest
|
|
144
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
145
|
+
:type idempotency_key: str
|
|
146
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
147
|
+
number provided, it will be total request
|
|
148
|
+
timeout. It can also be a pair (tuple) of
|
|
149
|
+
(connection, read) timeouts.
|
|
150
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
151
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
152
|
+
request; this effectively ignores the
|
|
153
|
+
authentication in the spec for a single request.
|
|
154
|
+
:type _request_auth: dict, optional
|
|
155
|
+
:param _content_type: force content-type for the request.
|
|
156
|
+
:type _content_type: str, Optional
|
|
157
|
+
:param _headers: set to override the headers for a single
|
|
158
|
+
request; this effectively ignores the headers
|
|
159
|
+
in the spec for a single request.
|
|
160
|
+
:type _headers: dict, optional
|
|
161
|
+
:param _host_index: set to override the host_index for a single
|
|
162
|
+
request; this effectively ignores the host_index
|
|
163
|
+
in the spec for a single request.
|
|
164
|
+
:type _host_index: int, optional
|
|
165
|
+
:return: Returns the result object.
|
|
166
|
+
""" # noqa: E501
|
|
167
|
+
|
|
168
|
+
_param = self._create_domain_serialize(
|
|
169
|
+
create_domain_request=create_domain_request,
|
|
170
|
+
idempotency_key=idempotency_key,
|
|
171
|
+
_request_auth=_request_auth,
|
|
172
|
+
_content_type=_content_type,
|
|
173
|
+
_headers=_headers,
|
|
174
|
+
_host_index=_host_index
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
178
|
+
'201': "DomainResponse",
|
|
179
|
+
'400': "ErrorResponse",
|
|
180
|
+
'401': "ErrorResponse",
|
|
181
|
+
'403': "ErrorResponse",
|
|
182
|
+
'409': "ErrorResponse",
|
|
183
|
+
'422': "ErrorResponse",
|
|
184
|
+
'500': "ErrorResponse",
|
|
185
|
+
}
|
|
186
|
+
response_data = self.api_client.call_api(
|
|
187
|
+
*_param,
|
|
188
|
+
_request_timeout=_request_timeout
|
|
189
|
+
)
|
|
190
|
+
response_data.read()
|
|
191
|
+
return self.api_client.response_deserialize(
|
|
192
|
+
response_data=response_data,
|
|
193
|
+
response_types_map=_response_types_map,
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
@validate_call
|
|
198
|
+
def create_domain_without_preload_content(
|
|
199
|
+
self,
|
|
200
|
+
create_domain_request: CreateDomainRequest,
|
|
201
|
+
idempotency_key: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]], Field(description="Optional key for safe retries of mutating operations.")] = None,
|
|
202
|
+
_request_timeout: Union[
|
|
203
|
+
None,
|
|
204
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
205
|
+
Tuple[
|
|
206
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
207
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
208
|
+
]
|
|
209
|
+
] = None,
|
|
210
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
211
|
+
_content_type: Optional[StrictStr] = None,
|
|
212
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
213
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
214
|
+
) -> RESTResponseType:
|
|
215
|
+
"""Create custom domain
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
:param create_domain_request: (required)
|
|
219
|
+
:type create_domain_request: CreateDomainRequest
|
|
220
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
221
|
+
:type idempotency_key: str
|
|
222
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
223
|
+
number provided, it will be total request
|
|
224
|
+
timeout. It can also be a pair (tuple) of
|
|
225
|
+
(connection, read) timeouts.
|
|
226
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
227
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
228
|
+
request; this effectively ignores the
|
|
229
|
+
authentication in the spec for a single request.
|
|
230
|
+
:type _request_auth: dict, optional
|
|
231
|
+
:param _content_type: force content-type for the request.
|
|
232
|
+
:type _content_type: str, Optional
|
|
233
|
+
:param _headers: set to override the headers for a single
|
|
234
|
+
request; this effectively ignores the headers
|
|
235
|
+
in the spec for a single request.
|
|
236
|
+
:type _headers: dict, optional
|
|
237
|
+
:param _host_index: set to override the host_index for a single
|
|
238
|
+
request; this effectively ignores the host_index
|
|
239
|
+
in the spec for a single request.
|
|
240
|
+
:type _host_index: int, optional
|
|
241
|
+
:return: Returns the result object.
|
|
242
|
+
""" # noqa: E501
|
|
243
|
+
|
|
244
|
+
_param = self._create_domain_serialize(
|
|
245
|
+
create_domain_request=create_domain_request,
|
|
246
|
+
idempotency_key=idempotency_key,
|
|
247
|
+
_request_auth=_request_auth,
|
|
248
|
+
_content_type=_content_type,
|
|
249
|
+
_headers=_headers,
|
|
250
|
+
_host_index=_host_index
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
254
|
+
'201': "DomainResponse",
|
|
255
|
+
'400': "ErrorResponse",
|
|
256
|
+
'401': "ErrorResponse",
|
|
257
|
+
'403': "ErrorResponse",
|
|
258
|
+
'409': "ErrorResponse",
|
|
259
|
+
'422': "ErrorResponse",
|
|
260
|
+
'500': "ErrorResponse",
|
|
261
|
+
}
|
|
262
|
+
response_data = self.api_client.call_api(
|
|
263
|
+
*_param,
|
|
264
|
+
_request_timeout=_request_timeout
|
|
265
|
+
)
|
|
266
|
+
return response_data.response
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
def _create_domain_serialize(
|
|
270
|
+
self,
|
|
271
|
+
create_domain_request,
|
|
272
|
+
idempotency_key,
|
|
273
|
+
_request_auth,
|
|
274
|
+
_content_type,
|
|
275
|
+
_headers,
|
|
276
|
+
_host_index,
|
|
277
|
+
) -> RequestSerialized:
|
|
278
|
+
|
|
279
|
+
_host = None
|
|
280
|
+
|
|
281
|
+
_collection_formats: Dict[str, str] = {
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
_path_params: Dict[str, str] = {}
|
|
285
|
+
_query_params: List[Tuple[str, str]] = []
|
|
286
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
287
|
+
_form_params: List[Tuple[str, str]] = []
|
|
288
|
+
_files: Dict[
|
|
289
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
290
|
+
] = {}
|
|
291
|
+
_body_params: Optional[bytes] = None
|
|
292
|
+
|
|
293
|
+
# process the path parameters
|
|
294
|
+
# process the query parameters
|
|
295
|
+
# process the header parameters
|
|
296
|
+
if idempotency_key is not None:
|
|
297
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
298
|
+
# process the form parameters
|
|
299
|
+
# process the body parameter
|
|
300
|
+
if create_domain_request is not None:
|
|
301
|
+
_body_params = create_domain_request
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
# set the HTTP header `Accept`
|
|
305
|
+
if 'Accept' not in _header_params:
|
|
306
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
307
|
+
[
|
|
308
|
+
'application/json'
|
|
309
|
+
]
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
# set the HTTP header `Content-Type`
|
|
313
|
+
if _content_type:
|
|
314
|
+
_header_params['Content-Type'] = _content_type
|
|
315
|
+
else:
|
|
316
|
+
_default_content_type = (
|
|
317
|
+
self.api_client.select_header_content_type(
|
|
318
|
+
[
|
|
319
|
+
'application/json'
|
|
320
|
+
]
|
|
321
|
+
)
|
|
322
|
+
)
|
|
323
|
+
if _default_content_type is not None:
|
|
324
|
+
_header_params['Content-Type'] = _default_content_type
|
|
325
|
+
|
|
326
|
+
# authentication setting
|
|
327
|
+
_auth_settings: List[str] = [
|
|
328
|
+
'bearerAuth'
|
|
329
|
+
]
|
|
330
|
+
|
|
331
|
+
return self.api_client.param_serialize(
|
|
332
|
+
method='POST',
|
|
333
|
+
resource_path='/api/v1/domains',
|
|
334
|
+
path_params=_path_params,
|
|
335
|
+
query_params=_query_params,
|
|
336
|
+
header_params=_header_params,
|
|
337
|
+
body=_body_params,
|
|
338
|
+
post_params=_form_params,
|
|
339
|
+
files=_files,
|
|
340
|
+
auth_settings=_auth_settings,
|
|
341
|
+
collection_formats=_collection_formats,
|
|
342
|
+
_host=_host,
|
|
343
|
+
_request_auth=_request_auth
|
|
344
|
+
)
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
@validate_call
|
|
350
|
+
def delete_domain(
|
|
351
|
+
self,
|
|
352
|
+
id: StrictStr,
|
|
353
|
+
idempotency_key: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]], Field(description="Optional key for safe retries of mutating operations.")] = None,
|
|
354
|
+
_request_timeout: Union[
|
|
355
|
+
None,
|
|
356
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
357
|
+
Tuple[
|
|
358
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
359
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
360
|
+
]
|
|
361
|
+
] = None,
|
|
362
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
363
|
+
_content_type: Optional[StrictStr] = None,
|
|
364
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
365
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
366
|
+
) -> OkResponse:
|
|
367
|
+
"""Delete custom domain
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
:param id: (required)
|
|
371
|
+
:type id: str
|
|
372
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
373
|
+
:type idempotency_key: str
|
|
374
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
375
|
+
number provided, it will be total request
|
|
376
|
+
timeout. It can also be a pair (tuple) of
|
|
377
|
+
(connection, read) timeouts.
|
|
378
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
379
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
380
|
+
request; this effectively ignores the
|
|
381
|
+
authentication in the spec for a single request.
|
|
382
|
+
:type _request_auth: dict, optional
|
|
383
|
+
:param _content_type: force content-type for the request.
|
|
384
|
+
:type _content_type: str, Optional
|
|
385
|
+
:param _headers: set to override the headers for a single
|
|
386
|
+
request; this effectively ignores the headers
|
|
387
|
+
in the spec for a single request.
|
|
388
|
+
:type _headers: dict, optional
|
|
389
|
+
:param _host_index: set to override the host_index for a single
|
|
390
|
+
request; this effectively ignores the host_index
|
|
391
|
+
in the spec for a single request.
|
|
392
|
+
:type _host_index: int, optional
|
|
393
|
+
:return: Returns the result object.
|
|
394
|
+
""" # noqa: E501
|
|
395
|
+
|
|
396
|
+
_param = self._delete_domain_serialize(
|
|
397
|
+
id=id,
|
|
398
|
+
idempotency_key=idempotency_key,
|
|
399
|
+
_request_auth=_request_auth,
|
|
400
|
+
_content_type=_content_type,
|
|
401
|
+
_headers=_headers,
|
|
402
|
+
_host_index=_host_index
|
|
403
|
+
)
|
|
404
|
+
|
|
405
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
406
|
+
'200': "OkResponse",
|
|
407
|
+
'401': "ErrorResponse",
|
|
408
|
+
'403': "ErrorResponse",
|
|
409
|
+
'404': "ErrorResponse",
|
|
410
|
+
'409': "ErrorResponse",
|
|
411
|
+
}
|
|
412
|
+
response_data = self.api_client.call_api(
|
|
413
|
+
*_param,
|
|
414
|
+
_request_timeout=_request_timeout
|
|
415
|
+
)
|
|
416
|
+
response_data.read()
|
|
417
|
+
return self.api_client.response_deserialize(
|
|
418
|
+
response_data=response_data,
|
|
419
|
+
response_types_map=_response_types_map,
|
|
420
|
+
).data
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
@validate_call
|
|
424
|
+
def delete_domain_with_http_info(
|
|
425
|
+
self,
|
|
426
|
+
id: StrictStr,
|
|
427
|
+
idempotency_key: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]], Field(description="Optional key for safe retries of mutating operations.")] = None,
|
|
428
|
+
_request_timeout: Union[
|
|
429
|
+
None,
|
|
430
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
431
|
+
Tuple[
|
|
432
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
433
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
434
|
+
]
|
|
435
|
+
] = None,
|
|
436
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
437
|
+
_content_type: Optional[StrictStr] = None,
|
|
438
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
439
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
440
|
+
) -> ApiResponse[OkResponse]:
|
|
441
|
+
"""Delete custom domain
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
:param id: (required)
|
|
445
|
+
:type id: str
|
|
446
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
447
|
+
:type idempotency_key: str
|
|
448
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
449
|
+
number provided, it will be total request
|
|
450
|
+
timeout. It can also be a pair (tuple) of
|
|
451
|
+
(connection, read) timeouts.
|
|
452
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
453
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
454
|
+
request; this effectively ignores the
|
|
455
|
+
authentication in the spec for a single request.
|
|
456
|
+
:type _request_auth: dict, optional
|
|
457
|
+
:param _content_type: force content-type for the request.
|
|
458
|
+
:type _content_type: str, Optional
|
|
459
|
+
:param _headers: set to override the headers for a single
|
|
460
|
+
request; this effectively ignores the headers
|
|
461
|
+
in the spec for a single request.
|
|
462
|
+
:type _headers: dict, optional
|
|
463
|
+
:param _host_index: set to override the host_index for a single
|
|
464
|
+
request; this effectively ignores the host_index
|
|
465
|
+
in the spec for a single request.
|
|
466
|
+
:type _host_index: int, optional
|
|
467
|
+
:return: Returns the result object.
|
|
468
|
+
""" # noqa: E501
|
|
469
|
+
|
|
470
|
+
_param = self._delete_domain_serialize(
|
|
471
|
+
id=id,
|
|
472
|
+
idempotency_key=idempotency_key,
|
|
473
|
+
_request_auth=_request_auth,
|
|
474
|
+
_content_type=_content_type,
|
|
475
|
+
_headers=_headers,
|
|
476
|
+
_host_index=_host_index
|
|
477
|
+
)
|
|
478
|
+
|
|
479
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
480
|
+
'200': "OkResponse",
|
|
481
|
+
'401': "ErrorResponse",
|
|
482
|
+
'403': "ErrorResponse",
|
|
483
|
+
'404': "ErrorResponse",
|
|
484
|
+
'409': "ErrorResponse",
|
|
485
|
+
}
|
|
486
|
+
response_data = self.api_client.call_api(
|
|
487
|
+
*_param,
|
|
488
|
+
_request_timeout=_request_timeout
|
|
489
|
+
)
|
|
490
|
+
response_data.read()
|
|
491
|
+
return self.api_client.response_deserialize(
|
|
492
|
+
response_data=response_data,
|
|
493
|
+
response_types_map=_response_types_map,
|
|
494
|
+
)
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
@validate_call
|
|
498
|
+
def delete_domain_without_preload_content(
|
|
499
|
+
self,
|
|
500
|
+
id: StrictStr,
|
|
501
|
+
idempotency_key: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]], Field(description="Optional key for safe retries of mutating operations.")] = None,
|
|
502
|
+
_request_timeout: Union[
|
|
503
|
+
None,
|
|
504
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
505
|
+
Tuple[
|
|
506
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
507
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
508
|
+
]
|
|
509
|
+
] = None,
|
|
510
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
511
|
+
_content_type: Optional[StrictStr] = None,
|
|
512
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
513
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
514
|
+
) -> RESTResponseType:
|
|
515
|
+
"""Delete custom domain
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
:param id: (required)
|
|
519
|
+
:type id: str
|
|
520
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
521
|
+
:type idempotency_key: str
|
|
522
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
523
|
+
number provided, it will be total request
|
|
524
|
+
timeout. It can also be a pair (tuple) of
|
|
525
|
+
(connection, read) timeouts.
|
|
526
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
527
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
528
|
+
request; this effectively ignores the
|
|
529
|
+
authentication in the spec for a single request.
|
|
530
|
+
:type _request_auth: dict, optional
|
|
531
|
+
:param _content_type: force content-type for the request.
|
|
532
|
+
:type _content_type: str, Optional
|
|
533
|
+
:param _headers: set to override the headers for a single
|
|
534
|
+
request; this effectively ignores the headers
|
|
535
|
+
in the spec for a single request.
|
|
536
|
+
:type _headers: dict, optional
|
|
537
|
+
:param _host_index: set to override the host_index for a single
|
|
538
|
+
request; this effectively ignores the host_index
|
|
539
|
+
in the spec for a single request.
|
|
540
|
+
:type _host_index: int, optional
|
|
541
|
+
:return: Returns the result object.
|
|
542
|
+
""" # noqa: E501
|
|
543
|
+
|
|
544
|
+
_param = self._delete_domain_serialize(
|
|
545
|
+
id=id,
|
|
546
|
+
idempotency_key=idempotency_key,
|
|
547
|
+
_request_auth=_request_auth,
|
|
548
|
+
_content_type=_content_type,
|
|
549
|
+
_headers=_headers,
|
|
550
|
+
_host_index=_host_index
|
|
551
|
+
)
|
|
552
|
+
|
|
553
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
554
|
+
'200': "OkResponse",
|
|
555
|
+
'401': "ErrorResponse",
|
|
556
|
+
'403': "ErrorResponse",
|
|
557
|
+
'404': "ErrorResponse",
|
|
558
|
+
'409': "ErrorResponse",
|
|
559
|
+
}
|
|
560
|
+
response_data = self.api_client.call_api(
|
|
561
|
+
*_param,
|
|
562
|
+
_request_timeout=_request_timeout
|
|
563
|
+
)
|
|
564
|
+
return response_data.response
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
def _delete_domain_serialize(
|
|
568
|
+
self,
|
|
569
|
+
id,
|
|
570
|
+
idempotency_key,
|
|
571
|
+
_request_auth,
|
|
572
|
+
_content_type,
|
|
573
|
+
_headers,
|
|
574
|
+
_host_index,
|
|
575
|
+
) -> RequestSerialized:
|
|
576
|
+
|
|
577
|
+
_host = None
|
|
578
|
+
|
|
579
|
+
_collection_formats: Dict[str, str] = {
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
_path_params: Dict[str, str] = {}
|
|
583
|
+
_query_params: List[Tuple[str, str]] = []
|
|
584
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
585
|
+
_form_params: List[Tuple[str, str]] = []
|
|
586
|
+
_files: Dict[
|
|
587
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
588
|
+
] = {}
|
|
589
|
+
_body_params: Optional[bytes] = None
|
|
590
|
+
|
|
591
|
+
# process the path parameters
|
|
592
|
+
if id is not None:
|
|
593
|
+
_path_params['id'] = id
|
|
594
|
+
# process the query parameters
|
|
595
|
+
# process the header parameters
|
|
596
|
+
if idempotency_key is not None:
|
|
597
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
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
|
+
'bearerAuth'
|
|
614
|
+
]
|
|
615
|
+
|
|
616
|
+
return self.api_client.param_serialize(
|
|
617
|
+
method='DELETE',
|
|
618
|
+
resource_path='/api/v1/domains/{id}',
|
|
619
|
+
path_params=_path_params,
|
|
620
|
+
query_params=_query_params,
|
|
621
|
+
header_params=_header_params,
|
|
622
|
+
body=_body_params,
|
|
623
|
+
post_params=_form_params,
|
|
624
|
+
files=_files,
|
|
625
|
+
auth_settings=_auth_settings,
|
|
626
|
+
collection_formats=_collection_formats,
|
|
627
|
+
_host=_host,
|
|
628
|
+
_request_auth=_request_auth
|
|
629
|
+
)
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
@validate_call
|
|
635
|
+
def list_domains(
|
|
636
|
+
self,
|
|
637
|
+
_request_timeout: Union[
|
|
638
|
+
None,
|
|
639
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
640
|
+
Tuple[
|
|
641
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
642
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
643
|
+
]
|
|
644
|
+
] = None,
|
|
645
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
646
|
+
_content_type: Optional[StrictStr] = None,
|
|
647
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
648
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
649
|
+
) -> DomainListResponse:
|
|
650
|
+
"""List custom domains
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
654
|
+
number provided, it will be total request
|
|
655
|
+
timeout. It can also be a pair (tuple) of
|
|
656
|
+
(connection, read) timeouts.
|
|
657
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
658
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
659
|
+
request; this effectively ignores the
|
|
660
|
+
authentication in the spec for a single request.
|
|
661
|
+
:type _request_auth: dict, optional
|
|
662
|
+
:param _content_type: force content-type for the request.
|
|
663
|
+
:type _content_type: str, Optional
|
|
664
|
+
:param _headers: set to override the headers for a single
|
|
665
|
+
request; this effectively ignores the headers
|
|
666
|
+
in the spec for a single request.
|
|
667
|
+
:type _headers: dict, optional
|
|
668
|
+
:param _host_index: set to override the host_index for a single
|
|
669
|
+
request; this effectively ignores the host_index
|
|
670
|
+
in the spec for a single request.
|
|
671
|
+
:type _host_index: int, optional
|
|
672
|
+
:return: Returns the result object.
|
|
673
|
+
""" # noqa: E501
|
|
674
|
+
|
|
675
|
+
_param = self._list_domains_serialize(
|
|
676
|
+
_request_auth=_request_auth,
|
|
677
|
+
_content_type=_content_type,
|
|
678
|
+
_headers=_headers,
|
|
679
|
+
_host_index=_host_index
|
|
680
|
+
)
|
|
681
|
+
|
|
682
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
683
|
+
'200': "DomainListResponse",
|
|
684
|
+
'401': "ErrorResponse",
|
|
685
|
+
'403': "ErrorResponse",
|
|
686
|
+
}
|
|
687
|
+
response_data = self.api_client.call_api(
|
|
688
|
+
*_param,
|
|
689
|
+
_request_timeout=_request_timeout
|
|
690
|
+
)
|
|
691
|
+
response_data.read()
|
|
692
|
+
return self.api_client.response_deserialize(
|
|
693
|
+
response_data=response_data,
|
|
694
|
+
response_types_map=_response_types_map,
|
|
695
|
+
).data
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
@validate_call
|
|
699
|
+
def list_domains_with_http_info(
|
|
700
|
+
self,
|
|
701
|
+
_request_timeout: Union[
|
|
702
|
+
None,
|
|
703
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
704
|
+
Tuple[
|
|
705
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
706
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
707
|
+
]
|
|
708
|
+
] = None,
|
|
709
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
710
|
+
_content_type: Optional[StrictStr] = None,
|
|
711
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
712
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
713
|
+
) -> ApiResponse[DomainListResponse]:
|
|
714
|
+
"""List custom domains
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
718
|
+
number provided, it will be total request
|
|
719
|
+
timeout. It can also be a pair (tuple) of
|
|
720
|
+
(connection, read) timeouts.
|
|
721
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
722
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
723
|
+
request; this effectively ignores the
|
|
724
|
+
authentication in the spec for a single request.
|
|
725
|
+
:type _request_auth: dict, optional
|
|
726
|
+
:param _content_type: force content-type for the request.
|
|
727
|
+
:type _content_type: str, Optional
|
|
728
|
+
:param _headers: set to override the headers for a single
|
|
729
|
+
request; this effectively ignores the headers
|
|
730
|
+
in the spec for a single request.
|
|
731
|
+
:type _headers: dict, optional
|
|
732
|
+
:param _host_index: set to override the host_index for a single
|
|
733
|
+
request; this effectively ignores the host_index
|
|
734
|
+
in the spec for a single request.
|
|
735
|
+
:type _host_index: int, optional
|
|
736
|
+
:return: Returns the result object.
|
|
737
|
+
""" # noqa: E501
|
|
738
|
+
|
|
739
|
+
_param = self._list_domains_serialize(
|
|
740
|
+
_request_auth=_request_auth,
|
|
741
|
+
_content_type=_content_type,
|
|
742
|
+
_headers=_headers,
|
|
743
|
+
_host_index=_host_index
|
|
744
|
+
)
|
|
745
|
+
|
|
746
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
747
|
+
'200': "DomainListResponse",
|
|
748
|
+
'401': "ErrorResponse",
|
|
749
|
+
'403': "ErrorResponse",
|
|
750
|
+
}
|
|
751
|
+
response_data = self.api_client.call_api(
|
|
752
|
+
*_param,
|
|
753
|
+
_request_timeout=_request_timeout
|
|
754
|
+
)
|
|
755
|
+
response_data.read()
|
|
756
|
+
return self.api_client.response_deserialize(
|
|
757
|
+
response_data=response_data,
|
|
758
|
+
response_types_map=_response_types_map,
|
|
759
|
+
)
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
@validate_call
|
|
763
|
+
def list_domains_without_preload_content(
|
|
764
|
+
self,
|
|
765
|
+
_request_timeout: Union[
|
|
766
|
+
None,
|
|
767
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
768
|
+
Tuple[
|
|
769
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
770
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
771
|
+
]
|
|
772
|
+
] = None,
|
|
773
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
774
|
+
_content_type: Optional[StrictStr] = None,
|
|
775
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
776
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
777
|
+
) -> RESTResponseType:
|
|
778
|
+
"""List custom domains
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
782
|
+
number provided, it will be total request
|
|
783
|
+
timeout. It can also be a pair (tuple) of
|
|
784
|
+
(connection, read) timeouts.
|
|
785
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
786
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
787
|
+
request; this effectively ignores the
|
|
788
|
+
authentication in the spec for a single request.
|
|
789
|
+
:type _request_auth: dict, optional
|
|
790
|
+
:param _content_type: force content-type for the request.
|
|
791
|
+
:type _content_type: str, Optional
|
|
792
|
+
:param _headers: set to override the headers for a single
|
|
793
|
+
request; this effectively ignores the headers
|
|
794
|
+
in the spec for a single request.
|
|
795
|
+
:type _headers: dict, optional
|
|
796
|
+
:param _host_index: set to override the host_index for a single
|
|
797
|
+
request; this effectively ignores the host_index
|
|
798
|
+
in the spec for a single request.
|
|
799
|
+
:type _host_index: int, optional
|
|
800
|
+
:return: Returns the result object.
|
|
801
|
+
""" # noqa: E501
|
|
802
|
+
|
|
803
|
+
_param = self._list_domains_serialize(
|
|
804
|
+
_request_auth=_request_auth,
|
|
805
|
+
_content_type=_content_type,
|
|
806
|
+
_headers=_headers,
|
|
807
|
+
_host_index=_host_index
|
|
808
|
+
)
|
|
809
|
+
|
|
810
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
811
|
+
'200': "DomainListResponse",
|
|
812
|
+
'401': "ErrorResponse",
|
|
813
|
+
'403': "ErrorResponse",
|
|
814
|
+
}
|
|
815
|
+
response_data = self.api_client.call_api(
|
|
816
|
+
*_param,
|
|
817
|
+
_request_timeout=_request_timeout
|
|
818
|
+
)
|
|
819
|
+
return response_data.response
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
def _list_domains_serialize(
|
|
823
|
+
self,
|
|
824
|
+
_request_auth,
|
|
825
|
+
_content_type,
|
|
826
|
+
_headers,
|
|
827
|
+
_host_index,
|
|
828
|
+
) -> RequestSerialized:
|
|
829
|
+
|
|
830
|
+
_host = None
|
|
831
|
+
|
|
832
|
+
_collection_formats: Dict[str, str] = {
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
_path_params: Dict[str, str] = {}
|
|
836
|
+
_query_params: List[Tuple[str, str]] = []
|
|
837
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
838
|
+
_form_params: List[Tuple[str, str]] = []
|
|
839
|
+
_files: Dict[
|
|
840
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
841
|
+
] = {}
|
|
842
|
+
_body_params: Optional[bytes] = None
|
|
843
|
+
|
|
844
|
+
# process the path parameters
|
|
845
|
+
# process the query parameters
|
|
846
|
+
# process the header parameters
|
|
847
|
+
# process the form parameters
|
|
848
|
+
# process the body parameter
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
# set the HTTP header `Accept`
|
|
852
|
+
if 'Accept' not in _header_params:
|
|
853
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
854
|
+
[
|
|
855
|
+
'application/json'
|
|
856
|
+
]
|
|
857
|
+
)
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
# authentication setting
|
|
861
|
+
_auth_settings: List[str] = [
|
|
862
|
+
'bearerAuth'
|
|
863
|
+
]
|
|
864
|
+
|
|
865
|
+
return self.api_client.param_serialize(
|
|
866
|
+
method='GET',
|
|
867
|
+
resource_path='/api/v1/domains',
|
|
868
|
+
path_params=_path_params,
|
|
869
|
+
query_params=_query_params,
|
|
870
|
+
header_params=_header_params,
|
|
871
|
+
body=_body_params,
|
|
872
|
+
post_params=_form_params,
|
|
873
|
+
files=_files,
|
|
874
|
+
auth_settings=_auth_settings,
|
|
875
|
+
collection_formats=_collection_formats,
|
|
876
|
+
_host=_host,
|
|
877
|
+
_request_auth=_request_auth
|
|
878
|
+
)
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
@validate_call
|
|
884
|
+
def verify_domain(
|
|
885
|
+
self,
|
|
886
|
+
id: StrictStr,
|
|
887
|
+
idempotency_key: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]], Field(description="Optional key for safe retries of mutating operations.")] = None,
|
|
888
|
+
_request_timeout: Union[
|
|
889
|
+
None,
|
|
890
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
891
|
+
Tuple[
|
|
892
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
893
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
894
|
+
]
|
|
895
|
+
] = None,
|
|
896
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
897
|
+
_content_type: Optional[StrictStr] = None,
|
|
898
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
899
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
900
|
+
) -> DomainResponse:
|
|
901
|
+
"""Refresh DNS verification status for a domain
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
:param id: (required)
|
|
905
|
+
:type id: str
|
|
906
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
907
|
+
:type idempotency_key: str
|
|
908
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
909
|
+
number provided, it will be total request
|
|
910
|
+
timeout. It can also be a pair (tuple) of
|
|
911
|
+
(connection, read) timeouts.
|
|
912
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
913
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
914
|
+
request; this effectively ignores the
|
|
915
|
+
authentication in the spec for a single request.
|
|
916
|
+
:type _request_auth: dict, optional
|
|
917
|
+
:param _content_type: force content-type for the request.
|
|
918
|
+
:type _content_type: str, Optional
|
|
919
|
+
:param _headers: set to override the headers for a single
|
|
920
|
+
request; this effectively ignores the headers
|
|
921
|
+
in the spec for a single request.
|
|
922
|
+
:type _headers: dict, optional
|
|
923
|
+
:param _host_index: set to override the host_index for a single
|
|
924
|
+
request; this effectively ignores the host_index
|
|
925
|
+
in the spec for a single request.
|
|
926
|
+
:type _host_index: int, optional
|
|
927
|
+
:return: Returns the result object.
|
|
928
|
+
""" # noqa: E501
|
|
929
|
+
|
|
930
|
+
_param = self._verify_domain_serialize(
|
|
931
|
+
id=id,
|
|
932
|
+
idempotency_key=idempotency_key,
|
|
933
|
+
_request_auth=_request_auth,
|
|
934
|
+
_content_type=_content_type,
|
|
935
|
+
_headers=_headers,
|
|
936
|
+
_host_index=_host_index
|
|
937
|
+
)
|
|
938
|
+
|
|
939
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
940
|
+
'200': "DomainResponse",
|
|
941
|
+
'401': "ErrorResponse",
|
|
942
|
+
'403': "ErrorResponse",
|
|
943
|
+
'404': "ErrorResponse",
|
|
944
|
+
'409': "ErrorResponse",
|
|
945
|
+
'500': "ErrorResponse",
|
|
946
|
+
}
|
|
947
|
+
response_data = self.api_client.call_api(
|
|
948
|
+
*_param,
|
|
949
|
+
_request_timeout=_request_timeout
|
|
950
|
+
)
|
|
951
|
+
response_data.read()
|
|
952
|
+
return self.api_client.response_deserialize(
|
|
953
|
+
response_data=response_data,
|
|
954
|
+
response_types_map=_response_types_map,
|
|
955
|
+
).data
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
@validate_call
|
|
959
|
+
def verify_domain_with_http_info(
|
|
960
|
+
self,
|
|
961
|
+
id: StrictStr,
|
|
962
|
+
idempotency_key: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]], Field(description="Optional key for safe retries of mutating operations.")] = None,
|
|
963
|
+
_request_timeout: Union[
|
|
964
|
+
None,
|
|
965
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
966
|
+
Tuple[
|
|
967
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
968
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
969
|
+
]
|
|
970
|
+
] = None,
|
|
971
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
972
|
+
_content_type: Optional[StrictStr] = None,
|
|
973
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
974
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
975
|
+
) -> ApiResponse[DomainResponse]:
|
|
976
|
+
"""Refresh DNS verification status for a domain
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
:param id: (required)
|
|
980
|
+
:type id: str
|
|
981
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
982
|
+
:type idempotency_key: str
|
|
983
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
984
|
+
number provided, it will be total request
|
|
985
|
+
timeout. It can also be a pair (tuple) of
|
|
986
|
+
(connection, read) timeouts.
|
|
987
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
988
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
989
|
+
request; this effectively ignores the
|
|
990
|
+
authentication in the spec for a single request.
|
|
991
|
+
:type _request_auth: dict, optional
|
|
992
|
+
:param _content_type: force content-type for the request.
|
|
993
|
+
:type _content_type: str, Optional
|
|
994
|
+
:param _headers: set to override the headers for a single
|
|
995
|
+
request; this effectively ignores the headers
|
|
996
|
+
in the spec for a single request.
|
|
997
|
+
:type _headers: dict, optional
|
|
998
|
+
:param _host_index: set to override the host_index for a single
|
|
999
|
+
request; this effectively ignores the host_index
|
|
1000
|
+
in the spec for a single request.
|
|
1001
|
+
:type _host_index: int, optional
|
|
1002
|
+
:return: Returns the result object.
|
|
1003
|
+
""" # noqa: E501
|
|
1004
|
+
|
|
1005
|
+
_param = self._verify_domain_serialize(
|
|
1006
|
+
id=id,
|
|
1007
|
+
idempotency_key=idempotency_key,
|
|
1008
|
+
_request_auth=_request_auth,
|
|
1009
|
+
_content_type=_content_type,
|
|
1010
|
+
_headers=_headers,
|
|
1011
|
+
_host_index=_host_index
|
|
1012
|
+
)
|
|
1013
|
+
|
|
1014
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1015
|
+
'200': "DomainResponse",
|
|
1016
|
+
'401': "ErrorResponse",
|
|
1017
|
+
'403': "ErrorResponse",
|
|
1018
|
+
'404': "ErrorResponse",
|
|
1019
|
+
'409': "ErrorResponse",
|
|
1020
|
+
'500': "ErrorResponse",
|
|
1021
|
+
}
|
|
1022
|
+
response_data = self.api_client.call_api(
|
|
1023
|
+
*_param,
|
|
1024
|
+
_request_timeout=_request_timeout
|
|
1025
|
+
)
|
|
1026
|
+
response_data.read()
|
|
1027
|
+
return self.api_client.response_deserialize(
|
|
1028
|
+
response_data=response_data,
|
|
1029
|
+
response_types_map=_response_types_map,
|
|
1030
|
+
)
|
|
1031
|
+
|
|
1032
|
+
|
|
1033
|
+
@validate_call
|
|
1034
|
+
def verify_domain_without_preload_content(
|
|
1035
|
+
self,
|
|
1036
|
+
id: StrictStr,
|
|
1037
|
+
idempotency_key: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]], Field(description="Optional key for safe retries of mutating operations.")] = None,
|
|
1038
|
+
_request_timeout: Union[
|
|
1039
|
+
None,
|
|
1040
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1041
|
+
Tuple[
|
|
1042
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1043
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1044
|
+
]
|
|
1045
|
+
] = None,
|
|
1046
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1047
|
+
_content_type: Optional[StrictStr] = None,
|
|
1048
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1049
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1050
|
+
) -> RESTResponseType:
|
|
1051
|
+
"""Refresh DNS verification status for a domain
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
:param id: (required)
|
|
1055
|
+
:type id: str
|
|
1056
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
1057
|
+
:type idempotency_key: str
|
|
1058
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1059
|
+
number provided, it will be total request
|
|
1060
|
+
timeout. It can also be a pair (tuple) of
|
|
1061
|
+
(connection, read) timeouts.
|
|
1062
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1063
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1064
|
+
request; this effectively ignores the
|
|
1065
|
+
authentication in the spec for a single request.
|
|
1066
|
+
:type _request_auth: dict, optional
|
|
1067
|
+
:param _content_type: force content-type for the request.
|
|
1068
|
+
:type _content_type: str, Optional
|
|
1069
|
+
:param _headers: set to override the headers for a single
|
|
1070
|
+
request; this effectively ignores the headers
|
|
1071
|
+
in the spec for a single request.
|
|
1072
|
+
:type _headers: dict, optional
|
|
1073
|
+
:param _host_index: set to override the host_index for a single
|
|
1074
|
+
request; this effectively ignores the host_index
|
|
1075
|
+
in the spec for a single request.
|
|
1076
|
+
:type _host_index: int, optional
|
|
1077
|
+
:return: Returns the result object.
|
|
1078
|
+
""" # noqa: E501
|
|
1079
|
+
|
|
1080
|
+
_param = self._verify_domain_serialize(
|
|
1081
|
+
id=id,
|
|
1082
|
+
idempotency_key=idempotency_key,
|
|
1083
|
+
_request_auth=_request_auth,
|
|
1084
|
+
_content_type=_content_type,
|
|
1085
|
+
_headers=_headers,
|
|
1086
|
+
_host_index=_host_index
|
|
1087
|
+
)
|
|
1088
|
+
|
|
1089
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1090
|
+
'200': "DomainResponse",
|
|
1091
|
+
'401': "ErrorResponse",
|
|
1092
|
+
'403': "ErrorResponse",
|
|
1093
|
+
'404': "ErrorResponse",
|
|
1094
|
+
'409': "ErrorResponse",
|
|
1095
|
+
'500': "ErrorResponse",
|
|
1096
|
+
}
|
|
1097
|
+
response_data = self.api_client.call_api(
|
|
1098
|
+
*_param,
|
|
1099
|
+
_request_timeout=_request_timeout
|
|
1100
|
+
)
|
|
1101
|
+
return response_data.response
|
|
1102
|
+
|
|
1103
|
+
|
|
1104
|
+
def _verify_domain_serialize(
|
|
1105
|
+
self,
|
|
1106
|
+
id,
|
|
1107
|
+
idempotency_key,
|
|
1108
|
+
_request_auth,
|
|
1109
|
+
_content_type,
|
|
1110
|
+
_headers,
|
|
1111
|
+
_host_index,
|
|
1112
|
+
) -> RequestSerialized:
|
|
1113
|
+
|
|
1114
|
+
_host = None
|
|
1115
|
+
|
|
1116
|
+
_collection_formats: Dict[str, str] = {
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
_path_params: Dict[str, str] = {}
|
|
1120
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1121
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1122
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1123
|
+
_files: Dict[
|
|
1124
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1125
|
+
] = {}
|
|
1126
|
+
_body_params: Optional[bytes] = None
|
|
1127
|
+
|
|
1128
|
+
# process the path parameters
|
|
1129
|
+
if id is not None:
|
|
1130
|
+
_path_params['id'] = id
|
|
1131
|
+
# process the query parameters
|
|
1132
|
+
# process the header parameters
|
|
1133
|
+
if idempotency_key is not None:
|
|
1134
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
1135
|
+
# process the form parameters
|
|
1136
|
+
# process the body parameter
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
# set the HTTP header `Accept`
|
|
1140
|
+
if 'Accept' not in _header_params:
|
|
1141
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1142
|
+
[
|
|
1143
|
+
'application/json'
|
|
1144
|
+
]
|
|
1145
|
+
)
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
# authentication setting
|
|
1149
|
+
_auth_settings: List[str] = [
|
|
1150
|
+
'bearerAuth'
|
|
1151
|
+
]
|
|
1152
|
+
|
|
1153
|
+
return self.api_client.param_serialize(
|
|
1154
|
+
method='POST',
|
|
1155
|
+
resource_path='/api/v1/domains/{id}/verify',
|
|
1156
|
+
path_params=_path_params,
|
|
1157
|
+
query_params=_query_params,
|
|
1158
|
+
header_params=_header_params,
|
|
1159
|
+
body=_body_params,
|
|
1160
|
+
post_params=_form_params,
|
|
1161
|
+
files=_files,
|
|
1162
|
+
auth_settings=_auth_settings,
|
|
1163
|
+
collection_formats=_collection_formats,
|
|
1164
|
+
_host=_host,
|
|
1165
|
+
_request_auth=_request_auth
|
|
1166
|
+
)
|
|
1167
|
+
|
|
1168
|
+
|