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