aiinbx 0.7.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.

Files changed (64) hide show
  1. aiinbx/__init__.py +92 -0
  2. aiinbx/_base_client.py +1995 -0
  3. aiinbx/_client.py +422 -0
  4. aiinbx/_compat.py +219 -0
  5. aiinbx/_constants.py +14 -0
  6. aiinbx/_exceptions.py +108 -0
  7. aiinbx/_files.py +123 -0
  8. aiinbx/_models.py +835 -0
  9. aiinbx/_qs.py +150 -0
  10. aiinbx/_resource.py +43 -0
  11. aiinbx/_response.py +830 -0
  12. aiinbx/_streaming.py +331 -0
  13. aiinbx/_types.py +260 -0
  14. aiinbx/_utils/__init__.py +64 -0
  15. aiinbx/_utils/_compat.py +45 -0
  16. aiinbx/_utils/_datetime_parse.py +136 -0
  17. aiinbx/_utils/_logs.py +25 -0
  18. aiinbx/_utils/_proxy.py +65 -0
  19. aiinbx/_utils/_reflection.py +42 -0
  20. aiinbx/_utils/_resources_proxy.py +24 -0
  21. aiinbx/_utils/_streams.py +12 -0
  22. aiinbx/_utils/_sync.py +86 -0
  23. aiinbx/_utils/_transform.py +457 -0
  24. aiinbx/_utils/_typing.py +156 -0
  25. aiinbx/_utils/_utils.py +421 -0
  26. aiinbx/_version.py +4 -0
  27. aiinbx/lib/.keep +4 -0
  28. aiinbx/py.typed +0 -0
  29. aiinbx/resources/__init__.py +64 -0
  30. aiinbx/resources/domains.py +455 -0
  31. aiinbx/resources/emails.py +451 -0
  32. aiinbx/resources/meta.py +147 -0
  33. aiinbx/resources/threads.py +468 -0
  34. aiinbx/resources/webhooks.py +34 -0
  35. aiinbx/types/__init__.py +35 -0
  36. aiinbx/types/domain_create_params.py +11 -0
  37. aiinbx/types/domain_create_response.py +26 -0
  38. aiinbx/types/domain_delete_response.py +11 -0
  39. aiinbx/types/domain_list_response.py +50 -0
  40. aiinbx/types/domain_retrieve_response.py +46 -0
  41. aiinbx/types/domain_verify_response.py +149 -0
  42. aiinbx/types/email_reply_params.py +47 -0
  43. aiinbx/types/email_reply_response.py +15 -0
  44. aiinbx/types/email_retrieve_response.py +90 -0
  45. aiinbx/types/email_send_params.py +53 -0
  46. aiinbx/types/email_send_response.py +15 -0
  47. aiinbx/types/inbound_email_received_webhook_event.py +113 -0
  48. aiinbx/types/meta_webhooks_schema_response.py +298 -0
  49. aiinbx/types/outbound_email_bounced_webhook_event.py +44 -0
  50. aiinbx/types/outbound_email_clicked_webhook_event.py +36 -0
  51. aiinbx/types/outbound_email_complained_webhook_event.py +36 -0
  52. aiinbx/types/outbound_email_delivered_webhook_event.py +36 -0
  53. aiinbx/types/outbound_email_opened_webhook_event.py +32 -0
  54. aiinbx/types/outbound_email_rejected_webhook_event.py +30 -0
  55. aiinbx/types/thread_forward_params.py +43 -0
  56. aiinbx/types/thread_forward_response.py +15 -0
  57. aiinbx/types/thread_retrieve_response.py +100 -0
  58. aiinbx/types/thread_search_params.py +61 -0
  59. aiinbx/types/thread_search_response.py +43 -0
  60. aiinbx/types/unwrap_webhook_event.py +24 -0
  61. aiinbx-0.7.0.dist-info/METADATA +398 -0
  62. aiinbx-0.7.0.dist-info/RECORD +64 -0
  63. aiinbx-0.7.0.dist-info/WHEEL +4 -0
  64. aiinbx-0.7.0.dist-info/licenses/LICENSE +201 -0
@@ -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
@@ -0,0 +1,36 @@
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__ = ["OutboundEmailComplainedWebhookEvent", "Data"]
11
+
12
+
13
+ class Data(BaseModel):
14
+ complained_at: str = FieldInfo(alias="complainedAt")
15
+
16
+ message_id: str = FieldInfo(alias="messageId")
17
+
18
+ recipients: List[str]
19
+
20
+ complaint_feedback_type: Optional[str] = FieldInfo(alias="complaintFeedbackType", default=None)
21
+
22
+ email_id: Optional[str] = FieldInfo(alias="emailId", default=None)
23
+
24
+ feedback_id: Optional[str] = FieldInfo(alias="feedbackId", default=None)
25
+
26
+ user_agent: Optional[str] = FieldInfo(alias="userAgent", default=None)
27
+
28
+
29
+ class OutboundEmailComplainedWebhookEvent(BaseModel):
30
+ attempt: int
31
+
32
+ data: Data
33
+
34
+ event: Literal["outbound.email.complained"]
35
+
36
+ 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 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__ = ["OutboundEmailDeliveredWebhookEvent", "Data"]
11
+
12
+
13
+ class Data(BaseModel):
14
+ delivered_at: str = FieldInfo(alias="deliveredAt")
15
+
16
+ message_id: str = FieldInfo(alias="messageId")
17
+
18
+ recipients: List[str]
19
+
20
+ email_id: Optional[str] = FieldInfo(alias="emailId", default=None)
21
+
22
+ processing_time_ms: Optional[int] = FieldInfo(alias="processingTimeMs", default=None)
23
+
24
+ remote_mta_ip: Optional[str] = FieldInfo(alias="remoteMtaIp", default=None)
25
+
26
+ smtp_response: Optional[str] = FieldInfo(alias="smtpResponse", default=None)
27
+
28
+
29
+ class OutboundEmailDeliveredWebhookEvent(BaseModel):
30
+ attempt: int
31
+
32
+ data: Data
33
+
34
+ event: Literal["outbound.email.delivered"]
35
+
36
+ timestamp: int
@@ -0,0 +1,32 @@
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__ = ["OutboundEmailOpenedWebhookEvent", "Data"]
11
+
12
+
13
+ class Data(BaseModel):
14
+ message_id: str = FieldInfo(alias="messageId")
15
+
16
+ opened_at: str = FieldInfo(alias="openedAt")
17
+
18
+ email_id: Optional[str] = FieldInfo(alias="emailId", default=None)
19
+
20
+ ip_address: Optional[str] = FieldInfo(alias="ipAddress", default=None)
21
+
22
+ user_agent: Optional[str] = FieldInfo(alias="userAgent", default=None)
23
+
24
+
25
+ class OutboundEmailOpenedWebhookEvent(BaseModel):
26
+ attempt: int
27
+
28
+ data: Data
29
+
30
+ event: Literal["outbound.email.opened"]
31
+
32
+ timestamp: int
@@ -0,0 +1,30 @@
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__ = ["OutboundEmailRejectedWebhookEvent", "Data"]
11
+
12
+
13
+ class Data(BaseModel):
14
+ message_id: str = FieldInfo(alias="messageId")
15
+
16
+ rejected_at: str = FieldInfo(alias="rejectedAt")
17
+
18
+ email_id: Optional[str] = FieldInfo(alias="emailId", default=None)
19
+
20
+ reason: Optional[str] = None
21
+
22
+
23
+ class OutboundEmailRejectedWebhookEvent(BaseModel):
24
+ attempt: int
25
+
26
+ data: Data
27
+
28
+ event: Literal["outbound.email.rejected"]
29
+
30
+ timestamp: int
@@ -0,0 +1,43 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union, Iterable
6
+ from typing_extensions import Literal, Required, Annotated, TypedDict
7
+
8
+ from .._types import SequenceNotStr
9
+ from .._utils import PropertyInfo
10
+
11
+ __all__ = ["ThreadForwardParams", "Attachment"]
12
+
13
+
14
+ class ThreadForwardParams(TypedDict, total=False):
15
+ to: Required[Union[str, SequenceNotStr[str]]]
16
+
17
+ attachments: Iterable[Attachment]
18
+
19
+ bcc: Union[str, SequenceNotStr[str]]
20
+
21
+ cc: Union[str, SequenceNotStr[str]]
22
+
23
+ from_: Annotated[str, PropertyInfo(alias="from")]
24
+
25
+ from_name: str
26
+
27
+ include_attachments: Annotated[bool, PropertyInfo(alias="includeAttachments")]
28
+
29
+ is_draft: bool
30
+
31
+ note: str
32
+
33
+
34
+ class Attachment(TypedDict, total=False):
35
+ content: Required[str]
36
+
37
+ file_name: Required[str]
38
+
39
+ cid: str
40
+
41
+ content_type: str
42
+
43
+ disposition: Literal["attachment", "inline"]
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from pydantic import Field as FieldInfo
4
+
5
+ from .._models import BaseModel
6
+
7
+ __all__ = ["ThreadForwardResponse"]
8
+
9
+
10
+ class ThreadForwardResponse(BaseModel):
11
+ email_id: str = FieldInfo(alias="emailId")
12
+
13
+ message_id: str = FieldInfo(alias="messageId")
14
+
15
+ thread_id: str = FieldInfo(alias="threadId")
@@ -0,0 +1,100 @@
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__ = ["ThreadRetrieveResponse", "Email", "EmailAttachment"]
11
+
12
+
13
+ class EmailAttachment(BaseModel):
14
+ id: str
15
+
16
+ cid: Optional[str] = None
17
+
18
+ content_type: str = FieldInfo(alias="contentType")
19
+
20
+ created_at: str = FieldInfo(alias="createdAt")
21
+
22
+ disposition: Optional[str] = None
23
+
24
+ expires_at: str = FieldInfo(alias="expiresAt")
25
+
26
+ file_name: str = FieldInfo(alias="fileName")
27
+
28
+ signed_url: str = FieldInfo(alias="signedUrl")
29
+
30
+ size_in_bytes: float = FieldInfo(alias="sizeInBytes")
31
+
32
+
33
+ class Email(BaseModel):
34
+ id: str
35
+
36
+ attachments: List[EmailAttachment]
37
+
38
+ bcc_addresses: List[str] = FieldInfo(alias="bccAddresses")
39
+
40
+ cc_addresses: List[str] = FieldInfo(alias="ccAddresses")
41
+
42
+ created_at: str = FieldInfo(alias="createdAt")
43
+
44
+ direction: Literal["INBOUND", "OUTBOUND"]
45
+
46
+ from_address: str = FieldInfo(alias="fromAddress")
47
+
48
+ from_name: Optional[str] = FieldInfo(alias="fromName", default=None)
49
+
50
+ html: Optional[str] = None
51
+
52
+ in_reply_to_id: Optional[str] = FieldInfo(alias="inReplyToId", default=None)
53
+
54
+ message_id: str = FieldInfo(alias="messageId")
55
+
56
+ received_at: Optional[str] = FieldInfo(alias="receivedAt", default=None)
57
+
58
+ references: List[str]
59
+
60
+ reply_to_addresses: List[str] = FieldInfo(alias="replyToAddresses")
61
+
62
+ sent_at: Optional[str] = FieldInfo(alias="sentAt", default=None)
63
+
64
+ snippet: Optional[str] = None
65
+
66
+ status: Literal[
67
+ "DRAFT",
68
+ "QUEUED",
69
+ "ACCEPTED",
70
+ "SENT",
71
+ "RECEIVED",
72
+ "FAILED",
73
+ "BOUNCED",
74
+ "COMPLAINED",
75
+ "REJECTED",
76
+ "READ",
77
+ "ARCHIVED",
78
+ ]
79
+
80
+ stripped_html: Optional[str] = FieldInfo(alias="strippedHtml", default=None)
81
+
82
+ stripped_text: Optional[str] = FieldInfo(alias="strippedText", default=None)
83
+
84
+ subject: Optional[str] = None
85
+
86
+ text: Optional[str] = None
87
+
88
+ thread_id: str = FieldInfo(alias="threadId")
89
+
90
+ to_addresses: List[str] = FieldInfo(alias="toAddresses")
91
+
92
+
93
+ class ThreadRetrieveResponse(BaseModel):
94
+ id: str
95
+
96
+ created_at: str = FieldInfo(alias="createdAt")
97
+
98
+ emails: List[Email]
99
+
100
+ subject: Optional[str] = None