dataleon 0.1.0a2__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.
Files changed (58) hide show
  1. dataleon/__init__.py +100 -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 +829 -0
  9. dataleon/_qs.py +150 -0
  10. dataleon/_resource.py +43 -0
  11. dataleon/_response.py +830 -0
  12. dataleon/_streaming.py +333 -0
  13. dataleon/_types.py +219 -0
  14. dataleon/_utils/__init__.py +57 -0
  15. dataleon/_utils/_logs.py +25 -0
  16. dataleon/_utils/_proxy.py +65 -0
  17. dataleon/_utils/_reflection.py +42 -0
  18. dataleon/_utils/_resources_proxy.py +24 -0
  19. dataleon/_utils/_streams.py +12 -0
  20. dataleon/_utils/_sync.py +86 -0
  21. dataleon/_utils/_transform.py +447 -0
  22. dataleon/_utils/_typing.py +151 -0
  23. dataleon/_utils/_utils.py +422 -0
  24. dataleon/_version.py +4 -0
  25. dataleon/lib/.keep +4 -0
  26. dataleon/py.typed +0 -0
  27. dataleon/resources/__init__.py +33 -0
  28. dataleon/resources/companies/__init__.py +33 -0
  29. dataleon/resources/companies/companies.py +706 -0
  30. dataleon/resources/companies/documents.py +361 -0
  31. dataleon/resources/individuals/__init__.py +33 -0
  32. dataleon/resources/individuals/documents.py +361 -0
  33. dataleon/resources/individuals/individuals.py +711 -0
  34. dataleon/types/__init__.py +17 -0
  35. dataleon/types/companies/__init__.py +5 -0
  36. dataleon/types/companies/document_upload_params.py +56 -0
  37. dataleon/types/company_create_params.py +94 -0
  38. dataleon/types/company_list_params.py +37 -0
  39. dataleon/types/company_list_response.py +10 -0
  40. dataleon/types/company_registration.py +431 -0
  41. dataleon/types/company_retrieve_params.py +15 -0
  42. dataleon/types/company_update_params.py +94 -0
  43. dataleon/types/individual.py +325 -0
  44. dataleon/types/individual_create_params.py +68 -0
  45. dataleon/types/individual_list_params.py +37 -0
  46. dataleon/types/individual_list_response.py +10 -0
  47. dataleon/types/individual_retrieve_params.py +15 -0
  48. dataleon/types/individual_update_params.py +68 -0
  49. dataleon/types/individuals/__init__.py +7 -0
  50. dataleon/types/individuals/document_response.py +41 -0
  51. dataleon/types/individuals/document_upload_params.py +56 -0
  52. dataleon/types/individuals/generic_document.py +57 -0
  53. dataleon/types/shared/__init__.py +3 -0
  54. dataleon/types/shared/check.py +26 -0
  55. dataleon-0.1.0a2.dist-info/METADATA +449 -0
  56. dataleon-0.1.0a2.dist-info/RECORD +58 -0
  57. dataleon-0.1.0a2.dist-info/WHEEL +4 -0
  58. dataleon-0.1.0a2.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,94 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Required, TypedDict
6
+
7
+ __all__ = ["CompanyUpdateParams", "Company", "TechnicalData"]
8
+
9
+
10
+ class CompanyUpdateParams(TypedDict, total=False):
11
+ company: Required[Company]
12
+ """Main information about the company being registered."""
13
+
14
+ workspace_id: Required[str]
15
+ """Unique identifier of the workspace in which the company is being created."""
16
+
17
+ source_id: str
18
+ """
19
+ Optional identifier to track the origin of the request or integration from your
20
+ system.
21
+ """
22
+
23
+ technical_data: TechnicalData
24
+ """Technical metadata and callback configuration."""
25
+
26
+
27
+ class Company(TypedDict, total=False):
28
+ name: Required[str]
29
+ """Legal name of the company."""
30
+
31
+ address: str
32
+ """Registered address of the company."""
33
+
34
+ commercial_name: str
35
+ """Commercial or trade name of the company, if different from the legal name."""
36
+
37
+ country: str
38
+ """
39
+ ISO 3166-1 alpha-2 country code of company registration (e.g., "FR" for France).
40
+ """
41
+
42
+ email: str
43
+ """Contact email address for the company."""
44
+
45
+ employer_identification_number: str
46
+ """Employer Identification Number (EIN) or equivalent."""
47
+
48
+ legal_form: str
49
+ """Legal structure of the company (e.g., SARL, SAS)."""
50
+
51
+ phone_number: str
52
+ """Contact phone number for the company."""
53
+
54
+ registration_date: str
55
+ """Date of official company registration in YYYY-MM-DD format."""
56
+
57
+ registration_id: str
58
+ """Official company registration identifier."""
59
+
60
+ share_capital: str
61
+ """Declared share capital of the company, usually in euros."""
62
+
63
+ status: str
64
+ """Current status of the company (e.g., active, inactive)."""
65
+
66
+ tax_identification_number: str
67
+ """National tax identifier (e.g., VAT or TIN)."""
68
+
69
+ type: str
70
+ """Type of company, such as "main" or "affiliated"."""
71
+
72
+ website_url: str
73
+ """Company’s official website URL."""
74
+
75
+
76
+ class TechnicalData(TypedDict, total=False):
77
+ active_aml_suspicions: bool
78
+ """
79
+ Flag indicating whether there are active research AML (Anti-Money Laundering)
80
+ suspicions for the company when you apply for a new entry or get an existing
81
+ one.
82
+ """
83
+
84
+ callback_url: str
85
+ """URL to receive a callback once the company is processed."""
86
+
87
+ callback_url_notification: str
88
+ """URL to receive notifications about the processing state and status."""
89
+
90
+ language: str
91
+ """Preferred language for responses or notifications (e.g., "eng", "fra")."""
92
+
93
+ raw_data: bool
94
+ """Flag indicating whether to include raw data in the response."""
@@ -0,0 +1,325 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal
6
+
7
+ from pydantic import Field as FieldInfo
8
+
9
+ from .._models import BaseModel
10
+ from .shared.check import Check
11
+ from .individuals.generic_document import GenericDocument
12
+
13
+ __all__ = [
14
+ "Individual",
15
+ "AmlSuspicion",
16
+ "Certificat",
17
+ "IdentityCard",
18
+ "Person",
19
+ "Property",
20
+ "Risk",
21
+ "Tag",
22
+ "TechnicalData",
23
+ ]
24
+
25
+
26
+ class AmlSuspicion(BaseModel):
27
+ caption: Optional[str] = None
28
+ """Human-readable description or title for the suspicious finding."""
29
+
30
+ country: Optional[str] = None
31
+ """Country associated with the suspicion (ISO 3166-1 alpha-2 code)."""
32
+
33
+ gender: Optional[str] = None
34
+ """Gender associated with the suspicion, if applicable."""
35
+
36
+ relation: Optional[str] = None
37
+ """
38
+ Nature of the relationship between the entity and the suspicious activity (e.g.,
39
+ "linked", "associated").
40
+ """
41
+
42
+ schema_: Optional[str] = FieldInfo(alias="schema", default=None)
43
+ """Version of the evaluation schema or rule engine used."""
44
+
45
+ score: Optional[float] = None
46
+ """Risk score between 0.0 and 1 indicating the severity of the suspicion."""
47
+
48
+ source: Optional[str] = None
49
+ """Source system or service providing this suspicion."""
50
+
51
+ status: Optional[Literal["true_positive", "false_positive", "pending"]] = None
52
+ """Status of the suspicion review process.
53
+
54
+ Possible values: "true_positive", "false_positive", "pending".
55
+ """
56
+
57
+ type: Optional[Literal["crime", "sanction", "pep", "adverse_news", "other"]] = None
58
+ """Category of the suspicion.
59
+
60
+ Possible values: "crime", "sanction", "pep", "adverse_news", "other".
61
+ """
62
+
63
+
64
+ class Certificat(BaseModel):
65
+ id: Optional[str] = None
66
+ """Unique identifier for the certificate."""
67
+
68
+ created_at: Optional[datetime] = None
69
+ """Timestamp when the certificate was created."""
70
+
71
+ filename: Optional[str] = None
72
+ """Name of the certificate file."""
73
+
74
+
75
+ class IdentityCard(BaseModel):
76
+ id: Optional[str] = None
77
+ """Unique identifier for the document."""
78
+
79
+ back_document_signed_url: Optional[str] = None
80
+ """Signed URL linking to the back image of the document."""
81
+
82
+ birth_place: Optional[str] = None
83
+ """Place of birth as indicated on the document."""
84
+
85
+ birthday: Optional[str] = None
86
+ """Date of birth in DD/MM/YYYY format as shown on the document."""
87
+
88
+ country: Optional[str] = None
89
+ """Country code issuing the document (ISO 3166-1 alpha-2)."""
90
+
91
+ expiration_date: Optional[str] = None
92
+ """Expiration date of the document, in YYYY-MM-DD format."""
93
+
94
+ first_name: Optional[str] = None
95
+ """First name as shown on the document."""
96
+
97
+ front_document_signed_url: Optional[str] = None
98
+ """Signed URL linking to the front image of the document."""
99
+
100
+ gender: Optional[str] = None
101
+ """Gender indicated on the document (e.g., "M" or "F")."""
102
+
103
+ issue_date: Optional[str] = None
104
+ """Date when the document was issued, in YYYY-MM-DD format."""
105
+
106
+ last_name: Optional[str] = None
107
+ """Last name as shown on the document."""
108
+
109
+ mrz_line_1: Optional[str] = None
110
+ """First line of the Machine Readable Zone (MRZ) on the document."""
111
+
112
+ mrz_line_2: Optional[str] = None
113
+ """Second line of the MRZ on the document."""
114
+
115
+ mrz_line_3: Optional[str] = None
116
+ """Third line of the MRZ if applicable; otherwise null."""
117
+
118
+ type: Optional[str] = None
119
+ """Type of document (e.g., passport, identity card)."""
120
+
121
+
122
+ class Person(BaseModel):
123
+ birthday: Optional[str] = None
124
+ """Date of birth, formatted as DD/MM/YYYY."""
125
+
126
+ email: Optional[str] = None
127
+ """Email address of the individual."""
128
+
129
+ face_image_signed_url: Optional[str] = None
130
+ """Signed URL linking to the person’s face image."""
131
+
132
+ first_name: Optional[str] = None
133
+ """First (given) name of the person."""
134
+
135
+ full_name: Optional[str] = None
136
+ """Full name of the person, typically concatenation of first and last names."""
137
+
138
+ gender: Optional[str] = None
139
+ """Gender of the individual (e.g., "M" for male, "F" for female)."""
140
+
141
+ last_name: Optional[str] = None
142
+ """Last (family) name of the person."""
143
+
144
+ maiden_name: Optional[str] = None
145
+ """Maiden name of the person, if applicable."""
146
+
147
+ phone_number: Optional[str] = None
148
+ """Contact phone number including country code."""
149
+
150
+
151
+ class Property(BaseModel):
152
+ name: Optional[str] = None
153
+ """Name/key of the property."""
154
+
155
+ type: Optional[str] = None
156
+ """Data type of the property value."""
157
+
158
+ value: Optional[str] = None
159
+ """Value associated with the property name."""
160
+
161
+
162
+ class Risk(BaseModel):
163
+ code: Optional[str] = None
164
+ """Risk category or code identifier."""
165
+
166
+ reason: Optional[str] = None
167
+ """Explanation or justification for the assigned risk."""
168
+
169
+ score: Optional[float] = None
170
+ """Numeric risk score between 0.0 and 1.0 indicating severity or confidence."""
171
+
172
+
173
+ class Tag(BaseModel):
174
+ key: Optional[str] = None
175
+ """Name of the tag used to identify the metadata field."""
176
+
177
+ private: Optional[bool] = None
178
+ """Indicates whether the tag is private (not visible to external users)."""
179
+
180
+ type: Optional[str] = None
181
+ """Data type of the tag value (e.g., "string", "number", "boolean")."""
182
+
183
+ value: Optional[str] = None
184
+ """Value assigned to the tag."""
185
+
186
+
187
+ class TechnicalData(BaseModel):
188
+ active_aml_suspicions: Optional[bool] = None
189
+ """
190
+ Flag indicating whether there are active research AML (Anti-Money Laundering)
191
+ suspicions for the object when you apply for a new entry or get an existing one.
192
+ """
193
+
194
+ api_version: Optional[int] = None
195
+ """Version number of the API used."""
196
+
197
+ approved_at: Optional[datetime] = None
198
+ """Timestamp when the request or process was approved."""
199
+
200
+ callback_url: Optional[str] = None
201
+ """URL to receive callback data from the AML system."""
202
+
203
+ callback_url_notification: Optional[str] = None
204
+ """URL to receive notification updates about the processing status."""
205
+
206
+ disable_notification: Optional[bool] = None
207
+ """Flag to indicate if notifications are disabled."""
208
+
209
+ disable_notification_date: Optional[datetime] = None
210
+ """Timestamp when notifications were disabled; null if never disabled."""
211
+
212
+ export_type: Optional[str] = None
213
+ """Export format defined by the API (e.g., "json", "xml")."""
214
+
215
+ finished_at: Optional[datetime] = None
216
+ """Timestamp when the process finished."""
217
+
218
+ ip: Optional[str] = None
219
+ """IP address of the our system handling the request."""
220
+
221
+ language: Optional[str] = None
222
+ """Language preference used in the client workspace (e.g., "fra")."""
223
+
224
+ location_ip: Optional[str] = None
225
+ """IP address of the end client (final user) captured."""
226
+
227
+ need_review_at: Optional[datetime] = None
228
+ """Timestamp indicating when the request or process needs review; null if none."""
229
+
230
+ notification_confirmation: Optional[bool] = None
231
+ """Flag indicating if notification confirmation is required or received."""
232
+
233
+ qr_code: Optional[str] = None
234
+ """Indicates whether QR code is enabled ("true" or "false")."""
235
+
236
+ raw_data: Optional[bool] = None
237
+ """Flag indicating whether to include raw data in the response."""
238
+
239
+ rejected_at: Optional[datetime] = None
240
+ """Timestamp when the request or process was rejected; null if not rejected."""
241
+
242
+ session_duration: Optional[int] = None
243
+ """Duration of the user session in seconds."""
244
+
245
+ started_at: Optional[datetime] = None
246
+ """Timestamp when the process started."""
247
+
248
+ transfer_at: Optional[datetime] = None
249
+ """Date/time of data transfer."""
250
+
251
+ transfer_mode: Optional[str] = None
252
+ """Mode of data transfer."""
253
+
254
+
255
+ class Individual(BaseModel):
256
+ id: Optional[str] = None
257
+ """Unique identifier of the individual."""
258
+
259
+ aml_suspicions: Optional[List[AmlSuspicion]] = None
260
+ """List of AML (Anti-Money Laundering) suspicion entries linked to the individual."""
261
+
262
+ auth_url: Optional[str] = None
263
+ """URL to authenticate the individual, usually for document signing or onboarding."""
264
+
265
+ certificat: Optional[Certificat] = None
266
+ """Digital certificate associated with the individual, if any."""
267
+
268
+ checks: Optional[List[Check]] = None
269
+ """List of verification or validation checks applied to the individual."""
270
+
271
+ created_at: Optional[datetime] = None
272
+ """Timestamp of the individual's creation in ISO 8601 format."""
273
+
274
+ documents: Optional[List[GenericDocument]] = None
275
+ """All documents submitted or associated with the individual."""
276
+
277
+ identity_card: Optional[IdentityCard] = None
278
+ """Reference to the individual's identity document."""
279
+
280
+ number: Optional[int] = None
281
+ """Internal sequential number or reference for the individual."""
282
+
283
+ person: Optional[Person] = None
284
+ """
285
+ Personal details of the individual, such as name, date of birth, and contact
286
+ info.
287
+ """
288
+
289
+ portal_url: Optional[str] = None
290
+ """Admin or internal portal URL for viewing the individual's details."""
291
+
292
+ properties: Optional[List[Property]] = None
293
+ """Custom key-value metadata fields associated with the individual."""
294
+
295
+ risk: Optional[Risk] = None
296
+ """Risk assessment associated with the individual."""
297
+
298
+ source_id: Optional[str] = None
299
+ """Optional identifier indicating the source of the individual record."""
300
+
301
+ state: Optional[str] = None
302
+ """
303
+ Current operational state in the workflow (e.g., WAITING, IN_PROGRESS,
304
+ COMPLETED).
305
+ """
306
+
307
+ status: Optional[str] = None
308
+ """
309
+ Overall processing status of the individual (e.g., rejected, need_review,
310
+ approved).
311
+ """
312
+
313
+ tags: Optional[List[Tag]] = None
314
+ """
315
+ List of tags assigned to the individual for categorization or metadata purposes.
316
+ """
317
+
318
+ technical_data: Optional[TechnicalData] = None
319
+ """Technical metadata related to the request (e.g., QR code settings, language)."""
320
+
321
+ webview_url: Optional[str] = None
322
+ """Public-facing webview URL for the individual’s identification process."""
323
+
324
+ workspace_id: Optional[str] = None
325
+ """Identifier of the workspace to which the individual belongs."""
@@ -0,0 +1,68 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, TypedDict
6
+
7
+ __all__ = ["IndividualCreateParams", "Person", "TechnicalData"]
8
+
9
+
10
+ class IndividualCreateParams(TypedDict, total=False):
11
+ workspace_id: Required[str]
12
+ """Unique identifier of the workspace where the individual is being registered."""
13
+
14
+ person: Person
15
+ """Personal information about the individual."""
16
+
17
+ source_id: str
18
+ """
19
+ Optional identifier for tracking the source system or integration from your
20
+ system.
21
+ """
22
+
23
+ technical_data: TechnicalData
24
+ """Technical metadata related to the request or processing."""
25
+
26
+
27
+ class Person(TypedDict, total=False):
28
+ birthday: str
29
+ """Date of birth in DD/MM/YYYY format."""
30
+
31
+ email: str
32
+ """Email address of the individual."""
33
+
34
+ first_name: str
35
+ """First name of the individual."""
36
+
37
+ gender: Literal["M", "F"]
38
+ """Gender of the individual (M for male, F for female)."""
39
+
40
+ last_name: str
41
+ """Last name (family name) of the individual."""
42
+
43
+ maiden_name: str
44
+ """Maiden name, if applicable."""
45
+
46
+ phone_number: str
47
+ """Phone number of the individual."""
48
+
49
+
50
+ class TechnicalData(TypedDict, total=False):
51
+ active_aml_suspicions: bool
52
+ """
53
+ Flag indicating whether there are active research AML (Anti-Money Laundering)
54
+ suspicions for the individual when you apply for a new entry or get an existing
55
+ one.
56
+ """
57
+
58
+ callback_url: str
59
+ """URL to call back upon completion of processing."""
60
+
61
+ callback_url_notification: str
62
+ """URL for receive notifications about the processing state or status."""
63
+
64
+ language: str
65
+ """Preferred language for communication (e.g., "eng", "fra")."""
66
+
67
+ raw_data: bool
68
+ """Flag indicating whether to include raw data in the response."""
@@ -0,0 +1,37 @@
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, Annotated, TypedDict
8
+
9
+ from .._utils import PropertyInfo
10
+
11
+ __all__ = ["IndividualListParams"]
12
+
13
+
14
+ class IndividualListParams(TypedDict, total=False):
15
+ end_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")]
16
+ """Filter individuals created before this date (format YYYY-MM-DD)"""
17
+
18
+ limit: int
19
+ """Number of results to return (between 1 and 100)"""
20
+
21
+ offset: int
22
+ """Number of results to offset (must be ≥ 0)"""
23
+
24
+ source_id: str
25
+ """Filter by source ID"""
26
+
27
+ start_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")]
28
+ """Filter individuals created after this date (format YYYY-MM-DD)"""
29
+
30
+ state: Literal["VOID", "WAITING", "STARTED", "RUNNING", "PROCESSED", "FAILED", "ABORTED", "EXPIRED", "DELETED"]
31
+ """Filter by individual status (must be one of the allowed values)"""
32
+
33
+ status: Literal["rejected", "need_review", "approved"]
34
+ """Filter by individual status (must be one of the allowed values)"""
35
+
36
+ workspace_id: str
37
+ """Filter by workspace ID"""
@@ -0,0 +1,10 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List
4
+ from typing_extensions import TypeAlias
5
+
6
+ from .individual import Individual
7
+
8
+ __all__ = ["IndividualListResponse"]
9
+
10
+ IndividualListResponse: TypeAlias = List[Individual]
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ __all__ = ["IndividualRetrieveParams"]
8
+
9
+
10
+ class IndividualRetrieveParams(TypedDict, total=False):
11
+ document: bool
12
+ """Include document information"""
13
+
14
+ scope: str
15
+ """Scope filter (id or scope)"""
@@ -0,0 +1,68 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, TypedDict
6
+
7
+ __all__ = ["IndividualUpdateParams", "Person", "TechnicalData"]
8
+
9
+
10
+ class IndividualUpdateParams(TypedDict, total=False):
11
+ workspace_id: Required[str]
12
+ """Unique identifier of the workspace where the individual is being registered."""
13
+
14
+ person: Person
15
+ """Personal information about the individual."""
16
+
17
+ source_id: str
18
+ """
19
+ Optional identifier for tracking the source system or integration from your
20
+ system.
21
+ """
22
+
23
+ technical_data: TechnicalData
24
+ """Technical metadata related to the request or processing."""
25
+
26
+
27
+ class Person(TypedDict, total=False):
28
+ birthday: str
29
+ """Date of birth in DD/MM/YYYY format."""
30
+
31
+ email: str
32
+ """Email address of the individual."""
33
+
34
+ first_name: str
35
+ """First name of the individual."""
36
+
37
+ gender: Literal["M", "F"]
38
+ """Gender of the individual (M for male, F for female)."""
39
+
40
+ last_name: str
41
+ """Last name (family name) of the individual."""
42
+
43
+ maiden_name: str
44
+ """Maiden name, if applicable."""
45
+
46
+ phone_number: str
47
+ """Phone number of the individual."""
48
+
49
+
50
+ class TechnicalData(TypedDict, total=False):
51
+ active_aml_suspicions: bool
52
+ """
53
+ Flag indicating whether there are active research AML (Anti-Money Laundering)
54
+ suspicions for the individual when you apply for a new entry or get an existing
55
+ one.
56
+ """
57
+
58
+ callback_url: str
59
+ """URL to call back upon completion of processing."""
60
+
61
+ callback_url_notification: str
62
+ """URL for receive notifications about the processing state or status."""
63
+
64
+ language: str
65
+ """Preferred language for communication (e.g., "eng", "fra")."""
66
+
67
+ raw_data: bool
68
+ """Flag indicating whether to include raw data in the response."""
@@ -0,0 +1,7 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .generic_document import GenericDocument as GenericDocument
6
+ from .document_response import DocumentResponse as DocumentResponse
7
+ from .document_upload_params import DocumentUploadParams as DocumentUploadParams
@@ -0,0 +1,41 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["DocumentResponse", "Document"]
8
+
9
+
10
+ class Document(BaseModel):
11
+ id: Optional[str] = None
12
+ """Unique identifier of the document."""
13
+
14
+ document_type: Optional[str] = None
15
+ """Functional type of the document (e.g., identity document, invoice)."""
16
+
17
+ filename: Optional[str] = None
18
+ """Original filename of the uploaded document."""
19
+
20
+ name: Optional[str] = None
21
+ """Human-readable name of the document."""
22
+
23
+ signed_url: Optional[str] = None
24
+ """Secure URL to access the document."""
25
+
26
+ state: Optional[str] = None
27
+ """Processing state of the document (e.g., WAITING, STARTED, RUNNING, PROCESSED)."""
28
+
29
+ status: Optional[str] = None
30
+ """Validation status of the document (e.g., need_review, approved, rejected)."""
31
+
32
+ workspace_id: Optional[str] = None
33
+ """Identifier of the workspace to which the document belongs."""
34
+
35
+
36
+ class DocumentResponse(BaseModel):
37
+ documents: Optional[List[Document]] = None
38
+ """List of documents associated with the response."""
39
+
40
+ total_document: Optional[int] = None
41
+ """Total number of documents available in the response."""