From 0a2393a3adae02155acfbe77aed7d2417154497e Mon Sep 17 00:00:00 2001 From: nuonbot Date: Fri, 5 Jun 2026 12:48:02 +0000 Subject: [PATCH] ci: generate from api 0.19.1000 --- nuon/api/general/get_config_schema.py | 4 ++ nuon/api/runbooks/create_runbook_config.py | 50 ++++++++++++--- nuon/api/runbooks/create_runbook_run.py | 48 ++++++++++++--- nuon/api/runbooks/delete_runbook.py | 50 ++++++++++++--- nuon/api/runbooks/get_install_runbook.py | 50 ++++++++++++--- nuon/api/runbooks/get_install_runbook_run.py | 48 ++++++++++++--- nuon/api/runbooks/get_install_runbook_runs.py | 61 ++++++++++++++++--- nuon/api/runbooks/get_install_runbooks.py | 46 +++++++++++--- nuon/api/runbooks/get_runbook.py | 50 ++++++++++++--- nuon/api/runbooks/get_runbook_configs.py | 48 ++++++++++++--- nuon/api/runbooks/get_runbooks.py | 50 ++++++++++++--- pyproject.toml | 2 +- version.txt | 2 +- 13 files changed, 407 insertions(+), 102 deletions(-) diff --git a/nuon/api/general/get_config_schema.py b/nuon/api/general/get_config_schema.py index fdf539cf..ae82d9e6 100644 --- a/nuon/api/general/get_config_schema.py +++ b/nuon/api/general/get_config_schema.py @@ -106,6 +106,7 @@ def sync_detailed( - container_image - helm - terraform + - runbook - job Args: @@ -158,6 +159,7 @@ def sync( - container_image - helm - terraform + - runbook - job Args: @@ -205,6 +207,7 @@ async def asyncio_detailed( - container_image - helm - terraform + - runbook - job Args: @@ -255,6 +258,7 @@ async def asyncio( - container_image - helm - terraform + - runbook - job Args: diff --git a/nuon/api/runbooks/create_runbook_config.py b/nuon/api/runbooks/create_runbook_config.py index 1637a0ba..c634af5e 100644 --- a/nuon/api/runbooks/create_runbook_config.py +++ b/nuon/api/runbooks/create_runbook_config.py @@ -8,6 +8,7 @@ from ...client import AuthenticatedClient, Client from ...models.app_runbook_config import AppRunbookConfig from ...models.service_create_runbook_config_request import ServiceCreateRunbookConfigRequest +from ...models.stderr_err_response import StderrErrResponse from ...types import Response @@ -35,19 +36,48 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AppRunbookConfig | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppRunbookConfig | StderrErrResponse | None: if response.status_code == 201: response_201 = AppRunbookConfig.from_dict(response.json()) return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + 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[AppRunbookConfig]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppRunbookConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -62,7 +92,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateRunbookConfigRequest, -) -> Response[AppRunbookConfig]: +) -> Response[AppRunbookConfig | StderrErrResponse]: """create a runbook config Args: @@ -75,7 +105,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AppRunbookConfig] + Response[AppRunbookConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -97,7 +127,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateRunbookConfigRequest, -) -> AppRunbookConfig | None: +) -> AppRunbookConfig | StderrErrResponse | None: """create a runbook config Args: @@ -110,7 +140,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AppRunbookConfig + AppRunbookConfig | StderrErrResponse """ return sync_detailed( @@ -127,7 +157,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateRunbookConfigRequest, -) -> Response[AppRunbookConfig]: +) -> Response[AppRunbookConfig | StderrErrResponse]: """create a runbook config Args: @@ -140,7 +170,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AppRunbookConfig] + Response[AppRunbookConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -160,7 +190,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateRunbookConfigRequest, -) -> AppRunbookConfig | None: +) -> AppRunbookConfig | StderrErrResponse | None: """create a runbook config Args: @@ -173,7 +203,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AppRunbookConfig + AppRunbookConfig | StderrErrResponse """ return ( diff --git a/nuon/api/runbooks/create_runbook_run.py b/nuon/api/runbooks/create_runbook_run.py index 95696a20..1f0c511e 100644 --- a/nuon/api/runbooks/create_runbook_run.py +++ b/nuon/api/runbooks/create_runbook_run.py @@ -7,6 +7,7 @@ from ... import errors from ...client import AuthenticatedClient, Client from ...models.app_install_runbook_run import AppInstallRunbookRun +from ...models.stderr_err_response import StderrErrResponse from ...types import Response @@ -26,12 +27,39 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AppInstallRunbookRun | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallRunbookRun | StderrErrResponse | None: if response.status_code == 201: response_201 = AppInstallRunbookRun.from_dict(response.json()) return response_201 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -40,7 +68,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AppInstallRunbookRun]: +) -> Response[AppInstallRunbookRun | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -54,7 +82,7 @@ def sync_detailed( runbook_id: str, *, client: AuthenticatedClient, -) -> Response[AppInstallRunbookRun]: +) -> Response[AppInstallRunbookRun | StderrErrResponse]: """run a runbook on an install Args: @@ -66,7 +94,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AppInstallRunbookRun] + Response[AppInstallRunbookRun | StderrErrResponse] """ kwargs = _get_kwargs( @@ -86,7 +114,7 @@ def sync( runbook_id: str, *, client: AuthenticatedClient, -) -> AppInstallRunbookRun | None: +) -> AppInstallRunbookRun | StderrErrResponse | None: """run a runbook on an install Args: @@ -98,7 +126,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AppInstallRunbookRun + AppInstallRunbookRun | StderrErrResponse """ return sync_detailed( @@ -113,7 +141,7 @@ async def asyncio_detailed( runbook_id: str, *, client: AuthenticatedClient, -) -> Response[AppInstallRunbookRun]: +) -> Response[AppInstallRunbookRun | StderrErrResponse]: """run a runbook on an install Args: @@ -125,7 +153,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AppInstallRunbookRun] + Response[AppInstallRunbookRun | StderrErrResponse] """ kwargs = _get_kwargs( @@ -143,7 +171,7 @@ async def asyncio( runbook_id: str, *, client: AuthenticatedClient, -) -> AppInstallRunbookRun | None: +) -> AppInstallRunbookRun | StderrErrResponse | None: """run a runbook on an install Args: @@ -155,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AppInstallRunbookRun + AppInstallRunbookRun | StderrErrResponse """ return ( diff --git a/nuon/api/runbooks/delete_runbook.py b/nuon/api/runbooks/delete_runbook.py index 30f4d4d0..acc6a01c 100644 --- a/nuon/api/runbooks/delete_runbook.py +++ b/nuon/api/runbooks/delete_runbook.py @@ -6,6 +6,7 @@ from ... import errors from ...client import AuthenticatedClient, Client +from ...models.stderr_err_response import StderrErrResponse from ...types import Response @@ -25,18 +26,47 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> bool | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: if response.status_code == 200: response_200 = cast(bool, response.json()) return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + 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[bool]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -50,7 +80,7 @@ def sync_detailed( runbook_id: str, *, client: AuthenticatedClient, -) -> Response[bool]: +) -> Response[StderrErrResponse | bool]: """delete a runbook Args: @@ -62,7 +92,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[bool] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -82,7 +112,7 @@ def sync( runbook_id: str, *, client: AuthenticatedClient, -) -> bool | None: +) -> StderrErrResponse | bool | None: """delete a runbook Args: @@ -94,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - bool + StderrErrResponse | bool """ return sync_detailed( @@ -109,7 +139,7 @@ async def asyncio_detailed( runbook_id: str, *, client: AuthenticatedClient, -) -> Response[bool]: +) -> Response[StderrErrResponse | bool]: """delete a runbook Args: @@ -121,7 +151,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[bool] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -139,7 +169,7 @@ async def asyncio( runbook_id: str, *, client: AuthenticatedClient, -) -> bool | None: +) -> StderrErrResponse | bool | None: """delete a runbook Args: @@ -151,7 +181,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - bool + StderrErrResponse | bool """ return ( diff --git a/nuon/api/runbooks/get_install_runbook.py b/nuon/api/runbooks/get_install_runbook.py index 6654b810..89d3a987 100644 --- a/nuon/api/runbooks/get_install_runbook.py +++ b/nuon/api/runbooks/get_install_runbook.py @@ -7,6 +7,7 @@ from ... import errors from ...client import AuthenticatedClient, Client from ...models.app_install_runbook import AppInstallRunbook +from ...models.stderr_err_response import StderrErrResponse from ...types import Response @@ -26,19 +27,48 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AppInstallRunbook | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallRunbook | StderrErrResponse | None: if response.status_code == 200: response_200 = AppInstallRunbook.from_dict(response.json()) return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + 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[AppInstallRunbook]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallRunbook | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -52,7 +82,7 @@ def sync_detailed( runbook_id: str, *, client: AuthenticatedClient, -) -> Response[AppInstallRunbook]: +) -> Response[AppInstallRunbook | StderrErrResponse]: """get an install runbook Args: @@ -64,7 +94,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AppInstallRunbook] + Response[AppInstallRunbook | StderrErrResponse] """ kwargs = _get_kwargs( @@ -84,7 +114,7 @@ def sync( runbook_id: str, *, client: AuthenticatedClient, -) -> AppInstallRunbook | None: +) -> AppInstallRunbook | StderrErrResponse | None: """get an install runbook Args: @@ -96,7 +126,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AppInstallRunbook + AppInstallRunbook | StderrErrResponse """ return sync_detailed( @@ -111,7 +141,7 @@ async def asyncio_detailed( runbook_id: str, *, client: AuthenticatedClient, -) -> Response[AppInstallRunbook]: +) -> Response[AppInstallRunbook | StderrErrResponse]: """get an install runbook Args: @@ -123,7 +153,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AppInstallRunbook] + Response[AppInstallRunbook | StderrErrResponse] """ kwargs = _get_kwargs( @@ -141,7 +171,7 @@ async def asyncio( runbook_id: str, *, client: AuthenticatedClient, -) -> AppInstallRunbook | None: +) -> AppInstallRunbook | StderrErrResponse | None: """get an install runbook Args: @@ -153,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AppInstallRunbook + AppInstallRunbook | StderrErrResponse """ return ( diff --git a/nuon/api/runbooks/get_install_runbook_run.py b/nuon/api/runbooks/get_install_runbook_run.py index bf69dca7..a2742364 100644 --- a/nuon/api/runbooks/get_install_runbook_run.py +++ b/nuon/api/runbooks/get_install_runbook_run.py @@ -7,6 +7,7 @@ from ... import errors from ...client import AuthenticatedClient, Client from ...models.app_install_runbook_run import AppInstallRunbookRun +from ...models.stderr_err_response import StderrErrResponse from ...types import Response @@ -26,12 +27,39 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AppInstallRunbookRun | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallRunbookRun | StderrErrResponse | None: if response.status_code == 200: response_200 = AppInstallRunbookRun.from_dict(response.json()) return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -40,7 +68,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AppInstallRunbookRun]: +) -> Response[AppInstallRunbookRun | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -54,7 +82,7 @@ def sync_detailed( run_id: str, *, client: AuthenticatedClient, -) -> Response[AppInstallRunbookRun]: +) -> Response[AppInstallRunbookRun | StderrErrResponse]: """get a runbook run Args: @@ -66,7 +94,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AppInstallRunbookRun] + Response[AppInstallRunbookRun | StderrErrResponse] """ kwargs = _get_kwargs( @@ -86,7 +114,7 @@ def sync( run_id: str, *, client: AuthenticatedClient, -) -> AppInstallRunbookRun | None: +) -> AppInstallRunbookRun | StderrErrResponse | None: """get a runbook run Args: @@ -98,7 +126,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AppInstallRunbookRun + AppInstallRunbookRun | StderrErrResponse """ return sync_detailed( @@ -113,7 +141,7 @@ async def asyncio_detailed( run_id: str, *, client: AuthenticatedClient, -) -> Response[AppInstallRunbookRun]: +) -> Response[AppInstallRunbookRun | StderrErrResponse]: """get a runbook run Args: @@ -125,7 +153,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AppInstallRunbookRun] + Response[AppInstallRunbookRun | StderrErrResponse] """ kwargs = _get_kwargs( @@ -143,7 +171,7 @@ async def asyncio( run_id: str, *, client: AuthenticatedClient, -) -> AppInstallRunbookRun | None: +) -> AppInstallRunbookRun | StderrErrResponse | None: """get a runbook run Args: @@ -155,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AppInstallRunbookRun + AppInstallRunbookRun | StderrErrResponse """ return ( diff --git a/nuon/api/runbooks/get_install_runbook_runs.py b/nuon/api/runbooks/get_install_runbook_runs.py index cd5c5f7f..539a9451 100644 --- a/nuon/api/runbooks/get_install_runbook_runs.py +++ b/nuon/api/runbooks/get_install_runbook_runs.py @@ -7,18 +7,22 @@ from ... import errors from ...client import AuthenticatedClient, Client from ...models.app_install_runbook_run import AppInstallRunbookRun +from ...models.stderr_err_response import StderrErrResponse from ...types import UNSET, Response, Unset def _get_kwargs( install_id: str, *, + runbook_id: str | Unset = UNSET, offset: int | Unset = 0, limit: int | Unset = 10, ) -> dict[str, Any]: params: dict[str, Any] = {} + params["runbook_id"] = runbook_id + params["offset"] = offset params["limit"] = limit @@ -38,7 +42,7 @@ def _get_kwargs( def _parse_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> list[AppInstallRunbookRun] | None: +) -> StderrErrResponse | list[AppInstallRunbookRun] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -49,6 +53,31 @@ def _parse_response( return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -57,7 +86,7 @@ def _parse_response( def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[list[AppInstallRunbookRun]]: +) -> Response[StderrErrResponse | list[AppInstallRunbookRun]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,13 +99,15 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, + runbook_id: str | Unset = UNSET, offset: int | Unset = 0, limit: int | Unset = 10, -) -> Response[list[AppInstallRunbookRun]]: +) -> Response[StderrErrResponse | list[AppInstallRunbookRun]]: """get runbook runs for an install Args: install_id (str): + runbook_id (str | Unset): offset (int | Unset): Default: 0. limit (int | Unset): Default: 10. @@ -85,11 +116,12 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[list[AppInstallRunbookRun]] + Response[StderrErrResponse | list[AppInstallRunbookRun]] """ kwargs = _get_kwargs( install_id=install_id, + runbook_id=runbook_id, offset=offset, limit=limit, ) @@ -105,13 +137,15 @@ def sync( install_id: str, *, client: AuthenticatedClient, + runbook_id: str | Unset = UNSET, offset: int | Unset = 0, limit: int | Unset = 10, -) -> list[AppInstallRunbookRun] | None: +) -> StderrErrResponse | list[AppInstallRunbookRun] | None: """get runbook runs for an install Args: install_id (str): + runbook_id (str | Unset): offset (int | Unset): Default: 0. limit (int | Unset): Default: 10. @@ -120,12 +154,13 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - list[AppInstallRunbookRun] + StderrErrResponse | list[AppInstallRunbookRun] """ return sync_detailed( install_id=install_id, client=client, + runbook_id=runbook_id, offset=offset, limit=limit, ).parsed @@ -135,13 +170,15 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, + runbook_id: str | Unset = UNSET, offset: int | Unset = 0, limit: int | Unset = 10, -) -> Response[list[AppInstallRunbookRun]]: +) -> Response[StderrErrResponse | list[AppInstallRunbookRun]]: """get runbook runs for an install Args: install_id (str): + runbook_id (str | Unset): offset (int | Unset): Default: 0. limit (int | Unset): Default: 10. @@ -150,11 +187,12 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[list[AppInstallRunbookRun]] + Response[StderrErrResponse | list[AppInstallRunbookRun]] """ kwargs = _get_kwargs( install_id=install_id, + runbook_id=runbook_id, offset=offset, limit=limit, ) @@ -168,13 +206,15 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, + runbook_id: str | Unset = UNSET, offset: int | Unset = 0, limit: int | Unset = 10, -) -> list[AppInstallRunbookRun] | None: +) -> StderrErrResponse | list[AppInstallRunbookRun] | None: """get runbook runs for an install Args: install_id (str): + runbook_id (str | Unset): offset (int | Unset): Default: 0. limit (int | Unset): Default: 10. @@ -183,13 +223,14 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - list[AppInstallRunbookRun] + StderrErrResponse | list[AppInstallRunbookRun] """ return ( await asyncio_detailed( install_id=install_id, client=client, + runbook_id=runbook_id, offset=offset, limit=limit, ) diff --git a/nuon/api/runbooks/get_install_runbooks.py b/nuon/api/runbooks/get_install_runbooks.py index 0db75997..4d6a326d 100644 --- a/nuon/api/runbooks/get_install_runbooks.py +++ b/nuon/api/runbooks/get_install_runbooks.py @@ -7,6 +7,7 @@ from ... import errors from ...client import AuthenticatedClient, Client from ...models.app_install_runbook import AppInstallRunbook +from ...models.stderr_err_response import StderrErrResponse from ...types import UNSET, Response, Unset @@ -38,7 +39,7 @@ def _get_kwargs( def _parse_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> list[AppInstallRunbook] | None: +) -> StderrErrResponse | list[AppInstallRunbook] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -49,6 +50,31 @@ def _parse_response( return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -57,7 +83,7 @@ def _parse_response( def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[list[AppInstallRunbook]]: +) -> Response[StderrErrResponse | list[AppInstallRunbook]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,7 +98,7 @@ def sync_detailed( client: AuthenticatedClient, offset: int | Unset = 0, limit: int | Unset = 10, -) -> Response[list[AppInstallRunbook]]: +) -> Response[StderrErrResponse | list[AppInstallRunbook]]: """get runbooks for an install Args: @@ -85,7 +111,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[list[AppInstallRunbook]] + Response[StderrErrResponse | list[AppInstallRunbook]] """ kwargs = _get_kwargs( @@ -107,7 +133,7 @@ def sync( client: AuthenticatedClient, offset: int | Unset = 0, limit: int | Unset = 10, -) -> list[AppInstallRunbook] | None: +) -> StderrErrResponse | list[AppInstallRunbook] | None: """get runbooks for an install Args: @@ -120,7 +146,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - list[AppInstallRunbook] + StderrErrResponse | list[AppInstallRunbook] """ return sync_detailed( @@ -137,7 +163,7 @@ async def asyncio_detailed( client: AuthenticatedClient, offset: int | Unset = 0, limit: int | Unset = 10, -) -> Response[list[AppInstallRunbook]]: +) -> Response[StderrErrResponse | list[AppInstallRunbook]]: """get runbooks for an install Args: @@ -150,7 +176,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[list[AppInstallRunbook]] + Response[StderrErrResponse | list[AppInstallRunbook]] """ kwargs = _get_kwargs( @@ -170,7 +196,7 @@ async def asyncio( client: AuthenticatedClient, offset: int | Unset = 0, limit: int | Unset = 10, -) -> list[AppInstallRunbook] | None: +) -> StderrErrResponse | list[AppInstallRunbook] | None: """get runbooks for an install Args: @@ -183,7 +209,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - list[AppInstallRunbook] + StderrErrResponse | list[AppInstallRunbook] """ return ( diff --git a/nuon/api/runbooks/get_runbook.py b/nuon/api/runbooks/get_runbook.py index ed2d198c..473ce49b 100644 --- a/nuon/api/runbooks/get_runbook.py +++ b/nuon/api/runbooks/get_runbook.py @@ -7,6 +7,7 @@ from ... import errors from ...client import AuthenticatedClient, Client from ...models.app_runbook import AppRunbook +from ...models.stderr_err_response import StderrErrResponse from ...types import Response @@ -26,19 +27,48 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AppRunbook | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppRunbook | StderrErrResponse | None: if response.status_code == 200: response_200 = AppRunbook.from_dict(response.json()) return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + 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[AppRunbook]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppRunbook | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -52,7 +82,7 @@ def sync_detailed( runbook_id: str, *, client: AuthenticatedClient, -) -> Response[AppRunbook]: +) -> Response[AppRunbook | StderrErrResponse]: """get a runbook Args: @@ -64,7 +94,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AppRunbook] + Response[AppRunbook | StderrErrResponse] """ kwargs = _get_kwargs( @@ -84,7 +114,7 @@ def sync( runbook_id: str, *, client: AuthenticatedClient, -) -> AppRunbook | None: +) -> AppRunbook | StderrErrResponse | None: """get a runbook Args: @@ -96,7 +126,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AppRunbook + AppRunbook | StderrErrResponse """ return sync_detailed( @@ -111,7 +141,7 @@ async def asyncio_detailed( runbook_id: str, *, client: AuthenticatedClient, -) -> Response[AppRunbook]: +) -> Response[AppRunbook | StderrErrResponse]: """get a runbook Args: @@ -123,7 +153,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[AppRunbook] + Response[AppRunbook | StderrErrResponse] """ kwargs = _get_kwargs( @@ -141,7 +171,7 @@ async def asyncio( runbook_id: str, *, client: AuthenticatedClient, -) -> AppRunbook | None: +) -> AppRunbook | StderrErrResponse | None: """get a runbook Args: @@ -153,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - AppRunbook + AppRunbook | StderrErrResponse """ return ( diff --git a/nuon/api/runbooks/get_runbook_configs.py b/nuon/api/runbooks/get_runbook_configs.py index c9389992..b51c1aed 100644 --- a/nuon/api/runbooks/get_runbook_configs.py +++ b/nuon/api/runbooks/get_runbook_configs.py @@ -7,6 +7,7 @@ from ... import errors from ...client import AuthenticatedClient, Client from ...models.app_runbook_config import AppRunbookConfig +from ...models.stderr_err_response import StderrErrResponse from ...types import UNSET, Response, Unset @@ -38,7 +39,9 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> list[AppRunbookConfig] | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppRunbookConfig] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -49,6 +52,31 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -57,7 +85,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res def _build_response( *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[list[AppRunbookConfig]]: +) -> Response[StderrErrResponse | list[AppRunbookConfig]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,7 +101,7 @@ def sync_detailed( client: AuthenticatedClient, offset: int | Unset = 0, limit: int | Unset = 10, -) -> Response[list[AppRunbookConfig]]: +) -> Response[StderrErrResponse | list[AppRunbookConfig]]: """get runbook configs Args: @@ -87,7 +115,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[list[AppRunbookConfig]] + Response[StderrErrResponse | list[AppRunbookConfig]] """ kwargs = _get_kwargs( @@ -111,7 +139,7 @@ def sync( client: AuthenticatedClient, offset: int | Unset = 0, limit: int | Unset = 10, -) -> list[AppRunbookConfig] | None: +) -> StderrErrResponse | list[AppRunbookConfig] | None: """get runbook configs Args: @@ -125,7 +153,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - list[AppRunbookConfig] + StderrErrResponse | list[AppRunbookConfig] """ return sync_detailed( @@ -144,7 +172,7 @@ async def asyncio_detailed( client: AuthenticatedClient, offset: int | Unset = 0, limit: int | Unset = 10, -) -> Response[list[AppRunbookConfig]]: +) -> Response[StderrErrResponse | list[AppRunbookConfig]]: """get runbook configs Args: @@ -158,7 +186,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[list[AppRunbookConfig]] + Response[StderrErrResponse | list[AppRunbookConfig]] """ kwargs = _get_kwargs( @@ -180,7 +208,7 @@ async def asyncio( client: AuthenticatedClient, offset: int | Unset = 0, limit: int | Unset = 10, -) -> list[AppRunbookConfig] | None: +) -> StderrErrResponse | list[AppRunbookConfig] | None: """get runbook configs Args: @@ -194,7 +222,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - list[AppRunbookConfig] + StderrErrResponse | list[AppRunbookConfig] """ return ( diff --git a/nuon/api/runbooks/get_runbooks.py b/nuon/api/runbooks/get_runbooks.py index e30b41a8..264235f7 100644 --- a/nuon/api/runbooks/get_runbooks.py +++ b/nuon/api/runbooks/get_runbooks.py @@ -7,6 +7,7 @@ from ... import errors from ...client import AuthenticatedClient, Client from ...models.app_runbook import AppRunbook +from ...models.stderr_err_response import StderrErrResponse from ...types import UNSET, Response, Unset @@ -39,7 +40,9 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> list[AppRunbook] | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppRunbook] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -50,13 +53,40 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return response_200 + if response.status_code == 400: + response_400 = StderrErrResponse.from_dict(response.json()) + + return response_400 + + if response.status_code == 401: + response_401 = StderrErrResponse.from_dict(response.json()) + + return response_401 + + if response.status_code == 403: + response_403 = StderrErrResponse.from_dict(response.json()) + + return response_403 + + if response.status_code == 404: + response_404 = StderrErrResponse.from_dict(response.json()) + + return response_404 + + if response.status_code == 500: + response_500 = StderrErrResponse.from_dict(response.json()) + + return response_500 + 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[list[AppRunbook]]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppRunbook]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,7 +102,7 @@ def sync_detailed( q: str | Unset = UNSET, offset: int | Unset = 0, limit: int | Unset = 10, -) -> Response[list[AppRunbook]]: +) -> Response[StderrErrResponse | list[AppRunbook]]: """get runbooks for an app Args: @@ -86,7 +116,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[list[AppRunbook]] + Response[StderrErrResponse | list[AppRunbook]] """ kwargs = _get_kwargs( @@ -110,7 +140,7 @@ def sync( q: str | Unset = UNSET, offset: int | Unset = 0, limit: int | Unset = 10, -) -> list[AppRunbook] | None: +) -> StderrErrResponse | list[AppRunbook] | None: """get runbooks for an app Args: @@ -124,7 +154,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - list[AppRunbook] + StderrErrResponse | list[AppRunbook] """ return sync_detailed( @@ -143,7 +173,7 @@ async def asyncio_detailed( q: str | Unset = UNSET, offset: int | Unset = 0, limit: int | Unset = 10, -) -> Response[list[AppRunbook]]: +) -> Response[StderrErrResponse | list[AppRunbook]]: """get runbooks for an app Args: @@ -157,7 +187,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[list[AppRunbook]] + Response[StderrErrResponse | list[AppRunbook]] """ kwargs = _get_kwargs( @@ -179,7 +209,7 @@ async def asyncio( q: str | Unset = UNSET, offset: int | Unset = 0, limit: int | Unset = 10, -) -> list[AppRunbook] | None: +) -> StderrErrResponse | list[AppRunbook] | None: """get runbooks for an app Args: @@ -193,7 +223,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - list[AppRunbook] + StderrErrResponse | list[AppRunbook] """ return ( diff --git a/pyproject.toml b/pyproject.toml index cb4b6a71..d1790ded 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nuon" -version = "0.19.999" +version = "0.19.1000" description = "A client library for accessing Nuon" authors = [] requires-python = ">=3.11" diff --git a/version.txt b/version.txt index d0c4e21e..43832d86 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.19.999 +0.19.1000