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,1191 @@
|
|
|
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_inbox_request import CreateInboxRequest
|
|
23
|
+
from emailagent_sdk_generated.models.inbox_list_response import InboxListResponse
|
|
24
|
+
from emailagent_sdk_generated.models.inbox_response import InboxResponse
|
|
25
|
+
from emailagent_sdk_generated.models.ok_response import OkResponse
|
|
26
|
+
from emailagent_sdk_generated.models.update_inbox_request import UpdateInboxRequest
|
|
27
|
+
|
|
28
|
+
from emailagent_sdk_generated.api_client import ApiClient, RequestSerialized
|
|
29
|
+
from emailagent_sdk_generated.api_response import ApiResponse
|
|
30
|
+
from emailagent_sdk_generated.rest import RESTResponseType
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class InboxesApi:
|
|
34
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
35
|
+
Ref: https://openapi-generator.tech
|
|
36
|
+
|
|
37
|
+
Do not edit the class manually.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
def __init__(self, api_client=None) -> None:
|
|
41
|
+
if api_client is None:
|
|
42
|
+
api_client = ApiClient.get_default()
|
|
43
|
+
self.api_client = api_client
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@validate_call
|
|
47
|
+
def create_inbox(
|
|
48
|
+
self,
|
|
49
|
+
create_inbox_request: CreateInboxRequest,
|
|
50
|
+
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,
|
|
51
|
+
_request_timeout: Union[
|
|
52
|
+
None,
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Tuple[
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
57
|
+
]
|
|
58
|
+
] = None,
|
|
59
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_content_type: Optional[StrictStr] = None,
|
|
61
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
63
|
+
) -> InboxResponse:
|
|
64
|
+
"""Create inbox
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
:param create_inbox_request: (required)
|
|
68
|
+
:type create_inbox_request: CreateInboxRequest
|
|
69
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
70
|
+
:type idempotency_key: str
|
|
71
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
72
|
+
number provided, it will be total request
|
|
73
|
+
timeout. It can also be a pair (tuple) of
|
|
74
|
+
(connection, read) timeouts.
|
|
75
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
76
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
77
|
+
request; this effectively ignores the
|
|
78
|
+
authentication in the spec for a single request.
|
|
79
|
+
:type _request_auth: dict, optional
|
|
80
|
+
:param _content_type: force content-type for the request.
|
|
81
|
+
:type _content_type: str, Optional
|
|
82
|
+
:param _headers: set to override the headers for a single
|
|
83
|
+
request; this effectively ignores the headers
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _headers: dict, optional
|
|
86
|
+
:param _host_index: set to override the host_index for a single
|
|
87
|
+
request; this effectively ignores the host_index
|
|
88
|
+
in the spec for a single request.
|
|
89
|
+
:type _host_index: int, optional
|
|
90
|
+
:return: Returns the result object.
|
|
91
|
+
""" # noqa: E501
|
|
92
|
+
|
|
93
|
+
_param = self._create_inbox_serialize(
|
|
94
|
+
create_inbox_request=create_inbox_request,
|
|
95
|
+
idempotency_key=idempotency_key,
|
|
96
|
+
_request_auth=_request_auth,
|
|
97
|
+
_content_type=_content_type,
|
|
98
|
+
_headers=_headers,
|
|
99
|
+
_host_index=_host_index
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
103
|
+
'201': "InboxResponse",
|
|
104
|
+
'400': "ErrorResponse",
|
|
105
|
+
'401': "ErrorResponse",
|
|
106
|
+
'403': "ErrorResponse",
|
|
107
|
+
'409': "ErrorResponse",
|
|
108
|
+
'422': "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_inbox_with_http_info(
|
|
123
|
+
self,
|
|
124
|
+
create_inbox_request: CreateInboxRequest,
|
|
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[InboxResponse]:
|
|
139
|
+
"""Create inbox
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
:param create_inbox_request: (required)
|
|
143
|
+
:type create_inbox_request: CreateInboxRequest
|
|
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_inbox_serialize(
|
|
169
|
+
create_inbox_request=create_inbox_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': "InboxResponse",
|
|
179
|
+
'400': "ErrorResponse",
|
|
180
|
+
'401': "ErrorResponse",
|
|
181
|
+
'403': "ErrorResponse",
|
|
182
|
+
'409': "ErrorResponse",
|
|
183
|
+
'422': "ErrorResponse",
|
|
184
|
+
}
|
|
185
|
+
response_data = self.api_client.call_api(
|
|
186
|
+
*_param,
|
|
187
|
+
_request_timeout=_request_timeout
|
|
188
|
+
)
|
|
189
|
+
response_data.read()
|
|
190
|
+
return self.api_client.response_deserialize(
|
|
191
|
+
response_data=response_data,
|
|
192
|
+
response_types_map=_response_types_map,
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
@validate_call
|
|
197
|
+
def create_inbox_without_preload_content(
|
|
198
|
+
self,
|
|
199
|
+
create_inbox_request: CreateInboxRequest,
|
|
200
|
+
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,
|
|
201
|
+
_request_timeout: Union[
|
|
202
|
+
None,
|
|
203
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
204
|
+
Tuple[
|
|
205
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
206
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
207
|
+
]
|
|
208
|
+
] = None,
|
|
209
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
210
|
+
_content_type: Optional[StrictStr] = None,
|
|
211
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
212
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
213
|
+
) -> RESTResponseType:
|
|
214
|
+
"""Create inbox
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
:param create_inbox_request: (required)
|
|
218
|
+
:type create_inbox_request: CreateInboxRequest
|
|
219
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
220
|
+
:type idempotency_key: str
|
|
221
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
222
|
+
number provided, it will be total request
|
|
223
|
+
timeout. It can also be a pair (tuple) of
|
|
224
|
+
(connection, read) timeouts.
|
|
225
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
226
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
227
|
+
request; this effectively ignores the
|
|
228
|
+
authentication in the spec for a single request.
|
|
229
|
+
:type _request_auth: dict, optional
|
|
230
|
+
:param _content_type: force content-type for the request.
|
|
231
|
+
:type _content_type: str, Optional
|
|
232
|
+
:param _headers: set to override the headers for a single
|
|
233
|
+
request; this effectively ignores the headers
|
|
234
|
+
in the spec for a single request.
|
|
235
|
+
:type _headers: dict, optional
|
|
236
|
+
:param _host_index: set to override the host_index for a single
|
|
237
|
+
request; this effectively ignores the host_index
|
|
238
|
+
in the spec for a single request.
|
|
239
|
+
:type _host_index: int, optional
|
|
240
|
+
:return: Returns the result object.
|
|
241
|
+
""" # noqa: E501
|
|
242
|
+
|
|
243
|
+
_param = self._create_inbox_serialize(
|
|
244
|
+
create_inbox_request=create_inbox_request,
|
|
245
|
+
idempotency_key=idempotency_key,
|
|
246
|
+
_request_auth=_request_auth,
|
|
247
|
+
_content_type=_content_type,
|
|
248
|
+
_headers=_headers,
|
|
249
|
+
_host_index=_host_index
|
|
250
|
+
)
|
|
251
|
+
|
|
252
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
253
|
+
'201': "InboxResponse",
|
|
254
|
+
'400': "ErrorResponse",
|
|
255
|
+
'401': "ErrorResponse",
|
|
256
|
+
'403': "ErrorResponse",
|
|
257
|
+
'409': "ErrorResponse",
|
|
258
|
+
'422': "ErrorResponse",
|
|
259
|
+
}
|
|
260
|
+
response_data = self.api_client.call_api(
|
|
261
|
+
*_param,
|
|
262
|
+
_request_timeout=_request_timeout
|
|
263
|
+
)
|
|
264
|
+
return response_data.response
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
def _create_inbox_serialize(
|
|
268
|
+
self,
|
|
269
|
+
create_inbox_request,
|
|
270
|
+
idempotency_key,
|
|
271
|
+
_request_auth,
|
|
272
|
+
_content_type,
|
|
273
|
+
_headers,
|
|
274
|
+
_host_index,
|
|
275
|
+
) -> RequestSerialized:
|
|
276
|
+
|
|
277
|
+
_host = None
|
|
278
|
+
|
|
279
|
+
_collection_formats: Dict[str, str] = {
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
_path_params: Dict[str, str] = {}
|
|
283
|
+
_query_params: List[Tuple[str, str]] = []
|
|
284
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
285
|
+
_form_params: List[Tuple[str, str]] = []
|
|
286
|
+
_files: Dict[
|
|
287
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
288
|
+
] = {}
|
|
289
|
+
_body_params: Optional[bytes] = None
|
|
290
|
+
|
|
291
|
+
# process the path parameters
|
|
292
|
+
# process the query parameters
|
|
293
|
+
# process the header parameters
|
|
294
|
+
if idempotency_key is not None:
|
|
295
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
296
|
+
# process the form parameters
|
|
297
|
+
# process the body parameter
|
|
298
|
+
if create_inbox_request is not None:
|
|
299
|
+
_body_params = create_inbox_request
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
# set the HTTP header `Accept`
|
|
303
|
+
if 'Accept' not in _header_params:
|
|
304
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
305
|
+
[
|
|
306
|
+
'application/json'
|
|
307
|
+
]
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
# set the HTTP header `Content-Type`
|
|
311
|
+
if _content_type:
|
|
312
|
+
_header_params['Content-Type'] = _content_type
|
|
313
|
+
else:
|
|
314
|
+
_default_content_type = (
|
|
315
|
+
self.api_client.select_header_content_type(
|
|
316
|
+
[
|
|
317
|
+
'application/json'
|
|
318
|
+
]
|
|
319
|
+
)
|
|
320
|
+
)
|
|
321
|
+
if _default_content_type is not None:
|
|
322
|
+
_header_params['Content-Type'] = _default_content_type
|
|
323
|
+
|
|
324
|
+
# authentication setting
|
|
325
|
+
_auth_settings: List[str] = [
|
|
326
|
+
'bearerAuth'
|
|
327
|
+
]
|
|
328
|
+
|
|
329
|
+
return self.api_client.param_serialize(
|
|
330
|
+
method='POST',
|
|
331
|
+
resource_path='/api/v1/inboxes',
|
|
332
|
+
path_params=_path_params,
|
|
333
|
+
query_params=_query_params,
|
|
334
|
+
header_params=_header_params,
|
|
335
|
+
body=_body_params,
|
|
336
|
+
post_params=_form_params,
|
|
337
|
+
files=_files,
|
|
338
|
+
auth_settings=_auth_settings,
|
|
339
|
+
collection_formats=_collection_formats,
|
|
340
|
+
_host=_host,
|
|
341
|
+
_request_auth=_request_auth
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
@validate_call
|
|
348
|
+
def delete_inbox(
|
|
349
|
+
self,
|
|
350
|
+
id: StrictStr,
|
|
351
|
+
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,
|
|
352
|
+
_request_timeout: Union[
|
|
353
|
+
None,
|
|
354
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
355
|
+
Tuple[
|
|
356
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
357
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
358
|
+
]
|
|
359
|
+
] = None,
|
|
360
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
361
|
+
_content_type: Optional[StrictStr] = None,
|
|
362
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
363
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
364
|
+
) -> OkResponse:
|
|
365
|
+
"""Delete inbox
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
:param id: (required)
|
|
369
|
+
:type id: str
|
|
370
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
371
|
+
:type idempotency_key: str
|
|
372
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
373
|
+
number provided, it will be total request
|
|
374
|
+
timeout. It can also be a pair (tuple) of
|
|
375
|
+
(connection, read) timeouts.
|
|
376
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
377
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
378
|
+
request; this effectively ignores the
|
|
379
|
+
authentication in the spec for a single request.
|
|
380
|
+
:type _request_auth: dict, optional
|
|
381
|
+
:param _content_type: force content-type for the request.
|
|
382
|
+
:type _content_type: str, Optional
|
|
383
|
+
:param _headers: set to override the headers for a single
|
|
384
|
+
request; this effectively ignores the headers
|
|
385
|
+
in the spec for a single request.
|
|
386
|
+
:type _headers: dict, optional
|
|
387
|
+
:param _host_index: set to override the host_index for a single
|
|
388
|
+
request; this effectively ignores the host_index
|
|
389
|
+
in the spec for a single request.
|
|
390
|
+
:type _host_index: int, optional
|
|
391
|
+
:return: Returns the result object.
|
|
392
|
+
""" # noqa: E501
|
|
393
|
+
|
|
394
|
+
_param = self._delete_inbox_serialize(
|
|
395
|
+
id=id,
|
|
396
|
+
idempotency_key=idempotency_key,
|
|
397
|
+
_request_auth=_request_auth,
|
|
398
|
+
_content_type=_content_type,
|
|
399
|
+
_headers=_headers,
|
|
400
|
+
_host_index=_host_index
|
|
401
|
+
)
|
|
402
|
+
|
|
403
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
404
|
+
'200': "OkResponse",
|
|
405
|
+
'401': "ErrorResponse",
|
|
406
|
+
'403': "ErrorResponse",
|
|
407
|
+
'404': "ErrorResponse",
|
|
408
|
+
'409': "ErrorResponse",
|
|
409
|
+
}
|
|
410
|
+
response_data = self.api_client.call_api(
|
|
411
|
+
*_param,
|
|
412
|
+
_request_timeout=_request_timeout
|
|
413
|
+
)
|
|
414
|
+
response_data.read()
|
|
415
|
+
return self.api_client.response_deserialize(
|
|
416
|
+
response_data=response_data,
|
|
417
|
+
response_types_map=_response_types_map,
|
|
418
|
+
).data
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
@validate_call
|
|
422
|
+
def delete_inbox_with_http_info(
|
|
423
|
+
self,
|
|
424
|
+
id: StrictStr,
|
|
425
|
+
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,
|
|
426
|
+
_request_timeout: Union[
|
|
427
|
+
None,
|
|
428
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
429
|
+
Tuple[
|
|
430
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
431
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
432
|
+
]
|
|
433
|
+
] = None,
|
|
434
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
435
|
+
_content_type: Optional[StrictStr] = None,
|
|
436
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
437
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
438
|
+
) -> ApiResponse[OkResponse]:
|
|
439
|
+
"""Delete inbox
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
:param id: (required)
|
|
443
|
+
:type id: str
|
|
444
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
445
|
+
:type idempotency_key: str
|
|
446
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
447
|
+
number provided, it will be total request
|
|
448
|
+
timeout. It can also be a pair (tuple) of
|
|
449
|
+
(connection, read) timeouts.
|
|
450
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
451
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
452
|
+
request; this effectively ignores the
|
|
453
|
+
authentication in the spec for a single request.
|
|
454
|
+
:type _request_auth: dict, optional
|
|
455
|
+
:param _content_type: force content-type for the request.
|
|
456
|
+
:type _content_type: str, Optional
|
|
457
|
+
:param _headers: set to override the headers for a single
|
|
458
|
+
request; this effectively ignores the headers
|
|
459
|
+
in the spec for a single request.
|
|
460
|
+
:type _headers: dict, optional
|
|
461
|
+
:param _host_index: set to override the host_index for a single
|
|
462
|
+
request; this effectively ignores the host_index
|
|
463
|
+
in the spec for a single request.
|
|
464
|
+
:type _host_index: int, optional
|
|
465
|
+
:return: Returns the result object.
|
|
466
|
+
""" # noqa: E501
|
|
467
|
+
|
|
468
|
+
_param = self._delete_inbox_serialize(
|
|
469
|
+
id=id,
|
|
470
|
+
idempotency_key=idempotency_key,
|
|
471
|
+
_request_auth=_request_auth,
|
|
472
|
+
_content_type=_content_type,
|
|
473
|
+
_headers=_headers,
|
|
474
|
+
_host_index=_host_index
|
|
475
|
+
)
|
|
476
|
+
|
|
477
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
478
|
+
'200': "OkResponse",
|
|
479
|
+
'401': "ErrorResponse",
|
|
480
|
+
'403': "ErrorResponse",
|
|
481
|
+
'404': "ErrorResponse",
|
|
482
|
+
'409': "ErrorResponse",
|
|
483
|
+
}
|
|
484
|
+
response_data = self.api_client.call_api(
|
|
485
|
+
*_param,
|
|
486
|
+
_request_timeout=_request_timeout
|
|
487
|
+
)
|
|
488
|
+
response_data.read()
|
|
489
|
+
return self.api_client.response_deserialize(
|
|
490
|
+
response_data=response_data,
|
|
491
|
+
response_types_map=_response_types_map,
|
|
492
|
+
)
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
@validate_call
|
|
496
|
+
def delete_inbox_without_preload_content(
|
|
497
|
+
self,
|
|
498
|
+
id: StrictStr,
|
|
499
|
+
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,
|
|
500
|
+
_request_timeout: Union[
|
|
501
|
+
None,
|
|
502
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
503
|
+
Tuple[
|
|
504
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
505
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
506
|
+
]
|
|
507
|
+
] = None,
|
|
508
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
509
|
+
_content_type: Optional[StrictStr] = None,
|
|
510
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
511
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
512
|
+
) -> RESTResponseType:
|
|
513
|
+
"""Delete inbox
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
:param id: (required)
|
|
517
|
+
:type id: str
|
|
518
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
519
|
+
:type idempotency_key: str
|
|
520
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
521
|
+
number provided, it will be total request
|
|
522
|
+
timeout. It can also be a pair (tuple) of
|
|
523
|
+
(connection, read) timeouts.
|
|
524
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
525
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
526
|
+
request; this effectively ignores the
|
|
527
|
+
authentication in the spec for a single request.
|
|
528
|
+
:type _request_auth: dict, optional
|
|
529
|
+
:param _content_type: force content-type for the request.
|
|
530
|
+
:type _content_type: str, Optional
|
|
531
|
+
:param _headers: set to override the headers for a single
|
|
532
|
+
request; this effectively ignores the headers
|
|
533
|
+
in the spec for a single request.
|
|
534
|
+
:type _headers: dict, optional
|
|
535
|
+
:param _host_index: set to override the host_index for a single
|
|
536
|
+
request; this effectively ignores the host_index
|
|
537
|
+
in the spec for a single request.
|
|
538
|
+
:type _host_index: int, optional
|
|
539
|
+
:return: Returns the result object.
|
|
540
|
+
""" # noqa: E501
|
|
541
|
+
|
|
542
|
+
_param = self._delete_inbox_serialize(
|
|
543
|
+
id=id,
|
|
544
|
+
idempotency_key=idempotency_key,
|
|
545
|
+
_request_auth=_request_auth,
|
|
546
|
+
_content_type=_content_type,
|
|
547
|
+
_headers=_headers,
|
|
548
|
+
_host_index=_host_index
|
|
549
|
+
)
|
|
550
|
+
|
|
551
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
552
|
+
'200': "OkResponse",
|
|
553
|
+
'401': "ErrorResponse",
|
|
554
|
+
'403': "ErrorResponse",
|
|
555
|
+
'404': "ErrorResponse",
|
|
556
|
+
'409': "ErrorResponse",
|
|
557
|
+
}
|
|
558
|
+
response_data = self.api_client.call_api(
|
|
559
|
+
*_param,
|
|
560
|
+
_request_timeout=_request_timeout
|
|
561
|
+
)
|
|
562
|
+
return response_data.response
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
def _delete_inbox_serialize(
|
|
566
|
+
self,
|
|
567
|
+
id,
|
|
568
|
+
idempotency_key,
|
|
569
|
+
_request_auth,
|
|
570
|
+
_content_type,
|
|
571
|
+
_headers,
|
|
572
|
+
_host_index,
|
|
573
|
+
) -> RequestSerialized:
|
|
574
|
+
|
|
575
|
+
_host = None
|
|
576
|
+
|
|
577
|
+
_collection_formats: Dict[str, str] = {
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
_path_params: Dict[str, str] = {}
|
|
581
|
+
_query_params: List[Tuple[str, str]] = []
|
|
582
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
583
|
+
_form_params: List[Tuple[str, str]] = []
|
|
584
|
+
_files: Dict[
|
|
585
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
586
|
+
] = {}
|
|
587
|
+
_body_params: Optional[bytes] = None
|
|
588
|
+
|
|
589
|
+
# process the path parameters
|
|
590
|
+
if id is not None:
|
|
591
|
+
_path_params['id'] = id
|
|
592
|
+
# process the query parameters
|
|
593
|
+
# process the header parameters
|
|
594
|
+
if idempotency_key is not None:
|
|
595
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
596
|
+
# process the form parameters
|
|
597
|
+
# process the body parameter
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
# set the HTTP header `Accept`
|
|
601
|
+
if 'Accept' not in _header_params:
|
|
602
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
603
|
+
[
|
|
604
|
+
'application/json'
|
|
605
|
+
]
|
|
606
|
+
)
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
# authentication setting
|
|
610
|
+
_auth_settings: List[str] = [
|
|
611
|
+
'bearerAuth'
|
|
612
|
+
]
|
|
613
|
+
|
|
614
|
+
return self.api_client.param_serialize(
|
|
615
|
+
method='DELETE',
|
|
616
|
+
resource_path='/api/v1/inboxes/{id}',
|
|
617
|
+
path_params=_path_params,
|
|
618
|
+
query_params=_query_params,
|
|
619
|
+
header_params=_header_params,
|
|
620
|
+
body=_body_params,
|
|
621
|
+
post_params=_form_params,
|
|
622
|
+
files=_files,
|
|
623
|
+
auth_settings=_auth_settings,
|
|
624
|
+
collection_formats=_collection_formats,
|
|
625
|
+
_host=_host,
|
|
626
|
+
_request_auth=_request_auth
|
|
627
|
+
)
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
@validate_call
|
|
633
|
+
def list_inboxes(
|
|
634
|
+
self,
|
|
635
|
+
_request_timeout: Union[
|
|
636
|
+
None,
|
|
637
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
638
|
+
Tuple[
|
|
639
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
640
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
641
|
+
]
|
|
642
|
+
] = None,
|
|
643
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
644
|
+
_content_type: Optional[StrictStr] = None,
|
|
645
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
646
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
647
|
+
) -> InboxListResponse:
|
|
648
|
+
"""List inboxes
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
652
|
+
number provided, it will be total request
|
|
653
|
+
timeout. It can also be a pair (tuple) of
|
|
654
|
+
(connection, read) timeouts.
|
|
655
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
656
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
657
|
+
request; this effectively ignores the
|
|
658
|
+
authentication in the spec for a single request.
|
|
659
|
+
:type _request_auth: dict, optional
|
|
660
|
+
:param _content_type: force content-type for the request.
|
|
661
|
+
:type _content_type: str, Optional
|
|
662
|
+
:param _headers: set to override the headers for a single
|
|
663
|
+
request; this effectively ignores the headers
|
|
664
|
+
in the spec for a single request.
|
|
665
|
+
:type _headers: dict, optional
|
|
666
|
+
:param _host_index: set to override the host_index for a single
|
|
667
|
+
request; this effectively ignores the host_index
|
|
668
|
+
in the spec for a single request.
|
|
669
|
+
:type _host_index: int, optional
|
|
670
|
+
:return: Returns the result object.
|
|
671
|
+
""" # noqa: E501
|
|
672
|
+
|
|
673
|
+
_param = self._list_inboxes_serialize(
|
|
674
|
+
_request_auth=_request_auth,
|
|
675
|
+
_content_type=_content_type,
|
|
676
|
+
_headers=_headers,
|
|
677
|
+
_host_index=_host_index
|
|
678
|
+
)
|
|
679
|
+
|
|
680
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
681
|
+
'200': "InboxListResponse",
|
|
682
|
+
'401': "ErrorResponse",
|
|
683
|
+
'403': "ErrorResponse",
|
|
684
|
+
}
|
|
685
|
+
response_data = self.api_client.call_api(
|
|
686
|
+
*_param,
|
|
687
|
+
_request_timeout=_request_timeout
|
|
688
|
+
)
|
|
689
|
+
response_data.read()
|
|
690
|
+
return self.api_client.response_deserialize(
|
|
691
|
+
response_data=response_data,
|
|
692
|
+
response_types_map=_response_types_map,
|
|
693
|
+
).data
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
@validate_call
|
|
697
|
+
def list_inboxes_with_http_info(
|
|
698
|
+
self,
|
|
699
|
+
_request_timeout: Union[
|
|
700
|
+
None,
|
|
701
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
702
|
+
Tuple[
|
|
703
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
704
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
705
|
+
]
|
|
706
|
+
] = None,
|
|
707
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
708
|
+
_content_type: Optional[StrictStr] = None,
|
|
709
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
710
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
711
|
+
) -> ApiResponse[InboxListResponse]:
|
|
712
|
+
"""List inboxes
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
716
|
+
number provided, it will be total request
|
|
717
|
+
timeout. It can also be a pair (tuple) of
|
|
718
|
+
(connection, read) timeouts.
|
|
719
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
720
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
721
|
+
request; this effectively ignores the
|
|
722
|
+
authentication in the spec for a single request.
|
|
723
|
+
:type _request_auth: dict, optional
|
|
724
|
+
:param _content_type: force content-type for the request.
|
|
725
|
+
:type _content_type: str, Optional
|
|
726
|
+
:param _headers: set to override the headers for a single
|
|
727
|
+
request; this effectively ignores the headers
|
|
728
|
+
in the spec for a single request.
|
|
729
|
+
:type _headers: dict, optional
|
|
730
|
+
:param _host_index: set to override the host_index for a single
|
|
731
|
+
request; this effectively ignores the host_index
|
|
732
|
+
in the spec for a single request.
|
|
733
|
+
:type _host_index: int, optional
|
|
734
|
+
:return: Returns the result object.
|
|
735
|
+
""" # noqa: E501
|
|
736
|
+
|
|
737
|
+
_param = self._list_inboxes_serialize(
|
|
738
|
+
_request_auth=_request_auth,
|
|
739
|
+
_content_type=_content_type,
|
|
740
|
+
_headers=_headers,
|
|
741
|
+
_host_index=_host_index
|
|
742
|
+
)
|
|
743
|
+
|
|
744
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
745
|
+
'200': "InboxListResponse",
|
|
746
|
+
'401': "ErrorResponse",
|
|
747
|
+
'403': "ErrorResponse",
|
|
748
|
+
}
|
|
749
|
+
response_data = self.api_client.call_api(
|
|
750
|
+
*_param,
|
|
751
|
+
_request_timeout=_request_timeout
|
|
752
|
+
)
|
|
753
|
+
response_data.read()
|
|
754
|
+
return self.api_client.response_deserialize(
|
|
755
|
+
response_data=response_data,
|
|
756
|
+
response_types_map=_response_types_map,
|
|
757
|
+
)
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
@validate_call
|
|
761
|
+
def list_inboxes_without_preload_content(
|
|
762
|
+
self,
|
|
763
|
+
_request_timeout: Union[
|
|
764
|
+
None,
|
|
765
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
766
|
+
Tuple[
|
|
767
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
768
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
769
|
+
]
|
|
770
|
+
] = None,
|
|
771
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
772
|
+
_content_type: Optional[StrictStr] = None,
|
|
773
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
774
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
775
|
+
) -> RESTResponseType:
|
|
776
|
+
"""List inboxes
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
780
|
+
number provided, it will be total request
|
|
781
|
+
timeout. It can also be a pair (tuple) of
|
|
782
|
+
(connection, read) timeouts.
|
|
783
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
784
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
785
|
+
request; this effectively ignores the
|
|
786
|
+
authentication in the spec for a single request.
|
|
787
|
+
:type _request_auth: dict, optional
|
|
788
|
+
:param _content_type: force content-type for the request.
|
|
789
|
+
:type _content_type: str, Optional
|
|
790
|
+
:param _headers: set to override the headers for a single
|
|
791
|
+
request; this effectively ignores the headers
|
|
792
|
+
in the spec for a single request.
|
|
793
|
+
:type _headers: dict, optional
|
|
794
|
+
:param _host_index: set to override the host_index for a single
|
|
795
|
+
request; this effectively ignores the host_index
|
|
796
|
+
in the spec for a single request.
|
|
797
|
+
:type _host_index: int, optional
|
|
798
|
+
:return: Returns the result object.
|
|
799
|
+
""" # noqa: E501
|
|
800
|
+
|
|
801
|
+
_param = self._list_inboxes_serialize(
|
|
802
|
+
_request_auth=_request_auth,
|
|
803
|
+
_content_type=_content_type,
|
|
804
|
+
_headers=_headers,
|
|
805
|
+
_host_index=_host_index
|
|
806
|
+
)
|
|
807
|
+
|
|
808
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
809
|
+
'200': "InboxListResponse",
|
|
810
|
+
'401': "ErrorResponse",
|
|
811
|
+
'403': "ErrorResponse",
|
|
812
|
+
}
|
|
813
|
+
response_data = self.api_client.call_api(
|
|
814
|
+
*_param,
|
|
815
|
+
_request_timeout=_request_timeout
|
|
816
|
+
)
|
|
817
|
+
return response_data.response
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
def _list_inboxes_serialize(
|
|
821
|
+
self,
|
|
822
|
+
_request_auth,
|
|
823
|
+
_content_type,
|
|
824
|
+
_headers,
|
|
825
|
+
_host_index,
|
|
826
|
+
) -> RequestSerialized:
|
|
827
|
+
|
|
828
|
+
_host = None
|
|
829
|
+
|
|
830
|
+
_collection_formats: Dict[str, str] = {
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
_path_params: Dict[str, str] = {}
|
|
834
|
+
_query_params: List[Tuple[str, str]] = []
|
|
835
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
836
|
+
_form_params: List[Tuple[str, str]] = []
|
|
837
|
+
_files: Dict[
|
|
838
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
839
|
+
] = {}
|
|
840
|
+
_body_params: Optional[bytes] = None
|
|
841
|
+
|
|
842
|
+
# process the path parameters
|
|
843
|
+
# process the query parameters
|
|
844
|
+
# process the header parameters
|
|
845
|
+
# process the form parameters
|
|
846
|
+
# process the body parameter
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
# set the HTTP header `Accept`
|
|
850
|
+
if 'Accept' not in _header_params:
|
|
851
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
852
|
+
[
|
|
853
|
+
'application/json'
|
|
854
|
+
]
|
|
855
|
+
)
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
# authentication setting
|
|
859
|
+
_auth_settings: List[str] = [
|
|
860
|
+
'bearerAuth'
|
|
861
|
+
]
|
|
862
|
+
|
|
863
|
+
return self.api_client.param_serialize(
|
|
864
|
+
method='GET',
|
|
865
|
+
resource_path='/api/v1/inboxes',
|
|
866
|
+
path_params=_path_params,
|
|
867
|
+
query_params=_query_params,
|
|
868
|
+
header_params=_header_params,
|
|
869
|
+
body=_body_params,
|
|
870
|
+
post_params=_form_params,
|
|
871
|
+
files=_files,
|
|
872
|
+
auth_settings=_auth_settings,
|
|
873
|
+
collection_formats=_collection_formats,
|
|
874
|
+
_host=_host,
|
|
875
|
+
_request_auth=_request_auth
|
|
876
|
+
)
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
@validate_call
|
|
882
|
+
def update_inbox(
|
|
883
|
+
self,
|
|
884
|
+
id: StrictStr,
|
|
885
|
+
update_inbox_request: UpdateInboxRequest,
|
|
886
|
+
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,
|
|
887
|
+
_request_timeout: Union[
|
|
888
|
+
None,
|
|
889
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
890
|
+
Tuple[
|
|
891
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
892
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
893
|
+
]
|
|
894
|
+
] = None,
|
|
895
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
896
|
+
_content_type: Optional[StrictStr] = None,
|
|
897
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
898
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
899
|
+
) -> InboxResponse:
|
|
900
|
+
"""Update inbox display name
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
:param id: (required)
|
|
904
|
+
:type id: str
|
|
905
|
+
:param update_inbox_request: (required)
|
|
906
|
+
:type update_inbox_request: UpdateInboxRequest
|
|
907
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
908
|
+
:type idempotency_key: str
|
|
909
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
910
|
+
number provided, it will be total request
|
|
911
|
+
timeout. It can also be a pair (tuple) of
|
|
912
|
+
(connection, read) timeouts.
|
|
913
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
914
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
915
|
+
request; this effectively ignores the
|
|
916
|
+
authentication in the spec for a single request.
|
|
917
|
+
:type _request_auth: dict, optional
|
|
918
|
+
:param _content_type: force content-type for the request.
|
|
919
|
+
:type _content_type: str, Optional
|
|
920
|
+
:param _headers: set to override the headers for a single
|
|
921
|
+
request; this effectively ignores the headers
|
|
922
|
+
in the spec for a single request.
|
|
923
|
+
:type _headers: dict, optional
|
|
924
|
+
:param _host_index: set to override the host_index for a single
|
|
925
|
+
request; this effectively ignores the host_index
|
|
926
|
+
in the spec for a single request.
|
|
927
|
+
:type _host_index: int, optional
|
|
928
|
+
:return: Returns the result object.
|
|
929
|
+
""" # noqa: E501
|
|
930
|
+
|
|
931
|
+
_param = self._update_inbox_serialize(
|
|
932
|
+
id=id,
|
|
933
|
+
update_inbox_request=update_inbox_request,
|
|
934
|
+
idempotency_key=idempotency_key,
|
|
935
|
+
_request_auth=_request_auth,
|
|
936
|
+
_content_type=_content_type,
|
|
937
|
+
_headers=_headers,
|
|
938
|
+
_host_index=_host_index
|
|
939
|
+
)
|
|
940
|
+
|
|
941
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
942
|
+
'200': "InboxResponse",
|
|
943
|
+
'401': "ErrorResponse",
|
|
944
|
+
'403': "ErrorResponse",
|
|
945
|
+
'404': "ErrorResponse",
|
|
946
|
+
'409': "ErrorResponse",
|
|
947
|
+
}
|
|
948
|
+
response_data = self.api_client.call_api(
|
|
949
|
+
*_param,
|
|
950
|
+
_request_timeout=_request_timeout
|
|
951
|
+
)
|
|
952
|
+
response_data.read()
|
|
953
|
+
return self.api_client.response_deserialize(
|
|
954
|
+
response_data=response_data,
|
|
955
|
+
response_types_map=_response_types_map,
|
|
956
|
+
).data
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
@validate_call
|
|
960
|
+
def update_inbox_with_http_info(
|
|
961
|
+
self,
|
|
962
|
+
id: StrictStr,
|
|
963
|
+
update_inbox_request: UpdateInboxRequest,
|
|
964
|
+
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,
|
|
965
|
+
_request_timeout: Union[
|
|
966
|
+
None,
|
|
967
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
968
|
+
Tuple[
|
|
969
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
970
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
971
|
+
]
|
|
972
|
+
] = None,
|
|
973
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
974
|
+
_content_type: Optional[StrictStr] = None,
|
|
975
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
976
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
977
|
+
) -> ApiResponse[InboxResponse]:
|
|
978
|
+
"""Update inbox display name
|
|
979
|
+
|
|
980
|
+
|
|
981
|
+
:param id: (required)
|
|
982
|
+
:type id: str
|
|
983
|
+
:param update_inbox_request: (required)
|
|
984
|
+
:type update_inbox_request: UpdateInboxRequest
|
|
985
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
986
|
+
:type idempotency_key: str
|
|
987
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
988
|
+
number provided, it will be total request
|
|
989
|
+
timeout. It can also be a pair (tuple) of
|
|
990
|
+
(connection, read) timeouts.
|
|
991
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
992
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
993
|
+
request; this effectively ignores the
|
|
994
|
+
authentication in the spec for a single request.
|
|
995
|
+
:type _request_auth: dict, optional
|
|
996
|
+
:param _content_type: force content-type for the request.
|
|
997
|
+
:type _content_type: str, Optional
|
|
998
|
+
:param _headers: set to override the headers for a single
|
|
999
|
+
request; this effectively ignores the headers
|
|
1000
|
+
in the spec for a single request.
|
|
1001
|
+
:type _headers: dict, optional
|
|
1002
|
+
:param _host_index: set to override the host_index for a single
|
|
1003
|
+
request; this effectively ignores the host_index
|
|
1004
|
+
in the spec for a single request.
|
|
1005
|
+
:type _host_index: int, optional
|
|
1006
|
+
:return: Returns the result object.
|
|
1007
|
+
""" # noqa: E501
|
|
1008
|
+
|
|
1009
|
+
_param = self._update_inbox_serialize(
|
|
1010
|
+
id=id,
|
|
1011
|
+
update_inbox_request=update_inbox_request,
|
|
1012
|
+
idempotency_key=idempotency_key,
|
|
1013
|
+
_request_auth=_request_auth,
|
|
1014
|
+
_content_type=_content_type,
|
|
1015
|
+
_headers=_headers,
|
|
1016
|
+
_host_index=_host_index
|
|
1017
|
+
)
|
|
1018
|
+
|
|
1019
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1020
|
+
'200': "InboxResponse",
|
|
1021
|
+
'401': "ErrorResponse",
|
|
1022
|
+
'403': "ErrorResponse",
|
|
1023
|
+
'404': "ErrorResponse",
|
|
1024
|
+
'409': "ErrorResponse",
|
|
1025
|
+
}
|
|
1026
|
+
response_data = self.api_client.call_api(
|
|
1027
|
+
*_param,
|
|
1028
|
+
_request_timeout=_request_timeout
|
|
1029
|
+
)
|
|
1030
|
+
response_data.read()
|
|
1031
|
+
return self.api_client.response_deserialize(
|
|
1032
|
+
response_data=response_data,
|
|
1033
|
+
response_types_map=_response_types_map,
|
|
1034
|
+
)
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
@validate_call
|
|
1038
|
+
def update_inbox_without_preload_content(
|
|
1039
|
+
self,
|
|
1040
|
+
id: StrictStr,
|
|
1041
|
+
update_inbox_request: UpdateInboxRequest,
|
|
1042
|
+
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,
|
|
1043
|
+
_request_timeout: Union[
|
|
1044
|
+
None,
|
|
1045
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1046
|
+
Tuple[
|
|
1047
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1048
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1049
|
+
]
|
|
1050
|
+
] = None,
|
|
1051
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1052
|
+
_content_type: Optional[StrictStr] = None,
|
|
1053
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1054
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1055
|
+
) -> RESTResponseType:
|
|
1056
|
+
"""Update inbox display name
|
|
1057
|
+
|
|
1058
|
+
|
|
1059
|
+
:param id: (required)
|
|
1060
|
+
:type id: str
|
|
1061
|
+
:param update_inbox_request: (required)
|
|
1062
|
+
:type update_inbox_request: UpdateInboxRequest
|
|
1063
|
+
:param idempotency_key: Optional key for safe retries of mutating operations.
|
|
1064
|
+
:type idempotency_key: str
|
|
1065
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1066
|
+
number provided, it will be total request
|
|
1067
|
+
timeout. It can also be a pair (tuple) of
|
|
1068
|
+
(connection, read) timeouts.
|
|
1069
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1070
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1071
|
+
request; this effectively ignores the
|
|
1072
|
+
authentication in the spec for a single request.
|
|
1073
|
+
:type _request_auth: dict, optional
|
|
1074
|
+
:param _content_type: force content-type for the request.
|
|
1075
|
+
:type _content_type: str, Optional
|
|
1076
|
+
:param _headers: set to override the headers for a single
|
|
1077
|
+
request; this effectively ignores the headers
|
|
1078
|
+
in the spec for a single request.
|
|
1079
|
+
:type _headers: dict, optional
|
|
1080
|
+
:param _host_index: set to override the host_index for a single
|
|
1081
|
+
request; this effectively ignores the host_index
|
|
1082
|
+
in the spec for a single request.
|
|
1083
|
+
:type _host_index: int, optional
|
|
1084
|
+
:return: Returns the result object.
|
|
1085
|
+
""" # noqa: E501
|
|
1086
|
+
|
|
1087
|
+
_param = self._update_inbox_serialize(
|
|
1088
|
+
id=id,
|
|
1089
|
+
update_inbox_request=update_inbox_request,
|
|
1090
|
+
idempotency_key=idempotency_key,
|
|
1091
|
+
_request_auth=_request_auth,
|
|
1092
|
+
_content_type=_content_type,
|
|
1093
|
+
_headers=_headers,
|
|
1094
|
+
_host_index=_host_index
|
|
1095
|
+
)
|
|
1096
|
+
|
|
1097
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1098
|
+
'200': "InboxResponse",
|
|
1099
|
+
'401': "ErrorResponse",
|
|
1100
|
+
'403': "ErrorResponse",
|
|
1101
|
+
'404': "ErrorResponse",
|
|
1102
|
+
'409': "ErrorResponse",
|
|
1103
|
+
}
|
|
1104
|
+
response_data = self.api_client.call_api(
|
|
1105
|
+
*_param,
|
|
1106
|
+
_request_timeout=_request_timeout
|
|
1107
|
+
)
|
|
1108
|
+
return response_data.response
|
|
1109
|
+
|
|
1110
|
+
|
|
1111
|
+
def _update_inbox_serialize(
|
|
1112
|
+
self,
|
|
1113
|
+
id,
|
|
1114
|
+
update_inbox_request,
|
|
1115
|
+
idempotency_key,
|
|
1116
|
+
_request_auth,
|
|
1117
|
+
_content_type,
|
|
1118
|
+
_headers,
|
|
1119
|
+
_host_index,
|
|
1120
|
+
) -> RequestSerialized:
|
|
1121
|
+
|
|
1122
|
+
_host = None
|
|
1123
|
+
|
|
1124
|
+
_collection_formats: Dict[str, str] = {
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
_path_params: Dict[str, str] = {}
|
|
1128
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1129
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1130
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1131
|
+
_files: Dict[
|
|
1132
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1133
|
+
] = {}
|
|
1134
|
+
_body_params: Optional[bytes] = None
|
|
1135
|
+
|
|
1136
|
+
# process the path parameters
|
|
1137
|
+
if id is not None:
|
|
1138
|
+
_path_params['id'] = id
|
|
1139
|
+
# process the query parameters
|
|
1140
|
+
# process the header parameters
|
|
1141
|
+
if idempotency_key is not None:
|
|
1142
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
1143
|
+
# process the form parameters
|
|
1144
|
+
# process the body parameter
|
|
1145
|
+
if update_inbox_request is not None:
|
|
1146
|
+
_body_params = update_inbox_request
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
# set the HTTP header `Accept`
|
|
1150
|
+
if 'Accept' not in _header_params:
|
|
1151
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1152
|
+
[
|
|
1153
|
+
'application/json'
|
|
1154
|
+
]
|
|
1155
|
+
)
|
|
1156
|
+
|
|
1157
|
+
# set the HTTP header `Content-Type`
|
|
1158
|
+
if _content_type:
|
|
1159
|
+
_header_params['Content-Type'] = _content_type
|
|
1160
|
+
else:
|
|
1161
|
+
_default_content_type = (
|
|
1162
|
+
self.api_client.select_header_content_type(
|
|
1163
|
+
[
|
|
1164
|
+
'application/json'
|
|
1165
|
+
]
|
|
1166
|
+
)
|
|
1167
|
+
)
|
|
1168
|
+
if _default_content_type is not None:
|
|
1169
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1170
|
+
|
|
1171
|
+
# authentication setting
|
|
1172
|
+
_auth_settings: List[str] = [
|
|
1173
|
+
'bearerAuth'
|
|
1174
|
+
]
|
|
1175
|
+
|
|
1176
|
+
return self.api_client.param_serialize(
|
|
1177
|
+
method='PATCH',
|
|
1178
|
+
resource_path='/api/v1/inboxes/{id}',
|
|
1179
|
+
path_params=_path_params,
|
|
1180
|
+
query_params=_query_params,
|
|
1181
|
+
header_params=_header_params,
|
|
1182
|
+
body=_body_params,
|
|
1183
|
+
post_params=_form_params,
|
|
1184
|
+
files=_files,
|
|
1185
|
+
auth_settings=_auth_settings,
|
|
1186
|
+
collection_formats=_collection_formats,
|
|
1187
|
+
_host=_host,
|
|
1188
|
+
_request_auth=_request_auth
|
|
1189
|
+
)
|
|
1190
|
+
|
|
1191
|
+
|