render_sdk 0.1.2__py3-none-any.whl → 0.2.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 (156) hide show
  1. render_sdk/__init__.py +41 -4
  2. render_sdk/client/__init__.py +25 -0
  3. render_sdk/client/client.py +5 -0
  4. render_sdk/client/sse.py +5 -1
  5. render_sdk/client/tests/test_client.py +6 -4
  6. render_sdk/client/tests/test_sse.py +1 -0
  7. render_sdk/client/types.py +2 -1
  8. render_sdk/client/workflows.py +13 -3
  9. render_sdk/experimental/__init__.py +31 -0
  10. render_sdk/experimental/experimental.py +71 -0
  11. render_sdk/experimental/object/__init__.py +30 -0
  12. render_sdk/experimental/object/api.py +260 -0
  13. render_sdk/experimental/object/client.py +475 -0
  14. render_sdk/experimental/object/types.py +87 -0
  15. render_sdk/public_api/api/audit_logs/list_organization_audit_logs.py +303 -0
  16. render_sdk/public_api/api/audit_logs/list_owner_audit_logs.py +303 -0
  17. render_sdk/public_api/api/blob_storage/delete_blob.py +215 -0
  18. render_sdk/public_api/api/blob_storage/get_blob.py +221 -0
  19. render_sdk/public_api/api/{workflows/list_workflow_versions.py → blob_storage/list_blobs.py} +52 -30
  20. render_sdk/public_api/api/blob_storage/put_blob.py +248 -0
  21. render_sdk/public_api/api/blueprints/validate_blueprint.py +212 -0
  22. render_sdk/public_api/api/key_value/resume_key_value.py +203 -0
  23. render_sdk/public_api/api/key_value/suspend_key_value.py +203 -0
  24. render_sdk/public_api/api/metrics/get_bandwidth_sources.py +251 -0
  25. render_sdk/public_api/api/postgres/create_postgres_user.py +229 -0
  26. render_sdk/public_api/api/postgres/delete_postgres_user.py +201 -0
  27. render_sdk/public_api/api/postgres/list_postgres_users.py +195 -0
  28. render_sdk/public_api/api/redis_deprecated/__init__.py +1 -0
  29. render_sdk/public_api/api/{redis → redis_deprecated}/create_redis.py +4 -4
  30. render_sdk/public_api/api/{redis → redis_deprecated}/delete_redis.py +4 -4
  31. render_sdk/public_api/api/{redis → redis_deprecated}/list_redis.py +4 -0
  32. render_sdk/public_api/api/{redis → redis_deprecated}/retrieve_redis.py +4 -4
  33. render_sdk/public_api/api/{redis → redis_deprecated}/retrieve_redis_connection_info.py +4 -0
  34. render_sdk/public_api/api/{redis → redis_deprecated}/update_redis.py +4 -4
  35. render_sdk/public_api/api/services/create_service.py +4 -4
  36. render_sdk/public_api/api/workflow_tasks_ea/__init__.py +1 -0
  37. render_sdk/public_api/api/{workflows → workflow_tasks_ea}/cancel_task_run.py +12 -4
  38. render_sdk/public_api/api/{workflows → workflow_tasks_ea}/create_task.py +12 -4
  39. render_sdk/public_api/api/{workflows → workflow_tasks_ea}/get_task.py +12 -4
  40. render_sdk/public_api/api/{workflows → workflow_tasks_ea}/get_task_run.py +12 -4
  41. render_sdk/public_api/api/{workflows → workflow_tasks_ea}/list_task_runs.py +12 -0
  42. render_sdk/public_api/api/{workflows → workflow_tasks_ea}/list_tasks.py +24 -12
  43. render_sdk/public_api/api/workflows_ea/__init__.py +1 -0
  44. render_sdk/public_api/api/workflows_ea/create_workflow.py +199 -0
  45. render_sdk/public_api/api/{workflows/deploy_workflow.py → workflows_ea/create_workflow_version.py} +31 -14
  46. render_sdk/public_api/api/{workflows → workflows_ea}/delete_workflow.py +12 -4
  47. render_sdk/public_api/api/{workflows → workflows_ea}/get_workflow.py +32 -14
  48. render_sdk/public_api/api/{workflows → workflows_ea}/get_workflow_version.py +12 -4
  49. render_sdk/public_api/api/workflows_ea/list_workflow_versions.py +275 -0
  50. render_sdk/public_api/api/{workflows → workflows_ea}/list_workflows.py +41 -14
  51. render_sdk/public_api/api/workflows_ea/update_workflow.py +212 -0
  52. render_sdk/public_api/api/workspaces/remove_workspace_member.py +206 -0
  53. render_sdk/public_api/api/workspaces/update_workspace_member.py +235 -0
  54. render_sdk/public_api/models/__init__.py +82 -4
  55. render_sdk/public_api/models/audit_log.py +113 -0
  56. render_sdk/public_api/models/audit_log_actor.py +80 -0
  57. render_sdk/public_api/models/audit_log_actor_type.py +10 -0
  58. render_sdk/public_api/models/audit_log_event.py +80 -0
  59. render_sdk/public_api/models/audit_log_metadata.py +49 -0
  60. render_sdk/public_api/models/audit_log_status.py +9 -0
  61. render_sdk/public_api/models/audit_log_with_cursor.py +73 -0
  62. render_sdk/public_api/models/background_worker_details.py +2 -2
  63. render_sdk/public_api/models/background_worker_details_patch.py +1 -1
  64. render_sdk/public_api/models/background_worker_details_post.py +1 -1
  65. render_sdk/public_api/models/blob_metadata.py +85 -0
  66. render_sdk/public_api/models/blob_with_cursor.py +73 -0
  67. render_sdk/public_api/models/cache.py +6 -4
  68. render_sdk/public_api/models/cache_profile.py +10 -0
  69. render_sdk/public_api/models/create_deploy_body.py +23 -0
  70. render_sdk/public_api/models/create_version.py +70 -0
  71. render_sdk/public_api/models/credential_create_input.py +59 -0
  72. render_sdk/public_api/models/cron_job_details.py +2 -2
  73. render_sdk/public_api/models/cron_job_details_patch.py +1 -1
  74. render_sdk/public_api/models/cron_job_details_post.py +1 -1
  75. render_sdk/public_api/models/deploy_mode.py +9 -0
  76. render_sdk/public_api/models/event.py +11 -27
  77. render_sdk/public_api/models/event_type.py +1 -1
  78. render_sdk/public_api/models/get_bandwidth_sources_response_200.py +75 -0
  79. render_sdk/public_api/models/get_bandwidth_sources_response_200_data_item.py +101 -0
  80. render_sdk/public_api/models/get_bandwidth_sources_response_200_data_item_labels.py +78 -0
  81. render_sdk/public_api/models/get_bandwidth_sources_response_200_data_item_labels_traffic_source.py +12 -0
  82. render_sdk/public_api/models/get_bandwidth_sources_response_200_data_item_values_item.py +68 -0
  83. render_sdk/public_api/models/{server_unhealthy.py → get_bandwidth_sources_response_400.py} +12 -12
  84. render_sdk/public_api/models/get_blob_output.py +71 -0
  85. render_sdk/public_api/models/list_postgres_users_response_200_item.py +86 -0
  86. render_sdk/public_api/models/otel_provider_type.py +2 -0
  87. render_sdk/public_api/models/postgres.py +8 -0
  88. render_sdk/public_api/models/postgres_detail.py +26 -0
  89. render_sdk/public_api/models/postgres_parameter_overrides.py +44 -0
  90. render_sdk/public_api/models/postgres_patch_input.py +27 -0
  91. render_sdk/public_api/models/postgres_post_input.py +27 -0
  92. render_sdk/public_api/models/postgres_version.py +1 -0
  93. render_sdk/public_api/models/preview_input.py +2 -2
  94. render_sdk/public_api/models/private_service_details.py +2 -2
  95. render_sdk/public_api/models/private_service_details_patch.py +1 -1
  96. render_sdk/public_api/models/private_service_details_post.py +1 -1
  97. render_sdk/public_api/models/project_post_environment_input.py +26 -1
  98. render_sdk/public_api/models/put_blob_input.py +59 -0
  99. render_sdk/public_api/models/put_blob_output.py +79 -0
  100. render_sdk/public_api/models/read_replica.py +25 -1
  101. render_sdk/public_api/models/read_replica_input.py +25 -1
  102. render_sdk/public_api/models/run_task.py +35 -7
  103. render_sdk/public_api/models/service_event.py +12 -27
  104. render_sdk/public_api/models/service_event_type.py +0 -1
  105. render_sdk/public_api/models/service_post.py +9 -6
  106. render_sdk/public_api/models/task_attempt.py +88 -0
  107. render_sdk/public_api/models/task_attempt_details.py +108 -0
  108. render_sdk/public_api/models/task_data_type_1.py +44 -0
  109. render_sdk/public_api/models/task_run.py +23 -1
  110. render_sdk/public_api/models/task_run_details.py +50 -5
  111. render_sdk/public_api/models/task_run_status.py +1 -0
  112. render_sdk/public_api/models/task_with_cursor.py +73 -0
  113. render_sdk/public_api/models/team_member.py +5 -4
  114. render_sdk/public_api/models/team_member_role.py +12 -0
  115. render_sdk/public_api/models/update_workspace_member_body.py +61 -0
  116. render_sdk/public_api/models/validate_blueprint_request.py +84 -0
  117. render_sdk/public_api/models/validate_blueprint_response.py +105 -0
  118. render_sdk/public_api/models/validation_error.py +88 -0
  119. render_sdk/public_api/models/validation_plan_summary.py +107 -0
  120. render_sdk/public_api/models/web_service_details.py +2 -2
  121. render_sdk/public_api/models/web_service_details_patch.py +6 -5
  122. render_sdk/public_api/models/web_service_details_post.py +6 -5
  123. render_sdk/public_api/models/workflow.py +144 -0
  124. render_sdk/public_api/models/workflow_create.py +99 -0
  125. render_sdk/public_api/models/workflow_update.py +90 -0
  126. render_sdk/public_api/models/workflow_version.py +10 -14
  127. render_sdk/public_api/models/workflow_version_status.py +13 -0
  128. render_sdk/public_api/models/workflow_version_with_cursor.py +73 -0
  129. render_sdk/public_api/models/workflow_with_cursor.py +73 -0
  130. render_sdk/render.py +65 -0
  131. render_sdk/version.py +27 -0
  132. render_sdk/workflows/__init__.py +5 -1
  133. render_sdk/workflows/app.py +262 -0
  134. render_sdk/workflows/callback_api/models/__init__.py +2 -0
  135. render_sdk/workflows/callback_api/models/task.py +21 -0
  136. render_sdk/workflows/callback_api/models/task_options.py +18 -0
  137. render_sdk/workflows/callback_api/models/task_parameter.py +88 -0
  138. render_sdk/workflows/callback_api/py.typed +1 -1
  139. render_sdk/workflows/cli.py +58 -0
  140. render_sdk/workflows/client.py +8 -9
  141. render_sdk/workflows/executor.py +19 -7
  142. render_sdk/workflows/runner.py +43 -10
  143. render_sdk/workflows/task.py +84 -5
  144. render_sdk/workflows/tests/test_app.py +412 -0
  145. render_sdk/workflows/tests/test_cli.py +134 -0
  146. render_sdk/workflows/tests/test_end_to_end.py +71 -1
  147. render_sdk/workflows/tests/test_registration.py +58 -1
  148. {render_sdk-0.1.2.dist-info → render_sdk-0.2.0.dist-info}/METADATA +4 -3
  149. {render_sdk-0.1.2.dist-info → render_sdk-0.2.0.dist-info}/RECORD +155 -83
  150. {render_sdk-0.1.2.dist-info → render_sdk-0.2.0.dist-info}/WHEEL +1 -1
  151. render_sdk-0.2.0.dist-info/entry_points.txt +3 -0
  152. render_sdk/public_api/models/image_version.py +0 -79
  153. /render_sdk/public_api/api/{redis → audit_logs}/__init__.py +0 -0
  154. /render_sdk/public_api/api/{workflows → blob_storage}/__init__.py +0 -0
  155. /render_sdk/public_api/api/{workflows → workflow_tasks_ea}/stream_task_runs_events.py +0 -0
  156. {render_sdk-0.1.2.dist-info → render_sdk-0.2.0.dist-info/licenses}/LICENSE +0 -0
@@ -95,7 +95,9 @@ def sync_detailed(
95
95
  client: Union[AuthenticatedClient, Client],
96
96
  body: RunTask,
97
97
  ) -> Response[Union[Error, TaskRun]]:
98
- """Run a task
98
+ """Run task
99
+
100
+ Kicks off a run of the workflow task with the provided ID, passing the provided input data.
99
101
 
100
102
  Args:
101
103
  body (RunTask):
@@ -124,7 +126,9 @@ def sync(
124
126
  client: Union[AuthenticatedClient, Client],
125
127
  body: RunTask,
126
128
  ) -> Optional[Union[Error, TaskRun]]:
127
- """Run a task
129
+ """Run task
130
+
131
+ Kicks off a run of the workflow task with the provided ID, passing the provided input data.
128
132
 
129
133
  Args:
130
134
  body (RunTask):
@@ -148,7 +152,9 @@ async def asyncio_detailed(
148
152
  client: Union[AuthenticatedClient, Client],
149
153
  body: RunTask,
150
154
  ) -> Response[Union[Error, TaskRun]]:
151
- """Run a task
155
+ """Run task
156
+
157
+ Kicks off a run of the workflow task with the provided ID, passing the provided input data.
152
158
 
153
159
  Args:
154
160
  body (RunTask):
@@ -175,7 +181,9 @@ async def asyncio(
175
181
  client: Union[AuthenticatedClient, Client],
176
182
  body: RunTask,
177
183
  ) -> Optional[Union[Error, TaskRun]]:
178
- """Run a task
184
+ """Run task
185
+
186
+ Kicks off a run of the workflow task with the provided ID, passing the provided input data.
179
187
 
180
188
  Args:
181
189
  body (RunTask):
@@ -81,7 +81,9 @@ def sync_detailed(
81
81
  *,
82
82
  client: Union[AuthenticatedClient, Client],
83
83
  ) -> Response[Union[Error, Task]]:
84
- """Get a task
84
+ """Retrieve task
85
+
86
+ Retrieve the workflow task with the provided ID.
85
87
 
86
88
  Args:
87
89
  task_id (str):
@@ -110,7 +112,9 @@ def sync(
110
112
  *,
111
113
  client: Union[AuthenticatedClient, Client],
112
114
  ) -> Optional[Union[Error, Task]]:
113
- """Get a task
115
+ """Retrieve task
116
+
117
+ Retrieve the workflow task with the provided ID.
114
118
 
115
119
  Args:
116
120
  task_id (str):
@@ -134,7 +138,9 @@ async def asyncio_detailed(
134
138
  *,
135
139
  client: Union[AuthenticatedClient, Client],
136
140
  ) -> Response[Union[Error, Task]]:
137
- """Get a task
141
+ """Retrieve task
142
+
143
+ Retrieve the workflow task with the provided ID.
138
144
 
139
145
  Args:
140
146
  task_id (str):
@@ -161,7 +167,9 @@ async def asyncio(
161
167
  *,
162
168
  client: Union[AuthenticatedClient, Client],
163
169
  ) -> Optional[Union[Error, Task]]:
164
- """Get a task
170
+ """Retrieve task
171
+
172
+ Retrieve the workflow task with the provided ID.
165
173
 
166
174
  Args:
167
175
  task_id (str):
@@ -81,7 +81,9 @@ def sync_detailed(
81
81
  *,
82
82
  client: Union[AuthenticatedClient, Client],
83
83
  ) -> Response[Union[Error, TaskRunDetails]]:
84
- """Get a task run
84
+ """Retrieve task run
85
+
86
+ Retrieve the workflow task run with the provided ID.
85
87
 
86
88
  Args:
87
89
  task_run_id (str):
@@ -110,7 +112,9 @@ def sync(
110
112
  *,
111
113
  client: Union[AuthenticatedClient, Client],
112
114
  ) -> Optional[Union[Error, TaskRunDetails]]:
113
- """Get a task run
115
+ """Retrieve task run
116
+
117
+ Retrieve the workflow task run with the provided ID.
114
118
 
115
119
  Args:
116
120
  task_run_id (str):
@@ -134,7 +138,9 @@ async def asyncio_detailed(
134
138
  *,
135
139
  client: Union[AuthenticatedClient, Client],
136
140
  ) -> Response[Union[Error, TaskRunDetails]]:
137
- """Get a task run
141
+ """Retrieve task run
142
+
143
+ Retrieve the workflow task run with the provided ID.
138
144
 
139
145
  Args:
140
146
  task_run_id (str):
@@ -161,7 +167,9 @@ async def asyncio(
161
167
  *,
162
168
  client: Union[AuthenticatedClient, Client],
163
169
  ) -> Optional[Union[Error, TaskRunDetails]]:
164
- """Get a task run
170
+ """Retrieve task run
171
+
172
+ Retrieve the workflow task run with the provided ID.
165
173
 
166
174
  Args:
167
175
  task_run_id (str):
@@ -140,6 +140,9 @@ def sync_detailed(
140
140
  ) -> Response[Union[Error, list["TaskRun"]]]:
141
141
  """List task runs
142
142
 
143
+ List task runs that match the provided filters. If no filters are provided, all task runs accessible
144
+ by the authenticated user are returned.
145
+
143
146
  Args:
144
147
  cursor (Union[Unset, str]):
145
148
  limit (Union[Unset, int]): Defaults to 20 Default: 20.
@@ -187,6 +190,9 @@ def sync(
187
190
  ) -> Optional[Union[Error, list["TaskRun"]]]:
188
191
  """List task runs
189
192
 
193
+ List task runs that match the provided filters. If no filters are provided, all task runs accessible
194
+ by the authenticated user are returned.
195
+
190
196
  Args:
191
197
  cursor (Union[Unset, str]):
192
198
  limit (Union[Unset, int]): Defaults to 20 Default: 20.
@@ -229,6 +235,9 @@ async def asyncio_detailed(
229
235
  ) -> Response[Union[Error, list["TaskRun"]]]:
230
236
  """List task runs
231
237
 
238
+ List task runs that match the provided filters. If no filters are provided, all task runs accessible
239
+ by the authenticated user are returned.
240
+
232
241
  Args:
233
242
  cursor (Union[Unset, str]):
234
243
  limit (Union[Unset, int]): Defaults to 20 Default: 20.
@@ -274,6 +283,9 @@ async def asyncio(
274
283
  ) -> Optional[Union[Error, list["TaskRun"]]]:
275
284
  """List task runs
276
285
 
286
+ List task runs that match the provided filters. If no filters are provided, all task runs accessible
287
+ by the authenticated user are returned.
288
+
277
289
  Args:
278
290
  cursor (Union[Unset, str]):
279
291
  limit (Union[Unset, int]): Defaults to 20 Default: 20.
@@ -6,7 +6,7 @@ import httpx
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.error import Error
9
- from ...models.task import Task
9
+ from ...models.task_with_cursor import TaskWithCursor
10
10
  from ...types import UNSET, Response, Unset
11
11
 
12
12
 
@@ -62,12 +62,12 @@ def _get_kwargs(
62
62
 
63
63
  def _parse_response(
64
64
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
65
- ) -> Optional[Union[Error, list["Task"]]]:
65
+ ) -> Optional[Union[Error, list["TaskWithCursor"]]]:
66
66
  if response.status_code == 200:
67
67
  response_200 = []
68
68
  _response_200 = response.json()
69
69
  for response_200_item_data in _response_200:
70
- response_200_item = Task.from_dict(response_200_item_data)
70
+ response_200_item = TaskWithCursor.from_dict(response_200_item_data)
71
71
 
72
72
  response_200.append(response_200_item)
73
73
 
@@ -111,7 +111,7 @@ def _parse_response(
111
111
 
112
112
  def _build_response(
113
113
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
114
- ) -> Response[Union[Error, list["Task"]]]:
114
+ ) -> Response[Union[Error, list["TaskWithCursor"]]]:
115
115
  return Response(
116
116
  status_code=HTTPStatus(response.status_code),
117
117
  content=response.content,
@@ -129,9 +129,12 @@ def sync_detailed(
129
129
  task_id: Union[Unset, list[str]] = UNSET,
130
130
  workflow_version_id: Union[Unset, list[str]] = UNSET,
131
131
  workflow_id: Union[Unset, list[str]] = UNSET,
132
- ) -> Response[Union[Error, list["Task"]]]:
132
+ ) -> Response[Union[Error, list["TaskWithCursor"]]]:
133
133
  """List tasks
134
134
 
135
+ List workflow tasks that match the provided filters. If no filters are provided, all task
136
+ definitions accessible by the authenticated user are returned.
137
+
135
138
  Args:
136
139
  cursor (Union[Unset, str]):
137
140
  limit (Union[Unset, int]): Defaults to 20 Default: 20.
@@ -145,7 +148,7 @@ def sync_detailed(
145
148
  httpx.TimeoutException: If the request takes longer than Client.timeout.
146
149
 
147
150
  Returns:
148
- Response[Union[Error, list['Task']]]
151
+ Response[Union[Error, list['TaskWithCursor']]]
149
152
  """
150
153
 
151
154
  kwargs = _get_kwargs(
@@ -173,9 +176,12 @@ def sync(
173
176
  task_id: Union[Unset, list[str]] = UNSET,
174
177
  workflow_version_id: Union[Unset, list[str]] = UNSET,
175
178
  workflow_id: Union[Unset, list[str]] = UNSET,
176
- ) -> Optional[Union[Error, list["Task"]]]:
179
+ ) -> Optional[Union[Error, list["TaskWithCursor"]]]:
177
180
  """List tasks
178
181
 
182
+ List workflow tasks that match the provided filters. If no filters are provided, all task
183
+ definitions accessible by the authenticated user are returned.
184
+
179
185
  Args:
180
186
  cursor (Union[Unset, str]):
181
187
  limit (Union[Unset, int]): Defaults to 20 Default: 20.
@@ -189,7 +195,7 @@ def sync(
189
195
  httpx.TimeoutException: If the request takes longer than Client.timeout.
190
196
 
191
197
  Returns:
192
- Union[Error, list['Task']]
198
+ Union[Error, list['TaskWithCursor']]
193
199
  """
194
200
 
195
201
  return sync_detailed(
@@ -212,9 +218,12 @@ async def asyncio_detailed(
212
218
  task_id: Union[Unset, list[str]] = UNSET,
213
219
  workflow_version_id: Union[Unset, list[str]] = UNSET,
214
220
  workflow_id: Union[Unset, list[str]] = UNSET,
215
- ) -> Response[Union[Error, list["Task"]]]:
221
+ ) -> Response[Union[Error, list["TaskWithCursor"]]]:
216
222
  """List tasks
217
223
 
224
+ List workflow tasks that match the provided filters. If no filters are provided, all task
225
+ definitions accessible by the authenticated user are returned.
226
+
218
227
  Args:
219
228
  cursor (Union[Unset, str]):
220
229
  limit (Union[Unset, int]): Defaults to 20 Default: 20.
@@ -228,7 +237,7 @@ async def asyncio_detailed(
228
237
  httpx.TimeoutException: If the request takes longer than Client.timeout.
229
238
 
230
239
  Returns:
231
- Response[Union[Error, list['Task']]]
240
+ Response[Union[Error, list['TaskWithCursor']]]
232
241
  """
233
242
 
234
243
  kwargs = _get_kwargs(
@@ -254,9 +263,12 @@ async def asyncio(
254
263
  task_id: Union[Unset, list[str]] = UNSET,
255
264
  workflow_version_id: Union[Unset, list[str]] = UNSET,
256
265
  workflow_id: Union[Unset, list[str]] = UNSET,
257
- ) -> Optional[Union[Error, list["Task"]]]:
266
+ ) -> Optional[Union[Error, list["TaskWithCursor"]]]:
258
267
  """List tasks
259
268
 
269
+ List workflow tasks that match the provided filters. If no filters are provided, all task
270
+ definitions accessible by the authenticated user are returned.
271
+
260
272
  Args:
261
273
  cursor (Union[Unset, str]):
262
274
  limit (Union[Unset, int]): Defaults to 20 Default: 20.
@@ -270,7 +282,7 @@ async def asyncio(
270
282
  httpx.TimeoutException: If the request takes longer than Client.timeout.
271
283
 
272
284
  Returns:
273
- Union[Error, list['Task']]
285
+ Union[Error, list['TaskWithCursor']]
274
286
  """
275
287
 
276
288
  return (
@@ -0,0 +1 @@
1
+ """Contains endpoint functions for accessing the API"""
@@ -0,0 +1,199 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.error import Error
9
+ from ...models.workflow import Workflow
10
+ from ...models.workflow_create import WorkflowCreate
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ *,
16
+ body: WorkflowCreate,
17
+ ) -> dict[str, Any]:
18
+ headers: dict[str, Any] = {}
19
+
20
+ _kwargs: dict[str, Any] = {
21
+ "method": "post",
22
+ "url": "/workflows",
23
+ }
24
+
25
+ _kwargs["json"] = body.to_dict()
26
+
27
+ headers["Content-Type"] = "application/json"
28
+
29
+ _kwargs["headers"] = headers
30
+ return _kwargs
31
+
32
+
33
+ def _parse_response(
34
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
35
+ ) -> Optional[Union[Error, Workflow]]:
36
+ if response.status_code == 201:
37
+ response_201 = Workflow.from_dict(response.json())
38
+
39
+ return response_201
40
+
41
+ if response.status_code == 401:
42
+ response_401 = Error.from_dict(response.json())
43
+
44
+ return response_401
45
+
46
+ if response.status_code == 403:
47
+ response_403 = Error.from_dict(response.json())
48
+
49
+ return response_403
50
+
51
+ if response.status_code == 404:
52
+ response_404 = Error.from_dict(response.json())
53
+
54
+ return response_404
55
+
56
+ if response.status_code == 429:
57
+ response_429 = Error.from_dict(response.json())
58
+
59
+ return response_429
60
+
61
+ if response.status_code == 500:
62
+ response_500 = Error.from_dict(response.json())
63
+
64
+ return response_500
65
+
66
+ if response.status_code == 503:
67
+ response_503 = Error.from_dict(response.json())
68
+
69
+ return response_503
70
+
71
+ if client.raise_on_unexpected_status:
72
+ raise errors.UnexpectedStatus(response.status_code, response.content)
73
+ else:
74
+ return None
75
+
76
+
77
+ def _build_response(
78
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
79
+ ) -> Response[Union[Error, Workflow]]:
80
+ return Response(
81
+ status_code=HTTPStatus(response.status_code),
82
+ content=response.content,
83
+ headers=response.headers,
84
+ parsed=_parse_response(client=client, response=response),
85
+ )
86
+
87
+
88
+ def sync_detailed(
89
+ *,
90
+ client: Union[AuthenticatedClient, Client],
91
+ body: WorkflowCreate,
92
+ ) -> Response[Union[Error, Workflow]]:
93
+ """Create a workflow
94
+
95
+ Create a new workflow service with the specified configuration.
96
+
97
+ Args:
98
+ body (WorkflowCreate):
99
+
100
+ Raises:
101
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
102
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
103
+
104
+ Returns:
105
+ Response[Union[Error, Workflow]]
106
+ """
107
+
108
+ kwargs = _get_kwargs(
109
+ body=body,
110
+ )
111
+
112
+ response = client.get_httpx_client().request(
113
+ **kwargs,
114
+ )
115
+
116
+ return _build_response(client=client, response=response)
117
+
118
+
119
+ def sync(
120
+ *,
121
+ client: Union[AuthenticatedClient, Client],
122
+ body: WorkflowCreate,
123
+ ) -> Optional[Union[Error, Workflow]]:
124
+ """Create a workflow
125
+
126
+ Create a new workflow service with the specified configuration.
127
+
128
+ Args:
129
+ body (WorkflowCreate):
130
+
131
+ Raises:
132
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
133
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
134
+
135
+ Returns:
136
+ Union[Error, Workflow]
137
+ """
138
+
139
+ return sync_detailed(
140
+ client=client,
141
+ body=body,
142
+ ).parsed
143
+
144
+
145
+ async def asyncio_detailed(
146
+ *,
147
+ client: Union[AuthenticatedClient, Client],
148
+ body: WorkflowCreate,
149
+ ) -> Response[Union[Error, Workflow]]:
150
+ """Create a workflow
151
+
152
+ Create a new workflow service with the specified configuration.
153
+
154
+ Args:
155
+ body (WorkflowCreate):
156
+
157
+ Raises:
158
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
159
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
160
+
161
+ Returns:
162
+ Response[Union[Error, Workflow]]
163
+ """
164
+
165
+ kwargs = _get_kwargs(
166
+ body=body,
167
+ )
168
+
169
+ response = await client.get_async_httpx_client().request(**kwargs)
170
+
171
+ return _build_response(client=client, response=response)
172
+
173
+
174
+ async def asyncio(
175
+ *,
176
+ client: Union[AuthenticatedClient, Client],
177
+ body: WorkflowCreate,
178
+ ) -> Optional[Union[Error, Workflow]]:
179
+ """Create a workflow
180
+
181
+ Create a new workflow service with the specified configuration.
182
+
183
+ Args:
184
+ body (WorkflowCreate):
185
+
186
+ Raises:
187
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
188
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
189
+
190
+ Returns:
191
+ Union[Error, Workflow]
192
+ """
193
+
194
+ return (
195
+ await asyncio_detailed(
196
+ client=client,
197
+ body=body,
198
+ )
199
+ ).parsed
@@ -5,18 +5,27 @@ import httpx
5
5
 
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
+ from ...models.create_version import CreateVersion
8
9
  from ...models.error import Error
9
10
  from ...types import Response
10
11
 
11
12
 
12
13
  def _get_kwargs(
13
- workflow_id: str,
14
+ *,
15
+ body: CreateVersion,
14
16
  ) -> dict[str, Any]:
17
+ headers: dict[str, Any] = {}
18
+
15
19
  _kwargs: dict[str, Any] = {
16
20
  "method": "post",
17
- "url": f"/workflows/{workflow_id}/deploy",
21
+ "url": "/workflowversions",
18
22
  }
19
23
 
24
+ _kwargs["json"] = body.to_dict()
25
+
26
+ headers["Content-Type"] = "application/json"
27
+
28
+ _kwargs["headers"] = headers
20
29
  return _kwargs
21
30
 
22
31
 
@@ -75,14 +84,16 @@ def _build_response(
75
84
 
76
85
 
77
86
  def sync_detailed(
78
- workflow_id: str,
79
87
  *,
80
88
  client: Union[AuthenticatedClient, Client],
89
+ body: CreateVersion,
81
90
  ) -> Response[Union[Any, Error]]:
82
91
  """Deploy a workflow version
83
92
 
93
+ Creates and deploys a new version of a workflow.
94
+
84
95
  Args:
85
- workflow_id (str):
96
+ body (CreateVersion):
86
97
 
87
98
  Raises:
88
99
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -93,7 +104,7 @@ def sync_detailed(
93
104
  """
94
105
 
95
106
  kwargs = _get_kwargs(
96
- workflow_id=workflow_id,
107
+ body=body,
97
108
  )
98
109
 
99
110
  response = client.get_httpx_client().request(
@@ -104,14 +115,16 @@ def sync_detailed(
104
115
 
105
116
 
106
117
  def sync(
107
- workflow_id: str,
108
118
  *,
109
119
  client: Union[AuthenticatedClient, Client],
120
+ body: CreateVersion,
110
121
  ) -> Optional[Union[Any, Error]]:
111
122
  """Deploy a workflow version
112
123
 
124
+ Creates and deploys a new version of a workflow.
125
+
113
126
  Args:
114
- workflow_id (str):
127
+ body (CreateVersion):
115
128
 
116
129
  Raises:
117
130
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -122,20 +135,22 @@ def sync(
122
135
  """
123
136
 
124
137
  return sync_detailed(
125
- workflow_id=workflow_id,
126
138
  client=client,
139
+ body=body,
127
140
  ).parsed
128
141
 
129
142
 
130
143
  async def asyncio_detailed(
131
- workflow_id: str,
132
144
  *,
133
145
  client: Union[AuthenticatedClient, Client],
146
+ body: CreateVersion,
134
147
  ) -> Response[Union[Any, Error]]:
135
148
  """Deploy a workflow version
136
149
 
150
+ Creates and deploys a new version of a workflow.
151
+
137
152
  Args:
138
- workflow_id (str):
153
+ body (CreateVersion):
139
154
 
140
155
  Raises:
141
156
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -146,7 +161,7 @@ async def asyncio_detailed(
146
161
  """
147
162
 
148
163
  kwargs = _get_kwargs(
149
- workflow_id=workflow_id,
164
+ body=body,
150
165
  )
151
166
 
152
167
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -155,14 +170,16 @@ async def asyncio_detailed(
155
170
 
156
171
 
157
172
  async def asyncio(
158
- workflow_id: str,
159
173
  *,
160
174
  client: Union[AuthenticatedClient, Client],
175
+ body: CreateVersion,
161
176
  ) -> Optional[Union[Any, Error]]:
162
177
  """Deploy a workflow version
163
178
 
179
+ Creates and deploys a new version of a workflow.
180
+
164
181
  Args:
165
- workflow_id (str):
182
+ body (CreateVersion):
166
183
 
167
184
  Raises:
168
185
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -174,7 +191,7 @@ async def asyncio(
174
191
 
175
192
  return (
176
193
  await asyncio_detailed(
177
- workflow_id=workflow_id,
178
194
  client=client,
195
+ body=body,
179
196
  )
180
197
  ).parsed
@@ -79,7 +79,9 @@ def sync_detailed(
79
79
  *,
80
80
  client: Union[AuthenticatedClient, Client],
81
81
  ) -> Response[Union[Any, Error]]:
82
- """Delete a workflow
82
+ """Delete workflow
83
+
84
+ Delete the workflow service with the provided ID.
83
85
 
84
86
  Args:
85
87
  workflow_id (str):
@@ -108,7 +110,9 @@ def sync(
108
110
  *,
109
111
  client: Union[AuthenticatedClient, Client],
110
112
  ) -> Optional[Union[Any, Error]]:
111
- """Delete a workflow
113
+ """Delete workflow
114
+
115
+ Delete the workflow service with the provided ID.
112
116
 
113
117
  Args:
114
118
  workflow_id (str):
@@ -132,7 +136,9 @@ async def asyncio_detailed(
132
136
  *,
133
137
  client: Union[AuthenticatedClient, Client],
134
138
  ) -> Response[Union[Any, Error]]:
135
- """Delete a workflow
139
+ """Delete workflow
140
+
141
+ Delete the workflow service with the provided ID.
136
142
 
137
143
  Args:
138
144
  workflow_id (str):
@@ -159,7 +165,9 @@ async def asyncio(
159
165
  *,
160
166
  client: Union[AuthenticatedClient, Client],
161
167
  ) -> Optional[Union[Any, Error]]:
162
- """Delete a workflow
168
+ """Delete workflow
169
+
170
+ Delete the workflow service with the provided ID.
163
171
 
164
172
  Args:
165
173
  workflow_id (str):