aiinbx 0.205.1__py3-none-any.whl → 0.239.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.
aiinbx/_base_client.py CHANGED
@@ -1247,9 +1247,12 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
1247
1247
  *,
1248
1248
  cast_to: Type[ResponseT],
1249
1249
  body: Body | None = None,
1250
+ files: RequestFiles | None = None,
1250
1251
  options: RequestOptions = {},
1251
1252
  ) -> ResponseT:
1252
- opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options)
1253
+ opts = FinalRequestOptions.construct(
1254
+ method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
1255
+ )
1253
1256
  return self.request(cast_to, opts)
1254
1257
 
1255
1258
  def put(
@@ -1767,9 +1770,12 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1767
1770
  *,
1768
1771
  cast_to: Type[ResponseT],
1769
1772
  body: Body | None = None,
1773
+ files: RequestFiles | None = None,
1770
1774
  options: RequestOptions = {},
1771
1775
  ) -> ResponseT:
1772
- opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options)
1776
+ opts = FinalRequestOptions.construct(
1777
+ method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options
1778
+ )
1773
1779
  return await self.request(cast_to, opts)
1774
1780
 
1775
1781
  async def put(
aiinbx/_client.py CHANGED
@@ -3,7 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import os
6
- from typing import Any, Mapping
6
+ from typing import TYPE_CHECKING, Any, Mapping
7
7
  from typing_extensions import Self, override
8
8
 
9
9
  import httpx
@@ -20,8 +20,8 @@ from ._types import (
20
20
  not_given,
21
21
  )
22
22
  from ._utils import is_given, get_async_library
23
+ from ._compat import cached_property
23
24
  from ._version import __version__
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 (
@@ -30,18 +30,18 @@ from ._base_client import (
30
30
  AsyncAPIClient,
31
31
  )
32
32
 
33
+ if TYPE_CHECKING:
34
+ from .resources import meta, emails, domains, threads
35
+ from .resources.meta import MetaResource, AsyncMetaResource
36
+ from .resources.emails import EmailsResource, AsyncEmailsResource
37
+ from .resources.domains import DomainsResource, AsyncDomainsResource
38
+ from .resources.threads import ThreadsResource, AsyncThreadsResource
39
+ from .resources.webhooks import WebhooksResource, AsyncWebhooksResource
40
+
33
41
  __all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "AIInbx", "AsyncAIInbx", "Client", "AsyncClient"]
34
42
 
35
43
 
36
44
  class AIInbx(SyncAPIClient):
37
- threads: threads.ThreadsResource
38
- emails: emails.EmailsResource
39
- domains: domains.DomainsResource
40
- webhooks: webhooks.WebhooksResource
41
- meta: meta.MetaResource
42
- with_raw_response: AIInbxWithRawResponse
43
- with_streaming_response: AIInbxWithStreamedResponse
44
-
45
45
  # client options
46
46
  api_key: str
47
47
 
@@ -96,13 +96,43 @@ class AIInbx(SyncAPIClient):
96
96
  _strict_response_validation=_strict_response_validation,
97
97
  )
98
98
 
99
- self.threads = threads.ThreadsResource(self)
100
- self.emails = emails.EmailsResource(self)
101
- self.domains = domains.DomainsResource(self)
102
- self.webhooks = webhooks.WebhooksResource(self)
103
- self.meta = meta.MetaResource(self)
104
- self.with_raw_response = AIInbxWithRawResponse(self)
105
- self.with_streaming_response = AIInbxWithStreamedResponse(self)
99
+ @cached_property
100
+ def threads(self) -> ThreadsResource:
101
+ from .resources.threads import ThreadsResource
102
+
103
+ return ThreadsResource(self)
104
+
105
+ @cached_property
106
+ def emails(self) -> EmailsResource:
107
+ from .resources.emails import EmailsResource
108
+
109
+ return EmailsResource(self)
110
+
111
+ @cached_property
112
+ def domains(self) -> DomainsResource:
113
+ from .resources.domains import DomainsResource
114
+
115
+ return DomainsResource(self)
116
+
117
+ @cached_property
118
+ def webhooks(self) -> WebhooksResource:
119
+ from .resources.webhooks import WebhooksResource
120
+
121
+ return WebhooksResource(self)
122
+
123
+ @cached_property
124
+ def meta(self) -> MetaResource:
125
+ from .resources.meta import MetaResource
126
+
127
+ return MetaResource(self)
128
+
129
+ @cached_property
130
+ def with_raw_response(self) -> AIInbxWithRawResponse:
131
+ return AIInbxWithRawResponse(self)
132
+
133
+ @cached_property
134
+ def with_streaming_response(self) -> AIInbxWithStreamedResponse:
135
+ return AIInbxWithStreamedResponse(self)
106
136
 
107
137
  @property
108
138
  @override
@@ -210,14 +240,6 @@ class AIInbx(SyncAPIClient):
210
240
 
211
241
 
212
242
  class AsyncAIInbx(AsyncAPIClient):
213
- threads: threads.AsyncThreadsResource
214
- emails: emails.AsyncEmailsResource
215
- domains: domains.AsyncDomainsResource
216
- webhooks: webhooks.AsyncWebhooksResource
217
- meta: meta.AsyncMetaResource
218
- with_raw_response: AsyncAIInbxWithRawResponse
219
- with_streaming_response: AsyncAIInbxWithStreamedResponse
220
-
221
243
  # client options
222
244
  api_key: str
223
245
 
@@ -272,13 +294,43 @@ class AsyncAIInbx(AsyncAPIClient):
272
294
  _strict_response_validation=_strict_response_validation,
273
295
  )
274
296
 
275
- self.threads = threads.AsyncThreadsResource(self)
276
- self.emails = emails.AsyncEmailsResource(self)
277
- self.domains = domains.AsyncDomainsResource(self)
278
- self.webhooks = webhooks.AsyncWebhooksResource(self)
279
- self.meta = meta.AsyncMetaResource(self)
280
- self.with_raw_response = AsyncAIInbxWithRawResponse(self)
281
- self.with_streaming_response = AsyncAIInbxWithStreamedResponse(self)
297
+ @cached_property
298
+ def threads(self) -> AsyncThreadsResource:
299
+ from .resources.threads import AsyncThreadsResource
300
+
301
+ return AsyncThreadsResource(self)
302
+
303
+ @cached_property
304
+ def emails(self) -> AsyncEmailsResource:
305
+ from .resources.emails import AsyncEmailsResource
306
+
307
+ return AsyncEmailsResource(self)
308
+
309
+ @cached_property
310
+ def domains(self) -> AsyncDomainsResource:
311
+ from .resources.domains import AsyncDomainsResource
312
+
313
+ return AsyncDomainsResource(self)
314
+
315
+ @cached_property
316
+ def webhooks(self) -> AsyncWebhooksResource:
317
+ from .resources.webhooks import AsyncWebhooksResource
318
+
319
+ return AsyncWebhooksResource(self)
320
+
321
+ @cached_property
322
+ def meta(self) -> AsyncMetaResource:
323
+ from .resources.meta import AsyncMetaResource
324
+
325
+ return AsyncMetaResource(self)
326
+
327
+ @cached_property
328
+ def with_raw_response(self) -> AsyncAIInbxWithRawResponse:
329
+ return AsyncAIInbxWithRawResponse(self)
330
+
331
+ @cached_property
332
+ def with_streaming_response(self) -> AsyncAIInbxWithStreamedResponse:
333
+ return AsyncAIInbxWithStreamedResponse(self)
282
334
 
283
335
  @property
284
336
  @override
@@ -386,35 +438,127 @@ class AsyncAIInbx(AsyncAPIClient):
386
438
 
387
439
 
388
440
  class AIInbxWithRawResponse:
441
+ _client: AIInbx
442
+
389
443
  def __init__(self, client: AIInbx) -> None:
390
- self.threads = threads.ThreadsResourceWithRawResponse(client.threads)
391
- self.emails = emails.EmailsResourceWithRawResponse(client.emails)
392
- self.domains = domains.DomainsResourceWithRawResponse(client.domains)
393
- self.meta = meta.MetaResourceWithRawResponse(client.meta)
444
+ self._client = client
445
+
446
+ @cached_property
447
+ def threads(self) -> threads.ThreadsResourceWithRawResponse:
448
+ from .resources.threads import ThreadsResourceWithRawResponse
449
+
450
+ return ThreadsResourceWithRawResponse(self._client.threads)
451
+
452
+ @cached_property
453
+ def emails(self) -> emails.EmailsResourceWithRawResponse:
454
+ from .resources.emails import EmailsResourceWithRawResponse
455
+
456
+ return EmailsResourceWithRawResponse(self._client.emails)
457
+
458
+ @cached_property
459
+ def domains(self) -> domains.DomainsResourceWithRawResponse:
460
+ from .resources.domains import DomainsResourceWithRawResponse
461
+
462
+ return DomainsResourceWithRawResponse(self._client.domains)
463
+
464
+ @cached_property
465
+ def meta(self) -> meta.MetaResourceWithRawResponse:
466
+ from .resources.meta import MetaResourceWithRawResponse
467
+
468
+ return MetaResourceWithRawResponse(self._client.meta)
394
469
 
395
470
 
396
471
  class AsyncAIInbxWithRawResponse:
472
+ _client: AsyncAIInbx
473
+
397
474
  def __init__(self, client: AsyncAIInbx) -> None:
398
- self.threads = threads.AsyncThreadsResourceWithRawResponse(client.threads)
399
- self.emails = emails.AsyncEmailsResourceWithRawResponse(client.emails)
400
- self.domains = domains.AsyncDomainsResourceWithRawResponse(client.domains)
401
- self.meta = meta.AsyncMetaResourceWithRawResponse(client.meta)
475
+ self._client = client
476
+
477
+ @cached_property
478
+ def threads(self) -> threads.AsyncThreadsResourceWithRawResponse:
479
+ from .resources.threads import AsyncThreadsResourceWithRawResponse
480
+
481
+ return AsyncThreadsResourceWithRawResponse(self._client.threads)
482
+
483
+ @cached_property
484
+ def emails(self) -> emails.AsyncEmailsResourceWithRawResponse:
485
+ from .resources.emails import AsyncEmailsResourceWithRawResponse
486
+
487
+ return AsyncEmailsResourceWithRawResponse(self._client.emails)
488
+
489
+ @cached_property
490
+ def domains(self) -> domains.AsyncDomainsResourceWithRawResponse:
491
+ from .resources.domains import AsyncDomainsResourceWithRawResponse
492
+
493
+ return AsyncDomainsResourceWithRawResponse(self._client.domains)
494
+
495
+ @cached_property
496
+ def meta(self) -> meta.AsyncMetaResourceWithRawResponse:
497
+ from .resources.meta import AsyncMetaResourceWithRawResponse
498
+
499
+ return AsyncMetaResourceWithRawResponse(self._client.meta)
402
500
 
403
501
 
404
502
  class AIInbxWithStreamedResponse:
503
+ _client: AIInbx
504
+
405
505
  def __init__(self, client: AIInbx) -> None:
406
- self.threads = threads.ThreadsResourceWithStreamingResponse(client.threads)
407
- self.emails = emails.EmailsResourceWithStreamingResponse(client.emails)
408
- self.domains = domains.DomainsResourceWithStreamingResponse(client.domains)
409
- self.meta = meta.MetaResourceWithStreamingResponse(client.meta)
506
+ self._client = client
507
+
508
+ @cached_property
509
+ def threads(self) -> threads.ThreadsResourceWithStreamingResponse:
510
+ from .resources.threads import ThreadsResourceWithStreamingResponse
511
+
512
+ return ThreadsResourceWithStreamingResponse(self._client.threads)
513
+
514
+ @cached_property
515
+ def emails(self) -> emails.EmailsResourceWithStreamingResponse:
516
+ from .resources.emails import EmailsResourceWithStreamingResponse
517
+
518
+ return EmailsResourceWithStreamingResponse(self._client.emails)
519
+
520
+ @cached_property
521
+ def domains(self) -> domains.DomainsResourceWithStreamingResponse:
522
+ from .resources.domains import DomainsResourceWithStreamingResponse
523
+
524
+ return DomainsResourceWithStreamingResponse(self._client.domains)
525
+
526
+ @cached_property
527
+ def meta(self) -> meta.MetaResourceWithStreamingResponse:
528
+ from .resources.meta import MetaResourceWithStreamingResponse
529
+
530
+ return MetaResourceWithStreamingResponse(self._client.meta)
410
531
 
411
532
 
412
533
  class AsyncAIInbxWithStreamedResponse:
534
+ _client: AsyncAIInbx
535
+
413
536
  def __init__(self, client: AsyncAIInbx) -> None:
414
- self.threads = threads.AsyncThreadsResourceWithStreamingResponse(client.threads)
415
- self.emails = emails.AsyncEmailsResourceWithStreamingResponse(client.emails)
416
- self.domains = domains.AsyncDomainsResourceWithStreamingResponse(client.domains)
417
- self.meta = meta.AsyncMetaResourceWithStreamingResponse(client.meta)
537
+ self._client = client
538
+
539
+ @cached_property
540
+ def threads(self) -> threads.AsyncThreadsResourceWithStreamingResponse:
541
+ from .resources.threads import AsyncThreadsResourceWithStreamingResponse
542
+
543
+ return AsyncThreadsResourceWithStreamingResponse(self._client.threads)
544
+
545
+ @cached_property
546
+ def emails(self) -> emails.AsyncEmailsResourceWithStreamingResponse:
547
+ from .resources.emails import AsyncEmailsResourceWithStreamingResponse
548
+
549
+ return AsyncEmailsResourceWithStreamingResponse(self._client.emails)
550
+
551
+ @cached_property
552
+ def domains(self) -> domains.AsyncDomainsResourceWithStreamingResponse:
553
+ from .resources.domains import AsyncDomainsResourceWithStreamingResponse
554
+
555
+ return AsyncDomainsResourceWithStreamingResponse(self._client.domains)
556
+
557
+ @cached_property
558
+ def meta(self) -> meta.AsyncMetaResourceWithStreamingResponse:
559
+ from .resources.meta import AsyncMetaResourceWithStreamingResponse
560
+
561
+ return AsyncMetaResourceWithStreamingResponse(self._client.meta)
418
562
 
419
563
 
420
564
  Client = AIInbx
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.205.1" # x-release-please-version
4
+ __version__ = "0.239.0" # x-release-please-version
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: aiinbx
3
- Version: 0.205.1
3
+ Version: 0.239.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
@@ -1,6 +1,6 @@
1
1
  aiinbx/__init__.py,sha256=ZcZOv0tXmRKr4E-_FTKTnooxLS8j3TYTy_84dBODo2Y,2624
2
- aiinbx/_base_client.py,sha256=Lh-GuSxQ-op2DjvV3SZ8jxxomRFP-PtyasPFv9rQSsY,67047
3
- aiinbx/_client.py,sha256=uFAWY7sVW8bTZ2aa_wOUoqmBkgQO94kMXQAHNanAEnw,16622
2
+ aiinbx/_base_client.py,sha256=IZCo92T_UiNlfKqFVyzMKZolUe5I-zHC-HFvbDtJYcQ,67247
3
+ aiinbx/_client.py,sha256=n_307CGwOh_D9dhwNpn9G07EbkxmFQxHvAWC4-u0WdQ,20506
4
4
  aiinbx/_compat.py,sha256=DQBVORjFb33zch24jzkhM14msvnzY7mmSmgDLaVFUM8,6562
5
5
  aiinbx/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
6
6
  aiinbx/_exceptions.py,sha256=te3IaD62WIGnCIvhWUCVGpLZmClKvnv6hEjZFsD9MTA,3220
@@ -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=7AWeXwBPMgZiPlU6Z5quvQqDqHDkkt9j38z5L0CBk50,10221
13
13
  aiinbx/_types.py,sha256=LZpO7LB3Jw41PC06Kop69F0oo8jXulYKCOylxrlYkis,7295
14
- aiinbx/_version.py,sha256=MG1xerRimzf0L1alW1Px_47M5w1fFXBAfCmrpUjQwD4,160
14
+ aiinbx/_version.py,sha256=kl55QFyqJ8C241-dUPES0eL5Z2HKGJdfPpYDwji10So,160
15
15
  aiinbx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  aiinbx/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
17
17
  aiinbx/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
@@ -58,7 +58,7 @@ aiinbx/types/thread_retrieve_response.py,sha256=s5jj2iwBfcoVPeybIOJUVwRhvnc_0NdE
58
58
  aiinbx/types/thread_search_params.py,sha256=ZvlTTw4b_swhuC0VoLnU2QI1hYjROiEAyJ4HJXCrR9M,1939
59
59
  aiinbx/types/thread_search_response.py,sha256=lldugJNQuQ5tsD9BrgxoDNojAYs7Ks8iZDMxwhnjogY,908
60
60
  aiinbx/types/unwrap_webhook_event.py,sha256=70k2BARL8N22tVhpaFHOXknzr1hnCjKfTssZxY7HLF4,1227
61
- aiinbx-0.205.1.dist-info/METADATA,sha256=yeu8qKGWFbZ3CyfFlNkUlnAPUfLhHXFxJfdS4jqjQ1A,13282
62
- aiinbx-0.205.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
63
- aiinbx-0.205.1.dist-info/licenses/LICENSE,sha256=i1rY5G0rFWpuWXv5WPoFrQEOrDWycksLhJxuLBF1tZw,11337
64
- aiinbx-0.205.1.dist-info/RECORD,,
61
+ aiinbx-0.239.0.dist-info/METADATA,sha256=mNFM9Tp_XTkVJ9D9uiSaCzNS5qiSpjj6rT_QWpP1Q5Y,13282
62
+ aiinbx-0.239.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
63
+ aiinbx-0.239.0.dist-info/licenses/LICENSE,sha256=i1rY5G0rFWpuWXv5WPoFrQEOrDWycksLhJxuLBF1tZw,11337
64
+ aiinbx-0.239.0.dist-info/RECORD,,