I have generated the latest API!

This commit is contained in:
github-actions[bot]
2022-07-08 00:56:43 +00:00
parent 3802dd36fc
commit 4623f854af
19 changed files with 9574 additions and 8364 deletions

View File

@ -3,6 +3,7 @@ from typing import Any, Dict, Optional, Union, cast
import httpx
from ...client import Client
from ...models.verification_token import VerificationToken
from ...models.error import Error
from ...models.email_authentication_form import EmailAuthenticationForm
from ...types import Response
@ -26,10 +27,10 @@ def _get_kwargs(
}
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Error]]:
if response.status_code == 204:
response_204 = None
return response_204
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, VerificationToken, Error]]:
if response.status_code == 201:
response_201 = VerificationToken.from_dict(response.json())
return response_201
if response.status_code == 400:
response_4XX = Error.from_dict(response.json())
return response_4XX
@ -39,7 +40,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Error]]:
return None
def _build_response(*, response: httpx.Response) -> Response[Union[Any, Error]]:
def _build_response(*, response: httpx.Response) -> Response[Union[Any, VerificationToken, Error]]:
return Response(
status_code=response.status_code,
content=response.content,
@ -52,7 +53,7 @@ def sync_detailed(
body: EmailAuthenticationForm,
*,
client: Client,
) -> Response[Union[Any, Error]]:
) -> Response[Union[Any, VerificationToken, Error]]:
kwargs = _get_kwargs(
body=body,
client=client,
@ -70,7 +71,7 @@ def sync(
body: EmailAuthenticationForm,
*,
client: Client,
) -> Optional[Union[Any, Error]]:
) -> Optional[Union[Any, VerificationToken, Error]]:
return sync_detailed(
body=body,
@ -82,7 +83,7 @@ async def asyncio_detailed(
body: EmailAuthenticationForm,
*,
client: Client,
) -> Response[Union[Any, Error]]:
) -> Response[Union[Any, VerificationToken, Error]]:
kwargs = _get_kwargs(
body=body,
client=client,
@ -98,7 +99,7 @@ async def asyncio(
body: EmailAuthenticationForm,
*,
client: Client,
) -> Optional[Union[Any, Error]]:
) -> Optional[Union[Any, VerificationToken, Error]]:
return (
await asyncio_detailed(