windmill-api 1.440.3__py3-none-any.whl → 1.441.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.
- windmill_api/api/job/get_slack_approval_payload.py +153 -0
- {windmill_api-1.440.3.dist-info → windmill_api-1.441.1.dist-info}/METADATA +1 -1
- {windmill_api-1.440.3.dist-info → windmill_api-1.441.1.dist-info}/RECORD +5 -4
- {windmill_api-1.440.3.dist-info → windmill_api-1.441.1.dist-info}/LICENSE +0 -0
- {windmill_api-1.440.3.dist-info → windmill_api-1.441.1.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,153 @@
|
|
|
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 UNSET, Response, Unset
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
workspace: str,
|
|
13
|
+
id: str,
|
|
14
|
+
*,
|
|
15
|
+
approver: Union[Unset, None, str] = UNSET,
|
|
16
|
+
message: Union[Unset, None, str] = UNSET,
|
|
17
|
+
slack_resource_path: str,
|
|
18
|
+
channel_id: str,
|
|
19
|
+
flow_step_id: str,
|
|
20
|
+
) -> Dict[str, Any]:
|
|
21
|
+
pass
|
|
22
|
+
|
|
23
|
+
params: Dict[str, Any] = {}
|
|
24
|
+
params["approver"] = approver
|
|
25
|
+
|
|
26
|
+
params["message"] = message
|
|
27
|
+
|
|
28
|
+
params["slack_resource_path"] = slack_resource_path
|
|
29
|
+
|
|
30
|
+
params["channel_id"] = channel_id
|
|
31
|
+
|
|
32
|
+
params["flow_step_id"] = flow_step_id
|
|
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}/jobs/slack_approval/{id}".format(
|
|
39
|
+
workspace=workspace,
|
|
40
|
+
id=id,
|
|
41
|
+
),
|
|
42
|
+
"params": params,
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
47
|
+
if response.status_code == HTTPStatus.OK:
|
|
48
|
+
return None
|
|
49
|
+
if client.raise_on_unexpected_status:
|
|
50
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
51
|
+
else:
|
|
52
|
+
return None
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
56
|
+
return Response(
|
|
57
|
+
status_code=HTTPStatus(response.status_code),
|
|
58
|
+
content=response.content,
|
|
59
|
+
headers=response.headers,
|
|
60
|
+
parsed=_parse_response(client=client, response=response),
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def sync_detailed(
|
|
65
|
+
workspace: str,
|
|
66
|
+
id: str,
|
|
67
|
+
*,
|
|
68
|
+
client: Union[AuthenticatedClient, Client],
|
|
69
|
+
approver: Union[Unset, None, str] = UNSET,
|
|
70
|
+
message: Union[Unset, None, str] = UNSET,
|
|
71
|
+
slack_resource_path: str,
|
|
72
|
+
channel_id: str,
|
|
73
|
+
flow_step_id: str,
|
|
74
|
+
) -> Response[Any]:
|
|
75
|
+
"""generate interactive slack approval for suspended job
|
|
76
|
+
|
|
77
|
+
Args:
|
|
78
|
+
workspace (str):
|
|
79
|
+
id (str):
|
|
80
|
+
approver (Union[Unset, None, str]):
|
|
81
|
+
message (Union[Unset, None, str]):
|
|
82
|
+
slack_resource_path (str):
|
|
83
|
+
channel_id (str):
|
|
84
|
+
flow_step_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
|
+
approver=approver,
|
|
98
|
+
message=message,
|
|
99
|
+
slack_resource_path=slack_resource_path,
|
|
100
|
+
channel_id=channel_id,
|
|
101
|
+
flow_step_id=flow_step_id,
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
response = client.get_httpx_client().request(
|
|
105
|
+
**kwargs,
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
return _build_response(client=client, response=response)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
async def asyncio_detailed(
|
|
112
|
+
workspace: str,
|
|
113
|
+
id: str,
|
|
114
|
+
*,
|
|
115
|
+
client: Union[AuthenticatedClient, Client],
|
|
116
|
+
approver: Union[Unset, None, str] = UNSET,
|
|
117
|
+
message: Union[Unset, None, str] = UNSET,
|
|
118
|
+
slack_resource_path: str,
|
|
119
|
+
channel_id: str,
|
|
120
|
+
flow_step_id: str,
|
|
121
|
+
) -> Response[Any]:
|
|
122
|
+
"""generate interactive slack approval for suspended job
|
|
123
|
+
|
|
124
|
+
Args:
|
|
125
|
+
workspace (str):
|
|
126
|
+
id (str):
|
|
127
|
+
approver (Union[Unset, None, str]):
|
|
128
|
+
message (Union[Unset, None, str]):
|
|
129
|
+
slack_resource_path (str):
|
|
130
|
+
channel_id (str):
|
|
131
|
+
flow_step_id (str):
|
|
132
|
+
|
|
133
|
+
Raises:
|
|
134
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
135
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
136
|
+
|
|
137
|
+
Returns:
|
|
138
|
+
Response[Any]
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
kwargs = _get_kwargs(
|
|
142
|
+
workspace=workspace,
|
|
143
|
+
id=id,
|
|
144
|
+
approver=approver,
|
|
145
|
+
message=message,
|
|
146
|
+
slack_resource_path=slack_resource_path,
|
|
147
|
+
channel_id=channel_id,
|
|
148
|
+
flow_step_id=flow_step_id,
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
152
|
+
|
|
153
|
+
return _build_response(client=client, response=response)
|
|
@@ -165,6 +165,7 @@ windmill_api/api/job/get_log_file_from_store.py,sha256=sOpxKqaWBm8oMtz-SxWrIAewT
|
|
|
165
165
|
windmill_api/api/job/get_queue_count.py,sha256=7g9kGGli__ipJVqAYwYWtjZMIm2tu0tO2u6TpjR4sZU,4658
|
|
166
166
|
windmill_api/api/job/get_resume_urls.py,sha256=Eg8zgcjmDmJi0CWfwIiIU4j8MfHPU7KgQwtsYrXdWBM,5345
|
|
167
167
|
windmill_api/api/job/get_root_job_id.py,sha256=LZMq-95eOA0y3UAcEfS9gj0zTI35KwNvSwDdn8JZhRM,3727
|
|
168
|
+
windmill_api/api/job/get_slack_approval_payload.py,sha256=AtecgP_zzOwYOb8aBlR3Pm3rEEPceWMAUyvEav7Bg4E,4119
|
|
168
169
|
windmill_api/api/job/get_suspended_job_flow.py,sha256=1ujITk_TDUgnZ-uWPRfBfb58qFtfGrEJF9TndIcHhok,5652
|
|
169
170
|
windmill_api/api/job/list_completed_jobs.py,sha256=-_8rtCuQmkGcNppaOxvl8ikJatPWAD5NtNPGpPKRwQA,17668
|
|
170
171
|
windmill_api/api/job/list_filtered_uuids.py,sha256=PUwO85DZ171E-O6HjcFR-hWllhhUulu3v1qt9BxHaVM,18092
|
|
@@ -3532,7 +3533,7 @@ windmill_api/models/workspace_invite.py,sha256=HnAJWGv5LwxWkz1T3fhgHKIccO7RFC1li
|
|
|
3532
3533
|
windmill_api/models/workspace_mute_critical_alerts_ui_json_body.py,sha256=y8ZwkWEZgavVc-FgLuZZ4z8YPCLxjPcMfdGdKjGM6VQ,1883
|
|
3533
3534
|
windmill_api/py.typed,sha256=8ZJUsxZiuOy1oJeVhsTWQhTG_6pTVHVXk5hJL79ebTk,25
|
|
3534
3535
|
windmill_api/types.py,sha256=GoYub3t4hQP2Yn5tsvShsBfIY3vHUmblU0MXszDx_V0,968
|
|
3535
|
-
windmill_api-1.
|
|
3536
|
-
windmill_api-1.
|
|
3537
|
-
windmill_api-1.
|
|
3538
|
-
windmill_api-1.
|
|
3536
|
+
windmill_api-1.441.1.dist-info/LICENSE,sha256=qJVFNTaOevCeSY6NoXeUG1SPOwQ1K-PxVQ2iEWJzX-A,11348
|
|
3537
|
+
windmill_api-1.441.1.dist-info/METADATA,sha256=x-WfO1B-DROWEf-AUAZ_Q2VFqT6r9PmOJiDlNnXo3SY,5023
|
|
3538
|
+
windmill_api-1.441.1.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
|
3539
|
+
windmill_api-1.441.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|