aiinbx 0.3.0__py3-none-any.whl → 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of aiinbx might be problematic. Click here for more details.
- aiinbx/__init__.py +3 -1
- aiinbx/_base_client.py +12 -12
- aiinbx/_client.py +17 -9
- aiinbx/_compat.py +48 -48
- aiinbx/_models.py +50 -44
- aiinbx/_qs.py +7 -7
- aiinbx/_types.py +53 -12
- aiinbx/_utils/__init__.py +9 -2
- aiinbx/_utils/_compat.py +45 -0
- aiinbx/_utils/_datetime_parse.py +136 -0
- aiinbx/_utils/_transform.py +13 -3
- aiinbx/_utils/_typing.py +6 -1
- aiinbx/_utils/_utils.py +4 -5
- aiinbx/_version.py +1 -1
- aiinbx/resources/__init__.py +14 -0
- aiinbx/resources/domains.py +455 -0
- aiinbx/resources/emails.py +44 -44
- aiinbx/resources/threads.py +56 -56
- aiinbx/types/__init__.py +6 -0
- aiinbx/types/domain_create_params.py +11 -0
- aiinbx/types/domain_create_response.py +26 -0
- aiinbx/types/domain_delete_response.py +11 -0
- aiinbx/types/domain_list_response.py +48 -0
- aiinbx/types/domain_retrieve_response.py +44 -0
- aiinbx/types/domain_verify_response.py +147 -0
- aiinbx/types/email_reply_params.py +5 -4
- aiinbx/types/email_send_params.py +7 -6
- aiinbx/types/thread_forward_params.py +5 -4
- aiinbx/types/thread_search_params.py +2 -2
- {aiinbx-0.3.0.dist-info → aiinbx-0.4.0.dist-info}/METADATA +1 -1
- aiinbx-0.4.0.dist-info/RECORD +53 -0
- aiinbx-0.3.0.dist-info/RECORD +0 -44
- {aiinbx-0.3.0.dist-info → aiinbx-0.4.0.dist-info}/WHEEL +0 -0
- {aiinbx-0.3.0.dist-info → aiinbx-0.4.0.dist-info}/licenses/LICENSE +0 -0
aiinbx/resources/threads.py
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import Union
|
|
6
6
|
from typing_extensions import Literal
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
10
|
from ..types import thread_search_params, thread_forward_params
|
|
11
|
-
from .._types import
|
|
11
|
+
from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
12
12
|
from .._utils import maybe_transform, async_maybe_transform
|
|
13
13
|
from .._compat import cached_property
|
|
14
14
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -55,7 +55,7 @@ class ThreadsResource(SyncAPIResource):
|
|
|
55
55
|
extra_headers: Headers | None = None,
|
|
56
56
|
extra_query: Query | None = None,
|
|
57
57
|
extra_body: Body | None = None,
|
|
58
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
58
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
59
59
|
) -> ThreadRetrieveResponse:
|
|
60
60
|
"""
|
|
61
61
|
Retrieve a specific thread with all its emails by thread ID using API key
|
|
@@ -84,20 +84,20 @@ class ThreadsResource(SyncAPIResource):
|
|
|
84
84
|
self,
|
|
85
85
|
thread_id: str,
|
|
86
86
|
*,
|
|
87
|
-
to: Union[str,
|
|
88
|
-
bcc: Union[str,
|
|
89
|
-
cc: Union[str,
|
|
90
|
-
from_: str |
|
|
91
|
-
from_name: str |
|
|
92
|
-
include_attachments: bool |
|
|
93
|
-
is_draft: bool |
|
|
94
|
-
note: str |
|
|
87
|
+
to: Union[str, SequenceNotStr[str]],
|
|
88
|
+
bcc: Union[str, SequenceNotStr[str]] | Omit = omit,
|
|
89
|
+
cc: Union[str, SequenceNotStr[str]] | Omit = omit,
|
|
90
|
+
from_: str | Omit = omit,
|
|
91
|
+
from_name: str | Omit = omit,
|
|
92
|
+
include_attachments: bool | Omit = omit,
|
|
93
|
+
is_draft: bool | Omit = omit,
|
|
94
|
+
note: str | Omit = omit,
|
|
95
95
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
96
96
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
97
97
|
extra_headers: Headers | None = None,
|
|
98
98
|
extra_query: Query | None = None,
|
|
99
99
|
extra_body: Body | None = None,
|
|
100
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
100
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
101
101
|
) -> ThreadForwardResponse:
|
|
102
102
|
"""
|
|
103
103
|
Forward the entire thread as a readable transcript.
|
|
@@ -137,17 +137,17 @@ class ThreadsResource(SyncAPIResource):
|
|
|
137
137
|
def search(
|
|
138
138
|
self,
|
|
139
139
|
*,
|
|
140
|
-
conversation_state: Literal["awaiting_reply", "needs_reply", "active", "stale"] |
|
|
141
|
-
created_after: str |
|
|
142
|
-
created_before: str |
|
|
143
|
-
has_email_from_address: str |
|
|
144
|
-
has_email_to_address: str |
|
|
145
|
-
has_participant_emails:
|
|
146
|
-
last_email_after: str |
|
|
147
|
-
last_email_before: str |
|
|
148
|
-
limit: float |
|
|
149
|
-
offset: float |
|
|
150
|
-
some_email_has_direction: Literal["INBOUND", "OUTBOUND"] |
|
|
140
|
+
conversation_state: Literal["awaiting_reply", "needs_reply", "active", "stale"] | Omit = omit,
|
|
141
|
+
created_after: str | Omit = omit,
|
|
142
|
+
created_before: str | Omit = omit,
|
|
143
|
+
has_email_from_address: str | Omit = omit,
|
|
144
|
+
has_email_to_address: str | Omit = omit,
|
|
145
|
+
has_participant_emails: SequenceNotStr[str] | Omit = omit,
|
|
146
|
+
last_email_after: str | Omit = omit,
|
|
147
|
+
last_email_before: str | Omit = omit,
|
|
148
|
+
limit: float | Omit = omit,
|
|
149
|
+
offset: float | Omit = omit,
|
|
150
|
+
some_email_has_direction: Literal["INBOUND", "OUTBOUND"] | Omit = omit,
|
|
151
151
|
some_email_has_status: Literal[
|
|
152
152
|
"DRAFT",
|
|
153
153
|
"QUEUED",
|
|
@@ -161,17 +161,17 @@ class ThreadsResource(SyncAPIResource):
|
|
|
161
161
|
"READ",
|
|
162
162
|
"ARCHIVED",
|
|
163
163
|
]
|
|
164
|
-
|
|
|
165
|
-
sort_by: Literal["createdAt", "lastEmailAt", "subject"] |
|
|
166
|
-
sort_order: Literal["asc", "desc"] |
|
|
167
|
-
stale_threshold_days: float |
|
|
168
|
-
subject_contains: str |
|
|
164
|
+
| Omit = omit,
|
|
165
|
+
sort_by: Literal["createdAt", "lastEmailAt", "subject"] | Omit = omit,
|
|
166
|
+
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
167
|
+
stale_threshold_days: float | Omit = omit,
|
|
168
|
+
subject_contains: str | Omit = omit,
|
|
169
169
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
170
170
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
171
171
|
extra_headers: Headers | None = None,
|
|
172
172
|
extra_query: Query | None = None,
|
|
173
173
|
extra_body: Body | None = None,
|
|
174
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
174
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
175
175
|
) -> ThreadSearchResponse:
|
|
176
176
|
"""
|
|
177
177
|
Search threads with various filtering options optimized for AI agents
|
|
@@ -244,7 +244,7 @@ class AsyncThreadsResource(AsyncAPIResource):
|
|
|
244
244
|
extra_headers: Headers | None = None,
|
|
245
245
|
extra_query: Query | None = None,
|
|
246
246
|
extra_body: Body | None = None,
|
|
247
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
247
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
248
248
|
) -> ThreadRetrieveResponse:
|
|
249
249
|
"""
|
|
250
250
|
Retrieve a specific thread with all its emails by thread ID using API key
|
|
@@ -273,20 +273,20 @@ class AsyncThreadsResource(AsyncAPIResource):
|
|
|
273
273
|
self,
|
|
274
274
|
thread_id: str,
|
|
275
275
|
*,
|
|
276
|
-
to: Union[str,
|
|
277
|
-
bcc: Union[str,
|
|
278
|
-
cc: Union[str,
|
|
279
|
-
from_: str |
|
|
280
|
-
from_name: str |
|
|
281
|
-
include_attachments: bool |
|
|
282
|
-
is_draft: bool |
|
|
283
|
-
note: str |
|
|
276
|
+
to: Union[str, SequenceNotStr[str]],
|
|
277
|
+
bcc: Union[str, SequenceNotStr[str]] | Omit = omit,
|
|
278
|
+
cc: Union[str, SequenceNotStr[str]] | Omit = omit,
|
|
279
|
+
from_: str | Omit = omit,
|
|
280
|
+
from_name: str | Omit = omit,
|
|
281
|
+
include_attachments: bool | Omit = omit,
|
|
282
|
+
is_draft: bool | Omit = omit,
|
|
283
|
+
note: str | Omit = omit,
|
|
284
284
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
285
285
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
286
286
|
extra_headers: Headers | None = None,
|
|
287
287
|
extra_query: Query | None = None,
|
|
288
288
|
extra_body: Body | None = None,
|
|
289
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
289
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
290
290
|
) -> ThreadForwardResponse:
|
|
291
291
|
"""
|
|
292
292
|
Forward the entire thread as a readable transcript.
|
|
@@ -326,17 +326,17 @@ class AsyncThreadsResource(AsyncAPIResource):
|
|
|
326
326
|
async def search(
|
|
327
327
|
self,
|
|
328
328
|
*,
|
|
329
|
-
conversation_state: Literal["awaiting_reply", "needs_reply", "active", "stale"] |
|
|
330
|
-
created_after: str |
|
|
331
|
-
created_before: str |
|
|
332
|
-
has_email_from_address: str |
|
|
333
|
-
has_email_to_address: str |
|
|
334
|
-
has_participant_emails:
|
|
335
|
-
last_email_after: str |
|
|
336
|
-
last_email_before: str |
|
|
337
|
-
limit: float |
|
|
338
|
-
offset: float |
|
|
339
|
-
some_email_has_direction: Literal["INBOUND", "OUTBOUND"] |
|
|
329
|
+
conversation_state: Literal["awaiting_reply", "needs_reply", "active", "stale"] | Omit = omit,
|
|
330
|
+
created_after: str | Omit = omit,
|
|
331
|
+
created_before: str | Omit = omit,
|
|
332
|
+
has_email_from_address: str | Omit = omit,
|
|
333
|
+
has_email_to_address: str | Omit = omit,
|
|
334
|
+
has_participant_emails: SequenceNotStr[str] | Omit = omit,
|
|
335
|
+
last_email_after: str | Omit = omit,
|
|
336
|
+
last_email_before: str | Omit = omit,
|
|
337
|
+
limit: float | Omit = omit,
|
|
338
|
+
offset: float | Omit = omit,
|
|
339
|
+
some_email_has_direction: Literal["INBOUND", "OUTBOUND"] | Omit = omit,
|
|
340
340
|
some_email_has_status: Literal[
|
|
341
341
|
"DRAFT",
|
|
342
342
|
"QUEUED",
|
|
@@ -350,17 +350,17 @@ class AsyncThreadsResource(AsyncAPIResource):
|
|
|
350
350
|
"READ",
|
|
351
351
|
"ARCHIVED",
|
|
352
352
|
]
|
|
353
|
-
|
|
|
354
|
-
sort_by: Literal["createdAt", "lastEmailAt", "subject"] |
|
|
355
|
-
sort_order: Literal["asc", "desc"] |
|
|
356
|
-
stale_threshold_days: float |
|
|
357
|
-
subject_contains: str |
|
|
353
|
+
| Omit = omit,
|
|
354
|
+
sort_by: Literal["createdAt", "lastEmailAt", "subject"] | Omit = omit,
|
|
355
|
+
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
356
|
+
stale_threshold_days: float | Omit = omit,
|
|
357
|
+
subject_contains: str | Omit = omit,
|
|
358
358
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
359
359
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
360
360
|
extra_headers: Headers | None = None,
|
|
361
361
|
extra_query: Query | None = None,
|
|
362
362
|
extra_body: Body | None = None,
|
|
363
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
363
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
364
364
|
) -> ThreadSearchResponse:
|
|
365
365
|
"""
|
|
366
366
|
Search threads with various filtering options optimized for AI agents
|
aiinbx/types/__init__.py
CHANGED
|
@@ -5,10 +5,16 @@ from __future__ import annotations
|
|
|
5
5
|
from .email_send_params import EmailSendParams as EmailSendParams
|
|
6
6
|
from .email_reply_params import EmailReplyParams as EmailReplyParams
|
|
7
7
|
from .email_send_response import EmailSendResponse as EmailSendResponse
|
|
8
|
+
from .domain_create_params import DomainCreateParams as DomainCreateParams
|
|
9
|
+
from .domain_list_response import DomainListResponse as DomainListResponse
|
|
8
10
|
from .email_reply_response import EmailReplyResponse as EmailReplyResponse
|
|
9
11
|
from .thread_search_params import ThreadSearchParams as ThreadSearchParams
|
|
10
12
|
from .thread_forward_params import ThreadForwardParams as ThreadForwardParams
|
|
13
|
+
from .domain_create_response import DomainCreateResponse as DomainCreateResponse
|
|
14
|
+
from .domain_delete_response import DomainDeleteResponse as DomainDeleteResponse
|
|
15
|
+
from .domain_verify_response import DomainVerifyResponse as DomainVerifyResponse
|
|
11
16
|
from .thread_search_response import ThreadSearchResponse as ThreadSearchResponse
|
|
12
17
|
from .email_retrieve_response import EmailRetrieveResponse as EmailRetrieveResponse
|
|
13
18
|
from .thread_forward_response import ThreadForwardResponse as ThreadForwardResponse
|
|
19
|
+
from .domain_retrieve_response import DomainRetrieveResponse as DomainRetrieveResponse
|
|
14
20
|
from .thread_retrieve_response import ThreadRetrieveResponse as ThreadRetrieveResponse
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["DomainCreateParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DomainCreateParams(TypedDict, total=False):
|
|
11
|
+
domain: Required[str]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DomainCreateResponse", "Record"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Record(BaseModel):
|
|
14
|
+
name: str
|
|
15
|
+
|
|
16
|
+
type: Literal["TXT", "CNAME", "MX"]
|
|
17
|
+
|
|
18
|
+
value: str
|
|
19
|
+
|
|
20
|
+
priority: Optional[float] = None
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class DomainCreateResponse(BaseModel):
|
|
24
|
+
domain_id: str = FieldInfo(alias="domainId")
|
|
25
|
+
|
|
26
|
+
records: List[Record]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing_extensions import Literal
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["DomainDeleteResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DomainDeleteResponse(BaseModel):
|
|
11
|
+
success: Literal[True]
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DomainListResponse", "Domain", "DomainDNSRecord"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class DomainDNSRecord(BaseModel):
|
|
14
|
+
name: str
|
|
15
|
+
|
|
16
|
+
type: Literal["TXT", "CNAME", "MX"]
|
|
17
|
+
|
|
18
|
+
value: str
|
|
19
|
+
|
|
20
|
+
is_verified: Optional[bool] = FieldInfo(alias="isVerified", default=None)
|
|
21
|
+
|
|
22
|
+
last_checked_at: Optional[str] = FieldInfo(alias="lastCheckedAt", default=None)
|
|
23
|
+
|
|
24
|
+
priority: Optional[float] = None
|
|
25
|
+
|
|
26
|
+
verification_status: Optional[Literal["verified", "missing", "pending"]] = FieldInfo(
|
|
27
|
+
alias="verificationStatus", default=None
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class Domain(BaseModel):
|
|
32
|
+
id: str
|
|
33
|
+
|
|
34
|
+
created_at: str = FieldInfo(alias="createdAt")
|
|
35
|
+
|
|
36
|
+
domain: str
|
|
37
|
+
|
|
38
|
+
status: Literal["VERIFIED", "PENDING_VERIFICATION", "NOT_REGISTERED"]
|
|
39
|
+
|
|
40
|
+
updated_at: str = FieldInfo(alias="updatedAt")
|
|
41
|
+
|
|
42
|
+
verified_at: Optional[str] = FieldInfo(alias="verifiedAt", default=None)
|
|
43
|
+
|
|
44
|
+
dns_records: Optional[List[DomainDNSRecord]] = FieldInfo(alias="dnsRecords", default=None)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class DomainListResponse(BaseModel):
|
|
48
|
+
domains: List[Domain]
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DomainRetrieveResponse", "DNSRecord"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class DNSRecord(BaseModel):
|
|
14
|
+
name: str
|
|
15
|
+
|
|
16
|
+
type: Literal["TXT", "CNAME", "MX"]
|
|
17
|
+
|
|
18
|
+
value: str
|
|
19
|
+
|
|
20
|
+
is_verified: Optional[bool] = FieldInfo(alias="isVerified", default=None)
|
|
21
|
+
|
|
22
|
+
last_checked_at: Optional[str] = FieldInfo(alias="lastCheckedAt", default=None)
|
|
23
|
+
|
|
24
|
+
priority: Optional[float] = None
|
|
25
|
+
|
|
26
|
+
verification_status: Optional[Literal["verified", "missing", "pending"]] = FieldInfo(
|
|
27
|
+
alias="verificationStatus", default=None
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class DomainRetrieveResponse(BaseModel):
|
|
32
|
+
id: str
|
|
33
|
+
|
|
34
|
+
created_at: str = FieldInfo(alias="createdAt")
|
|
35
|
+
|
|
36
|
+
domain: str
|
|
37
|
+
|
|
38
|
+
status: Literal["VERIFIED", "PENDING_VERIFICATION", "NOT_REGISTERED"]
|
|
39
|
+
|
|
40
|
+
updated_at: str = FieldInfo(alias="updatedAt")
|
|
41
|
+
|
|
42
|
+
verified_at: Optional[str] = FieldInfo(alias="verifiedAt", default=None)
|
|
43
|
+
|
|
44
|
+
dns_records: Optional[List[DNSRecord]] = FieldInfo(alias="dnsRecords", default=None)
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"DomainVerifyResponse",
|
|
12
|
+
"Domain",
|
|
13
|
+
"DomainDNSRecord",
|
|
14
|
+
"Verification",
|
|
15
|
+
"VerificationDebug",
|
|
16
|
+
"VerificationDNS",
|
|
17
|
+
"VerificationDNSDmarc",
|
|
18
|
+
"VerificationDNSMailFrom",
|
|
19
|
+
"VerificationDNSMx",
|
|
20
|
+
"VerificationDNSMxRecord",
|
|
21
|
+
"VerificationMxConflict",
|
|
22
|
+
"VerificationMxConflictConflictingRecord",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class DomainDNSRecord(BaseModel):
|
|
27
|
+
name: str
|
|
28
|
+
|
|
29
|
+
type: Literal["TXT", "CNAME", "MX"]
|
|
30
|
+
|
|
31
|
+
value: str
|
|
32
|
+
|
|
33
|
+
is_verified: Optional[bool] = FieldInfo(alias="isVerified", default=None)
|
|
34
|
+
|
|
35
|
+
last_checked_at: Optional[str] = FieldInfo(alias="lastCheckedAt", default=None)
|
|
36
|
+
|
|
37
|
+
priority: Optional[float] = None
|
|
38
|
+
|
|
39
|
+
verification_status: Optional[Literal["verified", "missing", "pending"]] = FieldInfo(
|
|
40
|
+
alias="verificationStatus", default=None
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class Domain(BaseModel):
|
|
45
|
+
id: str
|
|
46
|
+
|
|
47
|
+
created_at: str = FieldInfo(alias="createdAt")
|
|
48
|
+
|
|
49
|
+
domain: str
|
|
50
|
+
|
|
51
|
+
status: Literal["VERIFIED", "PENDING_VERIFICATION", "NOT_REGISTERED"]
|
|
52
|
+
|
|
53
|
+
updated_at: str = FieldInfo(alias="updatedAt")
|
|
54
|
+
|
|
55
|
+
verified_at: Optional[str] = FieldInfo(alias="verifiedAt", default=None)
|
|
56
|
+
|
|
57
|
+
dns_records: Optional[List[DomainDNSRecord]] = FieldInfo(alias="dnsRecords", default=None)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class VerificationDebug(BaseModel):
|
|
61
|
+
actual_verification_tokens: List[str] = FieldInfo(alias="actualVerificationTokens")
|
|
62
|
+
|
|
63
|
+
domain: str
|
|
64
|
+
|
|
65
|
+
verification_token_match: bool = FieldInfo(alias="verificationTokenMatch")
|
|
66
|
+
|
|
67
|
+
expected_verification_token: Optional[str] = FieldInfo(alias="expectedVerificationToken", default=None)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class VerificationDNSDmarc(BaseModel):
|
|
71
|
+
present: bool
|
|
72
|
+
|
|
73
|
+
source: Literal["subdomain", "parent", "none"]
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class VerificationDNSMailFrom(BaseModel):
|
|
77
|
+
domain: str
|
|
78
|
+
|
|
79
|
+
mx: bool
|
|
80
|
+
|
|
81
|
+
spf: bool
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class VerificationDNSMxRecord(BaseModel):
|
|
85
|
+
exchange: str
|
|
86
|
+
|
|
87
|
+
priority: float
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class VerificationDNSMx(BaseModel):
|
|
91
|
+
expected_priority: float = FieldInfo(alias="expectedPriority")
|
|
92
|
+
|
|
93
|
+
found: bool
|
|
94
|
+
|
|
95
|
+
records: List[VerificationDNSMxRecord]
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
class VerificationDNS(BaseModel):
|
|
99
|
+
dkim: Dict[str, bool]
|
|
100
|
+
|
|
101
|
+
dmarc: VerificationDNSDmarc
|
|
102
|
+
|
|
103
|
+
domain_verification: bool = FieldInfo(alias="domainVerification")
|
|
104
|
+
|
|
105
|
+
mail_from: VerificationDNSMailFrom = FieldInfo(alias="mailFrom")
|
|
106
|
+
|
|
107
|
+
mx: VerificationDNSMx
|
|
108
|
+
|
|
109
|
+
spf: bool
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class VerificationMxConflictConflictingRecord(BaseModel):
|
|
113
|
+
exchange: str
|
|
114
|
+
|
|
115
|
+
priority: float
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class VerificationMxConflict(BaseModel):
|
|
119
|
+
has_conflict: bool = FieldInfo(alias="hasConflict")
|
|
120
|
+
|
|
121
|
+
conflicting_records: Optional[List[VerificationMxConflictConflictingRecord]] = FieldInfo(
|
|
122
|
+
alias="conflictingRecords", default=None
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
message: Optional[str] = None
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class Verification(BaseModel):
|
|
129
|
+
debug: VerificationDebug
|
|
130
|
+
|
|
131
|
+
dkim_status: Literal["Pending", "Success", "Failed", "NotStarted", "TemporaryFailure"] = FieldInfo(
|
|
132
|
+
alias="dkimStatus"
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
dns: VerificationDNS
|
|
136
|
+
|
|
137
|
+
mx_conflict: VerificationMxConflict = FieldInfo(alias="mxConflict")
|
|
138
|
+
|
|
139
|
+
ready: bool
|
|
140
|
+
|
|
141
|
+
verification: Literal["Pending", "Success", "Failed", "NotStarted", "TemporaryFailure"]
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
class DomainVerifyResponse(BaseModel):
|
|
145
|
+
domain: Domain
|
|
146
|
+
|
|
147
|
+
verification: Verification
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import Union
|
|
6
6
|
from typing_extensions import Required, Annotated, TypedDict
|
|
7
7
|
|
|
8
|
+
from .._types import SequenceNotStr
|
|
8
9
|
from .._utils import PropertyInfo
|
|
9
10
|
|
|
10
11
|
__all__ = ["EmailReplyParams"]
|
|
@@ -15,9 +16,9 @@ class EmailReplyParams(TypedDict, total=False):
|
|
|
15
16
|
|
|
16
17
|
html: Required[str]
|
|
17
18
|
|
|
18
|
-
bcc: Union[str,
|
|
19
|
+
bcc: Union[str, SequenceNotStr[str]]
|
|
19
20
|
|
|
20
|
-
cc: Union[str,
|
|
21
|
+
cc: Union[str, SequenceNotStr[str]]
|
|
21
22
|
|
|
22
23
|
from_name: str
|
|
23
24
|
|
|
@@ -29,4 +30,4 @@ class EmailReplyParams(TypedDict, total=False):
|
|
|
29
30
|
|
|
30
31
|
text: str
|
|
31
32
|
|
|
32
|
-
to: Union[str,
|
|
33
|
+
to: Union[str, SequenceNotStr[str]]
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import Union
|
|
6
6
|
from typing_extensions import Required, Annotated, TypedDict
|
|
7
7
|
|
|
8
|
+
from .._types import SequenceNotStr
|
|
8
9
|
from .._utils import PropertyInfo
|
|
9
10
|
|
|
10
11
|
__all__ = ["EmailSendParams"]
|
|
@@ -17,11 +18,11 @@ class EmailSendParams(TypedDict, total=False):
|
|
|
17
18
|
|
|
18
19
|
subject: Required[str]
|
|
19
20
|
|
|
20
|
-
to: Required[Union[str,
|
|
21
|
+
to: Required[Union[str, SequenceNotStr[str]]]
|
|
21
22
|
|
|
22
|
-
bcc: Union[str,
|
|
23
|
+
bcc: Union[str, SequenceNotStr[str]]
|
|
23
24
|
|
|
24
|
-
cc: Union[str,
|
|
25
|
+
cc: Union[str, SequenceNotStr[str]]
|
|
25
26
|
|
|
26
27
|
from_name: str
|
|
27
28
|
|
|
@@ -29,9 +30,9 @@ class EmailSendParams(TypedDict, total=False):
|
|
|
29
30
|
|
|
30
31
|
is_draft: bool
|
|
31
32
|
|
|
32
|
-
references:
|
|
33
|
+
references: SequenceNotStr[str]
|
|
33
34
|
|
|
34
|
-
reply_to: Union[str,
|
|
35
|
+
reply_to: Union[str, SequenceNotStr[str]]
|
|
35
36
|
|
|
36
37
|
text: str
|
|
37
38
|
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import Union
|
|
6
6
|
from typing_extensions import Required, Annotated, TypedDict
|
|
7
7
|
|
|
8
|
+
from .._types import SequenceNotStr
|
|
8
9
|
from .._utils import PropertyInfo
|
|
9
10
|
|
|
10
11
|
__all__ = ["ThreadForwardParams"]
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
class ThreadForwardParams(TypedDict, total=False):
|
|
14
|
-
to: Required[Union[str,
|
|
15
|
+
to: Required[Union[str, SequenceNotStr[str]]]
|
|
15
16
|
|
|
16
|
-
bcc: Union[str,
|
|
17
|
+
bcc: Union[str, SequenceNotStr[str]]
|
|
17
18
|
|
|
18
|
-
cc: Union[str,
|
|
19
|
+
cc: Union[str, SequenceNotStr[str]]
|
|
19
20
|
|
|
20
21
|
from_: Annotated[str, PropertyInfo(alias="from")]
|
|
21
22
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import List
|
|
6
5
|
from typing_extensions import Literal, Annotated, TypedDict
|
|
7
6
|
|
|
7
|
+
from .._types import SequenceNotStr
|
|
8
8
|
from .._utils import PropertyInfo
|
|
9
9
|
|
|
10
10
|
__all__ = ["ThreadSearchParams"]
|
|
@@ -23,7 +23,7 @@ class ThreadSearchParams(TypedDict, total=False):
|
|
|
23
23
|
|
|
24
24
|
has_email_to_address: Annotated[str, PropertyInfo(alias="hasEmailToAddress")]
|
|
25
25
|
|
|
26
|
-
has_participant_emails: Annotated[
|
|
26
|
+
has_participant_emails: Annotated[SequenceNotStr[str], PropertyInfo(alias="hasParticipantEmails")]
|
|
27
27
|
|
|
28
28
|
last_email_after: Annotated[str, PropertyInfo(alias="lastEmailAfter")]
|
|
29
29
|
|