From 7de7e3fcd5d17ba5a88711a17a43e9163e687c02 Mon Sep 17 00:00:00 2001 From: nuonbot Date: Thu, 13 Aug 2026 11:41:29 +0000 Subject: [PATCH] ci: generate from api 0.19.1120 --- nuon/api/accounts/create_static_token.py | 50 +++++++++++-------- nuon/api/accounts/delete_static_token.py | 10 ++-- nuon/api/apps/get_app_branch_runs.py | 15 ++++++ nuon/models/app_vcs_connection_commit.py | 9 ++++ .../service_create_static_token_request.py | 14 +++++- pyproject.toml | 2 +- version.txt | 2 +- 7 files changed, 74 insertions(+), 28 deletions(-) diff --git a/nuon/api/accounts/create_static_token.py b/nuon/api/accounts/create_static_token.py index 2b4d38e6..11bcf784 100644 --- a/nuon/api/accounts/create_static_token.py +++ b/nuon/api/accounts/create_static_token.py @@ -63,12 +63,14 @@ def sync_detailed( client: AuthenticatedClient, body: ServiceCreateStaticTokenRequest, ) -> Response[GithubComNuoncoNuonServicesCtlApiInternalAppAccountsServiceStaticTokenResponse]: - """create a static API token for your org + r"""create a static API token for your org - Creates a long-lived static API token scoped to your current org. Each token gets its own dedicated - service account, and only grants access to the current org. The role param controls the token's - permissions (any role assignable to API tokens; see GET /v1/roles?context=api_token) and defaults to - org_read_only. + Creates a long-lived static API token. By default (token_identity \"service_account\") each token + gets its own dedicated service account and only grants access to the current org; the role param + controls the token's permissions (any role assignable to API tokens; see GET + /v1/roles?context=api_token) and defaults to org_read_only. With token_identity \"personal\" the + token is issued against your own account instead: it uses your account's existing roles, is not + limited to the current org, and the role param must be empty. Args: body (ServiceCreateStaticTokenRequest): @@ -97,12 +99,14 @@ def sync( client: AuthenticatedClient, body: ServiceCreateStaticTokenRequest, ) -> GithubComNuoncoNuonServicesCtlApiInternalAppAccountsServiceStaticTokenResponse | None: - """create a static API token for your org + r"""create a static API token for your org - Creates a long-lived static API token scoped to your current org. Each token gets its own dedicated - service account, and only grants access to the current org. The role param controls the token's - permissions (any role assignable to API tokens; see GET /v1/roles?context=api_token) and defaults to - org_read_only. + Creates a long-lived static API token. By default (token_identity \"service_account\") each token + gets its own dedicated service account and only grants access to the current org; the role param + controls the token's permissions (any role assignable to API tokens; see GET + /v1/roles?context=api_token) and defaults to org_read_only. With token_identity \"personal\" the + token is issued against your own account instead: it uses your account's existing roles, is not + limited to the current org, and the role param must be empty. Args: body (ServiceCreateStaticTokenRequest): @@ -126,12 +130,14 @@ async def asyncio_detailed( client: AuthenticatedClient, body: ServiceCreateStaticTokenRequest, ) -> Response[GithubComNuoncoNuonServicesCtlApiInternalAppAccountsServiceStaticTokenResponse]: - """create a static API token for your org + r"""create a static API token for your org - Creates a long-lived static API token scoped to your current org. Each token gets its own dedicated - service account, and only grants access to the current org. The role param controls the token's - permissions (any role assignable to API tokens; see GET /v1/roles?context=api_token) and defaults to - org_read_only. + Creates a long-lived static API token. By default (token_identity \"service_account\") each token + gets its own dedicated service account and only grants access to the current org; the role param + controls the token's permissions (any role assignable to API tokens; see GET + /v1/roles?context=api_token) and defaults to org_read_only. With token_identity \"personal\" the + token is issued against your own account instead: it uses your account's existing roles, is not + limited to the current org, and the role param must be empty. Args: body (ServiceCreateStaticTokenRequest): @@ -158,12 +164,14 @@ async def asyncio( client: AuthenticatedClient, body: ServiceCreateStaticTokenRequest, ) -> GithubComNuoncoNuonServicesCtlApiInternalAppAccountsServiceStaticTokenResponse | None: - """create a static API token for your org - - Creates a long-lived static API token scoped to your current org. Each token gets its own dedicated - service account, and only grants access to the current org. The role param controls the token's - permissions (any role assignable to API tokens; see GET /v1/roles?context=api_token) and defaults to - org_read_only. + r"""create a static API token for your org + + Creates a long-lived static API token. By default (token_identity \"service_account\") each token + gets its own dedicated service account and only grants access to the current org; the role param + controls the token's permissions (any role assignable to API tokens; see GET + /v1/roles?context=api_token) and defaults to org_read_only. With token_identity \"personal\" the + token is issued against your own account instead: it uses your account's existing roles, is not + limited to the current org, and the role param must be empty. Args: body (ServiceCreateStaticTokenRequest): diff --git a/nuon/api/accounts/delete_static_token.py b/nuon/api/accounts/delete_static_token.py index 743e5d1c..655cc0a7 100644 --- a/nuon/api/accounts/delete_static_token.py +++ b/nuon/api/accounts/delete_static_token.py @@ -49,8 +49,9 @@ def sync_detailed( ) -> Response[Any]: """delete a static API token - Deletes a static API token belonging to your current org, along with its dedicated service account. - Once deleted, the token can no longer be used to access the API. + Deletes a static API token belonging to your current org. For service account tokens, the dedicated + service account is deleted as well; for personal tokens, only the token is deleted and your account + is untouched. Once deleted, the token can no longer be used to access the API. Args: token_id (str): @@ -81,8 +82,9 @@ async def asyncio_detailed( ) -> Response[Any]: """delete a static API token - Deletes a static API token belonging to your current org, along with its dedicated service account. - Once deleted, the token can no longer be used to access the API. + Deletes a static API token belonging to your current org. For service account tokens, the dedicated + service account is deleted as well; for personal tokens, only the token is deleted and your account + is untouched. Once deleted, the token can no longer be used to access the API. Args: token_id (str): diff --git a/nuon/api/apps/get_app_branch_runs.py b/nuon/api/apps/get_app_branch_runs.py index 03a4acf5..2d73cd88 100644 --- a/nuon/api/apps/get_app_branch_runs.py +++ b/nuon/api/apps/get_app_branch_runs.py @@ -18,6 +18,7 @@ def _get_kwargs( offset: int | Unset = 0, limit: int | Unset = 10, page: int | Unset = 0, + planonly: bool | Unset = True, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -28,6 +29,8 @@ def _get_kwargs( params["page"] = page + params["planonly"] = planonly + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: dict[str, Any] = { @@ -105,6 +108,7 @@ def sync_detailed( offset: int | Unset = 0, limit: int | Unset = 10, page: int | Unset = 0, + planonly: bool | Unset = True, ) -> Response[StderrErrResponse | list[AppWorkflow]]: """get app branch workflow runs @@ -116,6 +120,7 @@ def sync_detailed( offset (int | Unset): Default: 0. limit (int | Unset): Default: 10. page (int | Unset): Default: 0. + planonly (bool | Unset): Default: True. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -131,6 +136,7 @@ def sync_detailed( offset=offset, limit=limit, page=page, + planonly=planonly, ) response = client.get_httpx_client().request( @@ -148,6 +154,7 @@ def sync( offset: int | Unset = 0, limit: int | Unset = 10, page: int | Unset = 0, + planonly: bool | Unset = True, ) -> StderrErrResponse | list[AppWorkflow] | None: """get app branch workflow runs @@ -159,6 +166,7 @@ def sync( offset (int | Unset): Default: 0. limit (int | Unset): Default: 10. page (int | Unset): Default: 0. + planonly (bool | Unset): Default: True. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -175,6 +183,7 @@ def sync( offset=offset, limit=limit, page=page, + planonly=planonly, ).parsed @@ -186,6 +195,7 @@ async def asyncio_detailed( offset: int | Unset = 0, limit: int | Unset = 10, page: int | Unset = 0, + planonly: bool | Unset = True, ) -> Response[StderrErrResponse | list[AppWorkflow]]: """get app branch workflow runs @@ -197,6 +207,7 @@ async def asyncio_detailed( offset (int | Unset): Default: 0. limit (int | Unset): Default: 10. page (int | Unset): Default: 0. + planonly (bool | Unset): Default: True. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -212,6 +223,7 @@ async def asyncio_detailed( offset=offset, limit=limit, page=page, + planonly=planonly, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -227,6 +239,7 @@ async def asyncio( offset: int | Unset = 0, limit: int | Unset = 10, page: int | Unset = 0, + planonly: bool | Unset = True, ) -> StderrErrResponse | list[AppWorkflow] | None: """get app branch workflow runs @@ -238,6 +251,7 @@ async def asyncio( offset (int | Unset): Default: 0. limit (int | Unset): Default: 10. page (int | Unset): Default: 0. + planonly (bool | Unset): Default: True. Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -255,5 +269,6 @@ async def asyncio( offset=offset, limit=limit, page=page, + planonly=planonly, ) ).parsed diff --git a/nuon/models/app_vcs_connection_commit.py b/nuon/models/app_vcs_connection_commit.py index a14f57ab..e06e0b19 100644 --- a/nuon/models/app_vcs_connection_commit.py +++ b/nuon/models/app_vcs_connection_commit.py @@ -15,6 +15,7 @@ class AppVCSConnectionCommit: """ Attributes: + author_avatar_url (str | Unset): author_email (str | Unset): author_name (str | Unset): created_at (str | Unset): @@ -28,6 +29,7 @@ class AppVCSConnectionCommit: vcs_connection_id (str | Unset): """ + author_avatar_url: str | Unset = UNSET author_email: str | Unset = UNSET author_name: str | Unset = UNSET created_at: str | Unset = UNSET @@ -42,6 +44,8 @@ class AppVCSConnectionCommit: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + author_avatar_url = self.author_avatar_url + author_email = self.author_email author_name = self.author_name @@ -67,6 +71,8 @@ def to_dict(self) -> dict[str, Any]: field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) + if author_avatar_url is not UNSET: + field_dict["author_avatar_url"] = author_avatar_url if author_email is not UNSET: field_dict["author_email"] = author_email if author_name is not UNSET: @@ -95,6 +101,8 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) + author_avatar_url = d.pop("author_avatar_url", UNSET) + author_email = d.pop("author_email", UNSET) author_name = d.pop("author_name", UNSET) @@ -118,6 +126,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: vcs_connection_id = d.pop("vcs_connection_id", UNSET) app_vcs_connection_commit = cls( + author_avatar_url=author_avatar_url, author_email=author_email, author_name=author_name, created_at=created_at, diff --git a/nuon/models/service_create_static_token_request.py b/nuon/models/service_create_static_token_request.py index 1f12ae6a..cbfc5a44 100644 --- a/nuon/models/service_create_static_token_request.py +++ b/nuon/models/service_create_static_token_request.py @@ -18,12 +18,17 @@ class ServiceCreateStaticTokenRequest: name (str): human-friendly name to identify the token later duration (str | Unset): defaults to one year Default: '8760h'. role (str | Unset): org role granted to the token. must be assignable to API tokens; see - GET /v1/roles?context=api_token. defaults to org_read_only. + GET /v1/roles?context=api_token. defaults to org_read_only. must be + empty for personal tokens. + token_identity (str | Unset): "service_account" (default) creates a dedicated service account with + the given role; "personal" issues the token against your own account + and its existing roles, across all your orgs. """ name: str duration: str | Unset = "8760h" role: str | Unset = UNSET + token_identity: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -33,6 +38,8 @@ def to_dict(self) -> dict[str, Any]: role = self.role + token_identity = self.token_identity + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -44,6 +51,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["duration"] = duration if role is not UNSET: field_dict["role"] = role + if token_identity is not UNSET: + field_dict["token_identity"] = token_identity return field_dict @@ -56,10 +65,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: role = d.pop("role", UNSET) + token_identity = d.pop("token_identity", UNSET) + service_create_static_token_request = cls( name=name, duration=duration, role=role, + token_identity=token_identity, ) service_create_static_token_request.additional_properties = d diff --git a/pyproject.toml b/pyproject.toml index c3c9faed..c5159d90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nuon" -version = "0.19.1119" +version = "0.19.1120" description = "A client library for accessing Nuon" authors = [] requires-python = ">=3.11" diff --git a/version.txt b/version.txt index ed113368..dcffb36d 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.19.1119 +0.19.1120