hatchet-sdk 0.40.0a9__py3-none-any.whl → 0.41.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.

Potentially problematic release.


This version of hatchet-sdk might be problematic. Click here for more details.

Files changed (149) hide show
  1. hatchet_sdk/clients/admin.py +129 -59
  2. hatchet_sdk/clients/dispatcher/action_listener.py +25 -2
  3. hatchet_sdk/clients/events.py +91 -52
  4. hatchet_sdk/clients/rest/__init__.py +21 -0
  5. hatchet_sdk/clients/rest/api/api_token_api.py +12 -9
  6. hatchet_sdk/clients/rest/api/default_api.py +24 -18
  7. hatchet_sdk/clients/rest/api/event_api.py +32 -24
  8. hatchet_sdk/clients/rest/api/github_api.py +4 -3
  9. hatchet_sdk/clients/rest/api/log_api.py +4 -3
  10. hatchet_sdk/clients/rest/api/metadata_api.py +12 -9
  11. hatchet_sdk/clients/rest/api/rate_limits_api.py +7 -4
  12. hatchet_sdk/clients/rest/api/slack_api.py +8 -6
  13. hatchet_sdk/clients/rest/api/sns_api.py +12 -9
  14. hatchet_sdk/clients/rest/api/step_run_api.py +28 -21
  15. hatchet_sdk/clients/rest/api/tenant_api.py +67 -49
  16. hatchet_sdk/clients/rest/api/user_api.py +24 -18
  17. hatchet_sdk/clients/rest/api/worker_api.py +12 -9
  18. hatchet_sdk/clients/rest/api/workflow_api.py +3073 -936
  19. hatchet_sdk/clients/rest/api/workflow_run_api.py +669 -21
  20. hatchet_sdk/clients/rest/api_client.py +34 -11
  21. hatchet_sdk/clients/rest/configuration.py +161 -36
  22. hatchet_sdk/clients/rest/models/__init__.py +21 -0
  23. hatchet_sdk/clients/rest/models/api_errors.py +3 -3
  24. hatchet_sdk/clients/rest/models/bulk_create_event_request.py +3 -3
  25. hatchet_sdk/clients/rest/models/bulk_create_event_response.py +3 -3
  26. hatchet_sdk/clients/{cloud_rest/models/managed_worker_create_request_build_config_steps_inner.py → rest/models/create_cron_workflow_trigger_request.py} +18 -14
  27. hatchet_sdk/clients/{cloud_rest/models/github_app_list_installations200_response_rows_inner.py → rest/models/cron_workflows.py} +54 -21
  28. hatchet_sdk/clients/{cloud_rest/models/log_list200_response.py → rest/models/cron_workflows_list.py} +13 -22
  29. hatchet_sdk/clients/rest/models/cron_workflows_order_by_field.py +37 -0
  30. hatchet_sdk/clients/rest/models/event_list.py +3 -3
  31. hatchet_sdk/clients/rest/models/get_step_run_diff_response.py +3 -3
  32. hatchet_sdk/clients/rest/models/job.py +3 -3
  33. hatchet_sdk/clients/rest/models/job_run.py +3 -3
  34. hatchet_sdk/clients/rest/models/list_api_tokens_response.py +3 -3
  35. hatchet_sdk/clients/rest/models/list_pull_requests_response.py +3 -3
  36. hatchet_sdk/clients/rest/models/list_slack_webhooks.py +3 -3
  37. hatchet_sdk/clients/rest/models/list_sns_integrations.py +3 -3
  38. hatchet_sdk/clients/rest/models/log_line_list.py +3 -3
  39. hatchet_sdk/clients/rest/models/rate_limit_list.py +3 -3
  40. hatchet_sdk/clients/rest/models/replay_workflow_runs_response.py +3 -3
  41. hatchet_sdk/clients/{cloud_rest/models/log_list200_response_rows_inner.py → rest/models/schedule_workflow_run_request.py} +12 -12
  42. hatchet_sdk/clients/rest/models/scheduled_run_status.py +42 -0
  43. hatchet_sdk/clients/rest/models/scheduled_workflows.py +153 -0
  44. hatchet_sdk/clients/{cloud_rest/models/managed_worker_list200_response.py → rest/models/scheduled_workflows_list.py} +13 -22
  45. hatchet_sdk/clients/rest/models/scheduled_workflows_order_by_field.py +37 -0
  46. hatchet_sdk/clients/rest/models/step_run_archive_list.py +3 -3
  47. hatchet_sdk/clients/rest/models/step_run_event_list.py +3 -3
  48. hatchet_sdk/clients/rest/models/tenant_alert_email_group_list.py +3 -3
  49. hatchet_sdk/clients/rest/models/tenant_invite_list.py +3 -3
  50. hatchet_sdk/clients/rest/models/tenant_list.py +3 -3
  51. hatchet_sdk/clients/rest/models/tenant_member_list.py +3 -3
  52. hatchet_sdk/clients/rest/models/tenant_queue_metrics.py +16 -0
  53. hatchet_sdk/clients/rest/models/tenant_resource_policy.py +3 -3
  54. hatchet_sdk/clients/rest/models/tenant_step_run_queue_metrics.py +1 -1
  55. hatchet_sdk/clients/rest/models/user_tenant_memberships_list.py +3 -3
  56. hatchet_sdk/clients/rest/models/webhook_worker_list_response.py +3 -3
  57. hatchet_sdk/clients/rest/models/webhook_worker_request_list_response.py +3 -3
  58. hatchet_sdk/clients/rest/models/worker.py +20 -9
  59. hatchet_sdk/clients/rest/models/worker_list.py +3 -3
  60. hatchet_sdk/clients/{cloud_rest/models/tenant_billing_state_get200_response_payment_methods_inner.py → rest/models/worker_runtime_info.py} +23 -19
  61. hatchet_sdk/clients/rest/models/worker_runtime_sdks.py +38 -0
  62. hatchet_sdk/clients/rest/models/workflow.py +9 -9
  63. hatchet_sdk/clients/rest/models/workflow_list.py +3 -3
  64. hatchet_sdk/clients/rest/models/workflow_run.py +3 -3
  65. hatchet_sdk/clients/rest/models/workflow_run_list.py +3 -3
  66. hatchet_sdk/clients/rest/models/workflow_run_shape.py +3 -3
  67. hatchet_sdk/clients/rest/models/workflow_runs_metrics.py +1 -5
  68. hatchet_sdk/clients/rest/models/workflow_triggers.py +6 -6
  69. hatchet_sdk/clients/rest/models/workflow_version.py +3 -3
  70. hatchet_sdk/clients/rest/rest.py +3 -3
  71. hatchet_sdk/clients/rest_client.py +200 -21
  72. hatchet_sdk/contracts/dispatcher_pb2.pyi +2 -0
  73. hatchet_sdk/contracts/events_pb2.pyi +2 -0
  74. hatchet_sdk/contracts/workflows_pb2.pyi +2 -0
  75. hatchet_sdk/features/cron.py +286 -0
  76. hatchet_sdk/features/scheduled.py +248 -0
  77. hatchet_sdk/hatchet.py +71 -79
  78. hatchet_sdk/loader.py +37 -14
  79. hatchet_sdk/utils/serialization.py +15 -0
  80. hatchet_sdk/utils/tracing.py +67 -0
  81. hatchet_sdk/worker/runner/runner.py +158 -112
  82. hatchet_sdk/worker/worker.py +1 -17
  83. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.41.0.dist-info}/METADATA +8 -2
  84. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.41.0.dist-info}/RECORD +86 -140
  85. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.41.0.dist-info}/entry_points.txt +0 -1
  86. hatchet_sdk/clients/cloud_rest/__init__.py +0 -186
  87. hatchet_sdk/clients/cloud_rest/api/__init__.py +0 -14
  88. hatchet_sdk/clients/cloud_rest/api/billing_api.py +0 -819
  89. hatchet_sdk/clients/cloud_rest/api/build_api.py +0 -298
  90. hatchet_sdk/clients/cloud_rest/api/feature_flags_api.py +0 -295
  91. hatchet_sdk/clients/cloud_rest/api/github_api.py +0 -1347
  92. hatchet_sdk/clients/cloud_rest/api/log_api.py +0 -971
  93. hatchet_sdk/clients/cloud_rest/api/managed_worker_api.py +0 -2546
  94. hatchet_sdk/clients/cloud_rest/api/metadata_api.py +0 -265
  95. hatchet_sdk/clients/cloud_rest/api/metrics_api.py +0 -1026
  96. hatchet_sdk/clients/cloud_rest/api/tenant_api.py +0 -301
  97. hatchet_sdk/clients/cloud_rest/api/user_api.py +0 -473
  98. hatchet_sdk/clients/cloud_rest/api/workflow_api.py +0 -369
  99. hatchet_sdk/clients/cloud_rest/api_client.py +0 -727
  100. hatchet_sdk/clients/cloud_rest/api_response.py +0 -22
  101. hatchet_sdk/clients/cloud_rest/configuration.py +0 -488
  102. hatchet_sdk/clients/cloud_rest/exceptions.py +0 -200
  103. hatchet_sdk/clients/cloud_rest/models/__init__.py +0 -157
  104. hatchet_sdk/clients/cloud_rest/models/billing_portal_link_get200_response.py +0 -85
  105. hatchet_sdk/clients/cloud_rest/models/build_get200_response.py +0 -121
  106. hatchet_sdk/clients/cloud_rest/models/github_app_list_branches200_response_inner.py +0 -86
  107. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response.py +0 -119
  108. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_pagination.py +0 -95
  109. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_rows_inner_metadata.py +0 -98
  110. hatchet_sdk/clients/cloud_rest/models/github_app_list_repos200_response_inner.py +0 -86
  111. hatchet_sdk/clients/cloud_rest/models/infra_as_code_create_request.py +0 -107
  112. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner.py +0 -136
  113. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_event.py +0 -83
  114. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly.py +0 -100
  115. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly_app.py +0 -86
  116. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_log.py +0 -83
  117. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request.py +0 -128
  118. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_build_config.py +0 -121
  119. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_runtime_config.py +0 -166
  120. hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response.py +0 -119
  121. hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response_rows_inner.py +0 -117
  122. hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response.py +0 -119
  123. hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response_rows_inner.py +0 -113
  124. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner.py +0 -154
  125. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config.py +0 -151
  126. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config_steps_inner.py +0 -109
  127. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_runtime_configs_inner.py +0 -171
  128. hatchet_sdk/clients/cloud_rest/models/managed_worker_update_request.py +0 -131
  129. hatchet_sdk/clients/cloud_rest/models/metadata_get200_response.py +0 -101
  130. hatchet_sdk/clients/cloud_rest/models/metadata_get400_response.py +0 -105
  131. hatchet_sdk/clients/cloud_rest/models/metadata_get400_response_errors_inner.py +0 -102
  132. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner.py +0 -108
  133. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner.py +0 -102
  134. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram.py +0 -113
  135. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram_buckets_inner.py +0 -93
  136. hatchet_sdk/clients/cloud_rest/models/runtime_config_list_actions200_response.py +0 -83
  137. hatchet_sdk/clients/cloud_rest/models/subscription_upsert200_response.py +0 -114
  138. hatchet_sdk/clients/cloud_rest/models/subscription_upsert_request.py +0 -88
  139. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response.py +0 -170
  140. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_coupons_inner.py +0 -137
  141. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_plans_inner.py +0 -103
  142. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_subscription.py +0 -114
  143. hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response.py +0 -107
  144. hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response_results_inner.py +0 -105
  145. hatchet_sdk/clients/cloud_rest/rest.py +0 -182
  146. hatchet_sdk/compute/__init__.py +0 -0
  147. hatchet_sdk/compute/configs.py +0 -34
  148. hatchet_sdk/compute/managed_compute.py +0 -111
  149. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.41.0.dist-info}/WHEEL +0 -0
@@ -1,298 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Hatchet API
5
-
6
- The Hatchet API
7
-
8
- The version of the OpenAPI document: 1.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
10
-
11
- Do not edit the class manually.
12
- """ # noqa: E501
13
-
14
- import warnings
15
- from typing import Any, Dict, List, Optional, Tuple, Union
16
-
17
- from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
18
- from typing_extensions import Annotated
19
-
20
- from hatchet_sdk.clients.cloud_rest.api_client import ApiClient, RequestSerialized
21
- from hatchet_sdk.clients.cloud_rest.api_response import ApiResponse
22
- from hatchet_sdk.clients.cloud_rest.models.build_get200_response import (
23
- BuildGet200Response,
24
- )
25
- from hatchet_sdk.clients.cloud_rest.rest import RESTResponseType
26
-
27
-
28
- class BuildApi:
29
- """NOTE: This class is auto generated by OpenAPI Generator
30
- Ref: https://openapi-generator.tech
31
-
32
- Do not edit the class manually.
33
- """
34
-
35
- def __init__(self, api_client=None) -> None:
36
- if api_client is None:
37
- api_client = ApiClient.get_default()
38
- self.api_client = api_client
39
-
40
- @validate_call
41
- async def build_get(
42
- self,
43
- build: Annotated[
44
- str,
45
- Field(
46
- min_length=36, strict=True, max_length=36, description="The build id"
47
- ),
48
- ],
49
- _request_timeout: Union[
50
- None,
51
- Annotated[StrictFloat, Field(gt=0)],
52
- Tuple[
53
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
54
- ],
55
- ] = None,
56
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
57
- _content_type: Optional[StrictStr] = None,
58
- _headers: Optional[Dict[StrictStr, Any]] = None,
59
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
- ) -> BuildGet200Response:
61
- """Get Build
62
-
63
- Get a build
64
-
65
- :param build: The build id (required)
66
- :type build: str
67
- :param _request_timeout: timeout setting for this request. If one
68
- number provided, it will be total request
69
- timeout. It can also be a pair (tuple) of
70
- (connection, read) timeouts.
71
- :type _request_timeout: int, tuple(int, int), optional
72
- :param _request_auth: set to override the auth_settings for an a single
73
- request; this effectively ignores the
74
- authentication in the spec for a single request.
75
- :type _request_auth: dict, optional
76
- :param _content_type: force content-type for the request.
77
- :type _content_type: str, Optional
78
- :param _headers: set to override the headers for a single
79
- request; this effectively ignores the headers
80
- in the spec for a single request.
81
- :type _headers: dict, optional
82
- :param _host_index: set to override the host_index for a single
83
- request; this effectively ignores the host_index
84
- in the spec for a single request.
85
- :type _host_index: int, optional
86
- :return: Returns the result object.
87
- """ # noqa: E501
88
-
89
- _param = self._build_get_serialize(
90
- build=build,
91
- _request_auth=_request_auth,
92
- _content_type=_content_type,
93
- _headers=_headers,
94
- _host_index=_host_index,
95
- )
96
-
97
- _response_types_map: Dict[str, Optional[str]] = {
98
- "200": "BuildGet200Response",
99
- "400": "MetadataGet400Response",
100
- "403": "MetadataGet400Response",
101
- }
102
- response_data = await self.api_client.call_api(
103
- *_param, _request_timeout=_request_timeout
104
- )
105
- await response_data.read()
106
- return self.api_client.response_deserialize(
107
- response_data=response_data,
108
- response_types_map=_response_types_map,
109
- ).data
110
-
111
- @validate_call
112
- async def build_get_with_http_info(
113
- self,
114
- build: Annotated[
115
- str,
116
- Field(
117
- min_length=36, strict=True, max_length=36, description="The build id"
118
- ),
119
- ],
120
- _request_timeout: Union[
121
- None,
122
- Annotated[StrictFloat, Field(gt=0)],
123
- Tuple[
124
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
125
- ],
126
- ] = None,
127
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
128
- _content_type: Optional[StrictStr] = None,
129
- _headers: Optional[Dict[StrictStr, Any]] = None,
130
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
131
- ) -> ApiResponse[BuildGet200Response]:
132
- """Get Build
133
-
134
- Get a build
135
-
136
- :param build: The build id (required)
137
- :type build: str
138
- :param _request_timeout: timeout setting for this request. If one
139
- number provided, it will be total request
140
- timeout. It can also be a pair (tuple) of
141
- (connection, read) timeouts.
142
- :type _request_timeout: int, tuple(int, int), optional
143
- :param _request_auth: set to override the auth_settings for an a single
144
- request; this effectively ignores the
145
- authentication in the spec for a single request.
146
- :type _request_auth: dict, optional
147
- :param _content_type: force content-type for the request.
148
- :type _content_type: str, Optional
149
- :param _headers: set to override the headers for a single
150
- request; this effectively ignores the headers
151
- in the spec for a single request.
152
- :type _headers: dict, optional
153
- :param _host_index: set to override the host_index for a single
154
- request; this effectively ignores the host_index
155
- in the spec for a single request.
156
- :type _host_index: int, optional
157
- :return: Returns the result object.
158
- """ # noqa: E501
159
-
160
- _param = self._build_get_serialize(
161
- build=build,
162
- _request_auth=_request_auth,
163
- _content_type=_content_type,
164
- _headers=_headers,
165
- _host_index=_host_index,
166
- )
167
-
168
- _response_types_map: Dict[str, Optional[str]] = {
169
- "200": "BuildGet200Response",
170
- "400": "MetadataGet400Response",
171
- "403": "MetadataGet400Response",
172
- }
173
- response_data = await self.api_client.call_api(
174
- *_param, _request_timeout=_request_timeout
175
- )
176
- await response_data.read()
177
- return self.api_client.response_deserialize(
178
- response_data=response_data,
179
- response_types_map=_response_types_map,
180
- )
181
-
182
- @validate_call
183
- async def build_get_without_preload_content(
184
- self,
185
- build: Annotated[
186
- str,
187
- Field(
188
- min_length=36, strict=True, max_length=36, description="The build id"
189
- ),
190
- ],
191
- _request_timeout: Union[
192
- None,
193
- Annotated[StrictFloat, Field(gt=0)],
194
- Tuple[
195
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
196
- ],
197
- ] = None,
198
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
199
- _content_type: Optional[StrictStr] = None,
200
- _headers: Optional[Dict[StrictStr, Any]] = None,
201
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
202
- ) -> RESTResponseType:
203
- """Get Build
204
-
205
- Get a build
206
-
207
- :param build: The build id (required)
208
- :type build: str
209
- :param _request_timeout: timeout setting for this request. If one
210
- number provided, it will be total request
211
- timeout. It can also be a pair (tuple) of
212
- (connection, read) timeouts.
213
- :type _request_timeout: int, tuple(int, int), optional
214
- :param _request_auth: set to override the auth_settings for an a single
215
- request; this effectively ignores the
216
- authentication in the spec for a single request.
217
- :type _request_auth: dict, optional
218
- :param _content_type: force content-type for the request.
219
- :type _content_type: str, Optional
220
- :param _headers: set to override the headers for a single
221
- request; this effectively ignores the headers
222
- in the spec for a single request.
223
- :type _headers: dict, optional
224
- :param _host_index: set to override the host_index for a single
225
- request; this effectively ignores the host_index
226
- in the spec for a single request.
227
- :type _host_index: int, optional
228
- :return: Returns the result object.
229
- """ # noqa: E501
230
-
231
- _param = self._build_get_serialize(
232
- build=build,
233
- _request_auth=_request_auth,
234
- _content_type=_content_type,
235
- _headers=_headers,
236
- _host_index=_host_index,
237
- )
238
-
239
- _response_types_map: Dict[str, Optional[str]] = {
240
- "200": "BuildGet200Response",
241
- "400": "MetadataGet400Response",
242
- "403": "MetadataGet400Response",
243
- }
244
- response_data = await self.api_client.call_api(
245
- *_param, _request_timeout=_request_timeout
246
- )
247
- return response_data.response
248
-
249
- def _build_get_serialize(
250
- self,
251
- build,
252
- _request_auth,
253
- _content_type,
254
- _headers,
255
- _host_index,
256
- ) -> RequestSerialized:
257
-
258
- _host = None
259
-
260
- _collection_formats: Dict[str, str] = {}
261
-
262
- _path_params: Dict[str, str] = {}
263
- _query_params: List[Tuple[str, str]] = []
264
- _header_params: Dict[str, Optional[str]] = _headers or {}
265
- _form_params: List[Tuple[str, str]] = []
266
- _files: Dict[str, Union[str, bytes]] = {}
267
- _body_params: Optional[bytes] = None
268
-
269
- # process the path parameters
270
- if build is not None:
271
- _path_params["build"] = build
272
- # process the query parameters
273
- # process the header parameters
274
- # process the form parameters
275
- # process the body parameter
276
-
277
- # set the HTTP header `Accept`
278
- _header_params["Accept"] = self.api_client.select_header_accept(
279
- ["application/json"]
280
- )
281
-
282
- # authentication setting
283
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
284
-
285
- return self.api_client.param_serialize(
286
- method="GET",
287
- resource_path="/api/v1/cloud/build/{build}",
288
- path_params=_path_params,
289
- query_params=_query_params,
290
- header_params=_header_params,
291
- body=_body_params,
292
- post_params=_form_params,
293
- files=_files,
294
- auth_settings=_auth_settings,
295
- collection_formats=_collection_formats,
296
- _host=_host,
297
- _request_auth=_request_auth,
298
- )
@@ -1,295 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Hatchet API
5
-
6
- The Hatchet API
7
-
8
- The version of the OpenAPI document: 1.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
10
-
11
- Do not edit the class manually.
12
- """ # noqa: E501
13
-
14
- import warnings
15
- from typing import Any, Dict, List, Optional, Tuple, Union
16
-
17
- from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
18
- from typing_extensions import Annotated
19
-
20
- from hatchet_sdk.clients.cloud_rest.api_client import ApiClient, RequestSerialized
21
- from hatchet_sdk.clients.cloud_rest.api_response import ApiResponse
22
- from hatchet_sdk.clients.cloud_rest.rest import RESTResponseType
23
-
24
-
25
- class FeatureFlagsApi:
26
- """NOTE: This class is auto generated by OpenAPI Generator
27
- Ref: https://openapi-generator.tech
28
-
29
- Do not edit the class manually.
30
- """
31
-
32
- def __init__(self, api_client=None) -> None:
33
- if api_client is None:
34
- api_client = ApiClient.get_default()
35
- self.api_client = api_client
36
-
37
- @validate_call
38
- async def feature_flags_list(
39
- self,
40
- tenant: Annotated[
41
- str,
42
- Field(
43
- min_length=36, strict=True, max_length=36, description="The tenant id"
44
- ),
45
- ],
46
- _request_timeout: Union[
47
- None,
48
- Annotated[StrictFloat, Field(gt=0)],
49
- Tuple[
50
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
51
- ],
52
- ] = None,
53
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
54
- _content_type: Optional[StrictStr] = None,
55
- _headers: Optional[Dict[StrictStr, Any]] = None,
56
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
57
- ) -> Dict[str, str]:
58
- """List Feature Flags
59
-
60
- Get all feature flags for the tenant
61
-
62
- :param tenant: The tenant id (required)
63
- :type tenant: str
64
- :param _request_timeout: timeout setting for this request. If one
65
- number provided, it will be total request
66
- timeout. It can also be a pair (tuple) of
67
- (connection, read) timeouts.
68
- :type _request_timeout: int, tuple(int, int), optional
69
- :param _request_auth: set to override the auth_settings for an a single
70
- request; this effectively ignores the
71
- authentication in the spec for a single request.
72
- :type _request_auth: dict, optional
73
- :param _content_type: force content-type for the request.
74
- :type _content_type: str, Optional
75
- :param _headers: set to override the headers for a single
76
- request; this effectively ignores the headers
77
- in the spec for a single request.
78
- :type _headers: dict, optional
79
- :param _host_index: set to override the host_index for a single
80
- request; this effectively ignores the host_index
81
- in the spec for a single request.
82
- :type _host_index: int, optional
83
- :return: Returns the result object.
84
- """ # noqa: E501
85
-
86
- _param = self._feature_flags_list_serialize(
87
- tenant=tenant,
88
- _request_auth=_request_auth,
89
- _content_type=_content_type,
90
- _headers=_headers,
91
- _host_index=_host_index,
92
- )
93
-
94
- _response_types_map: Dict[str, Optional[str]] = {
95
- "200": "Dict[str, str]",
96
- "400": "MetadataGet400Response",
97
- "403": "MetadataGet400Response",
98
- }
99
- response_data = await self.api_client.call_api(
100
- *_param, _request_timeout=_request_timeout
101
- )
102
- await response_data.read()
103
- return self.api_client.response_deserialize(
104
- response_data=response_data,
105
- response_types_map=_response_types_map,
106
- ).data
107
-
108
- @validate_call
109
- async def feature_flags_list_with_http_info(
110
- self,
111
- tenant: Annotated[
112
- str,
113
- Field(
114
- min_length=36, strict=True, max_length=36, description="The tenant id"
115
- ),
116
- ],
117
- _request_timeout: Union[
118
- None,
119
- Annotated[StrictFloat, Field(gt=0)],
120
- Tuple[
121
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
122
- ],
123
- ] = None,
124
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
125
- _content_type: Optional[StrictStr] = None,
126
- _headers: Optional[Dict[StrictStr, Any]] = None,
127
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
128
- ) -> ApiResponse[Dict[str, str]]:
129
- """List Feature Flags
130
-
131
- Get all feature flags for the tenant
132
-
133
- :param tenant: The tenant id (required)
134
- :type tenant: str
135
- :param _request_timeout: timeout setting for this request. If one
136
- number provided, it will be total request
137
- timeout. It can also be a pair (tuple) of
138
- (connection, read) timeouts.
139
- :type _request_timeout: int, tuple(int, int), optional
140
- :param _request_auth: set to override the auth_settings for an a single
141
- request; this effectively ignores the
142
- authentication in the spec for a single request.
143
- :type _request_auth: dict, optional
144
- :param _content_type: force content-type for the request.
145
- :type _content_type: str, Optional
146
- :param _headers: set to override the headers for a single
147
- request; this effectively ignores the headers
148
- in the spec for a single request.
149
- :type _headers: dict, optional
150
- :param _host_index: set to override the host_index for a single
151
- request; this effectively ignores the host_index
152
- in the spec for a single request.
153
- :type _host_index: int, optional
154
- :return: Returns the result object.
155
- """ # noqa: E501
156
-
157
- _param = self._feature_flags_list_serialize(
158
- tenant=tenant,
159
- _request_auth=_request_auth,
160
- _content_type=_content_type,
161
- _headers=_headers,
162
- _host_index=_host_index,
163
- )
164
-
165
- _response_types_map: Dict[str, Optional[str]] = {
166
- "200": "Dict[str, str]",
167
- "400": "MetadataGet400Response",
168
- "403": "MetadataGet400Response",
169
- }
170
- response_data = await self.api_client.call_api(
171
- *_param, _request_timeout=_request_timeout
172
- )
173
- await response_data.read()
174
- return self.api_client.response_deserialize(
175
- response_data=response_data,
176
- response_types_map=_response_types_map,
177
- )
178
-
179
- @validate_call
180
- async def feature_flags_list_without_preload_content(
181
- self,
182
- tenant: Annotated[
183
- str,
184
- Field(
185
- min_length=36, strict=True, max_length=36, description="The tenant id"
186
- ),
187
- ],
188
- _request_timeout: Union[
189
- None,
190
- Annotated[StrictFloat, Field(gt=0)],
191
- Tuple[
192
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
193
- ],
194
- ] = None,
195
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
196
- _content_type: Optional[StrictStr] = None,
197
- _headers: Optional[Dict[StrictStr, Any]] = None,
198
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
199
- ) -> RESTResponseType:
200
- """List Feature Flags
201
-
202
- Get all feature flags for the tenant
203
-
204
- :param tenant: The tenant id (required)
205
- :type tenant: str
206
- :param _request_timeout: timeout setting for this request. If one
207
- number provided, it will be total request
208
- timeout. It can also be a pair (tuple) of
209
- (connection, read) timeouts.
210
- :type _request_timeout: int, tuple(int, int), optional
211
- :param _request_auth: set to override the auth_settings for an a single
212
- request; this effectively ignores the
213
- authentication in the spec for a single request.
214
- :type _request_auth: dict, optional
215
- :param _content_type: force content-type for the request.
216
- :type _content_type: str, Optional
217
- :param _headers: set to override the headers for a single
218
- request; this effectively ignores the headers
219
- in the spec for a single request.
220
- :type _headers: dict, optional
221
- :param _host_index: set to override the host_index for a single
222
- request; this effectively ignores the host_index
223
- in the spec for a single request.
224
- :type _host_index: int, optional
225
- :return: Returns the result object.
226
- """ # noqa: E501
227
-
228
- _param = self._feature_flags_list_serialize(
229
- tenant=tenant,
230
- _request_auth=_request_auth,
231
- _content_type=_content_type,
232
- _headers=_headers,
233
- _host_index=_host_index,
234
- )
235
-
236
- _response_types_map: Dict[str, Optional[str]] = {
237
- "200": "Dict[str, str]",
238
- "400": "MetadataGet400Response",
239
- "403": "MetadataGet400Response",
240
- }
241
- response_data = await self.api_client.call_api(
242
- *_param, _request_timeout=_request_timeout
243
- )
244
- return response_data.response
245
-
246
- def _feature_flags_list_serialize(
247
- self,
248
- tenant,
249
- _request_auth,
250
- _content_type,
251
- _headers,
252
- _host_index,
253
- ) -> RequestSerialized:
254
-
255
- _host = None
256
-
257
- _collection_formats: Dict[str, str] = {}
258
-
259
- _path_params: Dict[str, str] = {}
260
- _query_params: List[Tuple[str, str]] = []
261
- _header_params: Dict[str, Optional[str]] = _headers or {}
262
- _form_params: List[Tuple[str, str]] = []
263
- _files: Dict[str, Union[str, bytes]] = {}
264
- _body_params: Optional[bytes] = None
265
-
266
- # process the path parameters
267
- if tenant is not None:
268
- _path_params["tenant"] = tenant
269
- # process the query parameters
270
- # process the header parameters
271
- # process the form parameters
272
- # process the body parameter
273
-
274
- # set the HTTP header `Accept`
275
- _header_params["Accept"] = self.api_client.select_header_accept(
276
- ["application/json"]
277
- )
278
-
279
- # authentication setting
280
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
281
-
282
- return self.api_client.param_serialize(
283
- method="GET",
284
- resource_path="/api/v1/cloud/tenants/{tenant}/feature-flags",
285
- path_params=_path_params,
286
- query_params=_query_params,
287
- header_params=_header_params,
288
- body=_body_params,
289
- post_params=_form_params,
290
- files=_files,
291
- auth_settings=_auth_settings,
292
- collection_formats=_collection_formats,
293
- _host=_host,
294
- _request_auth=_request_auth,
295
- )