windmill-api 1.474.0__py3-none-any.whl → 1.475.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of windmill-api might be problematic. Click here for more details.

Files changed (108) hide show
  1. windmill_api/api/helpers/file_download.py +4 -4
  2. windmill_api/api/mqtt_trigger/__init__.py +0 -0
  3. windmill_api/api/mqtt_trigger/create_mqtt_trigger.py +105 -0
  4. windmill_api/api/mqtt_trigger/delete_mqtt_trigger.py +101 -0
  5. windmill_api/api/mqtt_trigger/exists_mqtt_trigger.py +160 -0
  6. windmill_api/api/mqtt_trigger/get_mqtt_trigger.py +166 -0
  7. windmill_api/api/mqtt_trigger/list_mqtt_triggers.py +237 -0
  8. windmill_api/api/mqtt_trigger/set_mqtt_trigger_enabled.py +113 -0
  9. windmill_api/api/mqtt_trigger/test_mqtt_connection.py +105 -0
  10. windmill_api/api/mqtt_trigger/update_mqtt_trigger.py +113 -0
  11. windmill_api/models/add_granular_acls_kind.py +1 -0
  12. windmill_api/models/app_with_last_version_policy.py +22 -0
  13. windmill_api/models/app_with_last_version_policy_allowed_s3_keys_item.py +66 -0
  14. windmill_api/models/app_with_last_version_w_draft_policy.py +26 -0
  15. windmill_api/models/app_with_last_version_w_draft_policy_allowed_s3_keys_item.py +66 -0
  16. windmill_api/models/capture_config_trigger_kind.py +1 -0
  17. windmill_api/models/capture_trigger_kind.py +1 -0
  18. windmill_api/models/create_app_json_body_policy.py +22 -0
  19. windmill_api/models/create_app_json_body_policy_allowed_s3_keys_item.py +66 -0
  20. windmill_api/models/create_mqtt_trigger_json_body.py +177 -0
  21. windmill_api/models/create_mqtt_trigger_json_body_client_version.py +9 -0
  22. windmill_api/models/create_mqtt_trigger_json_body_subscribe_topics_item.py +70 -0
  23. windmill_api/models/create_mqtt_trigger_json_body_subscribe_topics_item_qos.py +10 -0
  24. windmill_api/models/create_mqtt_trigger_json_body_v3_config.py +58 -0
  25. windmill_api/models/create_mqtt_trigger_json_body_v5_config.py +74 -0
  26. windmill_api/models/edit_mqtt_trigger.py +171 -0
  27. windmill_api/models/edit_mqtt_trigger_client_version.py +9 -0
  28. windmill_api/models/edit_mqtt_trigger_subscribe_topics_item.py +68 -0
  29. windmill_api/models/edit_mqtt_trigger_subscribe_topics_item_qos.py +10 -0
  30. windmill_api/models/edit_mqtt_trigger_v3_config.py +58 -0
  31. windmill_api/models/edit_mqtt_trigger_v5_config.py +74 -0
  32. windmill_api/models/edit_workspace_deploy_ui_settings_json_body_deploy_ui_settings_include_type_item.py +1 -0
  33. windmill_api/models/get_app_by_path_response_200_policy.py +26 -0
  34. windmill_api/models/get_app_by_path_response_200_policy_allowed_s3_keys_item.py +66 -0
  35. windmill_api/models/get_app_by_path_with_draft_response_200_policy.py +28 -0
  36. windmill_api/models/get_app_by_path_with_draft_response_200_policy_allowed_s3_keys_item.py +66 -0
  37. windmill_api/models/get_app_by_version_response_200_policy.py +28 -0
  38. windmill_api/models/get_app_by_version_response_200_policy_allowed_s3_keys_item.py +66 -0
  39. windmill_api/models/get_app_lite_by_path_response_200_policy.py +28 -0
  40. windmill_api/models/get_app_lite_by_path_response_200_policy_allowed_s3_keys_item.py +66 -0
  41. windmill_api/models/get_capture_configs_response_200_item_trigger_kind.py +1 -0
  42. windmill_api/models/get_capture_response_200_trigger_kind.py +1 -0
  43. windmill_api/models/get_granular_acls_kind.py +1 -0
  44. windmill_api/models/get_mqtt_trigger_response_200.py +249 -0
  45. windmill_api/models/get_mqtt_trigger_response_200_client_version.py +9 -0
  46. windmill_api/models/get_mqtt_trigger_response_200_extra_perms.py +44 -0
  47. windmill_api/models/get_mqtt_trigger_response_200_subscribe_topics_item.py +70 -0
  48. windmill_api/models/get_mqtt_trigger_response_200_subscribe_topics_item_qos.py +10 -0
  49. windmill_api/models/get_mqtt_trigger_response_200v3_config.py +58 -0
  50. windmill_api/models/get_mqtt_trigger_response_200v5_config.py +74 -0
  51. windmill_api/models/get_public_app_by_custom_path_response_200_policy.py +28 -0
  52. windmill_api/models/get_public_app_by_custom_path_response_200_policy_allowed_s3_keys_item.py +66 -0
  53. windmill_api/models/get_public_app_by_secret_response_200_policy.py +28 -0
  54. windmill_api/models/get_public_app_by_secret_response_200_policy_allowed_s3_keys_item.py +66 -0
  55. windmill_api/models/get_settings_response_200_deploy_ui_include_type_item.py +1 -0
  56. windmill_api/models/get_triggers_count_of_flow_response_200.py +8 -0
  57. windmill_api/models/get_triggers_count_of_script_response_200.py +8 -0
  58. windmill_api/models/get_used_triggers_response_200.py +7 -0
  59. windmill_api/models/list_captures_response_200_item_trigger_kind.py +1 -0
  60. windmill_api/models/list_captures_trigger_kind.py +1 -0
  61. windmill_api/models/list_mqtt_triggers_response_200_item.py +251 -0
  62. windmill_api/models/list_mqtt_triggers_response_200_item_client_version.py +9 -0
  63. windmill_api/models/list_mqtt_triggers_response_200_item_extra_perms.py +44 -0
  64. windmill_api/models/list_mqtt_triggers_response_200_item_subscribe_topics_item.py +70 -0
  65. windmill_api/models/list_mqtt_triggers_response_200_item_subscribe_topics_item_qos.py +10 -0
  66. windmill_api/models/list_mqtt_triggers_response_200_item_v3_config.py +58 -0
  67. windmill_api/models/list_mqtt_triggers_response_200_item_v5_config.py +74 -0
  68. windmill_api/models/mqtt_client_version.py +9 -0
  69. windmill_api/models/mqtt_qo_s.py +10 -0
  70. windmill_api/models/mqtt_subscribe_topic.py +68 -0
  71. windmill_api/models/mqtt_subscribe_topic_qos.py +10 -0
  72. windmill_api/models/mqtt_trigger.py +245 -0
  73. windmill_api/models/mqtt_trigger_client_version.py +9 -0
  74. windmill_api/models/mqtt_trigger_extra_perms.py +44 -0
  75. windmill_api/models/mqtt_trigger_subscribe_topics_item.py +68 -0
  76. windmill_api/models/mqtt_trigger_subscribe_topics_item_qos.py +10 -0
  77. windmill_api/models/mqtt_trigger_v3_config.py +58 -0
  78. windmill_api/models/mqtt_trigger_v5_config.py +74 -0
  79. windmill_api/models/mqtt_v3_config.py +58 -0
  80. windmill_api/models/mqtt_v5_config.py +74 -0
  81. windmill_api/models/new_mqtt_trigger.py +173 -0
  82. windmill_api/models/new_mqtt_trigger_client_version.py +9 -0
  83. windmill_api/models/new_mqtt_trigger_subscribe_topics_item.py +68 -0
  84. windmill_api/models/new_mqtt_trigger_subscribe_topics_item_qos.py +10 -0
  85. windmill_api/models/new_mqtt_trigger_v3_config.py +58 -0
  86. windmill_api/models/new_mqtt_trigger_v5_config.py +74 -0
  87. windmill_api/models/ping_capture_config_trigger_kind.py +1 -0
  88. windmill_api/models/policy.py +22 -0
  89. windmill_api/models/policy_allowed_s3_keys_item.py +66 -0
  90. windmill_api/models/remove_granular_acls_kind.py +1 -0
  91. windmill_api/models/set_capture_config_json_body_trigger_kind.py +1 -0
  92. windmill_api/models/set_mqtt_trigger_enabled_json_body.py +58 -0
  93. windmill_api/models/test_mqtt_connection_json_body.py +64 -0
  94. windmill_api/models/test_mqtt_connection_json_body_connection.py +44 -0
  95. windmill_api/models/triggers_count.py +8 -0
  96. windmill_api/models/update_app_json_body_policy.py +22 -0
  97. windmill_api/models/update_app_json_body_policy_allowed_s3_keys_item.py +66 -0
  98. windmill_api/models/update_mqtt_trigger_json_body.py +175 -0
  99. windmill_api/models/update_mqtt_trigger_json_body_client_version.py +9 -0
  100. windmill_api/models/update_mqtt_trigger_json_body_subscribe_topics_item.py +70 -0
  101. windmill_api/models/update_mqtt_trigger_json_body_subscribe_topics_item_qos.py +10 -0
  102. windmill_api/models/update_mqtt_trigger_json_body_v3_config.py +58 -0
  103. windmill_api/models/update_mqtt_trigger_json_body_v5_config.py +74 -0
  104. windmill_api/models/workspace_deploy_ui_settings_include_type_item.py +1 -0
  105. {windmill_api-1.474.0.dist-info → windmill_api-1.475.0.dist-info}/METADATA +1 -1
  106. {windmill_api-1.474.0.dist-info → windmill_api-1.475.0.dist-info}/RECORD +108 -34
  107. {windmill_api-1.474.0.dist-info → windmill_api-1.475.0.dist-info}/LICENSE +0 -0
  108. {windmill_api-1.474.0.dist-info → windmill_api-1.475.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,237 @@
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_mqtt_triggers_response_200_item import ListMqttTriggersResponse200Item
9
+ from ...types import UNSET, Response, Unset
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ *,
15
+ page: Union[Unset, None, int] = UNSET,
16
+ per_page: Union[Unset, None, int] = UNSET,
17
+ path: Union[Unset, None, str] = UNSET,
18
+ is_flow: Union[Unset, None, bool] = UNSET,
19
+ path_start: Union[Unset, None, str] = UNSET,
20
+ ) -> Dict[str, Any]:
21
+ pass
22
+
23
+ params: Dict[str, Any] = {}
24
+ params["page"] = page
25
+
26
+ params["per_page"] = per_page
27
+
28
+ params["path"] = path
29
+
30
+ params["is_flow"] = is_flow
31
+
32
+ params["path_start"] = path_start
33
+
34
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
35
+
36
+ return {
37
+ "method": "get",
38
+ "url": "/w/{workspace}/mqtt_triggers/list".format(
39
+ workspace=workspace,
40
+ ),
41
+ "params": params,
42
+ }
43
+
44
+
45
+ def _parse_response(
46
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
47
+ ) -> Optional[List["ListMqttTriggersResponse200Item"]]:
48
+ if response.status_code == HTTPStatus.OK:
49
+ response_200 = []
50
+ _response_200 = response.json()
51
+ for response_200_item_data in _response_200:
52
+ response_200_item = ListMqttTriggersResponse200Item.from_dict(response_200_item_data)
53
+
54
+ response_200.append(response_200_item)
55
+
56
+ return response_200
57
+ if client.raise_on_unexpected_status:
58
+ raise errors.UnexpectedStatus(response.status_code, response.content)
59
+ else:
60
+ return None
61
+
62
+
63
+ def _build_response(
64
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
65
+ ) -> Response[List["ListMqttTriggersResponse200Item"]]:
66
+ return Response(
67
+ status_code=HTTPStatus(response.status_code),
68
+ content=response.content,
69
+ headers=response.headers,
70
+ parsed=_parse_response(client=client, response=response),
71
+ )
72
+
73
+
74
+ def sync_detailed(
75
+ workspace: str,
76
+ *,
77
+ client: Union[AuthenticatedClient, Client],
78
+ page: Union[Unset, None, int] = UNSET,
79
+ per_page: Union[Unset, None, int] = UNSET,
80
+ path: Union[Unset, None, str] = UNSET,
81
+ is_flow: Union[Unset, None, bool] = UNSET,
82
+ path_start: Union[Unset, None, str] = UNSET,
83
+ ) -> Response[List["ListMqttTriggersResponse200Item"]]:
84
+ """list mqtt triggers
85
+
86
+ Args:
87
+ workspace (str):
88
+ page (Union[Unset, None, int]):
89
+ per_page (Union[Unset, None, int]):
90
+ path (Union[Unset, None, str]):
91
+ is_flow (Union[Unset, None, bool]):
92
+ path_start (Union[Unset, None, str]):
93
+
94
+ Raises:
95
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
96
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
97
+
98
+ Returns:
99
+ Response[List['ListMqttTriggersResponse200Item']]
100
+ """
101
+
102
+ kwargs = _get_kwargs(
103
+ workspace=workspace,
104
+ page=page,
105
+ per_page=per_page,
106
+ path=path,
107
+ is_flow=is_flow,
108
+ path_start=path_start,
109
+ )
110
+
111
+ response = client.get_httpx_client().request(
112
+ **kwargs,
113
+ )
114
+
115
+ return _build_response(client=client, response=response)
116
+
117
+
118
+ def sync(
119
+ workspace: str,
120
+ *,
121
+ client: Union[AuthenticatedClient, Client],
122
+ page: Union[Unset, None, int] = UNSET,
123
+ per_page: Union[Unset, None, int] = UNSET,
124
+ path: Union[Unset, None, str] = UNSET,
125
+ is_flow: Union[Unset, None, bool] = UNSET,
126
+ path_start: Union[Unset, None, str] = UNSET,
127
+ ) -> Optional[List["ListMqttTriggersResponse200Item"]]:
128
+ """list mqtt triggers
129
+
130
+ Args:
131
+ workspace (str):
132
+ page (Union[Unset, None, int]):
133
+ per_page (Union[Unset, None, int]):
134
+ path (Union[Unset, None, str]):
135
+ is_flow (Union[Unset, None, bool]):
136
+ path_start (Union[Unset, None, 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
+ List['ListMqttTriggersResponse200Item']
144
+ """
145
+
146
+ return sync_detailed(
147
+ workspace=workspace,
148
+ client=client,
149
+ page=page,
150
+ per_page=per_page,
151
+ path=path,
152
+ is_flow=is_flow,
153
+ path_start=path_start,
154
+ ).parsed
155
+
156
+
157
+ async def asyncio_detailed(
158
+ workspace: str,
159
+ *,
160
+ client: Union[AuthenticatedClient, Client],
161
+ page: Union[Unset, None, int] = UNSET,
162
+ per_page: Union[Unset, None, int] = UNSET,
163
+ path: Union[Unset, None, str] = UNSET,
164
+ is_flow: Union[Unset, None, bool] = UNSET,
165
+ path_start: Union[Unset, None, str] = UNSET,
166
+ ) -> Response[List["ListMqttTriggersResponse200Item"]]:
167
+ """list mqtt triggers
168
+
169
+ Args:
170
+ workspace (str):
171
+ page (Union[Unset, None, int]):
172
+ per_page (Union[Unset, None, int]):
173
+ path (Union[Unset, None, str]):
174
+ is_flow (Union[Unset, None, bool]):
175
+ path_start (Union[Unset, None, str]):
176
+
177
+ Raises:
178
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
179
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
180
+
181
+ Returns:
182
+ Response[List['ListMqttTriggersResponse200Item']]
183
+ """
184
+
185
+ kwargs = _get_kwargs(
186
+ workspace=workspace,
187
+ page=page,
188
+ per_page=per_page,
189
+ path=path,
190
+ is_flow=is_flow,
191
+ path_start=path_start,
192
+ )
193
+
194
+ response = await client.get_async_httpx_client().request(**kwargs)
195
+
196
+ return _build_response(client=client, response=response)
197
+
198
+
199
+ async def asyncio(
200
+ workspace: str,
201
+ *,
202
+ client: Union[AuthenticatedClient, Client],
203
+ page: Union[Unset, None, int] = UNSET,
204
+ per_page: Union[Unset, None, int] = UNSET,
205
+ path: Union[Unset, None, str] = UNSET,
206
+ is_flow: Union[Unset, None, bool] = UNSET,
207
+ path_start: Union[Unset, None, str] = UNSET,
208
+ ) -> Optional[List["ListMqttTriggersResponse200Item"]]:
209
+ """list mqtt triggers
210
+
211
+ Args:
212
+ workspace (str):
213
+ page (Union[Unset, None, int]):
214
+ per_page (Union[Unset, None, int]):
215
+ path (Union[Unset, None, str]):
216
+ is_flow (Union[Unset, None, bool]):
217
+ path_start (Union[Unset, None, str]):
218
+
219
+ Raises:
220
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
221
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
222
+
223
+ Returns:
224
+ List['ListMqttTriggersResponse200Item']
225
+ """
226
+
227
+ return (
228
+ await asyncio_detailed(
229
+ workspace=workspace,
230
+ client=client,
231
+ page=page,
232
+ per_page=per_page,
233
+ path=path,
234
+ is_flow=is_flow,
235
+ path_start=path_start,
236
+ )
237
+ ).parsed
@@ -0,0 +1,113 @@
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.set_mqtt_trigger_enabled_json_body import SetMqttTriggerEnabledJsonBody
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ path: str,
15
+ *,
16
+ json_body: SetMqttTriggerEnabledJsonBody,
17
+ ) -> Dict[str, Any]:
18
+ pass
19
+
20
+ json_json_body = json_body.to_dict()
21
+
22
+ return {
23
+ "method": "post",
24
+ "url": "/w/{workspace}/mqtt_triggers/setenabled/{path}".format(
25
+ workspace=workspace,
26
+ path=path,
27
+ ),
28
+ "json": json_json_body,
29
+ }
30
+
31
+
32
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
33
+ if client.raise_on_unexpected_status:
34
+ raise errors.UnexpectedStatus(response.status_code, response.content)
35
+ else:
36
+ return None
37
+
38
+
39
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
40
+ return Response(
41
+ status_code=HTTPStatus(response.status_code),
42
+ content=response.content,
43
+ headers=response.headers,
44
+ parsed=_parse_response(client=client, response=response),
45
+ )
46
+
47
+
48
+ def sync_detailed(
49
+ workspace: str,
50
+ path: str,
51
+ *,
52
+ client: Union[AuthenticatedClient, Client],
53
+ json_body: SetMqttTriggerEnabledJsonBody,
54
+ ) -> Response[Any]:
55
+ """set enabled mqtt trigger
56
+
57
+ Args:
58
+ workspace (str):
59
+ path (str):
60
+ json_body (SetMqttTriggerEnabledJsonBody):
61
+
62
+ Raises:
63
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
64
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
65
+
66
+ Returns:
67
+ Response[Any]
68
+ """
69
+
70
+ kwargs = _get_kwargs(
71
+ workspace=workspace,
72
+ path=path,
73
+ json_body=json_body,
74
+ )
75
+
76
+ response = client.get_httpx_client().request(
77
+ **kwargs,
78
+ )
79
+
80
+ return _build_response(client=client, response=response)
81
+
82
+
83
+ async def asyncio_detailed(
84
+ workspace: str,
85
+ path: str,
86
+ *,
87
+ client: Union[AuthenticatedClient, Client],
88
+ json_body: SetMqttTriggerEnabledJsonBody,
89
+ ) -> Response[Any]:
90
+ """set enabled mqtt trigger
91
+
92
+ Args:
93
+ workspace (str):
94
+ path (str):
95
+ json_body (SetMqttTriggerEnabledJsonBody):
96
+
97
+ Raises:
98
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
99
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
100
+
101
+ Returns:
102
+ Response[Any]
103
+ """
104
+
105
+ kwargs = _get_kwargs(
106
+ workspace=workspace,
107
+ path=path,
108
+ json_body=json_body,
109
+ )
110
+
111
+ response = await client.get_async_httpx_client().request(**kwargs)
112
+
113
+ return _build_response(client=client, response=response)
@@ -0,0 +1,105 @@
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.test_mqtt_connection_json_body import TestMqttConnectionJsonBody
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ *,
15
+ json_body: TestMqttConnectionJsonBody,
16
+ ) -> Dict[str, Any]:
17
+ pass
18
+
19
+ json_json_body = json_body.to_dict()
20
+
21
+ return {
22
+ "method": "post",
23
+ "url": "/w/{workspace}/mqtt_triggers/test".format(
24
+ workspace=workspace,
25
+ ),
26
+ "json": json_json_body,
27
+ }
28
+
29
+
30
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
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[Any]:
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
+ *,
49
+ client: Union[AuthenticatedClient, Client],
50
+ json_body: TestMqttConnectionJsonBody,
51
+ ) -> Response[Any]:
52
+ """test mqtt connection
53
+
54
+ Args:
55
+ workspace (str):
56
+ json_body (TestMqttConnectionJsonBody):
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[Any]
64
+ """
65
+
66
+ kwargs = _get_kwargs(
67
+ workspace=workspace,
68
+ json_body=json_body,
69
+ )
70
+
71
+ response = client.get_httpx_client().request(
72
+ **kwargs,
73
+ )
74
+
75
+ return _build_response(client=client, response=response)
76
+
77
+
78
+ async def asyncio_detailed(
79
+ workspace: str,
80
+ *,
81
+ client: Union[AuthenticatedClient, Client],
82
+ json_body: TestMqttConnectionJsonBody,
83
+ ) -> Response[Any]:
84
+ """test mqtt connection
85
+
86
+ Args:
87
+ workspace (str):
88
+ json_body (TestMqttConnectionJsonBody):
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
+ Response[Any]
96
+ """
97
+
98
+ kwargs = _get_kwargs(
99
+ workspace=workspace,
100
+ json_body=json_body,
101
+ )
102
+
103
+ response = await client.get_async_httpx_client().request(**kwargs)
104
+
105
+ return _build_response(client=client, response=response)
@@ -0,0 +1,113 @@
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.update_mqtt_trigger_json_body import UpdateMqttTriggerJsonBody
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ path: str,
15
+ *,
16
+ json_body: UpdateMqttTriggerJsonBody,
17
+ ) -> Dict[str, Any]:
18
+ pass
19
+
20
+ json_json_body = json_body.to_dict()
21
+
22
+ return {
23
+ "method": "post",
24
+ "url": "/w/{workspace}/mqtt_triggers/update/{path}".format(
25
+ workspace=workspace,
26
+ path=path,
27
+ ),
28
+ "json": json_json_body,
29
+ }
30
+
31
+
32
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
33
+ if client.raise_on_unexpected_status:
34
+ raise errors.UnexpectedStatus(response.status_code, response.content)
35
+ else:
36
+ return None
37
+
38
+
39
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
40
+ return Response(
41
+ status_code=HTTPStatus(response.status_code),
42
+ content=response.content,
43
+ headers=response.headers,
44
+ parsed=_parse_response(client=client, response=response),
45
+ )
46
+
47
+
48
+ def sync_detailed(
49
+ workspace: str,
50
+ path: str,
51
+ *,
52
+ client: Union[AuthenticatedClient, Client],
53
+ json_body: UpdateMqttTriggerJsonBody,
54
+ ) -> Response[Any]:
55
+ """update mqtt trigger
56
+
57
+ Args:
58
+ workspace (str):
59
+ path (str):
60
+ json_body (UpdateMqttTriggerJsonBody):
61
+
62
+ Raises:
63
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
64
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
65
+
66
+ Returns:
67
+ Response[Any]
68
+ """
69
+
70
+ kwargs = _get_kwargs(
71
+ workspace=workspace,
72
+ path=path,
73
+ json_body=json_body,
74
+ )
75
+
76
+ response = client.get_httpx_client().request(
77
+ **kwargs,
78
+ )
79
+
80
+ return _build_response(client=client, response=response)
81
+
82
+
83
+ async def asyncio_detailed(
84
+ workspace: str,
85
+ path: str,
86
+ *,
87
+ client: Union[AuthenticatedClient, Client],
88
+ json_body: UpdateMqttTriggerJsonBody,
89
+ ) -> Response[Any]:
90
+ """update mqtt trigger
91
+
92
+ Args:
93
+ workspace (str):
94
+ path (str):
95
+ json_body (UpdateMqttTriggerJsonBody):
96
+
97
+ Raises:
98
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
99
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
100
+
101
+ Returns:
102
+ Response[Any]
103
+ """
104
+
105
+ kwargs = _get_kwargs(
106
+ workspace=workspace,
107
+ path=path,
108
+ json_body=json_body,
109
+ )
110
+
111
+ response = await client.get_async_httpx_client().request(**kwargs)
112
+
113
+ return _build_response(client=client, response=response)
@@ -8,6 +8,7 @@ class AddGranularAclsKind(str, Enum):
8
8
  GROUP = "group_"
9
9
  HTTP_TRIGGER = "http_trigger"
10
10
  KAFKA_TRIGGER = "kafka_trigger"
11
+ MQTT_TRIGGER = "mqtt_trigger"
11
12
  NATS_TRIGGER = "nats_trigger"
12
13
  POSTGRES_TRIGGER = "postgres_trigger"
13
14
  RAW_APP = "raw_app"
@@ -7,6 +7,7 @@ from ..models.app_with_last_version_policy_execution_mode import AppWithLastVers
7
7
  from ..types import UNSET, Unset
8
8
 
9
9
  if TYPE_CHECKING:
10
+ from ..models.app_with_last_version_policy_allowed_s3_keys_item import AppWithLastVersionPolicyAllowedS3KeysItem
10
11
  from ..models.app_with_last_version_policy_s3_inputs_item import AppWithLastVersionPolicyS3InputsItem
11
12
  from ..models.app_with_last_version_policy_triggerables import AppWithLastVersionPolicyTriggerables
12
13
  from ..models.app_with_last_version_policy_triggerables_v2 import AppWithLastVersionPolicyTriggerablesV2
@@ -22,6 +23,7 @@ class AppWithLastVersionPolicy:
22
23
  triggerables (Union[Unset, AppWithLastVersionPolicyTriggerables]):
23
24
  triggerables_v2 (Union[Unset, AppWithLastVersionPolicyTriggerablesV2]):
24
25
  s3_inputs (Union[Unset, List['AppWithLastVersionPolicyS3InputsItem']]):
26
+ allowed_s3_keys (Union[Unset, List['AppWithLastVersionPolicyAllowedS3KeysItem']]):
25
27
  execution_mode (Union[Unset, AppWithLastVersionPolicyExecutionMode]):
26
28
  on_behalf_of (Union[Unset, str]):
27
29
  on_behalf_of_email (Union[Unset, str]):
@@ -30,6 +32,7 @@ class AppWithLastVersionPolicy:
30
32
  triggerables: Union[Unset, "AppWithLastVersionPolicyTriggerables"] = UNSET
31
33
  triggerables_v2: Union[Unset, "AppWithLastVersionPolicyTriggerablesV2"] = UNSET
32
34
  s3_inputs: Union[Unset, List["AppWithLastVersionPolicyS3InputsItem"]] = UNSET
35
+ allowed_s3_keys: Union[Unset, List["AppWithLastVersionPolicyAllowedS3KeysItem"]] = UNSET
33
36
  execution_mode: Union[Unset, AppWithLastVersionPolicyExecutionMode] = UNSET
34
37
  on_behalf_of: Union[Unset, str] = UNSET
35
38
  on_behalf_of_email: Union[Unset, str] = UNSET
@@ -52,6 +55,14 @@ class AppWithLastVersionPolicy:
52
55
 
53
56
  s3_inputs.append(s3_inputs_item)
54
57
 
58
+ allowed_s3_keys: Union[Unset, List[Dict[str, Any]]] = UNSET
59
+ if not isinstance(self.allowed_s3_keys, Unset):
60
+ allowed_s3_keys = []
61
+ for allowed_s3_keys_item_data in self.allowed_s3_keys:
62
+ allowed_s3_keys_item = allowed_s3_keys_item_data.to_dict()
63
+
64
+ allowed_s3_keys.append(allowed_s3_keys_item)
65
+
55
66
  execution_mode: Union[Unset, str] = UNSET
56
67
  if not isinstance(self.execution_mode, Unset):
57
68
  execution_mode = self.execution_mode.value
@@ -68,6 +79,8 @@ class AppWithLastVersionPolicy:
68
79
  field_dict["triggerables_v2"] = triggerables_v2
69
80
  if s3_inputs is not UNSET:
70
81
  field_dict["s3_inputs"] = s3_inputs
82
+ if allowed_s3_keys is not UNSET:
83
+ field_dict["allowed_s3_keys"] = allowed_s3_keys
71
84
  if execution_mode is not UNSET:
72
85
  field_dict["execution_mode"] = execution_mode
73
86
  if on_behalf_of is not UNSET:
@@ -79,6 +92,7 @@ class AppWithLastVersionPolicy:
79
92
 
80
93
  @classmethod
81
94
  def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
95
+ from ..models.app_with_last_version_policy_allowed_s3_keys_item import AppWithLastVersionPolicyAllowedS3KeysItem
82
96
  from ..models.app_with_last_version_policy_s3_inputs_item import AppWithLastVersionPolicyS3InputsItem
83
97
  from ..models.app_with_last_version_policy_triggerables import AppWithLastVersionPolicyTriggerables
84
98
  from ..models.app_with_last_version_policy_triggerables_v2 import AppWithLastVersionPolicyTriggerablesV2
@@ -105,6 +119,13 @@ class AppWithLastVersionPolicy:
105
119
 
106
120
  s3_inputs.append(s3_inputs_item)
107
121
 
122
+ allowed_s3_keys = []
123
+ _allowed_s3_keys = d.pop("allowed_s3_keys", UNSET)
124
+ for allowed_s3_keys_item_data in _allowed_s3_keys or []:
125
+ allowed_s3_keys_item = AppWithLastVersionPolicyAllowedS3KeysItem.from_dict(allowed_s3_keys_item_data)
126
+
127
+ allowed_s3_keys.append(allowed_s3_keys_item)
128
+
108
129
  _execution_mode = d.pop("execution_mode", UNSET)
109
130
  execution_mode: Union[Unset, AppWithLastVersionPolicyExecutionMode]
110
131
  if isinstance(_execution_mode, Unset):
@@ -120,6 +141,7 @@ class AppWithLastVersionPolicy:
120
141
  triggerables=triggerables,
121
142
  triggerables_v2=triggerables_v2,
122
143
  s3_inputs=s3_inputs,
144
+ allowed_s3_keys=allowed_s3_keys,
123
145
  execution_mode=execution_mode,
124
146
  on_behalf_of=on_behalf_of,
125
147
  on_behalf_of_email=on_behalf_of_email,