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,149 @@
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
+ is_managed_default: bool = FieldInfo(alias="isManagedDefault")
52
+
53
+ status: Literal["VERIFIED", "PENDING_VERIFICATION", "NOT_REGISTERED"]
54
+
55
+ updated_at: str = FieldInfo(alias="updatedAt")
56
+
57
+ verified_at: Optional[str] = FieldInfo(alias="verifiedAt", default=None)
58
+
59
+ dns_records: Optional[List[DomainDNSRecord]] = FieldInfo(alias="dnsRecords", default=None)
60
+
61
+
62
+ class VerificationDebug(BaseModel):
63
+ actual_verification_tokens: List[str] = FieldInfo(alias="actualVerificationTokens")
64
+
65
+ domain: str
66
+
67
+ verification_token_match: bool = FieldInfo(alias="verificationTokenMatch")
68
+
69
+ expected_verification_token: Optional[str] = FieldInfo(alias="expectedVerificationToken", default=None)
70
+
71
+
72
+ class VerificationDNSDmarc(BaseModel):
73
+ present: bool
74
+
75
+ source: Literal["subdomain", "parent", "none"]
76
+
77
+
78
+ class VerificationDNSMailFrom(BaseModel):
79
+ domain: str
80
+
81
+ mx: bool
82
+
83
+ spf: bool
84
+
85
+
86
+ class VerificationDNSMxRecord(BaseModel):
87
+ exchange: str
88
+
89
+ priority: float
90
+
91
+
92
+ class VerificationDNSMx(BaseModel):
93
+ expected_priority: float = FieldInfo(alias="expectedPriority")
94
+
95
+ found: bool
96
+
97
+ records: List[VerificationDNSMxRecord]
98
+
99
+
100
+ class VerificationDNS(BaseModel):
101
+ dkim: Dict[str, bool]
102
+
103
+ dmarc: VerificationDNSDmarc
104
+
105
+ domain_verification: bool = FieldInfo(alias="domainVerification")
106
+
107
+ mail_from: VerificationDNSMailFrom = FieldInfo(alias="mailFrom")
108
+
109
+ mx: VerificationDNSMx
110
+
111
+ spf: bool
112
+
113
+
114
+ class VerificationMxConflictConflictingRecord(BaseModel):
115
+ exchange: str
116
+
117
+ priority: float
118
+
119
+
120
+ class VerificationMxConflict(BaseModel):
121
+ has_conflict: bool = FieldInfo(alias="hasConflict")
122
+
123
+ conflicting_records: Optional[List[VerificationMxConflictConflictingRecord]] = FieldInfo(
124
+ alias="conflictingRecords", default=None
125
+ )
126
+
127
+ message: Optional[str] = None
128
+
129
+
130
+ class Verification(BaseModel):
131
+ debug: VerificationDebug
132
+
133
+ dkim_status: Literal["Pending", "Success", "Failed", "NotStarted", "TemporaryFailure"] = FieldInfo(
134
+ alias="dkimStatus"
135
+ )
136
+
137
+ dns: VerificationDNS
138
+
139
+ mx_conflict: VerificationMxConflict = FieldInfo(alias="mxConflict")
140
+
141
+ ready: bool
142
+
143
+ verification: Literal["Pending", "Success", "Failed", "NotStarted", "TemporaryFailure"]
144
+
145
+
146
+ class DomainVerifyResponse(BaseModel):
147
+ domain: Domain
148
+
149
+ verification: Verification
@@ -0,0 +1,47 @@
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__ = ["EmailReplyParams", "Attachment"]
12
+
13
+
14
+ class EmailReplyParams(TypedDict, total=False):
15
+ from_: Required[Annotated[str, PropertyInfo(alias="from")]]
16
+
17
+ html: Required[str]
18
+
19
+ attachments: Iterable[Attachment]
20
+
21
+ bcc: Union[str, SequenceNotStr[str]]
22
+
23
+ cc: Union[str, SequenceNotStr[str]]
24
+
25
+ from_name: str
26
+
27
+ is_draft: bool
28
+
29
+ reply_all: bool
30
+
31
+ subject: str
32
+
33
+ text: str
34
+
35
+ to: Union[str, SequenceNotStr[str]]
36
+
37
+
38
+ class Attachment(TypedDict, total=False):
39
+ content: Required[str]
40
+
41
+ file_name: Required[str]
42
+
43
+ cid: str
44
+
45
+ content_type: str
46
+
47
+ 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__ = ["EmailReplyResponse"]
8
+
9
+
10
+ class EmailReplyResponse(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,90 @@
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__ = ["EmailRetrieveResponse", "Attachment"]
11
+
12
+
13
+ class Attachment(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 EmailRetrieveResponse(BaseModel):
34
+ id: str
35
+
36
+ attachments: List[Attachment]
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")
@@ -0,0 +1,53 @@
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__ = ["EmailSendParams", "Attachment"]
12
+
13
+
14
+ class EmailSendParams(TypedDict, total=False):
15
+ from_: Required[Annotated[str, PropertyInfo(alias="from")]]
16
+
17
+ html: Required[str]
18
+
19
+ subject: Required[str]
20
+
21
+ to: Required[Union[str, SequenceNotStr[str]]]
22
+
23
+ attachments: Iterable[Attachment]
24
+
25
+ bcc: Union[str, SequenceNotStr[str]]
26
+
27
+ cc: Union[str, SequenceNotStr[str]]
28
+
29
+ from_name: str
30
+
31
+ in_reply_to: str
32
+
33
+ is_draft: bool
34
+
35
+ references: SequenceNotStr[str]
36
+
37
+ reply_to: Union[str, SequenceNotStr[str]]
38
+
39
+ text: str
40
+
41
+ thread_id: Annotated[str, PropertyInfo(alias="threadId")]
42
+
43
+
44
+ class Attachment(TypedDict, total=False):
45
+ content: Required[str]
46
+
47
+ file_name: Required[str]
48
+
49
+ cid: str
50
+
51
+ content_type: str
52
+
53
+ 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__ = ["EmailSendResponse"]
8
+
9
+
10
+ class EmailSendResponse(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,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