aiinbx 0.4.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/_client.py +13 -1
- aiinbx/_version.py +1 -1
- aiinbx/resources/__init__.py +17 -0
- aiinbx/resources/meta.py +147 -0
- aiinbx/resources/webhooks.py +34 -0
- aiinbx/types/__init__.py +15 -0
- 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/unwrap_webhook_event.py +24 -0
- {aiinbx-0.4.0.dist-info → aiinbx-0.5.0.dist-info}/METADATA +1 -1
- {aiinbx-0.4.0.dist-info → aiinbx-0.5.0.dist-info}/RECORD +19 -8
- {aiinbx-0.4.0.dist-info → aiinbx-0.5.0.dist-info}/WHEEL +0 -0
- {aiinbx-0.4.0.dist-info → aiinbx-0.5.0.dist-info}/licenses/LICENSE +0 -0
aiinbx/_client.py
CHANGED
|
@@ -21,7 +21,7 @@ from ._types import (
|
|
|
21
21
|
)
|
|
22
22
|
from ._utils import is_given, get_async_library
|
|
23
23
|
from ._version import __version__
|
|
24
|
-
from .resources import emails, domains, threads
|
|
24
|
+
from .resources import meta, emails, domains, threads, webhooks
|
|
25
25
|
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
|
|
26
26
|
from ._exceptions import AIInbxError, APIStatusError
|
|
27
27
|
from ._base_client import (
|
|
@@ -37,6 +37,8 @@ class AIInbx(SyncAPIClient):
|
|
|
37
37
|
threads: threads.ThreadsResource
|
|
38
38
|
emails: emails.EmailsResource
|
|
39
39
|
domains: domains.DomainsResource
|
|
40
|
+
webhooks: webhooks.WebhooksResource
|
|
41
|
+
meta: meta.MetaResource
|
|
40
42
|
with_raw_response: AIInbxWithRawResponse
|
|
41
43
|
with_streaming_response: AIInbxWithStreamedResponse
|
|
42
44
|
|
|
@@ -97,6 +99,8 @@ class AIInbx(SyncAPIClient):
|
|
|
97
99
|
self.threads = threads.ThreadsResource(self)
|
|
98
100
|
self.emails = emails.EmailsResource(self)
|
|
99
101
|
self.domains = domains.DomainsResource(self)
|
|
102
|
+
self.webhooks = webhooks.WebhooksResource(self)
|
|
103
|
+
self.meta = meta.MetaResource(self)
|
|
100
104
|
self.with_raw_response = AIInbxWithRawResponse(self)
|
|
101
105
|
self.with_streaming_response = AIInbxWithStreamedResponse(self)
|
|
102
106
|
|
|
@@ -209,6 +213,8 @@ class AsyncAIInbx(AsyncAPIClient):
|
|
|
209
213
|
threads: threads.AsyncThreadsResource
|
|
210
214
|
emails: emails.AsyncEmailsResource
|
|
211
215
|
domains: domains.AsyncDomainsResource
|
|
216
|
+
webhooks: webhooks.AsyncWebhooksResource
|
|
217
|
+
meta: meta.AsyncMetaResource
|
|
212
218
|
with_raw_response: AsyncAIInbxWithRawResponse
|
|
213
219
|
with_streaming_response: AsyncAIInbxWithStreamedResponse
|
|
214
220
|
|
|
@@ -269,6 +275,8 @@ class AsyncAIInbx(AsyncAPIClient):
|
|
|
269
275
|
self.threads = threads.AsyncThreadsResource(self)
|
|
270
276
|
self.emails = emails.AsyncEmailsResource(self)
|
|
271
277
|
self.domains = domains.AsyncDomainsResource(self)
|
|
278
|
+
self.webhooks = webhooks.AsyncWebhooksResource(self)
|
|
279
|
+
self.meta = meta.AsyncMetaResource(self)
|
|
272
280
|
self.with_raw_response = AsyncAIInbxWithRawResponse(self)
|
|
273
281
|
self.with_streaming_response = AsyncAIInbxWithStreamedResponse(self)
|
|
274
282
|
|
|
@@ -382,6 +390,7 @@ class AIInbxWithRawResponse:
|
|
|
382
390
|
self.threads = threads.ThreadsResourceWithRawResponse(client.threads)
|
|
383
391
|
self.emails = emails.EmailsResourceWithRawResponse(client.emails)
|
|
384
392
|
self.domains = domains.DomainsResourceWithRawResponse(client.domains)
|
|
393
|
+
self.meta = meta.MetaResourceWithRawResponse(client.meta)
|
|
385
394
|
|
|
386
395
|
|
|
387
396
|
class AsyncAIInbxWithRawResponse:
|
|
@@ -389,6 +398,7 @@ class AsyncAIInbxWithRawResponse:
|
|
|
389
398
|
self.threads = threads.AsyncThreadsResourceWithRawResponse(client.threads)
|
|
390
399
|
self.emails = emails.AsyncEmailsResourceWithRawResponse(client.emails)
|
|
391
400
|
self.domains = domains.AsyncDomainsResourceWithRawResponse(client.domains)
|
|
401
|
+
self.meta = meta.AsyncMetaResourceWithRawResponse(client.meta)
|
|
392
402
|
|
|
393
403
|
|
|
394
404
|
class AIInbxWithStreamedResponse:
|
|
@@ -396,6 +406,7 @@ class AIInbxWithStreamedResponse:
|
|
|
396
406
|
self.threads = threads.ThreadsResourceWithStreamingResponse(client.threads)
|
|
397
407
|
self.emails = emails.EmailsResourceWithStreamingResponse(client.emails)
|
|
398
408
|
self.domains = domains.DomainsResourceWithStreamingResponse(client.domains)
|
|
409
|
+
self.meta = meta.MetaResourceWithStreamingResponse(client.meta)
|
|
399
410
|
|
|
400
411
|
|
|
401
412
|
class AsyncAIInbxWithStreamedResponse:
|
|
@@ -403,6 +414,7 @@ class AsyncAIInbxWithStreamedResponse:
|
|
|
403
414
|
self.threads = threads.AsyncThreadsResourceWithStreamingResponse(client.threads)
|
|
404
415
|
self.emails = emails.AsyncEmailsResourceWithStreamingResponse(client.emails)
|
|
405
416
|
self.domains = domains.AsyncDomainsResourceWithStreamingResponse(client.domains)
|
|
417
|
+
self.meta = meta.AsyncMetaResourceWithStreamingResponse(client.meta)
|
|
406
418
|
|
|
407
419
|
|
|
408
420
|
Client = AIInbx
|
aiinbx/_version.py
CHANGED
aiinbx/resources/__init__.py
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
from .meta import (
|
|
4
|
+
MetaResource,
|
|
5
|
+
AsyncMetaResource,
|
|
6
|
+
MetaResourceWithRawResponse,
|
|
7
|
+
AsyncMetaResourceWithRawResponse,
|
|
8
|
+
MetaResourceWithStreamingResponse,
|
|
9
|
+
AsyncMetaResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
3
11
|
from .emails import (
|
|
4
12
|
EmailsResource,
|
|
5
13
|
AsyncEmailsResource,
|
|
@@ -24,6 +32,7 @@ from .threads import (
|
|
|
24
32
|
ThreadsResourceWithStreamingResponse,
|
|
25
33
|
AsyncThreadsResourceWithStreamingResponse,
|
|
26
34
|
)
|
|
35
|
+
from .webhooks import WebhooksResource, AsyncWebhooksResource
|
|
27
36
|
|
|
28
37
|
__all__ = [
|
|
29
38
|
"ThreadsResource",
|
|
@@ -44,4 +53,12 @@ __all__ = [
|
|
|
44
53
|
"AsyncDomainsResourceWithRawResponse",
|
|
45
54
|
"DomainsResourceWithStreamingResponse",
|
|
46
55
|
"AsyncDomainsResourceWithStreamingResponse",
|
|
56
|
+
"WebhooksResource",
|
|
57
|
+
"AsyncWebhooksResource",
|
|
58
|
+
"MetaResource",
|
|
59
|
+
"AsyncMetaResource",
|
|
60
|
+
"MetaResourceWithRawResponse",
|
|
61
|
+
"AsyncMetaResourceWithRawResponse",
|
|
62
|
+
"MetaResourceWithStreamingResponse",
|
|
63
|
+
"AsyncMetaResourceWithStreamingResponse",
|
|
47
64
|
]
|
aiinbx/resources/meta.py
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
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 Any, cast
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from .._types import Body, Query, Headers, NotGiven, not_given
|
|
10
|
+
from .._compat import cached_property
|
|
11
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
12
|
+
from .._response import (
|
|
13
|
+
to_raw_response_wrapper,
|
|
14
|
+
to_streamed_response_wrapper,
|
|
15
|
+
async_to_raw_response_wrapper,
|
|
16
|
+
async_to_streamed_response_wrapper,
|
|
17
|
+
)
|
|
18
|
+
from .._base_client import make_request_options
|
|
19
|
+
from ..types.meta_webhooks_schema_response import MetaWebhooksSchemaResponse
|
|
20
|
+
|
|
21
|
+
__all__ = ["MetaResource", "AsyncMetaResource"]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class MetaResource(SyncAPIResource):
|
|
25
|
+
@cached_property
|
|
26
|
+
def with_raw_response(self) -> MetaResourceWithRawResponse:
|
|
27
|
+
"""
|
|
28
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
29
|
+
the raw response object instead of the parsed content.
|
|
30
|
+
|
|
31
|
+
For more information, see https://www.github.com/aiinbx/aiinbx-py#accessing-raw-response-data-eg-headers
|
|
32
|
+
"""
|
|
33
|
+
return MetaResourceWithRawResponse(self)
|
|
34
|
+
|
|
35
|
+
@cached_property
|
|
36
|
+
def with_streaming_response(self) -> MetaResourceWithStreamingResponse:
|
|
37
|
+
"""
|
|
38
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
39
|
+
|
|
40
|
+
For more information, see https://www.github.com/aiinbx/aiinbx-py#with_streaming_response
|
|
41
|
+
"""
|
|
42
|
+
return MetaResourceWithStreamingResponse(self)
|
|
43
|
+
|
|
44
|
+
def webhooks_schema(
|
|
45
|
+
self,
|
|
46
|
+
*,
|
|
47
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
48
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
49
|
+
extra_headers: Headers | None = None,
|
|
50
|
+
extra_query: Query | None = None,
|
|
51
|
+
extra_body: Body | None = None,
|
|
52
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
53
|
+
) -> MetaWebhooksSchemaResponse:
|
|
54
|
+
"""Internal endpoint to expose webhook event schemas to SDK generators."""
|
|
55
|
+
return cast(
|
|
56
|
+
MetaWebhooksSchemaResponse,
|
|
57
|
+
self._get(
|
|
58
|
+
"/_meta/webhooks",
|
|
59
|
+
options=make_request_options(
|
|
60
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
61
|
+
),
|
|
62
|
+
cast_to=cast(
|
|
63
|
+
Any, MetaWebhooksSchemaResponse
|
|
64
|
+
), # Union types cannot be passed in as arguments in the type system
|
|
65
|
+
),
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class AsyncMetaResource(AsyncAPIResource):
|
|
70
|
+
@cached_property
|
|
71
|
+
def with_raw_response(self) -> AsyncMetaResourceWithRawResponse:
|
|
72
|
+
"""
|
|
73
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
74
|
+
the raw response object instead of the parsed content.
|
|
75
|
+
|
|
76
|
+
For more information, see https://www.github.com/aiinbx/aiinbx-py#accessing-raw-response-data-eg-headers
|
|
77
|
+
"""
|
|
78
|
+
return AsyncMetaResourceWithRawResponse(self)
|
|
79
|
+
|
|
80
|
+
@cached_property
|
|
81
|
+
def with_streaming_response(self) -> AsyncMetaResourceWithStreamingResponse:
|
|
82
|
+
"""
|
|
83
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
84
|
+
|
|
85
|
+
For more information, see https://www.github.com/aiinbx/aiinbx-py#with_streaming_response
|
|
86
|
+
"""
|
|
87
|
+
return AsyncMetaResourceWithStreamingResponse(self)
|
|
88
|
+
|
|
89
|
+
async def webhooks_schema(
|
|
90
|
+
self,
|
|
91
|
+
*,
|
|
92
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
93
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
94
|
+
extra_headers: Headers | None = None,
|
|
95
|
+
extra_query: Query | None = None,
|
|
96
|
+
extra_body: Body | None = None,
|
|
97
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
98
|
+
) -> MetaWebhooksSchemaResponse:
|
|
99
|
+
"""Internal endpoint to expose webhook event schemas to SDK generators."""
|
|
100
|
+
return cast(
|
|
101
|
+
MetaWebhooksSchemaResponse,
|
|
102
|
+
await self._get(
|
|
103
|
+
"/_meta/webhooks",
|
|
104
|
+
options=make_request_options(
|
|
105
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
106
|
+
),
|
|
107
|
+
cast_to=cast(
|
|
108
|
+
Any, MetaWebhooksSchemaResponse
|
|
109
|
+
), # Union types cannot be passed in as arguments in the type system
|
|
110
|
+
),
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
class MetaResourceWithRawResponse:
|
|
115
|
+
def __init__(self, meta: MetaResource) -> None:
|
|
116
|
+
self._meta = meta
|
|
117
|
+
|
|
118
|
+
self.webhooks_schema = to_raw_response_wrapper(
|
|
119
|
+
meta.webhooks_schema,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
class AsyncMetaResourceWithRawResponse:
|
|
124
|
+
def __init__(self, meta: AsyncMetaResource) -> None:
|
|
125
|
+
self._meta = meta
|
|
126
|
+
|
|
127
|
+
self.webhooks_schema = async_to_raw_response_wrapper(
|
|
128
|
+
meta.webhooks_schema,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
class MetaResourceWithStreamingResponse:
|
|
133
|
+
def __init__(self, meta: MetaResource) -> None:
|
|
134
|
+
self._meta = meta
|
|
135
|
+
|
|
136
|
+
self.webhooks_schema = to_streamed_response_wrapper(
|
|
137
|
+
meta.webhooks_schema,
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
class AsyncMetaResourceWithStreamingResponse:
|
|
142
|
+
def __init__(self, meta: AsyncMetaResource) -> None:
|
|
143
|
+
self._meta = meta
|
|
144
|
+
|
|
145
|
+
self.webhooks_schema = async_to_streamed_response_wrapper(
|
|
146
|
+
meta.webhooks_schema,
|
|
147
|
+
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from typing import cast
|
|
7
|
+
|
|
8
|
+
from .._models import construct_type
|
|
9
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
10
|
+
from ..types.unwrap_webhook_event import UnwrapWebhookEvent
|
|
11
|
+
|
|
12
|
+
__all__ = ["WebhooksResource", "AsyncWebhooksResource"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class WebhooksResource(SyncAPIResource):
|
|
16
|
+
def unwrap(self, payload: str) -> UnwrapWebhookEvent:
|
|
17
|
+
return cast(
|
|
18
|
+
UnwrapWebhookEvent,
|
|
19
|
+
construct_type(
|
|
20
|
+
type_=UnwrapWebhookEvent,
|
|
21
|
+
value=json.loads(payload),
|
|
22
|
+
),
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class AsyncWebhooksResource(AsyncAPIResource):
|
|
27
|
+
def unwrap(self, payload: str) -> UnwrapWebhookEvent:
|
|
28
|
+
return cast(
|
|
29
|
+
UnwrapWebhookEvent,
|
|
30
|
+
construct_type(
|
|
31
|
+
type_=UnwrapWebhookEvent,
|
|
32
|
+
value=json.loads(payload),
|
|
33
|
+
),
|
|
34
|
+
)
|
aiinbx/types/__init__.py
CHANGED
|
@@ -9,6 +9,7 @@ from .domain_create_params import DomainCreateParams as DomainCreateParams
|
|
|
9
9
|
from .domain_list_response import DomainListResponse as DomainListResponse
|
|
10
10
|
from .email_reply_response import EmailReplyResponse as EmailReplyResponse
|
|
11
11
|
from .thread_search_params import ThreadSearchParams as ThreadSearchParams
|
|
12
|
+
from .unwrap_webhook_event import UnwrapWebhookEvent as UnwrapWebhookEvent
|
|
12
13
|
from .thread_forward_params import ThreadForwardParams as ThreadForwardParams
|
|
13
14
|
from .domain_create_response import DomainCreateResponse as DomainCreateResponse
|
|
14
15
|
from .domain_delete_response import DomainDeleteResponse as DomainDeleteResponse
|
|
@@ -18,3 +19,17 @@ from .email_retrieve_response import EmailRetrieveResponse as EmailRetrieveRespo
|
|
|
18
19
|
from .thread_forward_response import ThreadForwardResponse as ThreadForwardResponse
|
|
19
20
|
from .domain_retrieve_response import DomainRetrieveResponse as DomainRetrieveResponse
|
|
20
21
|
from .thread_retrieve_response import ThreadRetrieveResponse as ThreadRetrieveResponse
|
|
22
|
+
from .meta_webhooks_schema_response import MetaWebhooksSchemaResponse as MetaWebhooksSchemaResponse
|
|
23
|
+
from .outbound_email_opened_webhook_event import OutboundEmailOpenedWebhookEvent as OutboundEmailOpenedWebhookEvent
|
|
24
|
+
from .inbound_email_received_webhook_event import InboundEmailReceivedWebhookEvent as InboundEmailReceivedWebhookEvent
|
|
25
|
+
from .outbound_email_bounced_webhook_event import OutboundEmailBouncedWebhookEvent as OutboundEmailBouncedWebhookEvent
|
|
26
|
+
from .outbound_email_clicked_webhook_event import OutboundEmailClickedWebhookEvent as OutboundEmailClickedWebhookEvent
|
|
27
|
+
from .outbound_email_rejected_webhook_event import (
|
|
28
|
+
OutboundEmailRejectedWebhookEvent as OutboundEmailRejectedWebhookEvent,
|
|
29
|
+
)
|
|
30
|
+
from .outbound_email_delivered_webhook_event import (
|
|
31
|
+
OutboundEmailDeliveredWebhookEvent as OutboundEmailDeliveredWebhookEvent,
|
|
32
|
+
)
|
|
33
|
+
from .outbound_email_complained_webhook_event import (
|
|
34
|
+
OutboundEmailComplainedWebhookEvent as OutboundEmailComplainedWebhookEvent,
|
|
35
|
+
)
|
|
@@ -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
|
|
@@ -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,24 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Union
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from .outbound_email_opened_webhook_event import OutboundEmailOpenedWebhookEvent
|
|
7
|
+
from .inbound_email_received_webhook_event import InboundEmailReceivedWebhookEvent
|
|
8
|
+
from .outbound_email_bounced_webhook_event import OutboundEmailBouncedWebhookEvent
|
|
9
|
+
from .outbound_email_clicked_webhook_event import OutboundEmailClickedWebhookEvent
|
|
10
|
+
from .outbound_email_rejected_webhook_event import OutboundEmailRejectedWebhookEvent
|
|
11
|
+
from .outbound_email_delivered_webhook_event import OutboundEmailDeliveredWebhookEvent
|
|
12
|
+
from .outbound_email_complained_webhook_event import OutboundEmailComplainedWebhookEvent
|
|
13
|
+
|
|
14
|
+
__all__ = ["UnwrapWebhookEvent"]
|
|
15
|
+
|
|
16
|
+
UnwrapWebhookEvent: TypeAlias = Union[
|
|
17
|
+
InboundEmailReceivedWebhookEvent,
|
|
18
|
+
OutboundEmailDeliveredWebhookEvent,
|
|
19
|
+
OutboundEmailBouncedWebhookEvent,
|
|
20
|
+
OutboundEmailComplainedWebhookEvent,
|
|
21
|
+
OutboundEmailRejectedWebhookEvent,
|
|
22
|
+
OutboundEmailOpenedWebhookEvent,
|
|
23
|
+
OutboundEmailClickedWebhookEvent,
|
|
24
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
aiinbx/__init__.py,sha256=ZcZOv0tXmRKr4E-_FTKTnooxLS8j3TYTy_84dBODo2Y,2624
|
|
2
2
|
aiinbx/_base_client.py,sha256=Lh-GuSxQ-op2DjvV3SZ8jxxomRFP-PtyasPFv9rQSsY,67047
|
|
3
|
-
aiinbx/_client.py,sha256=
|
|
3
|
+
aiinbx/_client.py,sha256=uFAWY7sVW8bTZ2aa_wOUoqmBkgQO94kMXQAHNanAEnw,16622
|
|
4
4
|
aiinbx/_compat.py,sha256=DQBVORjFb33zch24jzkhM14msvnzY7mmSmgDLaVFUM8,6562
|
|
5
5
|
aiinbx/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
|
6
6
|
aiinbx/_exceptions.py,sha256=te3IaD62WIGnCIvhWUCVGpLZmClKvnv6hEjZFsD9MTA,3220
|
|
@@ -11,7 +11,7 @@ aiinbx/_resource.py,sha256=R_-4UEtw4XqdaVP9kNZE-XgrsuRBrQeFB0x4vbgWM_k,1100
|
|
|
11
11
|
aiinbx/_response.py,sha256=bN_uhJdOtEIu7WonnaRndk73_0N7bpUqEqUx_rZUxH8,28788
|
|
12
12
|
aiinbx/_streaming.py,sha256=ACLuRYE10AheLOR-UkVd0OwWIdUq3uIPT4JrMr4ceb8,10100
|
|
13
13
|
aiinbx/_types.py,sha256=k1TfzLVNmuxwSkopIgy03zuljyVxSEiekHlbSzCR9U0,7236
|
|
14
|
-
aiinbx/_version.py,sha256=
|
|
14
|
+
aiinbx/_version.py,sha256=efi3FedMjoMxO7ZdLBMzlPQiUnKFkj4kEyGol6RK9GQ,158
|
|
15
15
|
aiinbx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
aiinbx/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
|
|
17
17
|
aiinbx/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
|
|
@@ -26,11 +26,13 @@ aiinbx/_utils/_transform.py,sha256=NjCzmnfqYrsAikUHQig6N9QfuTVbKipuP3ur9mcNF-E,1
|
|
|
26
26
|
aiinbx/_utils/_typing.py,sha256=N_5PPuFNsaygbtA_npZd98SVN1LQQvFTKL6bkWPBZGU,4786
|
|
27
27
|
aiinbx/_utils/_utils.py,sha256=0dDqauUbVZEXV0NVl7Bwu904Wwo5eyFCZpQThhFNhyA,12253
|
|
28
28
|
aiinbx/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
29
|
-
aiinbx/resources/__init__.py,sha256=
|
|
29
|
+
aiinbx/resources/__init__.py,sha256=A9igPOfiP9soOFOLpVfUBwR7looj88eofftT1jXV-jw,2017
|
|
30
30
|
aiinbx/resources/domains.py,sha256=-MNGBG7p7acT_ck-47NDX2nOiJ_pH-9qUrVWjbbjmsk,17432
|
|
31
31
|
aiinbx/resources/emails.py,sha256=Uh7QZzKMoD4ERa1zjVPVpZSfRHBplYzsalFjCf-20Vg,16611
|
|
32
|
+
aiinbx/resources/meta.py,sha256=pG0ICZDnENRpvhVDPjoCZW509jhxgIpjhb8gG4hRusw,5464
|
|
32
33
|
aiinbx/resources/threads.py,sha256=5pFdoPL0gqvKWhdE5eS7uQEA3GkiwJukcycKsX4RK80,18219
|
|
33
|
-
aiinbx/
|
|
34
|
+
aiinbx/resources/webhooks.py,sha256=2aBYtHvVy4Ngpq_GEEMk0U6Vn_LKFwommXaguEjhhj0,962
|
|
35
|
+
aiinbx/types/__init__.py,sha256=Nax8UISh-wdV5r4vKVb8h1DXCgEhtidtyIjX0ZcBcnE,2424
|
|
34
36
|
aiinbx/types/domain_create_params.py,sha256=6VplEi2RZNbhYkfQ0E08gOYQ9nJyQvvOYu9yUsKfpq8,285
|
|
35
37
|
aiinbx/types/domain_create_response.py,sha256=3fRS7D1lqVuM6P_K1Fr18rNXoSIvSKOW3qtzVvyPegQ,532
|
|
36
38
|
aiinbx/types/domain_delete_response.py,sha256=SKlha3uajVd7dDu2U33WUd-PuG0l6J7HAViRxjnTezs,262
|
|
@@ -42,12 +44,21 @@ aiinbx/types/email_reply_response.py,sha256=Uq8CkHQx_O577ydGONz34JjK4yMkFUOYEXWq
|
|
|
42
44
|
aiinbx/types/email_retrieve_response.py,sha256=qycc6BSOHvZ_jqXfTW5sdncL3m-QUnwPYa6vtvIH43s,2188
|
|
43
45
|
aiinbx/types/email_send_params.py,sha256=rxN3NbcU6dDFzByF-b6-T_sWYx7K-Fh-cUPdR7mV3TY,835
|
|
44
46
|
aiinbx/types/email_send_response.py,sha256=WGJVnCc1IR762j6KHEmYGHuaTUggrylTV9c1GudIjDw,380
|
|
47
|
+
aiinbx/types/inbound_email_received_webhook_event.py,sha256=gzScx4szJgJO9bgZtnak46UOtRCpgsEH5YZDOPICyjE,2608
|
|
48
|
+
aiinbx/types/meta_webhooks_schema_response.py,sha256=eHTx-1la-ByKUarx0wdWa7KyxMb62-3HAUQfj-q435g,7434
|
|
49
|
+
aiinbx/types/outbound_email_bounced_webhook_event.py,sha256=9r8gFch6pVR8x3-m82ryLB3ZB-T0Vm3Xe7WzIEJykmE,1125
|
|
50
|
+
aiinbx/types/outbound_email_clicked_webhook_event.py,sha256=NPxnfLBoM6f91ogGnVG-yVnJ7m4Qh1uckbLXG4O1RSY,880
|
|
51
|
+
aiinbx/types/outbound_email_complained_webhook_event.py,sha256=VPXgnyYr9zb6hXnQUg8GYwzniTUuAz3Esy5K3fIpGdY,938
|
|
52
|
+
aiinbx/types/outbound_email_delivered_webhook_event.py,sha256=Ftn1Rz2sn7y67qb9Ymkxqd4OMR5Fn4b-LuyOHF1bHwA,932
|
|
53
|
+
aiinbx/types/outbound_email_opened_webhook_event.py,sha256=sMsbjWJDFOqmMe1mmWdUS277-JF1PzQUDe22AxkAzao,782
|
|
54
|
+
aiinbx/types/outbound_email_rejected_webhook_event.py,sha256=kmpVDzZvSPLaPktrySAnrND9MY4PN-j-GEhz0nrBxdg,674
|
|
45
55
|
aiinbx/types/thread_forward_params.py,sha256=8iwJhf48nebxCb1Y2wRmEepctdWjOt0BXndpKgpsCRc,695
|
|
46
56
|
aiinbx/types/thread_forward_response.py,sha256=DmxnVB38C3R-fsNURfKMf5chNbKamQcx_QaubTk_8Ts,388
|
|
47
57
|
aiinbx/types/thread_retrieve_response.py,sha256=s5jj2iwBfcoVPeybIOJUVwRhvnc_0NdEMcbDGJnheEw,2364
|
|
48
58
|
aiinbx/types/thread_search_params.py,sha256=ZvlTTw4b_swhuC0VoLnU2QI1hYjROiEAyJ4HJXCrR9M,1939
|
|
49
59
|
aiinbx/types/thread_search_response.py,sha256=lldugJNQuQ5tsD9BrgxoDNojAYs7Ks8iZDMxwhnjogY,908
|
|
50
|
-
aiinbx
|
|
51
|
-
aiinbx-0.
|
|
52
|
-
aiinbx-0.
|
|
53
|
-
aiinbx-0.
|
|
60
|
+
aiinbx/types/unwrap_webhook_event.py,sha256=6Hp4c5iHNs2lw3DYgRrgvRFBOmms0NADJ5XExEZrICI,1091
|
|
61
|
+
aiinbx-0.5.0.dist-info/METADATA,sha256=qYd6_fgp0Cx_JWqiTvzg88EpUjH0J7lT6AwftZN0Efo,13206
|
|
62
|
+
aiinbx-0.5.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
63
|
+
aiinbx-0.5.0.dist-info/licenses/LICENSE,sha256=i1rY5G0rFWpuWXv5WPoFrQEOrDWycksLhJxuLBF1tZw,11337
|
|
64
|
+
aiinbx-0.5.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|