aiinbx 0.3.0__py3-none-any.whl → 0.5.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 +29 -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 +31 -0
- aiinbx/resources/domains.py +455 -0
- aiinbx/resources/emails.py +44 -44
- aiinbx/resources/meta.py +147 -0
- aiinbx/resources/threads.py +56 -56
- aiinbx/resources/webhooks.py +34 -0
- aiinbx/types/__init__.py +21 -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/inbound_email_received_webhook_event.py +113 -0
- aiinbx/types/meta_webhooks_schema_response.py +298 -0
- aiinbx/types/outbound_email_bounced_webhook_event.py +44 -0
- aiinbx/types/outbound_email_clicked_webhook_event.py +36 -0
- aiinbx/types/outbound_email_complained_webhook_event.py +36 -0
- aiinbx/types/outbound_email_delivered_webhook_event.py +36 -0
- aiinbx/types/outbound_email_opened_webhook_event.py +32 -0
- aiinbx/types/outbound_email_rejected_webhook_event.py +30 -0
- aiinbx/types/thread_forward_params.py +5 -4
- aiinbx/types/thread_search_params.py +2 -2
- aiinbx/types/unwrap_webhook_event.py +24 -0
- {aiinbx-0.3.0.dist-info → aiinbx-0.5.0.dist-info}/METADATA +1 -1
- aiinbx-0.5.0.dist-info/RECORD +64 -0
- aiinbx-0.3.0.dist-info/RECORD +0 -44
- {aiinbx-0.3.0.dist-info → aiinbx-0.5.0.dist-info}/WHEEL +0 -0
- {aiinbx-0.3.0.dist-info → aiinbx-0.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -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
|
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from pydantic import Field as FieldInfo
|
|
8
|
+
|
|
9
|
+
from .._models import BaseModel
|
|
10
|
+
|
|
11
|
+
__all__ = ["InboundEmailReceivedWebhookEvent", "Data", "DataEmail", "DataEmailAttachment", "DataOrganization"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class DataEmailAttachment(BaseModel):
|
|
15
|
+
id: str
|
|
16
|
+
|
|
17
|
+
content_type: str = FieldInfo(alias="contentType")
|
|
18
|
+
|
|
19
|
+
created_at: datetime = FieldInfo(alias="createdAt")
|
|
20
|
+
|
|
21
|
+
expires_at: datetime = FieldInfo(alias="expiresAt")
|
|
22
|
+
|
|
23
|
+
file_name: str = FieldInfo(alias="fileName")
|
|
24
|
+
|
|
25
|
+
signed_url: str = FieldInfo(alias="signedUrl")
|
|
26
|
+
|
|
27
|
+
size_in_bytes: float = FieldInfo(alias="sizeInBytes")
|
|
28
|
+
|
|
29
|
+
cid: Optional[str] = None
|
|
30
|
+
|
|
31
|
+
disposition: Optional[str] = None
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class DataEmail(BaseModel):
|
|
35
|
+
id: str
|
|
36
|
+
|
|
37
|
+
attachments: List[DataEmailAttachment]
|
|
38
|
+
|
|
39
|
+
bcc_addresses: List[str] = FieldInfo(alias="bccAddresses")
|
|
40
|
+
|
|
41
|
+
cc_addresses: List[str] = FieldInfo(alias="ccAddresses")
|
|
42
|
+
|
|
43
|
+
created_at: datetime = FieldInfo(alias="createdAt")
|
|
44
|
+
|
|
45
|
+
direction: Literal["INBOUND", "OUTBOUND"]
|
|
46
|
+
|
|
47
|
+
from_address: str = FieldInfo(alias="fromAddress")
|
|
48
|
+
|
|
49
|
+
message_id: str = FieldInfo(alias="messageId")
|
|
50
|
+
|
|
51
|
+
references: List[str]
|
|
52
|
+
|
|
53
|
+
reply_to_addresses: List[str] = FieldInfo(alias="replyToAddresses")
|
|
54
|
+
|
|
55
|
+
status: Literal[
|
|
56
|
+
"DRAFT",
|
|
57
|
+
"QUEUED",
|
|
58
|
+
"ACCEPTED",
|
|
59
|
+
"SENT",
|
|
60
|
+
"RECEIVED",
|
|
61
|
+
"FAILED",
|
|
62
|
+
"BOUNCED",
|
|
63
|
+
"COMPLAINED",
|
|
64
|
+
"REJECTED",
|
|
65
|
+
"READ",
|
|
66
|
+
"ARCHIVED",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
thread_id: str = FieldInfo(alias="threadId")
|
|
70
|
+
|
|
71
|
+
to_addresses: List[str] = FieldInfo(alias="toAddresses")
|
|
72
|
+
|
|
73
|
+
from_name: Optional[str] = FieldInfo(alias="fromName", default=None)
|
|
74
|
+
|
|
75
|
+
html: Optional[str] = None
|
|
76
|
+
|
|
77
|
+
in_reply_to_id: Optional[str] = FieldInfo(alias="inReplyToId", default=None)
|
|
78
|
+
|
|
79
|
+
received_at: Optional[datetime] = FieldInfo(alias="receivedAt", default=None)
|
|
80
|
+
|
|
81
|
+
sent_at: Optional[datetime] = FieldInfo(alias="sentAt", default=None)
|
|
82
|
+
|
|
83
|
+
snippet: Optional[str] = None
|
|
84
|
+
|
|
85
|
+
stripped_html: Optional[str] = FieldInfo(alias="strippedHtml", default=None)
|
|
86
|
+
|
|
87
|
+
stripped_text: Optional[str] = FieldInfo(alias="strippedText", default=None)
|
|
88
|
+
|
|
89
|
+
subject: Optional[str] = None
|
|
90
|
+
|
|
91
|
+
text: Optional[str] = None
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class DataOrganization(BaseModel):
|
|
95
|
+
id: str
|
|
96
|
+
|
|
97
|
+
slug: str
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class Data(BaseModel):
|
|
101
|
+
email: DataEmail
|
|
102
|
+
|
|
103
|
+
organization: DataOrganization
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
class InboundEmailReceivedWebhookEvent(BaseModel):
|
|
107
|
+
attempt: int
|
|
108
|
+
|
|
109
|
+
data: Data
|
|
110
|
+
|
|
111
|
+
event: Literal["inbound.email.received"]
|
|
112
|
+
|
|
113
|
+
timestamp: int
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Union, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal, TypeAlias
|
|
6
|
+
|
|
7
|
+
from pydantic import Field as FieldInfo
|
|
8
|
+
|
|
9
|
+
from .._models import BaseModel
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"MetaWebhooksSchemaResponse",
|
|
13
|
+
"InboundEmailReceivedEvent",
|
|
14
|
+
"InboundEmailReceivedEventData",
|
|
15
|
+
"InboundEmailReceivedEventDataEmail",
|
|
16
|
+
"InboundEmailReceivedEventDataEmailAttachment",
|
|
17
|
+
"InboundEmailReceivedEventDataOrganization",
|
|
18
|
+
"OutboundDeliveredEvent",
|
|
19
|
+
"OutboundDeliveredEventData",
|
|
20
|
+
"OutboundBouncedEvent",
|
|
21
|
+
"OutboundBouncedEventData",
|
|
22
|
+
"OutboundBouncedEventDataRecipient",
|
|
23
|
+
"OutboundComplainedEvent",
|
|
24
|
+
"OutboundComplainedEventData",
|
|
25
|
+
"OutboundRejectedEvent",
|
|
26
|
+
"OutboundRejectedEventData",
|
|
27
|
+
"OutboundOpenedEvent",
|
|
28
|
+
"OutboundOpenedEventData",
|
|
29
|
+
"OutboundClickedEvent",
|
|
30
|
+
"OutboundClickedEventData",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class InboundEmailReceivedEventDataEmailAttachment(BaseModel):
|
|
35
|
+
id: str
|
|
36
|
+
|
|
37
|
+
content_type: str = FieldInfo(alias="contentType")
|
|
38
|
+
|
|
39
|
+
created_at: datetime = FieldInfo(alias="createdAt")
|
|
40
|
+
|
|
41
|
+
expires_at: datetime = FieldInfo(alias="expiresAt")
|
|
42
|
+
|
|
43
|
+
file_name: str = FieldInfo(alias="fileName")
|
|
44
|
+
|
|
45
|
+
signed_url: str = FieldInfo(alias="signedUrl")
|
|
46
|
+
|
|
47
|
+
size_in_bytes: float = FieldInfo(alias="sizeInBytes")
|
|
48
|
+
|
|
49
|
+
cid: Optional[str] = None
|
|
50
|
+
|
|
51
|
+
disposition: Optional[str] = None
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class InboundEmailReceivedEventDataEmail(BaseModel):
|
|
55
|
+
id: str
|
|
56
|
+
|
|
57
|
+
attachments: List[InboundEmailReceivedEventDataEmailAttachment]
|
|
58
|
+
|
|
59
|
+
bcc_addresses: List[str] = FieldInfo(alias="bccAddresses")
|
|
60
|
+
|
|
61
|
+
cc_addresses: List[str] = FieldInfo(alias="ccAddresses")
|
|
62
|
+
|
|
63
|
+
created_at: datetime = FieldInfo(alias="createdAt")
|
|
64
|
+
|
|
65
|
+
direction: Literal["INBOUND", "OUTBOUND"]
|
|
66
|
+
|
|
67
|
+
from_address: str = FieldInfo(alias="fromAddress")
|
|
68
|
+
|
|
69
|
+
message_id: str = FieldInfo(alias="messageId")
|
|
70
|
+
|
|
71
|
+
references: List[str]
|
|
72
|
+
|
|
73
|
+
reply_to_addresses: List[str] = FieldInfo(alias="replyToAddresses")
|
|
74
|
+
|
|
75
|
+
status: Literal[
|
|
76
|
+
"DRAFT",
|
|
77
|
+
"QUEUED",
|
|
78
|
+
"ACCEPTED",
|
|
79
|
+
"SENT",
|
|
80
|
+
"RECEIVED",
|
|
81
|
+
"FAILED",
|
|
82
|
+
"BOUNCED",
|
|
83
|
+
"COMPLAINED",
|
|
84
|
+
"REJECTED",
|
|
85
|
+
"READ",
|
|
86
|
+
"ARCHIVED",
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
thread_id: str = FieldInfo(alias="threadId")
|
|
90
|
+
|
|
91
|
+
to_addresses: List[str] = FieldInfo(alias="toAddresses")
|
|
92
|
+
|
|
93
|
+
from_name: Optional[str] = FieldInfo(alias="fromName", default=None)
|
|
94
|
+
|
|
95
|
+
html: Optional[str] = None
|
|
96
|
+
|
|
97
|
+
in_reply_to_id: Optional[str] = FieldInfo(alias="inReplyToId", default=None)
|
|
98
|
+
|
|
99
|
+
received_at: Optional[datetime] = FieldInfo(alias="receivedAt", default=None)
|
|
100
|
+
|
|
101
|
+
sent_at: Optional[datetime] = FieldInfo(alias="sentAt", default=None)
|
|
102
|
+
|
|
103
|
+
snippet: Optional[str] = None
|
|
104
|
+
|
|
105
|
+
stripped_html: Optional[str] = FieldInfo(alias="strippedHtml", default=None)
|
|
106
|
+
|
|
107
|
+
stripped_text: Optional[str] = FieldInfo(alias="strippedText", default=None)
|
|
108
|
+
|
|
109
|
+
subject: Optional[str] = None
|
|
110
|
+
|
|
111
|
+
text: Optional[str] = None
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
class InboundEmailReceivedEventDataOrganization(BaseModel):
|
|
115
|
+
id: str
|
|
116
|
+
|
|
117
|
+
slug: str
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
class InboundEmailReceivedEventData(BaseModel):
|
|
121
|
+
email: InboundEmailReceivedEventDataEmail
|
|
122
|
+
|
|
123
|
+
organization: InboundEmailReceivedEventDataOrganization
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
class InboundEmailReceivedEvent(BaseModel):
|
|
127
|
+
attempt: int
|
|
128
|
+
|
|
129
|
+
data: InboundEmailReceivedEventData
|
|
130
|
+
|
|
131
|
+
event: Literal["inbound.email.received"]
|
|
132
|
+
|
|
133
|
+
timestamp: int
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class OutboundDeliveredEventData(BaseModel):
|
|
137
|
+
delivered_at: str = FieldInfo(alias="deliveredAt")
|
|
138
|
+
|
|
139
|
+
message_id: str = FieldInfo(alias="messageId")
|
|
140
|
+
|
|
141
|
+
recipients: List[str]
|
|
142
|
+
|
|
143
|
+
email_id: Optional[str] = FieldInfo(alias="emailId", default=None)
|
|
144
|
+
|
|
145
|
+
processing_time_ms: Optional[int] = FieldInfo(alias="processingTimeMs", default=None)
|
|
146
|
+
|
|
147
|
+
remote_mta_ip: Optional[str] = FieldInfo(alias="remoteMtaIp", default=None)
|
|
148
|
+
|
|
149
|
+
smtp_response: Optional[str] = FieldInfo(alias="smtpResponse", default=None)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
class OutboundDeliveredEvent(BaseModel):
|
|
153
|
+
attempt: int
|
|
154
|
+
|
|
155
|
+
data: OutboundDeliveredEventData
|
|
156
|
+
|
|
157
|
+
event: Literal["outbound.email.delivered"]
|
|
158
|
+
|
|
159
|
+
timestamp: int
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
class OutboundBouncedEventDataRecipient(BaseModel):
|
|
163
|
+
email_address: str = FieldInfo(alias="emailAddress")
|
|
164
|
+
|
|
165
|
+
action: Optional[str] = None
|
|
166
|
+
|
|
167
|
+
diagnostic_code: Optional[str] = FieldInfo(alias="diagnosticCode", default=None)
|
|
168
|
+
|
|
169
|
+
status: Optional[str] = None
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
class OutboundBouncedEventData(BaseModel):
|
|
173
|
+
bounced_at: str = FieldInfo(alias="bouncedAt")
|
|
174
|
+
|
|
175
|
+
bounce_type: Literal["Permanent", "Transient", "Undetermined"] = FieldInfo(alias="bounceType")
|
|
176
|
+
|
|
177
|
+
message_id: str = FieldInfo(alias="messageId")
|
|
178
|
+
|
|
179
|
+
recipients: List[OutboundBouncedEventDataRecipient]
|
|
180
|
+
|
|
181
|
+
bounce_sub_type: Optional[str] = FieldInfo(alias="bounceSubType", default=None)
|
|
182
|
+
|
|
183
|
+
email_id: Optional[str] = FieldInfo(alias="emailId", default=None)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
class OutboundBouncedEvent(BaseModel):
|
|
187
|
+
attempt: int
|
|
188
|
+
|
|
189
|
+
data: OutboundBouncedEventData
|
|
190
|
+
|
|
191
|
+
event: Literal["outbound.email.bounced"]
|
|
192
|
+
|
|
193
|
+
timestamp: int
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
class OutboundComplainedEventData(BaseModel):
|
|
197
|
+
complained_at: str = FieldInfo(alias="complainedAt")
|
|
198
|
+
|
|
199
|
+
message_id: str = FieldInfo(alias="messageId")
|
|
200
|
+
|
|
201
|
+
recipients: List[str]
|
|
202
|
+
|
|
203
|
+
complaint_feedback_type: Optional[str] = FieldInfo(alias="complaintFeedbackType", default=None)
|
|
204
|
+
|
|
205
|
+
email_id: Optional[str] = FieldInfo(alias="emailId", default=None)
|
|
206
|
+
|
|
207
|
+
feedback_id: Optional[str] = FieldInfo(alias="feedbackId", default=None)
|
|
208
|
+
|
|
209
|
+
user_agent: Optional[str] = FieldInfo(alias="userAgent", default=None)
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
class OutboundComplainedEvent(BaseModel):
|
|
213
|
+
attempt: int
|
|
214
|
+
|
|
215
|
+
data: OutboundComplainedEventData
|
|
216
|
+
|
|
217
|
+
event: Literal["outbound.email.complained"]
|
|
218
|
+
|
|
219
|
+
timestamp: int
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
class OutboundRejectedEventData(BaseModel):
|
|
223
|
+
message_id: str = FieldInfo(alias="messageId")
|
|
224
|
+
|
|
225
|
+
rejected_at: str = FieldInfo(alias="rejectedAt")
|
|
226
|
+
|
|
227
|
+
email_id: Optional[str] = FieldInfo(alias="emailId", default=None)
|
|
228
|
+
|
|
229
|
+
reason: Optional[str] = None
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
class OutboundRejectedEvent(BaseModel):
|
|
233
|
+
attempt: int
|
|
234
|
+
|
|
235
|
+
data: OutboundRejectedEventData
|
|
236
|
+
|
|
237
|
+
event: Literal["outbound.email.rejected"]
|
|
238
|
+
|
|
239
|
+
timestamp: int
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
class OutboundOpenedEventData(BaseModel):
|
|
243
|
+
message_id: str = FieldInfo(alias="messageId")
|
|
244
|
+
|
|
245
|
+
opened_at: str = FieldInfo(alias="openedAt")
|
|
246
|
+
|
|
247
|
+
email_id: Optional[str] = FieldInfo(alias="emailId", default=None)
|
|
248
|
+
|
|
249
|
+
ip_address: Optional[str] = FieldInfo(alias="ipAddress", default=None)
|
|
250
|
+
|
|
251
|
+
user_agent: Optional[str] = FieldInfo(alias="userAgent", default=None)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
class OutboundOpenedEvent(BaseModel):
|
|
255
|
+
attempt: int
|
|
256
|
+
|
|
257
|
+
data: OutboundOpenedEventData
|
|
258
|
+
|
|
259
|
+
event: Literal["outbound.email.opened"]
|
|
260
|
+
|
|
261
|
+
timestamp: int
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
class OutboundClickedEventData(BaseModel):
|
|
265
|
+
clicked_at: str = FieldInfo(alias="clickedAt")
|
|
266
|
+
|
|
267
|
+
link: str
|
|
268
|
+
|
|
269
|
+
message_id: str = FieldInfo(alias="messageId")
|
|
270
|
+
|
|
271
|
+
email_id: Optional[str] = FieldInfo(alias="emailId", default=None)
|
|
272
|
+
|
|
273
|
+
ip_address: Optional[str] = FieldInfo(alias="ipAddress", default=None)
|
|
274
|
+
|
|
275
|
+
link_domain: Optional[str] = FieldInfo(alias="linkDomain", default=None)
|
|
276
|
+
|
|
277
|
+
user_agent: Optional[str] = FieldInfo(alias="userAgent", default=None)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
class OutboundClickedEvent(BaseModel):
|
|
281
|
+
attempt: int
|
|
282
|
+
|
|
283
|
+
data: OutboundClickedEventData
|
|
284
|
+
|
|
285
|
+
event: Literal["outbound.email.clicked"]
|
|
286
|
+
|
|
287
|
+
timestamp: int
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
MetaWebhooksSchemaResponse: TypeAlias = Union[
|
|
291
|
+
InboundEmailReceivedEvent,
|
|
292
|
+
OutboundDeliveredEvent,
|
|
293
|
+
OutboundBouncedEvent,
|
|
294
|
+
OutboundComplainedEvent,
|
|
295
|
+
OutboundRejectedEvent,
|
|
296
|
+
OutboundOpenedEvent,
|
|
297
|
+
OutboundClickedEvent,
|
|
298
|
+
]
|
|
@@ -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__ = ["OutboundEmailBouncedWebhookEvent", "Data", "DataRecipient"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class DataRecipient(BaseModel):
|
|
14
|
+
email_address: str = FieldInfo(alias="emailAddress")
|
|
15
|
+
|
|
16
|
+
action: Optional[str] = None
|
|
17
|
+
|
|
18
|
+
diagnostic_code: Optional[str] = FieldInfo(alias="diagnosticCode", default=None)
|
|
19
|
+
|
|
20
|
+
status: Optional[str] = None
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Data(BaseModel):
|
|
24
|
+
bounced_at: str = FieldInfo(alias="bouncedAt")
|
|
25
|
+
|
|
26
|
+
bounce_type: Literal["Permanent", "Transient", "Undetermined"] = FieldInfo(alias="bounceType")
|
|
27
|
+
|
|
28
|
+
message_id: str = FieldInfo(alias="messageId")
|
|
29
|
+
|
|
30
|
+
recipients: List[DataRecipient]
|
|
31
|
+
|
|
32
|
+
bounce_sub_type: Optional[str] = FieldInfo(alias="bounceSubType", default=None)
|
|
33
|
+
|
|
34
|
+
email_id: Optional[str] = FieldInfo(alias="emailId", default=None)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class OutboundEmailBouncedWebhookEvent(BaseModel):
|
|
38
|
+
attempt: int
|
|
39
|
+
|
|
40
|
+
data: Data
|
|
41
|
+
|
|
42
|
+
event: Literal["outbound.email.bounced"]
|
|
43
|
+
|
|
44
|
+
timestamp: int
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["OutboundEmailClickedWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(BaseModel):
|
|
14
|
+
clicked_at: str = FieldInfo(alias="clickedAt")
|
|
15
|
+
|
|
16
|
+
link: str
|
|
17
|
+
|
|
18
|
+
message_id: str = FieldInfo(alias="messageId")
|
|
19
|
+
|
|
20
|
+
email_id: Optional[str] = FieldInfo(alias="emailId", default=None)
|
|
21
|
+
|
|
22
|
+
ip_address: Optional[str] = FieldInfo(alias="ipAddress", default=None)
|
|
23
|
+
|
|
24
|
+
link_domain: Optional[str] = FieldInfo(alias="linkDomain", default=None)
|
|
25
|
+
|
|
26
|
+
user_agent: Optional[str] = FieldInfo(alias="userAgent", default=None)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class OutboundEmailClickedWebhookEvent(BaseModel):
|
|
30
|
+
attempt: int
|
|
31
|
+
|
|
32
|
+
data: Data
|
|
33
|
+
|
|
34
|
+
event: Literal["outbound.email.clicked"]
|
|
35
|
+
|
|
36
|
+
timestamp: int
|