From df7c41c11e65b12428c13dc16afb7a59763a1f74 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Fri, 24 May 2024 14:28:54 +0000 Subject: [PATCH] feat: update generated APIs --- packages/clients/src/api/vpc/v2/api.gen.ts | 9 +++++++- .../clients/src/api/vpc/v2/marshalling.gen.ts | 3 +++ packages/clients/src/api/vpc/v2/types.gen.ts | 22 +++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/packages/clients/src/api/vpc/v2/api.gen.ts b/packages/clients/src/api/vpc/v2/api.gen.ts index ef1f4f321..26d98328e 100644 --- a/packages/clients/src/api/vpc/v2/api.gen.ts +++ b/packages/clients/src/api/vpc/v2/api.gen.ts @@ -358,11 +358,18 @@ export class API extends ParentAPI { unmarshalListSubnetsResponse, ) + /** + * List subnets. List any Private Network's subnets. See ListPrivateNetworks + * to list a specific Private Network's subnets. + * + * @param request - The request {@link ListSubnetsRequest} + * @returns A Promise of ListSubnetsResponse + */ listSubnets = (request: Readonly = {}) => enrichForPagination('subnets', this.pageOfListSubnets, request) /** - * Set the subnets of a Private Network. Set subnets for an existing Private + * Set a Private Network's subnets. Set subnets for an existing Private * Network. Note that the method is PUT and not PATCH. Any existing subnets * will be removed in favor of the new specified set of subnets. * diff --git a/packages/clients/src/api/vpc/v2/marshalling.gen.ts b/packages/clients/src/api/vpc/v2/marshalling.gen.ts index f7949edf4..a0b584e3a 100644 --- a/packages/clients/src/api/vpc/v2/marshalling.gen.ts +++ b/packages/clients/src/api/vpc/v2/marshalling.gen.ts @@ -38,8 +38,11 @@ const unmarshalSubnet = (data: unknown): Subnet => { return { createdAt: unmarshalDate(data.created_at), id: data.id, + privateNetworkId: data.private_network_id, + projectId: data.project_id, subnet: data.subnet, updatedAt: unmarshalDate(data.updated_at), + vpcId: data.vpc_id, } as Subnet } diff --git a/packages/clients/src/api/vpc/v2/types.gen.ts b/packages/clients/src/api/vpc/v2/types.gen.ts index 7786314c1..adeac2543 100644 --- a/packages/clients/src/api/vpc/v2/types.gen.ts +++ b/packages/clients/src/api/vpc/v2/types.gen.ts @@ -25,6 +25,12 @@ export interface Subnet { updatedAt?: Date /** Subnet CIDR. */ subnet: string + /** Scaleway Project the subnet belongs to. */ + projectId: string + /** Private Network the subnet belongs to. */ + privateNetworkId: string + /** VPC the subnet belongs to. */ + vpcId: string } export interface PrivateNetwork { @@ -262,12 +268,28 @@ export type ListSubnetsRequest = { * config. */ region?: Region + /** Sort order of the returned subnets. */ orderBy?: ListSubnetsRequestOrderBy + /** Page number to return, from the paginated results. */ page?: number + /** Maximum number of Private Networks to return per page. */ pageSize?: number + /** + * Organization ID to filter for. Only subnets belonging to this Organization + * will be returned. + */ organizationId?: string + /** + * Project ID to filter for. Only subnets belonging to this Project will be + * returned. + */ projectId?: string + /** + * Subnet IDs to filter for. Only subnets matching the specified IDs will be + * returned. + */ subnetIds?: string[] + /** VPC ID to filter for. Only subnets belonging to this VPC will be returned. */ vpcId?: string }