Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,304 changes: 2,812 additions & 492 deletions openapi/openapi.yaml

Large diffs are not rendered by default.

35 changes: 25 additions & 10 deletions src/volcano_sdk/_generated/api/anon_keys/create_anon_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

from ...models.anon_key import AnonKey
from ...models.create_anon_key_body import CreateAnonKeyBody
from ...models.error import Error
from typing import cast
from uuid import UUID

Expand Down Expand Up @@ -42,21 +43,35 @@ def request_kwargs(



def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AnonKey | None:
def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AnonKey | Error | None:
if response.status_code == 201:
response_201 = AnonKey.from_dict(response.json())



return response_201

if response.status_code == 400:
response_400 = Error.from_dict(response.json())



return response_400

if response.status_code == 409:
response_409 = Error.from_dict(response.json())



return response_409

if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None


def build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AnonKey]:
def build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AnonKey | Error]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
Expand All @@ -71,7 +86,7 @@ def sync_detailed(
client: AuthenticatedClient,
body: CreateAnonKeyBody,

) -> Response[AnonKey]:
) -> Response[AnonKey | Error]:
""" Create anon key

Args:
Expand All @@ -83,7 +98,7 @@ def sync_detailed(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AnonKey]
Response[AnonKey | Error]
"""


Expand All @@ -105,7 +120,7 @@ def sync(
client: AuthenticatedClient,
body: CreateAnonKeyBody,

) -> AnonKey | None:
) -> AnonKey | Error | None:
""" Create anon key

Args:
Expand All @@ -117,7 +132,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AnonKey
AnonKey | Error
"""


Expand All @@ -134,7 +149,7 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: CreateAnonKeyBody,

) -> Response[AnonKey]:
) -> Response[AnonKey | Error]:
""" Create anon key

Args:
Expand All @@ -146,7 +161,7 @@ async def asyncio_detailed(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AnonKey]
Response[AnonKey | Error]
"""


Expand All @@ -168,7 +183,7 @@ async def asyncio(
client: AuthenticatedClient,
body: CreateAnonKeyBody,

) -> AnonKey | None:
) -> AnonKey | Error | None:
""" Create anon key

Args:
Expand All @@ -180,7 +195,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AnonKey
AnonKey | Error
"""


Expand Down
28 changes: 18 additions & 10 deletions src/volcano_sdk/_generated/api/anon_keys/regenerate_anon_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from ... import errors

from ...models.anon_key import AnonKey
from ...models.error import Error
from typing import cast
from uuid import UUID

Expand All @@ -35,21 +36,28 @@ def request_kwargs(



def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AnonKey | None:
def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AnonKey | Error | None:
if response.status_code == 200:
response_200 = AnonKey.from_dict(response.json())



return response_200

if response.status_code == 404:
response_404 = Error.from_dict(response.json())



return response_404

if client.raise_on_unexpected_status:
raise errors.UnexpectedStatus(response.status_code, response.content)
else:
return None


def build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AnonKey]:
def build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AnonKey | Error]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
Expand All @@ -64,7 +72,7 @@ def sync_detailed(
*,
client: AuthenticatedClient,

) -> Response[AnonKey]:
) -> Response[AnonKey | Error]:
""" Regenerate anon key

Generate new JWT value for existing key
Expand All @@ -78,7 +86,7 @@ def sync_detailed(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AnonKey]
Response[AnonKey | Error]
"""


Expand All @@ -100,7 +108,7 @@ def sync(
*,
client: AuthenticatedClient,

) -> AnonKey | None:
) -> AnonKey | Error | None:
""" Regenerate anon key

Generate new JWT value for existing key
Expand All @@ -114,7 +122,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AnonKey
AnonKey | Error
"""


Expand All @@ -131,7 +139,7 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient,

) -> Response[AnonKey]:
) -> Response[AnonKey | Error]:
""" Regenerate anon key

Generate new JWT value for existing key
Expand All @@ -145,7 +153,7 @@ async def asyncio_detailed(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[AnonKey]
Response[AnonKey | Error]
"""


Expand All @@ -167,7 +175,7 @@ async def asyncio(
*,
client: AuthenticatedClient,

) -> AnonKey | None:
) -> AnonKey | Error | None:
""" Regenerate anon key

Generate new JWT value for existing key
Expand All @@ -181,7 +189,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
AnonKey
AnonKey | Error
"""


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
return response_403

if response.status_code == 404:
response_404 = cast(Any, None)
response_404 = Error.from_dict(response.json())



return response_404

if response.status_code == 500:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from ...types import Response, UNSET
from ... import errors

from ...models.email_template import EmailTemplate
from ...models.default_email_template import DefaultEmailTemplate
from ...models.error import Error
from ...models.get_default_email_template_type import check_get_default_email_template_type
from ...models.get_default_email_template_type import GetDefaultEmailTemplateType
from typing import cast
Expand All @@ -35,16 +36,19 @@ def request_kwargs(



def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | EmailTemplate | None:
def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DefaultEmailTemplate | Error | None:
if response.status_code == 200:
response_200 = EmailTemplate.from_dict(response.json())
response_200 = DefaultEmailTemplate.from_dict(response.json())



return response_200

if response.status_code == 404:
response_404 = cast(Any, None)
response_404 = Error.from_dict(response.json())



return response_404

if client.raise_on_unexpected_status:
Expand All @@ -53,7 +57,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res
return None


def build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | EmailTemplate]:
def build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DefaultEmailTemplate | Error]:
return Response(
status_code=HTTPStatus(response.status_code),
content=response.content,
Expand All @@ -67,7 +71,7 @@ def sync_detailed(
*,
client: AuthenticatedClient | Client,

) -> Response[Any | EmailTemplate]:
) -> Response[DefaultEmailTemplate | Error]:
""" Get default email template by type

Args:
Expand All @@ -78,7 +82,7 @@ def sync_detailed(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[Any | EmailTemplate]
Response[DefaultEmailTemplate | Error]
"""


Expand All @@ -98,7 +102,7 @@ def sync(
*,
client: AuthenticatedClient | Client,

) -> Any | EmailTemplate | None:
) -> DefaultEmailTemplate | Error | None:
""" Get default email template by type

Args:
Expand All @@ -109,7 +113,7 @@ def sync(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Any | EmailTemplate
DefaultEmailTemplate | Error
"""


Expand All @@ -124,7 +128,7 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient | Client,

) -> Response[Any | EmailTemplate]:
) -> Response[DefaultEmailTemplate | Error]:
""" Get default email template by type

Args:
Expand All @@ -135,7 +139,7 @@ async def asyncio_detailed(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Response[Any | EmailTemplate]
Response[DefaultEmailTemplate | Error]
"""


Expand All @@ -155,7 +159,7 @@ async def asyncio(
*,
client: AuthenticatedClient | Client,

) -> Any | EmailTemplate | None:
) -> DefaultEmailTemplate | Error | None:
""" Get default email template by type

Args:
Expand All @@ -166,7 +170,7 @@ async def asyncio(
httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:
Any | EmailTemplate
DefaultEmailTemplate | Error
"""


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ def sync_detailed(
subject or a blank message. Also rejects with 400 if
`email_enabled=false`, `smtp_host` is empty, or the saved
`smtp_password` can't be read and must be set again.
Sender values with interior line breaks return 400 before SMTP delivery.
Rendered override subjects containing a line break have outer whitespace
trimmed; any remaining interior line break returns 400 before delivery.

Args:
id (UUID):
Expand Down Expand Up @@ -162,6 +165,9 @@ def sync(
subject or a blank message. Also rejects with 400 if
`email_enabled=false`, `smtp_host` is empty, or the saved
`smtp_password` can't be read and must be set again.
Sender values with interior line breaks return 400 before SMTP delivery.
Rendered override subjects containing a line break have outer whitespace
trimmed; any remaining interior line break returns 400 before delivery.

Args:
id (UUID):
Expand Down Expand Up @@ -212,6 +218,9 @@ async def asyncio_detailed(
subject or a blank message. Also rejects with 400 if
`email_enabled=false`, `smtp_host` is empty, or the saved
`smtp_password` can't be read and must be set again.
Sender values with interior line breaks return 400 before SMTP delivery.
Rendered override subjects containing a line break have outer whitespace
trimmed; any remaining interior line break returns 400 before delivery.

Args:
id (UUID):
Expand Down Expand Up @@ -267,6 +276,9 @@ async def asyncio(
subject or a blank message. Also rejects with 400 if
`email_enabled=false`, `smtp_host` is empty, or the saved
`smtp_password` can't be read and must be set again.
Sender values with interior line breaks return 400 before SMTP delivery.
Rendered override subjects containing a line break have outer whitespace
trimmed; any remaining interior line break returns 400 before delivery.

Args:
id (UUID):
Expand Down
Loading
Loading