openemail 0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. openemail/__init__.py +262 -0
  2. openemail/_async/__init__.py +0 -0
  3. openemail/_async/client.py +383 -0
  4. openemail/_async/pagination.py +104 -0
  5. openemail/_async/resources/__init__.py +0 -0
  6. openemail/_async/resources/account.py +226 -0
  7. openemail/_async/resources/addresses.py +89 -0
  8. openemail/_async/resources/analytics.py +88 -0
  9. openemail/_async/resources/app_host.py +72 -0
  10. openemail/_async/resources/audiences.py +374 -0
  11. openemail/_async/resources/billing.py +237 -0
  12. openemail/_async/resources/branding.py +85 -0
  13. openemail/_async/resources/broadcasts.py +315 -0
  14. openemail/_async/resources/calendar.py +215 -0
  15. openemail/_async/resources/chats.py +136 -0
  16. openemail/_async/resources/contacts.py +482 -0
  17. openemail/_async/resources/dns_connections.py +60 -0
  18. openemail/_async/resources/domains.py +613 -0
  19. openemail/_async/resources/drafts.py +153 -0
  20. openemail/_async/resources/emails.py +392 -0
  21. openemail/_async/resources/encryption.py +68 -0
  22. openemail/_async/resources/exports.py +84 -0
  23. openemail/_async/resources/files.py +345 -0
  24. openemail/_async/resources/forms.py +473 -0
  25. openemail/_async/resources/imports.py +284 -0
  26. openemail/_async/resources/keys.py +518 -0
  27. openemail/_async/resources/labels.py +154 -0
  28. openemail/_async/resources/languages.py +32 -0
  29. openemail/_async/resources/me.py +53 -0
  30. openemail/_async/resources/members.py +290 -0
  31. openemail/_async/resources/provider_imports.py +137 -0
  32. openemail/_async/resources/roles.py +156 -0
  33. openemail/_async/resources/rules.py +259 -0
  34. openemail/_async/resources/security.py +64 -0
  35. openemail/_async/resources/senders.py +45 -0
  36. openemail/_async/resources/settings.py +48 -0
  37. openemail/_async/resources/subscriptions.py +134 -0
  38. openemail/_async/resources/support.py +31 -0
  39. openemail/_async/resources/suppressions.py +141 -0
  40. openemail/_async/resources/temp_mail.py +230 -0
  41. openemail/_async/resources/templates.py +618 -0
  42. openemail/_async/resources/threads.py +400 -0
  43. openemail/_async/resources/tools.py +62 -0
  44. openemail/_async/resources/tracking.py +282 -0
  45. openemail/_async/resources/webhooks.py +559 -0
  46. openemail/_async/resources/workspaces.py +94 -0
  47. openemail/_async/transport.py +252 -0
  48. openemail/_build.py +1 -0
  49. openemail/_core/__init__.py +0 -0
  50. openemail/_core/credentials.py +65 -0
  51. openemail/_core/environment.py +34 -0
  52. openemail/_core/errors.py +138 -0
  53. openemail/_core/hosts.py +234 -0
  54. openemail/_core/namespace.py +32 -0
  55. openemail/_core/request_path.py +39 -0
  56. openemail/_core/response.py +201 -0
  57. openemail/_core/retry.py +50 -0
  58. openemail/_core/sentinel.py +16 -0
  59. openemail/_core/update_notice.py +89 -0
  60. openemail/_core/wire.py +133 -0
  61. openemail/_default.py +76 -0
  62. openemail/_helpers/__init__.py +0 -0
  63. openemail/_helpers/languages.py +59 -0
  64. openemail/_helpers/messages.py +13 -0
  65. openemail/_helpers/webhooks.py +115 -0
  66. openemail/_sync/__init__.py +0 -0
  67. openemail/_sync/client.py +383 -0
  68. openemail/_sync/pagination.py +104 -0
  69. openemail/_sync/resources/__init__.py +0 -0
  70. openemail/_sync/resources/account.py +226 -0
  71. openemail/_sync/resources/addresses.py +87 -0
  72. openemail/_sync/resources/analytics.py +88 -0
  73. openemail/_sync/resources/app_host.py +72 -0
  74. openemail/_sync/resources/audiences.py +374 -0
  75. openemail/_sync/resources/billing.py +237 -0
  76. openemail/_sync/resources/branding.py +85 -0
  77. openemail/_sync/resources/broadcasts.py +315 -0
  78. openemail/_sync/resources/calendar.py +215 -0
  79. openemail/_sync/resources/chats.py +136 -0
  80. openemail/_sync/resources/contacts.py +482 -0
  81. openemail/_sync/resources/dns_connections.py +60 -0
  82. openemail/_sync/resources/domains.py +613 -0
  83. openemail/_sync/resources/drafts.py +153 -0
  84. openemail/_sync/resources/emails.py +392 -0
  85. openemail/_sync/resources/encryption.py +68 -0
  86. openemail/_sync/resources/exports.py +84 -0
  87. openemail/_sync/resources/files.py +345 -0
  88. openemail/_sync/resources/forms.py +473 -0
  89. openemail/_sync/resources/imports.py +284 -0
  90. openemail/_sync/resources/keys.py +518 -0
  91. openemail/_sync/resources/labels.py +154 -0
  92. openemail/_sync/resources/languages.py +32 -0
  93. openemail/_sync/resources/me.py +53 -0
  94. openemail/_sync/resources/members.py +290 -0
  95. openemail/_sync/resources/provider_imports.py +137 -0
  96. openemail/_sync/resources/roles.py +156 -0
  97. openemail/_sync/resources/rules.py +259 -0
  98. openemail/_sync/resources/security.py +64 -0
  99. openemail/_sync/resources/senders.py +45 -0
  100. openemail/_sync/resources/settings.py +48 -0
  101. openemail/_sync/resources/subscriptions.py +134 -0
  102. openemail/_sync/resources/support.py +31 -0
  103. openemail/_sync/resources/suppressions.py +141 -0
  104. openemail/_sync/resources/temp_mail.py +230 -0
  105. openemail/_sync/resources/templates.py +618 -0
  106. openemail/_sync/resources/threads.py +400 -0
  107. openemail/_sync/resources/tools.py +62 -0
  108. openemail/_sync/resources/tracking.py +282 -0
  109. openemail/_sync/resources/webhooks.py +559 -0
  110. openemail/_sync/resources/workspaces.py +94 -0
  111. openemail/_sync/transport.py +258 -0
  112. openemail/_version.py +1 -0
  113. openemail/constants/__init__.py +2565 -0
  114. openemail/constants/client.py +78 -0
  115. openemail/py.typed +0 -0
  116. openemail/types/__init__.py +1710 -0
  117. openemail/types/__init__.pyi +5865 -0
  118. openemail/types/client.py +25 -0
  119. openemail-0.0.1.dist-info/METADATA +288 -0
  120. openemail-0.0.1.dist-info/RECORD +121 -0
  121. openemail-0.0.1.dist-info/WHEEL +4 -0
openemail/__init__.py ADDED
@@ -0,0 +1,262 @@
1
+ from openemail._async.client import AsyncOpenEmail
2
+ from openemail._async.client import create_temp_mail as create_async_temp_mail
3
+ from openemail._core.credentials import is_access_token, is_api_key
4
+ from openemail._core.errors import (
5
+ OpenEmailApiError,
6
+ OpenEmailError,
7
+ OpenEmailNetworkError,
8
+ WebhookVerificationError,
9
+ )
10
+ from openemail._core.wire import to_base64
11
+ from openemail._default import get_client, init, openemail, reset_client
12
+ from openemail._helpers.languages import is_rtl_language, language_by_code, resolve_language
13
+ from openemail._helpers.messages import is_sealed
14
+ from openemail._helpers.webhooks import verify_webhook_signature
15
+ from openemail._sync.client import OpenEmail, create_temp_mail
16
+ from openemail._version import VERSION
17
+ from openemail.constants import (
18
+ ADDRESS_FORWARD_CONSENT_STATUSES,
19
+ ADDRESS_FORWARD_STATUSES,
20
+ ADDRESS_MEMBER_VIAS,
21
+ API_SCOPES,
22
+ APP_HOST_STATUSES,
23
+ AUDIENCE_MEMBER_STATUSES,
24
+ BILLING_ALERT_KINDS,
25
+ BILLING_ALERT_SEVERITIES,
26
+ BILLING_ALERT_TARGETS,
27
+ BILLING_INTERVALS,
28
+ BILLING_INVOICE_SORTS,
29
+ BILLING_INVOICE_STARTS,
30
+ BILLING_INVOICE_STATUSES,
31
+ BILLING_THEMES,
32
+ BILLING_USAGE_WINDOWS,
33
+ BIMI_STATUSES,
34
+ BRAND_FONT_IDS,
35
+ BRAND_IMAGE_TYPES,
36
+ BRAND_IMAGE_VARIANTS,
37
+ BROADCAST_RECIPIENT_FILTERS,
38
+ BROADCAST_STATUSES,
39
+ CALENDAR_REMINDER_ACTIONS,
40
+ CALENDAR_RESPONSES,
41
+ CALENDAR_TRANSPARENCIES,
42
+ CALENDAR_VISIBILITIES,
43
+ CHAT_SORTS,
44
+ CONNECTED_APP_KINDS,
45
+ CONNECTED_APP_STATUSES,
46
+ CONSOLE_PERMISSIONS,
47
+ CONTACT_BLOCK_LISTS,
48
+ CONTACT_PHOTO_TYPES,
49
+ CONTACT_THREAD_SORTS,
50
+ CREDENTIAL_KINDS,
51
+ DELIVERABILITY_CHECK_IDS,
52
+ DELIVERABILITY_CHECK_STATUSES,
53
+ DELIVERABILITY_GRADES,
54
+ DNS_CONNECTION_STATUSES,
55
+ DNS_PROVISION_STATES,
56
+ DNS_SYNC_OUTCOMES,
57
+ DNS_SYNC_PURPOSES,
58
+ DNS_ZONE_RESOLUTION_KINDS,
59
+ DOMAIN_ADDRESS_DESTINATIONS,
60
+ DOMAIN_DMARC_POLICIES,
61
+ DOMAIN_DMARC_STAGES,
62
+ DOMAIN_LOGO_MARK_KINDS,
63
+ DOMAIN_LOGO_RECORD_OUTCOMES,
64
+ DOMAIN_RECORD_STATUSES,
65
+ EMAIL_NOTIFICATION_CATEGORIES,
66
+ ERROR_TYPES,
67
+ EXPORT_PHASES,
68
+ EXPORT_REFUSALS,
69
+ EXPORT_STATUSES,
70
+ FILE_DIRECTIONS,
71
+ FILE_KINDS,
72
+ FILE_SORTS,
73
+ FILE_USAGES,
74
+ FILE_VISIBILITIES,
75
+ FORM_ALIGNS,
76
+ FORM_CONFIRM_SOURCES,
77
+ FORM_CONTACT_FIELDS,
78
+ FORM_FIELD_ERRORS,
79
+ FORM_FIELD_TYPES,
80
+ FORM_FIELD_WIDTHS,
81
+ FORM_FONTS,
82
+ FORM_LAYOUTS,
83
+ FORM_RADII,
84
+ FORM_SENDER_ISSUES,
85
+ FORM_STARTER_SLUGS,
86
+ FORM_STATUSES,
87
+ FORM_SUBMISSION_STATUSES,
88
+ FORM_SUBSCRIBE_OUTCOMES,
89
+ FORM_SUCCESS_ACTIONS,
90
+ FORM_WIDTHS,
91
+ LANGUAGES,
92
+ LOGIN_BACKGROUND_KINDS,
93
+ LOGIN_BACKGROUND_PRESETS,
94
+ LOGIN_LOGOS,
95
+ MESSAGE_ENCRYPTION_FORMATS,
96
+ PAGE_LIMITS,
97
+ PAID_PLAN_IDS,
98
+ PAY_AS_YOU_GO_LIMITS_CENTS,
99
+ PEOPLE_SORTS,
100
+ PLAN_IDS,
101
+ PROVIDER_IMPORT_DOMAIN_STATES,
102
+ PROVIDER_IMPORT_RESOURCES,
103
+ PROVIDER_IMPORT_STATUSES,
104
+ REWRITE_ACTIONS,
105
+ REWRITE_TARGETS,
106
+ RULE_ACTIONS,
107
+ RULE_FIELDS,
108
+ RULE_OPERATORS,
109
+ STEP_UP_ERROR_CODES,
110
+ STEP_UP_METHODS,
111
+ SUBSCRIPTION_DESTINATIONS,
112
+ SUBSCRIPTION_SORTS,
113
+ SUBSCRIPTION_STATUSES,
114
+ SUPPRESSION_REASONS,
115
+ TEMPLATE_IMAGE_TYPES,
116
+ THREAD_NOTE_COLORS,
117
+ THREAD_SORTS,
118
+ THREAD_SUMMARY_STATES,
119
+ UNSUBSCRIBE_METHODS,
120
+ USERNAME_STATUSES,
121
+ WEBHOOK_EVENTS,
122
+ WEBHOOK_REPLAY_ERROR_CODES,
123
+ WEBHOOK_SIGNATURE_HEADERS,
124
+ WORKSPACE_KINDS,
125
+ )
126
+
127
+ create_client = OpenEmail
128
+
129
+ __version__ = VERSION
130
+
131
+ __all__ = [
132
+ 'ADDRESS_FORWARD_CONSENT_STATUSES',
133
+ 'ADDRESS_FORWARD_STATUSES',
134
+ 'ADDRESS_MEMBER_VIAS',
135
+ 'API_SCOPES',
136
+ 'APP_HOST_STATUSES',
137
+ 'AUDIENCE_MEMBER_STATUSES',
138
+ 'BILLING_ALERT_KINDS',
139
+ 'BILLING_ALERT_SEVERITIES',
140
+ 'BILLING_ALERT_TARGETS',
141
+ 'BILLING_INTERVALS',
142
+ 'BILLING_INVOICE_SORTS',
143
+ 'BILLING_INVOICE_STARTS',
144
+ 'BILLING_INVOICE_STATUSES',
145
+ 'BILLING_THEMES',
146
+ 'BILLING_USAGE_WINDOWS',
147
+ 'BIMI_STATUSES',
148
+ 'BRAND_FONT_IDS',
149
+ 'BRAND_IMAGE_TYPES',
150
+ 'BRAND_IMAGE_VARIANTS',
151
+ 'BROADCAST_RECIPIENT_FILTERS',
152
+ 'BROADCAST_STATUSES',
153
+ 'CALENDAR_REMINDER_ACTIONS',
154
+ 'CALENDAR_RESPONSES',
155
+ 'CALENDAR_TRANSPARENCIES',
156
+ 'CALENDAR_VISIBILITIES',
157
+ 'CHAT_SORTS',
158
+ 'CONNECTED_APP_KINDS',
159
+ 'CONNECTED_APP_STATUSES',
160
+ 'CONSOLE_PERMISSIONS',
161
+ 'CONTACT_BLOCK_LISTS',
162
+ 'CONTACT_PHOTO_TYPES',
163
+ 'CONTACT_THREAD_SORTS',
164
+ 'CREDENTIAL_KINDS',
165
+ 'DELIVERABILITY_CHECK_IDS',
166
+ 'DELIVERABILITY_CHECK_STATUSES',
167
+ 'DELIVERABILITY_GRADES',
168
+ 'DNS_CONNECTION_STATUSES',
169
+ 'DNS_PROVISION_STATES',
170
+ 'DNS_SYNC_OUTCOMES',
171
+ 'DNS_SYNC_PURPOSES',
172
+ 'DNS_ZONE_RESOLUTION_KINDS',
173
+ 'DOMAIN_ADDRESS_DESTINATIONS',
174
+ 'DOMAIN_DMARC_POLICIES',
175
+ 'DOMAIN_DMARC_STAGES',
176
+ 'DOMAIN_LOGO_MARK_KINDS',
177
+ 'DOMAIN_LOGO_RECORD_OUTCOMES',
178
+ 'DOMAIN_RECORD_STATUSES',
179
+ 'EMAIL_NOTIFICATION_CATEGORIES',
180
+ 'ERROR_TYPES',
181
+ 'EXPORT_PHASES',
182
+ 'EXPORT_REFUSALS',
183
+ 'EXPORT_STATUSES',
184
+ 'FILE_DIRECTIONS',
185
+ 'FILE_KINDS',
186
+ 'FILE_SORTS',
187
+ 'FILE_USAGES',
188
+ 'FILE_VISIBILITIES',
189
+ 'FORM_ALIGNS',
190
+ 'FORM_CONFIRM_SOURCES',
191
+ 'FORM_CONTACT_FIELDS',
192
+ 'FORM_FIELD_ERRORS',
193
+ 'FORM_FIELD_TYPES',
194
+ 'FORM_FIELD_WIDTHS',
195
+ 'FORM_FONTS',
196
+ 'FORM_LAYOUTS',
197
+ 'FORM_RADII',
198
+ 'FORM_SENDER_ISSUES',
199
+ 'FORM_STARTER_SLUGS',
200
+ 'FORM_STATUSES',
201
+ 'FORM_SUBMISSION_STATUSES',
202
+ 'FORM_SUBSCRIBE_OUTCOMES',
203
+ 'FORM_SUCCESS_ACTIONS',
204
+ 'FORM_WIDTHS',
205
+ 'LANGUAGES',
206
+ 'LOGIN_BACKGROUND_KINDS',
207
+ 'LOGIN_BACKGROUND_PRESETS',
208
+ 'LOGIN_LOGOS',
209
+ 'MESSAGE_ENCRYPTION_FORMATS',
210
+ 'PAGE_LIMITS',
211
+ 'PAID_PLAN_IDS',
212
+ 'PAY_AS_YOU_GO_LIMITS_CENTS',
213
+ 'PEOPLE_SORTS',
214
+ 'PLAN_IDS',
215
+ 'PROVIDER_IMPORT_DOMAIN_STATES',
216
+ 'PROVIDER_IMPORT_RESOURCES',
217
+ 'PROVIDER_IMPORT_STATUSES',
218
+ 'REWRITE_ACTIONS',
219
+ 'REWRITE_TARGETS',
220
+ 'RULE_ACTIONS',
221
+ 'RULE_FIELDS',
222
+ 'RULE_OPERATORS',
223
+ 'STEP_UP_ERROR_CODES',
224
+ 'STEP_UP_METHODS',
225
+ 'SUBSCRIPTION_DESTINATIONS',
226
+ 'SUBSCRIPTION_SORTS',
227
+ 'SUBSCRIPTION_STATUSES',
228
+ 'SUPPRESSION_REASONS',
229
+ 'TEMPLATE_IMAGE_TYPES',
230
+ 'THREAD_NOTE_COLORS',
231
+ 'THREAD_SORTS',
232
+ 'THREAD_SUMMARY_STATES',
233
+ 'UNSUBSCRIBE_METHODS',
234
+ 'USERNAME_STATUSES',
235
+ 'VERSION',
236
+ 'WEBHOOK_EVENTS',
237
+ 'WEBHOOK_REPLAY_ERROR_CODES',
238
+ 'WEBHOOK_SIGNATURE_HEADERS',
239
+ 'WORKSPACE_KINDS',
240
+ 'AsyncOpenEmail',
241
+ 'OpenEmail',
242
+ 'OpenEmailApiError',
243
+ 'OpenEmailError',
244
+ 'OpenEmailNetworkError',
245
+ 'WebhookVerificationError',
246
+ '__version__',
247
+ 'create_async_temp_mail',
248
+ 'create_client',
249
+ 'create_temp_mail',
250
+ 'get_client',
251
+ 'init',
252
+ 'is_access_token',
253
+ 'is_api_key',
254
+ 'is_rtl_language',
255
+ 'is_sealed',
256
+ 'language_by_code',
257
+ 'openemail',
258
+ 'reset_client',
259
+ 'resolve_language',
260
+ 'to_base64',
261
+ 'verify_webhook_signature',
262
+ ]
File without changes
@@ -0,0 +1,383 @@
1
+ from __future__ import annotations
2
+
3
+ from functools import cached_property
4
+ from typing import TYPE_CHECKING
5
+
6
+ from openemail._async.transport import AsyncTransport
7
+ from openemail._core.credentials import assert_credential, mode_of
8
+ from openemail._core.environment import resolve_base_url, resolve_credentials
9
+ from openemail._core.sentinel import NOT_GIVEN, NotGiven
10
+
11
+ if TYPE_CHECKING:
12
+ from collections.abc import Mapping
13
+ from types import TracebackType
14
+
15
+ import httpx
16
+ from typing_extensions import Self
17
+
18
+ from openemail._async.resources.account import AsyncAccount
19
+ from openemail._async.resources.addresses import AsyncAddresses
20
+ from openemail._async.resources.analytics import AsyncAnalytics
21
+ from openemail._async.resources.app_host import AsyncAppHost
22
+ from openemail._async.resources.audiences import AsyncAudiences
23
+ from openemail._async.resources.billing import AsyncBilling
24
+ from openemail._async.resources.branding import AsyncBranding
25
+ from openemail._async.resources.broadcasts import AsyncBroadcasts
26
+ from openemail._async.resources.calendar import AsyncCalendar
27
+ from openemail._async.resources.chats import AsyncChats
28
+ from openemail._async.resources.contacts import AsyncContacts
29
+ from openemail._async.resources.dns_connections import AsyncDnsConnections
30
+ from openemail._async.resources.domains import AsyncDomains
31
+ from openemail._async.resources.drafts import AsyncDrafts
32
+ from openemail._async.resources.emails import AsyncEmails
33
+ from openemail._async.resources.encryption import AsyncEncryption
34
+ from openemail._async.resources.exports import AsyncExports
35
+ from openemail._async.resources.files import AsyncFiles
36
+ from openemail._async.resources.forms import AsyncForms
37
+ from openemail._async.resources.imports import AsyncImports
38
+ from openemail._async.resources.keys import AsyncKeys
39
+ from openemail._async.resources.labels import AsyncLabels
40
+ from openemail._async.resources.languages import AsyncLanguages
41
+ from openemail._async.resources.me import AsyncMe
42
+ from openemail._async.resources.members import AsyncMembers
43
+ from openemail._async.resources.provider_imports import AsyncProviderImports
44
+ from openemail._async.resources.roles import AsyncRoles
45
+ from openemail._async.resources.rules import AsyncRules
46
+ from openemail._async.resources.security import AsyncSecurity
47
+ from openemail._async.resources.senders import AsyncSenders
48
+ from openemail._async.resources.settings import AsyncSettings
49
+ from openemail._async.resources.subscriptions import AsyncSubscriptions
50
+ from openemail._async.resources.support import AsyncSupport
51
+ from openemail._async.resources.suppressions import AsyncSuppressions
52
+ from openemail._async.resources.temp_mail import AsyncTempMail
53
+ from openemail._async.resources.templates import AsyncTemplates
54
+ from openemail._async.resources.threads import AsyncThreads
55
+ from openemail._async.resources.tools import AsyncTools
56
+ from openemail._async.resources.tracking import AsyncTracking
57
+ from openemail._async.resources.webhooks import AsyncWebhooks
58
+ from openemail._async.resources.workspaces import AsyncWorkspaces
59
+ from openemail.types import ApiKeyMode
60
+ from openemail.types.client import AsyncAccessTokenProvider
61
+
62
+
63
+ class AsyncOpenEmail:
64
+ def __init__(
65
+ self,
66
+ api_key: str | NotGiven | None = NOT_GIVEN,
67
+ *,
68
+ access_token: str | AsyncAccessTokenProvider | NotGiven | None = NOT_GIVEN,
69
+ base_url: str | None = None,
70
+ http_client: httpx.AsyncClient | None = None,
71
+ max_retries: int | None = None,
72
+ timeout: float | None = None,
73
+ user_agent: str | None = None,
74
+ headers: Mapping[str, str] | None = None,
75
+ disable_update_notice: bool = False,
76
+ ) -> None:
77
+ key, token = resolve_credentials(api_key, access_token)
78
+
79
+ assert_credential(key, token, required=True)
80
+
81
+ self._transport = AsyncTransport(
82
+ api_key=key,
83
+ access_token=token,
84
+ base_url=resolve_base_url(base_url),
85
+ http_client=http_client,
86
+ max_retries=max_retries,
87
+ timeout=timeout,
88
+ user_agent=user_agent,
89
+ headers=headers,
90
+ disable_update_notice=disable_update_notice,
91
+ )
92
+ self.mode: ApiKeyMode = mode_of(key)
93
+
94
+ @property
95
+ def raw(self) -> AsyncTransport:
96
+ return self._transport
97
+
98
+ async def aclose(self) -> None:
99
+ await self._transport.aclose()
100
+
101
+ async def __aenter__(self) -> Self:
102
+ return self
103
+
104
+ async def __aexit__(
105
+ self,
106
+ exc_type: type[BaseException] | None,
107
+ exc: BaseException | None,
108
+ traceback: TracebackType | None,
109
+ ) -> None:
110
+ await self.aclose()
111
+
112
+ @cached_property
113
+ def me(self) -> AsyncMe:
114
+ from openemail._async.resources.me import AsyncMe
115
+
116
+ return AsyncMe(self._transport)
117
+
118
+ @cached_property
119
+ def security(self) -> AsyncSecurity:
120
+ from openemail._async.resources.security import AsyncSecurity
121
+
122
+ return AsyncSecurity(self._transport)
123
+
124
+ @cached_property
125
+ def keys(self) -> AsyncKeys:
126
+ from openemail._async.resources.keys import AsyncKeys
127
+
128
+ return AsyncKeys(self._transport)
129
+
130
+ @cached_property
131
+ def addresses(self) -> AsyncAddresses:
132
+ from openemail._async.resources.addresses import AsyncAddresses
133
+
134
+ return AsyncAddresses(self._transport)
135
+
136
+ @cached_property
137
+ def languages(self) -> AsyncLanguages:
138
+ from openemail._async.resources.languages import AsyncLanguages
139
+
140
+ return AsyncLanguages(self._transport)
141
+
142
+ @cached_property
143
+ def emails(self) -> AsyncEmails:
144
+ from openemail._async.resources.emails import AsyncEmails
145
+
146
+ return AsyncEmails(self._transport)
147
+
148
+ @cached_property
149
+ def templates(self) -> AsyncTemplates:
150
+ from openemail._async.resources.templates import AsyncTemplates
151
+
152
+ return AsyncTemplates(self._transport)
153
+
154
+ @cached_property
155
+ def tracking(self) -> AsyncTracking:
156
+ from openemail._async.resources.tracking import AsyncTracking
157
+
158
+ return AsyncTracking(self._transport)
159
+
160
+ @cached_property
161
+ def threads(self) -> AsyncThreads:
162
+ from openemail._async.resources.threads import AsyncThreads
163
+
164
+ return AsyncThreads(self._transport)
165
+
166
+ @cached_property
167
+ def drafts(self) -> AsyncDrafts:
168
+ from openemail._async.resources.drafts import AsyncDrafts
169
+
170
+ return AsyncDrafts(self._transport)
171
+
172
+ @cached_property
173
+ def labels(self) -> AsyncLabels:
174
+ from openemail._async.resources.labels import AsyncLabels
175
+
176
+ return AsyncLabels(self._transport)
177
+
178
+ @cached_property
179
+ def contacts(self) -> AsyncContacts:
180
+ from openemail._async.resources.contacts import AsyncContacts
181
+
182
+ return AsyncContacts(self._transport)
183
+
184
+ @cached_property
185
+ def audiences(self) -> AsyncAudiences:
186
+ from openemail._async.resources.audiences import AsyncAudiences
187
+
188
+ return AsyncAudiences(self._transport)
189
+
190
+ @cached_property
191
+ def billing(self) -> AsyncBilling:
192
+ from openemail._async.resources.billing import AsyncBilling
193
+
194
+ return AsyncBilling(self._transport)
195
+
196
+ @cached_property
197
+ def forms(self) -> AsyncForms:
198
+ from openemail._async.resources.forms import AsyncForms
199
+
200
+ return AsyncForms(self._transport)
201
+
202
+ @cached_property
203
+ def broadcasts(self) -> AsyncBroadcasts:
204
+ from openemail._async.resources.broadcasts import AsyncBroadcasts
205
+
206
+ return AsyncBroadcasts(self._transport)
207
+
208
+ @cached_property
209
+ def domains(self) -> AsyncDomains:
210
+ from openemail._async.resources.domains import AsyncDomains
211
+
212
+ return AsyncDomains(self._transport)
213
+
214
+ @cached_property
215
+ def app_host(self) -> AsyncAppHost:
216
+ from openemail._async.resources.app_host import AsyncAppHost
217
+
218
+ return AsyncAppHost(self._transport)
219
+
220
+ @cached_property
221
+ def branding(self) -> AsyncBranding:
222
+ from openemail._async.resources.branding import AsyncBranding
223
+
224
+ return AsyncBranding(self._transport)
225
+
226
+ @cached_property
227
+ def rules(self) -> AsyncRules:
228
+ from openemail._async.resources.rules import AsyncRules
229
+
230
+ return AsyncRules(self._transport)
231
+
232
+ @cached_property
233
+ def webhooks(self) -> AsyncWebhooks:
234
+ from openemail._async.resources.webhooks import AsyncWebhooks
235
+
236
+ return AsyncWebhooks(self._transport)
237
+
238
+ @cached_property
239
+ def imports(self) -> AsyncImports:
240
+ from openemail._async.resources.imports import AsyncImports
241
+
242
+ return AsyncImports(self._transport)
243
+
244
+ @cached_property
245
+ def provider_imports(self) -> AsyncProviderImports:
246
+ from openemail._async.resources.provider_imports import AsyncProviderImports
247
+
248
+ return AsyncProviderImports(self._transport)
249
+
250
+ @cached_property
251
+ def calendar(self) -> AsyncCalendar:
252
+ from openemail._async.resources.calendar import AsyncCalendar
253
+
254
+ return AsyncCalendar(self._transport)
255
+
256
+ @cached_property
257
+ def settings(self) -> AsyncSettings:
258
+ from openemail._async.resources.settings import AsyncSettings
259
+
260
+ return AsyncSettings(self._transport)
261
+
262
+ @cached_property
263
+ def roles(self) -> AsyncRoles:
264
+ from openemail._async.resources.roles import AsyncRoles
265
+
266
+ return AsyncRoles(self._transport)
267
+
268
+ @cached_property
269
+ def members(self) -> AsyncMembers:
270
+ from openemail._async.resources.members import AsyncMembers
271
+
272
+ return AsyncMembers(self._transport)
273
+
274
+ @cached_property
275
+ def suppressions(self) -> AsyncSuppressions:
276
+ from openemail._async.resources.suppressions import AsyncSuppressions
277
+
278
+ return AsyncSuppressions(self._transport)
279
+
280
+ @cached_property
281
+ def files(self) -> AsyncFiles:
282
+ from openemail._async.resources.files import AsyncFiles
283
+
284
+ return AsyncFiles(self._transport)
285
+
286
+ @cached_property
287
+ def temp_mail(self) -> AsyncTempMail:
288
+ from openemail._async.resources.temp_mail import AsyncTempMail
289
+
290
+ return AsyncTempMail(self._transport)
291
+
292
+ @cached_property
293
+ def exports(self) -> AsyncExports:
294
+ from openemail._async.resources.exports import AsyncExports
295
+
296
+ return AsyncExports(self._transport)
297
+
298
+ @cached_property
299
+ def chats(self) -> AsyncChats:
300
+ from openemail._async.resources.chats import AsyncChats
301
+
302
+ return AsyncChats(self._transport)
303
+
304
+ @cached_property
305
+ def encryption(self) -> AsyncEncryption:
306
+ from openemail._async.resources.encryption import AsyncEncryption
307
+
308
+ return AsyncEncryption(self._transport)
309
+
310
+ @cached_property
311
+ def support(self) -> AsyncSupport:
312
+ from openemail._async.resources.support import AsyncSupport
313
+
314
+ return AsyncSupport(self._transport)
315
+
316
+ @cached_property
317
+ def tools(self) -> AsyncTools:
318
+ from openemail._async.resources.tools import AsyncTools
319
+
320
+ return AsyncTools(self._transport)
321
+
322
+ @cached_property
323
+ def senders(self) -> AsyncSenders:
324
+ from openemail._async.resources.senders import AsyncSenders
325
+
326
+ return AsyncSenders(self._transport)
327
+
328
+ @cached_property
329
+ def analytics(self) -> AsyncAnalytics:
330
+ from openemail._async.resources.analytics import AsyncAnalytics
331
+
332
+ return AsyncAnalytics(self._transport)
333
+
334
+ @cached_property
335
+ def subscriptions(self) -> AsyncSubscriptions:
336
+ from openemail._async.resources.subscriptions import AsyncSubscriptions
337
+
338
+ return AsyncSubscriptions(self._transport)
339
+
340
+ @cached_property
341
+ def dns_connections(self) -> AsyncDnsConnections:
342
+ from openemail._async.resources.dns_connections import AsyncDnsConnections
343
+
344
+ return AsyncDnsConnections(self._transport)
345
+
346
+ @cached_property
347
+ def workspaces(self) -> AsyncWorkspaces:
348
+ from openemail._async.resources.workspaces import AsyncWorkspaces
349
+
350
+ return AsyncWorkspaces(self._transport)
351
+
352
+ @cached_property
353
+ def account(self) -> AsyncAccount:
354
+ from openemail._async.resources.account import AsyncAccount
355
+
356
+ return AsyncAccount(self._transport)
357
+
358
+
359
+ def create_temp_mail(
360
+ *,
361
+ inbox_token: str | None = None,
362
+ base_url: str | None = None,
363
+ http_client: httpx.AsyncClient | None = None,
364
+ max_retries: int | None = None,
365
+ timeout: float | None = None,
366
+ user_agent: str | None = None,
367
+ headers: Mapping[str, str] | None = None,
368
+ disable_update_notice: bool = False,
369
+ ) -> AsyncTempMail:
370
+ from openemail._async.resources.temp_mail import AsyncTempMail
371
+
372
+ return AsyncTempMail(
373
+ AsyncTransport(
374
+ inbox_token=inbox_token,
375
+ base_url=resolve_base_url(base_url),
376
+ http_client=http_client,
377
+ max_retries=max_retries,
378
+ timeout=timeout,
379
+ user_agent=user_agent,
380
+ headers=headers,
381
+ disable_update_notice=disable_update_notice,
382
+ )
383
+ )