aiinbx 0.1.0__tar.gz → 0.2.0__tar.gz
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-0.2.0/.release-please-manifest.json +3 -0
- aiinbx-0.2.0/CHANGELOG.md +38 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/PKG-INFO +1 -1
- {aiinbx-0.1.0 → aiinbx-0.2.0}/api.md +2 -1
- {aiinbx-0.1.0 → aiinbx-0.2.0}/pyproject.toml +2 -1
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_models.py +1 -1
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_version.py +1 -1
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/resources/threads.py +127 -2
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/types/__init__.py +2 -0
- aiinbx-0.2.0/src/aiinbx/types/thread_forward_params.py +28 -0
- aiinbx-0.2.0/src/aiinbx/types/thread_forward_response.py +15 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/api_resources/test_threads.py +129 -1
- aiinbx-0.1.0/.release-please-manifest.json +0 -3
- aiinbx-0.1.0/CHANGELOG.md +0 -15
- {aiinbx-0.1.0 → aiinbx-0.2.0}/.gitignore +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/CONTRIBUTING.md +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/LICENSE +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/README.md +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/SECURITY.md +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/bin/check-release-environment +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/bin/publish-pypi +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/examples/.keep +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/mypy.ini +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/noxfile.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/release-please-config.json +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/requirements-dev.lock +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/requirements.lock +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/ai_inbx/lib/.keep +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/__init__.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_base_client.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_client.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_compat.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_constants.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_exceptions.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_files.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_qs.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_resource.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_response.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_streaming.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_types.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_utils/__init__.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_utils/_logs.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_utils/_proxy.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_utils/_reflection.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_utils/_resources_proxy.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_utils/_streams.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_utils/_sync.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_utils/_transform.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_utils/_typing.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/_utils/_utils.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/lib/.keep +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/py.typed +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/resources/__init__.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/resources/emails.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/types/email_reply_params.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/types/email_reply_response.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/types/email_retrieve_response.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/types/email_send_params.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/types/email_send_response.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/types/thread_retrieve_response.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/types/thread_search_params.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/src/aiinbx/types/thread_search_response.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/__init__.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/api_resources/__init__.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/api_resources/test_emails.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/conftest.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/sample_file.txt +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/test_client.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/test_deepcopy.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/test_extract_files.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/test_files.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/test_models.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/test_qs.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/test_required_args.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/test_response.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/test_streaming.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/test_transform.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/test_utils/test_proxy.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/test_utils/test_typing.py +0 -0
- {aiinbx-0.1.0 → aiinbx-0.2.0}/tests/utils.py +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.0 (2025-08-28)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.1...v0.2.0](https://github.com/aiinbx/aiinbx-py/compare/v0.1.1...v0.2.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([f4e60fe](https://github.com/aiinbx/aiinbx-py/commit/f4e60fed47de83248dbcef3cd28590643c0b9bff))
|
|
10
|
+
|
|
11
|
+
## 0.1.1 (2025-08-27)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.1.0...v0.1.1](https://github.com/aiinbx/aiinbx-py/compare/v0.1.0...v0.1.1)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* avoid newer type syntax ([85f2191](https://github.com/aiinbx/aiinbx-py/commit/85f21914439dbd7e3ef751a1010eaf023b33ef70))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
|
|
22
|
+
* **internal:** change ci workflow machines ([7e210c5](https://github.com/aiinbx/aiinbx-py/commit/7e210c590a8a7659cbbf3f087b869ca580bd9b1b))
|
|
23
|
+
* **internal:** update pyright exclude list ([a4d4c96](https://github.com/aiinbx/aiinbx-py/commit/a4d4c9626f42577c535516072216bc82c6b2d551))
|
|
24
|
+
* update github action ([d06abee](https://github.com/aiinbx/aiinbx-py/commit/d06abee5f995ce020da7ab44160eaab348c8c18a))
|
|
25
|
+
|
|
26
|
+
## 0.1.0 (2025-08-13)
|
|
27
|
+
|
|
28
|
+
Full Changelog: [v0.0.1...v0.1.0](https://github.com/aiinbx/aiinbx-py/compare/v0.0.1...v0.1.0)
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
* **api:** manual updates ([9f338c0](https://github.com/aiinbx/aiinbx-py/commit/9f338c08cf76e9482a9529c761654cdd250483ea))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Chores
|
|
36
|
+
|
|
37
|
+
* configure new SDK language ([3cc34fc](https://github.com/aiinbx/aiinbx-py/commit/3cc34fcf8b0325986076726a774c419992b5aafa))
|
|
38
|
+
* update SDK settings ([9251ee7](https://github.com/aiinbx/aiinbx-py/commit/9251ee7b47185255692e59f672e6158f4af32541))
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
Types:
|
|
4
4
|
|
|
5
5
|
```python
|
|
6
|
-
from aiinbx.types import ThreadRetrieveResponse, ThreadSearchResponse
|
|
6
|
+
from aiinbx.types import ThreadRetrieveResponse, ThreadForwardResponse, ThreadSearchResponse
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Methods:
|
|
10
10
|
|
|
11
11
|
- <code title="get /threads/{threadId}">client.threads.<a href="./src/aiinbx/resources/threads.py">retrieve</a>(thread_id) -> <a href="./src/aiinbx/types/thread_retrieve_response.py">ThreadRetrieveResponse</a></code>
|
|
12
|
+
- <code title="post /threads/{threadId}/forward">client.threads.<a href="./src/aiinbx/resources/threads.py">forward</a>(thread_id, \*\*<a href="src/aiinbx/types/thread_forward_params.py">params</a>) -> <a href="./src/aiinbx/types/thread_forward_response.py">ThreadForwardResponse</a></code>
|
|
12
13
|
- <code title="post /threads/search">client.threads.<a href="./src/aiinbx/resources/threads.py">search</a>(\*\*<a href="src/aiinbx/types/thread_search_params.py">params</a>) -> <a href="./src/aiinbx/types/thread_search_response.py">ThreadSearchResponse</a></code>
|
|
13
14
|
|
|
14
15
|
# Emails
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "aiinbx"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.2.0"
|
|
4
4
|
description = "The official Python library for the AIInbx API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -148,6 +148,7 @@ exclude = [
|
|
|
148
148
|
"_dev",
|
|
149
149
|
".venv",
|
|
150
150
|
".nox",
|
|
151
|
+
".git",
|
|
151
152
|
]
|
|
152
153
|
|
|
153
154
|
reportImplicitOverride = true
|
|
@@ -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(
|
|
@@ -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
|
)
|
|
@@ -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")
|
|
@@ -9,7 +9,11 @@ import pytest
|
|
|
9
9
|
|
|
10
10
|
from aiinbx import AIInbx, AsyncAIInbx
|
|
11
11
|
from tests.utils import assert_matches_type
|
|
12
|
-
from aiinbx.types import
|
|
12
|
+
from aiinbx.types import (
|
|
13
|
+
ThreadSearchResponse,
|
|
14
|
+
ThreadForwardResponse,
|
|
15
|
+
ThreadRetrieveResponse,
|
|
16
|
+
)
|
|
13
17
|
|
|
14
18
|
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
|
|
15
19
|
|
|
@@ -59,6 +63,68 @@ class TestThreads:
|
|
|
59
63
|
"",
|
|
60
64
|
)
|
|
61
65
|
|
|
66
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
67
|
+
@parametrize
|
|
68
|
+
def test_method_forward(self, client: AIInbx) -> None:
|
|
69
|
+
thread = client.threads.forward(
|
|
70
|
+
thread_id="threadId",
|
|
71
|
+
to="dev@stainless.com",
|
|
72
|
+
)
|
|
73
|
+
assert_matches_type(ThreadForwardResponse, thread, path=["response"])
|
|
74
|
+
|
|
75
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
76
|
+
@parametrize
|
|
77
|
+
def test_method_forward_with_all_params(self, client: AIInbx) -> None:
|
|
78
|
+
thread = client.threads.forward(
|
|
79
|
+
thread_id="threadId",
|
|
80
|
+
to="dev@stainless.com",
|
|
81
|
+
bcc="dev@stainless.com",
|
|
82
|
+
cc="dev@stainless.com",
|
|
83
|
+
from_="dev@stainless.com",
|
|
84
|
+
from_name="from_name",
|
|
85
|
+
include_attachments=True,
|
|
86
|
+
is_draft=True,
|
|
87
|
+
note="note",
|
|
88
|
+
)
|
|
89
|
+
assert_matches_type(ThreadForwardResponse, thread, path=["response"])
|
|
90
|
+
|
|
91
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
92
|
+
@parametrize
|
|
93
|
+
def test_raw_response_forward(self, client: AIInbx) -> None:
|
|
94
|
+
response = client.threads.with_raw_response.forward(
|
|
95
|
+
thread_id="threadId",
|
|
96
|
+
to="dev@stainless.com",
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
assert response.is_closed is True
|
|
100
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
101
|
+
thread = response.parse()
|
|
102
|
+
assert_matches_type(ThreadForwardResponse, thread, path=["response"])
|
|
103
|
+
|
|
104
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
105
|
+
@parametrize
|
|
106
|
+
def test_streaming_response_forward(self, client: AIInbx) -> None:
|
|
107
|
+
with client.threads.with_streaming_response.forward(
|
|
108
|
+
thread_id="threadId",
|
|
109
|
+
to="dev@stainless.com",
|
|
110
|
+
) as response:
|
|
111
|
+
assert not response.is_closed
|
|
112
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
113
|
+
|
|
114
|
+
thread = response.parse()
|
|
115
|
+
assert_matches_type(ThreadForwardResponse, thread, path=["response"])
|
|
116
|
+
|
|
117
|
+
assert cast(Any, response.is_closed) is True
|
|
118
|
+
|
|
119
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
120
|
+
@parametrize
|
|
121
|
+
def test_path_params_forward(self, client: AIInbx) -> None:
|
|
122
|
+
with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"):
|
|
123
|
+
client.threads.with_raw_response.forward(
|
|
124
|
+
thread_id="",
|
|
125
|
+
to="dev@stainless.com",
|
|
126
|
+
)
|
|
127
|
+
|
|
62
128
|
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
63
129
|
@parametrize
|
|
64
130
|
def test_method_search(self, client: AIInbx) -> None:
|
|
@@ -158,6 +224,68 @@ class TestAsyncThreads:
|
|
|
158
224
|
"",
|
|
159
225
|
)
|
|
160
226
|
|
|
227
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
228
|
+
@parametrize
|
|
229
|
+
async def test_method_forward(self, async_client: AsyncAIInbx) -> None:
|
|
230
|
+
thread = await async_client.threads.forward(
|
|
231
|
+
thread_id="threadId",
|
|
232
|
+
to="dev@stainless.com",
|
|
233
|
+
)
|
|
234
|
+
assert_matches_type(ThreadForwardResponse, thread, path=["response"])
|
|
235
|
+
|
|
236
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
237
|
+
@parametrize
|
|
238
|
+
async def test_method_forward_with_all_params(self, async_client: AsyncAIInbx) -> None:
|
|
239
|
+
thread = await async_client.threads.forward(
|
|
240
|
+
thread_id="threadId",
|
|
241
|
+
to="dev@stainless.com",
|
|
242
|
+
bcc="dev@stainless.com",
|
|
243
|
+
cc="dev@stainless.com",
|
|
244
|
+
from_="dev@stainless.com",
|
|
245
|
+
from_name="from_name",
|
|
246
|
+
include_attachments=True,
|
|
247
|
+
is_draft=True,
|
|
248
|
+
note="note",
|
|
249
|
+
)
|
|
250
|
+
assert_matches_type(ThreadForwardResponse, thread, path=["response"])
|
|
251
|
+
|
|
252
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
253
|
+
@parametrize
|
|
254
|
+
async def test_raw_response_forward(self, async_client: AsyncAIInbx) -> None:
|
|
255
|
+
response = await async_client.threads.with_raw_response.forward(
|
|
256
|
+
thread_id="threadId",
|
|
257
|
+
to="dev@stainless.com",
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
assert response.is_closed is True
|
|
261
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
262
|
+
thread = await response.parse()
|
|
263
|
+
assert_matches_type(ThreadForwardResponse, thread, path=["response"])
|
|
264
|
+
|
|
265
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
266
|
+
@parametrize
|
|
267
|
+
async def test_streaming_response_forward(self, async_client: AsyncAIInbx) -> None:
|
|
268
|
+
async with async_client.threads.with_streaming_response.forward(
|
|
269
|
+
thread_id="threadId",
|
|
270
|
+
to="dev@stainless.com",
|
|
271
|
+
) as response:
|
|
272
|
+
assert not response.is_closed
|
|
273
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
274
|
+
|
|
275
|
+
thread = await response.parse()
|
|
276
|
+
assert_matches_type(ThreadForwardResponse, thread, path=["response"])
|
|
277
|
+
|
|
278
|
+
assert cast(Any, response.is_closed) is True
|
|
279
|
+
|
|
280
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
281
|
+
@parametrize
|
|
282
|
+
async def test_path_params_forward(self, async_client: AsyncAIInbx) -> None:
|
|
283
|
+
with pytest.raises(ValueError, match=r"Expected a non-empty value for `thread_id` but received ''"):
|
|
284
|
+
await async_client.threads.with_raw_response.forward(
|
|
285
|
+
thread_id="",
|
|
286
|
+
to="dev@stainless.com",
|
|
287
|
+
)
|
|
288
|
+
|
|
161
289
|
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
162
290
|
@parametrize
|
|
163
291
|
async def test_method_search(self, async_client: AsyncAIInbx) -> None:
|
aiinbx-0.1.0/CHANGELOG.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## 0.1.0 (2025-08-13)
|
|
4
|
-
|
|
5
|
-
Full Changelog: [v0.0.1...v0.1.0](https://github.com/aiinbx/aiinbx-py/compare/v0.0.1...v0.1.0)
|
|
6
|
-
|
|
7
|
-
### Features
|
|
8
|
-
|
|
9
|
-
* **api:** manual updates ([9f338c0](https://github.com/aiinbx/aiinbx-py/commit/9f338c08cf76e9482a9529c761654cdd250483ea))
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
### Chores
|
|
13
|
-
|
|
14
|
-
* configure new SDK language ([3cc34fc](https://github.com/aiinbx/aiinbx-py/commit/3cc34fcf8b0325986076726a774c419992b5aafa))
|
|
15
|
-
* update SDK settings ([9251ee7](https://github.com/aiinbx/aiinbx-py/commit/9251ee7b47185255692e59f672e6158f4af32541))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|