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
@@ -6,6 +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.workflow import Workflow
9
10
  from ...types import Response
10
11
 
11
12
 
@@ -20,7 +21,14 @@ def _get_kwargs(
20
21
  return _kwargs
21
22
 
22
23
 
23
- def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Error]:
24
+ def _parse_response(
25
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
26
+ ) -> Optional[Union[Error, Workflow]]:
27
+ if response.status_code == 200:
28
+ response_200 = Workflow.from_dict(response.json())
29
+
30
+ return response_200
31
+
24
32
  if response.status_code == 401:
25
33
  response_401 = Error.from_dict(response.json())
26
34
 
@@ -57,7 +65,9 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt
57
65
  return None
58
66
 
59
67
 
60
- def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Error]:
68
+ def _build_response(
69
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
70
+ ) -> Response[Union[Error, Workflow]]:
61
71
  return Response(
62
72
  status_code=HTTPStatus(response.status_code),
63
73
  content=response.content,
@@ -70,8 +80,10 @@ def sync_detailed(
70
80
  workflow_id: str,
71
81
  *,
72
82
  client: Union[AuthenticatedClient, Client],
73
- ) -> Response[Error]:
74
- """Get a workflow
83
+ ) -> Response[Union[Error, Workflow]]:
84
+ """Retrieve workflow
85
+
86
+ Retrieve the workflow service with the provided ID.
75
87
 
76
88
  Args:
77
89
  workflow_id (str):
@@ -81,7 +93,7 @@ def sync_detailed(
81
93
  httpx.TimeoutException: If the request takes longer than Client.timeout.
82
94
 
83
95
  Returns:
84
- Response[Error]
96
+ Response[Union[Error, Workflow]]
85
97
  """
86
98
 
87
99
  kwargs = _get_kwargs(
@@ -99,8 +111,10 @@ def sync(
99
111
  workflow_id: str,
100
112
  *,
101
113
  client: Union[AuthenticatedClient, Client],
102
- ) -> Optional[Error]:
103
- """Get a workflow
114
+ ) -> Optional[Union[Error, Workflow]]:
115
+ """Retrieve workflow
116
+
117
+ Retrieve the workflow service with the provided ID.
104
118
 
105
119
  Args:
106
120
  workflow_id (str):
@@ -110,7 +124,7 @@ def sync(
110
124
  httpx.TimeoutException: If the request takes longer than Client.timeout.
111
125
 
112
126
  Returns:
113
- Error
127
+ Union[Error, Workflow]
114
128
  """
115
129
 
116
130
  return sync_detailed(
@@ -123,8 +137,10 @@ async def asyncio_detailed(
123
137
  workflow_id: str,
124
138
  *,
125
139
  client: Union[AuthenticatedClient, Client],
126
- ) -> Response[Error]:
127
- """Get a workflow
140
+ ) -> Response[Union[Error, Workflow]]:
141
+ """Retrieve workflow
142
+
143
+ Retrieve the workflow service with the provided ID.
128
144
 
129
145
  Args:
130
146
  workflow_id (str):
@@ -134,7 +150,7 @@ async def asyncio_detailed(
134
150
  httpx.TimeoutException: If the request takes longer than Client.timeout.
135
151
 
136
152
  Returns:
137
- Response[Error]
153
+ Response[Union[Error, Workflow]]
138
154
  """
139
155
 
140
156
  kwargs = _get_kwargs(
@@ -150,8 +166,10 @@ async def asyncio(
150
166
  workflow_id: str,
151
167
  *,
152
168
  client: Union[AuthenticatedClient, Client],
153
- ) -> Optional[Error]:
154
- """Get a workflow
169
+ ) -> Optional[Union[Error, Workflow]]:
170
+ """Retrieve workflow
171
+
172
+ Retrieve the workflow service with the provided ID.
155
173
 
156
174
  Args:
157
175
  workflow_id (str):
@@ -161,7 +179,7 @@ async def asyncio(
161
179
  httpx.TimeoutException: If the request takes longer than Client.timeout.
162
180
 
163
181
  Returns:
164
- Error
182
+ Union[Error, Workflow]
165
183
  """
166
184
 
167
185
  return (
@@ -81,7 +81,9 @@ def sync_detailed(
81
81
  *,
82
82
  client: Union[AuthenticatedClient, Client],
83
83
  ) -> Response[Union[Error, WorkflowVersion]]:
84
- """Get a workflow version
84
+ """Retrieve workflow version
85
+
86
+ Retrieve the specific workflow service version with the provided ID.
85
87
 
86
88
  Args:
87
89
  workflow_version_id (str):
@@ -110,7 +112,9 @@ def sync(
110
112
  *,
111
113
  client: Union[AuthenticatedClient, Client],
112
114
  ) -> Optional[Union[Error, WorkflowVersion]]:
113
- """Get a workflow version
115
+ """Retrieve workflow version
116
+
117
+ Retrieve the specific workflow service version with the provided ID.
114
118
 
115
119
  Args:
116
120
  workflow_version_id (str):
@@ -134,7 +138,9 @@ async def asyncio_detailed(
134
138
  *,
135
139
  client: Union[AuthenticatedClient, Client],
136
140
  ) -> Response[Union[Error, WorkflowVersion]]:
137
- """Get a workflow version
141
+ """Retrieve workflow version
142
+
143
+ Retrieve the specific workflow service version with the provided ID.
138
144
 
139
145
  Args:
140
146
  workflow_version_id (str):
@@ -161,7 +167,9 @@ async def asyncio(
161
167
  *,
162
168
  client: Union[AuthenticatedClient, Client],
163
169
  ) -> Optional[Union[Error, WorkflowVersion]]:
164
- """Get a workflow version
170
+ """Retrieve workflow version
171
+
172
+ Retrieve the specific workflow service version with the provided ID.
165
173
 
166
174
  Args:
167
175
  workflow_version_id (str):
@@ -0,0 +1,275 @@
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_version_with_cursor import WorkflowVersionWithCursor
10
+ from ...types import UNSET, Response, Unset
11
+
12
+
13
+ def _get_kwargs(
14
+ *,
15
+ owner_id: Union[Unset, list[str]] = UNSET,
16
+ workflow_id: Union[Unset, list[str]] = UNSET,
17
+ workflow_version_id: Union[Unset, list[str]] = UNSET,
18
+ cursor: Union[Unset, str] = UNSET,
19
+ limit: Union[Unset, int] = 20,
20
+ ) -> dict[str, Any]:
21
+ params: dict[str, Any] = {}
22
+
23
+ json_owner_id: Union[Unset, list[str]] = UNSET
24
+ if not isinstance(owner_id, Unset):
25
+ json_owner_id = owner_id
26
+
27
+ params["ownerId"] = json_owner_id
28
+
29
+ json_workflow_id: Union[Unset, list[str]] = UNSET
30
+ if not isinstance(workflow_id, Unset):
31
+ json_workflow_id = workflow_id
32
+
33
+ params["workflowID"] = json_workflow_id
34
+
35
+ json_workflow_version_id: Union[Unset, list[str]] = UNSET
36
+ if not isinstance(workflow_version_id, Unset):
37
+ json_workflow_version_id = workflow_version_id
38
+
39
+ params["workflowVersionId"] = json_workflow_version_id
40
+
41
+ params["cursor"] = cursor
42
+
43
+ params["limit"] = limit
44
+
45
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
46
+
47
+ _kwargs: dict[str, Any] = {
48
+ "method": "get",
49
+ "url": "/workflowversions",
50
+ "params": params,
51
+ }
52
+
53
+ return _kwargs
54
+
55
+
56
+ def _parse_response(
57
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
58
+ ) -> Optional[Union[Error, list["WorkflowVersionWithCursor"]]]:
59
+ if response.status_code == 200:
60
+ response_200 = []
61
+ _response_200 = response.json()
62
+ for response_200_item_data in _response_200:
63
+ response_200_item = WorkflowVersionWithCursor.from_dict(response_200_item_data)
64
+
65
+ response_200.append(response_200_item)
66
+
67
+ return response_200
68
+
69
+ if response.status_code == 401:
70
+ response_401 = Error.from_dict(response.json())
71
+
72
+ return response_401
73
+
74
+ if response.status_code == 403:
75
+ response_403 = Error.from_dict(response.json())
76
+
77
+ return response_403
78
+
79
+ if response.status_code == 404:
80
+ response_404 = Error.from_dict(response.json())
81
+
82
+ return response_404
83
+
84
+ if response.status_code == 429:
85
+ response_429 = Error.from_dict(response.json())
86
+
87
+ return response_429
88
+
89
+ if response.status_code == 500:
90
+ response_500 = Error.from_dict(response.json())
91
+
92
+ return response_500
93
+
94
+ if response.status_code == 503:
95
+ response_503 = Error.from_dict(response.json())
96
+
97
+ return response_503
98
+
99
+ if client.raise_on_unexpected_status:
100
+ raise errors.UnexpectedStatus(response.status_code, response.content)
101
+ else:
102
+ return None
103
+
104
+
105
+ def _build_response(
106
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
107
+ ) -> Response[Union[Error, list["WorkflowVersionWithCursor"]]]:
108
+ return Response(
109
+ status_code=HTTPStatus(response.status_code),
110
+ content=response.content,
111
+ headers=response.headers,
112
+ parsed=_parse_response(client=client, response=response),
113
+ )
114
+
115
+
116
+ def sync_detailed(
117
+ *,
118
+ client: Union[AuthenticatedClient, Client],
119
+ owner_id: Union[Unset, list[str]] = UNSET,
120
+ workflow_id: Union[Unset, list[str]] = UNSET,
121
+ workflow_version_id: Union[Unset, list[str]] = UNSET,
122
+ cursor: Union[Unset, str] = UNSET,
123
+ limit: Union[Unset, int] = 20,
124
+ ) -> Response[Union[Error, list["WorkflowVersionWithCursor"]]]:
125
+ """List workflow versions
126
+
127
+ List known versions of the workflow service with the provided ID.
128
+
129
+ Args:
130
+ owner_id (Union[Unset, list[str]]):
131
+ workflow_id (Union[Unset, list[str]]):
132
+ workflow_version_id (Union[Unset, list[str]]):
133
+ cursor (Union[Unset, str]):
134
+ limit (Union[Unset, int]): Defaults to 20 Default: 20.
135
+
136
+ Raises:
137
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
138
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
139
+
140
+ Returns:
141
+ Response[Union[Error, list['WorkflowVersionWithCursor']]]
142
+ """
143
+
144
+ kwargs = _get_kwargs(
145
+ owner_id=owner_id,
146
+ workflow_id=workflow_id,
147
+ workflow_version_id=workflow_version_id,
148
+ cursor=cursor,
149
+ limit=limit,
150
+ )
151
+
152
+ response = client.get_httpx_client().request(
153
+ **kwargs,
154
+ )
155
+
156
+ return _build_response(client=client, response=response)
157
+
158
+
159
+ def sync(
160
+ *,
161
+ client: Union[AuthenticatedClient, Client],
162
+ owner_id: Union[Unset, list[str]] = UNSET,
163
+ workflow_id: Union[Unset, list[str]] = UNSET,
164
+ workflow_version_id: Union[Unset, list[str]] = UNSET,
165
+ cursor: Union[Unset, str] = UNSET,
166
+ limit: Union[Unset, int] = 20,
167
+ ) -> Optional[Union[Error, list["WorkflowVersionWithCursor"]]]:
168
+ """List workflow versions
169
+
170
+ List known versions of the workflow service with the provided ID.
171
+
172
+ Args:
173
+ owner_id (Union[Unset, list[str]]):
174
+ workflow_id (Union[Unset, list[str]]):
175
+ workflow_version_id (Union[Unset, list[str]]):
176
+ cursor (Union[Unset, str]):
177
+ limit (Union[Unset, int]): Defaults to 20 Default: 20.
178
+
179
+ Raises:
180
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
181
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
182
+
183
+ Returns:
184
+ Union[Error, list['WorkflowVersionWithCursor']]
185
+ """
186
+
187
+ return sync_detailed(
188
+ client=client,
189
+ owner_id=owner_id,
190
+ workflow_id=workflow_id,
191
+ workflow_version_id=workflow_version_id,
192
+ cursor=cursor,
193
+ limit=limit,
194
+ ).parsed
195
+
196
+
197
+ async def asyncio_detailed(
198
+ *,
199
+ client: Union[AuthenticatedClient, Client],
200
+ owner_id: Union[Unset, list[str]] = UNSET,
201
+ workflow_id: Union[Unset, list[str]] = UNSET,
202
+ workflow_version_id: Union[Unset, list[str]] = UNSET,
203
+ cursor: Union[Unset, str] = UNSET,
204
+ limit: Union[Unset, int] = 20,
205
+ ) -> Response[Union[Error, list["WorkflowVersionWithCursor"]]]:
206
+ """List workflow versions
207
+
208
+ List known versions of the workflow service with the provided ID.
209
+
210
+ Args:
211
+ owner_id (Union[Unset, list[str]]):
212
+ workflow_id (Union[Unset, list[str]]):
213
+ workflow_version_id (Union[Unset, list[str]]):
214
+ cursor (Union[Unset, str]):
215
+ limit (Union[Unset, int]): Defaults to 20 Default: 20.
216
+
217
+ Raises:
218
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
219
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
220
+
221
+ Returns:
222
+ Response[Union[Error, list['WorkflowVersionWithCursor']]]
223
+ """
224
+
225
+ kwargs = _get_kwargs(
226
+ owner_id=owner_id,
227
+ workflow_id=workflow_id,
228
+ workflow_version_id=workflow_version_id,
229
+ cursor=cursor,
230
+ limit=limit,
231
+ )
232
+
233
+ response = await client.get_async_httpx_client().request(**kwargs)
234
+
235
+ return _build_response(client=client, response=response)
236
+
237
+
238
+ async def asyncio(
239
+ *,
240
+ client: Union[AuthenticatedClient, Client],
241
+ owner_id: Union[Unset, list[str]] = UNSET,
242
+ workflow_id: Union[Unset, list[str]] = UNSET,
243
+ workflow_version_id: Union[Unset, list[str]] = UNSET,
244
+ cursor: Union[Unset, str] = UNSET,
245
+ limit: Union[Unset, int] = 20,
246
+ ) -> Optional[Union[Error, list["WorkflowVersionWithCursor"]]]:
247
+ """List workflow versions
248
+
249
+ List known versions of the workflow service with the provided ID.
250
+
251
+ Args:
252
+ owner_id (Union[Unset, list[str]]):
253
+ workflow_id (Union[Unset, list[str]]):
254
+ workflow_version_id (Union[Unset, list[str]]):
255
+ cursor (Union[Unset, str]):
256
+ limit (Union[Unset, int]): Defaults to 20 Default: 20.
257
+
258
+ Raises:
259
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
260
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
261
+
262
+ Returns:
263
+ Union[Error, list['WorkflowVersionWithCursor']]
264
+ """
265
+
266
+ return (
267
+ await asyncio_detailed(
268
+ client=client,
269
+ owner_id=owner_id,
270
+ workflow_id=workflow_id,
271
+ workflow_version_id=workflow_version_id,
272
+ cursor=cursor,
273
+ limit=limit,
274
+ )
275
+ ).parsed
@@ -6,6 +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.workflow_with_cursor import WorkflowWithCursor
9
10
  from ...types import UNSET, Response, Unset
10
11
 
11
12
 
@@ -59,7 +60,19 @@ def _get_kwargs(
59
60
  return _kwargs
60
61
 
61
62
 
62
- def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Error]:
63
+ def _parse_response(
64
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
65
+ ) -> Optional[Union[Error, list["WorkflowWithCursor"]]]:
66
+ if response.status_code == 200:
67
+ response_200 = []
68
+ _response_200 = response.json()
69
+ for response_200_item_data in _response_200:
70
+ response_200_item = WorkflowWithCursor.from_dict(response_200_item_data)
71
+
72
+ response_200.append(response_200_item)
73
+
74
+ return response_200
75
+
63
76
  if response.status_code == 401:
64
77
  response_401 = Error.from_dict(response.json())
65
78
 
@@ -96,7 +109,9 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt
96
109
  return None
97
110
 
98
111
 
99
- def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Error]:
112
+ def _build_response(
113
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
114
+ ) -> Response[Union[Error, list["WorkflowWithCursor"]]]:
100
115
  return Response(
101
116
  status_code=HTTPStatus(response.status_code),
102
117
  content=response.content,
@@ -114,8 +129,11 @@ def sync_detailed(
114
129
  environment_id: Union[Unset, list[str]] = UNSET,
115
130
  cursor: Union[Unset, str] = UNSET,
116
131
  limit: Union[Unset, int] = 20,
117
- ) -> Response[Error]:
118
- """List all workflows
132
+ ) -> Response[Union[Error, list["WorkflowWithCursor"]]]:
133
+ """List workflows
134
+
135
+ List workflows that match the provided filters. If no filters are provided, all workflows accessible
136
+ by the authenticated user are returned.
119
137
 
120
138
  Args:
121
139
  name (Union[Unset, list[str]]):
@@ -130,7 +148,7 @@ def sync_detailed(
130
148
  httpx.TimeoutException: If the request takes longer than Client.timeout.
131
149
 
132
150
  Returns:
133
- Response[Error]
151
+ Response[Union[Error, list['WorkflowWithCursor']]]
134
152
  """
135
153
 
136
154
  kwargs = _get_kwargs(
@@ -158,8 +176,11 @@ def sync(
158
176
  environment_id: Union[Unset, list[str]] = UNSET,
159
177
  cursor: Union[Unset, str] = UNSET,
160
178
  limit: Union[Unset, int] = 20,
161
- ) -> Optional[Error]:
162
- """List all workflows
179
+ ) -> Optional[Union[Error, list["WorkflowWithCursor"]]]:
180
+ """List workflows
181
+
182
+ List workflows that match the provided filters. If no filters are provided, all workflows accessible
183
+ by the authenticated user are returned.
163
184
 
164
185
  Args:
165
186
  name (Union[Unset, list[str]]):
@@ -174,7 +195,7 @@ def sync(
174
195
  httpx.TimeoutException: If the request takes longer than Client.timeout.
175
196
 
176
197
  Returns:
177
- Error
198
+ Union[Error, list['WorkflowWithCursor']]
178
199
  """
179
200
 
180
201
  return sync_detailed(
@@ -197,8 +218,11 @@ async def asyncio_detailed(
197
218
  environment_id: Union[Unset, list[str]] = UNSET,
198
219
  cursor: Union[Unset, str] = UNSET,
199
220
  limit: Union[Unset, int] = 20,
200
- ) -> Response[Error]:
201
- """List all workflows
221
+ ) -> Response[Union[Error, list["WorkflowWithCursor"]]]:
222
+ """List workflows
223
+
224
+ List workflows that match the provided filters. If no filters are provided, all workflows accessible
225
+ by the authenticated user are returned.
202
226
 
203
227
  Args:
204
228
  name (Union[Unset, list[str]]):
@@ -213,7 +237,7 @@ async def asyncio_detailed(
213
237
  httpx.TimeoutException: If the request takes longer than Client.timeout.
214
238
 
215
239
  Returns:
216
- Response[Error]
240
+ Response[Union[Error, list['WorkflowWithCursor']]]
217
241
  """
218
242
 
219
243
  kwargs = _get_kwargs(
@@ -239,8 +263,11 @@ async def asyncio(
239
263
  environment_id: Union[Unset, list[str]] = UNSET,
240
264
  cursor: Union[Unset, str] = UNSET,
241
265
  limit: Union[Unset, int] = 20,
242
- ) -> Optional[Error]:
243
- """List all workflows
266
+ ) -> Optional[Union[Error, list["WorkflowWithCursor"]]]:
267
+ """List workflows
268
+
269
+ List workflows that match the provided filters. If no filters are provided, all workflows accessible
270
+ by the authenticated user are returned.
244
271
 
245
272
  Args:
246
273
  name (Union[Unset, list[str]]):
@@ -255,7 +282,7 @@ async def asyncio(
255
282
  httpx.TimeoutException: If the request takes longer than Client.timeout.
256
283
 
257
284
  Returns:
258
- Error
285
+ Union[Error, list['WorkflowWithCursor']]
259
286
  """
260
287
 
261
288
  return (