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

@@ -0,0 +1,343 @@
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 List
6
+ from typing_extensions import Literal
7
+
8
+ import httpx
9
+
10
+ from ..types import thread_search_params
11
+ from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
12
+ from .._utils import maybe_transform, async_maybe_transform
13
+ from .._compat import cached_property
14
+ from .._resource import SyncAPIResource, AsyncAPIResource
15
+ from .._response import (
16
+ to_raw_response_wrapper,
17
+ to_streamed_response_wrapper,
18
+ async_to_raw_response_wrapper,
19
+ async_to_streamed_response_wrapper,
20
+ )
21
+ from .._base_client import make_request_options
22
+ from ..types.thread_search_response import ThreadSearchResponse
23
+ from ..types.thread_retrieve_response import ThreadRetrieveResponse
24
+
25
+ __all__ = ["ThreadsResource", "AsyncThreadsResource"]
26
+
27
+
28
+ class ThreadsResource(SyncAPIResource):
29
+ @cached_property
30
+ def with_raw_response(self) -> ThreadsResourceWithRawResponse:
31
+ """
32
+ This property can be used as a prefix for any HTTP method call to return
33
+ the raw response object instead of the parsed content.
34
+
35
+ For more information, see https://www.github.com/aiinbx/aiinbx-py#accessing-raw-response-data-eg-headers
36
+ """
37
+ return ThreadsResourceWithRawResponse(self)
38
+
39
+ @cached_property
40
+ def with_streaming_response(self) -> ThreadsResourceWithStreamingResponse:
41
+ """
42
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
43
+
44
+ For more information, see https://www.github.com/aiinbx/aiinbx-py#with_streaming_response
45
+ """
46
+ return ThreadsResourceWithStreamingResponse(self)
47
+
48
+ def retrieve(
49
+ self,
50
+ thread_id: str,
51
+ *,
52
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
53
+ # The extra values given here take precedence over values defined on the client or passed to this method.
54
+ extra_headers: Headers | None = None,
55
+ extra_query: Query | None = None,
56
+ extra_body: Body | None = None,
57
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
58
+ ) -> ThreadRetrieveResponse:
59
+ """
60
+ Retrieve a specific thread with all its emails by thread ID using API key
61
+ authentication
62
+
63
+ Args:
64
+ extra_headers: Send extra headers
65
+
66
+ extra_query: Add additional query parameters to the request
67
+
68
+ extra_body: Add additional JSON properties to the request
69
+
70
+ timeout: Override the client-level default timeout for this request, in seconds
71
+ """
72
+ if not thread_id:
73
+ raise ValueError(f"Expected a non-empty value for `thread_id` but received {thread_id!r}")
74
+ return self._get(
75
+ f"/threads/{thread_id}",
76
+ options=make_request_options(
77
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
78
+ ),
79
+ cast_to=ThreadRetrieveResponse,
80
+ )
81
+
82
+ def search(
83
+ self,
84
+ *,
85
+ conversation_state: Literal["awaiting_reply", "needs_reply", "active", "stale"] | NotGiven = NOT_GIVEN,
86
+ created_after: str | NotGiven = NOT_GIVEN,
87
+ created_before: str | NotGiven = NOT_GIVEN,
88
+ has_email_from_address: str | NotGiven = NOT_GIVEN,
89
+ has_email_to_address: str | NotGiven = NOT_GIVEN,
90
+ has_participant_emails: List[str] | NotGiven = NOT_GIVEN,
91
+ last_email_after: str | NotGiven = NOT_GIVEN,
92
+ last_email_before: str | NotGiven = NOT_GIVEN,
93
+ limit: float | NotGiven = NOT_GIVEN,
94
+ offset: float | NotGiven = NOT_GIVEN,
95
+ some_email_has_direction: Literal["INBOUND", "OUTBOUND"] | NotGiven = NOT_GIVEN,
96
+ some_email_has_status: Literal[
97
+ "DRAFT",
98
+ "QUEUED",
99
+ "ACCEPTED",
100
+ "SENT",
101
+ "RECEIVED",
102
+ "FAILED",
103
+ "BOUNCED",
104
+ "COMPLAINED",
105
+ "REJECTED",
106
+ "READ",
107
+ "ARCHIVED",
108
+ ]
109
+ | NotGiven = NOT_GIVEN,
110
+ sort_by: Literal["createdAt", "lastEmailAt", "subject"] | NotGiven = NOT_GIVEN,
111
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
112
+ stale_threshold_days: float | NotGiven = NOT_GIVEN,
113
+ subject_contains: str | NotGiven = NOT_GIVEN,
114
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
115
+ # The extra values given here take precedence over values defined on the client or passed to this method.
116
+ extra_headers: Headers | None = None,
117
+ extra_query: Query | None = None,
118
+ extra_body: Body | None = None,
119
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
120
+ ) -> ThreadSearchResponse:
121
+ """
122
+ Search threads with various filtering options optimized for AI agents
123
+
124
+ Args:
125
+ extra_headers: Send extra headers
126
+
127
+ extra_query: Add additional query parameters to the request
128
+
129
+ extra_body: Add additional JSON properties to the request
130
+
131
+ timeout: Override the client-level default timeout for this request, in seconds
132
+ """
133
+ return self._post(
134
+ "/threads/search",
135
+ body=maybe_transform(
136
+ {
137
+ "conversation_state": conversation_state,
138
+ "created_after": created_after,
139
+ "created_before": created_before,
140
+ "has_email_from_address": has_email_from_address,
141
+ "has_email_to_address": has_email_to_address,
142
+ "has_participant_emails": has_participant_emails,
143
+ "last_email_after": last_email_after,
144
+ "last_email_before": last_email_before,
145
+ "limit": limit,
146
+ "offset": offset,
147
+ "some_email_has_direction": some_email_has_direction,
148
+ "some_email_has_status": some_email_has_status,
149
+ "sort_by": sort_by,
150
+ "sort_order": sort_order,
151
+ "stale_threshold_days": stale_threshold_days,
152
+ "subject_contains": subject_contains,
153
+ },
154
+ thread_search_params.ThreadSearchParams,
155
+ ),
156
+ options=make_request_options(
157
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
158
+ ),
159
+ cast_to=ThreadSearchResponse,
160
+ )
161
+
162
+
163
+ class AsyncThreadsResource(AsyncAPIResource):
164
+ @cached_property
165
+ def with_raw_response(self) -> AsyncThreadsResourceWithRawResponse:
166
+ """
167
+ This property can be used as a prefix for any HTTP method call to return
168
+ the raw response object instead of the parsed content.
169
+
170
+ For more information, see https://www.github.com/aiinbx/aiinbx-py#accessing-raw-response-data-eg-headers
171
+ """
172
+ return AsyncThreadsResourceWithRawResponse(self)
173
+
174
+ @cached_property
175
+ def with_streaming_response(self) -> AsyncThreadsResourceWithStreamingResponse:
176
+ """
177
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
178
+
179
+ For more information, see https://www.github.com/aiinbx/aiinbx-py#with_streaming_response
180
+ """
181
+ return AsyncThreadsResourceWithStreamingResponse(self)
182
+
183
+ async def retrieve(
184
+ self,
185
+ thread_id: str,
186
+ *,
187
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
188
+ # The extra values given here take precedence over values defined on the client or passed to this method.
189
+ extra_headers: Headers | None = None,
190
+ extra_query: Query | None = None,
191
+ extra_body: Body | None = None,
192
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
193
+ ) -> ThreadRetrieveResponse:
194
+ """
195
+ Retrieve a specific thread with all its emails by thread ID using API key
196
+ authentication
197
+
198
+ Args:
199
+ extra_headers: Send extra headers
200
+
201
+ extra_query: Add additional query parameters to the request
202
+
203
+ extra_body: Add additional JSON properties to the request
204
+
205
+ timeout: Override the client-level default timeout for this request, in seconds
206
+ """
207
+ if not thread_id:
208
+ raise ValueError(f"Expected a non-empty value for `thread_id` but received {thread_id!r}")
209
+ return await self._get(
210
+ f"/threads/{thread_id}",
211
+ options=make_request_options(
212
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
213
+ ),
214
+ cast_to=ThreadRetrieveResponse,
215
+ )
216
+
217
+ async def search(
218
+ self,
219
+ *,
220
+ conversation_state: Literal["awaiting_reply", "needs_reply", "active", "stale"] | NotGiven = NOT_GIVEN,
221
+ created_after: str | NotGiven = NOT_GIVEN,
222
+ created_before: str | NotGiven = NOT_GIVEN,
223
+ has_email_from_address: str | NotGiven = NOT_GIVEN,
224
+ has_email_to_address: str | NotGiven = NOT_GIVEN,
225
+ has_participant_emails: List[str] | NotGiven = NOT_GIVEN,
226
+ last_email_after: str | NotGiven = NOT_GIVEN,
227
+ last_email_before: str | NotGiven = NOT_GIVEN,
228
+ limit: float | NotGiven = NOT_GIVEN,
229
+ offset: float | NotGiven = NOT_GIVEN,
230
+ some_email_has_direction: Literal["INBOUND", "OUTBOUND"] | NotGiven = NOT_GIVEN,
231
+ some_email_has_status: Literal[
232
+ "DRAFT",
233
+ "QUEUED",
234
+ "ACCEPTED",
235
+ "SENT",
236
+ "RECEIVED",
237
+ "FAILED",
238
+ "BOUNCED",
239
+ "COMPLAINED",
240
+ "REJECTED",
241
+ "READ",
242
+ "ARCHIVED",
243
+ ]
244
+ | NotGiven = NOT_GIVEN,
245
+ sort_by: Literal["createdAt", "lastEmailAt", "subject"] | NotGiven = NOT_GIVEN,
246
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
247
+ stale_threshold_days: float | NotGiven = NOT_GIVEN,
248
+ subject_contains: str | NotGiven = NOT_GIVEN,
249
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
250
+ # The extra values given here take precedence over values defined on the client or passed to this method.
251
+ extra_headers: Headers | None = None,
252
+ extra_query: Query | None = None,
253
+ extra_body: Body | None = None,
254
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
255
+ ) -> ThreadSearchResponse:
256
+ """
257
+ Search threads with various filtering options optimized for AI agents
258
+
259
+ Args:
260
+ extra_headers: Send extra headers
261
+
262
+ extra_query: Add additional query parameters to the request
263
+
264
+ extra_body: Add additional JSON properties to the request
265
+
266
+ timeout: Override the client-level default timeout for this request, in seconds
267
+ """
268
+ return await self._post(
269
+ "/threads/search",
270
+ body=await async_maybe_transform(
271
+ {
272
+ "conversation_state": conversation_state,
273
+ "created_after": created_after,
274
+ "created_before": created_before,
275
+ "has_email_from_address": has_email_from_address,
276
+ "has_email_to_address": has_email_to_address,
277
+ "has_participant_emails": has_participant_emails,
278
+ "last_email_after": last_email_after,
279
+ "last_email_before": last_email_before,
280
+ "limit": limit,
281
+ "offset": offset,
282
+ "some_email_has_direction": some_email_has_direction,
283
+ "some_email_has_status": some_email_has_status,
284
+ "sort_by": sort_by,
285
+ "sort_order": sort_order,
286
+ "stale_threshold_days": stale_threshold_days,
287
+ "subject_contains": subject_contains,
288
+ },
289
+ thread_search_params.ThreadSearchParams,
290
+ ),
291
+ options=make_request_options(
292
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
293
+ ),
294
+ cast_to=ThreadSearchResponse,
295
+ )
296
+
297
+
298
+ class ThreadsResourceWithRawResponse:
299
+ def __init__(self, threads: ThreadsResource) -> None:
300
+ self._threads = threads
301
+
302
+ self.retrieve = to_raw_response_wrapper(
303
+ threads.retrieve,
304
+ )
305
+ self.search = to_raw_response_wrapper(
306
+ threads.search,
307
+ )
308
+
309
+
310
+ class AsyncThreadsResourceWithRawResponse:
311
+ def __init__(self, threads: AsyncThreadsResource) -> None:
312
+ self._threads = threads
313
+
314
+ self.retrieve = async_to_raw_response_wrapper(
315
+ threads.retrieve,
316
+ )
317
+ self.search = async_to_raw_response_wrapper(
318
+ threads.search,
319
+ )
320
+
321
+
322
+ class ThreadsResourceWithStreamingResponse:
323
+ def __init__(self, threads: ThreadsResource) -> None:
324
+ self._threads = threads
325
+
326
+ self.retrieve = to_streamed_response_wrapper(
327
+ threads.retrieve,
328
+ )
329
+ self.search = to_streamed_response_wrapper(
330
+ threads.search,
331
+ )
332
+
333
+
334
+ class AsyncThreadsResourceWithStreamingResponse:
335
+ def __init__(self, threads: AsyncThreadsResource) -> None:
336
+ self._threads = threads
337
+
338
+ self.retrieve = async_to_streamed_response_wrapper(
339
+ threads.retrieve,
340
+ )
341
+ self.search = async_to_streamed_response_wrapper(
342
+ threads.search,
343
+ )
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .email_send_params import EmailSendParams as EmailSendParams
6
+ from .email_reply_params import EmailReplyParams as EmailReplyParams
7
+ from .email_send_response import EmailSendResponse as EmailSendResponse
8
+ from .email_reply_response import EmailReplyResponse as EmailReplyResponse
9
+ from .thread_search_params import ThreadSearchParams as ThreadSearchParams
10
+ from .thread_search_response import ThreadSearchResponse as ThreadSearchResponse
11
+ from .email_retrieve_response import EmailRetrieveResponse as EmailRetrieveResponse
12
+ from .thread_retrieve_response import ThreadRetrieveResponse as ThreadRetrieveResponse
@@ -0,0 +1,32 @@
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 List, Union
6
+ from typing_extensions import Required, Annotated, TypedDict
7
+
8
+ from .._utils import PropertyInfo
9
+
10
+ __all__ = ["EmailReplyParams"]
11
+
12
+
13
+ class EmailReplyParams(TypedDict, total=False):
14
+ from_: Required[Annotated[str, PropertyInfo(alias="from")]]
15
+
16
+ html: Required[str]
17
+
18
+ bcc: Union[str, List[str]]
19
+
20
+ cc: Union[str, List[str]]
21
+
22
+ from_name: str
23
+
24
+ is_draft: bool
25
+
26
+ reply_all: bool
27
+
28
+ subject: str
29
+
30
+ text: str
31
+
32
+ to: Union[str, List[str]]
@@ -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,38 @@
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 List, Union
6
+ from typing_extensions import Required, Annotated, TypedDict
7
+
8
+ from .._utils import PropertyInfo
9
+
10
+ __all__ = ["EmailSendParams"]
11
+
12
+
13
+ class EmailSendParams(TypedDict, total=False):
14
+ from_: Required[Annotated[str, PropertyInfo(alias="from")]]
15
+
16
+ html: Required[str]
17
+
18
+ subject: Required[str]
19
+
20
+ to: Required[Union[str, List[str]]]
21
+
22
+ bcc: Union[str, List[str]]
23
+
24
+ cc: Union[str, List[str]]
25
+
26
+ from_name: str
27
+
28
+ in_reply_to: str
29
+
30
+ is_draft: bool
31
+
32
+ references: List[str]
33
+
34
+ reply_to: Union[str, List[str]]
35
+
36
+ text: str
37
+
38
+ thread_id: Annotated[str, PropertyInfo(alias="threadId")]
@@ -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,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