windmill-api 1.554.1__py3-none-any.whl → 1.555.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/app/get_public_secret_of_latest_version_of_app.py +101 -0
- windmill_api/api/flow_conversation/__init__.py +0 -0
- windmill_api/api/flow_conversation/delete_flow_conversation.py +101 -0
- windmill_api/api/flow_conversation/list_conversation_messages.py +206 -0
- windmill_api/api/flow_conversation/list_flow_conversations.py +207 -0
- windmill_api/api/job/run_and_stream_flow_by_path.py +171 -0
- windmill_api/api/job/run_and_stream_flow_by_path_get.py +169 -0
- windmill_api/api/job/run_and_stream_script_by_hash.py +189 -0
- windmill_api/api/job/run_and_stream_script_by_hash_get.py +187 -0
- windmill_api/api/job/run_and_stream_script_by_path.py +189 -0
- windmill_api/api/job/run_and_stream_script_by_path_get.py +187 -0
- windmill_api/api/job/run_flow_by_path.py +9 -0
- windmill_api/api/job/run_wait_result_flow_by_path.py +9 -0
- windmill_api/models/completed_job_raw_flow.py +8 -0
- windmill_api/models/delete_completed_job_response_200_raw_flow.py +8 -0
- windmill_api/models/extended_jobs_jobs_item_type_0_raw_flow.py +8 -0
- windmill_api/models/extended_jobs_jobs_item_type_1_raw_flow.py +8 -0
- windmill_api/models/flow_conversation.py +107 -0
- windmill_api/models/flow_conversation_message.py +101 -0
- windmill_api/models/flow_conversation_message_message_type.py +10 -0
- windmill_api/models/flow_preview_value.py +8 -0
- windmill_api/models/get_completed_job_response_200_raw_flow.py +8 -0
- windmill_api/models/get_flow_by_path_response_200_value.py +8 -0
- windmill_api/models/get_flow_by_path_with_draft_response_200_draft_value.py +8 -0
- windmill_api/models/get_flow_version_response_200_value.py +8 -0
- windmill_api/models/get_hub_flow_by_id_response_200_flow_value.py +8 -0
- windmill_api/models/get_job_response_200_type_0_raw_flow.py +8 -0
- windmill_api/models/get_job_response_200_type_1_raw_flow.py +8 -0
- windmill_api/models/get_suspended_job_flow_response_200_job_type_0_raw_flow.py +8 -0
- windmill_api/models/get_suspended_job_flow_response_200_job_type_1_raw_flow.py +8 -0
- windmill_api/models/list_completed_jobs_response_200_item_raw_flow.py +8 -0
- windmill_api/models/list_conversation_messages_response_200_item.py +103 -0
- windmill_api/models/list_conversation_messages_response_200_item_message_type.py +10 -0
- windmill_api/models/list_extended_jobs_response_200_jobs_item_type_0_raw_flow.py +8 -0
- windmill_api/models/list_extended_jobs_response_200_jobs_item_type_1_raw_flow.py +8 -0
- windmill_api/models/list_flow_conversations_response_200_item.py +107 -0
- windmill_api/models/list_jobs_response_200_item_type_0_raw_flow.py +8 -0
- windmill_api/models/list_jobs_response_200_item_type_1_raw_flow.py +8 -0
- windmill_api/models/list_queue_response_200_item_raw_flow.py +8 -0
- windmill_api/models/list_user_workspaces_response_200_workspaces_item.py +7 -0
- windmill_api/models/open_flow_value.py +8 -0
- windmill_api/models/open_flow_w_path_value.py +8 -0
- windmill_api/models/queued_job_raw_flow.py +8 -0
- windmill_api/models/run_and_stream_flow_by_path_json_body.py +44 -0
- windmill_api/models/run_and_stream_script_by_hash_json_body.py +44 -0
- windmill_api/models/run_and_stream_script_by_path_json_body.py +44 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value.py +8 -0
- windmill_api/models/run_flow_preview_json_body_value.py +8 -0
- windmill_api/models/user_workspace_list_workspaces_item.py +7 -0
- {windmill_api-1.554.1.dist-info → windmill_api-1.555.1.dist-info}/METADATA +1 -1
- {windmill_api-1.554.1.dist-info → windmill_api-1.555.1.dist-info}/RECORD +53 -33
- {windmill_api-1.554.1.dist-info → windmill_api-1.555.1.dist-info}/LICENSE +0 -0
- {windmill_api-1.554.1.dist-info → windmill_api-1.555.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
|
+
path: str,
|
|
14
|
+
) -> Dict[str, Any]:
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
"method": "get",
|
|
19
|
+
"url": "/w/{workspace}/apps/secret_of_latest_version/{path}".format(
|
|
20
|
+
workspace=workspace,
|
|
21
|
+
path=path,
|
|
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
|
+
path: str,
|
|
45
|
+
*,
|
|
46
|
+
client: Union[AuthenticatedClient, Client],
|
|
47
|
+
) -> Response[Any]:
|
|
48
|
+
"""get public secret of latest version of an app bundle
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
workspace (str):
|
|
52
|
+
path (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
|
+
path=path,
|
|
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
|
+
path: str,
|
|
77
|
+
*,
|
|
78
|
+
client: Union[AuthenticatedClient, Client],
|
|
79
|
+
) -> Response[Any]:
|
|
80
|
+
"""get public secret of latest version of an app bundle
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
workspace (str):
|
|
84
|
+
path (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
|
+
path=path,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
100
|
+
|
|
101
|
+
return _build_response(client=client, response=response)
|
|
File without changes
|
|
@@ -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
|
+
conversation_id: str,
|
|
14
|
+
) -> Dict[str, Any]:
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
"method": "delete",
|
|
19
|
+
"url": "/w/{workspace}/flow_conversations/delete/{conversation_id}".format(
|
|
20
|
+
workspace=workspace,
|
|
21
|
+
conversation_id=conversation_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
|
+
conversation_id: str,
|
|
45
|
+
*,
|
|
46
|
+
client: Union[AuthenticatedClient, Client],
|
|
47
|
+
) -> Response[Any]:
|
|
48
|
+
"""delete flow conversation
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
workspace (str):
|
|
52
|
+
conversation_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
|
+
conversation_id=conversation_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
|
+
conversation_id: str,
|
|
77
|
+
*,
|
|
78
|
+
client: Union[AuthenticatedClient, Client],
|
|
79
|
+
) -> Response[Any]:
|
|
80
|
+
"""delete flow conversation
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
workspace (str):
|
|
84
|
+
conversation_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
|
+
conversation_id=conversation_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,206 @@
|
|
|
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_conversation_messages_response_200_item import ListConversationMessagesResponse200Item
|
|
9
|
+
from ...types import UNSET, Response, Unset
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
workspace: str,
|
|
14
|
+
conversation_id: str,
|
|
15
|
+
*,
|
|
16
|
+
page: Union[Unset, None, int] = UNSET,
|
|
17
|
+
per_page: Union[Unset, None, int] = UNSET,
|
|
18
|
+
) -> Dict[str, Any]:
|
|
19
|
+
pass
|
|
20
|
+
|
|
21
|
+
params: Dict[str, Any] = {}
|
|
22
|
+
params["page"] = page
|
|
23
|
+
|
|
24
|
+
params["per_page"] = per_page
|
|
25
|
+
|
|
26
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
"method": "get",
|
|
30
|
+
"url": "/w/{workspace}/flow_conversations/{conversation_id}/messages".format(
|
|
31
|
+
workspace=workspace,
|
|
32
|
+
conversation_id=conversation_id,
|
|
33
|
+
),
|
|
34
|
+
"params": params,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _parse_response(
|
|
39
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
40
|
+
) -> Optional[List["ListConversationMessagesResponse200Item"]]:
|
|
41
|
+
if response.status_code == HTTPStatus.OK:
|
|
42
|
+
response_200 = []
|
|
43
|
+
_response_200 = response.json()
|
|
44
|
+
for response_200_item_data in _response_200:
|
|
45
|
+
response_200_item = ListConversationMessagesResponse200Item.from_dict(response_200_item_data)
|
|
46
|
+
|
|
47
|
+
response_200.append(response_200_item)
|
|
48
|
+
|
|
49
|
+
return response_200
|
|
50
|
+
if client.raise_on_unexpected_status:
|
|
51
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
52
|
+
else:
|
|
53
|
+
return None
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _build_response(
|
|
57
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
58
|
+
) -> Response[List["ListConversationMessagesResponse200Item"]]:
|
|
59
|
+
return Response(
|
|
60
|
+
status_code=HTTPStatus(response.status_code),
|
|
61
|
+
content=response.content,
|
|
62
|
+
headers=response.headers,
|
|
63
|
+
parsed=_parse_response(client=client, response=response),
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def sync_detailed(
|
|
68
|
+
workspace: str,
|
|
69
|
+
conversation_id: str,
|
|
70
|
+
*,
|
|
71
|
+
client: Union[AuthenticatedClient, Client],
|
|
72
|
+
page: Union[Unset, None, int] = UNSET,
|
|
73
|
+
per_page: Union[Unset, None, int] = UNSET,
|
|
74
|
+
) -> Response[List["ListConversationMessagesResponse200Item"]]:
|
|
75
|
+
"""list conversation messages
|
|
76
|
+
|
|
77
|
+
Args:
|
|
78
|
+
workspace (str):
|
|
79
|
+
conversation_id (str):
|
|
80
|
+
page (Union[Unset, None, int]):
|
|
81
|
+
per_page (Union[Unset, None, int]):
|
|
82
|
+
|
|
83
|
+
Raises:
|
|
84
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
85
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
86
|
+
|
|
87
|
+
Returns:
|
|
88
|
+
Response[List['ListConversationMessagesResponse200Item']]
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
kwargs = _get_kwargs(
|
|
92
|
+
workspace=workspace,
|
|
93
|
+
conversation_id=conversation_id,
|
|
94
|
+
page=page,
|
|
95
|
+
per_page=per_page,
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
response = client.get_httpx_client().request(
|
|
99
|
+
**kwargs,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
return _build_response(client=client, response=response)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def sync(
|
|
106
|
+
workspace: str,
|
|
107
|
+
conversation_id: str,
|
|
108
|
+
*,
|
|
109
|
+
client: Union[AuthenticatedClient, Client],
|
|
110
|
+
page: Union[Unset, None, int] = UNSET,
|
|
111
|
+
per_page: Union[Unset, None, int] = UNSET,
|
|
112
|
+
) -> Optional[List["ListConversationMessagesResponse200Item"]]:
|
|
113
|
+
"""list conversation messages
|
|
114
|
+
|
|
115
|
+
Args:
|
|
116
|
+
workspace (str):
|
|
117
|
+
conversation_id (str):
|
|
118
|
+
page (Union[Unset, None, int]):
|
|
119
|
+
per_page (Union[Unset, None, int]):
|
|
120
|
+
|
|
121
|
+
Raises:
|
|
122
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
123
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
124
|
+
|
|
125
|
+
Returns:
|
|
126
|
+
List['ListConversationMessagesResponse200Item']
|
|
127
|
+
"""
|
|
128
|
+
|
|
129
|
+
return sync_detailed(
|
|
130
|
+
workspace=workspace,
|
|
131
|
+
conversation_id=conversation_id,
|
|
132
|
+
client=client,
|
|
133
|
+
page=page,
|
|
134
|
+
per_page=per_page,
|
|
135
|
+
).parsed
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
async def asyncio_detailed(
|
|
139
|
+
workspace: str,
|
|
140
|
+
conversation_id: str,
|
|
141
|
+
*,
|
|
142
|
+
client: Union[AuthenticatedClient, Client],
|
|
143
|
+
page: Union[Unset, None, int] = UNSET,
|
|
144
|
+
per_page: Union[Unset, None, int] = UNSET,
|
|
145
|
+
) -> Response[List["ListConversationMessagesResponse200Item"]]:
|
|
146
|
+
"""list conversation messages
|
|
147
|
+
|
|
148
|
+
Args:
|
|
149
|
+
workspace (str):
|
|
150
|
+
conversation_id (str):
|
|
151
|
+
page (Union[Unset, None, int]):
|
|
152
|
+
per_page (Union[Unset, None, int]):
|
|
153
|
+
|
|
154
|
+
Raises:
|
|
155
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
156
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
157
|
+
|
|
158
|
+
Returns:
|
|
159
|
+
Response[List['ListConversationMessagesResponse200Item']]
|
|
160
|
+
"""
|
|
161
|
+
|
|
162
|
+
kwargs = _get_kwargs(
|
|
163
|
+
workspace=workspace,
|
|
164
|
+
conversation_id=conversation_id,
|
|
165
|
+
page=page,
|
|
166
|
+
per_page=per_page,
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
170
|
+
|
|
171
|
+
return _build_response(client=client, response=response)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
async def asyncio(
|
|
175
|
+
workspace: str,
|
|
176
|
+
conversation_id: str,
|
|
177
|
+
*,
|
|
178
|
+
client: Union[AuthenticatedClient, Client],
|
|
179
|
+
page: Union[Unset, None, int] = UNSET,
|
|
180
|
+
per_page: Union[Unset, None, int] = UNSET,
|
|
181
|
+
) -> Optional[List["ListConversationMessagesResponse200Item"]]:
|
|
182
|
+
"""list conversation messages
|
|
183
|
+
|
|
184
|
+
Args:
|
|
185
|
+
workspace (str):
|
|
186
|
+
conversation_id (str):
|
|
187
|
+
page (Union[Unset, None, int]):
|
|
188
|
+
per_page (Union[Unset, None, int]):
|
|
189
|
+
|
|
190
|
+
Raises:
|
|
191
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
192
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
193
|
+
|
|
194
|
+
Returns:
|
|
195
|
+
List['ListConversationMessagesResponse200Item']
|
|
196
|
+
"""
|
|
197
|
+
|
|
198
|
+
return (
|
|
199
|
+
await asyncio_detailed(
|
|
200
|
+
workspace=workspace,
|
|
201
|
+
conversation_id=conversation_id,
|
|
202
|
+
client=client,
|
|
203
|
+
page=page,
|
|
204
|
+
per_page=per_page,
|
|
205
|
+
)
|
|
206
|
+
).parsed
|
|
@@ -0,0 +1,207 @@
|
|
|
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_flow_conversations_response_200_item import ListFlowConversationsResponse200Item
|
|
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
|
+
flow_path: Union[Unset, None, str] = UNSET,
|
|
18
|
+
) -> Dict[str, Any]:
|
|
19
|
+
pass
|
|
20
|
+
|
|
21
|
+
params: Dict[str, Any] = {}
|
|
22
|
+
params["page"] = page
|
|
23
|
+
|
|
24
|
+
params["per_page"] = per_page
|
|
25
|
+
|
|
26
|
+
params["flow_path"] = flow_path
|
|
27
|
+
|
|
28
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
"method": "get",
|
|
32
|
+
"url": "/w/{workspace}/flow_conversations/list".format(
|
|
33
|
+
workspace=workspace,
|
|
34
|
+
),
|
|
35
|
+
"params": params,
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _parse_response(
|
|
40
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
41
|
+
) -> Optional[List["ListFlowConversationsResponse200Item"]]:
|
|
42
|
+
if response.status_code == HTTPStatus.OK:
|
|
43
|
+
response_200 = []
|
|
44
|
+
_response_200 = response.json()
|
|
45
|
+
for response_200_item_data in _response_200:
|
|
46
|
+
response_200_item = ListFlowConversationsResponse200Item.from_dict(response_200_item_data)
|
|
47
|
+
|
|
48
|
+
response_200.append(response_200_item)
|
|
49
|
+
|
|
50
|
+
return response_200
|
|
51
|
+
if client.raise_on_unexpected_status:
|
|
52
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
53
|
+
else:
|
|
54
|
+
return None
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _build_response(
|
|
58
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
59
|
+
) -> Response[List["ListFlowConversationsResponse200Item"]]:
|
|
60
|
+
return Response(
|
|
61
|
+
status_code=HTTPStatus(response.status_code),
|
|
62
|
+
content=response.content,
|
|
63
|
+
headers=response.headers,
|
|
64
|
+
parsed=_parse_response(client=client, response=response),
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def sync_detailed(
|
|
69
|
+
workspace: str,
|
|
70
|
+
*,
|
|
71
|
+
client: Union[AuthenticatedClient, Client],
|
|
72
|
+
page: Union[Unset, None, int] = UNSET,
|
|
73
|
+
per_page: Union[Unset, None, int] = UNSET,
|
|
74
|
+
flow_path: Union[Unset, None, str] = UNSET,
|
|
75
|
+
) -> Response[List["ListFlowConversationsResponse200Item"]]:
|
|
76
|
+
"""list flow conversations
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
workspace (str):
|
|
80
|
+
page (Union[Unset, None, int]):
|
|
81
|
+
per_page (Union[Unset, None, int]):
|
|
82
|
+
flow_path (Union[Unset, None, str]):
|
|
83
|
+
|
|
84
|
+
Raises:
|
|
85
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
86
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
87
|
+
|
|
88
|
+
Returns:
|
|
89
|
+
Response[List['ListFlowConversationsResponse200Item']]
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
kwargs = _get_kwargs(
|
|
93
|
+
workspace=workspace,
|
|
94
|
+
page=page,
|
|
95
|
+
per_page=per_page,
|
|
96
|
+
flow_path=flow_path,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
response = client.get_httpx_client().request(
|
|
100
|
+
**kwargs,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
return _build_response(client=client, response=response)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def sync(
|
|
107
|
+
workspace: str,
|
|
108
|
+
*,
|
|
109
|
+
client: Union[AuthenticatedClient, Client],
|
|
110
|
+
page: Union[Unset, None, int] = UNSET,
|
|
111
|
+
per_page: Union[Unset, None, int] = UNSET,
|
|
112
|
+
flow_path: Union[Unset, None, str] = UNSET,
|
|
113
|
+
) -> Optional[List["ListFlowConversationsResponse200Item"]]:
|
|
114
|
+
"""list flow conversations
|
|
115
|
+
|
|
116
|
+
Args:
|
|
117
|
+
workspace (str):
|
|
118
|
+
page (Union[Unset, None, int]):
|
|
119
|
+
per_page (Union[Unset, None, int]):
|
|
120
|
+
flow_path (Union[Unset, None, str]):
|
|
121
|
+
|
|
122
|
+
Raises:
|
|
123
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
124
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
125
|
+
|
|
126
|
+
Returns:
|
|
127
|
+
List['ListFlowConversationsResponse200Item']
|
|
128
|
+
"""
|
|
129
|
+
|
|
130
|
+
return sync_detailed(
|
|
131
|
+
workspace=workspace,
|
|
132
|
+
client=client,
|
|
133
|
+
page=page,
|
|
134
|
+
per_page=per_page,
|
|
135
|
+
flow_path=flow_path,
|
|
136
|
+
).parsed
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
async def asyncio_detailed(
|
|
140
|
+
workspace: str,
|
|
141
|
+
*,
|
|
142
|
+
client: Union[AuthenticatedClient, Client],
|
|
143
|
+
page: Union[Unset, None, int] = UNSET,
|
|
144
|
+
per_page: Union[Unset, None, int] = UNSET,
|
|
145
|
+
flow_path: Union[Unset, None, str] = UNSET,
|
|
146
|
+
) -> Response[List["ListFlowConversationsResponse200Item"]]:
|
|
147
|
+
"""list flow conversations
|
|
148
|
+
|
|
149
|
+
Args:
|
|
150
|
+
workspace (str):
|
|
151
|
+
page (Union[Unset, None, int]):
|
|
152
|
+
per_page (Union[Unset, None, int]):
|
|
153
|
+
flow_path (Union[Unset, None, str]):
|
|
154
|
+
|
|
155
|
+
Raises:
|
|
156
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
157
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
158
|
+
|
|
159
|
+
Returns:
|
|
160
|
+
Response[List['ListFlowConversationsResponse200Item']]
|
|
161
|
+
"""
|
|
162
|
+
|
|
163
|
+
kwargs = _get_kwargs(
|
|
164
|
+
workspace=workspace,
|
|
165
|
+
page=page,
|
|
166
|
+
per_page=per_page,
|
|
167
|
+
flow_path=flow_path,
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
171
|
+
|
|
172
|
+
return _build_response(client=client, response=response)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
async def asyncio(
|
|
176
|
+
workspace: str,
|
|
177
|
+
*,
|
|
178
|
+
client: Union[AuthenticatedClient, Client],
|
|
179
|
+
page: Union[Unset, None, int] = UNSET,
|
|
180
|
+
per_page: Union[Unset, None, int] = UNSET,
|
|
181
|
+
flow_path: Union[Unset, None, str] = UNSET,
|
|
182
|
+
) -> Optional[List["ListFlowConversationsResponse200Item"]]:
|
|
183
|
+
"""list flow conversations
|
|
184
|
+
|
|
185
|
+
Args:
|
|
186
|
+
workspace (str):
|
|
187
|
+
page (Union[Unset, None, int]):
|
|
188
|
+
per_page (Union[Unset, None, int]):
|
|
189
|
+
flow_path (Union[Unset, None, str]):
|
|
190
|
+
|
|
191
|
+
Raises:
|
|
192
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
193
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
194
|
+
|
|
195
|
+
Returns:
|
|
196
|
+
List['ListFlowConversationsResponse200Item']
|
|
197
|
+
"""
|
|
198
|
+
|
|
199
|
+
return (
|
|
200
|
+
await asyncio_detailed(
|
|
201
|
+
workspace=workspace,
|
|
202
|
+
client=client,
|
|
203
|
+
page=page,
|
|
204
|
+
per_page=per_page,
|
|
205
|
+
flow_path=flow_path,
|
|
206
|
+
)
|
|
207
|
+
).parsed
|