aiinbx 0.3.0__tar.gz → 0.5.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.
- aiinbx-0.5.0/.release-please-manifest.json +3 -0
- aiinbx-0.5.0/CHANGELOG.md +79 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/PKG-INFO +1 -1
- aiinbx-0.5.0/api.md +78 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/pyproject.toml +57 -2
- {aiinbx-0.3.0 → aiinbx-0.5.0}/requirements-dev.lock +5 -3
- {aiinbx-0.3.0 → aiinbx-0.5.0}/requirements.lock +5 -2
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/__init__.py +3 -1
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_base_client.py +12 -12
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_client.py +29 -9
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_compat.py +48 -48
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_models.py +50 -44
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_qs.py +7 -7
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_types.py +53 -12
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_utils/__init__.py +9 -2
- aiinbx-0.5.0/src/aiinbx/_utils/_compat.py +45 -0
- aiinbx-0.5.0/src/aiinbx/_utils/_datetime_parse.py +136 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_utils/_transform.py +13 -3
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_utils/_typing.py +6 -1
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_utils/_utils.py +4 -5
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_version.py +1 -1
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/resources/__init__.py +31 -0
- aiinbx-0.5.0/src/aiinbx/resources/domains.py +455 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/resources/emails.py +44 -44
- aiinbx-0.5.0/src/aiinbx/resources/meta.py +147 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/resources/threads.py +56 -56
- aiinbx-0.5.0/src/aiinbx/resources/webhooks.py +34 -0
- aiinbx-0.5.0/src/aiinbx/types/__init__.py +35 -0
- aiinbx-0.5.0/src/aiinbx/types/domain_create_params.py +11 -0
- aiinbx-0.5.0/src/aiinbx/types/domain_create_response.py +26 -0
- aiinbx-0.5.0/src/aiinbx/types/domain_delete_response.py +11 -0
- aiinbx-0.5.0/src/aiinbx/types/domain_list_response.py +48 -0
- aiinbx-0.5.0/src/aiinbx/types/domain_retrieve_response.py +44 -0
- aiinbx-0.5.0/src/aiinbx/types/domain_verify_response.py +147 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/types/email_reply_params.py +5 -4
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/types/email_send_params.py +7 -6
- aiinbx-0.5.0/src/aiinbx/types/inbound_email_received_webhook_event.py +113 -0
- aiinbx-0.5.0/src/aiinbx/types/meta_webhooks_schema_response.py +298 -0
- aiinbx-0.5.0/src/aiinbx/types/outbound_email_bounced_webhook_event.py +44 -0
- aiinbx-0.5.0/src/aiinbx/types/outbound_email_clicked_webhook_event.py +36 -0
- aiinbx-0.5.0/src/aiinbx/types/outbound_email_complained_webhook_event.py +36 -0
- aiinbx-0.5.0/src/aiinbx/types/outbound_email_delivered_webhook_event.py +36 -0
- aiinbx-0.5.0/src/aiinbx/types/outbound_email_opened_webhook_event.py +32 -0
- aiinbx-0.5.0/src/aiinbx/types/outbound_email_rejected_webhook_event.py +30 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/types/thread_forward_params.py +5 -4
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/types/thread_search_params.py +2 -2
- aiinbx-0.5.0/src/aiinbx/types/unwrap_webhook_event.py +24 -0
- aiinbx-0.5.0/tests/api_resources/test_domains.py +406 -0
- aiinbx-0.5.0/tests/api_resources/test_meta.py +80 -0
- aiinbx-0.5.0/tests/api_resources/test_webhooks.py +19 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/test_client.py +6 -47
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/test_models.py +24 -24
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/test_transform.py +17 -10
- aiinbx-0.5.0/tests/test_utils/test_datetime_parse.py +110 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/utils.py +13 -5
- aiinbx-0.3.0/.release-please-manifest.json +0 -3
- aiinbx-0.3.0/CHANGELOG.md +0 -46
- aiinbx-0.3.0/api.md +0 -27
- aiinbx-0.3.0/mypy.ini +0 -50
- aiinbx-0.3.0/src/aiinbx/types/__init__.py +0 -14
- {aiinbx-0.3.0 → aiinbx-0.5.0}/.gitignore +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/CONTRIBUTING.md +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/LICENSE +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/README.md +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/SECURITY.md +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/bin/check-release-environment +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/bin/publish-pypi +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/examples/.keep +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/noxfile.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/release-please-config.json +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/ai_inbx/lib/.keep +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_constants.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_exceptions.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_files.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_resource.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_response.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_streaming.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_utils/_logs.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_utils/_proxy.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_utils/_reflection.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_utils/_resources_proxy.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_utils/_streams.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/_utils/_sync.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/lib/.keep +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/py.typed +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/types/email_reply_response.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/types/email_retrieve_response.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/types/email_send_response.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/types/thread_forward_response.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/types/thread_retrieve_response.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/src/aiinbx/types/thread_search_response.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/__init__.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/api_resources/__init__.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/api_resources/test_emails.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/api_resources/test_threads.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/conftest.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/sample_file.txt +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/test_deepcopy.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/test_extract_files.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/test_files.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/test_qs.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/test_required_args.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/test_response.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/test_streaming.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/test_utils/test_proxy.py +0 -0
- {aiinbx-0.3.0 → aiinbx-0.5.0}/tests/test_utils/test_typing.py +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.5.0 (2025-10-15)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.4.0...v0.5.0](https://github.com/aiinbx/aiinbx-py/compare/v0.4.0...v0.5.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([ddacc81](https://github.com/aiinbx/aiinbx-py/commit/ddacc8158fd4079c1ee4b8ae04f89f22e2fcd46a))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* **internal:** detect missing future annotations with ruff ([6f6a3da](https://github.com/aiinbx/aiinbx-py/commit/6f6a3da5978b34e1a2959b38715d4311474f1c5e))
|
|
15
|
+
|
|
16
|
+
## 0.4.0 (2025-10-05)
|
|
17
|
+
|
|
18
|
+
Full Changelog: [v0.3.0...v0.4.0](https://github.com/aiinbx/aiinbx-py/compare/v0.3.0...v0.4.0)
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **api:** manual updates ([601d5ea](https://github.com/aiinbx/aiinbx-py/commit/601d5eade9216549a200c26584a2cc18176835fd))
|
|
23
|
+
* improve future compat with pydantic v3 ([dcc1c80](https://github.com/aiinbx/aiinbx-py/commit/dcc1c804ec998e7948395f7c1ea3aac371a539fb))
|
|
24
|
+
* **types:** replace List[str] with SequenceNotStr in params ([a31a999](https://github.com/aiinbx/aiinbx-py/commit/a31a999a8dd553a067fdd4368d147f773418dc02))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Chores
|
|
28
|
+
|
|
29
|
+
* do not install brew dependencies in ./scripts/bootstrap by default ([b4c08e3](https://github.com/aiinbx/aiinbx-py/commit/b4c08e37dfa25b784a2cd7d5e9778f3318c365b9))
|
|
30
|
+
* **internal:** add Sequence related utils ([879c21a](https://github.com/aiinbx/aiinbx-py/commit/879c21ac262c2c10c0e1bfa03d5d1c40470f889b))
|
|
31
|
+
* **internal:** move mypy configurations to `pyproject.toml` file ([3108a79](https://github.com/aiinbx/aiinbx-py/commit/3108a794e35f868d1e21a210abbda837eecc64d1))
|
|
32
|
+
* **internal:** update pydantic dependency ([6dcd694](https://github.com/aiinbx/aiinbx-py/commit/6dcd694e2ab6b8246892ebef85e95bff9b0338a9))
|
|
33
|
+
* **tests:** simplify `get_platform` test ([0f14d8c](https://github.com/aiinbx/aiinbx-py/commit/0f14d8cd43342f3fda7ccda30717c01d20679593))
|
|
34
|
+
* **types:** change optional parameter type from NotGiven to Omit ([1b12faa](https://github.com/aiinbx/aiinbx-py/commit/1b12faa48dbcc8fedf5dc8e4a410c58fcfac7853))
|
|
35
|
+
|
|
36
|
+
## 0.3.0 (2025-08-28)
|
|
37
|
+
|
|
38
|
+
Full Changelog: [v0.2.0...v0.3.0](https://github.com/aiinbx/aiinbx-py/compare/v0.2.0...v0.3.0)
|
|
39
|
+
|
|
40
|
+
### Features
|
|
41
|
+
|
|
42
|
+
* **api:** api update ([2de3cb7](https://github.com/aiinbx/aiinbx-py/commit/2de3cb73d4178e81925fd6d04b3683b81e7da30d))
|
|
43
|
+
|
|
44
|
+
## 0.2.0 (2025-08-28)
|
|
45
|
+
|
|
46
|
+
Full Changelog: [v0.1.1...v0.2.0](https://github.com/aiinbx/aiinbx-py/compare/v0.1.1...v0.2.0)
|
|
47
|
+
|
|
48
|
+
### Features
|
|
49
|
+
|
|
50
|
+
* **api:** manual updates ([f4e60fe](https://github.com/aiinbx/aiinbx-py/commit/f4e60fed47de83248dbcef3cd28590643c0b9bff))
|
|
51
|
+
|
|
52
|
+
## 0.1.1 (2025-08-27)
|
|
53
|
+
|
|
54
|
+
Full Changelog: [v0.1.0...v0.1.1](https://github.com/aiinbx/aiinbx-py/compare/v0.1.0...v0.1.1)
|
|
55
|
+
|
|
56
|
+
### Bug Fixes
|
|
57
|
+
|
|
58
|
+
* avoid newer type syntax ([85f2191](https://github.com/aiinbx/aiinbx-py/commit/85f21914439dbd7e3ef751a1010eaf023b33ef70))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### Chores
|
|
62
|
+
|
|
63
|
+
* **internal:** change ci workflow machines ([7e210c5](https://github.com/aiinbx/aiinbx-py/commit/7e210c590a8a7659cbbf3f087b869ca580bd9b1b))
|
|
64
|
+
* **internal:** update pyright exclude list ([a4d4c96](https://github.com/aiinbx/aiinbx-py/commit/a4d4c9626f42577c535516072216bc82c6b2d551))
|
|
65
|
+
* update github action ([d06abee](https://github.com/aiinbx/aiinbx-py/commit/d06abee5f995ce020da7ab44160eaab348c8c18a))
|
|
66
|
+
|
|
67
|
+
## 0.1.0 (2025-08-13)
|
|
68
|
+
|
|
69
|
+
Full Changelog: [v0.0.1...v0.1.0](https://github.com/aiinbx/aiinbx-py/compare/v0.0.1...v0.1.0)
|
|
70
|
+
|
|
71
|
+
### Features
|
|
72
|
+
|
|
73
|
+
* **api:** manual updates ([9f338c0](https://github.com/aiinbx/aiinbx-py/commit/9f338c08cf76e9482a9529c761654cdd250483ea))
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### Chores
|
|
77
|
+
|
|
78
|
+
* configure new SDK language ([3cc34fc](https://github.com/aiinbx/aiinbx-py/commit/3cc34fcf8b0325986076726a774c419992b5aafa))
|
|
79
|
+
* update SDK settings ([9251ee7](https://github.com/aiinbx/aiinbx-py/commit/9251ee7b47185255692e59f672e6158f4af32541))
|
aiinbx-0.5.0/api.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Threads
|
|
2
|
+
|
|
3
|
+
Types:
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
from aiinbx.types import ThreadRetrieveResponse, ThreadForwardResponse, ThreadSearchResponse
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Methods:
|
|
10
|
+
|
|
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>
|
|
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>
|
|
14
|
+
|
|
15
|
+
# Emails
|
|
16
|
+
|
|
17
|
+
Types:
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from aiinbx.types import EmailRetrieveResponse, EmailReplyResponse, EmailSendResponse
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Methods:
|
|
24
|
+
|
|
25
|
+
- <code title="get /emails/{emailId}">client.emails.<a href="./src/aiinbx/resources/emails.py">retrieve</a>(email_id) -> <a href="./src/aiinbx/types/email_retrieve_response.py">EmailRetrieveResponse</a></code>
|
|
26
|
+
- <code title="post /emails/{emailId}/reply">client.emails.<a href="./src/aiinbx/resources/emails.py">reply</a>(email_id, \*\*<a href="src/aiinbx/types/email_reply_params.py">params</a>) -> <a href="./src/aiinbx/types/email_reply_response.py">EmailReplyResponse</a></code>
|
|
27
|
+
- <code title="post /emails/send">client.emails.<a href="./src/aiinbx/resources/emails.py">send</a>(\*\*<a href="src/aiinbx/types/email_send_params.py">params</a>) -> <a href="./src/aiinbx/types/email_send_response.py">EmailSendResponse</a></code>
|
|
28
|
+
|
|
29
|
+
# Domains
|
|
30
|
+
|
|
31
|
+
Types:
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
from aiinbx.types import (
|
|
35
|
+
DomainCreateResponse,
|
|
36
|
+
DomainRetrieveResponse,
|
|
37
|
+
DomainListResponse,
|
|
38
|
+
DomainDeleteResponse,
|
|
39
|
+
DomainVerifyResponse,
|
|
40
|
+
)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Methods:
|
|
44
|
+
|
|
45
|
+
- <code title="post /domains">client.domains.<a href="./src/aiinbx/resources/domains.py">create</a>(\*\*<a href="src/aiinbx/types/domain_create_params.py">params</a>) -> <a href="./src/aiinbx/types/domain_create_response.py">DomainCreateResponse</a></code>
|
|
46
|
+
- <code title="get /domains/{domainId}">client.domains.<a href="./src/aiinbx/resources/domains.py">retrieve</a>(domain_id) -> <a href="./src/aiinbx/types/domain_retrieve_response.py">DomainRetrieveResponse</a></code>
|
|
47
|
+
- <code title="get /domains">client.domains.<a href="./src/aiinbx/resources/domains.py">list</a>() -> <a href="./src/aiinbx/types/domain_list_response.py">DomainListResponse</a></code>
|
|
48
|
+
- <code title="delete /domains/{domainId}">client.domains.<a href="./src/aiinbx/resources/domains.py">delete</a>(domain_id) -> <a href="./src/aiinbx/types/domain_delete_response.py">DomainDeleteResponse</a></code>
|
|
49
|
+
- <code title="post /domains/{domainId}/verify">client.domains.<a href="./src/aiinbx/resources/domains.py">verify</a>(domain_id) -> <a href="./src/aiinbx/types/domain_verify_response.py">DomainVerifyResponse</a></code>
|
|
50
|
+
|
|
51
|
+
# Webhooks
|
|
52
|
+
|
|
53
|
+
Types:
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
from aiinbx.types import (
|
|
57
|
+
InboundEmailReceivedWebhookEvent,
|
|
58
|
+
OutboundEmailDeliveredWebhookEvent,
|
|
59
|
+
OutboundEmailBouncedWebhookEvent,
|
|
60
|
+
OutboundEmailComplainedWebhookEvent,
|
|
61
|
+
OutboundEmailRejectedWebhookEvent,
|
|
62
|
+
OutboundEmailOpenedWebhookEvent,
|
|
63
|
+
OutboundEmailClickedWebhookEvent,
|
|
64
|
+
UnwrapWebhookEvent,
|
|
65
|
+
)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
# Meta
|
|
69
|
+
|
|
70
|
+
Types:
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
from aiinbx.types import MetaWebhooksSchemaResponse
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Methods:
|
|
77
|
+
|
|
78
|
+
- <code title="get /_meta/webhooks">client.meta.<a href="./src/aiinbx/resources/meta.py">webhooks_schema</a>() -> <a href="./src/aiinbx/types/meta_webhooks_schema_response.py">MetaWebhooksSchemaResponse</a></code>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "aiinbx"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.5.0"
|
|
4
4
|
description = "The official Python library for the AIInbx API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -56,7 +56,6 @@ dev-dependencies = [
|
|
|
56
56
|
"dirty-equals>=0.6.0",
|
|
57
57
|
"importlib-metadata>=6.7.0",
|
|
58
58
|
"rich>=13.7.1",
|
|
59
|
-
"nest_asyncio==1.6.0",
|
|
60
59
|
"pytest-xdist>=3.6.1",
|
|
61
60
|
]
|
|
62
61
|
|
|
@@ -157,6 +156,58 @@ reportOverlappingOverload = false
|
|
|
157
156
|
reportImportCycles = false
|
|
158
157
|
reportPrivateUsage = false
|
|
159
158
|
|
|
159
|
+
[tool.mypy]
|
|
160
|
+
pretty = true
|
|
161
|
+
show_error_codes = true
|
|
162
|
+
|
|
163
|
+
# Exclude _files.py because mypy isn't smart enough to apply
|
|
164
|
+
# the correct type narrowing and as this is an internal module
|
|
165
|
+
# it's fine to just use Pyright.
|
|
166
|
+
#
|
|
167
|
+
# We also exclude our `tests` as mypy doesn't always infer
|
|
168
|
+
# types correctly and Pyright will still catch any type errors.
|
|
169
|
+
exclude = ['src/aiinbx/_files.py', '_dev/.*.py', 'tests/.*']
|
|
170
|
+
|
|
171
|
+
strict_equality = true
|
|
172
|
+
implicit_reexport = true
|
|
173
|
+
check_untyped_defs = true
|
|
174
|
+
no_implicit_optional = true
|
|
175
|
+
|
|
176
|
+
warn_return_any = true
|
|
177
|
+
warn_unreachable = true
|
|
178
|
+
warn_unused_configs = true
|
|
179
|
+
|
|
180
|
+
# Turn these options off as it could cause conflicts
|
|
181
|
+
# with the Pyright options.
|
|
182
|
+
warn_unused_ignores = false
|
|
183
|
+
warn_redundant_casts = false
|
|
184
|
+
|
|
185
|
+
disallow_any_generics = true
|
|
186
|
+
disallow_untyped_defs = true
|
|
187
|
+
disallow_untyped_calls = true
|
|
188
|
+
disallow_subclassing_any = true
|
|
189
|
+
disallow_incomplete_defs = true
|
|
190
|
+
disallow_untyped_decorators = true
|
|
191
|
+
cache_fine_grained = true
|
|
192
|
+
|
|
193
|
+
# By default, mypy reports an error if you assign a value to the result
|
|
194
|
+
# of a function call that doesn't return anything. We do this in our test
|
|
195
|
+
# cases:
|
|
196
|
+
# ```
|
|
197
|
+
# result = ...
|
|
198
|
+
# assert result is None
|
|
199
|
+
# ```
|
|
200
|
+
# Changing this codegen to make mypy happy would increase complexity
|
|
201
|
+
# and would not be worth it.
|
|
202
|
+
disable_error_code = "func-returns-value,overload-cannot-match"
|
|
203
|
+
|
|
204
|
+
# https://github.com/python/mypy/issues/12162
|
|
205
|
+
[[tool.mypy.overrides]]
|
|
206
|
+
module = "black.files.*"
|
|
207
|
+
ignore_errors = true
|
|
208
|
+
ignore_missing_imports = true
|
|
209
|
+
|
|
210
|
+
|
|
160
211
|
[tool.ruff]
|
|
161
212
|
line-length = 120
|
|
162
213
|
output-format = "grouped"
|
|
@@ -173,6 +224,8 @@ select = [
|
|
|
173
224
|
"B",
|
|
174
225
|
# remove unused imports
|
|
175
226
|
"F401",
|
|
227
|
+
# check for missing future annotations
|
|
228
|
+
"FA102",
|
|
176
229
|
# bare except statements
|
|
177
230
|
"E722",
|
|
178
231
|
# unused arguments
|
|
@@ -195,6 +248,8 @@ unfixable = [
|
|
|
195
248
|
"T203",
|
|
196
249
|
]
|
|
197
250
|
|
|
251
|
+
extend-safe-fixes = ["FA102"]
|
|
252
|
+
|
|
198
253
|
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
|
199
254
|
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"
|
|
200
255
|
|
|
@@ -75,7 +75,6 @@ multidict==6.4.4
|
|
|
75
75
|
mypy==1.14.1
|
|
76
76
|
mypy-extensions==1.0.0
|
|
77
77
|
# via mypy
|
|
78
|
-
nest-asyncio==1.6.0
|
|
79
78
|
nodeenv==1.8.0
|
|
80
79
|
# via pyright
|
|
81
80
|
nox==2023.4.22
|
|
@@ -89,9 +88,9 @@ pluggy==1.5.0
|
|
|
89
88
|
propcache==0.3.1
|
|
90
89
|
# via aiohttp
|
|
91
90
|
# via yarl
|
|
92
|
-
pydantic==2.
|
|
91
|
+
pydantic==2.11.9
|
|
93
92
|
# via aiinbx
|
|
94
|
-
pydantic-core==2.
|
|
93
|
+
pydantic-core==2.33.2
|
|
95
94
|
# via pydantic
|
|
96
95
|
pygments==2.18.0
|
|
97
96
|
# via rich
|
|
@@ -127,6 +126,9 @@ typing-extensions==4.12.2
|
|
|
127
126
|
# via pydantic
|
|
128
127
|
# via pydantic-core
|
|
129
128
|
# via pyright
|
|
129
|
+
# via typing-inspection
|
|
130
|
+
typing-inspection==0.4.1
|
|
131
|
+
# via pydantic
|
|
130
132
|
virtualenv==20.24.5
|
|
131
133
|
# via nox
|
|
132
134
|
yarl==1.20.0
|
|
@@ -55,9 +55,9 @@ multidict==6.4.4
|
|
|
55
55
|
propcache==0.3.1
|
|
56
56
|
# via aiohttp
|
|
57
57
|
# via yarl
|
|
58
|
-
pydantic==2.
|
|
58
|
+
pydantic==2.11.9
|
|
59
59
|
# via aiinbx
|
|
60
|
-
pydantic-core==2.
|
|
60
|
+
pydantic-core==2.33.2
|
|
61
61
|
# via pydantic
|
|
62
62
|
sniffio==1.3.0
|
|
63
63
|
# via aiinbx
|
|
@@ -68,5 +68,8 @@ typing-extensions==4.12.2
|
|
|
68
68
|
# via multidict
|
|
69
69
|
# via pydantic
|
|
70
70
|
# via pydantic-core
|
|
71
|
+
# via typing-inspection
|
|
72
|
+
typing-inspection==0.4.1
|
|
73
|
+
# via pydantic
|
|
71
74
|
yarl==1.20.0
|
|
72
75
|
# via aiohttp
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import typing as _t
|
|
4
4
|
|
|
5
5
|
from . import types
|
|
6
|
-
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
|
|
6
|
+
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given
|
|
7
7
|
from ._utils import file_from_path
|
|
8
8
|
from ._client import AIInbx, Client, Stream, Timeout, Transport, AsyncAIInbx, AsyncClient, AsyncStream, RequestOptions
|
|
9
9
|
from ._models import BaseModel
|
|
@@ -38,7 +38,9 @@ __all__ = [
|
|
|
38
38
|
"ProxiesTypes",
|
|
39
39
|
"NotGiven",
|
|
40
40
|
"NOT_GIVEN",
|
|
41
|
+
"not_given",
|
|
41
42
|
"Omit",
|
|
43
|
+
"omit",
|
|
42
44
|
"AIInbxError",
|
|
43
45
|
"APIError",
|
|
44
46
|
"APIStatusError",
|
|
@@ -42,7 +42,6 @@ from . import _exceptions
|
|
|
42
42
|
from ._qs import Querystring
|
|
43
43
|
from ._files import to_httpx_files, async_to_httpx_files
|
|
44
44
|
from ._types import (
|
|
45
|
-
NOT_GIVEN,
|
|
46
45
|
Body,
|
|
47
46
|
Omit,
|
|
48
47
|
Query,
|
|
@@ -57,9 +56,10 @@ from ._types import (
|
|
|
57
56
|
RequestOptions,
|
|
58
57
|
HttpxRequestFiles,
|
|
59
58
|
ModelBuilderProtocol,
|
|
59
|
+
not_given,
|
|
60
60
|
)
|
|
61
61
|
from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
|
|
62
|
-
from ._compat import
|
|
62
|
+
from ._compat import PYDANTIC_V1, model_copy, model_dump
|
|
63
63
|
from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type
|
|
64
64
|
from ._response import (
|
|
65
65
|
APIResponse,
|
|
@@ -145,9 +145,9 @@ class PageInfo:
|
|
|
145
145
|
def __init__(
|
|
146
146
|
self,
|
|
147
147
|
*,
|
|
148
|
-
url: URL | NotGiven =
|
|
149
|
-
json: Body | NotGiven =
|
|
150
|
-
params: Query | NotGiven =
|
|
148
|
+
url: URL | NotGiven = not_given,
|
|
149
|
+
json: Body | NotGiven = not_given,
|
|
150
|
+
params: Query | NotGiven = not_given,
|
|
151
151
|
) -> None:
|
|
152
152
|
self.url = url
|
|
153
153
|
self.json = json
|
|
@@ -232,7 +232,7 @@ class BaseSyncPage(BasePage[_T], Generic[_T]):
|
|
|
232
232
|
model: Type[_T],
|
|
233
233
|
options: FinalRequestOptions,
|
|
234
234
|
) -> None:
|
|
235
|
-
if
|
|
235
|
+
if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None:
|
|
236
236
|
self.__pydantic_private__ = {}
|
|
237
237
|
|
|
238
238
|
self._model = model
|
|
@@ -320,7 +320,7 @@ class BaseAsyncPage(BasePage[_T], Generic[_T]):
|
|
|
320
320
|
client: AsyncAPIClient,
|
|
321
321
|
options: FinalRequestOptions,
|
|
322
322
|
) -> None:
|
|
323
|
-
if
|
|
323
|
+
if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None:
|
|
324
324
|
self.__pydantic_private__ = {}
|
|
325
325
|
|
|
326
326
|
self._model = model
|
|
@@ -595,7 +595,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
595
595
|
# we internally support defining a temporary header to override the
|
|
596
596
|
# default `cast_to` type for use with `.with_raw_response` and `.with_streaming_response`
|
|
597
597
|
# see _response.py for implementation details
|
|
598
|
-
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER,
|
|
598
|
+
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, not_given)
|
|
599
599
|
if is_given(override_cast_to):
|
|
600
600
|
options.headers = headers
|
|
601
601
|
return cast(Type[ResponseT], override_cast_to)
|
|
@@ -825,7 +825,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
825
825
|
version: str,
|
|
826
826
|
base_url: str | URL,
|
|
827
827
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
828
|
-
timeout: float | Timeout | None | NotGiven =
|
|
828
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
829
829
|
http_client: httpx.Client | None = None,
|
|
830
830
|
custom_headers: Mapping[str, str] | None = None,
|
|
831
831
|
custom_query: Mapping[str, object] | None = None,
|
|
@@ -1356,7 +1356,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1356
1356
|
base_url: str | URL,
|
|
1357
1357
|
_strict_response_validation: bool,
|
|
1358
1358
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
1359
|
-
timeout: float | Timeout | None | NotGiven =
|
|
1359
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
1360
1360
|
http_client: httpx.AsyncClient | None = None,
|
|
1361
1361
|
custom_headers: Mapping[str, str] | None = None,
|
|
1362
1362
|
custom_query: Mapping[str, object] | None = None,
|
|
@@ -1818,8 +1818,8 @@ def make_request_options(
|
|
|
1818
1818
|
extra_query: Query | None = None,
|
|
1819
1819
|
extra_body: Body | None = None,
|
|
1820
1820
|
idempotency_key: str | None = None,
|
|
1821
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1822
|
-
post_parser: PostParser | NotGiven =
|
|
1821
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1822
|
+
post_parser: PostParser | NotGiven = not_given,
|
|
1823
1823
|
) -> RequestOptions:
|
|
1824
1824
|
"""Create a dict of type RequestOptions without keys of NotGiven values."""
|
|
1825
1825
|
options: RequestOptions = {}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
-
from typing import Any,
|
|
6
|
+
from typing import Any, Mapping
|
|
7
7
|
from typing_extensions import Self, override
|
|
8
8
|
|
|
9
9
|
import httpx
|
|
@@ -11,17 +11,17 @@ import httpx
|
|
|
11
11
|
from . import _exceptions
|
|
12
12
|
from ._qs import Querystring
|
|
13
13
|
from ._types import (
|
|
14
|
-
NOT_GIVEN,
|
|
15
14
|
Omit,
|
|
16
15
|
Timeout,
|
|
17
16
|
NotGiven,
|
|
18
17
|
Transport,
|
|
19
18
|
ProxiesTypes,
|
|
20
19
|
RequestOptions,
|
|
20
|
+
not_given,
|
|
21
21
|
)
|
|
22
22
|
from ._utils import is_given, get_async_library
|
|
23
23
|
from ._version import __version__
|
|
24
|
-
from .resources import emails, 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 (
|
|
@@ -36,6 +36,9 @@ __all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "AIInbx", "
|
|
|
36
36
|
class AIInbx(SyncAPIClient):
|
|
37
37
|
threads: threads.ThreadsResource
|
|
38
38
|
emails: emails.EmailsResource
|
|
39
|
+
domains: domains.DomainsResource
|
|
40
|
+
webhooks: webhooks.WebhooksResource
|
|
41
|
+
meta: meta.MetaResource
|
|
39
42
|
with_raw_response: AIInbxWithRawResponse
|
|
40
43
|
with_streaming_response: AIInbxWithStreamedResponse
|
|
41
44
|
|
|
@@ -47,7 +50,7 @@ class AIInbx(SyncAPIClient):
|
|
|
47
50
|
*,
|
|
48
51
|
api_key: str | None = None,
|
|
49
52
|
base_url: str | httpx.URL | None = None,
|
|
50
|
-
timeout:
|
|
53
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
51
54
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
52
55
|
default_headers: Mapping[str, str] | None = None,
|
|
53
56
|
default_query: Mapping[str, object] | None = None,
|
|
@@ -95,6 +98,9 @@ class AIInbx(SyncAPIClient):
|
|
|
95
98
|
|
|
96
99
|
self.threads = threads.ThreadsResource(self)
|
|
97
100
|
self.emails = emails.EmailsResource(self)
|
|
101
|
+
self.domains = domains.DomainsResource(self)
|
|
102
|
+
self.webhooks = webhooks.WebhooksResource(self)
|
|
103
|
+
self.meta = meta.MetaResource(self)
|
|
98
104
|
self.with_raw_response = AIInbxWithRawResponse(self)
|
|
99
105
|
self.with_streaming_response = AIInbxWithStreamedResponse(self)
|
|
100
106
|
|
|
@@ -123,9 +129,9 @@ class AIInbx(SyncAPIClient):
|
|
|
123
129
|
*,
|
|
124
130
|
api_key: str | None = None,
|
|
125
131
|
base_url: str | httpx.URL | None = None,
|
|
126
|
-
timeout: float | Timeout | None | NotGiven =
|
|
132
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
127
133
|
http_client: httpx.Client | None = None,
|
|
128
|
-
max_retries: int | NotGiven =
|
|
134
|
+
max_retries: int | NotGiven = not_given,
|
|
129
135
|
default_headers: Mapping[str, str] | None = None,
|
|
130
136
|
set_default_headers: Mapping[str, str] | None = None,
|
|
131
137
|
default_query: Mapping[str, object] | None = None,
|
|
@@ -206,6 +212,9 @@ class AIInbx(SyncAPIClient):
|
|
|
206
212
|
class AsyncAIInbx(AsyncAPIClient):
|
|
207
213
|
threads: threads.AsyncThreadsResource
|
|
208
214
|
emails: emails.AsyncEmailsResource
|
|
215
|
+
domains: domains.AsyncDomainsResource
|
|
216
|
+
webhooks: webhooks.AsyncWebhooksResource
|
|
217
|
+
meta: meta.AsyncMetaResource
|
|
209
218
|
with_raw_response: AsyncAIInbxWithRawResponse
|
|
210
219
|
with_streaming_response: AsyncAIInbxWithStreamedResponse
|
|
211
220
|
|
|
@@ -217,7 +226,7 @@ class AsyncAIInbx(AsyncAPIClient):
|
|
|
217
226
|
*,
|
|
218
227
|
api_key: str | None = None,
|
|
219
228
|
base_url: str | httpx.URL | None = None,
|
|
220
|
-
timeout:
|
|
229
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
221
230
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
222
231
|
default_headers: Mapping[str, str] | None = None,
|
|
223
232
|
default_query: Mapping[str, object] | None = None,
|
|
@@ -265,6 +274,9 @@ class AsyncAIInbx(AsyncAPIClient):
|
|
|
265
274
|
|
|
266
275
|
self.threads = threads.AsyncThreadsResource(self)
|
|
267
276
|
self.emails = emails.AsyncEmailsResource(self)
|
|
277
|
+
self.domains = domains.AsyncDomainsResource(self)
|
|
278
|
+
self.webhooks = webhooks.AsyncWebhooksResource(self)
|
|
279
|
+
self.meta = meta.AsyncMetaResource(self)
|
|
268
280
|
self.with_raw_response = AsyncAIInbxWithRawResponse(self)
|
|
269
281
|
self.with_streaming_response = AsyncAIInbxWithStreamedResponse(self)
|
|
270
282
|
|
|
@@ -293,9 +305,9 @@ class AsyncAIInbx(AsyncAPIClient):
|
|
|
293
305
|
*,
|
|
294
306
|
api_key: str | None = None,
|
|
295
307
|
base_url: str | httpx.URL | None = None,
|
|
296
|
-
timeout: float | Timeout | None | NotGiven =
|
|
308
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
297
309
|
http_client: httpx.AsyncClient | None = None,
|
|
298
|
-
max_retries: int | NotGiven =
|
|
310
|
+
max_retries: int | NotGiven = not_given,
|
|
299
311
|
default_headers: Mapping[str, str] | None = None,
|
|
300
312
|
set_default_headers: Mapping[str, str] | None = None,
|
|
301
313
|
default_query: Mapping[str, object] | None = None,
|
|
@@ -377,24 +389,32 @@ class AIInbxWithRawResponse:
|
|
|
377
389
|
def __init__(self, client: AIInbx) -> None:
|
|
378
390
|
self.threads = threads.ThreadsResourceWithRawResponse(client.threads)
|
|
379
391
|
self.emails = emails.EmailsResourceWithRawResponse(client.emails)
|
|
392
|
+
self.domains = domains.DomainsResourceWithRawResponse(client.domains)
|
|
393
|
+
self.meta = meta.MetaResourceWithRawResponse(client.meta)
|
|
380
394
|
|
|
381
395
|
|
|
382
396
|
class AsyncAIInbxWithRawResponse:
|
|
383
397
|
def __init__(self, client: AsyncAIInbx) -> None:
|
|
384
398
|
self.threads = threads.AsyncThreadsResourceWithRawResponse(client.threads)
|
|
385
399
|
self.emails = emails.AsyncEmailsResourceWithRawResponse(client.emails)
|
|
400
|
+
self.domains = domains.AsyncDomainsResourceWithRawResponse(client.domains)
|
|
401
|
+
self.meta = meta.AsyncMetaResourceWithRawResponse(client.meta)
|
|
386
402
|
|
|
387
403
|
|
|
388
404
|
class AIInbxWithStreamedResponse:
|
|
389
405
|
def __init__(self, client: AIInbx) -> None:
|
|
390
406
|
self.threads = threads.ThreadsResourceWithStreamingResponse(client.threads)
|
|
391
407
|
self.emails = emails.EmailsResourceWithStreamingResponse(client.emails)
|
|
408
|
+
self.domains = domains.DomainsResourceWithStreamingResponse(client.domains)
|
|
409
|
+
self.meta = meta.MetaResourceWithStreamingResponse(client.meta)
|
|
392
410
|
|
|
393
411
|
|
|
394
412
|
class AsyncAIInbxWithStreamedResponse:
|
|
395
413
|
def __init__(self, client: AsyncAIInbx) -> None:
|
|
396
414
|
self.threads = threads.AsyncThreadsResourceWithStreamingResponse(client.threads)
|
|
397
415
|
self.emails = emails.AsyncEmailsResourceWithStreamingResponse(client.emails)
|
|
416
|
+
self.domains = domains.AsyncDomainsResourceWithStreamingResponse(client.domains)
|
|
417
|
+
self.meta = meta.AsyncMetaResourceWithStreamingResponse(client.meta)
|
|
398
418
|
|
|
399
419
|
|
|
400
420
|
Client = AIInbx
|