worqhat 3.5.0__py3-none-any.whl → 3.9.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.
Files changed (53) hide show
  1. worqhat/__init__.py +3 -1
  2. worqhat/_base_client.py +12 -12
  3. worqhat/_client.py +20 -11
  4. worqhat/_compat.py +48 -48
  5. worqhat/_models.py +51 -45
  6. worqhat/_qs.py +7 -7
  7. worqhat/_types.py +53 -12
  8. worqhat/_utils/__init__.py +9 -2
  9. worqhat/_utils/_compat.py +45 -0
  10. worqhat/_utils/_datetime_parse.py +136 -0
  11. worqhat/_utils/_transform.py +13 -3
  12. worqhat/_utils/_typing.py +6 -1
  13. worqhat/_utils/_utils.py +4 -5
  14. worqhat/_version.py +1 -1
  15. worqhat/resources/__init__.py +14 -0
  16. worqhat/resources/db/__init__.py +33 -0
  17. worqhat/resources/{db.py → db/db.py} +255 -48
  18. worqhat/resources/db/tables.py +389 -0
  19. worqhat/resources/flows.py +29 -23
  20. worqhat/resources/health.py +3 -3
  21. worqhat/resources/storage.py +462 -0
  22. worqhat/types/__init__.py +10 -0
  23. worqhat/types/db/__init__.py +10 -0
  24. worqhat/types/db/table_get_row_count_params.py +12 -0
  25. worqhat/types/db/table_get_row_count_response.py +15 -0
  26. worqhat/types/db/table_list_params.py +15 -0
  27. worqhat/types/db/table_list_response.py +26 -0
  28. worqhat/types/db/table_retrieve_schema_params.py +12 -0
  29. worqhat/types/db/table_retrieve_schema_response.py +29 -0
  30. worqhat/types/db_delete_records_params.py +6 -2
  31. worqhat/types/db_delete_records_response.py +2 -2
  32. worqhat/types/db_execute_batch_params.py +36 -0
  33. worqhat/types/db_execute_batch_response.py +27 -0
  34. worqhat/types/db_execute_query_params.py +14 -2
  35. worqhat/types/db_execute_query_response.py +2 -2
  36. worqhat/types/db_insert_record_params.py +6 -2
  37. worqhat/types/db_insert_record_response.py +2 -2
  38. worqhat/types/db_process_nl_query_params.py +7 -3
  39. worqhat/types/db_process_nl_query_response.py +2 -2
  40. worqhat/types/db_update_records_params.py +7 -3
  41. worqhat/types/db_update_records_response.py +2 -2
  42. worqhat/types/flow_trigger_with_payload_params.py +3 -2
  43. worqhat/types/storage_delete_file_by_id_response.py +18 -0
  44. worqhat/types/storage_retrieve_file_by_id_response.py +33 -0
  45. worqhat/types/storage_retrieve_file_by_path_params.py +12 -0
  46. worqhat/types/storage_retrieve_file_by_path_response.py +33 -0
  47. worqhat/types/storage_upload_file_params.py +17 -0
  48. worqhat/types/storage_upload_file_response.py +33 -0
  49. {worqhat-3.5.0.dist-info → worqhat-3.9.0.dist-info}/METADATA +2 -2
  50. worqhat-3.9.0.dist-info/RECORD +73 -0
  51. worqhat-3.5.0.dist-info/RECORD +0 -53
  52. {worqhat-3.5.0.dist-info → worqhat-3.9.0.dist-info}/WHEEL +0 -0
  53. {worqhat-3.5.0.dist-info → worqhat-3.9.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,462 @@
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 Mapping, cast
6
+
7
+ import httpx
8
+
9
+ from ..types import storage_upload_file_params, storage_retrieve_file_by_path_params
10
+ from .._types import Body, Omit, Query, Headers, NotGiven, FileTypes, omit, not_given
11
+ from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
12
+ from .._compat import cached_property
13
+ from .._resource import SyncAPIResource, AsyncAPIResource
14
+ from .._response import (
15
+ to_raw_response_wrapper,
16
+ to_streamed_response_wrapper,
17
+ async_to_raw_response_wrapper,
18
+ async_to_streamed_response_wrapper,
19
+ )
20
+ from .._base_client import make_request_options
21
+ from ..types.storage_upload_file_response import StorageUploadFileResponse
22
+ from ..types.storage_delete_file_by_id_response import StorageDeleteFileByIDResponse
23
+ from ..types.storage_retrieve_file_by_id_response import StorageRetrieveFileByIDResponse
24
+ from ..types.storage_retrieve_file_by_path_response import StorageRetrieveFileByPathResponse
25
+
26
+ __all__ = ["StorageResource", "AsyncStorageResource"]
27
+
28
+
29
+ class StorageResource(SyncAPIResource):
30
+ @cached_property
31
+ def with_raw_response(self) -> StorageResourceWithRawResponse:
32
+ """
33
+ This property can be used as a prefix for any HTTP method call to return
34
+ the raw response object instead of the parsed content.
35
+
36
+ For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#accessing-raw-response-data-eg-headers
37
+ """
38
+ return StorageResourceWithRawResponse(self)
39
+
40
+ @cached_property
41
+ def with_streaming_response(self) -> StorageResourceWithStreamingResponse:
42
+ """
43
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
44
+
45
+ For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#with_streaming_response
46
+ """
47
+ return StorageResourceWithStreamingResponse(self)
48
+
49
+ def delete_file_by_id(
50
+ self,
51
+ file_id: str,
52
+ *,
53
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
54
+ # The extra values given here take precedence over values defined on the client or passed to this method.
55
+ extra_headers: Headers | None = None,
56
+ extra_query: Query | None = None,
57
+ extra_body: Body | None = None,
58
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
59
+ ) -> StorageDeleteFileByIDResponse:
60
+ """Permanently deletes a file from storage by its unique ID.
61
+
62
+ This action cannot be
63
+ undone.
64
+
65
+ Args:
66
+ extra_headers: Send extra headers
67
+
68
+ extra_query: Add additional query parameters to the request
69
+
70
+ extra_body: Add additional JSON properties to the request
71
+
72
+ timeout: Override the client-level default timeout for this request, in seconds
73
+ """
74
+ if not file_id:
75
+ raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}")
76
+ return self._delete(
77
+ f"/storage/delete/{file_id}",
78
+ options=make_request_options(
79
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
80
+ ),
81
+ cast_to=StorageDeleteFileByIDResponse,
82
+ )
83
+
84
+ def retrieve_file_by_id(
85
+ self,
86
+ file_id: str,
87
+ *,
88
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
89
+ # The extra values given here take precedence over values defined on the client or passed to this method.
90
+ extra_headers: Headers | None = None,
91
+ extra_query: Query | None = None,
92
+ extra_body: Body | None = None,
93
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
94
+ ) -> StorageRetrieveFileByIDResponse:
95
+ """Retrieves a file from storage by its unique ID.
96
+
97
+ Returns the file metadata and a
98
+ download URL.
99
+
100
+ Args:
101
+ extra_headers: Send extra headers
102
+
103
+ extra_query: Add additional query parameters to the request
104
+
105
+ extra_body: Add additional JSON properties to the request
106
+
107
+ timeout: Override the client-level default timeout for this request, in seconds
108
+ """
109
+ if not file_id:
110
+ raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}")
111
+ return self._get(
112
+ f"/storage/fetch/{file_id}",
113
+ options=make_request_options(
114
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
115
+ ),
116
+ cast_to=StorageRetrieveFileByIDResponse,
117
+ )
118
+
119
+ def retrieve_file_by_path(
120
+ self,
121
+ *,
122
+ filepath: str,
123
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
124
+ # The extra values given here take precedence over values defined on the client or passed to this method.
125
+ extra_headers: Headers | None = None,
126
+ extra_query: Query | None = None,
127
+ extra_body: Body | None = None,
128
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
129
+ ) -> StorageRetrieveFileByPathResponse:
130
+ """
131
+ Retrieves a file from storage by its path within the organization's storage.
132
+ Returns the file metadata and a download URL.
133
+
134
+ Args:
135
+ filepath: Path to the file within organization storage
136
+
137
+ extra_headers: Send extra headers
138
+
139
+ extra_query: Add additional query parameters to the request
140
+
141
+ extra_body: Add additional JSON properties to the request
142
+
143
+ timeout: Override the client-level default timeout for this request, in seconds
144
+ """
145
+ return self._get(
146
+ "/storage/fetch-by-path",
147
+ options=make_request_options(
148
+ extra_headers=extra_headers,
149
+ extra_query=extra_query,
150
+ extra_body=extra_body,
151
+ timeout=timeout,
152
+ query=maybe_transform(
153
+ {"filepath": filepath}, storage_retrieve_file_by_path_params.StorageRetrieveFileByPathParams
154
+ ),
155
+ ),
156
+ cast_to=StorageRetrieveFileByPathResponse,
157
+ )
158
+
159
+ def upload_file(
160
+ self,
161
+ *,
162
+ file: FileTypes,
163
+ path: str | Omit = omit,
164
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
165
+ # The extra values given here take precedence over values defined on the client or passed to this method.
166
+ extra_headers: Headers | None = None,
167
+ extra_query: Query | None = None,
168
+ extra_body: Body | None = None,
169
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
170
+ ) -> StorageUploadFileResponse:
171
+ """Uploads a file to S3 storage and returns the file ID and metadata.
172
+
173
+ Optionally
174
+ specify a custom path within the organization's storage bucket.
175
+
176
+ Args:
177
+ file: File to upload (max 50MB)
178
+
179
+ path: Optional custom path within organization storage
180
+
181
+ extra_headers: Send extra headers
182
+
183
+ extra_query: Add additional query parameters to the request
184
+
185
+ extra_body: Add additional JSON properties to the request
186
+
187
+ timeout: Override the client-level default timeout for this request, in seconds
188
+ """
189
+ body = deepcopy_minimal(
190
+ {
191
+ "file": file,
192
+ "path": path,
193
+ }
194
+ )
195
+ files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
196
+ # It should be noted that the actual Content-Type header that will be
197
+ # sent to the server will contain a `boundary` parameter, e.g.
198
+ # multipart/form-data; boundary=---abc--
199
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
200
+ return self._post(
201
+ "/storage/upload",
202
+ body=maybe_transform(body, storage_upload_file_params.StorageUploadFileParams),
203
+ files=files,
204
+ options=make_request_options(
205
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
206
+ ),
207
+ cast_to=StorageUploadFileResponse,
208
+ )
209
+
210
+
211
+ class AsyncStorageResource(AsyncAPIResource):
212
+ @cached_property
213
+ def with_raw_response(self) -> AsyncStorageResourceWithRawResponse:
214
+ """
215
+ This property can be used as a prefix for any HTTP method call to return
216
+ the raw response object instead of the parsed content.
217
+
218
+ For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#accessing-raw-response-data-eg-headers
219
+ """
220
+ return AsyncStorageResourceWithRawResponse(self)
221
+
222
+ @cached_property
223
+ def with_streaming_response(self) -> AsyncStorageResourceWithStreamingResponse:
224
+ """
225
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
226
+
227
+ For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#with_streaming_response
228
+ """
229
+ return AsyncStorageResourceWithStreamingResponse(self)
230
+
231
+ async def delete_file_by_id(
232
+ self,
233
+ file_id: str,
234
+ *,
235
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
236
+ # The extra values given here take precedence over values defined on the client or passed to this method.
237
+ extra_headers: Headers | None = None,
238
+ extra_query: Query | None = None,
239
+ extra_body: Body | None = None,
240
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
241
+ ) -> StorageDeleteFileByIDResponse:
242
+ """Permanently deletes a file from storage by its unique ID.
243
+
244
+ This action cannot be
245
+ undone.
246
+
247
+ Args:
248
+ extra_headers: Send extra headers
249
+
250
+ extra_query: Add additional query parameters to the request
251
+
252
+ extra_body: Add additional JSON properties to the request
253
+
254
+ timeout: Override the client-level default timeout for this request, in seconds
255
+ """
256
+ if not file_id:
257
+ raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}")
258
+ return await self._delete(
259
+ f"/storage/delete/{file_id}",
260
+ options=make_request_options(
261
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
262
+ ),
263
+ cast_to=StorageDeleteFileByIDResponse,
264
+ )
265
+
266
+ async def retrieve_file_by_id(
267
+ self,
268
+ file_id: str,
269
+ *,
270
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
271
+ # The extra values given here take precedence over values defined on the client or passed to this method.
272
+ extra_headers: Headers | None = None,
273
+ extra_query: Query | None = None,
274
+ extra_body: Body | None = None,
275
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
276
+ ) -> StorageRetrieveFileByIDResponse:
277
+ """Retrieves a file from storage by its unique ID.
278
+
279
+ Returns the file metadata and a
280
+ download URL.
281
+
282
+ Args:
283
+ extra_headers: Send extra headers
284
+
285
+ extra_query: Add additional query parameters to the request
286
+
287
+ extra_body: Add additional JSON properties to the request
288
+
289
+ timeout: Override the client-level default timeout for this request, in seconds
290
+ """
291
+ if not file_id:
292
+ raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}")
293
+ return await self._get(
294
+ f"/storage/fetch/{file_id}",
295
+ options=make_request_options(
296
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
297
+ ),
298
+ cast_to=StorageRetrieveFileByIDResponse,
299
+ )
300
+
301
+ async def retrieve_file_by_path(
302
+ self,
303
+ *,
304
+ filepath: str,
305
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
306
+ # The extra values given here take precedence over values defined on the client or passed to this method.
307
+ extra_headers: Headers | None = None,
308
+ extra_query: Query | None = None,
309
+ extra_body: Body | None = None,
310
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
311
+ ) -> StorageRetrieveFileByPathResponse:
312
+ """
313
+ Retrieves a file from storage by its path within the organization's storage.
314
+ Returns the file metadata and a download URL.
315
+
316
+ Args:
317
+ filepath: Path to the file within organization storage
318
+
319
+ extra_headers: Send extra headers
320
+
321
+ extra_query: Add additional query parameters to the request
322
+
323
+ extra_body: Add additional JSON properties to the request
324
+
325
+ timeout: Override the client-level default timeout for this request, in seconds
326
+ """
327
+ return await self._get(
328
+ "/storage/fetch-by-path",
329
+ options=make_request_options(
330
+ extra_headers=extra_headers,
331
+ extra_query=extra_query,
332
+ extra_body=extra_body,
333
+ timeout=timeout,
334
+ query=await async_maybe_transform(
335
+ {"filepath": filepath}, storage_retrieve_file_by_path_params.StorageRetrieveFileByPathParams
336
+ ),
337
+ ),
338
+ cast_to=StorageRetrieveFileByPathResponse,
339
+ )
340
+
341
+ async def upload_file(
342
+ self,
343
+ *,
344
+ file: FileTypes,
345
+ path: str | Omit = omit,
346
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
347
+ # The extra values given here take precedence over values defined on the client or passed to this method.
348
+ extra_headers: Headers | None = None,
349
+ extra_query: Query | None = None,
350
+ extra_body: Body | None = None,
351
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
352
+ ) -> StorageUploadFileResponse:
353
+ """Uploads a file to S3 storage and returns the file ID and metadata.
354
+
355
+ Optionally
356
+ specify a custom path within the organization's storage bucket.
357
+
358
+ Args:
359
+ file: File to upload (max 50MB)
360
+
361
+ path: Optional custom path within organization storage
362
+
363
+ extra_headers: Send extra headers
364
+
365
+ extra_query: Add additional query parameters to the request
366
+
367
+ extra_body: Add additional JSON properties to the request
368
+
369
+ timeout: Override the client-level default timeout for this request, in seconds
370
+ """
371
+ body = deepcopy_minimal(
372
+ {
373
+ "file": file,
374
+ "path": path,
375
+ }
376
+ )
377
+ files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
378
+ # It should be noted that the actual Content-Type header that will be
379
+ # sent to the server will contain a `boundary` parameter, e.g.
380
+ # multipart/form-data; boundary=---abc--
381
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
382
+ return await self._post(
383
+ "/storage/upload",
384
+ body=await async_maybe_transform(body, storage_upload_file_params.StorageUploadFileParams),
385
+ files=files,
386
+ options=make_request_options(
387
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
388
+ ),
389
+ cast_to=StorageUploadFileResponse,
390
+ )
391
+
392
+
393
+ class StorageResourceWithRawResponse:
394
+ def __init__(self, storage: StorageResource) -> None:
395
+ self._storage = storage
396
+
397
+ self.delete_file_by_id = to_raw_response_wrapper(
398
+ storage.delete_file_by_id,
399
+ )
400
+ self.retrieve_file_by_id = to_raw_response_wrapper(
401
+ storage.retrieve_file_by_id,
402
+ )
403
+ self.retrieve_file_by_path = to_raw_response_wrapper(
404
+ storage.retrieve_file_by_path,
405
+ )
406
+ self.upload_file = to_raw_response_wrapper(
407
+ storage.upload_file,
408
+ )
409
+
410
+
411
+ class AsyncStorageResourceWithRawResponse:
412
+ def __init__(self, storage: AsyncStorageResource) -> None:
413
+ self._storage = storage
414
+
415
+ self.delete_file_by_id = async_to_raw_response_wrapper(
416
+ storage.delete_file_by_id,
417
+ )
418
+ self.retrieve_file_by_id = async_to_raw_response_wrapper(
419
+ storage.retrieve_file_by_id,
420
+ )
421
+ self.retrieve_file_by_path = async_to_raw_response_wrapper(
422
+ storage.retrieve_file_by_path,
423
+ )
424
+ self.upload_file = async_to_raw_response_wrapper(
425
+ storage.upload_file,
426
+ )
427
+
428
+
429
+ class StorageResourceWithStreamingResponse:
430
+ def __init__(self, storage: StorageResource) -> None:
431
+ self._storage = storage
432
+
433
+ self.delete_file_by_id = to_streamed_response_wrapper(
434
+ storage.delete_file_by_id,
435
+ )
436
+ self.retrieve_file_by_id = to_streamed_response_wrapper(
437
+ storage.retrieve_file_by_id,
438
+ )
439
+ self.retrieve_file_by_path = to_streamed_response_wrapper(
440
+ storage.retrieve_file_by_path,
441
+ )
442
+ self.upload_file = to_streamed_response_wrapper(
443
+ storage.upload_file,
444
+ )
445
+
446
+
447
+ class AsyncStorageResourceWithStreamingResponse:
448
+ def __init__(self, storage: AsyncStorageResource) -> None:
449
+ self._storage = storage
450
+
451
+ self.delete_file_by_id = async_to_streamed_response_wrapper(
452
+ storage.delete_file_by_id,
453
+ )
454
+ self.retrieve_file_by_id = async_to_streamed_response_wrapper(
455
+ storage.retrieve_file_by_id,
456
+ )
457
+ self.retrieve_file_by_path = async_to_streamed_response_wrapper(
458
+ storage.retrieve_file_by_path,
459
+ )
460
+ self.upload_file = async_to_streamed_response_wrapper(
461
+ storage.upload_file,
462
+ )
worqhat/types/__init__.py CHANGED
@@ -3,20 +3,30 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from .health_check_response import HealthCheckResponse as HealthCheckResponse
6
+ from .db_execute_batch_params import DBExecuteBatchParams as DBExecuteBatchParams
6
7
  from .db_execute_query_params import DBExecuteQueryParams as DBExecuteQueryParams
7
8
  from .db_insert_record_params import DBInsertRecordParams as DBInsertRecordParams
8
9
  from .flow_get_metrics_params import FlowGetMetricsParams as FlowGetMetricsParams
9
10
  from .db_delete_records_params import DBDeleteRecordsParams as DBDeleteRecordsParams
10
11
  from .db_update_records_params import DBUpdateRecordsParams as DBUpdateRecordsParams
11
12
  from .get_server_info_response import GetServerInfoResponse as GetServerInfoResponse
13
+ from .db_execute_batch_response import DBExecuteBatchResponse as DBExecuteBatchResponse
12
14
  from .db_execute_query_response import DBExecuteQueryResponse as DBExecuteQueryResponse
13
15
  from .db_insert_record_response import DBInsertRecordResponse as DBInsertRecordResponse
14
16
  from .flow_get_metrics_response import FlowGetMetricsResponse as FlowGetMetricsResponse
15
17
  from .db_delete_records_response import DBDeleteRecordsResponse as DBDeleteRecordsResponse
16
18
  from .db_process_nl_query_params import DBProcessNlQueryParams as DBProcessNlQueryParams
17
19
  from .db_update_records_response import DBUpdateRecordsResponse as DBUpdateRecordsResponse
20
+ from .storage_upload_file_params import StorageUploadFileParams as StorageUploadFileParams
18
21
  from .db_process_nl_query_response import DBProcessNlQueryResponse as DBProcessNlQueryResponse
22
+ from .storage_upload_file_response import StorageUploadFileResponse as StorageUploadFileResponse
19
23
  from .flow_trigger_with_file_params import FlowTriggerWithFileParams as FlowTriggerWithFileParams
20
24
  from .flow_trigger_with_file_response import FlowTriggerWithFileResponse as FlowTriggerWithFileResponse
21
25
  from .flow_trigger_with_payload_params import FlowTriggerWithPayloadParams as FlowTriggerWithPayloadParams
22
26
  from .flow_trigger_with_payload_response import FlowTriggerWithPayloadResponse as FlowTriggerWithPayloadResponse
27
+ from .storage_delete_file_by_id_response import StorageDeleteFileByIDResponse as StorageDeleteFileByIDResponse
28
+ from .storage_retrieve_file_by_id_response import StorageRetrieveFileByIDResponse as StorageRetrieveFileByIDResponse
29
+ from .storage_retrieve_file_by_path_params import StorageRetrieveFileByPathParams as StorageRetrieveFileByPathParams
30
+ from .storage_retrieve_file_by_path_response import (
31
+ StorageRetrieveFileByPathResponse as StorageRetrieveFileByPathResponse,
32
+ )
@@ -0,0 +1,10 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .table_list_params import TableListParams as TableListParams
6
+ from .table_list_response import TableListResponse as TableListResponse
7
+ from .table_get_row_count_params import TableGetRowCountParams as TableGetRowCountParams
8
+ from .table_get_row_count_response import TableGetRowCountResponse as TableGetRowCountResponse
9
+ from .table_retrieve_schema_params import TableRetrieveSchemaParams as TableRetrieveSchemaParams
10
+ from .table_retrieve_schema_response import TableRetrieveSchemaResponse as TableRetrieveSchemaResponse
@@ -0,0 +1,12 @@
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, TypedDict
6
+
7
+ __all__ = ["TableGetRowCountParams"]
8
+
9
+
10
+ class TableGetRowCountParams(TypedDict, total=False):
11
+ environment: Literal["development", "staging", "production"]
12
+ """Environment to query"""
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["TableGetRowCountResponse"]
8
+
9
+
10
+ class TableGetRowCountResponse(BaseModel):
11
+ count: Optional[int] = None
12
+
13
+ success: Optional[bool] = None
14
+
15
+ table: Optional[str] = None
@@ -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 Literal, TypedDict
6
+
7
+ __all__ = ["TableListParams"]
8
+
9
+
10
+ class TableListParams(TypedDict, total=False):
11
+ environment: Literal["development", "staging", "production"]
12
+ """Environment to query (development, staging, production)"""
13
+
14
+ schema: str
15
+ """Database schema to filter tables"""
@@ -0,0 +1,26 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+
5
+ from pydantic import Field as FieldInfo
6
+
7
+ from ..._models import BaseModel
8
+
9
+ __all__ = ["TableListResponse", "Table"]
10
+
11
+
12
+ class Table(BaseModel):
13
+ name: Optional[str] = None
14
+
15
+ schema_: Optional[str] = FieldInfo(alias="schema", default=None)
16
+
17
+ type: Optional[str] = None
18
+
19
+
20
+ class TableListResponse(BaseModel):
21
+ count: Optional[int] = None
22
+ """Total number of tables"""
23
+
24
+ success: Optional[bool] = None
25
+
26
+ tables: Optional[List[Table]] = None
@@ -0,0 +1,12 @@
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, TypedDict
6
+
7
+ __all__ = ["TableRetrieveSchemaParams"]
8
+
9
+
10
+ class TableRetrieveSchemaParams(TypedDict, total=False):
11
+ environment: Literal["development", "staging", "production"]
12
+ """Environment to query"""
@@ -0,0 +1,29 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+
5
+ from pydantic import Field as FieldInfo
6
+
7
+ from ..._models import BaseModel
8
+
9
+ __all__ = ["TableRetrieveSchemaResponse", "Column"]
10
+
11
+
12
+ class Column(BaseModel):
13
+ default: Optional[str] = None
14
+
15
+ is_primary_key: Optional[bool] = FieldInfo(alias="isPrimaryKey", default=None)
16
+
17
+ name: Optional[str] = None
18
+
19
+ nullable: Optional[bool] = None
20
+
21
+ type: Optional[str] = None
22
+
23
+
24
+ class TableRetrieveSchemaResponse(BaseModel):
25
+ columns: Optional[List[Column]] = None
26
+
27
+ success: Optional[bool] = None
28
+
29
+ table: Optional[str] = None
@@ -2,7 +2,8 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing_extensions import Required, TypedDict
5
+ from typing import Dict
6
+ from typing_extensions import Literal, Required, TypedDict
6
7
 
7
8
  __all__ = ["DBDeleteRecordsParams"]
8
9
 
@@ -11,5 +12,8 @@ class DBDeleteRecordsParams(TypedDict, total=False):
11
12
  table: Required[str]
12
13
  """Table name to delete from"""
13
14
 
14
- where: Required[object]
15
+ where: Required[Dict[str, object]]
15
16
  """Where conditions"""
17
+
18
+ environment: Literal["development", "staging", "production"]
19
+ """Environment to delete from (development, staging, production)"""
@@ -1,6 +1,6 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from typing import List, Optional
3
+ from typing import Dict, List, Optional
4
4
 
5
5
  from .._models import BaseModel
6
6
 
@@ -11,7 +11,7 @@ class DBDeleteRecordsResponse(BaseModel):
11
11
  count: Optional[int] = None
12
12
  """Number of records deleted"""
13
13
 
14
- data: Optional[List[object]] = None
14
+ data: Optional[List[Dict[str, object]]] = None
15
15
 
16
16
  message: Optional[str] = None
17
17