From 268f52bfc079d2bc7171fed729d426dffa459312 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Thu, 6 Apr 2023 14:24:51 +0000 Subject: [PATCH] feat: update generated APIs --- .../src/api/container/v1beta1/api.gen.ts | 52 ++--- .../api/container/v1beta1/marshalling.gen.ts | 2 +- .../src/api/container/v1beta1/types.gen.ts | 184 +++++++++++++++++- 3 files changed, 207 insertions(+), 31 deletions(-) diff --git a/packages/clients/src/api/container/v1beta1/api.gen.ts b/packages/clients/src/api/container/v1beta1/api.gen.ts index b0cad9026..8f4f16e5f 100644 --- a/packages/clients/src/api/container/v1beta1/api.gen.ts +++ b/packages/clients/src/api/container/v1beta1/api.gen.ts @@ -116,7 +116,7 @@ export class API extends ParentAPI { ) /** - * List all your namespaces. + * List all your namespaces. List all namespaces in a specified region. * * @param request - The request {@link ListNamespacesRequest} * @returns A Promise of ListNamespacesResponse @@ -125,7 +125,7 @@ export class API extends ParentAPI { enrichForPagination('namespaces', this.pageOfListNamespaces, request) /** - * Get a namespace. Get the namespace associated with the given id. + * Get a namespace. Get the namespace associated with the specified ID. * * @param request - The request {@link GetNamespaceRequest} * @returns A Promise of Namespace @@ -163,7 +163,7 @@ export class API extends ParentAPI { ) /** - * Create a new namespace. + * Create a new namespace. Create a new namespace in a specified region. * * @param request - The request {@link CreateNamespaceRequest} * @returns A Promise of Namespace @@ -185,8 +185,8 @@ export class API extends ParentAPI { ) /** - * Update an existing namespace. Update the space associated with the given - * id. + * Update an existing namespace. Update the space associated with the + * specified ID. * * @param request - The request {@link UpdateNamespaceRequest} * @returns A Promise of Namespace @@ -209,7 +209,7 @@ export class API extends ParentAPI { /** * Delete an existing namespace. Delete the namespace associated with the - * given id. + * specified ID. * * @param request - The request {@link DeleteNamespaceRequest} * @returns A Promise of Namespace @@ -251,7 +251,7 @@ export class API extends ParentAPI { ) /** - * List all your containers. + * List all your containers. List all containers for a specified region. * * @param request - The request {@link ListContainersRequest} * @returns A Promise of ListContainersResponse @@ -260,7 +260,7 @@ export class API extends ParentAPI { enrichForPagination('containers', this.pageOfListContainers, request) /** - * Get a container. Get the container associated with the given id. + * Get a container. Get the container associated with the specified ID. * * @param request - The request {@link GetContainerRequest} * @returns A Promise of Container @@ -298,7 +298,7 @@ export class API extends ParentAPI { ) /** - * Create a new container. + * Create a new container. Create a new container in the specified region. * * @param request - The request {@link CreateContainerRequest} * @returns A Promise of Container @@ -321,7 +321,7 @@ export class API extends ParentAPI { /** * Update an existing container. Update the container associated with the - * given id. + * specified ID. * * @param request - The request {@link UpdateContainerRequest} * @returns A Promise of Container @@ -343,7 +343,7 @@ export class API extends ParentAPI { ) /** - * Delete a container. Delete the container associated with the given id. + * Delete a container. Delete the container associated with the specified ID. * * @param request - The request {@link DeleteContainerRequest} * @returns A Promise of Container @@ -361,7 +361,7 @@ export class API extends ParentAPI { ) /** - * Deploy a container. Deploy a container associated with the given id. + * Deploy a container. Deploy a container associated with the specified ID. * * @param request - The request {@link DeployContainerRequest} * @returns A Promise of Container @@ -414,7 +414,7 @@ export class API extends ParentAPI { enrichForPagination('crons', this.pageOfListCrons, request) /** - * Get a cron. Get the cron associated with the given id. + * Get a cron. Get the cron associated with the specified ID. * * @param request - The request {@link GetCronRequest} * @returns A Promise of Cron @@ -473,7 +473,7 @@ export class API extends ParentAPI { ) /** - * Update an existing cron. Update the cron associated with the given id. + * Update an existing cron. Update the cron associated with the specified ID. * * @param request - The request {@link UpdateCronRequest} * @returns A Promise of Cron @@ -495,7 +495,7 @@ export class API extends ParentAPI { ) /** - * Delete an existing cron. Delete the cron associated with the given id. + * Delete an existing cron. Delete the cron associated with the specified ID. * * @param request - The request {@link DeleteCronRequest} * @returns A Promise of Cron @@ -536,7 +536,8 @@ export class API extends ParentAPI { ) /** - * List your container logs. + * List your container logs. List the logs of the container with the specified + * ID. * * @param request - The request {@link ListLogsRequest} * @returns A Promise of ListLogsResponse @@ -566,7 +567,8 @@ export class API extends ParentAPI { ) /** - * List all domain name bindings. + * List all domain name bindings. List all domain name bindings in a specified + * region. * * @param request - The request {@link ListDomainsRequest} * @returns A Promise of ListDomainsResponse @@ -575,7 +577,8 @@ export class API extends ParentAPI { enrichForPagination('domains', this.pageOfListDomains, request) /** - * Get a domain name binding. + * Get a domain name binding. Get a domain name binding for the container with + * the specified ID. * * @param request - The request {@link GetDomainRequest} * @returns A Promise of Domain @@ -613,7 +616,8 @@ export class API extends ParentAPI { ) /** - * Create a domain name binding. + * Create a domain name binding. Create a domain name binding for the + * container with the specified ID. * * @param request - The request {@link CreateDomainRequest} * @returns A Promise of Domain @@ -635,7 +639,8 @@ export class API extends ParentAPI { ) /** - * Delete a domain name binding. + * Delete a domain name binding. Delete the domain name binding with the + * specific ID. * * @param request - The request {@link DeleteDomainRequest} * @returns A Promise of Domain @@ -707,7 +712,7 @@ export class API extends ParentAPI { ) /** - * Get a token. + * Get a token. Get a token with a specified ID. * * @param request - The request {@link GetTokenRequest} * @returns A Promise of Token @@ -767,7 +772,8 @@ export class API extends ParentAPI { ) /** - * List all tokens. + * List all tokens. List all tokens belonging to a specified Organization or + * Project. * * @param request - The request {@link ListTokensRequest} * @returns A Promise of ListTokensResponse @@ -776,7 +782,7 @@ export class API extends ParentAPI { enrichForPagination('tokens', this.pageOfListTokens, request) /** - * Delete a token. + * Delete a token. Delete a token with a specified ID. * * @param request - The request {@link DeleteTokenRequest} * @returns A Promise of Token diff --git a/packages/clients/src/api/container/v1beta1/marshalling.gen.ts b/packages/clients/src/api/container/v1beta1/marshalling.gen.ts index e9563f3a7..c4d8f3ae2 100644 --- a/packages/clients/src/api/container/v1beta1/marshalling.gen.ts +++ b/packages/clients/src/api/container/v1beta1/marshalling.gen.ts @@ -271,7 +271,7 @@ export const marshalCreateContainerRequest = ( max_scale: request.maxScale, memory_limit: request.memoryLimit, min_scale: request.minScale, - name: request.name || randomName('ctnr'), + name: request.name, namespace_id: request.namespaceId, port: request.port, privacy: request.privacy ?? 'unknown_privacy', diff --git a/packages/clients/src/api/container/v1beta1/types.gen.ts b/packages/clients/src/api/container/v1beta1/types.gen.ts index 31ad47b6d..ca943a45d 100644 --- a/packages/clients/src/api/container/v1beta1/types.gen.ts +++ b/packages/clients/src/api/container/v1beta1/types.gen.ts @@ -84,71 +84,112 @@ export type TokenStatus = /** Container. */ export interface Container { + /** UUID of the container. */ id: string + /** Name of the container. */ name: string + /** UUID of the namespace the container belongs to. */ namespaceId: string + /** Status of the container. */ status: ContainerStatus + /** Environment variables of the container. */ environmentVariables: Record + /** Minimum number of instances to scale the container to. */ minScale: number + /** Maximum number of instances to scale the container to. */ maxScale: number + /** Memory limit of the container in MB. */ memoryLimit: number + /** CPU limit of the container. */ cpuLimit: number + /** Processing time limit for the container. */ timeout?: string + /** Last error message of the container. */ errorMessage?: string + /** Privacy setting of the container. */ privacy: ContainerPrivacy + /** Description of the container. */ description?: string + /** + * Name of the registry image (e.g. + * "rg.fr-par.scw.cloud/something/image:tag"). + */ registryImage: string + /** Number of maximum concurrent executions of the container. */ maxConcurrency: number + /** Domain name attributed to the contaioner. */ domainName: string + /** Protocol the container uses. */ protocol: ContainerProtocol + /** Port the container listens on. */ port: number + /** Secret environment variables of the container. */ secretEnvironmentVariables: SecretHashedValue[] /** - * Configure how HTTP and HTTPS requests are handled. Possible values: + * Configuration for the handling of HTTP and HTTPS requests. Possible values: * * - Redirected: Responds to HTTP request with a 301 redirect to ask the clients * to use HTTPS. * - Enabled: Serve both HTTP and HTTPS traffic. */ httpOption: ContainerHttpOption + /** Region in which the container will be deployed. */ region: Region } /** Cron. */ export interface Cron { + /** UUID of the cron. */ id: string + /** UUID of the container invoked by this cron. */ containerId: string + /** UNIX cron shedule. */ schedule: string + /** Arguments to pass with the cron. */ args?: Record + /** Status of the cron. */ status: CronStatus + /** Name of the cron. */ name: string } /** Domain. */ export interface Domain { + /** UUID of the domain. */ id: string + /** Domain assigned to the container. */ hostname: string + /** UUID of the container. */ containerId: string + /** URL (TBD). */ url: string + /** Status of the domain. */ status: DomainStatus + /** Last error message of the domain. */ errorMessage?: string } /** List containers response. */ export interface ListContainersResponse { + /** Array of containers. */ containers: Container[] + /** Total number of containers. */ totalCount: number } /** List crons response. */ export interface ListCronsResponse { + /** Array of crons. */ crons: Cron[] + /** Total number of crons. */ totalCount: number } /** List domains response. */ export interface ListDomainsResponse { + /** Array of domains. */ domains: Domain[] + /** Total number of domains. */ totalCount: number } @@ -160,7 +201,9 @@ export interface ListLogsResponse { /** List namespaces response. */ export interface ListNamespacesResponse { + /** Array of the namespaces. */ namespaces: Namespace[] + /** Total number of namespaces. */ totalCount: number } @@ -184,17 +227,29 @@ export interface Log { /** Namespace. */ export interface Namespace { + /** UUID of the namespace. */ id: string + /** Name of the namespace. */ name: string + /** Environment variables of the namespace. */ environmentVariables: Record + /** UUID of the Organization the namespace belongs to. */ organizationId: string + /** UUID of the Project the namespace belongs to. */ projectId: string + /** Status of the namespace. */ status: NamespaceStatus + /** UUID of the registry namespace. */ registryNamespaceId: string + /** Last error message of the namesace. */ errorMessage?: string + /** Registry endpoint of the namespace. */ registryEndpoint: string + /** Description of the endpoint. */ description?: string + /** Secret environment variables of the namespace. */ secretEnvironmentVariables: SecretHashedValue[] + /** Region in which the namespace will be created. */ region: Region } @@ -210,16 +265,29 @@ export interface SecretHashedValue { /** Token. */ export interface Token { + /** UUID of the token. */ id: string + /** Identifier of the token. */ token: string - /** One-of ('scope'): at most one of 'containerId', 'namespaceId' could be set. */ + /** + * UUID of the container the token belongs to. + * + * One-of ('scope'): at most one of 'containerId', 'namespaceId' could be set. + */ containerId?: string - /** One-of ('scope'): at most one of 'containerId', 'namespaceId' could be set. */ + /** + * UUID of the namespace the token belongs to. + * + * One-of ('scope'): at most one of 'containerId', 'namespaceId' could be set. + */ namespaceId?: string - /** @deprecated */ + /** @deprecated Public key of the token. */ publicKey?: string + /** Status of the token. */ status: TokenStatus + /** Description of the token. */ description?: string + /** Expiry date of the token. */ expiresAt?: Date } @@ -229,11 +297,17 @@ export type ListNamespacesRequest = { * config. */ region?: Region + /** Page number. */ page?: number + /** Number of namespaces per page. */ pageSize?: number + /** Order of the namespaces. */ orderBy?: ListNamespacesRequestOrderBy + /** Name of the namespaces. */ name?: string + /** UUID of the Organization the namespace belongs to. */ organizationId?: string + /** UUID of the Project the namespace belongs to. */ projectId?: string } @@ -243,6 +317,7 @@ export type GetNamespaceRequest = { * config. */ region?: Region + /** UUID of the namespace to get. */ namespaceId: string } @@ -252,10 +327,15 @@ export type CreateNamespaceRequest = { * config. */ region?: Region + /** Name of the namespace to create. */ name?: string + /** Environment variables of the namespace to create. */ environmentVariables?: Record + /** UUID of the Project in which the namespace will be created. */ projectId?: string + /** Description of the namespace to create. */ description?: string + /** Secret environment variables of the namespace to create. */ secretEnvironmentVariables?: Secret[] } @@ -265,9 +345,13 @@ export type UpdateNamespaceRequest = { * config. */ region?: Region + /** UUID of the namespace to update. */ namespaceId: string + /** Environment variables of the namespace to update. */ environmentVariables?: Record + /** Description of the namespace to update. */ description?: string + /** Secret environment variables of the namespace to update. */ secretEnvironmentVariables?: Secret[] } @@ -277,6 +361,7 @@ export type DeleteNamespaceRequest = { * config. */ region?: Region + /** UUID of the namespace to delete. */ namespaceId: string } @@ -286,12 +371,19 @@ export type ListContainersRequest = { * config. */ region?: Region + /** Page number. */ page?: number + /** Number of containers per page. */ pageSize?: number + /** Order of the containers. */ orderBy?: ListContainersRequestOrderBy + /** UUID of the namespace the container belongs to. */ namespaceId: string + /** Name of the container. */ name?: string + /** UUID of the Organization the container belongs to. */ organizationId?: string + /** UUID of the Project the container belongs to. */ projectId?: string } @@ -301,6 +393,7 @@ export type GetContainerRequest = { * config. */ region?: Region + /** UUID of the container to get. */ containerId: string } @@ -310,19 +403,36 @@ export type CreateContainerRequest = { * config. */ region?: Region + /** UUID of the namespace the container belongs to. */ namespaceId: string - name?: string + /** Name of the container. */ + name: string + /** Environment variables of the container. */ environmentVariables?: Record + /** Minimum number of instances to scale the container to. */ minScale?: number + /** Maximum number of instances to scale the container to. */ maxScale?: number + /** Memory limit of the container in MB. */ memoryLimit?: number + /** Processing time limit for the container. */ timeout?: string + /** Privacy setting of the container. */ privacy?: ContainerPrivacy + /** Description of the container. */ description?: string + /** + * Name of the registry image (e.g. + * "rg.fr-par.scw.cloud/something/image:tag"). + */ registryImage?: string + /** Number of maximum concurrent executions of the container. */ maxConcurrency?: number + /** Protocol the container uses. */ protocol?: ContainerProtocol + /** Port the container listens on. */ port?: number + /** Secret environment variables of the container. */ secretEnvironmentVariables?: Secret[] /** * Configure how HTTP and HTTPS requests are handled. Possible values: @@ -340,16 +450,30 @@ export type UpdateContainerRequest = { * config. */ region?: Region + /** UUID of the container to update. */ containerId: string + /** Environment variables of the container. */ environmentVariables?: Record + /** Minimum number of instances to scale the container to. */ minScale?: number + /** Maximum number of instances to scale the container to. */ maxScale?: number + /** Memory limit of the container in MB. */ memoryLimit?: number + /** Processing time limit for the container. */ timeout?: string + /** Defines whether to redeploy failed containers. */ redeploy?: boolean + /** Privacy settings of the container. */ privacy?: ContainerPrivacy + /** Description of the container. */ description?: string + /** + * Name of the registry image (e.g. + * "rg.fr-par.scw.cloud/something/image:tag"). + */ registryImage?: string + /** Number of maximum concurrent executions of the container. */ maxConcurrency?: number protocol?: ContainerProtocol port?: number @@ -370,6 +494,7 @@ export type DeleteContainerRequest = { * config. */ region?: Region + /** UUID of the container to delete. */ containerId: string } @@ -379,6 +504,7 @@ export type DeployContainerRequest = { * config. */ region?: Region + /** UUID of the container to deploy. */ containerId: string } @@ -388,9 +514,13 @@ export type ListCronsRequest = { * config. */ region?: Region + /** Page number. */ page?: number + /** Number of crons per page. */ pageSize?: number + /** Order of the crons. */ orderBy?: ListCronsRequestOrderBy + /** UUID of the container invoked by the cron. */ containerId: string } @@ -400,6 +530,7 @@ export type GetCronRequest = { * config. */ region?: Region + /** UUID of the cron to get. */ cronId: string } @@ -409,9 +540,13 @@ export type CreateCronRequest = { * config. */ region?: Region + /** UUID of the container to invoke by the cron. */ containerId: string + /** UNIX cron shedule. */ schedule: string + /** Arguments to pass with the cron. */ args?: Record + /** Name of the cron to create. */ name?: string } @@ -421,10 +556,15 @@ export type UpdateCronRequest = { * config. */ region?: Region + /** UUID of the cron to update. */ cronId: string + /** UUID of the container invoked by the cron. */ containerId?: string + /** UNIX cron schedule. */ schedule?: string + /** Arguments to pass with the cron. */ args?: Record + /** Name of the cron. */ name?: string } @@ -434,6 +574,7 @@ export type DeleteCronRequest = { * config. */ region?: Region + /** UUID of the cron to delete. */ cronId: string } @@ -443,9 +584,13 @@ export type ListLogsRequest = { * config. */ region?: Region + /** UUID of the container. */ containerId: string + /** Page number. */ page?: number + /** Number of logs per page. */ pageSize?: number + /** Order of the logs. */ orderBy?: ListLogsRequestOrderBy } @@ -455,9 +600,13 @@ export type ListDomainsRequest = { * config. */ region?: Region + /** Page number. */ page?: number + /** Number of domains per page. */ pageSize?: number + /** Order of the domains. */ orderBy?: ListDomainsRequestOrderBy + /** UUID of the container the domain belongs to. */ containerId: string } @@ -467,6 +616,7 @@ export type GetDomainRequest = { * config. */ region?: Region + /** UUID of the domain to get. */ domainId: string } @@ -476,7 +626,9 @@ export type CreateDomainRequest = { * config. */ region?: Region + /** Domain to assign. */ hostname: string + /** UUID of the container to assign the domain to. */ containerId: string } @@ -486,6 +638,7 @@ export type DeleteDomainRequest = { * config. */ region?: Region + /** UUID of the domain to delete. */ domainId: string } @@ -508,11 +661,21 @@ export type CreateTokenRequest = { * config. */ region?: Region - /** One-of ('scope'): at most one of 'containerId', 'namespaceId' could be set. */ + /** + * UUID of the container to create the token for. + * + * One-of ('scope'): at most one of 'containerId', 'namespaceId' could be set. + */ containerId?: string - /** One-of ('scope'): at most one of 'containerId', 'namespaceId' could be set. */ + /** + * UUID of the namespace to create the token for. + * + * One-of ('scope'): at most one of 'containerId', 'namespaceId' could be set. + */ namespaceId?: string + /** Description of the token. */ description?: string + /** Expiry date of the token. */ expiresAt?: Date } @@ -522,6 +685,7 @@ export type GetTokenRequest = { * config. */ region?: Region + /** UUID of the token to get. */ tokenId: string } @@ -531,10 +695,15 @@ export type ListTokensRequest = { * config. */ region?: Region + /** Page number. */ page?: number + /** Number of tokens per page. */ pageSize?: number + /** Order of the tokens. */ orderBy?: ListTokensRequestOrderBy + /** UUID of the container the token belongs to. */ containerId?: string + /** UUID of the namespace the token belongs to. */ namespaceId?: string } @@ -544,5 +713,6 @@ export type DeleteTokenRequest = { * config. */ region?: Region + /** UUID of the token to delete. */ tokenId: string }