worqhat 3.2.0__py3-none-any.whl → 3.5.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.
- worqhat/_base_client.py +4 -1
- worqhat/_client.py +24 -16
- worqhat/_files.py +5 -5
- worqhat/_version.py +1 -1
- worqhat/resources/__init__.py +14 -0
- worqhat/resources/db.py +593 -0
- worqhat/resources/flows.py +235 -21
- worqhat/types/__init__.py +17 -3
- worqhat/types/db_delete_records_params.py +15 -0
- worqhat/types/db_delete_records_response.py +18 -0
- worqhat/types/db_execute_query_params.py +12 -0
- worqhat/types/db_execute_query_response.py +21 -0
- worqhat/types/db_insert_record_params.py +15 -0
- worqhat/types/db_insert_record_response.py +15 -0
- worqhat/types/db_process_nl_query_params.py +15 -0
- worqhat/types/db_process_nl_query_response.py +18 -0
- worqhat/types/db_update_records_params.py +18 -0
- worqhat/types/db_update_records_response.py +18 -0
- worqhat/types/{flow_retrieve_metrics_params.py → flow_get_metrics_params.py} +2 -2
- worqhat/types/{flow_retrieve_metrics_response.py → flow_get_metrics_response.py} +2 -2
- worqhat/types/flow_trigger_with_file_params.py +17 -0
- worqhat/types/flow_trigger_with_file_response.py +18 -0
- worqhat/types/flow_trigger_with_payload_params.py +12 -0
- worqhat/types/flow_trigger_with_payload_response.py +20 -0
- worqhat/types/{retrieve_server_info_response.py → get_server_info_response.py} +2 -2
- {worqhat-3.2.0.dist-info → worqhat-3.5.0.dist-info}/METADATA +49 -15
- worqhat-3.5.0.dist-info/RECORD +53 -0
- worqhat-3.2.0.dist-info/RECORD +0 -38
- {worqhat-3.2.0.dist-info → worqhat-3.5.0.dist-info}/WHEEL +0 -0
- {worqhat-3.2.0.dist-info → worqhat-3.5.0.dist-info}/licenses/LICENSE +0 -0
worqhat/resources/flows.py
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Union
|
|
5
|
+
from typing import Dict, Union, Mapping, cast
|
|
6
6
|
from datetime import date
|
|
7
7
|
from typing_extensions import Literal
|
|
8
8
|
|
|
9
9
|
import httpx
|
|
10
10
|
|
|
11
|
-
from ..types import
|
|
12
|
-
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
13
|
-
from .._utils import maybe_transform, async_maybe_transform
|
|
11
|
+
from ..types import flow_get_metrics_params, flow_trigger_with_file_params, flow_trigger_with_payload_params
|
|
12
|
+
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
|
|
13
|
+
from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
|
|
14
14
|
from .._compat import cached_property
|
|
15
15
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
16
16
|
from .._response import (
|
|
@@ -20,7 +20,9 @@ from .._response import (
|
|
|
20
20
|
async_to_streamed_response_wrapper,
|
|
21
21
|
)
|
|
22
22
|
from .._base_client import make_request_options
|
|
23
|
-
from ..types.
|
|
23
|
+
from ..types.flow_get_metrics_response import FlowGetMetricsResponse
|
|
24
|
+
from ..types.flow_trigger_with_file_response import FlowTriggerWithFileResponse
|
|
25
|
+
from ..types.flow_trigger_with_payload_response import FlowTriggerWithPayloadResponse
|
|
24
26
|
|
|
25
27
|
__all__ = ["FlowsResource", "AsyncFlowsResource"]
|
|
26
28
|
|
|
@@ -45,7 +47,7 @@ class FlowsResource(SyncAPIResource):
|
|
|
45
47
|
"""
|
|
46
48
|
return FlowsResourceWithStreamingResponse(self)
|
|
47
49
|
|
|
48
|
-
def
|
|
50
|
+
def get_metrics(
|
|
49
51
|
self,
|
|
50
52
|
*,
|
|
51
53
|
end_date: Union[str, date] | NotGiven = NOT_GIVEN,
|
|
@@ -58,7 +60,7 @@ class FlowsResource(SyncAPIResource):
|
|
|
58
60
|
extra_query: Query | None = None,
|
|
59
61
|
extra_body: Body | None = None,
|
|
60
62
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
61
|
-
) ->
|
|
63
|
+
) -> FlowGetMetricsResponse:
|
|
62
64
|
"""Get metrics for workflows within a specified date range.
|
|
63
65
|
|
|
64
66
|
This endpoint provides
|
|
@@ -99,10 +101,104 @@ class FlowsResource(SyncAPIResource):
|
|
|
99
101
|
"status": status,
|
|
100
102
|
"user_id": user_id,
|
|
101
103
|
},
|
|
102
|
-
|
|
104
|
+
flow_get_metrics_params.FlowGetMetricsParams,
|
|
103
105
|
),
|
|
104
106
|
),
|
|
105
|
-
cast_to=
|
|
107
|
+
cast_to=FlowGetMetricsResponse,
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
def trigger_with_file(
|
|
111
|
+
self,
|
|
112
|
+
flow_id: str,
|
|
113
|
+
*,
|
|
114
|
+
file: FileTypes | NotGiven = NOT_GIVEN,
|
|
115
|
+
url: str | NotGiven = NOT_GIVEN,
|
|
116
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
117
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
118
|
+
extra_headers: Headers | None = None,
|
|
119
|
+
extra_query: Query | None = None,
|
|
120
|
+
extra_body: Body | None = None,
|
|
121
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
122
|
+
) -> FlowTriggerWithFileResponse:
|
|
123
|
+
"""Trigger a workflow by its ID with either a file upload or a URL to a file.
|
|
124
|
+
|
|
125
|
+
This
|
|
126
|
+
endpoint accepts multipart/form-data with either a file field or a URL field.
|
|
127
|
+
When a URL is provided, the server will download the file and process it as if
|
|
128
|
+
it were directly uploaded. The workflow ID must be specified in the URL path.
|
|
129
|
+
|
|
130
|
+
Args:
|
|
131
|
+
file: File to upload and process
|
|
132
|
+
|
|
133
|
+
url: URL to a file to download and process
|
|
134
|
+
|
|
135
|
+
extra_headers: Send extra headers
|
|
136
|
+
|
|
137
|
+
extra_query: Add additional query parameters to the request
|
|
138
|
+
|
|
139
|
+
extra_body: Add additional JSON properties to the request
|
|
140
|
+
|
|
141
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
142
|
+
"""
|
|
143
|
+
if not flow_id:
|
|
144
|
+
raise ValueError(f"Expected a non-empty value for `flow_id` but received {flow_id!r}")
|
|
145
|
+
body = deepcopy_minimal(
|
|
146
|
+
{
|
|
147
|
+
"file": file,
|
|
148
|
+
"url": url,
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
|
|
152
|
+
# It should be noted that the actual Content-Type header that will be
|
|
153
|
+
# sent to the server will contain a `boundary` parameter, e.g.
|
|
154
|
+
# multipart/form-data; boundary=---abc--
|
|
155
|
+
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
|
|
156
|
+
return self._post(
|
|
157
|
+
f"/flows/file/{flow_id}",
|
|
158
|
+
body=maybe_transform(body, flow_trigger_with_file_params.FlowTriggerWithFileParams),
|
|
159
|
+
files=files,
|
|
160
|
+
options=make_request_options(
|
|
161
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
162
|
+
),
|
|
163
|
+
cast_to=FlowTriggerWithFileResponse,
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
def trigger_with_payload(
|
|
167
|
+
self,
|
|
168
|
+
flow_id: str,
|
|
169
|
+
*,
|
|
170
|
+
body: Dict[str, object],
|
|
171
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
172
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
173
|
+
extra_headers: Headers | None = None,
|
|
174
|
+
extra_query: Query | None = None,
|
|
175
|
+
extra_body: Body | None = None,
|
|
176
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
177
|
+
) -> FlowTriggerWithPayloadResponse:
|
|
178
|
+
"""Trigger a workflow by its ID with a JSON payload.
|
|
179
|
+
|
|
180
|
+
This endpoint accepts any
|
|
181
|
+
valid JSON object as the request body and forwards it to the workflow. The
|
|
182
|
+
workflow ID must be specified in the URL path.
|
|
183
|
+
|
|
184
|
+
Args:
|
|
185
|
+
extra_headers: Send extra headers
|
|
186
|
+
|
|
187
|
+
extra_query: Add additional query parameters to the request
|
|
188
|
+
|
|
189
|
+
extra_body: Add additional JSON properties to the request
|
|
190
|
+
|
|
191
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
192
|
+
"""
|
|
193
|
+
if not flow_id:
|
|
194
|
+
raise ValueError(f"Expected a non-empty value for `flow_id` but received {flow_id!r}")
|
|
195
|
+
return self._post(
|
|
196
|
+
f"/flows/trigger/{flow_id}",
|
|
197
|
+
body=maybe_transform(body, flow_trigger_with_payload_params.FlowTriggerWithPayloadParams),
|
|
198
|
+
options=make_request_options(
|
|
199
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
200
|
+
),
|
|
201
|
+
cast_to=FlowTriggerWithPayloadResponse,
|
|
106
202
|
)
|
|
107
203
|
|
|
108
204
|
|
|
@@ -126,7 +222,7 @@ class AsyncFlowsResource(AsyncAPIResource):
|
|
|
126
222
|
"""
|
|
127
223
|
return AsyncFlowsResourceWithStreamingResponse(self)
|
|
128
224
|
|
|
129
|
-
async def
|
|
225
|
+
async def get_metrics(
|
|
130
226
|
self,
|
|
131
227
|
*,
|
|
132
228
|
end_date: Union[str, date] | NotGiven = NOT_GIVEN,
|
|
@@ -139,7 +235,7 @@ class AsyncFlowsResource(AsyncAPIResource):
|
|
|
139
235
|
extra_query: Query | None = None,
|
|
140
236
|
extra_body: Body | None = None,
|
|
141
237
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
142
|
-
) ->
|
|
238
|
+
) -> FlowGetMetricsResponse:
|
|
143
239
|
"""Get metrics for workflows within a specified date range.
|
|
144
240
|
|
|
145
241
|
This endpoint provides
|
|
@@ -180,10 +276,104 @@ class AsyncFlowsResource(AsyncAPIResource):
|
|
|
180
276
|
"status": status,
|
|
181
277
|
"user_id": user_id,
|
|
182
278
|
},
|
|
183
|
-
|
|
279
|
+
flow_get_metrics_params.FlowGetMetricsParams,
|
|
184
280
|
),
|
|
185
281
|
),
|
|
186
|
-
cast_to=
|
|
282
|
+
cast_to=FlowGetMetricsResponse,
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
async def trigger_with_file(
|
|
286
|
+
self,
|
|
287
|
+
flow_id: str,
|
|
288
|
+
*,
|
|
289
|
+
file: FileTypes | NotGiven = NOT_GIVEN,
|
|
290
|
+
url: str | NotGiven = NOT_GIVEN,
|
|
291
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
292
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
293
|
+
extra_headers: Headers | None = None,
|
|
294
|
+
extra_query: Query | None = None,
|
|
295
|
+
extra_body: Body | None = None,
|
|
296
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
297
|
+
) -> FlowTriggerWithFileResponse:
|
|
298
|
+
"""Trigger a workflow by its ID with either a file upload or a URL to a file.
|
|
299
|
+
|
|
300
|
+
This
|
|
301
|
+
endpoint accepts multipart/form-data with either a file field or a URL field.
|
|
302
|
+
When a URL is provided, the server will download the file and process it as if
|
|
303
|
+
it were directly uploaded. The workflow ID must be specified in the URL path.
|
|
304
|
+
|
|
305
|
+
Args:
|
|
306
|
+
file: File to upload and process
|
|
307
|
+
|
|
308
|
+
url: URL to a file to download and process
|
|
309
|
+
|
|
310
|
+
extra_headers: Send extra headers
|
|
311
|
+
|
|
312
|
+
extra_query: Add additional query parameters to the request
|
|
313
|
+
|
|
314
|
+
extra_body: Add additional JSON properties to the request
|
|
315
|
+
|
|
316
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
317
|
+
"""
|
|
318
|
+
if not flow_id:
|
|
319
|
+
raise ValueError(f"Expected a non-empty value for `flow_id` but received {flow_id!r}")
|
|
320
|
+
body = deepcopy_minimal(
|
|
321
|
+
{
|
|
322
|
+
"file": file,
|
|
323
|
+
"url": url,
|
|
324
|
+
}
|
|
325
|
+
)
|
|
326
|
+
files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
|
|
327
|
+
# It should be noted that the actual Content-Type header that will be
|
|
328
|
+
# sent to the server will contain a `boundary` parameter, e.g.
|
|
329
|
+
# multipart/form-data; boundary=---abc--
|
|
330
|
+
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
|
|
331
|
+
return await self._post(
|
|
332
|
+
f"/flows/file/{flow_id}",
|
|
333
|
+
body=await async_maybe_transform(body, flow_trigger_with_file_params.FlowTriggerWithFileParams),
|
|
334
|
+
files=files,
|
|
335
|
+
options=make_request_options(
|
|
336
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
337
|
+
),
|
|
338
|
+
cast_to=FlowTriggerWithFileResponse,
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
async def trigger_with_payload(
|
|
342
|
+
self,
|
|
343
|
+
flow_id: str,
|
|
344
|
+
*,
|
|
345
|
+
body: Dict[str, object],
|
|
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
|
+
) -> FlowTriggerWithPayloadResponse:
|
|
353
|
+
"""Trigger a workflow by its ID with a JSON payload.
|
|
354
|
+
|
|
355
|
+
This endpoint accepts any
|
|
356
|
+
valid JSON object as the request body and forwards it to the workflow. The
|
|
357
|
+
workflow ID must be specified in the URL path.
|
|
358
|
+
|
|
359
|
+
Args:
|
|
360
|
+
extra_headers: Send extra headers
|
|
361
|
+
|
|
362
|
+
extra_query: Add additional query parameters to the request
|
|
363
|
+
|
|
364
|
+
extra_body: Add additional JSON properties to the request
|
|
365
|
+
|
|
366
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
367
|
+
"""
|
|
368
|
+
if not flow_id:
|
|
369
|
+
raise ValueError(f"Expected a non-empty value for `flow_id` but received {flow_id!r}")
|
|
370
|
+
return await self._post(
|
|
371
|
+
f"/flows/trigger/{flow_id}",
|
|
372
|
+
body=await async_maybe_transform(body, flow_trigger_with_payload_params.FlowTriggerWithPayloadParams),
|
|
373
|
+
options=make_request_options(
|
|
374
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
375
|
+
),
|
|
376
|
+
cast_to=FlowTriggerWithPayloadResponse,
|
|
187
377
|
)
|
|
188
378
|
|
|
189
379
|
|
|
@@ -191,8 +381,14 @@ class FlowsResourceWithRawResponse:
|
|
|
191
381
|
def __init__(self, flows: FlowsResource) -> None:
|
|
192
382
|
self._flows = flows
|
|
193
383
|
|
|
194
|
-
self.
|
|
195
|
-
flows.
|
|
384
|
+
self.get_metrics = to_raw_response_wrapper(
|
|
385
|
+
flows.get_metrics,
|
|
386
|
+
)
|
|
387
|
+
self.trigger_with_file = to_raw_response_wrapper(
|
|
388
|
+
flows.trigger_with_file,
|
|
389
|
+
)
|
|
390
|
+
self.trigger_with_payload = to_raw_response_wrapper(
|
|
391
|
+
flows.trigger_with_payload,
|
|
196
392
|
)
|
|
197
393
|
|
|
198
394
|
|
|
@@ -200,8 +396,14 @@ class AsyncFlowsResourceWithRawResponse:
|
|
|
200
396
|
def __init__(self, flows: AsyncFlowsResource) -> None:
|
|
201
397
|
self._flows = flows
|
|
202
398
|
|
|
203
|
-
self.
|
|
204
|
-
flows.
|
|
399
|
+
self.get_metrics = async_to_raw_response_wrapper(
|
|
400
|
+
flows.get_metrics,
|
|
401
|
+
)
|
|
402
|
+
self.trigger_with_file = async_to_raw_response_wrapper(
|
|
403
|
+
flows.trigger_with_file,
|
|
404
|
+
)
|
|
405
|
+
self.trigger_with_payload = async_to_raw_response_wrapper(
|
|
406
|
+
flows.trigger_with_payload,
|
|
205
407
|
)
|
|
206
408
|
|
|
207
409
|
|
|
@@ -209,8 +411,14 @@ class FlowsResourceWithStreamingResponse:
|
|
|
209
411
|
def __init__(self, flows: FlowsResource) -> None:
|
|
210
412
|
self._flows = flows
|
|
211
413
|
|
|
212
|
-
self.
|
|
213
|
-
flows.
|
|
414
|
+
self.get_metrics = to_streamed_response_wrapper(
|
|
415
|
+
flows.get_metrics,
|
|
416
|
+
)
|
|
417
|
+
self.trigger_with_file = to_streamed_response_wrapper(
|
|
418
|
+
flows.trigger_with_file,
|
|
419
|
+
)
|
|
420
|
+
self.trigger_with_payload = to_streamed_response_wrapper(
|
|
421
|
+
flows.trigger_with_payload,
|
|
214
422
|
)
|
|
215
423
|
|
|
216
424
|
|
|
@@ -218,6 +426,12 @@ class AsyncFlowsResourceWithStreamingResponse:
|
|
|
218
426
|
def __init__(self, flows: AsyncFlowsResource) -> None:
|
|
219
427
|
self._flows = flows
|
|
220
428
|
|
|
221
|
-
self.
|
|
222
|
-
flows.
|
|
429
|
+
self.get_metrics = async_to_streamed_response_wrapper(
|
|
430
|
+
flows.get_metrics,
|
|
431
|
+
)
|
|
432
|
+
self.trigger_with_file = async_to_streamed_response_wrapper(
|
|
433
|
+
flows.trigger_with_file,
|
|
434
|
+
)
|
|
435
|
+
self.trigger_with_payload = async_to_streamed_response_wrapper(
|
|
436
|
+
flows.trigger_with_payload,
|
|
223
437
|
)
|
worqhat/types/__init__.py
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from .health_check_response import HealthCheckResponse as HealthCheckResponse
|
|
6
|
-
from .
|
|
7
|
-
from .
|
|
8
|
-
from .
|
|
6
|
+
from .db_execute_query_params import DBExecuteQueryParams as DBExecuteQueryParams
|
|
7
|
+
from .db_insert_record_params import DBInsertRecordParams as DBInsertRecordParams
|
|
8
|
+
from .flow_get_metrics_params import FlowGetMetricsParams as FlowGetMetricsParams
|
|
9
|
+
from .db_delete_records_params import DBDeleteRecordsParams as DBDeleteRecordsParams
|
|
10
|
+
from .db_update_records_params import DBUpdateRecordsParams as DBUpdateRecordsParams
|
|
11
|
+
from .get_server_info_response import GetServerInfoResponse as GetServerInfoResponse
|
|
12
|
+
from .db_execute_query_response import DBExecuteQueryResponse as DBExecuteQueryResponse
|
|
13
|
+
from .db_insert_record_response import DBInsertRecordResponse as DBInsertRecordResponse
|
|
14
|
+
from .flow_get_metrics_response import FlowGetMetricsResponse as FlowGetMetricsResponse
|
|
15
|
+
from .db_delete_records_response import DBDeleteRecordsResponse as DBDeleteRecordsResponse
|
|
16
|
+
from .db_process_nl_query_params import DBProcessNlQueryParams as DBProcessNlQueryParams
|
|
17
|
+
from .db_update_records_response import DBUpdateRecordsResponse as DBUpdateRecordsResponse
|
|
18
|
+
from .db_process_nl_query_response import DBProcessNlQueryResponse as DBProcessNlQueryResponse
|
|
19
|
+
from .flow_trigger_with_file_params import FlowTriggerWithFileParams as FlowTriggerWithFileParams
|
|
20
|
+
from .flow_trigger_with_file_response import FlowTriggerWithFileResponse as FlowTriggerWithFileResponse
|
|
21
|
+
from .flow_trigger_with_payload_params import FlowTriggerWithPayloadParams as FlowTriggerWithPayloadParams
|
|
22
|
+
from .flow_trigger_with_payload_response import FlowTriggerWithPayloadResponse as FlowTriggerWithPayloadResponse
|
|
@@ -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 Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["DBDeleteRecordsParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DBDeleteRecordsParams(TypedDict, total=False):
|
|
11
|
+
table: Required[str]
|
|
12
|
+
"""Table name to delete from"""
|
|
13
|
+
|
|
14
|
+
where: Required[object]
|
|
15
|
+
"""Where conditions"""
|
|
@@ -0,0 +1,18 @@
|
|
|
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__ = ["DBDeleteRecordsResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DBDeleteRecordsResponse(BaseModel):
|
|
11
|
+
count: Optional[int] = None
|
|
12
|
+
"""Number of records deleted"""
|
|
13
|
+
|
|
14
|
+
data: Optional[List[object]] = None
|
|
15
|
+
|
|
16
|
+
message: Optional[str] = None
|
|
17
|
+
|
|
18
|
+
success: Optional[bool] = 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 Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["DBExecuteQueryParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DBExecuteQueryParams(TypedDict, total=False):
|
|
11
|
+
query: Required[str]
|
|
12
|
+
"""SQL query to execute"""
|
|
@@ -0,0 +1,21 @@
|
|
|
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__ = ["DBExecuteQueryResponse"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DBExecuteQueryResponse(BaseModel):
|
|
13
|
+
data: Optional[List[object]] = None
|
|
14
|
+
|
|
15
|
+
execution_time: Optional[int] = FieldInfo(alias="executionTime", default=None)
|
|
16
|
+
"""Query execution time in milliseconds"""
|
|
17
|
+
|
|
18
|
+
query: Optional[str] = None
|
|
19
|
+
"""The executed SQL query"""
|
|
20
|
+
|
|
21
|
+
success: Optional[bool] = 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 Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["DBInsertRecordParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DBInsertRecordParams(TypedDict, total=False):
|
|
11
|
+
data: Required[object]
|
|
12
|
+
"""Data to insert"""
|
|
13
|
+
|
|
14
|
+
table: Required[str]
|
|
15
|
+
"""Table name to insert into"""
|
|
@@ -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__ = ["DBInsertRecordResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DBInsertRecordResponse(BaseModel):
|
|
11
|
+
data: Optional[object] = None
|
|
12
|
+
|
|
13
|
+
message: Optional[str] = None
|
|
14
|
+
|
|
15
|
+
success: Optional[bool] = 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 Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["DBProcessNlQueryParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DBProcessNlQueryParams(TypedDict, total=False):
|
|
11
|
+
question: Required[str]
|
|
12
|
+
"""Natural language question"""
|
|
13
|
+
|
|
14
|
+
table: Required[str]
|
|
15
|
+
"""Table name to query"""
|
|
@@ -0,0 +1,18 @@
|
|
|
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__ = ["DBProcessNlQueryResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DBProcessNlQueryResponse(BaseModel):
|
|
11
|
+
data: Optional[List[object]] = None
|
|
12
|
+
|
|
13
|
+
message: Optional[str] = None
|
|
14
|
+
|
|
15
|
+
sql: Optional[str] = None
|
|
16
|
+
"""The generated SQL query"""
|
|
17
|
+
|
|
18
|
+
success: Optional[bool] = None
|
|
@@ -0,0 +1,18 @@
|
|
|
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__ = ["DBUpdateRecordsParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DBUpdateRecordsParams(TypedDict, total=False):
|
|
11
|
+
data: Required[object]
|
|
12
|
+
"""Data to update"""
|
|
13
|
+
|
|
14
|
+
table: Required[str]
|
|
15
|
+
"""Table name to update"""
|
|
16
|
+
|
|
17
|
+
where: Required[object]
|
|
18
|
+
"""Where conditions"""
|
|
@@ -0,0 +1,18 @@
|
|
|
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__ = ["DBUpdateRecordsResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DBUpdateRecordsResponse(BaseModel):
|
|
11
|
+
count: Optional[int] = None
|
|
12
|
+
"""Number of records updated"""
|
|
13
|
+
|
|
14
|
+
data: Optional[List[object]] = None
|
|
15
|
+
|
|
16
|
+
message: Optional[str] = None
|
|
17
|
+
|
|
18
|
+
success: Optional[bool] = None
|
|
@@ -8,10 +8,10 @@ from typing_extensions import Literal, Annotated, TypedDict
|
|
|
8
8
|
|
|
9
9
|
from .._utils import PropertyInfo
|
|
10
10
|
|
|
11
|
-
__all__ = ["
|
|
11
|
+
__all__ = ["FlowGetMetricsParams"]
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
class
|
|
14
|
+
class FlowGetMetricsParams(TypedDict, total=False):
|
|
15
15
|
end_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")]
|
|
16
16
|
"""End date for filtering (YYYY-MM-DD format)"""
|
|
17
17
|
|
|
@@ -6,7 +6,7 @@ from typing_extensions import Literal
|
|
|
6
6
|
|
|
7
7
|
from .._models import BaseModel
|
|
8
8
|
|
|
9
|
-
__all__ = ["
|
|
9
|
+
__all__ = ["FlowGetMetricsResponse", "Metrics", "MetricsMetricsByUser", "Workflow"]
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class MetricsMetricsByUser(BaseModel):
|
|
@@ -49,7 +49,7 @@ class Workflow(BaseModel):
|
|
|
49
49
|
workflow_id: Optional[str] = None
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
class
|
|
52
|
+
class FlowGetMetricsResponse(BaseModel):
|
|
53
53
|
metrics: Optional[Metrics] = None
|
|
54
54
|
|
|
55
55
|
workflows: Optional[List[Workflow]] = None
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
from .._types import FileTypes
|
|
8
|
+
|
|
9
|
+
__all__ = ["FlowTriggerWithFileParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FlowTriggerWithFileParams(TypedDict, total=False):
|
|
13
|
+
file: FileTypes
|
|
14
|
+
"""File to upload and process"""
|
|
15
|
+
|
|
16
|
+
url: str
|
|
17
|
+
"""URL to a file to download and process"""
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["FlowTriggerWithFileResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FlowTriggerWithFileResponse(BaseModel):
|
|
12
|
+
data: Optional[Dict[str, object]] = None
|
|
13
|
+
|
|
14
|
+
message: Optional[str] = None
|
|
15
|
+
|
|
16
|
+
success: Optional[bool] = None
|
|
17
|
+
|
|
18
|
+
timestamp: Optional[datetime] = 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 import Dict
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["FlowTriggerWithPayloadParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FlowTriggerWithPayloadParams(TypedDict, total=False):
|
|
12
|
+
body: Required[Dict[str, object]]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["FlowTriggerWithPayloadResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FlowTriggerWithPayloadResponse(BaseModel):
|
|
12
|
+
analytics_id: Optional[str] = None
|
|
13
|
+
|
|
14
|
+
data: Optional[Dict[str, object]] = None
|
|
15
|
+
|
|
16
|
+
message: Optional[str] = None
|
|
17
|
+
|
|
18
|
+
success: Optional[bool] = None
|
|
19
|
+
|
|
20
|
+
timestamp: Optional[datetime] = None
|
|
@@ -4,10 +4,10 @@ from typing import Optional
|
|
|
4
4
|
|
|
5
5
|
from .._models import BaseModel
|
|
6
6
|
|
|
7
|
-
__all__ = ["
|
|
7
|
+
__all__ = ["GetServerInfoResponse"]
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class
|
|
10
|
+
class GetServerInfoResponse(BaseModel):
|
|
11
11
|
environment: Optional[str] = None
|
|
12
12
|
|
|
13
13
|
name: Optional[str] = None
|