From 04a3b7373221292a882e62436ffb38cd6fa79c96 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Wed, 24 May 2023 13:55:21 +0000 Subject: [PATCH] feat: update generated APIs --- .../src/api/secret/v1alpha1/api.gen.ts | 16 +++++++++----- .../src/api/secret/v1alpha1/types.gen.ts | 22 ++++++++++++++++++- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/packages/clients/src/api/secret/v1alpha1/api.gen.ts b/packages/clients/src/api/secret/v1alpha1/api.gen.ts index 3533f64e5..c1028467a 100644 --- a/packages/clients/src/api/secret/v1alpha1/api.gen.ts +++ b/packages/clients/src/api/secret/v1alpha1/api.gen.ts @@ -104,7 +104,7 @@ export class API extends ParentAPI { /** * Get metadata using the secret's ID. Retrieve the metadata of a secret - * specified by the `region` and the `secret_id` parameters. + * specified by the `region`, `secret_id` and `project_id` parameters. * * @param request - The request {@link GetSecretByNameRequest} * @returns A Promise of Secret @@ -120,6 +120,7 @@ export class API extends ParentAPI { 'secretName', request.secretName, )}`, + urlParams: urlParams(['project_id', request.projectId]), }, unmarshalSecret, ) @@ -293,7 +294,7 @@ export class API extends ParentAPI { /** * Get metadata of a secret's version using the secret's name. Retrieve the * metadata of a secret's given version specified by the `region`, - * `secret_name` and `revision` parameters. + * `secret_name`, `revision` and `project_id` parameters. * * @param request - The request {@link GetSecretVersionByNameRequest} * @returns A Promise of SecretVersion @@ -309,6 +310,7 @@ export class API extends ParentAPI { 'secretName', request.secretName, )}/versions/${validatePathParam('revision', request.revision)}`, + urlParams: urlParams(['project_id', request.projectId]), }, unmarshalSecretVersion, ) @@ -391,6 +393,7 @@ export class API extends ParentAPI { 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], + ['project_id', request.projectId], ['status', request.status], ), }, @@ -399,8 +402,8 @@ export class API extends ParentAPI { /** * List versions of a secret using the secret's name. Retrieve the list of a - * given secret's versions specified by the `secret_name` and `region` - * parameters. + * given secret's versions specified by the `secret_name`,`region` and + * `project_id` parameters. * * @param request - The request {@link ListSecretVersionsByNameRequest} * @returns A Promise of ListSecretVersionsResponse @@ -487,8 +490,8 @@ export class API extends ParentAPI { /** * Access a secret's version using the secret's name. Access sensitive data in - * a secret's version specified by the `region`, `secret_name` and `revision` - * parameters. + * a secret's version specified by the `region`, `secret_name`, `revision` and + * `project_id` parameters. * * @param request - The request {@link AccessSecretVersionByNameRequest} * @returns A Promise of AccessSecretVersionResponse @@ -506,6 +509,7 @@ export class API extends ParentAPI { 'secretName', request.secretName, )}/versions/${validatePathParam('revision', request.revision)}/access`, + urlParams: urlParams(['project_id', request.projectId]), }, unmarshalAccessSecretVersionResponse, ) diff --git a/packages/clients/src/api/secret/v1alpha1/types.gen.ts b/packages/clients/src/api/secret/v1alpha1/types.gen.ts index b768cd4e0..c59d21a14 100644 --- a/packages/clients/src/api/secret/v1alpha1/types.gen.ts +++ b/packages/clients/src/api/secret/v1alpha1/types.gen.ts @@ -155,6 +155,11 @@ export type GetSecretByNameRequest = { region?: Region /** Name of the secret. */ secretName: string + /** + * ID of the Project to target. (Optional.) If not specified, Secret Manager + * will look for the secret in all Projects. + */ + projectId?: string } export type UpdateSecretRequest = { @@ -229,7 +234,7 @@ export type CreateSecretVersionRequest = { /** Description of the version. */ description?: string /** - * Disable the previous secret version. Optional. If there is no previous + * Disable the previous secret version. (Optional.) If there is no previous * version or if the previous version was already disabled, does nothing. */ disablePrevious?: boolean @@ -308,6 +313,11 @@ export type GetSecretVersionByNameRequest = { * subsequent revisions augment by 1. Value can be a number or "latest". */ revision: string + /** + * ID of the Project to target. (Optional.) If not specified, Secret Manager + * will look for the secret version in all Projects. + */ + projectId?: string } export type UpdateSecretVersionRequest = { @@ -353,6 +363,11 @@ export type ListSecretVersionsByNameRequest = { pageSize?: number /** Filter results by status. */ status?: SecretVersionStatus[] + /** + * ID of the Project to target. (Optional.) If not specified, Secret Manager + * will look for the secret in all Projects. + */ + projectId?: string } export type EnableSecretVersionRequest = { @@ -413,6 +428,11 @@ export type AccessSecretVersionByNameRequest = { * subsequent revisions augment by 1. Value can be a number or "latest". */ revision: string + /** + * ID of the Project to target. (Optional.) If not specified, Secret Manager + * will look for the secret version in all Projects. + */ + projectId?: string } export type DestroySecretVersionRequest = {