windmill-api 1.443.0__py3-none-any.whl → 1.445.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.
- windmill_api/api/capture/{update_capture.py → delete_capture.py} +13 -13
- windmill_api/api/capture/get_capture_configs.py +186 -0
- windmill_api/api/capture/list_captures.py +211 -0
- windmill_api/api/capture/ping_capture_config.py +121 -0
- windmill_api/api/capture/set_capture_config.py +107 -0
- windmill_api/api/nats_trigger/__init__.py +0 -0
- windmill_api/api/nats_trigger/create_nats_trigger.py +105 -0
- windmill_api/api/{capture/create_capture.py → nats_trigger/delete_nats_trigger.py} +4 -6
- windmill_api/api/nats_trigger/exists_nats_trigger.py +160 -0
- windmill_api/api/nats_trigger/get_nats_trigger.py +166 -0
- windmill_api/api/nats_trigger/list_nats_triggers.py +237 -0
- windmill_api/api/nats_trigger/set_nats_trigger_enabled.py +113 -0
- windmill_api/api/{capture/get_capture.py → nats_trigger/update_nats_trigger.py} +16 -8
- windmill_api/api/workspace/change_workspace_color.py +105 -0
- windmill_api/models/add_granular_acls_kind.py +1 -0
- windmill_api/models/capture.py +94 -0
- windmill_api/models/capture_config.py +95 -0
- windmill_api/models/capture_config_trigger_kind.py +13 -0
- windmill_api/models/capture_trigger_kind.py +13 -0
- windmill_api/models/change_workspace_color_json_body.py +58 -0
- windmill_api/models/create_nats_trigger_json_body.py +120 -0
- windmill_api/models/create_websocket_trigger_json_body.py +42 -29
- windmill_api/models/create_workspace.py +8 -0
- windmill_api/models/create_workspace_json_body.py +8 -0
- windmill_api/models/edit_nats_trigger.py +112 -0
- windmill_api/models/edit_websocket_trigger.py +35 -21
- windmill_api/models/get_capture_configs_response_200_item.py +95 -0
- windmill_api/models/get_capture_configs_response_200_item_trigger_kind.py +13 -0
- windmill_api/models/get_capture_configs_runnable_kind.py +9 -0
- windmill_api/models/get_granular_acls_kind.py +1 -0
- windmill_api/models/get_nats_trigger_response_200.py +196 -0
- windmill_api/models/get_nats_trigger_response_200_extra_perms.py +44 -0
- windmill_api/models/get_settings_response_200.py +8 -0
- windmill_api/models/get_triggers_count_of_flow_response_200.py +8 -0
- windmill_api/models/get_triggers_count_of_script_response_200.py +8 -0
- windmill_api/models/get_used_triggers_response_200.py +7 -0
- windmill_api/models/get_websocket_trigger_response_200.py +54 -41
- windmill_api/models/list_captures_response_200_item.py +94 -0
- windmill_api/models/list_captures_response_200_item_trigger_kind.py +13 -0
- windmill_api/models/list_captures_runnable_kind.py +9 -0
- windmill_api/models/list_captures_trigger_kind.py +13 -0
- windmill_api/models/list_nats_triggers_response_200_item.py +196 -0
- windmill_api/models/list_nats_triggers_response_200_item_extra_perms.py +44 -0
- windmill_api/models/list_user_workspaces_response_200_workspaces_item.py +7 -0
- windmill_api/models/list_websocket_triggers_response_200_item.py +54 -41
- windmill_api/models/list_workspaces_as_super_admin_response_200_item.py +8 -0
- windmill_api/models/list_workspaces_response_200_item.py +8 -0
- windmill_api/models/nats_trigger.py +196 -0
- windmill_api/models/nats_trigger_extra_perms.py +44 -0
- windmill_api/models/new_nats_trigger.py +120 -0
- windmill_api/models/new_websocket_trigger.py +36 -26
- windmill_api/models/ping_capture_config_runnable_kind.py +9 -0
- windmill_api/models/ping_capture_config_trigger_kind.py +13 -0
- windmill_api/models/remove_granular_acls_kind.py +1 -0
- windmill_api/models/set_capture_config_json_body.py +97 -0
- windmill_api/models/set_capture_config_json_body_trigger_config.py +44 -0
- windmill_api/models/set_capture_config_json_body_trigger_kind.py +13 -0
- windmill_api/models/set_nats_trigger_enabled_json_body.py +58 -0
- windmill_api/models/triggers_count.py +8 -0
- windmill_api/models/update_nats_trigger_json_body.py +112 -0
- windmill_api/models/update_websocket_trigger_json_body.py +40 -24
- windmill_api/models/user_workspace_list_workspaces_item.py +7 -0
- windmill_api/models/websocket_trigger.py +48 -38
- windmill_api/models/workspace.py +8 -0
- {windmill_api-1.443.0.dist-info → windmill_api-1.445.0.dist-info}/METADATA +1 -1
- {windmill_api-1.443.0.dist-info → windmill_api-1.445.0.dist-info}/RECORD +68 -29
- {windmill_api-1.443.0.dist-info → windmill_api-1.445.0.dist-info}/LICENSE +0 -0
- {windmill_api-1.443.0.dist-info → windmill_api-1.445.0.dist-info}/WHEEL +0 -0
|
@@ -10,21 +10,21 @@ from ...types import Response
|
|
|
10
10
|
|
|
11
11
|
def _get_kwargs(
|
|
12
12
|
workspace: str,
|
|
13
|
-
|
|
13
|
+
id: int,
|
|
14
14
|
) -> Dict[str, Any]:
|
|
15
15
|
pass
|
|
16
16
|
|
|
17
17
|
return {
|
|
18
|
-
"method": "
|
|
19
|
-
"url": "/w/{workspace}/
|
|
18
|
+
"method": "delete",
|
|
19
|
+
"url": "/w/{workspace}/capture/{id}".format(
|
|
20
20
|
workspace=workspace,
|
|
21
|
-
|
|
21
|
+
id=id,
|
|
22
22
|
),
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
27
|
-
if response.status_code == HTTPStatus.
|
|
27
|
+
if response.status_code == HTTPStatus.OK:
|
|
28
28
|
return None
|
|
29
29
|
if client.raise_on_unexpected_status:
|
|
30
30
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
@@ -43,15 +43,15 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt
|
|
|
43
43
|
|
|
44
44
|
def sync_detailed(
|
|
45
45
|
workspace: str,
|
|
46
|
-
|
|
46
|
+
id: int,
|
|
47
47
|
*,
|
|
48
48
|
client: Union[AuthenticatedClient, Client],
|
|
49
49
|
) -> Response[Any]:
|
|
50
|
-
"""
|
|
50
|
+
"""delete a capture
|
|
51
51
|
|
|
52
52
|
Args:
|
|
53
53
|
workspace (str):
|
|
54
|
-
|
|
54
|
+
id (int):
|
|
55
55
|
|
|
56
56
|
Raises:
|
|
57
57
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -63,7 +63,7 @@ def sync_detailed(
|
|
|
63
63
|
|
|
64
64
|
kwargs = _get_kwargs(
|
|
65
65
|
workspace=workspace,
|
|
66
|
-
|
|
66
|
+
id=id,
|
|
67
67
|
)
|
|
68
68
|
|
|
69
69
|
response = client.get_httpx_client().request(
|
|
@@ -75,15 +75,15 @@ def sync_detailed(
|
|
|
75
75
|
|
|
76
76
|
async def asyncio_detailed(
|
|
77
77
|
workspace: str,
|
|
78
|
-
|
|
78
|
+
id: int,
|
|
79
79
|
*,
|
|
80
80
|
client: Union[AuthenticatedClient, Client],
|
|
81
81
|
) -> Response[Any]:
|
|
82
|
-
"""
|
|
82
|
+
"""delete a capture
|
|
83
83
|
|
|
84
84
|
Args:
|
|
85
85
|
workspace (str):
|
|
86
|
-
|
|
86
|
+
id (int):
|
|
87
87
|
|
|
88
88
|
Raises:
|
|
89
89
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -95,7 +95,7 @@ async def asyncio_detailed(
|
|
|
95
95
|
|
|
96
96
|
kwargs = _get_kwargs(
|
|
97
97
|
workspace=workspace,
|
|
98
|
-
|
|
98
|
+
id=id,
|
|
99
99
|
)
|
|
100
100
|
|
|
101
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,211 @@
|
|
|
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
|
+
) -> Dict[str, Any]:
|
|
21
|
+
pass
|
|
22
|
+
|
|
23
|
+
params: Dict[str, Any] = {}
|
|
24
|
+
json_trigger_kind: Union[Unset, None, str] = UNSET
|
|
25
|
+
if not isinstance(trigger_kind, Unset):
|
|
26
|
+
json_trigger_kind = trigger_kind.value if trigger_kind else None
|
|
27
|
+
|
|
28
|
+
params["trigger_kind"] = json_trigger_kind
|
|
29
|
+
|
|
30
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
"method": "get",
|
|
34
|
+
"url": "/w/{workspace}/capture/list/{runnable_kind}/{path}".format(
|
|
35
|
+
workspace=workspace,
|
|
36
|
+
runnable_kind=runnable_kind,
|
|
37
|
+
path=path,
|
|
38
|
+
),
|
|
39
|
+
"params": params,
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _parse_response(
|
|
44
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
45
|
+
) -> Optional[List["ListCapturesResponse200Item"]]:
|
|
46
|
+
if response.status_code == HTTPStatus.OK:
|
|
47
|
+
response_200 = []
|
|
48
|
+
_response_200 = response.json()
|
|
49
|
+
for response_200_item_data in _response_200:
|
|
50
|
+
response_200_item = ListCapturesResponse200Item.from_dict(response_200_item_data)
|
|
51
|
+
|
|
52
|
+
response_200.append(response_200_item)
|
|
53
|
+
|
|
54
|
+
return response_200
|
|
55
|
+
if client.raise_on_unexpected_status:
|
|
56
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
57
|
+
else:
|
|
58
|
+
return None
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _build_response(
|
|
62
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
63
|
+
) -> Response[List["ListCapturesResponse200Item"]]:
|
|
64
|
+
return Response(
|
|
65
|
+
status_code=HTTPStatus(response.status_code),
|
|
66
|
+
content=response.content,
|
|
67
|
+
headers=response.headers,
|
|
68
|
+
parsed=_parse_response(client=client, response=response),
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def sync_detailed(
|
|
73
|
+
workspace: str,
|
|
74
|
+
runnable_kind: ListCapturesRunnableKind,
|
|
75
|
+
path: str,
|
|
76
|
+
*,
|
|
77
|
+
client: Union[AuthenticatedClient, Client],
|
|
78
|
+
trigger_kind: Union[Unset, None, ListCapturesTriggerKind] = UNSET,
|
|
79
|
+
) -> Response[List["ListCapturesResponse200Item"]]:
|
|
80
|
+
"""list captures for a script or flow
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
workspace (str):
|
|
84
|
+
runnable_kind (ListCapturesRunnableKind):
|
|
85
|
+
path (str):
|
|
86
|
+
trigger_kind (Union[Unset, None, ListCapturesTriggerKind]):
|
|
87
|
+
|
|
88
|
+
Raises:
|
|
89
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
90
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
91
|
+
|
|
92
|
+
Returns:
|
|
93
|
+
Response[List['ListCapturesResponse200Item']]
|
|
94
|
+
"""
|
|
95
|
+
|
|
96
|
+
kwargs = _get_kwargs(
|
|
97
|
+
workspace=workspace,
|
|
98
|
+
runnable_kind=runnable_kind,
|
|
99
|
+
path=path,
|
|
100
|
+
trigger_kind=trigger_kind,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
response = client.get_httpx_client().request(
|
|
104
|
+
**kwargs,
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
return _build_response(client=client, response=response)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def sync(
|
|
111
|
+
workspace: str,
|
|
112
|
+
runnable_kind: ListCapturesRunnableKind,
|
|
113
|
+
path: str,
|
|
114
|
+
*,
|
|
115
|
+
client: Union[AuthenticatedClient, Client],
|
|
116
|
+
trigger_kind: Union[Unset, None, ListCapturesTriggerKind] = UNSET,
|
|
117
|
+
) -> Optional[List["ListCapturesResponse200Item"]]:
|
|
118
|
+
"""list captures for a script or flow
|
|
119
|
+
|
|
120
|
+
Args:
|
|
121
|
+
workspace (str):
|
|
122
|
+
runnable_kind (ListCapturesRunnableKind):
|
|
123
|
+
path (str):
|
|
124
|
+
trigger_kind (Union[Unset, None, ListCapturesTriggerKind]):
|
|
125
|
+
|
|
126
|
+
Raises:
|
|
127
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
128
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
List['ListCapturesResponse200Item']
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
return sync_detailed(
|
|
135
|
+
workspace=workspace,
|
|
136
|
+
runnable_kind=runnable_kind,
|
|
137
|
+
path=path,
|
|
138
|
+
client=client,
|
|
139
|
+
trigger_kind=trigger_kind,
|
|
140
|
+
).parsed
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
async def asyncio_detailed(
|
|
144
|
+
workspace: str,
|
|
145
|
+
runnable_kind: ListCapturesRunnableKind,
|
|
146
|
+
path: str,
|
|
147
|
+
*,
|
|
148
|
+
client: Union[AuthenticatedClient, Client],
|
|
149
|
+
trigger_kind: Union[Unset, None, ListCapturesTriggerKind] = UNSET,
|
|
150
|
+
) -> Response[List["ListCapturesResponse200Item"]]:
|
|
151
|
+
"""list captures for a script or flow
|
|
152
|
+
|
|
153
|
+
Args:
|
|
154
|
+
workspace (str):
|
|
155
|
+
runnable_kind (ListCapturesRunnableKind):
|
|
156
|
+
path (str):
|
|
157
|
+
trigger_kind (Union[Unset, None, ListCapturesTriggerKind]):
|
|
158
|
+
|
|
159
|
+
Raises:
|
|
160
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
161
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
162
|
+
|
|
163
|
+
Returns:
|
|
164
|
+
Response[List['ListCapturesResponse200Item']]
|
|
165
|
+
"""
|
|
166
|
+
|
|
167
|
+
kwargs = _get_kwargs(
|
|
168
|
+
workspace=workspace,
|
|
169
|
+
runnable_kind=runnable_kind,
|
|
170
|
+
path=path,
|
|
171
|
+
trigger_kind=trigger_kind,
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
175
|
+
|
|
176
|
+
return _build_response(client=client, response=response)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
async def asyncio(
|
|
180
|
+
workspace: str,
|
|
181
|
+
runnable_kind: ListCapturesRunnableKind,
|
|
182
|
+
path: str,
|
|
183
|
+
*,
|
|
184
|
+
client: Union[AuthenticatedClient, Client],
|
|
185
|
+
trigger_kind: Union[Unset, None, ListCapturesTriggerKind] = UNSET,
|
|
186
|
+
) -> Optional[List["ListCapturesResponse200Item"]]:
|
|
187
|
+
"""list captures for a script or flow
|
|
188
|
+
|
|
189
|
+
Args:
|
|
190
|
+
workspace (str):
|
|
191
|
+
runnable_kind (ListCapturesRunnableKind):
|
|
192
|
+
path (str):
|
|
193
|
+
trigger_kind (Union[Unset, None, ListCapturesTriggerKind]):
|
|
194
|
+
|
|
195
|
+
Raises:
|
|
196
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
197
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
198
|
+
|
|
199
|
+
Returns:
|
|
200
|
+
List['ListCapturesResponse200Item']
|
|
201
|
+
"""
|
|
202
|
+
|
|
203
|
+
return (
|
|
204
|
+
await asyncio_detailed(
|
|
205
|
+
workspace=workspace,
|
|
206
|
+
runnable_kind=runnable_kind,
|
|
207
|
+
path=path,
|
|
208
|
+
client=client,
|
|
209
|
+
trigger_kind=trigger_kind,
|
|
210
|
+
)
|
|
211
|
+
).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)
|
|
@@ -0,0 +1,107 @@
|
|
|
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_capture_config_json_body import SetCaptureConfigJsonBody
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
workspace: str,
|
|
14
|
+
*,
|
|
15
|
+
json_body: SetCaptureConfigJsonBody,
|
|
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}/capture/set_config".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 response.status_code == HTTPStatus.OK:
|
|
32
|
+
return None
|
|
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
|
+
*,
|
|
51
|
+
client: Union[AuthenticatedClient, Client],
|
|
52
|
+
json_body: SetCaptureConfigJsonBody,
|
|
53
|
+
) -> Response[Any]:
|
|
54
|
+
"""set capture config
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
workspace (str):
|
|
58
|
+
json_body (SetCaptureConfigJsonBody):
|
|
59
|
+
|
|
60
|
+
Raises:
|
|
61
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
62
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
63
|
+
|
|
64
|
+
Returns:
|
|
65
|
+
Response[Any]
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
kwargs = _get_kwargs(
|
|
69
|
+
workspace=workspace,
|
|
70
|
+
json_body=json_body,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
response = client.get_httpx_client().request(
|
|
74
|
+
**kwargs,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
return _build_response(client=client, response=response)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
async def asyncio_detailed(
|
|
81
|
+
workspace: str,
|
|
82
|
+
*,
|
|
83
|
+
client: Union[AuthenticatedClient, Client],
|
|
84
|
+
json_body: SetCaptureConfigJsonBody,
|
|
85
|
+
) -> Response[Any]:
|
|
86
|
+
"""set capture config
|
|
87
|
+
|
|
88
|
+
Args:
|
|
89
|
+
workspace (str):
|
|
90
|
+
json_body (SetCaptureConfigJsonBody):
|
|
91
|
+
|
|
92
|
+
Raises:
|
|
93
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
94
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
95
|
+
|
|
96
|
+
Returns:
|
|
97
|
+
Response[Any]
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
kwargs = _get_kwargs(
|
|
101
|
+
workspace=workspace,
|
|
102
|
+
json_body=json_body,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
106
|
+
|
|
107
|
+
return _build_response(client=client, response=response)
|
|
File without changes
|