aiinbx 0.1.0__py3-none-any.whl → 0.2.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/_models.py CHANGED
@@ -304,7 +304,7 @@ class BaseModel(pydantic.BaseModel):
304
304
  exclude_none=exclude_none,
305
305
  )
306
306
 
307
- return cast(dict[str, Any], json_safe(dumped)) if mode == "json" else dumped
307
+ return cast("dict[str, Any]", json_safe(dumped)) if mode == "json" else dumped
308
308
 
309
309
  @override
310
310
  def model_dump_json(
aiinbx/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "aiinbx"
4
- __version__ = "0.1.0" # x-release-please-version
4
+ __version__ = "0.2.0" # x-release-please-version
@@ -2,12 +2,12 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import List
5
+ from typing import List, Union
6
6
  from typing_extensions import Literal
7
7
 
8
8
  import httpx
9
9
 
10
- from ..types import thread_search_params
10
+ from ..types import thread_search_params, thread_forward_params
11
11
  from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
12
12
  from .._utils import maybe_transform, async_maybe_transform
13
13
  from .._compat import cached_property
@@ -20,6 +20,7 @@ from .._response import (
20
20
  )
21
21
  from .._base_client import make_request_options
22
22
  from ..types.thread_search_response import ThreadSearchResponse
23
+ from ..types.thread_forward_response import ThreadForwardResponse
23
24
  from ..types.thread_retrieve_response import ThreadRetrieveResponse
24
25
 
25
26
  __all__ = ["ThreadsResource", "AsyncThreadsResource"]
@@ -79,6 +80,62 @@ class ThreadsResource(SyncAPIResource):
79
80
  cast_to=ThreadRetrieveResponse,
80
81
  )
81
82
 
83
+ def forward(
84
+ self,
85
+ thread_id: str,
86
+ *,
87
+ to: Union[str, List[str]],
88
+ bcc: Union[str, List[str]] | NotGiven = NOT_GIVEN,
89
+ cc: Union[str, List[str]] | NotGiven = NOT_GIVEN,
90
+ from_: str | NotGiven = NOT_GIVEN,
91
+ from_name: str | NotGiven = NOT_GIVEN,
92
+ include_attachments: bool | NotGiven = NOT_GIVEN,
93
+ is_draft: bool | NotGiven = NOT_GIVEN,
94
+ note: str | NotGiven = NOT_GIVEN,
95
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
96
+ # The extra values given here take precedence over values defined on the client or passed to this method.
97
+ extra_headers: Headers | None = None,
98
+ extra_query: Query | None = None,
99
+ extra_body: Body | None = None,
100
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
101
+ ) -> ThreadForwardResponse:
102
+ """Forward the entire thread as a readable transcript.
103
+
104
+ Attachments are included as
105
+ secure links by default.
106
+
107
+ Args:
108
+ extra_headers: Send extra headers
109
+
110
+ extra_query: Add additional query parameters to the request
111
+
112
+ extra_body: Add additional JSON properties to the request
113
+
114
+ timeout: Override the client-level default timeout for this request, in seconds
115
+ """
116
+ if not thread_id:
117
+ raise ValueError(f"Expected a non-empty value for `thread_id` but received {thread_id!r}")
118
+ return self._post(
119
+ f"/threads/{thread_id}/forward",
120
+ body=maybe_transform(
121
+ {
122
+ "to": to,
123
+ "bcc": bcc,
124
+ "cc": cc,
125
+ "from_": from_,
126
+ "from_name": from_name,
127
+ "include_attachments": include_attachments,
128
+ "is_draft": is_draft,
129
+ "note": note,
130
+ },
131
+ thread_forward_params.ThreadForwardParams,
132
+ ),
133
+ options=make_request_options(
134
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
135
+ ),
136
+ cast_to=ThreadForwardResponse,
137
+ )
138
+
82
139
  def search(
83
140
  self,
84
141
  *,
@@ -214,6 +271,62 @@ class AsyncThreadsResource(AsyncAPIResource):
214
271
  cast_to=ThreadRetrieveResponse,
215
272
  )
216
273
 
274
+ async def forward(
275
+ self,
276
+ thread_id: str,
277
+ *,
278
+ to: Union[str, List[str]],
279
+ bcc: Union[str, List[str]] | NotGiven = NOT_GIVEN,
280
+ cc: Union[str, List[str]] | NotGiven = NOT_GIVEN,
281
+ from_: str | NotGiven = NOT_GIVEN,
282
+ from_name: str | NotGiven = NOT_GIVEN,
283
+ include_attachments: bool | NotGiven = NOT_GIVEN,
284
+ is_draft: bool | NotGiven = NOT_GIVEN,
285
+ note: str | NotGiven = NOT_GIVEN,
286
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
287
+ # The extra values given here take precedence over values defined on the client or passed to this method.
288
+ extra_headers: Headers | None = None,
289
+ extra_query: Query | None = None,
290
+ extra_body: Body | None = None,
291
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
292
+ ) -> ThreadForwardResponse:
293
+ """Forward the entire thread as a readable transcript.
294
+
295
+ Attachments are included as
296
+ secure links by default.
297
+
298
+ Args:
299
+ extra_headers: Send extra headers
300
+
301
+ extra_query: Add additional query parameters to the request
302
+
303
+ extra_body: Add additional JSON properties to the request
304
+
305
+ timeout: Override the client-level default timeout for this request, in seconds
306
+ """
307
+ if not thread_id:
308
+ raise ValueError(f"Expected a non-empty value for `thread_id` but received {thread_id!r}")
309
+ return await self._post(
310
+ f"/threads/{thread_id}/forward",
311
+ body=await async_maybe_transform(
312
+ {
313
+ "to": to,
314
+ "bcc": bcc,
315
+ "cc": cc,
316
+ "from_": from_,
317
+ "from_name": from_name,
318
+ "include_attachments": include_attachments,
319
+ "is_draft": is_draft,
320
+ "note": note,
321
+ },
322
+ thread_forward_params.ThreadForwardParams,
323
+ ),
324
+ options=make_request_options(
325
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
326
+ ),
327
+ cast_to=ThreadForwardResponse,
328
+ )
329
+
217
330
  async def search(
218
331
  self,
219
332
  *,
@@ -302,6 +415,9 @@ class ThreadsResourceWithRawResponse:
302
415
  self.retrieve = to_raw_response_wrapper(
303
416
  threads.retrieve,
304
417
  )
418
+ self.forward = to_raw_response_wrapper(
419
+ threads.forward,
420
+ )
305
421
  self.search = to_raw_response_wrapper(
306
422
  threads.search,
307
423
  )
@@ -314,6 +430,9 @@ class AsyncThreadsResourceWithRawResponse:
314
430
  self.retrieve = async_to_raw_response_wrapper(
315
431
  threads.retrieve,
316
432
  )
433
+ self.forward = async_to_raw_response_wrapper(
434
+ threads.forward,
435
+ )
317
436
  self.search = async_to_raw_response_wrapper(
318
437
  threads.search,
319
438
  )
@@ -326,6 +445,9 @@ class ThreadsResourceWithStreamingResponse:
326
445
  self.retrieve = to_streamed_response_wrapper(
327
446
  threads.retrieve,
328
447
  )
448
+ self.forward = to_streamed_response_wrapper(
449
+ threads.forward,
450
+ )
329
451
  self.search = to_streamed_response_wrapper(
330
452
  threads.search,
331
453
  )
@@ -338,6 +460,9 @@ class AsyncThreadsResourceWithStreamingResponse:
338
460
  self.retrieve = async_to_streamed_response_wrapper(
339
461
  threads.retrieve,
340
462
  )
463
+ self.forward = async_to_streamed_response_wrapper(
464
+ threads.forward,
465
+ )
341
466
  self.search = async_to_streamed_response_wrapper(
342
467
  threads.search,
343
468
  )
aiinbx/types/__init__.py CHANGED
@@ -7,6 +7,8 @@ from .email_reply_params import EmailReplyParams as EmailReplyParams
7
7
  from .email_send_response import EmailSendResponse as EmailSendResponse
8
8
  from .email_reply_response import EmailReplyResponse as EmailReplyResponse
9
9
  from .thread_search_params import ThreadSearchParams as ThreadSearchParams
10
+ from .thread_forward_params import ThreadForwardParams as ThreadForwardParams
10
11
  from .thread_search_response import ThreadSearchResponse as ThreadSearchResponse
11
12
  from .email_retrieve_response import EmailRetrieveResponse as EmailRetrieveResponse
13
+ from .thread_forward_response import ThreadForwardResponse as ThreadForwardResponse
12
14
  from .thread_retrieve_response import ThreadRetrieveResponse as ThreadRetrieveResponse
@@ -0,0 +1,28 @@
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__ = ["ThreadForwardParams"]
11
+
12
+
13
+ class ThreadForwardParams(TypedDict, total=False):
14
+ to: Required[Union[str, List[str]]]
15
+
16
+ bcc: Union[str, List[str]]
17
+
18
+ cc: Union[str, List[str]]
19
+
20
+ from_: Annotated[str, PropertyInfo(alias="from")]
21
+
22
+ from_name: str
23
+
24
+ include_attachments: Annotated[bool, PropertyInfo(alias="includeAttachments")]
25
+
26
+ is_draft: bool
27
+
28
+ note: 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__ = ["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")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: aiinbx
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: The official Python library for the AIInbx API
5
5
  Project-URL: Homepage, https://github.com/aiinbx/aiinbx-py
6
6
  Project-URL: Repository, https://github.com/aiinbx/aiinbx-py
@@ -5,13 +5,13 @@ aiinbx/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
5
5
  aiinbx/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
6
6
  aiinbx/_exceptions.py,sha256=te3IaD62WIGnCIvhWUCVGpLZmClKvnv6hEjZFsD9MTA,3220
7
7
  aiinbx/_files.py,sha256=KnEzGi_O756MvKyJ4fOCW_u3JhOeWPQ4RsmDvqihDQU,3545
8
- aiinbx/_models.py,sha256=KvjsMfb88XZlFUKVoOxr8OyDj47MhoH2OKqWNEbBhk4,30010
8
+ aiinbx/_models.py,sha256=6rDtUmk6jhjGN1q96CUICYfBunNXNhhEk_AqztTm3uE,30012
9
9
  aiinbx/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
10
10
  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=09iXMVfcSWWLbbAZvDykUlCBwa8pKnOH5yBuFNb1tTo,6197
14
- aiinbx/_version.py,sha256=oF0KGnHAFVzWXCAJibk-Lf5bNQG1fgi0CmW2-k3nMDU,158
14
+ aiinbx/_version.py,sha256=a0CU5s2UMu9VXYxR2igUfoZ3oelzRN7YHMqKyWBgeLc,158
15
15
  aiinbx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  aiinbx/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
17
17
  aiinbx/_utils/_logs.py,sha256=sQ51aPSf-_mQi158zGXZjNr8ud0Pc5hwcTfVVdi-3HI,775
@@ -26,17 +26,19 @@ aiinbx/_utils/_utils.py,sha256=ts4CiiuNpFiGB6YMdkQRh2SZvYvsl7mAF-JWHCcLDf4,12312
26
26
  aiinbx/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
27
27
  aiinbx/resources/__init__.py,sha256=uabpr6upol3w-uWUjNiu-CrwB7SZVqVddiWQ1fv_wTQ,1015
28
28
  aiinbx/resources/emails.py,sha256=FqZJGxs-kfyWFviPJwnVPYgmaqIjTPXkPUfhsUv4_Gs,16735
29
- aiinbx/resources/threads.py,sha256=qZokn2dc5qAxCVdUxrIG-_whzpC0rnv_8L497uJPi08,13689
30
- aiinbx/types/__init__.py,sha256=U3A9T6ppdx7WB2oVq36RtswBLOZtyZ_h8eKYwuxfLxE,732
29
+ aiinbx/resources/threads.py,sha256=pCXJo0VKSvPvQyDlT-FTU-2soxdLx8OPWxjZfi1sE2U,18653
30
+ aiinbx/types/__init__.py,sha256=OxaPMNBlWxLJ4AA5mEzVXTUKU6jcvSAMznNZ_Jh5en8,894
31
31
  aiinbx/types/email_reply_params.py,sha256=akNojZA2jhLdSzpewVaGw5Du216jiZe2doY1fHbrLSk,609
32
32
  aiinbx/types/email_reply_response.py,sha256=Uq8CkHQx_O577ydGONz34JjK4yMkFUOYEXWqDnu2h9s,382
33
33
  aiinbx/types/email_retrieve_response.py,sha256=qycc6BSOHvZ_jqXfTW5sdncL3m-QUnwPYa6vtvIH43s,2188
34
34
  aiinbx/types/email_send_params.py,sha256=N1FjiOAOs5Tb6GZnPMUmNzsGWxdqw-St8VL8UL-7jdY,755
35
35
  aiinbx/types/email_send_response.py,sha256=WGJVnCc1IR762j6KHEmYGHuaTUggrylTV9c1GudIjDw,380
36
+ aiinbx/types/thread_forward_params.py,sha256=3Zcc3t9ymleraQ3nKGfwQniA0GP3dMRhNgYWPLalaTc,635
37
+ aiinbx/types/thread_forward_response.py,sha256=DmxnVB38C3R-fsNURfKMf5chNbKamQcx_QaubTk_8Ts,388
36
38
  aiinbx/types/thread_retrieve_response.py,sha256=s5jj2iwBfcoVPeybIOJUVwRhvnc_0NdEMcbDGJnheEw,2364
37
39
  aiinbx/types/thread_search_params.py,sha256=ioZX11I1Nhu6MTvSXDX7FSmI4Ny0yAbW9PWXOOKellM,1917
38
40
  aiinbx/types/thread_search_response.py,sha256=lldugJNQuQ5tsD9BrgxoDNojAYs7Ks8iZDMxwhnjogY,908
39
- aiinbx-0.1.0.dist-info/METADATA,sha256=G7krvZavx2SK0NP86GoqI7Khgc0uI-XWeBH1Wgkdr8c,13206
40
- aiinbx-0.1.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
41
- aiinbx-0.1.0.dist-info/licenses/LICENSE,sha256=i1rY5G0rFWpuWXv5WPoFrQEOrDWycksLhJxuLBF1tZw,11337
42
- aiinbx-0.1.0.dist-info/RECORD,,
41
+ aiinbx-0.2.0.dist-info/METADATA,sha256=nPlPtO17_Gux6WX-8ceyWgbR2qKNP-asPoHK1mhTx3Q,13206
42
+ aiinbx-0.2.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
43
+ aiinbx-0.2.0.dist-info/licenses/LICENSE,sha256=i1rY5G0rFWpuWXv5WPoFrQEOrDWycksLhJxuLBF1tZw,11337
44
+ aiinbx-0.2.0.dist-info/RECORD,,
File without changes