windmill-api 1.548.3__py3-none-any.whl → 1.549.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/user/convert_user_to_group.py +101 -0
- {windmill_api-1.548.3.dist-info → windmill_api-1.549.1.dist-info}/METADATA +1 -1
- {windmill_api-1.548.3.dist-info → windmill_api-1.549.1.dist-info}/RECORD +5 -4
- {windmill_api-1.548.3.dist-info → windmill_api-1.549.1.dist-info}/LICENSE +0 -0
- {windmill_api-1.548.3.dist-info → windmill_api-1.549.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
|
+
username: str,
|
|
14
|
+
) -> Dict[str, Any]:
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
"method": "post",
|
|
19
|
+
"url": "/w/{workspace}/users/convert_to_group/{username}".format(
|
|
20
|
+
workspace=workspace,
|
|
21
|
+
username=username,
|
|
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
|
+
username: str,
|
|
45
|
+
*,
|
|
46
|
+
client: Union[AuthenticatedClient, Client],
|
|
47
|
+
) -> Response[Any]:
|
|
48
|
+
"""convert manual user to group user (require admin privilege)
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
workspace (str):
|
|
52
|
+
username (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
|
+
username=username,
|
|
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
|
+
username: str,
|
|
77
|
+
*,
|
|
78
|
+
client: Union[AuthenticatedClient, Client],
|
|
79
|
+
) -> Response[Any]:
|
|
80
|
+
"""convert manual user to group user (require admin privilege)
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
workspace (str):
|
|
84
|
+
username (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
|
+
username=username,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
100
|
+
|
|
101
|
+
return _build_response(client=client, response=response)
|
|
@@ -438,6 +438,7 @@ windmill_api/api/token/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
438
438
|
windmill_api/api/token/list_available_scopes.py,sha256=kZmj9wGJ6P7AifNrmWDBJXNtoaegBQnfjOkyMbF4Tro,3816
|
|
439
439
|
windmill_api/api/user/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
440
440
|
windmill_api/api/user/accept_invite.py,sha256=sjyQ-cazQOPbYdLek3zuu0-eGDRxQt6FENC1XMmlJQQ,2482
|
|
441
|
+
windmill_api/api/user/convert_user_to_group.py,sha256=Odb3TWYGuvHClyAUo-pygnilYu-2zYGOnO7hYgCchC4,2584
|
|
441
442
|
windmill_api/api/user/create_token.py,sha256=ycsTPJkyaGKgWRm5gUq6SbvN4TM0i-DRn1BukO88uZA,2447
|
|
442
443
|
windmill_api/api/user/create_token_impersonate.py,sha256=TT_WK2AA1OYtav73E5IxbwwQHLQCIlLpGfatXqPLmO4,2616
|
|
443
444
|
windmill_api/api/user/create_user_globally.py,sha256=ERIP36GKZsJ-drwcu7x3IWPHxz6GEq9pc1lNx_BR1qE,2488
|
|
@@ -5485,7 +5486,7 @@ windmill_api/models/workspace_invite.py,sha256=wp-J-VJLkXsfQzw1PdNPGQhETsFCFXh1e
|
|
|
5485
5486
|
windmill_api/models/workspace_mute_critical_alerts_ui_json_body.py,sha256=y8ZwkWEZgavVc-FgLuZZ4z8YPCLxjPcMfdGdKjGM6VQ,1883
|
|
5486
5487
|
windmill_api/py.typed,sha256=8ZJUsxZiuOy1oJeVhsTWQhTG_6pTVHVXk5hJL79ebTk,25
|
|
5487
5488
|
windmill_api/types.py,sha256=GoYub3t4hQP2Yn5tsvShsBfIY3vHUmblU0MXszDx_V0,968
|
|
5488
|
-
windmill_api-1.
|
|
5489
|
-
windmill_api-1.
|
|
5490
|
-
windmill_api-1.
|
|
5491
|
-
windmill_api-1.
|
|
5489
|
+
windmill_api-1.549.1.dist-info/LICENSE,sha256=qJVFNTaOevCeSY6NoXeUG1SPOwQ1K-PxVQ2iEWJzX-A,11348
|
|
5490
|
+
windmill_api-1.549.1.dist-info/METADATA,sha256=7uvQJRZXEmRH5hi7zdGNs8zFqsGyzMd5drXpUqTN97w,5023
|
|
5491
|
+
windmill_api-1.549.1.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
|
5492
|
+
windmill_api-1.549.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|