windmill-api 1.440.1__py3-none-any.whl → 1.450.1__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 windmill-api might be problematic. Click here for more details.

Files changed (231) hide show
  1. windmill_api/api/capture/{get_capture.py → delete_capture.py} +12 -14
  2. windmill_api/api/capture/get_capture_configs.py +186 -0
  3. windmill_api/api/capture/list_captures.py +241 -0
  4. windmill_api/api/capture/ping_capture_config.py +121 -0
  5. windmill_api/api/capture/set_capture_config.py +107 -0
  6. windmill_api/api/input_/get_input_history.py +15 -0
  7. windmill_api/api/job/get_slack_approval_payload.py +171 -0
  8. windmill_api/api/nats_trigger/__init__.py +0 -0
  9. windmill_api/api/nats_trigger/create_nats_trigger.py +105 -0
  10. windmill_api/api/{capture/create_capture.py → nats_trigger/delete_nats_trigger.py} +4 -6
  11. windmill_api/api/nats_trigger/exists_nats_trigger.py +160 -0
  12. windmill_api/api/nats_trigger/get_nats_trigger.py +166 -0
  13. windmill_api/api/nats_trigger/list_nats_triggers.py +237 -0
  14. windmill_api/api/nats_trigger/set_nats_trigger_enabled.py +113 -0
  15. windmill_api/api/nats_trigger/update_nats_trigger.py +113 -0
  16. windmill_api/api/postgres_trigger/__init__.py +0 -0
  17. windmill_api/api/postgres_trigger/create_postgres_publication.py +121 -0
  18. windmill_api/api/postgres_trigger/create_postgres_replication_slot.py +113 -0
  19. windmill_api/api/postgres_trigger/create_postgres_trigger.py +105 -0
  20. windmill_api/api/postgres_trigger/create_template_script.py +105 -0
  21. windmill_api/api/postgres_trigger/delete_postgres_publication.py +109 -0
  22. windmill_api/api/postgres_trigger/delete_postgres_replication_slot.py +113 -0
  23. windmill_api/api/{capture/update_capture.py → postgres_trigger/delete_postgres_trigger.py} +4 -6
  24. windmill_api/api/postgres_trigger/exists_postgres_trigger.py +160 -0
  25. windmill_api/api/postgres_trigger/get_postgres_publication.py +180 -0
  26. windmill_api/api/postgres_trigger/get_postgres_trigger.py +166 -0
  27. windmill_api/api/postgres_trigger/get_template_script.py +101 -0
  28. windmill_api/api/postgres_trigger/is_valid_postgres_configuration.py +160 -0
  29. windmill_api/api/postgres_trigger/list_postgres_publication.py +161 -0
  30. windmill_api/api/postgres_trigger/list_postgres_replication_slot.py +171 -0
  31. windmill_api/api/postgres_trigger/list_postgres_triggers.py +237 -0
  32. windmill_api/api/postgres_trigger/set_postgres_trigger_enabled.py +113 -0
  33. windmill_api/api/postgres_trigger/update_postgres_publication.py +121 -0
  34. windmill_api/api/postgres_trigger/update_postgres_trigger.py +113 -0
  35. windmill_api/api/teams/__init__.py +0 -0
  36. windmill_api/api/teams/sync_teams.py +131 -0
  37. windmill_api/api/worker/get_custom_tags.py +50 -4
  38. windmill_api/api/workspace/change_workspace_color.py +105 -0
  39. windmill_api/api/workspace/get_threshold_alert.py +152 -0
  40. windmill_api/api/workspace/set_threshold_alert.py +105 -0
  41. windmill_api/api/workspace/update_operator_settings.py +109 -0
  42. windmill_api/models/add_granular_acls_kind.py +2 -0
  43. windmill_api/models/archive_script_by_hash_response_200.py +8 -0
  44. windmill_api/models/archive_script_by_hash_response_200_kind.py +1 -0
  45. windmill_api/models/archive_script_by_hash_response_200_language.py +1 -0
  46. windmill_api/models/capture.py +94 -0
  47. windmill_api/models/capture_config.py +95 -0
  48. windmill_api/models/capture_config_trigger_kind.py +13 -0
  49. windmill_api/models/capture_trigger_kind.py +13 -0
  50. windmill_api/models/change_workspace_color_json_body.py +58 -0
  51. windmill_api/models/channel_info.py +80 -0
  52. windmill_api/models/completed_job_language.py +1 -0
  53. windmill_api/models/create_nats_trigger_json_body.py +120 -0
  54. windmill_api/models/create_postgres_publication_json_body.py +90 -0
  55. windmill_api/models/create_postgres_publication_json_body_table_to_track_item.py +86 -0
  56. windmill_api/models/create_postgres_publication_json_body_table_to_track_item_table_to_track_item.py +79 -0
  57. windmill_api/models/create_postgres_replication_slot_json_body.py +58 -0
  58. windmill_api/models/create_postgres_trigger_json_body.py +125 -0
  59. windmill_api/models/create_postgres_trigger_json_body_publication.py +92 -0
  60. windmill_api/models/create_postgres_trigger_json_body_publication_table_to_track_item.py +86 -0
  61. windmill_api/models/create_postgres_trigger_json_body_publication_table_to_track_item_table_to_track_item.py +79 -0
  62. windmill_api/models/create_script_json_body.py +8 -0
  63. windmill_api/models/create_script_json_body_kind.py +1 -0
  64. windmill_api/models/create_script_json_body_language.py +1 -0
  65. windmill_api/models/create_template_script_json_body.py +90 -0
  66. windmill_api/models/create_template_script_json_body_language.py +8 -0
  67. windmill_api/models/create_template_script_json_body_relations_item.py +86 -0
  68. windmill_api/models/create_template_script_json_body_relations_item_table_to_track_item.py +79 -0
  69. windmill_api/models/create_websocket_trigger_json_body.py +42 -29
  70. windmill_api/models/create_workspace.py +8 -0
  71. windmill_api/models/create_workspace_json_body.py +8 -0
  72. windmill_api/models/delete_completed_job_response_200_language.py +1 -0
  73. windmill_api/models/delete_postgres_replication_slot_json_body.py +58 -0
  74. windmill_api/models/delete_script_by_hash_response_200.py +8 -0
  75. windmill_api/models/delete_script_by_hash_response_200_kind.py +1 -0
  76. windmill_api/models/delete_script_by_hash_response_200_language.py +1 -0
  77. windmill_api/models/edit_nats_trigger.py +112 -0
  78. windmill_api/models/edit_postgres_trigger.py +123 -0
  79. windmill_api/models/edit_postgres_trigger_publication.py +90 -0
  80. windmill_api/models/edit_postgres_trigger_publication_table_to_track_item.py +86 -0
  81. windmill_api/models/edit_postgres_trigger_publication_table_to_track_item_table_to_track_item.py +79 -0
  82. windmill_api/models/edit_websocket_trigger.py +35 -21
  83. windmill_api/models/extended_jobs_jobs_item_type_0_language.py +1 -0
  84. windmill_api/models/extended_jobs_jobs_item_type_1_language.py +1 -0
  85. windmill_api/models/flow_metadata.py +8 -0
  86. windmill_api/models/flow_module_value_2_type_0_language.py +1 -0
  87. windmill_api/models/get_capture_configs_response_200_item.py +95 -0
  88. windmill_api/models/get_capture_configs_response_200_item_trigger_kind.py +13 -0
  89. windmill_api/models/get_capture_configs_runnable_kind.py +9 -0
  90. windmill_api/models/get_completed_job_response_200_language.py +1 -0
  91. windmill_api/models/get_flow_by_path_response_200.py +8 -0
  92. windmill_api/models/get_flow_by_path_with_draft_response_200_draft.py +8 -0
  93. windmill_api/models/get_flow_version_response_200.py +8 -0
  94. windmill_api/models/get_granular_acls_kind.py +2 -0
  95. windmill_api/models/get_http_trigger_response_200.py +36 -36
  96. windmill_api/models/get_job_response_200_type_0_language.py +1 -0
  97. windmill_api/models/get_job_response_200_type_1_language.py +1 -0
  98. windmill_api/models/get_nats_trigger_response_200.py +196 -0
  99. windmill_api/models/get_nats_trigger_response_200_extra_perms.py +44 -0
  100. windmill_api/models/get_postgres_publication_response_200.py +90 -0
  101. windmill_api/models/get_postgres_publication_response_200_table_to_track_item.py +86 -0
  102. windmill_api/models/get_postgres_publication_response_200_table_to_track_item_table_to_track_item.py +79 -0
  103. windmill_api/models/get_postgres_trigger_response_200.py +178 -0
  104. windmill_api/models/get_postgres_trigger_response_200_extra_perms.py +44 -0
  105. windmill_api/models/get_premium_info_response_200.py +7 -0
  106. windmill_api/models/get_script_by_hash_response_200.py +8 -0
  107. windmill_api/models/get_script_by_hash_response_200_kind.py +1 -0
  108. windmill_api/models/get_script_by_hash_response_200_language.py +1 -0
  109. windmill_api/models/get_script_by_path_response_200.py +8 -0
  110. windmill_api/models/get_script_by_path_response_200_kind.py +1 -0
  111. windmill_api/models/get_script_by_path_response_200_language.py +1 -0
  112. windmill_api/models/get_script_by_path_with_draft_response_200.py +8 -0
  113. windmill_api/models/get_script_by_path_with_draft_response_200_draft.py +8 -0
  114. windmill_api/models/get_script_by_path_with_draft_response_200_draft_kind.py +1 -0
  115. windmill_api/models/get_script_by_path_with_draft_response_200_draft_language.py +1 -0
  116. windmill_api/models/get_script_by_path_with_draft_response_200_kind.py +1 -0
  117. windmill_api/models/get_script_by_path_with_draft_response_200_language.py +1 -0
  118. windmill_api/models/get_settings_response_200.py +27 -0
  119. windmill_api/models/get_settings_response_200_operator_settings.py +114 -0
  120. windmill_api/models/get_suspended_job_flow_response_200_job_type_0_language.py +1 -0
  121. windmill_api/models/get_suspended_job_flow_response_200_job_type_1_language.py +1 -0
  122. windmill_api/models/get_threshold_alert_response_200.py +75 -0
  123. windmill_api/models/get_triggers_count_of_flow_response_200.py +16 -0
  124. windmill_api/models/get_triggers_count_of_script_response_200.py +16 -0
  125. windmill_api/models/get_used_triggers_response_200.py +14 -0
  126. windmill_api/models/get_websocket_trigger_response_200.py +89 -76
  127. windmill_api/models/http_trigger.py +36 -36
  128. windmill_api/models/job_type_0_language.py +1 -0
  129. windmill_api/models/job_type_1_language.py +1 -0
  130. windmill_api/models/language.py +8 -0
  131. windmill_api/models/list_captures_response_200_item.py +94 -0
  132. windmill_api/models/list_captures_response_200_item_trigger_kind.py +13 -0
  133. windmill_api/models/list_captures_runnable_kind.py +9 -0
  134. windmill_api/models/list_captures_trigger_kind.py +13 -0
  135. windmill_api/models/list_completed_jobs_response_200_item_language.py +1 -0
  136. windmill_api/models/list_extended_jobs_response_200_jobs_item_type_0_language.py +1 -0
  137. windmill_api/models/list_extended_jobs_response_200_jobs_item_type_1_language.py +1 -0
  138. windmill_api/models/list_http_triggers_response_200_item.py +36 -36
  139. windmill_api/models/list_jobs_response_200_item_type_0_language.py +1 -0
  140. windmill_api/models/list_jobs_response_200_item_type_1_language.py +1 -0
  141. windmill_api/models/list_nats_triggers_response_200_item.py +196 -0
  142. windmill_api/models/list_nats_triggers_response_200_item_extra_perms.py +44 -0
  143. windmill_api/models/list_postgres_replication_slot_response_200_item.py +66 -0
  144. windmill_api/models/list_postgres_triggers_response_200_item.py +182 -0
  145. windmill_api/models/list_postgres_triggers_response_200_item_extra_perms.py +44 -0
  146. windmill_api/models/list_queue_response_200_item_language.py +1 -0
  147. windmill_api/models/list_scripts_response_200_item.py +8 -0
  148. windmill_api/models/list_scripts_response_200_item_kind.py +1 -0
  149. windmill_api/models/list_scripts_response_200_item_language.py +1 -0
  150. windmill_api/models/list_user_workspaces_response_200_workspaces_item.py +39 -1
  151. windmill_api/models/list_user_workspaces_response_200_workspaces_item_operator_settings.py +114 -0
  152. windmill_api/models/list_websocket_triggers_response_200_item.py +89 -76
  153. windmill_api/models/list_workspaces_as_super_admin_response_200_item.py +8 -0
  154. windmill_api/models/list_workspaces_response_200_item.py +8 -0
  155. windmill_api/models/nats_trigger.py +196 -0
  156. windmill_api/models/nats_trigger_extra_perms.py +44 -0
  157. windmill_api/models/new_nats_trigger.py +120 -0
  158. windmill_api/models/new_postgres_trigger.py +125 -0
  159. windmill_api/models/new_postgres_trigger_publication.py +90 -0
  160. windmill_api/models/new_postgres_trigger_publication_table_to_track_item.py +86 -0
  161. windmill_api/models/new_postgres_trigger_publication_table_to_track_item_table_to_track_item.py +79 -0
  162. windmill_api/models/new_script.py +8 -0
  163. windmill_api/models/new_script_kind.py +1 -0
  164. windmill_api/models/new_script_language.py +1 -0
  165. windmill_api/models/new_script_with_draft.py +8 -0
  166. windmill_api/models/new_script_with_draft_draft.py +8 -0
  167. windmill_api/models/new_script_with_draft_draft_kind.py +1 -0
  168. windmill_api/models/new_script_with_draft_draft_language.py +1 -0
  169. windmill_api/models/new_script_with_draft_kind.py +1 -0
  170. windmill_api/models/new_script_with_draft_language.py +1 -0
  171. windmill_api/models/new_websocket_trigger.py +36 -26
  172. windmill_api/models/open_flow_w_path.py +8 -0
  173. windmill_api/models/operator_settings.py +114 -0
  174. windmill_api/models/ping_capture_config_runnable_kind.py +9 -0
  175. windmill_api/models/ping_capture_config_trigger_kind.py +13 -0
  176. windmill_api/models/postgres_trigger.py +178 -0
  177. windmill_api/models/postgres_trigger_extra_perms.py +44 -0
  178. windmill_api/models/preview_language.py +1 -0
  179. windmill_api/models/publication_data.py +86 -0
  180. windmill_api/models/publication_data_table_to_track_item.py +84 -0
  181. windmill_api/models/publication_data_table_to_track_item_table_to_track_item.py +79 -0
  182. windmill_api/models/queued_job_language.py +1 -0
  183. windmill_api/models/raw_script_for_dependencies_language.py +1 -0
  184. windmill_api/models/raw_script_language.py +1 -0
  185. windmill_api/models/relations.py +80 -0
  186. windmill_api/models/relations_table_to_track_item.py +79 -0
  187. windmill_api/models/remove_granular_acls_kind.py +2 -0
  188. windmill_api/models/run_raw_script_dependencies_json_body_raw_scripts_item_language.py +1 -0
  189. windmill_api/models/run_script_preview_json_body_language.py +1 -0
  190. windmill_api/models/script.py +8 -0
  191. windmill_api/models/script_kind.py +1 -0
  192. windmill_api/models/script_lang.py +25 -0
  193. windmill_api/models/script_language.py +1 -0
  194. windmill_api/models/set_capture_config_json_body.py +97 -0
  195. windmill_api/models/set_capture_config_json_body_trigger_config.py +44 -0
  196. windmill_api/models/set_capture_config_json_body_trigger_kind.py +13 -0
  197. windmill_api/models/set_nats_trigger_enabled_json_body.py +58 -0
  198. windmill_api/models/set_postgres_trigger_enabled_json_body.py +58 -0
  199. windmill_api/models/set_threshold_alert_json_body.py +58 -0
  200. windmill_api/models/slot.py +58 -0
  201. windmill_api/models/slot_list.py +66 -0
  202. windmill_api/models/sync_teams_response_200_item.py +87 -0
  203. windmill_api/models/sync_teams_response_200_item_channels_item.py +80 -0
  204. windmill_api/models/table_to_track_item.py +79 -0
  205. windmill_api/models/team_info.py +87 -0
  206. windmill_api/models/team_info_channels_item.py +80 -0
  207. windmill_api/models/template_script.py +90 -0
  208. windmill_api/models/template_script_language.py +8 -0
  209. windmill_api/models/template_script_relations_item.py +82 -0
  210. windmill_api/models/template_script_relations_item_table_to_track_item.py +79 -0
  211. windmill_api/models/trigger_extra_property.py +95 -0
  212. windmill_api/models/trigger_extra_property_extra_perms.py +44 -0
  213. windmill_api/models/triggers_count.py +16 -0
  214. windmill_api/models/update_nats_trigger_json_body.py +112 -0
  215. windmill_api/models/update_operator_settings_json_body.py +114 -0
  216. windmill_api/models/update_postgres_publication_json_body.py +90 -0
  217. windmill_api/models/update_postgres_publication_json_body_table_to_track_item.py +86 -0
  218. windmill_api/models/update_postgres_publication_json_body_table_to_track_item_table_to_track_item.py +79 -0
  219. windmill_api/models/update_postgres_trigger_json_body.py +123 -0
  220. windmill_api/models/update_postgres_trigger_json_body_publication.py +92 -0
  221. windmill_api/models/update_postgres_trigger_json_body_publication_table_to_track_item.py +86 -0
  222. windmill_api/models/update_postgres_trigger_json_body_publication_table_to_track_item_table_to_track_item.py +79 -0
  223. windmill_api/models/update_websocket_trigger_json_body.py +40 -24
  224. windmill_api/models/user_workspace_list_workspaces_item.py +37 -1
  225. windmill_api/models/user_workspace_list_workspaces_item_operator_settings.py +114 -0
  226. windmill_api/models/websocket_trigger.py +83 -73
  227. windmill_api/models/workspace.py +8 -0
  228. {windmill_api-1.440.1.dist-info → windmill_api-1.450.1.dist-info}/METADATA +1 -1
  229. {windmill_api-1.440.1.dist-info → windmill_api-1.450.1.dist-info}/RECORD +231 -100
  230. {windmill_api-1.440.1.dist-info → windmill_api-1.450.1.dist-info}/LICENSE +0 -0
  231. {windmill_api-1.440.1.dist-info → windmill_api-1.450.1.dist-info}/WHEEL +0 -0
@@ -10,15 +10,15 @@ from ...types import Response
10
10
 
11
11
  def _get_kwargs(
12
12
  workspace: str,
13
- path: str,
13
+ id: int,
14
14
  ) -> Dict[str, Any]:
15
15
  pass
16
16
 
17
17
  return {
18
- "method": "get",
19
- "url": "/w/{workspace}/capture/{path}".format(
18
+ "method": "delete",
19
+ "url": "/w/{workspace}/capture/{id}".format(
20
20
  workspace=workspace,
21
- path=path,
21
+ id=id,
22
22
  ),
23
23
  }
24
24
 
@@ -26,8 +26,6 @@ def _get_kwargs(
26
26
  def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
27
27
  if response.status_code == HTTPStatus.OK:
28
28
  return None
29
- if response.status_code == HTTPStatus.NOT_FOUND:
30
- return None
31
29
  if client.raise_on_unexpected_status:
32
30
  raise errors.UnexpectedStatus(response.status_code, response.content)
33
31
  else:
@@ -45,15 +43,15 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt
45
43
 
46
44
  def sync_detailed(
47
45
  workspace: str,
48
- path: str,
46
+ id: int,
49
47
  *,
50
48
  client: Union[AuthenticatedClient, Client],
51
49
  ) -> Response[Any]:
52
- """get flow preview capture
50
+ """delete a capture
53
51
 
54
52
  Args:
55
53
  workspace (str):
56
- path (str):
54
+ id (int):
57
55
 
58
56
  Raises:
59
57
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -65,7 +63,7 @@ def sync_detailed(
65
63
 
66
64
  kwargs = _get_kwargs(
67
65
  workspace=workspace,
68
- path=path,
66
+ id=id,
69
67
  )
70
68
 
71
69
  response = client.get_httpx_client().request(
@@ -77,15 +75,15 @@ def sync_detailed(
77
75
 
78
76
  async def asyncio_detailed(
79
77
  workspace: str,
80
- path: str,
78
+ id: int,
81
79
  *,
82
80
  client: Union[AuthenticatedClient, Client],
83
81
  ) -> Response[Any]:
84
- """get flow preview capture
82
+ """delete a capture
85
83
 
86
84
  Args:
87
85
  workspace (str):
88
- path (str):
86
+ id (int):
89
87
 
90
88
  Raises:
91
89
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -97,7 +95,7 @@ async def asyncio_detailed(
97
95
 
98
96
  kwargs = _get_kwargs(
99
97
  workspace=workspace,
100
- path=path,
98
+ id=id,
101
99
  )
102
100
 
103
101
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -0,0 +1,186 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, List, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.get_capture_configs_response_200_item import GetCaptureConfigsResponse200Item
9
+ from ...models.get_capture_configs_runnable_kind import GetCaptureConfigsRunnableKind
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ workspace: str,
15
+ runnable_kind: GetCaptureConfigsRunnableKind,
16
+ path: str,
17
+ ) -> Dict[str, Any]:
18
+ pass
19
+
20
+ return {
21
+ "method": "get",
22
+ "url": "/w/{workspace}/capture/get_configs/{runnable_kind}/{path}".format(
23
+ workspace=workspace,
24
+ runnable_kind=runnable_kind,
25
+ path=path,
26
+ ),
27
+ }
28
+
29
+
30
+ def _parse_response(
31
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
32
+ ) -> Optional[List["GetCaptureConfigsResponse200Item"]]:
33
+ if response.status_code == HTTPStatus.OK:
34
+ response_200 = []
35
+ _response_200 = response.json()
36
+ for response_200_item_data in _response_200:
37
+ response_200_item = GetCaptureConfigsResponse200Item.from_dict(response_200_item_data)
38
+
39
+ response_200.append(response_200_item)
40
+
41
+ return response_200
42
+ if client.raise_on_unexpected_status:
43
+ raise errors.UnexpectedStatus(response.status_code, response.content)
44
+ else:
45
+ return None
46
+
47
+
48
+ def _build_response(
49
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
50
+ ) -> Response[List["GetCaptureConfigsResponse200Item"]]:
51
+ return Response(
52
+ status_code=HTTPStatus(response.status_code),
53
+ content=response.content,
54
+ headers=response.headers,
55
+ parsed=_parse_response(client=client, response=response),
56
+ )
57
+
58
+
59
+ def sync_detailed(
60
+ workspace: str,
61
+ runnable_kind: GetCaptureConfigsRunnableKind,
62
+ path: str,
63
+ *,
64
+ client: Union[AuthenticatedClient, Client],
65
+ ) -> Response[List["GetCaptureConfigsResponse200Item"]]:
66
+ """get capture configs for a script or flow
67
+
68
+ Args:
69
+ workspace (str):
70
+ runnable_kind (GetCaptureConfigsRunnableKind):
71
+ path (str):
72
+
73
+ Raises:
74
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
75
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
76
+
77
+ Returns:
78
+ Response[List['GetCaptureConfigsResponse200Item']]
79
+ """
80
+
81
+ kwargs = _get_kwargs(
82
+ workspace=workspace,
83
+ runnable_kind=runnable_kind,
84
+ path=path,
85
+ )
86
+
87
+ response = client.get_httpx_client().request(
88
+ **kwargs,
89
+ )
90
+
91
+ return _build_response(client=client, response=response)
92
+
93
+
94
+ def sync(
95
+ workspace: str,
96
+ runnable_kind: GetCaptureConfigsRunnableKind,
97
+ path: str,
98
+ *,
99
+ client: Union[AuthenticatedClient, Client],
100
+ ) -> Optional[List["GetCaptureConfigsResponse200Item"]]:
101
+ """get capture configs for a script or flow
102
+
103
+ Args:
104
+ workspace (str):
105
+ runnable_kind (GetCaptureConfigsRunnableKind):
106
+ path (str):
107
+
108
+ Raises:
109
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
110
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
111
+
112
+ Returns:
113
+ List['GetCaptureConfigsResponse200Item']
114
+ """
115
+
116
+ return sync_detailed(
117
+ workspace=workspace,
118
+ runnable_kind=runnable_kind,
119
+ path=path,
120
+ client=client,
121
+ ).parsed
122
+
123
+
124
+ async def asyncio_detailed(
125
+ workspace: str,
126
+ runnable_kind: GetCaptureConfigsRunnableKind,
127
+ path: str,
128
+ *,
129
+ client: Union[AuthenticatedClient, Client],
130
+ ) -> Response[List["GetCaptureConfigsResponse200Item"]]:
131
+ """get capture configs for a script or flow
132
+
133
+ Args:
134
+ workspace (str):
135
+ runnable_kind (GetCaptureConfigsRunnableKind):
136
+ path (str):
137
+
138
+ Raises:
139
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
140
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
141
+
142
+ Returns:
143
+ Response[List['GetCaptureConfigsResponse200Item']]
144
+ """
145
+
146
+ kwargs = _get_kwargs(
147
+ workspace=workspace,
148
+ runnable_kind=runnable_kind,
149
+ path=path,
150
+ )
151
+
152
+ response = await client.get_async_httpx_client().request(**kwargs)
153
+
154
+ return _build_response(client=client, response=response)
155
+
156
+
157
+ async def asyncio(
158
+ workspace: str,
159
+ runnable_kind: GetCaptureConfigsRunnableKind,
160
+ path: str,
161
+ *,
162
+ client: Union[AuthenticatedClient, Client],
163
+ ) -> Optional[List["GetCaptureConfigsResponse200Item"]]:
164
+ """get capture configs for a script or flow
165
+
166
+ Args:
167
+ workspace (str):
168
+ runnable_kind (GetCaptureConfigsRunnableKind):
169
+ path (str):
170
+
171
+ Raises:
172
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
173
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
174
+
175
+ Returns:
176
+ List['GetCaptureConfigsResponse200Item']
177
+ """
178
+
179
+ return (
180
+ await asyncio_detailed(
181
+ workspace=workspace,
182
+ runnable_kind=runnable_kind,
183
+ path=path,
184
+ client=client,
185
+ )
186
+ ).parsed
@@ -0,0 +1,241 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, List, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.list_captures_response_200_item import ListCapturesResponse200Item
9
+ from ...models.list_captures_runnable_kind import ListCapturesRunnableKind
10
+ from ...models.list_captures_trigger_kind import ListCapturesTriggerKind
11
+ from ...types import UNSET, Response, Unset
12
+
13
+
14
+ def _get_kwargs(
15
+ workspace: str,
16
+ runnable_kind: ListCapturesRunnableKind,
17
+ path: str,
18
+ *,
19
+ trigger_kind: Union[Unset, None, ListCapturesTriggerKind] = UNSET,
20
+ page: Union[Unset, None, int] = UNSET,
21
+ per_page: Union[Unset, None, int] = UNSET,
22
+ ) -> Dict[str, Any]:
23
+ pass
24
+
25
+ params: Dict[str, Any] = {}
26
+ json_trigger_kind: Union[Unset, None, str] = UNSET
27
+ if not isinstance(trigger_kind, Unset):
28
+ json_trigger_kind = trigger_kind.value if trigger_kind else None
29
+
30
+ params["trigger_kind"] = json_trigger_kind
31
+
32
+ params["page"] = page
33
+
34
+ params["per_page"] = per_page
35
+
36
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
37
+
38
+ return {
39
+ "method": "get",
40
+ "url": "/w/{workspace}/capture/list/{runnable_kind}/{path}".format(
41
+ workspace=workspace,
42
+ runnable_kind=runnable_kind,
43
+ path=path,
44
+ ),
45
+ "params": params,
46
+ }
47
+
48
+
49
+ def _parse_response(
50
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
51
+ ) -> Optional[List["ListCapturesResponse200Item"]]:
52
+ if response.status_code == HTTPStatus.OK:
53
+ response_200 = []
54
+ _response_200 = response.json()
55
+ for response_200_item_data in _response_200:
56
+ response_200_item = ListCapturesResponse200Item.from_dict(response_200_item_data)
57
+
58
+ response_200.append(response_200_item)
59
+
60
+ return response_200
61
+ if client.raise_on_unexpected_status:
62
+ raise errors.UnexpectedStatus(response.status_code, response.content)
63
+ else:
64
+ return None
65
+
66
+
67
+ def _build_response(
68
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
69
+ ) -> Response[List["ListCapturesResponse200Item"]]:
70
+ return Response(
71
+ status_code=HTTPStatus(response.status_code),
72
+ content=response.content,
73
+ headers=response.headers,
74
+ parsed=_parse_response(client=client, response=response),
75
+ )
76
+
77
+
78
+ def sync_detailed(
79
+ workspace: str,
80
+ runnable_kind: ListCapturesRunnableKind,
81
+ path: str,
82
+ *,
83
+ client: Union[AuthenticatedClient, Client],
84
+ trigger_kind: Union[Unset, None, ListCapturesTriggerKind] = UNSET,
85
+ page: Union[Unset, None, int] = UNSET,
86
+ per_page: Union[Unset, None, int] = UNSET,
87
+ ) -> Response[List["ListCapturesResponse200Item"]]:
88
+ """list captures for a script or flow
89
+
90
+ Args:
91
+ workspace (str):
92
+ runnable_kind (ListCapturesRunnableKind):
93
+ path (str):
94
+ trigger_kind (Union[Unset, None, ListCapturesTriggerKind]):
95
+ page (Union[Unset, None, int]):
96
+ per_page (Union[Unset, None, int]):
97
+
98
+ Raises:
99
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
100
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
101
+
102
+ Returns:
103
+ Response[List['ListCapturesResponse200Item']]
104
+ """
105
+
106
+ kwargs = _get_kwargs(
107
+ workspace=workspace,
108
+ runnable_kind=runnable_kind,
109
+ path=path,
110
+ trigger_kind=trigger_kind,
111
+ page=page,
112
+ per_page=per_page,
113
+ )
114
+
115
+ response = client.get_httpx_client().request(
116
+ **kwargs,
117
+ )
118
+
119
+ return _build_response(client=client, response=response)
120
+
121
+
122
+ def sync(
123
+ workspace: str,
124
+ runnable_kind: ListCapturesRunnableKind,
125
+ path: str,
126
+ *,
127
+ client: Union[AuthenticatedClient, Client],
128
+ trigger_kind: Union[Unset, None, ListCapturesTriggerKind] = UNSET,
129
+ page: Union[Unset, None, int] = UNSET,
130
+ per_page: Union[Unset, None, int] = UNSET,
131
+ ) -> Optional[List["ListCapturesResponse200Item"]]:
132
+ """list captures for a script or flow
133
+
134
+ Args:
135
+ workspace (str):
136
+ runnable_kind (ListCapturesRunnableKind):
137
+ path (str):
138
+ trigger_kind (Union[Unset, None, ListCapturesTriggerKind]):
139
+ page (Union[Unset, None, int]):
140
+ per_page (Union[Unset, None, int]):
141
+
142
+ Raises:
143
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
144
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
145
+
146
+ Returns:
147
+ List['ListCapturesResponse200Item']
148
+ """
149
+
150
+ return sync_detailed(
151
+ workspace=workspace,
152
+ runnable_kind=runnable_kind,
153
+ path=path,
154
+ client=client,
155
+ trigger_kind=trigger_kind,
156
+ page=page,
157
+ per_page=per_page,
158
+ ).parsed
159
+
160
+
161
+ async def asyncio_detailed(
162
+ workspace: str,
163
+ runnable_kind: ListCapturesRunnableKind,
164
+ path: str,
165
+ *,
166
+ client: Union[AuthenticatedClient, Client],
167
+ trigger_kind: Union[Unset, None, ListCapturesTriggerKind] = UNSET,
168
+ page: Union[Unset, None, int] = UNSET,
169
+ per_page: Union[Unset, None, int] = UNSET,
170
+ ) -> Response[List["ListCapturesResponse200Item"]]:
171
+ """list captures for a script or flow
172
+
173
+ Args:
174
+ workspace (str):
175
+ runnable_kind (ListCapturesRunnableKind):
176
+ path (str):
177
+ trigger_kind (Union[Unset, None, ListCapturesTriggerKind]):
178
+ page (Union[Unset, None, int]):
179
+ per_page (Union[Unset, None, int]):
180
+
181
+ Raises:
182
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
183
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
184
+
185
+ Returns:
186
+ Response[List['ListCapturesResponse200Item']]
187
+ """
188
+
189
+ kwargs = _get_kwargs(
190
+ workspace=workspace,
191
+ runnable_kind=runnable_kind,
192
+ path=path,
193
+ trigger_kind=trigger_kind,
194
+ page=page,
195
+ per_page=per_page,
196
+ )
197
+
198
+ response = await client.get_async_httpx_client().request(**kwargs)
199
+
200
+ return _build_response(client=client, response=response)
201
+
202
+
203
+ async def asyncio(
204
+ workspace: str,
205
+ runnable_kind: ListCapturesRunnableKind,
206
+ path: str,
207
+ *,
208
+ client: Union[AuthenticatedClient, Client],
209
+ trigger_kind: Union[Unset, None, ListCapturesTriggerKind] = UNSET,
210
+ page: Union[Unset, None, int] = UNSET,
211
+ per_page: Union[Unset, None, int] = UNSET,
212
+ ) -> Optional[List["ListCapturesResponse200Item"]]:
213
+ """list captures for a script or flow
214
+
215
+ Args:
216
+ workspace (str):
217
+ runnable_kind (ListCapturesRunnableKind):
218
+ path (str):
219
+ trigger_kind (Union[Unset, None, ListCapturesTriggerKind]):
220
+ page (Union[Unset, None, int]):
221
+ per_page (Union[Unset, None, int]):
222
+
223
+ Raises:
224
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
225
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
226
+
227
+ Returns:
228
+ List['ListCapturesResponse200Item']
229
+ """
230
+
231
+ return (
232
+ await asyncio_detailed(
233
+ workspace=workspace,
234
+ runnable_kind=runnable_kind,
235
+ path=path,
236
+ client=client,
237
+ trigger_kind=trigger_kind,
238
+ page=page,
239
+ per_page=per_page,
240
+ )
241
+ ).parsed
@@ -0,0 +1,121 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.ping_capture_config_runnable_kind import PingCaptureConfigRunnableKind
9
+ from ...models.ping_capture_config_trigger_kind import PingCaptureConfigTriggerKind
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ workspace: str,
15
+ trigger_kind: PingCaptureConfigTriggerKind,
16
+ runnable_kind: PingCaptureConfigRunnableKind,
17
+ path: str,
18
+ ) -> Dict[str, Any]:
19
+ pass
20
+
21
+ return {
22
+ "method": "post",
23
+ "url": "/w/{workspace}/capture/ping_config/{trigger_kind}/{runnable_kind}/{path}".format(
24
+ workspace=workspace,
25
+ trigger_kind=trigger_kind,
26
+ runnable_kind=runnable_kind,
27
+ path=path,
28
+ ),
29
+ }
30
+
31
+
32
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
33
+ if response.status_code == HTTPStatus.OK:
34
+ return None
35
+ if client.raise_on_unexpected_status:
36
+ raise errors.UnexpectedStatus(response.status_code, response.content)
37
+ else:
38
+ return None
39
+
40
+
41
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
42
+ return Response(
43
+ status_code=HTTPStatus(response.status_code),
44
+ content=response.content,
45
+ headers=response.headers,
46
+ parsed=_parse_response(client=client, response=response),
47
+ )
48
+
49
+
50
+ def sync_detailed(
51
+ workspace: str,
52
+ trigger_kind: PingCaptureConfigTriggerKind,
53
+ runnable_kind: PingCaptureConfigRunnableKind,
54
+ path: str,
55
+ *,
56
+ client: Union[AuthenticatedClient, Client],
57
+ ) -> Response[Any]:
58
+ """ping capture config
59
+
60
+ Args:
61
+ workspace (str):
62
+ trigger_kind (PingCaptureConfigTriggerKind):
63
+ runnable_kind (PingCaptureConfigRunnableKind):
64
+ path (str):
65
+
66
+ Raises:
67
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
68
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
69
+
70
+ Returns:
71
+ Response[Any]
72
+ """
73
+
74
+ kwargs = _get_kwargs(
75
+ workspace=workspace,
76
+ trigger_kind=trigger_kind,
77
+ runnable_kind=runnable_kind,
78
+ path=path,
79
+ )
80
+
81
+ response = client.get_httpx_client().request(
82
+ **kwargs,
83
+ )
84
+
85
+ return _build_response(client=client, response=response)
86
+
87
+
88
+ async def asyncio_detailed(
89
+ workspace: str,
90
+ trigger_kind: PingCaptureConfigTriggerKind,
91
+ runnable_kind: PingCaptureConfigRunnableKind,
92
+ path: str,
93
+ *,
94
+ client: Union[AuthenticatedClient, Client],
95
+ ) -> Response[Any]:
96
+ """ping capture config
97
+
98
+ Args:
99
+ workspace (str):
100
+ trigger_kind (PingCaptureConfigTriggerKind):
101
+ runnable_kind (PingCaptureConfigRunnableKind):
102
+ path (str):
103
+
104
+ Raises:
105
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
106
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
107
+
108
+ Returns:
109
+ Response[Any]
110
+ """
111
+
112
+ kwargs = _get_kwargs(
113
+ workspace=workspace,
114
+ trigger_kind=trigger_kind,
115
+ runnable_kind=runnable_kind,
116
+ path=path,
117
+ )
118
+
119
+ response = await client.get_async_httpx_client().request(**kwargs)
120
+
121
+ return _build_response(client=client, response=response)