windmill-api 1.362.0__py3-none-any.whl → 1.364.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/config/list_configs.py +131 -0
- windmill_api/api/group/export_instance_groups.py +131 -0
- windmill_api/api/group/overwrite_instance_groups.py +100 -0
- windmill_api/api/setting/list_global_settings.py +131 -0
- windmill_api/api/user/global_users_export.py +131 -0
- windmill_api/api/user/global_users_overwrite.py +100 -0
- windmill_api/models/config.py +81 -0
- windmill_api/models/config_config.py +44 -0
- windmill_api/models/export_instance_groups_response_200_item.py +103 -0
- windmill_api/models/exported_instance_group.py +103 -0
- windmill_api/models/exported_user.py +113 -0
- windmill_api/models/global_setting.py +71 -0
- windmill_api/models/global_setting_value.py +44 -0
- windmill_api/models/global_users_export_response_200_item.py +113 -0
- windmill_api/models/global_users_overwrite_json_body_item.py +113 -0
- windmill_api/models/list_configs_response_200_item.py +81 -0
- windmill_api/models/list_configs_response_200_item_config.py +44 -0
- windmill_api/models/list_global_settings_response_200_item.py +71 -0
- windmill_api/models/list_global_settings_response_200_item_value.py +44 -0
- windmill_api/models/overwrite_instance_groups_json_body_item.py +103 -0
- windmill_api/models/set_workspace_encryption_key_json_body.py +11 -1
- {windmill_api-1.362.0.dist-info → windmill_api-1.364.0.dist-info}/METADATA +1 -1
- {windmill_api-1.362.0.dist-info → windmill_api-1.364.0.dist-info}/RECORD +25 -5
- {windmill_api-1.362.0.dist-info → windmill_api-1.364.0.dist-info}/LICENSE +0 -0
- {windmill_api-1.362.0.dist-info → windmill_api-1.364.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
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_configs_response_200_item import ListConfigsResponse200Item
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs() -> Dict[str, Any]:
|
|
13
|
+
pass
|
|
14
|
+
|
|
15
|
+
return {
|
|
16
|
+
"method": "get",
|
|
17
|
+
"url": "/configs/list",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _parse_response(
|
|
22
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
23
|
+
) -> Optional[List["ListConfigsResponse200Item"]]:
|
|
24
|
+
if response.status_code == HTTPStatus.OK:
|
|
25
|
+
response_200 = []
|
|
26
|
+
_response_200 = response.json()
|
|
27
|
+
for response_200_item_data in _response_200:
|
|
28
|
+
response_200_item = ListConfigsResponse200Item.from_dict(response_200_item_data)
|
|
29
|
+
|
|
30
|
+
response_200.append(response_200_item)
|
|
31
|
+
|
|
32
|
+
return response_200
|
|
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(
|
|
40
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
41
|
+
) -> Response[List["ListConfigsResponse200Item"]]:
|
|
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
|
+
*,
|
|
52
|
+
client: Union[AuthenticatedClient, Client],
|
|
53
|
+
) -> Response[List["ListConfigsResponse200Item"]]:
|
|
54
|
+
"""list configs
|
|
55
|
+
|
|
56
|
+
Raises:
|
|
57
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
58
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
59
|
+
|
|
60
|
+
Returns:
|
|
61
|
+
Response[List['ListConfigsResponse200Item']]
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
kwargs = _get_kwargs()
|
|
65
|
+
|
|
66
|
+
response = client.get_httpx_client().request(
|
|
67
|
+
**kwargs,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
return _build_response(client=client, response=response)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def sync(
|
|
74
|
+
*,
|
|
75
|
+
client: Union[AuthenticatedClient, Client],
|
|
76
|
+
) -> Optional[List["ListConfigsResponse200Item"]]:
|
|
77
|
+
"""list configs
|
|
78
|
+
|
|
79
|
+
Raises:
|
|
80
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
81
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
82
|
+
|
|
83
|
+
Returns:
|
|
84
|
+
List['ListConfigsResponse200Item']
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
return sync_detailed(
|
|
88
|
+
client=client,
|
|
89
|
+
).parsed
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
async def asyncio_detailed(
|
|
93
|
+
*,
|
|
94
|
+
client: Union[AuthenticatedClient, Client],
|
|
95
|
+
) -> Response[List["ListConfigsResponse200Item"]]:
|
|
96
|
+
"""list configs
|
|
97
|
+
|
|
98
|
+
Raises:
|
|
99
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
100
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
101
|
+
|
|
102
|
+
Returns:
|
|
103
|
+
Response[List['ListConfigsResponse200Item']]
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
kwargs = _get_kwargs()
|
|
107
|
+
|
|
108
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
109
|
+
|
|
110
|
+
return _build_response(client=client, response=response)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
async def asyncio(
|
|
114
|
+
*,
|
|
115
|
+
client: Union[AuthenticatedClient, Client],
|
|
116
|
+
) -> Optional[List["ListConfigsResponse200Item"]]:
|
|
117
|
+
"""list configs
|
|
118
|
+
|
|
119
|
+
Raises:
|
|
120
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
121
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
122
|
+
|
|
123
|
+
Returns:
|
|
124
|
+
List['ListConfigsResponse200Item']
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
await asyncio_detailed(
|
|
129
|
+
client=client,
|
|
130
|
+
)
|
|
131
|
+
).parsed
|
|
@@ -0,0 +1,131 @@
|
|
|
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.export_instance_groups_response_200_item import ExportInstanceGroupsResponse200Item
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs() -> Dict[str, Any]:
|
|
13
|
+
pass
|
|
14
|
+
|
|
15
|
+
return {
|
|
16
|
+
"method": "get",
|
|
17
|
+
"url": "/groups/export",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _parse_response(
|
|
22
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
23
|
+
) -> Optional[List["ExportInstanceGroupsResponse200Item"]]:
|
|
24
|
+
if response.status_code == HTTPStatus.OK:
|
|
25
|
+
response_200 = []
|
|
26
|
+
_response_200 = response.json()
|
|
27
|
+
for response_200_item_data in _response_200:
|
|
28
|
+
response_200_item = ExportInstanceGroupsResponse200Item.from_dict(response_200_item_data)
|
|
29
|
+
|
|
30
|
+
response_200.append(response_200_item)
|
|
31
|
+
|
|
32
|
+
return response_200
|
|
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(
|
|
40
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
41
|
+
) -> Response[List["ExportInstanceGroupsResponse200Item"]]:
|
|
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
|
+
*,
|
|
52
|
+
client: Union[AuthenticatedClient, Client],
|
|
53
|
+
) -> Response[List["ExportInstanceGroupsResponse200Item"]]:
|
|
54
|
+
"""export instance groups
|
|
55
|
+
|
|
56
|
+
Raises:
|
|
57
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
58
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
59
|
+
|
|
60
|
+
Returns:
|
|
61
|
+
Response[List['ExportInstanceGroupsResponse200Item']]
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
kwargs = _get_kwargs()
|
|
65
|
+
|
|
66
|
+
response = client.get_httpx_client().request(
|
|
67
|
+
**kwargs,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
return _build_response(client=client, response=response)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def sync(
|
|
74
|
+
*,
|
|
75
|
+
client: Union[AuthenticatedClient, Client],
|
|
76
|
+
) -> Optional[List["ExportInstanceGroupsResponse200Item"]]:
|
|
77
|
+
"""export instance groups
|
|
78
|
+
|
|
79
|
+
Raises:
|
|
80
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
81
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
82
|
+
|
|
83
|
+
Returns:
|
|
84
|
+
List['ExportInstanceGroupsResponse200Item']
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
return sync_detailed(
|
|
88
|
+
client=client,
|
|
89
|
+
).parsed
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
async def asyncio_detailed(
|
|
93
|
+
*,
|
|
94
|
+
client: Union[AuthenticatedClient, Client],
|
|
95
|
+
) -> Response[List["ExportInstanceGroupsResponse200Item"]]:
|
|
96
|
+
"""export instance groups
|
|
97
|
+
|
|
98
|
+
Raises:
|
|
99
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
100
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
101
|
+
|
|
102
|
+
Returns:
|
|
103
|
+
Response[List['ExportInstanceGroupsResponse200Item']]
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
kwargs = _get_kwargs()
|
|
107
|
+
|
|
108
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
109
|
+
|
|
110
|
+
return _build_response(client=client, response=response)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
async def asyncio(
|
|
114
|
+
*,
|
|
115
|
+
client: Union[AuthenticatedClient, Client],
|
|
116
|
+
) -> Optional[List["ExportInstanceGroupsResponse200Item"]]:
|
|
117
|
+
"""export instance groups
|
|
118
|
+
|
|
119
|
+
Raises:
|
|
120
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
121
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
122
|
+
|
|
123
|
+
Returns:
|
|
124
|
+
List['ExportInstanceGroupsResponse200Item']
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
await asyncio_detailed(
|
|
129
|
+
client=client,
|
|
130
|
+
)
|
|
131
|
+
).parsed
|
|
@@ -0,0 +1,100 @@
|
|
|
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.overwrite_instance_groups_json_body_item import OverwriteInstanceGroupsJsonBodyItem
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
*,
|
|
14
|
+
json_body: List["OverwriteInstanceGroupsJsonBodyItem"],
|
|
15
|
+
) -> Dict[str, Any]:
|
|
16
|
+
pass
|
|
17
|
+
|
|
18
|
+
json_json_body = []
|
|
19
|
+
for json_body_item_data in json_body:
|
|
20
|
+
json_body_item = json_body_item_data.to_dict()
|
|
21
|
+
|
|
22
|
+
json_json_body.append(json_body_item)
|
|
23
|
+
|
|
24
|
+
return {
|
|
25
|
+
"method": "post",
|
|
26
|
+
"url": "/groups/overwrite",
|
|
27
|
+
"json": json_json_body,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
32
|
+
if client.raise_on_unexpected_status:
|
|
33
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
34
|
+
else:
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
39
|
+
return Response(
|
|
40
|
+
status_code=HTTPStatus(response.status_code),
|
|
41
|
+
content=response.content,
|
|
42
|
+
headers=response.headers,
|
|
43
|
+
parsed=_parse_response(client=client, response=response),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def sync_detailed(
|
|
48
|
+
*,
|
|
49
|
+
client: Union[AuthenticatedClient, Client],
|
|
50
|
+
json_body: List["OverwriteInstanceGroupsJsonBodyItem"],
|
|
51
|
+
) -> Response[Any]:
|
|
52
|
+
"""overwrite instance groups
|
|
53
|
+
|
|
54
|
+
Args:
|
|
55
|
+
json_body (List['OverwriteInstanceGroupsJsonBodyItem']):
|
|
56
|
+
|
|
57
|
+
Raises:
|
|
58
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
59
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
60
|
+
|
|
61
|
+
Returns:
|
|
62
|
+
Response[Any]
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
kwargs = _get_kwargs(
|
|
66
|
+
json_body=json_body,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
response = client.get_httpx_client().request(
|
|
70
|
+
**kwargs,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
return _build_response(client=client, response=response)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
async def asyncio_detailed(
|
|
77
|
+
*,
|
|
78
|
+
client: Union[AuthenticatedClient, Client],
|
|
79
|
+
json_body: List["OverwriteInstanceGroupsJsonBodyItem"],
|
|
80
|
+
) -> Response[Any]:
|
|
81
|
+
"""overwrite instance groups
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
json_body (List['OverwriteInstanceGroupsJsonBodyItem']):
|
|
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
|
+
json_body=json_body,
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
99
|
+
|
|
100
|
+
return _build_response(client=client, response=response)
|
|
@@ -0,0 +1,131 @@
|
|
|
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_global_settings_response_200_item import ListGlobalSettingsResponse200Item
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs() -> Dict[str, Any]:
|
|
13
|
+
pass
|
|
14
|
+
|
|
15
|
+
return {
|
|
16
|
+
"method": "get",
|
|
17
|
+
"url": "/settings/list_global",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _parse_response(
|
|
22
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
23
|
+
) -> Optional[List["ListGlobalSettingsResponse200Item"]]:
|
|
24
|
+
if response.status_code == HTTPStatus.OK:
|
|
25
|
+
response_200 = []
|
|
26
|
+
_response_200 = response.json()
|
|
27
|
+
for response_200_item_data in _response_200:
|
|
28
|
+
response_200_item = ListGlobalSettingsResponse200Item.from_dict(response_200_item_data)
|
|
29
|
+
|
|
30
|
+
response_200.append(response_200_item)
|
|
31
|
+
|
|
32
|
+
return response_200
|
|
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(
|
|
40
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
41
|
+
) -> Response[List["ListGlobalSettingsResponse200Item"]]:
|
|
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
|
+
*,
|
|
52
|
+
client: Union[AuthenticatedClient, Client],
|
|
53
|
+
) -> Response[List["ListGlobalSettingsResponse200Item"]]:
|
|
54
|
+
"""list global settings
|
|
55
|
+
|
|
56
|
+
Raises:
|
|
57
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
58
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
59
|
+
|
|
60
|
+
Returns:
|
|
61
|
+
Response[List['ListGlobalSettingsResponse200Item']]
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
kwargs = _get_kwargs()
|
|
65
|
+
|
|
66
|
+
response = client.get_httpx_client().request(
|
|
67
|
+
**kwargs,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
return _build_response(client=client, response=response)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def sync(
|
|
74
|
+
*,
|
|
75
|
+
client: Union[AuthenticatedClient, Client],
|
|
76
|
+
) -> Optional[List["ListGlobalSettingsResponse200Item"]]:
|
|
77
|
+
"""list global settings
|
|
78
|
+
|
|
79
|
+
Raises:
|
|
80
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
81
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
82
|
+
|
|
83
|
+
Returns:
|
|
84
|
+
List['ListGlobalSettingsResponse200Item']
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
return sync_detailed(
|
|
88
|
+
client=client,
|
|
89
|
+
).parsed
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
async def asyncio_detailed(
|
|
93
|
+
*,
|
|
94
|
+
client: Union[AuthenticatedClient, Client],
|
|
95
|
+
) -> Response[List["ListGlobalSettingsResponse200Item"]]:
|
|
96
|
+
"""list global settings
|
|
97
|
+
|
|
98
|
+
Raises:
|
|
99
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
100
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
101
|
+
|
|
102
|
+
Returns:
|
|
103
|
+
Response[List['ListGlobalSettingsResponse200Item']]
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
kwargs = _get_kwargs()
|
|
107
|
+
|
|
108
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
109
|
+
|
|
110
|
+
return _build_response(client=client, response=response)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
async def asyncio(
|
|
114
|
+
*,
|
|
115
|
+
client: Union[AuthenticatedClient, Client],
|
|
116
|
+
) -> Optional[List["ListGlobalSettingsResponse200Item"]]:
|
|
117
|
+
"""list global settings
|
|
118
|
+
|
|
119
|
+
Raises:
|
|
120
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
121
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
122
|
+
|
|
123
|
+
Returns:
|
|
124
|
+
List['ListGlobalSettingsResponse200Item']
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
await asyncio_detailed(
|
|
129
|
+
client=client,
|
|
130
|
+
)
|
|
131
|
+
).parsed
|
|
@@ -0,0 +1,131 @@
|
|
|
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.global_users_export_response_200_item import GlobalUsersExportResponse200Item
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs() -> Dict[str, Any]:
|
|
13
|
+
pass
|
|
14
|
+
|
|
15
|
+
return {
|
|
16
|
+
"method": "get",
|
|
17
|
+
"url": "/users/export",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _parse_response(
|
|
22
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
23
|
+
) -> Optional[List["GlobalUsersExportResponse200Item"]]:
|
|
24
|
+
if response.status_code == HTTPStatus.OK:
|
|
25
|
+
response_200 = []
|
|
26
|
+
_response_200 = response.json()
|
|
27
|
+
for response_200_item_data in _response_200:
|
|
28
|
+
response_200_item = GlobalUsersExportResponse200Item.from_dict(response_200_item_data)
|
|
29
|
+
|
|
30
|
+
response_200.append(response_200_item)
|
|
31
|
+
|
|
32
|
+
return response_200
|
|
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(
|
|
40
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
41
|
+
) -> Response[List["GlobalUsersExportResponse200Item"]]:
|
|
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
|
+
*,
|
|
52
|
+
client: Union[AuthenticatedClient, Client],
|
|
53
|
+
) -> Response[List["GlobalUsersExportResponse200Item"]]:
|
|
54
|
+
"""global export users (require super admin and EE)
|
|
55
|
+
|
|
56
|
+
Raises:
|
|
57
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
58
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
59
|
+
|
|
60
|
+
Returns:
|
|
61
|
+
Response[List['GlobalUsersExportResponse200Item']]
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
kwargs = _get_kwargs()
|
|
65
|
+
|
|
66
|
+
response = client.get_httpx_client().request(
|
|
67
|
+
**kwargs,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
return _build_response(client=client, response=response)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def sync(
|
|
74
|
+
*,
|
|
75
|
+
client: Union[AuthenticatedClient, Client],
|
|
76
|
+
) -> Optional[List["GlobalUsersExportResponse200Item"]]:
|
|
77
|
+
"""global export users (require super admin and EE)
|
|
78
|
+
|
|
79
|
+
Raises:
|
|
80
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
81
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
82
|
+
|
|
83
|
+
Returns:
|
|
84
|
+
List['GlobalUsersExportResponse200Item']
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
return sync_detailed(
|
|
88
|
+
client=client,
|
|
89
|
+
).parsed
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
async def asyncio_detailed(
|
|
93
|
+
*,
|
|
94
|
+
client: Union[AuthenticatedClient, Client],
|
|
95
|
+
) -> Response[List["GlobalUsersExportResponse200Item"]]:
|
|
96
|
+
"""global export users (require super admin and EE)
|
|
97
|
+
|
|
98
|
+
Raises:
|
|
99
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
100
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
101
|
+
|
|
102
|
+
Returns:
|
|
103
|
+
Response[List['GlobalUsersExportResponse200Item']]
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
kwargs = _get_kwargs()
|
|
107
|
+
|
|
108
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
109
|
+
|
|
110
|
+
return _build_response(client=client, response=response)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
async def asyncio(
|
|
114
|
+
*,
|
|
115
|
+
client: Union[AuthenticatedClient, Client],
|
|
116
|
+
) -> Optional[List["GlobalUsersExportResponse200Item"]]:
|
|
117
|
+
"""global export users (require super admin and EE)
|
|
118
|
+
|
|
119
|
+
Raises:
|
|
120
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
121
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
122
|
+
|
|
123
|
+
Returns:
|
|
124
|
+
List['GlobalUsersExportResponse200Item']
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
await asyncio_detailed(
|
|
129
|
+
client=client,
|
|
130
|
+
)
|
|
131
|
+
).parsed
|