aiinbx 0.1.1__py3-none-any.whl → 0.3.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/_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.1" # x-release-please-version
4
+ __version__ = "0.3.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,60 @@ 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
+ """
103
+ Forward the entire thread as a readable transcript.
104
+
105
+ Args:
106
+ extra_headers: Send extra headers
107
+
108
+ extra_query: Add additional query parameters to the request
109
+
110
+ extra_body: Add additional JSON properties to the request
111
+
112
+ timeout: Override the client-level default timeout for this request, in seconds
113
+ """
114
+ if not thread_id:
115
+ raise ValueError(f"Expected a non-empty value for `thread_id` but received {thread_id!r}")
116
+ return self._post(
117
+ f"/threads/{thread_id}/forward",
118
+ body=maybe_transform(
119
+ {
120
+ "to": to,
121
+ "bcc": bcc,
122
+ "cc": cc,
123
+ "from_": from_,
124
+ "from_name": from_name,
125
+ "include_attachments": include_attachments,
126
+ "is_draft": is_draft,
127
+ "note": note,
128
+ },
129
+ thread_forward_params.ThreadForwardParams,
130
+ ),
131
+ options=make_request_options(
132
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
133
+ ),
134
+ cast_to=ThreadForwardResponse,
135
+ )
136
+
82
137
  def search(
83
138
  self,
84
139
  *,
@@ -214,6 +269,60 @@ class AsyncThreadsResource(AsyncAPIResource):
214
269
  cast_to=ThreadRetrieveResponse,
215
270
  )
216
271
 
272
+ async def forward(
273
+ self,
274
+ thread_id: str,
275
+ *,
276
+ to: Union[str, List[str]],
277
+ bcc: Union[str, List[str]] | NotGiven = NOT_GIVEN,
278
+ cc: Union[str, List[str]] | NotGiven = NOT_GIVEN,
279
+ from_: str | NotGiven = NOT_GIVEN,
280
+ from_name: str | NotGiven = NOT_GIVEN,
281
+ include_attachments: bool | NotGiven = NOT_GIVEN,
282
+ is_draft: bool | NotGiven = NOT_GIVEN,
283
+ note: str | NotGiven = NOT_GIVEN,
284
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
285
+ # The extra values given here take precedence over values defined on the client or passed to this method.
286
+ extra_headers: Headers | None = None,
287
+ extra_query: Query | None = None,
288
+ extra_body: Body | None = None,
289
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
290
+ ) -> ThreadForwardResponse:
291
+ """
292
+ Forward the entire thread as a readable transcript.
293
+
294
+ Args:
295
+ extra_headers: Send extra headers
296
+
297
+ extra_query: Add additional query parameters to the request
298
+
299
+ extra_body: Add additional JSON properties to the request
300
+
301
+ timeout: Override the client-level default timeout for this request, in seconds
302
+ """
303
+ if not thread_id:
304
+ raise ValueError(f"Expected a non-empty value for `thread_id` but received {thread_id!r}")
305
+ return await self._post(
306
+ f"/threads/{thread_id}/forward",
307
+ body=await async_maybe_transform(
308
+ {
309
+ "to": to,
310
+ "bcc": bcc,
311
+ "cc": cc,
312
+ "from_": from_,
313
+ "from_name": from_name,
314
+ "include_attachments": include_attachments,
315
+ "is_draft": is_draft,
316
+ "note": note,
317
+ },
318
+ thread_forward_params.ThreadForwardParams,
319
+ ),
320
+ options=make_request_options(
321
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
322
+ ),
323
+ cast_to=ThreadForwardResponse,
324
+ )
325
+
217
326
  async def search(
218
327
  self,
219
328
  *,
@@ -302,6 +411,9 @@ class ThreadsResourceWithRawResponse:
302
411
  self.retrieve = to_raw_response_wrapper(
303
412
  threads.retrieve,
304
413
  )
414
+ self.forward = to_raw_response_wrapper(
415
+ threads.forward,
416
+ )
305
417
  self.search = to_raw_response_wrapper(
306
418
  threads.search,
307
419
  )
@@ -314,6 +426,9 @@ class AsyncThreadsResourceWithRawResponse:
314
426
  self.retrieve = async_to_raw_response_wrapper(
315
427
  threads.retrieve,
316
428
  )
429
+ self.forward = async_to_raw_response_wrapper(
430
+ threads.forward,
431
+ )
317
432
  self.search = async_to_raw_response_wrapper(
318
433
  threads.search,
319
434
  )
@@ -326,6 +441,9 @@ class ThreadsResourceWithStreamingResponse:
326
441
  self.retrieve = to_streamed_response_wrapper(
327
442
  threads.retrieve,
328
443
  )
444
+ self.forward = to_streamed_response_wrapper(
445
+ threads.forward,
446
+ )
329
447
  self.search = to_streamed_response_wrapper(
330
448
  threads.search,
331
449
  )
@@ -338,6 +456,9 @@ class AsyncThreadsResourceWithStreamingResponse:
338
456
  self.retrieve = async_to_streamed_response_wrapper(
339
457
  threads.retrieve,
340
458
  )
459
+ self.forward = async_to_streamed_response_wrapper(
460
+ threads.forward,
461
+ )
341
462
  self.search = async_to_streamed_response_wrapper(
342
463
  threads.search,
343
464
  )
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.1
3
+ Version: 0.3.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
@@ -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=09iXMVfcSWWLbbAZvDykUlCBwa8pKnOH5yBuFNb1tTo,6197
14
- aiinbx/_version.py,sha256=wCc_rMHlYDLLaiBMYB1zVN3731oG5Bfjms4BU6nwrjI,158
14
+ aiinbx/_version.py,sha256=9iNasksOFN13zEXap0JeciW88g2K4m0Zs2ji73zr1ig,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=ye0D-cLfYFUHZYYVnvpyRCtNuQ-6XD0a4pkQvibrH2M,18531
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.1.dist-info/METADATA,sha256=OqqY7qXjn3J1YienapqTQ-vyQIXhyK0ygyEoWc6jWt8,13206
40
- aiinbx-0.1.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
41
- aiinbx-0.1.1.dist-info/licenses/LICENSE,sha256=i1rY5G0rFWpuWXv5WPoFrQEOrDWycksLhJxuLBF1tZw,11337
42
- aiinbx-0.1.1.dist-info/RECORD,,
41
+ aiinbx-0.3.0.dist-info/METADATA,sha256=Z342mR-k2yo99ybQ3dmloVXgscY3NIYiesLj8lRFTGA,13206
42
+ aiinbx-0.3.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
43
+ aiinbx-0.3.0.dist-info/licenses/LICENSE,sha256=i1rY5G0rFWpuWXv5WPoFrQEOrDWycksLhJxuLBF1tZw,11337
44
+ aiinbx-0.3.0.dist-info/RECORD,,
File without changes