worqhat 0.0.1__py3-none-any.whl → 0.1.0a3__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/__init__.py +90 -10
- worqhat/_base_client.py +1992 -0
- worqhat/_client.py +467 -0
- worqhat/_compat.py +219 -0
- worqhat/_constants.py +14 -0
- worqhat/_exceptions.py +108 -0
- worqhat/_files.py +123 -0
- worqhat/_models.py +829 -0
- worqhat/_qs.py +150 -0
- worqhat/_resource.py +43 -0
- worqhat/_response.py +830 -0
- worqhat/_streaming.py +333 -0
- worqhat/_types.py +219 -0
- worqhat/_utils/__init__.py +57 -0
- worqhat/_utils/_logs.py +25 -0
- worqhat/_utils/_proxy.py +65 -0
- worqhat/_utils/_reflection.py +42 -0
- worqhat/_utils/_resources_proxy.py +24 -0
- worqhat/_utils/_streams.py +12 -0
- worqhat/_utils/_sync.py +86 -0
- worqhat/_utils/_transform.py +447 -0
- worqhat/_utils/_typing.py +151 -0
- worqhat/_utils/_utils.py +422 -0
- worqhat/_version.py +4 -0
- worqhat/lib/.keep +4 -0
- worqhat/resources/__init__.py +33 -0
- worqhat/resources/flows.py +223 -0
- worqhat/resources/health.py +143 -0
- worqhat/types/__init__.py +8 -0
- worqhat/types/flow_retrieve_metrics_params.py +25 -0
- worqhat/types/flow_retrieve_metrics_response.py +55 -0
- worqhat/types/health_check_response.py +33 -0
- worqhat/types/retrieve_server_info_response.py +15 -0
- worqhat-0.1.0a3.dist-info/METADATA +398 -0
- worqhat-0.1.0a3.dist-info/RECORD +38 -0
- {worqhat-0.0.1.dist-info → worqhat-0.1.0a3.dist-info}/WHEEL +1 -2
- {worqhat-0.0.1.dist-info → worqhat-0.1.0a3.dist-info/licenses}/LICENSE +201 -201
- worqhat/ai_models/__init__.py +0 -9
- worqhat/ai_models/ai_search.py +0 -41
- worqhat/ai_models/content_mod.py +0 -44
- worqhat/ai_models/image_analysis.py +0 -94
- worqhat/ai_models/image_gen.py +0 -281
- worqhat/ai_models/model_train.py +0 -45
- worqhat/ai_models/text_extract.py +0 -83
- worqhat/ai_models/text_gen.py +0 -177
- worqhat/database_management/Edit.py +0 -140
- worqhat/database_management/Read.py +0 -152
- worqhat/database_management/__init__.py +0 -5
- worqhat/database_management/collection.py +0 -25
- worqhat/test/test_ai_search.py +0 -38
- worqhat/test/test_content_mod.py +0 -39
- worqhat/test/test_image_analysis.py +0 -52
- worqhat/test/test_image_gen.py +0 -0
- worqhat/test/test_model_train.py +0 -52
- worqhat/test/test_text_extract.py +0 -65
- worqhat/test/test_text_gen.py +0 -66
- worqhat-0.0.1.dist-info/METADATA +0 -18
- worqhat-0.0.1.dist-info/RECORD +0 -26
- worqhat-0.0.1.dist-info/top_level.txt +0 -1
- /worqhat/{test/__init__.py → py.typed} +0 -0
|
@@ -0,0 +1,223 @@
|
|
|
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 flow_retrieve_metrics_params
|
|
12
|
+
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
13
|
+
from .._utils import maybe_transform, async_maybe_transform
|
|
14
|
+
from .._compat import cached_property
|
|
15
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
16
|
+
from .._response import (
|
|
17
|
+
to_raw_response_wrapper,
|
|
18
|
+
to_streamed_response_wrapper,
|
|
19
|
+
async_to_raw_response_wrapper,
|
|
20
|
+
async_to_streamed_response_wrapper,
|
|
21
|
+
)
|
|
22
|
+
from .._base_client import make_request_options
|
|
23
|
+
from ..types.flow_retrieve_metrics_response import FlowRetrieveMetricsResponse
|
|
24
|
+
|
|
25
|
+
__all__ = ["FlowsResource", "AsyncFlowsResource"]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class FlowsResource(SyncAPIResource):
|
|
29
|
+
@cached_property
|
|
30
|
+
def with_raw_response(self) -> FlowsResourceWithRawResponse:
|
|
31
|
+
"""
|
|
32
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
33
|
+
the raw response object instead of the parsed content.
|
|
34
|
+
|
|
35
|
+
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#accessing-raw-response-data-eg-headers
|
|
36
|
+
"""
|
|
37
|
+
return FlowsResourceWithRawResponse(self)
|
|
38
|
+
|
|
39
|
+
@cached_property
|
|
40
|
+
def with_streaming_response(self) -> FlowsResourceWithStreamingResponse:
|
|
41
|
+
"""
|
|
42
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
43
|
+
|
|
44
|
+
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#with_streaming_response
|
|
45
|
+
"""
|
|
46
|
+
return FlowsResourceWithStreamingResponse(self)
|
|
47
|
+
|
|
48
|
+
def retrieve_metrics(
|
|
49
|
+
self,
|
|
50
|
+
*,
|
|
51
|
+
end_date: Union[str, date] | NotGiven = NOT_GIVEN,
|
|
52
|
+
start_date: Union[str, date] | NotGiven = NOT_GIVEN,
|
|
53
|
+
status: Literal["completed", "failed", "in_progress"] | NotGiven = NOT_GIVEN,
|
|
54
|
+
user_id: str | NotGiven = NOT_GIVEN,
|
|
55
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
56
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
57
|
+
extra_headers: Headers | None = None,
|
|
58
|
+
extra_query: Query | None = None,
|
|
59
|
+
extra_body: Body | None = None,
|
|
60
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
61
|
+
) -> FlowRetrieveMetricsResponse:
|
|
62
|
+
"""Get metrics for workflows within a specified date range.
|
|
63
|
+
|
|
64
|
+
This endpoint provides
|
|
65
|
+
aggregated statistics about workflow execution and detailed information about
|
|
66
|
+
individual workflows.
|
|
67
|
+
|
|
68
|
+
The response includes metrics aggregated by user and a list of all workflows
|
|
69
|
+
matching the specified criteria.
|
|
70
|
+
|
|
71
|
+
Args:
|
|
72
|
+
end_date: End date for filtering (YYYY-MM-DD format)
|
|
73
|
+
|
|
74
|
+
start_date: Start date for filtering (YYYY-MM-DD format)
|
|
75
|
+
|
|
76
|
+
status: Filter by workflow status
|
|
77
|
+
|
|
78
|
+
user_id: Filter by specific user ID
|
|
79
|
+
|
|
80
|
+
extra_headers: Send extra headers
|
|
81
|
+
|
|
82
|
+
extra_query: Add additional query parameters to the request
|
|
83
|
+
|
|
84
|
+
extra_body: Add additional JSON properties to the request
|
|
85
|
+
|
|
86
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
87
|
+
"""
|
|
88
|
+
return self._get(
|
|
89
|
+
"/flows/metrics",
|
|
90
|
+
options=make_request_options(
|
|
91
|
+
extra_headers=extra_headers,
|
|
92
|
+
extra_query=extra_query,
|
|
93
|
+
extra_body=extra_body,
|
|
94
|
+
timeout=timeout,
|
|
95
|
+
query=maybe_transform(
|
|
96
|
+
{
|
|
97
|
+
"end_date": end_date,
|
|
98
|
+
"start_date": start_date,
|
|
99
|
+
"status": status,
|
|
100
|
+
"user_id": user_id,
|
|
101
|
+
},
|
|
102
|
+
flow_retrieve_metrics_params.FlowRetrieveMetricsParams,
|
|
103
|
+
),
|
|
104
|
+
),
|
|
105
|
+
cast_to=FlowRetrieveMetricsResponse,
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
class AsyncFlowsResource(AsyncAPIResource):
|
|
110
|
+
@cached_property
|
|
111
|
+
def with_raw_response(self) -> AsyncFlowsResourceWithRawResponse:
|
|
112
|
+
"""
|
|
113
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
114
|
+
the raw response object instead of the parsed content.
|
|
115
|
+
|
|
116
|
+
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#accessing-raw-response-data-eg-headers
|
|
117
|
+
"""
|
|
118
|
+
return AsyncFlowsResourceWithRawResponse(self)
|
|
119
|
+
|
|
120
|
+
@cached_property
|
|
121
|
+
def with_streaming_response(self) -> AsyncFlowsResourceWithStreamingResponse:
|
|
122
|
+
"""
|
|
123
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
124
|
+
|
|
125
|
+
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#with_streaming_response
|
|
126
|
+
"""
|
|
127
|
+
return AsyncFlowsResourceWithStreamingResponse(self)
|
|
128
|
+
|
|
129
|
+
async def retrieve_metrics(
|
|
130
|
+
self,
|
|
131
|
+
*,
|
|
132
|
+
end_date: Union[str, date] | NotGiven = NOT_GIVEN,
|
|
133
|
+
start_date: Union[str, date] | NotGiven = NOT_GIVEN,
|
|
134
|
+
status: Literal["completed", "failed", "in_progress"] | NotGiven = NOT_GIVEN,
|
|
135
|
+
user_id: str | NotGiven = NOT_GIVEN,
|
|
136
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
137
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
138
|
+
extra_headers: Headers | None = None,
|
|
139
|
+
extra_query: Query | None = None,
|
|
140
|
+
extra_body: Body | None = None,
|
|
141
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
142
|
+
) -> FlowRetrieveMetricsResponse:
|
|
143
|
+
"""Get metrics for workflows within a specified date range.
|
|
144
|
+
|
|
145
|
+
This endpoint provides
|
|
146
|
+
aggregated statistics about workflow execution and detailed information about
|
|
147
|
+
individual workflows.
|
|
148
|
+
|
|
149
|
+
The response includes metrics aggregated by user and a list of all workflows
|
|
150
|
+
matching the specified criteria.
|
|
151
|
+
|
|
152
|
+
Args:
|
|
153
|
+
end_date: End date for filtering (YYYY-MM-DD format)
|
|
154
|
+
|
|
155
|
+
start_date: Start date for filtering (YYYY-MM-DD format)
|
|
156
|
+
|
|
157
|
+
status: Filter by workflow status
|
|
158
|
+
|
|
159
|
+
user_id: Filter by specific user ID
|
|
160
|
+
|
|
161
|
+
extra_headers: Send extra headers
|
|
162
|
+
|
|
163
|
+
extra_query: Add additional query parameters to the request
|
|
164
|
+
|
|
165
|
+
extra_body: Add additional JSON properties to the request
|
|
166
|
+
|
|
167
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
168
|
+
"""
|
|
169
|
+
return await self._get(
|
|
170
|
+
"/flows/metrics",
|
|
171
|
+
options=make_request_options(
|
|
172
|
+
extra_headers=extra_headers,
|
|
173
|
+
extra_query=extra_query,
|
|
174
|
+
extra_body=extra_body,
|
|
175
|
+
timeout=timeout,
|
|
176
|
+
query=await async_maybe_transform(
|
|
177
|
+
{
|
|
178
|
+
"end_date": end_date,
|
|
179
|
+
"start_date": start_date,
|
|
180
|
+
"status": status,
|
|
181
|
+
"user_id": user_id,
|
|
182
|
+
},
|
|
183
|
+
flow_retrieve_metrics_params.FlowRetrieveMetricsParams,
|
|
184
|
+
),
|
|
185
|
+
),
|
|
186
|
+
cast_to=FlowRetrieveMetricsResponse,
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
class FlowsResourceWithRawResponse:
|
|
191
|
+
def __init__(self, flows: FlowsResource) -> None:
|
|
192
|
+
self._flows = flows
|
|
193
|
+
|
|
194
|
+
self.retrieve_metrics = to_raw_response_wrapper(
|
|
195
|
+
flows.retrieve_metrics,
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
class AsyncFlowsResourceWithRawResponse:
|
|
200
|
+
def __init__(self, flows: AsyncFlowsResource) -> None:
|
|
201
|
+
self._flows = flows
|
|
202
|
+
|
|
203
|
+
self.retrieve_metrics = async_to_raw_response_wrapper(
|
|
204
|
+
flows.retrieve_metrics,
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
class FlowsResourceWithStreamingResponse:
|
|
209
|
+
def __init__(self, flows: FlowsResource) -> None:
|
|
210
|
+
self._flows = flows
|
|
211
|
+
|
|
212
|
+
self.retrieve_metrics = to_streamed_response_wrapper(
|
|
213
|
+
flows.retrieve_metrics,
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
class AsyncFlowsResourceWithStreamingResponse:
|
|
218
|
+
def __init__(self, flows: AsyncFlowsResource) -> None:
|
|
219
|
+
self._flows = flows
|
|
220
|
+
|
|
221
|
+
self.retrieve_metrics = async_to_streamed_response_wrapper(
|
|
222
|
+
flows.retrieve_metrics,
|
|
223
|
+
)
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
8
|
+
from .._compat import cached_property
|
|
9
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
10
|
+
from .._response import (
|
|
11
|
+
to_raw_response_wrapper,
|
|
12
|
+
to_streamed_response_wrapper,
|
|
13
|
+
async_to_raw_response_wrapper,
|
|
14
|
+
async_to_streamed_response_wrapper,
|
|
15
|
+
)
|
|
16
|
+
from .._base_client import make_request_options
|
|
17
|
+
from ..types.health_check_response import HealthCheckResponse
|
|
18
|
+
|
|
19
|
+
__all__ = ["HealthResource", "AsyncHealthResource"]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class HealthResource(SyncAPIResource):
|
|
23
|
+
@cached_property
|
|
24
|
+
def with_raw_response(self) -> HealthResourceWithRawResponse:
|
|
25
|
+
"""
|
|
26
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
27
|
+
the raw response object instead of the parsed content.
|
|
28
|
+
|
|
29
|
+
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#accessing-raw-response-data-eg-headers
|
|
30
|
+
"""
|
|
31
|
+
return HealthResourceWithRawResponse(self)
|
|
32
|
+
|
|
33
|
+
@cached_property
|
|
34
|
+
def with_streaming_response(self) -> HealthResourceWithStreamingResponse:
|
|
35
|
+
"""
|
|
36
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
37
|
+
|
|
38
|
+
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#with_streaming_response
|
|
39
|
+
"""
|
|
40
|
+
return HealthResourceWithStreamingResponse(self)
|
|
41
|
+
|
|
42
|
+
def check(
|
|
43
|
+
self,
|
|
44
|
+
*,
|
|
45
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
46
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
47
|
+
extra_headers: Headers | None = None,
|
|
48
|
+
extra_query: Query | None = None,
|
|
49
|
+
extra_body: Body | None = None,
|
|
50
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
51
|
+
) -> HealthCheckResponse:
|
|
52
|
+
"""Check if the server is running and get uptime information.
|
|
53
|
+
|
|
54
|
+
This endpoint can be
|
|
55
|
+
used for monitoring and alerting systems.
|
|
56
|
+
"""
|
|
57
|
+
return self._get(
|
|
58
|
+
"/health",
|
|
59
|
+
options=make_request_options(
|
|
60
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
61
|
+
),
|
|
62
|
+
cast_to=HealthCheckResponse,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class AsyncHealthResource(AsyncAPIResource):
|
|
67
|
+
@cached_property
|
|
68
|
+
def with_raw_response(self) -> AsyncHealthResourceWithRawResponse:
|
|
69
|
+
"""
|
|
70
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
71
|
+
the raw response object instead of the parsed content.
|
|
72
|
+
|
|
73
|
+
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#accessing-raw-response-data-eg-headers
|
|
74
|
+
"""
|
|
75
|
+
return AsyncHealthResourceWithRawResponse(self)
|
|
76
|
+
|
|
77
|
+
@cached_property
|
|
78
|
+
def with_streaming_response(self) -> AsyncHealthResourceWithStreamingResponse:
|
|
79
|
+
"""
|
|
80
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
81
|
+
|
|
82
|
+
For more information, see https://www.github.com/WorqHat/worqhat-python-sdk#with_streaming_response
|
|
83
|
+
"""
|
|
84
|
+
return AsyncHealthResourceWithStreamingResponse(self)
|
|
85
|
+
|
|
86
|
+
async def check(
|
|
87
|
+
self,
|
|
88
|
+
*,
|
|
89
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
90
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
91
|
+
extra_headers: Headers | None = None,
|
|
92
|
+
extra_query: Query | None = None,
|
|
93
|
+
extra_body: Body | None = None,
|
|
94
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
95
|
+
) -> HealthCheckResponse:
|
|
96
|
+
"""Check if the server is running and get uptime information.
|
|
97
|
+
|
|
98
|
+
This endpoint can be
|
|
99
|
+
used for monitoring and alerting systems.
|
|
100
|
+
"""
|
|
101
|
+
return await self._get(
|
|
102
|
+
"/health",
|
|
103
|
+
options=make_request_options(
|
|
104
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
105
|
+
),
|
|
106
|
+
cast_to=HealthCheckResponse,
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
class HealthResourceWithRawResponse:
|
|
111
|
+
def __init__(self, health: HealthResource) -> None:
|
|
112
|
+
self._health = health
|
|
113
|
+
|
|
114
|
+
self.check = to_raw_response_wrapper(
|
|
115
|
+
health.check,
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class AsyncHealthResourceWithRawResponse:
|
|
120
|
+
def __init__(self, health: AsyncHealthResource) -> None:
|
|
121
|
+
self._health = health
|
|
122
|
+
|
|
123
|
+
self.check = async_to_raw_response_wrapper(
|
|
124
|
+
health.check,
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class HealthResourceWithStreamingResponse:
|
|
129
|
+
def __init__(self, health: HealthResource) -> None:
|
|
130
|
+
self._health = health
|
|
131
|
+
|
|
132
|
+
self.check = to_streamed_response_wrapper(
|
|
133
|
+
health.check,
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
class AsyncHealthResourceWithStreamingResponse:
|
|
138
|
+
def __init__(self, health: AsyncHealthResource) -> None:
|
|
139
|
+
self._health = health
|
|
140
|
+
|
|
141
|
+
self.check = async_to_streamed_response_wrapper(
|
|
142
|
+
health.check,
|
|
143
|
+
)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .health_check_response import HealthCheckResponse as HealthCheckResponse
|
|
6
|
+
from .flow_retrieve_metrics_params import FlowRetrieveMetricsParams as FlowRetrieveMetricsParams
|
|
7
|
+
from .retrieve_server_info_response import RetrieveServerInfoResponse as RetrieveServerInfoResponse
|
|
8
|
+
from .flow_retrieve_metrics_response import FlowRetrieveMetricsResponse as FlowRetrieveMetricsResponse
|
|
@@ -0,0 +1,25 @@
|
|
|
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__ = ["FlowRetrieveMetricsParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class FlowRetrieveMetricsParams(TypedDict, total=False):
|
|
15
|
+
end_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")]
|
|
16
|
+
"""End date for filtering (YYYY-MM-DD format)"""
|
|
17
|
+
|
|
18
|
+
start_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")]
|
|
19
|
+
"""Start date for filtering (YYYY-MM-DD format)"""
|
|
20
|
+
|
|
21
|
+
status: Literal["completed", "failed", "in_progress"]
|
|
22
|
+
"""Filter by workflow status"""
|
|
23
|
+
|
|
24
|
+
user_id: str
|
|
25
|
+
"""Filter by specific user ID"""
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["FlowRetrieveMetricsResponse", "Metrics", "MetricsMetricsByUser", "Workflow"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class MetricsMetricsByUser(BaseModel):
|
|
13
|
+
completed: Optional[int] = None
|
|
14
|
+
|
|
15
|
+
failed: Optional[int] = None
|
|
16
|
+
|
|
17
|
+
in_progress: Optional[int] = None
|
|
18
|
+
|
|
19
|
+
total: Optional[int] = None
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class Metrics(BaseModel):
|
|
23
|
+
avg_duration_ms: Optional[float] = None
|
|
24
|
+
|
|
25
|
+
completed_workflows: Optional[int] = None
|
|
26
|
+
|
|
27
|
+
failed_workflows: Optional[int] = None
|
|
28
|
+
|
|
29
|
+
in_progress_workflows: Optional[int] = None
|
|
30
|
+
|
|
31
|
+
metrics_by_user: Optional[Dict[str, MetricsMetricsByUser]] = None
|
|
32
|
+
|
|
33
|
+
total_workflows: Optional[int] = None
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class Workflow(BaseModel):
|
|
37
|
+
id: Optional[str] = None
|
|
38
|
+
|
|
39
|
+
end_timestamp: Optional[datetime] = None
|
|
40
|
+
|
|
41
|
+
org_id: Optional[str] = None
|
|
42
|
+
|
|
43
|
+
start_timestamp: Optional[datetime] = None
|
|
44
|
+
|
|
45
|
+
status: Optional[Literal["completed", "failed", "in_progress"]] = None
|
|
46
|
+
|
|
47
|
+
user_id: Optional[str] = None
|
|
48
|
+
|
|
49
|
+
workflow_id: Optional[str] = None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class FlowRetrieveMetricsResponse(BaseModel):
|
|
53
|
+
metrics: Optional[Metrics] = None
|
|
54
|
+
|
|
55
|
+
workflows: Optional[List[Workflow]] = None
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["HealthCheckResponse", "Services"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Services(BaseModel):
|
|
13
|
+
database: Optional[Literal["ok", "degraded", "down"]] = None
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class HealthCheckResponse(BaseModel):
|
|
17
|
+
status: Literal["ok", "degraded", "maintenance", "down"]
|
|
18
|
+
"""Current health status of the API"""
|
|
19
|
+
|
|
20
|
+
uptime: float
|
|
21
|
+
"""Server uptime in seconds"""
|
|
22
|
+
|
|
23
|
+
environment: Optional[Literal["development", "staging", "production"]] = None
|
|
24
|
+
"""Current environment"""
|
|
25
|
+
|
|
26
|
+
services: Optional[Services] = None
|
|
27
|
+
"""Status of dependent services"""
|
|
28
|
+
|
|
29
|
+
timestamp: Optional[datetime] = None
|
|
30
|
+
"""Current server time"""
|
|
31
|
+
|
|
32
|
+
version: Optional[str] = None
|
|
33
|
+
"""Current API version"""
|
|
@@ -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__ = ["RetrieveServerInfoResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class RetrieveServerInfoResponse(BaseModel):
|
|
11
|
+
environment: Optional[str] = None
|
|
12
|
+
|
|
13
|
+
name: Optional[str] = None
|
|
14
|
+
|
|
15
|
+
version: Optional[str] = None
|