From 263d677a889cd3cb118d2d144161365b35951431 Mon Sep 17 00:00:00 2001 From: nuonbot Date: Sat, 24 Oct 2026 14:06:08 +0000 Subject: [PATCH] ci: generate from api 0.19.1261 --- nuon/api/vcs/write_vcs_event.py | 179 ------------------------------ nuon/models/service_cli_config.py | 9 ++ pyproject.toml | 2 +- version.txt | 2 +- 4 files changed, 11 insertions(+), 181 deletions(-) delete mode 100644 nuon/api/vcs/write_vcs_event.py diff --git a/nuon/api/vcs/write_vcs_event.py b/nuon/api/vcs/write_vcs_event.py deleted file mode 100644 index 131815e8..00000000 --- a/nuon/api/vcs/write_vcs_event.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any -from urllib.parse import quote - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.app_github_event import AppGithubEvent -from ...models.stderr_err_response import StderrErrResponse -from ...types import Response - - -def _get_kwargs( - vcs_connection_id: str, -) -> dict[str, Any]: - - _kwargs: dict[str, Any] = { - "method": "post", - "url": "/v1/vcs/{vcs_connection_id}/events".format( - vcs_connection_id=quote(str(vcs_connection_id), safe=""), - ), - } - - return _kwargs - - -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AppGithubEvent | StderrErrResponse | None: - if response.status_code == 200: - response_200 = AppGithubEvent.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 == 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[AppGithubEvent | StderrErrResponse]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - vcs_connection_id: str, - *, - client: AuthenticatedClient | Client, -) -> Response[AppGithubEvent | StderrErrResponse]: - """Write a VCS webhook event - - Writes incoming webhook events for a VCS connection (legacy endpoint) - - Args: - vcs_connection_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[AppGithubEvent | StderrErrResponse] - """ - - kwargs = _get_kwargs( - vcs_connection_id=vcs_connection_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - vcs_connection_id: str, - *, - client: AuthenticatedClient | Client, -) -> AppGithubEvent | StderrErrResponse | None: - """Write a VCS webhook event - - Writes incoming webhook events for a VCS connection (legacy endpoint) - - Args: - vcs_connection_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - AppGithubEvent | StderrErrResponse - """ - - return sync_detailed( - vcs_connection_id=vcs_connection_id, - client=client, - ).parsed - - -async def asyncio_detailed( - vcs_connection_id: str, - *, - client: AuthenticatedClient | Client, -) -> Response[AppGithubEvent | StderrErrResponse]: - """Write a VCS webhook event - - Writes incoming webhook events for a VCS connection (legacy endpoint) - - Args: - vcs_connection_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[AppGithubEvent | StderrErrResponse] - """ - - kwargs = _get_kwargs( - vcs_connection_id=vcs_connection_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - vcs_connection_id: str, - *, - client: AuthenticatedClient | Client, -) -> AppGithubEvent | StderrErrResponse | None: - """Write a VCS webhook event - - Writes incoming webhook events for a VCS connection (legacy endpoint) - - Args: - vcs_connection_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - AppGithubEvent | StderrErrResponse - """ - - return ( - await asyncio_detailed( - vcs_connection_id=vcs_connection_id, - client=client, - ) - ).parsed diff --git a/nuon/models/service_cli_config.py b/nuon/models/service_cli_config.py index ec1d6f4d..3fc3a132 100644 --- a/nuon/models/service_cli_config.py +++ b/nuon/models/service_cli_config.py @@ -19,6 +19,7 @@ class ServiceCLIConfig: auth_client_id (str | Unset): auth_domain (str | Unset): dashboard_url (str | Unset): + min_cli_version (str | Unset): nuon_auth_enabled (bool | Unset): oidc_federation_enabled (bool | Unset): root_domain (str | Unset): @@ -28,6 +29,7 @@ class ServiceCLIConfig: auth_client_id: str | Unset = UNSET auth_domain: str | Unset = UNSET dashboard_url: str | Unset = UNSET + min_cli_version: str | Unset = UNSET nuon_auth_enabled: bool | Unset = UNSET oidc_federation_enabled: bool | Unset = UNSET root_domain: str | Unset = UNSET @@ -42,6 +44,8 @@ def to_dict(self) -> dict[str, Any]: dashboard_url = self.dashboard_url + min_cli_version = self.min_cli_version + nuon_auth_enabled = self.nuon_auth_enabled oidc_federation_enabled = self.oidc_federation_enabled @@ -59,6 +63,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["auth_domain"] = auth_domain if dashboard_url is not UNSET: field_dict["dashboard_url"] = dashboard_url + if min_cli_version is not UNSET: + field_dict["min_cli_version"] = min_cli_version if nuon_auth_enabled is not UNSET: field_dict["nuon_auth_enabled"] = nuon_auth_enabled if oidc_federation_enabled is not UNSET: @@ -79,6 +85,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: dashboard_url = d.pop("dashboard_url", UNSET) + min_cli_version = d.pop("min_cli_version", UNSET) + nuon_auth_enabled = d.pop("nuon_auth_enabled", UNSET) oidc_federation_enabled = d.pop("oidc_federation_enabled", UNSET) @@ -90,6 +98,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: auth_client_id=auth_client_id, auth_domain=auth_domain, dashboard_url=dashboard_url, + min_cli_version=min_cli_version, nuon_auth_enabled=nuon_auth_enabled, oidc_federation_enabled=oidc_federation_enabled, root_domain=root_domain, diff --git a/pyproject.toml b/pyproject.toml index 7bdb36a7..231b70cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nuon" -version = "0.19.1260" +version = "0.19.1261" description = "A client library for accessing Nuon" authors = [] requires-python = ">=3.11" diff --git a/version.txt b/version.txt index 2df6a5d0..cc4ffe68 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.19.1260 +0.19.1261