lsp
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.accept_invite_json_body import AcceptInviteJsonBody
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: AcceptInviteJsonBody,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/accept_invite".format(client.base_url)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
json_json_body = json_body.to_dict()
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
"json": json_json_body,
|
||||
}
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=None,
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: AcceptInviteJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""accept invite to workspace
|
||||
|
||||
Args:
|
||||
json_body (AcceptInviteJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: AcceptInviteJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""accept invite to workspace
|
||||
|
||||
Args:
|
||||
json_body (AcceptInviteJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
@@ -0,0 +1,90 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.create_token_json_body import CreateTokenJsonBody
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: CreateTokenJsonBody,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/tokens/create".format(client.base_url)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
json_json_body = json_body.to_dict()
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
"json": json_json_body,
|
||||
}
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=None,
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: CreateTokenJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""create token
|
||||
|
||||
Args:
|
||||
json_body (CreateTokenJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: CreateTokenJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""create token
|
||||
|
||||
Args:
|
||||
json_body (CreateTokenJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
@@ -0,0 +1,97 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.create_user_json_body import CreateUserJsonBody
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
json_body: CreateUserJsonBody,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/w/{workspace}/users/add".format(client.base_url, workspace=workspace)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
json_json_body = json_body.to_dict()
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
"json": json_json_body,
|
||||
}
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=None,
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
json_body: CreateUserJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""create user (require admin privilege)
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
json_body (CreateUserJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
json_body: CreateUserJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""create user (require admin privilege)
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
json_body (CreateUserJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
@@ -0,0 +1,90 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.create_user_globally_json_body import CreateUserGloballyJsonBody
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: CreateUserGloballyJsonBody,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/create".format(client.base_url)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
json_json_body = json_body.to_dict()
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
"json": json_json_body,
|
||||
}
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=None,
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: CreateUserGloballyJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""create user
|
||||
|
||||
Args:
|
||||
json_body (CreateUserGloballyJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: CreateUserGloballyJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""create user
|
||||
|
||||
Args:
|
||||
json_body (CreateUserGloballyJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
@@ -0,0 +1,90 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.decline_invite_json_body import DeclineInviteJsonBody
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: DeclineInviteJsonBody,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/decline_invite".format(client.base_url)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
json_json_body = json_body.to_dict()
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
"json": json_json_body,
|
||||
}
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=None,
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: DeclineInviteJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""decline invite to workspace
|
||||
|
||||
Args:
|
||||
json_body (DeclineInviteJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: DeclineInviteJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""decline invite to workspace
|
||||
|
||||
Args:
|
||||
json_body (DeclineInviteJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
@@ -0,0 +1,86 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
token_prefix: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/tokens/delete/{token_prefix}".format(client.base_url, token_prefix=token_prefix)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
return {
|
||||
"method": "delete",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
}
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=None,
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
token_prefix: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Any]:
|
||||
"""delete token
|
||||
|
||||
Args:
|
||||
token_prefix (str):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
token_prefix=token_prefix,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
token_prefix: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Any]:
|
||||
"""delete token
|
||||
|
||||
Args:
|
||||
token_prefix (str):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
token_prefix=token_prefix,
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
@@ -0,0 +1,93 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
username: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/w/{workspace}/users/delete/{username}".format(client.base_url, workspace=workspace, username=username)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
return {
|
||||
"method": "delete",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
}
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=None,
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
username: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Any]:
|
||||
"""delete user (require admin privilege)
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
username (str):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
username=username,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
username: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Any]:
|
||||
"""delete user (require admin privilege)
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
username (str):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
username=username,
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
@@ -0,0 +1,75 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/email".format(client.base_url)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
}
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=None,
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Any]:
|
||||
"""get current user email (if logged in)
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Any]:
|
||||
"""get current user email (if logged in)
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
@@ -0,0 +1,97 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.global_user_update_json_body import GlobalUserUpdateJsonBody
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
email: str,
|
||||
*,
|
||||
client: Client,
|
||||
json_body: GlobalUserUpdateJsonBody,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/update/{email}".format(client.base_url, email=email)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
json_json_body = json_body.to_dict()
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
"json": json_json_body,
|
||||
}
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=None,
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
email: str,
|
||||
*,
|
||||
client: Client,
|
||||
json_body: GlobalUserUpdateJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""global update user (require super admin)
|
||||
|
||||
Args:
|
||||
email (str):
|
||||
json_body (GlobalUserUpdateJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
email=email,
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
email: str,
|
||||
*,
|
||||
client: Client,
|
||||
json_body: GlobalUserUpdateJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""global update user (require super admin)
|
||||
|
||||
Args:
|
||||
email (str):
|
||||
json_body (GlobalUserUpdateJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
email=email,
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
@@ -0,0 +1,116 @@
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.global_whoami_response_200 import GlobalWhoamiResponse200
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/whoami".format(client.base_url)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[GlobalWhoamiResponse200]:
|
||||
if response.status_code == 200:
|
||||
response_200 = GlobalWhoamiResponse200.from_dict(response.json())
|
||||
|
||||
return response_200
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[GlobalWhoamiResponse200]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[GlobalWhoamiResponse200]:
|
||||
"""get current global whoami (if logged in)
|
||||
|
||||
Returns:
|
||||
Response[GlobalWhoamiResponse200]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[GlobalWhoamiResponse200]:
|
||||
"""get current global whoami (if logged in)
|
||||
|
||||
Returns:
|
||||
Response[GlobalWhoamiResponse200]
|
||||
"""
|
||||
|
||||
return sync_detailed(
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[GlobalWhoamiResponse200]:
|
||||
"""get current global whoami (if logged in)
|
||||
|
||||
Returns:
|
||||
Response[GlobalWhoamiResponse200]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[GlobalWhoamiResponse200]:
|
||||
"""get current global whoami (if logged in)
|
||||
|
||||
Returns:
|
||||
Response[GlobalWhoamiResponse200]
|
||||
"""
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
@@ -0,0 +1,86 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/w/{workspace}/users/leave_workspace".format(client.base_url, workspace=workspace)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
}
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=None,
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Any]:
|
||||
"""leave workspace
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Any]:
|
||||
"""leave workspace
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
121
python-client/windmill-api/windmill_api/api/user/list_tokens.py
Normal file
121
python-client/windmill-api/windmill_api/api/user/list_tokens.py
Normal file
@@ -0,0 +1,121 @@
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.list_tokens_response_200_item import ListTokensResponse200Item
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/tokens/list".format(client.base_url)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[List[ListTokensResponse200Item]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = []
|
||||
_response_200 = response.json()
|
||||
for response_200_item_data in _response_200:
|
||||
response_200_item = ListTokensResponse200Item.from_dict(response_200_item_data)
|
||||
|
||||
response_200.append(response_200_item)
|
||||
|
||||
return response_200
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[List[ListTokensResponse200Item]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[List[ListTokensResponse200Item]]:
|
||||
"""list token
|
||||
|
||||
Returns:
|
||||
Response[List[ListTokensResponse200Item]]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[List[ListTokensResponse200Item]]:
|
||||
"""list token
|
||||
|
||||
Returns:
|
||||
Response[List[ListTokensResponse200Item]]
|
||||
"""
|
||||
|
||||
return sync_detailed(
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[List[ListTokensResponse200Item]]:
|
||||
"""list token
|
||||
|
||||
Returns:
|
||||
Response[List[ListTokensResponse200Item]]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[List[ListTokensResponse200Item]]:
|
||||
"""list token
|
||||
|
||||
Returns:
|
||||
Response[List[ListTokensResponse200Item]]
|
||||
"""
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
@@ -0,0 +1,136 @@
|
||||
from typing import Any, Dict, List, Optional, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/w/{workspace}/users/list_usernames".format(client.base_url, workspace=workspace)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[List[str]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = cast(List[str], response.json())
|
||||
|
||||
return response_200
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[List[str]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[List[str]]:
|
||||
"""list usernames
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Returns:
|
||||
Response[List[str]]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[List[str]]:
|
||||
"""list usernames
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Returns:
|
||||
Response[List[str]]
|
||||
"""
|
||||
|
||||
return sync_detailed(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[List[str]]:
|
||||
"""list usernames
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Returns:
|
||||
Response[List[str]]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[List[str]]:
|
||||
"""list usernames
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Returns:
|
||||
Response[List[str]]
|
||||
"""
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
142
python-client/windmill-api/windmill_api/api/user/list_users.py
Normal file
142
python-client/windmill-api/windmill_api/api/user/list_users.py
Normal file
@@ -0,0 +1,142 @@
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.list_users_response_200_item import ListUsersResponse200Item
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/w/{workspace}/users/list".format(client.base_url, workspace=workspace)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[List[ListUsersResponse200Item]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = []
|
||||
_response_200 = response.json()
|
||||
for response_200_item_data in _response_200:
|
||||
response_200_item = ListUsersResponse200Item.from_dict(response_200_item_data)
|
||||
|
||||
response_200.append(response_200_item)
|
||||
|
||||
return response_200
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[List[ListUsersResponse200Item]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[List[ListUsersResponse200Item]]:
|
||||
"""list users
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Returns:
|
||||
Response[List[ListUsersResponse200Item]]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[List[ListUsersResponse200Item]]:
|
||||
"""list users
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Returns:
|
||||
Response[List[ListUsersResponse200Item]]
|
||||
"""
|
||||
|
||||
return sync_detailed(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[List[ListUsersResponse200Item]]:
|
||||
"""list users
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Returns:
|
||||
Response[List[ListUsersResponse200Item]]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[List[ListUsersResponse200Item]]:
|
||||
"""list users
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Returns:
|
||||
Response[List[ListUsersResponse200Item]]
|
||||
"""
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
@@ -0,0 +1,163 @@
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.list_users_as_super_admin_response_200_item import ListUsersAsSuperAdminResponse200Item
|
||||
from ...types import UNSET, Response, Unset
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
page: Union[Unset, None, int] = UNSET,
|
||||
per_page: Union[Unset, None, int] = UNSET,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/list_as_super_admin".format(client.base_url)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
params: Dict[str, Any] = {}
|
||||
params["page"] = page
|
||||
|
||||
params["per_page"] = per_page
|
||||
|
||||
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
"params": params,
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[List[ListUsersAsSuperAdminResponse200Item]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = []
|
||||
_response_200 = response.json()
|
||||
for response_200_item_data in _response_200:
|
||||
response_200_item = ListUsersAsSuperAdminResponse200Item.from_dict(response_200_item_data)
|
||||
|
||||
response_200.append(response_200_item)
|
||||
|
||||
return response_200
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[List[ListUsersAsSuperAdminResponse200Item]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
page: Union[Unset, None, int] = UNSET,
|
||||
per_page: Union[Unset, None, int] = UNSET,
|
||||
) -> Response[List[ListUsersAsSuperAdminResponse200Item]]:
|
||||
"""list all users as super admin (require to be super amdin)
|
||||
|
||||
Args:
|
||||
page (Union[Unset, None, int]):
|
||||
per_page (Union[Unset, None, int]):
|
||||
|
||||
Returns:
|
||||
Response[List[ListUsersAsSuperAdminResponse200Item]]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
page=page,
|
||||
per_page=per_page,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
*,
|
||||
client: Client,
|
||||
page: Union[Unset, None, int] = UNSET,
|
||||
per_page: Union[Unset, None, int] = UNSET,
|
||||
) -> Optional[List[ListUsersAsSuperAdminResponse200Item]]:
|
||||
"""list all users as super admin (require to be super amdin)
|
||||
|
||||
Args:
|
||||
page (Union[Unset, None, int]):
|
||||
per_page (Union[Unset, None, int]):
|
||||
|
||||
Returns:
|
||||
Response[List[ListUsersAsSuperAdminResponse200Item]]
|
||||
"""
|
||||
|
||||
return sync_detailed(
|
||||
client=client,
|
||||
page=page,
|
||||
per_page=per_page,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
page: Union[Unset, None, int] = UNSET,
|
||||
per_page: Union[Unset, None, int] = UNSET,
|
||||
) -> Response[List[ListUsersAsSuperAdminResponse200Item]]:
|
||||
"""list all users as super admin (require to be super amdin)
|
||||
|
||||
Args:
|
||||
page (Union[Unset, None, int]):
|
||||
per_page (Union[Unset, None, int]):
|
||||
|
||||
Returns:
|
||||
Response[List[ListUsersAsSuperAdminResponse200Item]]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
page=page,
|
||||
per_page=per_page,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
*,
|
||||
client: Client,
|
||||
page: Union[Unset, None, int] = UNSET,
|
||||
per_page: Union[Unset, None, int] = UNSET,
|
||||
) -> Optional[List[ListUsersAsSuperAdminResponse200Item]]:
|
||||
"""list all users as super admin (require to be super amdin)
|
||||
|
||||
Args:
|
||||
page (Union[Unset, None, int]):
|
||||
per_page (Union[Unset, None, int]):
|
||||
|
||||
Returns:
|
||||
Response[List[ListUsersAsSuperAdminResponse200Item]]
|
||||
"""
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
client=client,
|
||||
page=page,
|
||||
per_page=per_page,
|
||||
)
|
||||
).parsed
|
||||
@@ -0,0 +1,121 @@
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.list_workspace_invites_response_200_item import ListWorkspaceInvitesResponse200Item
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/list_invites".format(client.base_url)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[List[ListWorkspaceInvitesResponse200Item]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = []
|
||||
_response_200 = response.json()
|
||||
for response_200_item_data in _response_200:
|
||||
response_200_item = ListWorkspaceInvitesResponse200Item.from_dict(response_200_item_data)
|
||||
|
||||
response_200.append(response_200_item)
|
||||
|
||||
return response_200
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[List[ListWorkspaceInvitesResponse200Item]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[List[ListWorkspaceInvitesResponse200Item]]:
|
||||
"""list all workspace invites
|
||||
|
||||
Returns:
|
||||
Response[List[ListWorkspaceInvitesResponse200Item]]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[List[ListWorkspaceInvitesResponse200Item]]:
|
||||
"""list all workspace invites
|
||||
|
||||
Returns:
|
||||
Response[List[ListWorkspaceInvitesResponse200Item]]
|
||||
"""
|
||||
|
||||
return sync_detailed(
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[List[ListWorkspaceInvitesResponse200Item]]:
|
||||
"""list all workspace invites
|
||||
|
||||
Returns:
|
||||
Response[List[ListWorkspaceInvitesResponse200Item]]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[List[ListWorkspaceInvitesResponse200Item]]:
|
||||
"""list all workspace invites
|
||||
|
||||
Returns:
|
||||
Response[List[ListWorkspaceInvitesResponse200Item]]
|
||||
"""
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
90
python-client/windmill-api/windmill_api/api/user/login.py
Normal file
90
python-client/windmill-api/windmill_api/api/user/login.py
Normal file
@@ -0,0 +1,90 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.login_json_body import LoginJsonBody
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: LoginJsonBody,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/auth/login".format(client.base_url)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
json_json_body = json_body.to_dict()
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
"json": json_json_body,
|
||||
}
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=None,
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: LoginJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""login with password
|
||||
|
||||
Args:
|
||||
json_body (LoginJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: LoginJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""login with password
|
||||
|
||||
Args:
|
||||
json_body (LoginJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
@@ -0,0 +1,97 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.login_with_oauth_json_body import LoginWithOauthJsonBody
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
client_name: str,
|
||||
*,
|
||||
client: Client,
|
||||
json_body: LoginWithOauthJsonBody,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/oauth/login_callback/{client_name}".format(client.base_url, client_name=client_name)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
json_json_body = json_body.to_dict()
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
"json": json_json_body,
|
||||
}
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=None,
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
client_name: str,
|
||||
*,
|
||||
client: Client,
|
||||
json_body: LoginWithOauthJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""login with oauth authorization flow
|
||||
|
||||
Args:
|
||||
client_name (str):
|
||||
json_body (LoginWithOauthJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client_name=client_name,
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
client_name: str,
|
||||
*,
|
||||
client: Client,
|
||||
json_body: LoginWithOauthJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""login with oauth authorization flow
|
||||
|
||||
Args:
|
||||
client_name (str):
|
||||
json_body (LoginWithOauthJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client_name=client_name,
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
75
python-client/windmill-api/windmill_api/api/user/logout.py
Normal file
75
python-client/windmill-api/windmill_api/api/user/logout.py
Normal file
@@ -0,0 +1,75 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/logout".format(client.base_url)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
}
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=None,
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Any]:
|
||||
"""logout
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Any]:
|
||||
"""logout
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
@@ -0,0 +1,90 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.set_password_json_body import SetPasswordJsonBody
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: SetPasswordJsonBody,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/setpassword".format(client.base_url)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
json_json_body = json_body.to_dict()
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
"json": json_json_body,
|
||||
}
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=None,
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: SetPasswordJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""set password
|
||||
|
||||
Args:
|
||||
json_body (SetPasswordJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
json_body: SetPasswordJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""set password
|
||||
|
||||
Args:
|
||||
json_body (SetPasswordJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
104
python-client/windmill-api/windmill_api/api/user/update_user.py
Normal file
104
python-client/windmill-api/windmill_api/api/user/update_user.py
Normal file
@@ -0,0 +1,104 @@
|
||||
from typing import Any, Dict
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.update_user_json_body import UpdateUserJsonBody
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
username: str,
|
||||
*,
|
||||
client: Client,
|
||||
json_body: UpdateUserJsonBody,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/w/{workspace}/users/update/{username}".format(client.base_url, workspace=workspace, username=username)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
json_json_body = json_body.to_dict()
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
"json": json_json_body,
|
||||
}
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=None,
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
username: str,
|
||||
*,
|
||||
client: Client,
|
||||
json_body: UpdateUserJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""update user (require admin privilege)
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
username (str):
|
||||
json_body (UpdateUserJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
username=username,
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
username: str,
|
||||
*,
|
||||
client: Client,
|
||||
json_body: UpdateUserJsonBody,
|
||||
) -> Response[Any]:
|
||||
"""update user (require admin privilege)
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
username (str):
|
||||
json_body (UpdateUserJsonBody):
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
username=username,
|
||||
client=client,
|
||||
json_body=json_body,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
137
python-client/windmill-api/windmill_api/api/user/whoami.py
Normal file
137
python-client/windmill-api/windmill_api/api/user/whoami.py
Normal file
@@ -0,0 +1,137 @@
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.whoami_response_200 import WhoamiResponse200
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/w/{workspace}/users/whoami".format(client.base_url, workspace=workspace)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[WhoamiResponse200]:
|
||||
if response.status_code == 200:
|
||||
response_200 = WhoamiResponse200.from_dict(response.json())
|
||||
|
||||
return response_200
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[WhoamiResponse200]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[WhoamiResponse200]:
|
||||
"""whoami
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Returns:
|
||||
Response[WhoamiResponse200]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[WhoamiResponse200]:
|
||||
"""whoami
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Returns:
|
||||
Response[WhoamiResponse200]
|
||||
"""
|
||||
|
||||
return sync_detailed(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[WhoamiResponse200]:
|
||||
"""whoami
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Returns:
|
||||
Response[WhoamiResponse200]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[WhoamiResponse200]:
|
||||
"""whoami
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Returns:
|
||||
Response[WhoamiResponse200]
|
||||
"""
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
150
python-client/windmill-api/windmill_api/api/user/whois.py
Normal file
150
python-client/windmill-api/windmill_api/api/user/whois.py
Normal file
@@ -0,0 +1,150 @@
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.whois_response_200 import WhoisResponse200
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
username: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/w/{workspace}/users/whois/{username}".format(client.base_url, workspace=workspace, username=username)
|
||||
|
||||
headers: Dict[str, str] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[WhoisResponse200]:
|
||||
if response.status_code == 200:
|
||||
response_200 = WhoisResponse200.from_dict(response.json())
|
||||
|
||||
return response_200
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[WhoisResponse200]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
username: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[WhoisResponse200]:
|
||||
"""whois
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
username (str):
|
||||
|
||||
Returns:
|
||||
Response[WhoisResponse200]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
username=username,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.request(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
workspace: str,
|
||||
username: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[WhoisResponse200]:
|
||||
"""whois
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
username (str):
|
||||
|
||||
Returns:
|
||||
Response[WhoisResponse200]
|
||||
"""
|
||||
|
||||
return sync_detailed(
|
||||
workspace=workspace,
|
||||
username=username,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
username: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[WhoisResponse200]:
|
||||
"""whois
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
username (str):
|
||||
|
||||
Returns:
|
||||
Response[WhoisResponse200]
|
||||
"""
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
username=username,
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.request(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
workspace: str,
|
||||
username: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[WhoisResponse200]:
|
||||
"""whois
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
username (str):
|
||||
|
||||
Returns:
|
||||
Response[WhoisResponse200]
|
||||
"""
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
workspace=workspace,
|
||||
username=username,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
Reference in New Issue
Block a user