dataleon 0.1.0a8__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 dataleon might be problematic. Click here for more details.

Files changed (60) hide show
  1. dataleon/__init__.py +102 -0
  2. dataleon/_base_client.py +1995 -0
  3. dataleon/_client.py +412 -0
  4. dataleon/_compat.py +219 -0
  5. dataleon/_constants.py +14 -0
  6. dataleon/_exceptions.py +108 -0
  7. dataleon/_files.py +123 -0
  8. dataleon/_models.py +840 -0
  9. dataleon/_qs.py +150 -0
  10. dataleon/_resource.py +43 -0
  11. dataleon/_response.py +830 -0
  12. dataleon/_streaming.py +331 -0
  13. dataleon/_types.py +260 -0
  14. dataleon/_utils/__init__.py +64 -0
  15. dataleon/_utils/_compat.py +45 -0
  16. dataleon/_utils/_datetime_parse.py +136 -0
  17. dataleon/_utils/_logs.py +25 -0
  18. dataleon/_utils/_proxy.py +65 -0
  19. dataleon/_utils/_reflection.py +42 -0
  20. dataleon/_utils/_resources_proxy.py +24 -0
  21. dataleon/_utils/_streams.py +12 -0
  22. dataleon/_utils/_sync.py +58 -0
  23. dataleon/_utils/_transform.py +457 -0
  24. dataleon/_utils/_typing.py +156 -0
  25. dataleon/_utils/_utils.py +421 -0
  26. dataleon/_version.py +4 -0
  27. dataleon/lib/.keep +4 -0
  28. dataleon/py.typed +0 -0
  29. dataleon/resources/__init__.py +33 -0
  30. dataleon/resources/companies/__init__.py +33 -0
  31. dataleon/resources/companies/companies.py +706 -0
  32. dataleon/resources/companies/documents.py +361 -0
  33. dataleon/resources/individuals/__init__.py +33 -0
  34. dataleon/resources/individuals/documents.py +361 -0
  35. dataleon/resources/individuals/individuals.py +711 -0
  36. dataleon/types/__init__.py +17 -0
  37. dataleon/types/companies/__init__.py +5 -0
  38. dataleon/types/companies/document_upload_params.py +56 -0
  39. dataleon/types/company_create_params.py +101 -0
  40. dataleon/types/company_list_params.py +37 -0
  41. dataleon/types/company_list_response.py +10 -0
  42. dataleon/types/company_registration.py +439 -0
  43. dataleon/types/company_retrieve_params.py +15 -0
  44. dataleon/types/company_update_params.py +101 -0
  45. dataleon/types/individual.py +336 -0
  46. dataleon/types/individual_create_params.py +78 -0
  47. dataleon/types/individual_list_params.py +37 -0
  48. dataleon/types/individual_list_response.py +10 -0
  49. dataleon/types/individual_retrieve_params.py +15 -0
  50. dataleon/types/individual_update_params.py +78 -0
  51. dataleon/types/individuals/__init__.py +7 -0
  52. dataleon/types/individuals/document_response.py +41 -0
  53. dataleon/types/individuals/document_upload_params.py +56 -0
  54. dataleon/types/individuals/generic_document.py +57 -0
  55. dataleon/types/shared/__init__.py +3 -0
  56. dataleon/types/shared/check.py +26 -0
  57. dataleon-0.1.0a8.dist-info/METADATA +448 -0
  58. dataleon-0.1.0a8.dist-info/RECORD +60 -0
  59. dataleon-0.1.0a8.dist-info/WHEEL +4 -0
  60. dataleon-0.1.0a8.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,711 @@
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 Union
6
+ from datetime import date
7
+ from typing_extensions import Literal
8
+
9
+ import httpx
10
+
11
+ from ...types import (
12
+ individual_list_params,
13
+ individual_create_params,
14
+ individual_update_params,
15
+ individual_retrieve_params,
16
+ )
17
+ from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
18
+ from ..._utils import maybe_transform, async_maybe_transform
19
+ from ..._compat import cached_property
20
+ from .documents import (
21
+ DocumentsResource,
22
+ AsyncDocumentsResource,
23
+ DocumentsResourceWithRawResponse,
24
+ AsyncDocumentsResourceWithRawResponse,
25
+ DocumentsResourceWithStreamingResponse,
26
+ AsyncDocumentsResourceWithStreamingResponse,
27
+ )
28
+ from ..._resource import SyncAPIResource, AsyncAPIResource
29
+ from ..._response import (
30
+ to_raw_response_wrapper,
31
+ to_streamed_response_wrapper,
32
+ async_to_raw_response_wrapper,
33
+ async_to_streamed_response_wrapper,
34
+ )
35
+ from ..._base_client import make_request_options
36
+ from ...types.individual import Individual
37
+ from ...types.individual_list_response import IndividualListResponse
38
+
39
+ __all__ = ["IndividualsResource", "AsyncIndividualsResource"]
40
+
41
+
42
+ class IndividualsResource(SyncAPIResource):
43
+ @cached_property
44
+ def documents(self) -> DocumentsResource:
45
+ return DocumentsResource(self._client)
46
+
47
+ @cached_property
48
+ def with_raw_response(self) -> IndividualsResourceWithRawResponse:
49
+ """
50
+ This property can be used as a prefix for any HTTP method call to return
51
+ the raw response object instead of the parsed content.
52
+
53
+ For more information, see https://www.github.com/dataleonlabs/dataleon-python#accessing-raw-response-data-eg-headers
54
+ """
55
+ return IndividualsResourceWithRawResponse(self)
56
+
57
+ @cached_property
58
+ def with_streaming_response(self) -> IndividualsResourceWithStreamingResponse:
59
+ """
60
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
61
+
62
+ For more information, see https://www.github.com/dataleonlabs/dataleon-python#with_streaming_response
63
+ """
64
+ return IndividualsResourceWithStreamingResponse(self)
65
+
66
+ def create(
67
+ self,
68
+ *,
69
+ workspace_id: str,
70
+ person: individual_create_params.Person | Omit = omit,
71
+ source_id: str | Omit = omit,
72
+ technical_data: individual_create_params.TechnicalData | Omit = omit,
73
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
74
+ # The extra values given here take precedence over values defined on the client or passed to this method.
75
+ extra_headers: Headers | None = None,
76
+ extra_query: Query | None = None,
77
+ extra_body: Body | None = None,
78
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
79
+ ) -> Individual:
80
+ """
81
+ Create a new individual
82
+
83
+ Args:
84
+ workspace_id: Unique identifier of the workspace where the individual is being registered.
85
+
86
+ person: Personal information about the individual.
87
+
88
+ source_id: Optional identifier for tracking the source system or integration from your
89
+ system.
90
+
91
+ technical_data: Technical metadata related to the request or processing.
92
+
93
+ extra_headers: Send extra headers
94
+
95
+ extra_query: Add additional query parameters to the request
96
+
97
+ extra_body: Add additional JSON properties to the request
98
+
99
+ timeout: Override the client-level default timeout for this request, in seconds
100
+ """
101
+ return self._post(
102
+ "/individuals",
103
+ body=maybe_transform(
104
+ {
105
+ "workspace_id": workspace_id,
106
+ "person": person,
107
+ "source_id": source_id,
108
+ "technical_data": technical_data,
109
+ },
110
+ individual_create_params.IndividualCreateParams,
111
+ ),
112
+ options=make_request_options(
113
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
114
+ ),
115
+ cast_to=Individual,
116
+ )
117
+
118
+ def retrieve(
119
+ self,
120
+ individual_id: str,
121
+ *,
122
+ document: bool | Omit = omit,
123
+ scope: str | Omit = omit,
124
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
125
+ # The extra values given here take precedence over values defined on the client or passed to this method.
126
+ extra_headers: Headers | None = None,
127
+ extra_query: Query | None = None,
128
+ extra_body: Body | None = None,
129
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
130
+ ) -> Individual:
131
+ """
132
+ Get an individual by ID
133
+
134
+ Args:
135
+ document: Include document information
136
+
137
+ scope: Scope filter (id or scope)
138
+
139
+ extra_headers: Send extra headers
140
+
141
+ extra_query: Add additional query parameters to the request
142
+
143
+ extra_body: Add additional JSON properties to the request
144
+
145
+ timeout: Override the client-level default timeout for this request, in seconds
146
+ """
147
+ if not individual_id:
148
+ raise ValueError(f"Expected a non-empty value for `individual_id` but received {individual_id!r}")
149
+ return self._get(
150
+ f"/individuals/{individual_id}",
151
+ options=make_request_options(
152
+ extra_headers=extra_headers,
153
+ extra_query=extra_query,
154
+ extra_body=extra_body,
155
+ timeout=timeout,
156
+ query=maybe_transform(
157
+ {
158
+ "document": document,
159
+ "scope": scope,
160
+ },
161
+ individual_retrieve_params.IndividualRetrieveParams,
162
+ ),
163
+ ),
164
+ cast_to=Individual,
165
+ )
166
+
167
+ def update(
168
+ self,
169
+ individual_id: str,
170
+ *,
171
+ workspace_id: str,
172
+ person: individual_update_params.Person | Omit = omit,
173
+ source_id: str | Omit = omit,
174
+ technical_data: individual_update_params.TechnicalData | Omit = omit,
175
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
176
+ # The extra values given here take precedence over values defined on the client or passed to this method.
177
+ extra_headers: Headers | None = None,
178
+ extra_query: Query | None = None,
179
+ extra_body: Body | None = None,
180
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
181
+ ) -> Individual:
182
+ """
183
+ Update an individual by ID
184
+
185
+ Args:
186
+ workspace_id: Unique identifier of the workspace where the individual is being registered.
187
+
188
+ person: Personal information about the individual.
189
+
190
+ source_id: Optional identifier for tracking the source system or integration from your
191
+ system.
192
+
193
+ technical_data: Technical metadata related to the request or processing.
194
+
195
+ extra_headers: Send extra headers
196
+
197
+ extra_query: Add additional query parameters to the request
198
+
199
+ extra_body: Add additional JSON properties to the request
200
+
201
+ timeout: Override the client-level default timeout for this request, in seconds
202
+ """
203
+ if not individual_id:
204
+ raise ValueError(f"Expected a non-empty value for `individual_id` but received {individual_id!r}")
205
+ return self._put(
206
+ f"/individuals/{individual_id}",
207
+ body=maybe_transform(
208
+ {
209
+ "workspace_id": workspace_id,
210
+ "person": person,
211
+ "source_id": source_id,
212
+ "technical_data": technical_data,
213
+ },
214
+ individual_update_params.IndividualUpdateParams,
215
+ ),
216
+ options=make_request_options(
217
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
218
+ ),
219
+ cast_to=Individual,
220
+ )
221
+
222
+ def list(
223
+ self,
224
+ *,
225
+ end_date: Union[str, date] | Omit = omit,
226
+ limit: int | Omit = omit,
227
+ offset: int | Omit = omit,
228
+ source_id: str | Omit = omit,
229
+ start_date: Union[str, date] | Omit = omit,
230
+ state: Literal["VOID", "WAITING", "STARTED", "RUNNING", "PROCESSED", "FAILED", "ABORTED", "EXPIRED", "DELETED"]
231
+ | Omit = omit,
232
+ status: Literal["rejected", "need_review", "approved"] | Omit = omit,
233
+ workspace_id: str | Omit = omit,
234
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
235
+ # The extra values given here take precedence over values defined on the client or passed to this method.
236
+ extra_headers: Headers | None = None,
237
+ extra_query: Query | None = None,
238
+ extra_body: Body | None = None,
239
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
240
+ ) -> IndividualListResponse:
241
+ """
242
+ Get all individuals
243
+
244
+ Args:
245
+ end_date: Filter individuals created before this date (format YYYY-MM-DD)
246
+
247
+ limit: Number of results to return (between 1 and 100)
248
+
249
+ offset: Number of results to offset (must be ≥ 0)
250
+
251
+ source_id: Filter by source ID
252
+
253
+ start_date: Filter individuals created after this date (format YYYY-MM-DD)
254
+
255
+ state: Filter by individual status (must be one of the allowed values)
256
+
257
+ status: Filter by individual status (must be one of the allowed values)
258
+
259
+ workspace_id: Filter by workspace ID
260
+
261
+ extra_headers: Send extra headers
262
+
263
+ extra_query: Add additional query parameters to the request
264
+
265
+ extra_body: Add additional JSON properties to the request
266
+
267
+ timeout: Override the client-level default timeout for this request, in seconds
268
+ """
269
+ return self._get(
270
+ "/individuals",
271
+ options=make_request_options(
272
+ extra_headers=extra_headers,
273
+ extra_query=extra_query,
274
+ extra_body=extra_body,
275
+ timeout=timeout,
276
+ query=maybe_transform(
277
+ {
278
+ "end_date": end_date,
279
+ "limit": limit,
280
+ "offset": offset,
281
+ "source_id": source_id,
282
+ "start_date": start_date,
283
+ "state": state,
284
+ "status": status,
285
+ "workspace_id": workspace_id,
286
+ },
287
+ individual_list_params.IndividualListParams,
288
+ ),
289
+ ),
290
+ cast_to=IndividualListResponse,
291
+ )
292
+
293
+ def delete(
294
+ self,
295
+ individual_id: str,
296
+ *,
297
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
298
+ # The extra values given here take precedence over values defined on the client or passed to this method.
299
+ extra_headers: Headers | None = None,
300
+ extra_query: Query | None = None,
301
+ extra_body: Body | None = None,
302
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
303
+ ) -> None:
304
+ """
305
+ Delete an individual by ID
306
+
307
+ Args:
308
+ extra_headers: Send extra headers
309
+
310
+ extra_query: Add additional query parameters to the request
311
+
312
+ extra_body: Add additional JSON properties to the request
313
+
314
+ timeout: Override the client-level default timeout for this request, in seconds
315
+ """
316
+ if not individual_id:
317
+ raise ValueError(f"Expected a non-empty value for `individual_id` but received {individual_id!r}")
318
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
319
+ return self._delete(
320
+ f"/individuals/{individual_id}",
321
+ options=make_request_options(
322
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
323
+ ),
324
+ cast_to=NoneType,
325
+ )
326
+
327
+
328
+ class AsyncIndividualsResource(AsyncAPIResource):
329
+ @cached_property
330
+ def documents(self) -> AsyncDocumentsResource:
331
+ return AsyncDocumentsResource(self._client)
332
+
333
+ @cached_property
334
+ def with_raw_response(self) -> AsyncIndividualsResourceWithRawResponse:
335
+ """
336
+ This property can be used as a prefix for any HTTP method call to return
337
+ the raw response object instead of the parsed content.
338
+
339
+ For more information, see https://www.github.com/dataleonlabs/dataleon-python#accessing-raw-response-data-eg-headers
340
+ """
341
+ return AsyncIndividualsResourceWithRawResponse(self)
342
+
343
+ @cached_property
344
+ def with_streaming_response(self) -> AsyncIndividualsResourceWithStreamingResponse:
345
+ """
346
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
347
+
348
+ For more information, see https://www.github.com/dataleonlabs/dataleon-python#with_streaming_response
349
+ """
350
+ return AsyncIndividualsResourceWithStreamingResponse(self)
351
+
352
+ async def create(
353
+ self,
354
+ *,
355
+ workspace_id: str,
356
+ person: individual_create_params.Person | Omit = omit,
357
+ source_id: str | Omit = omit,
358
+ technical_data: individual_create_params.TechnicalData | Omit = omit,
359
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
360
+ # The extra values given here take precedence over values defined on the client or passed to this method.
361
+ extra_headers: Headers | None = None,
362
+ extra_query: Query | None = None,
363
+ extra_body: Body | None = None,
364
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
365
+ ) -> Individual:
366
+ """
367
+ Create a new individual
368
+
369
+ Args:
370
+ workspace_id: Unique identifier of the workspace where the individual is being registered.
371
+
372
+ person: Personal information about the individual.
373
+
374
+ source_id: Optional identifier for tracking the source system or integration from your
375
+ system.
376
+
377
+ technical_data: Technical metadata related to the request or processing.
378
+
379
+ extra_headers: Send extra headers
380
+
381
+ extra_query: Add additional query parameters to the request
382
+
383
+ extra_body: Add additional JSON properties to the request
384
+
385
+ timeout: Override the client-level default timeout for this request, in seconds
386
+ """
387
+ return await self._post(
388
+ "/individuals",
389
+ body=await async_maybe_transform(
390
+ {
391
+ "workspace_id": workspace_id,
392
+ "person": person,
393
+ "source_id": source_id,
394
+ "technical_data": technical_data,
395
+ },
396
+ individual_create_params.IndividualCreateParams,
397
+ ),
398
+ options=make_request_options(
399
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
400
+ ),
401
+ cast_to=Individual,
402
+ )
403
+
404
+ async def retrieve(
405
+ self,
406
+ individual_id: str,
407
+ *,
408
+ document: bool | Omit = omit,
409
+ scope: str | Omit = omit,
410
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
411
+ # The extra values given here take precedence over values defined on the client or passed to this method.
412
+ extra_headers: Headers | None = None,
413
+ extra_query: Query | None = None,
414
+ extra_body: Body | None = None,
415
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
416
+ ) -> Individual:
417
+ """
418
+ Get an individual by ID
419
+
420
+ Args:
421
+ document: Include document information
422
+
423
+ scope: Scope filter (id or scope)
424
+
425
+ extra_headers: Send extra headers
426
+
427
+ extra_query: Add additional query parameters to the request
428
+
429
+ extra_body: Add additional JSON properties to the request
430
+
431
+ timeout: Override the client-level default timeout for this request, in seconds
432
+ """
433
+ if not individual_id:
434
+ raise ValueError(f"Expected a non-empty value for `individual_id` but received {individual_id!r}")
435
+ return await self._get(
436
+ f"/individuals/{individual_id}",
437
+ options=make_request_options(
438
+ extra_headers=extra_headers,
439
+ extra_query=extra_query,
440
+ extra_body=extra_body,
441
+ timeout=timeout,
442
+ query=await async_maybe_transform(
443
+ {
444
+ "document": document,
445
+ "scope": scope,
446
+ },
447
+ individual_retrieve_params.IndividualRetrieveParams,
448
+ ),
449
+ ),
450
+ cast_to=Individual,
451
+ )
452
+
453
+ async def update(
454
+ self,
455
+ individual_id: str,
456
+ *,
457
+ workspace_id: str,
458
+ person: individual_update_params.Person | Omit = omit,
459
+ source_id: str | Omit = omit,
460
+ technical_data: individual_update_params.TechnicalData | Omit = omit,
461
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
462
+ # The extra values given here take precedence over values defined on the client or passed to this method.
463
+ extra_headers: Headers | None = None,
464
+ extra_query: Query | None = None,
465
+ extra_body: Body | None = None,
466
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
467
+ ) -> Individual:
468
+ """
469
+ Update an individual by ID
470
+
471
+ Args:
472
+ workspace_id: Unique identifier of the workspace where the individual is being registered.
473
+
474
+ person: Personal information about the individual.
475
+
476
+ source_id: Optional identifier for tracking the source system or integration from your
477
+ system.
478
+
479
+ technical_data: Technical metadata related to the request or processing.
480
+
481
+ extra_headers: Send extra headers
482
+
483
+ extra_query: Add additional query parameters to the request
484
+
485
+ extra_body: Add additional JSON properties to the request
486
+
487
+ timeout: Override the client-level default timeout for this request, in seconds
488
+ """
489
+ if not individual_id:
490
+ raise ValueError(f"Expected a non-empty value for `individual_id` but received {individual_id!r}")
491
+ return await self._put(
492
+ f"/individuals/{individual_id}",
493
+ body=await async_maybe_transform(
494
+ {
495
+ "workspace_id": workspace_id,
496
+ "person": person,
497
+ "source_id": source_id,
498
+ "technical_data": technical_data,
499
+ },
500
+ individual_update_params.IndividualUpdateParams,
501
+ ),
502
+ options=make_request_options(
503
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
504
+ ),
505
+ cast_to=Individual,
506
+ )
507
+
508
+ async def list(
509
+ self,
510
+ *,
511
+ end_date: Union[str, date] | Omit = omit,
512
+ limit: int | Omit = omit,
513
+ offset: int | Omit = omit,
514
+ source_id: str | Omit = omit,
515
+ start_date: Union[str, date] | Omit = omit,
516
+ state: Literal["VOID", "WAITING", "STARTED", "RUNNING", "PROCESSED", "FAILED", "ABORTED", "EXPIRED", "DELETED"]
517
+ | Omit = omit,
518
+ status: Literal["rejected", "need_review", "approved"] | Omit = omit,
519
+ workspace_id: str | Omit = omit,
520
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
521
+ # The extra values given here take precedence over values defined on the client or passed to this method.
522
+ extra_headers: Headers | None = None,
523
+ extra_query: Query | None = None,
524
+ extra_body: Body | None = None,
525
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
526
+ ) -> IndividualListResponse:
527
+ """
528
+ Get all individuals
529
+
530
+ Args:
531
+ end_date: Filter individuals created before this date (format YYYY-MM-DD)
532
+
533
+ limit: Number of results to return (between 1 and 100)
534
+
535
+ offset: Number of results to offset (must be ≥ 0)
536
+
537
+ source_id: Filter by source ID
538
+
539
+ start_date: Filter individuals created after this date (format YYYY-MM-DD)
540
+
541
+ state: Filter by individual status (must be one of the allowed values)
542
+
543
+ status: Filter by individual status (must be one of the allowed values)
544
+
545
+ workspace_id: Filter by workspace ID
546
+
547
+ extra_headers: Send extra headers
548
+
549
+ extra_query: Add additional query parameters to the request
550
+
551
+ extra_body: Add additional JSON properties to the request
552
+
553
+ timeout: Override the client-level default timeout for this request, in seconds
554
+ """
555
+ return await self._get(
556
+ "/individuals",
557
+ options=make_request_options(
558
+ extra_headers=extra_headers,
559
+ extra_query=extra_query,
560
+ extra_body=extra_body,
561
+ timeout=timeout,
562
+ query=await async_maybe_transform(
563
+ {
564
+ "end_date": end_date,
565
+ "limit": limit,
566
+ "offset": offset,
567
+ "source_id": source_id,
568
+ "start_date": start_date,
569
+ "state": state,
570
+ "status": status,
571
+ "workspace_id": workspace_id,
572
+ },
573
+ individual_list_params.IndividualListParams,
574
+ ),
575
+ ),
576
+ cast_to=IndividualListResponse,
577
+ )
578
+
579
+ async def delete(
580
+ self,
581
+ individual_id: str,
582
+ *,
583
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
584
+ # The extra values given here take precedence over values defined on the client or passed to this method.
585
+ extra_headers: Headers | None = None,
586
+ extra_query: Query | None = None,
587
+ extra_body: Body | None = None,
588
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
589
+ ) -> None:
590
+ """
591
+ Delete an individual by ID
592
+
593
+ Args:
594
+ extra_headers: Send extra headers
595
+
596
+ extra_query: Add additional query parameters to the request
597
+
598
+ extra_body: Add additional JSON properties to the request
599
+
600
+ timeout: Override the client-level default timeout for this request, in seconds
601
+ """
602
+ if not individual_id:
603
+ raise ValueError(f"Expected a non-empty value for `individual_id` but received {individual_id!r}")
604
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
605
+ return await self._delete(
606
+ f"/individuals/{individual_id}",
607
+ options=make_request_options(
608
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
609
+ ),
610
+ cast_to=NoneType,
611
+ )
612
+
613
+
614
+ class IndividualsResourceWithRawResponse:
615
+ def __init__(self, individuals: IndividualsResource) -> None:
616
+ self._individuals = individuals
617
+
618
+ self.create = to_raw_response_wrapper(
619
+ individuals.create,
620
+ )
621
+ self.retrieve = to_raw_response_wrapper(
622
+ individuals.retrieve,
623
+ )
624
+ self.update = to_raw_response_wrapper(
625
+ individuals.update,
626
+ )
627
+ self.list = to_raw_response_wrapper(
628
+ individuals.list,
629
+ )
630
+ self.delete = to_raw_response_wrapper(
631
+ individuals.delete,
632
+ )
633
+
634
+ @cached_property
635
+ def documents(self) -> DocumentsResourceWithRawResponse:
636
+ return DocumentsResourceWithRawResponse(self._individuals.documents)
637
+
638
+
639
+ class AsyncIndividualsResourceWithRawResponse:
640
+ def __init__(self, individuals: AsyncIndividualsResource) -> None:
641
+ self._individuals = individuals
642
+
643
+ self.create = async_to_raw_response_wrapper(
644
+ individuals.create,
645
+ )
646
+ self.retrieve = async_to_raw_response_wrapper(
647
+ individuals.retrieve,
648
+ )
649
+ self.update = async_to_raw_response_wrapper(
650
+ individuals.update,
651
+ )
652
+ self.list = async_to_raw_response_wrapper(
653
+ individuals.list,
654
+ )
655
+ self.delete = async_to_raw_response_wrapper(
656
+ individuals.delete,
657
+ )
658
+
659
+ @cached_property
660
+ def documents(self) -> AsyncDocumentsResourceWithRawResponse:
661
+ return AsyncDocumentsResourceWithRawResponse(self._individuals.documents)
662
+
663
+
664
+ class IndividualsResourceWithStreamingResponse:
665
+ def __init__(self, individuals: IndividualsResource) -> None:
666
+ self._individuals = individuals
667
+
668
+ self.create = to_streamed_response_wrapper(
669
+ individuals.create,
670
+ )
671
+ self.retrieve = to_streamed_response_wrapper(
672
+ individuals.retrieve,
673
+ )
674
+ self.update = to_streamed_response_wrapper(
675
+ individuals.update,
676
+ )
677
+ self.list = to_streamed_response_wrapper(
678
+ individuals.list,
679
+ )
680
+ self.delete = to_streamed_response_wrapper(
681
+ individuals.delete,
682
+ )
683
+
684
+ @cached_property
685
+ def documents(self) -> DocumentsResourceWithStreamingResponse:
686
+ return DocumentsResourceWithStreamingResponse(self._individuals.documents)
687
+
688
+
689
+ class AsyncIndividualsResourceWithStreamingResponse:
690
+ def __init__(self, individuals: AsyncIndividualsResource) -> None:
691
+ self._individuals = individuals
692
+
693
+ self.create = async_to_streamed_response_wrapper(
694
+ individuals.create,
695
+ )
696
+ self.retrieve = async_to_streamed_response_wrapper(
697
+ individuals.retrieve,
698
+ )
699
+ self.update = async_to_streamed_response_wrapper(
700
+ individuals.update,
701
+ )
702
+ self.list = async_to_streamed_response_wrapper(
703
+ individuals.list,
704
+ )
705
+ self.delete = async_to_streamed_response_wrapper(
706
+ individuals.delete,
707
+ )
708
+
709
+ @cached_property
710
+ def documents(self) -> AsyncDocumentsResourceWithStreamingResponse:
711
+ return AsyncDocumentsResourceWithStreamingResponse(self._individuals.documents)