From 7665e6f0b32b24c2c2ffe97c252c789663f560dc Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Thu, 27 Mar 2025 15:33:03 +0000 Subject: [PATCH] feat: update generated APIs --- packages/clients/src/api/vpc/v2/api.gen.ts | 25 ------------------- packages/clients/src/api/vpc/v2/index.gen.ts | 2 -- .../clients/src/api/vpc/v2/marshalling.gen.ts | 23 ----------------- packages/clients/src/api/vpc/v2/types.gen.ts | 16 ------------ 4 files changed, 66 deletions(-) diff --git a/packages/clients/src/api/vpc/v2/api.gen.ts b/packages/clients/src/api/vpc/v2/api.gen.ts index e5c356425..3b97f182e 100644 --- a/packages/clients/src/api/vpc/v2/api.gen.ts +++ b/packages/clients/src/api/vpc/v2/api.gen.ts @@ -14,7 +14,6 @@ import { marshalCreateVPCRequest, marshalDeleteSubnetsRequest, marshalSetAclRequest, - marshalSetSubnetsRequest, marshalUpdatePrivateNetworkRequest, marshalUpdateRouteRequest, marshalUpdateVPCRequest, @@ -27,7 +26,6 @@ import { unmarshalPrivateNetwork, unmarshalRoute, unmarshalSetAclResponse, - unmarshalSetSubnetsResponse, unmarshalVPC, } from './marshalling.gen' import type { @@ -58,8 +56,6 @@ import type { Route, SetAclRequest, SetAclResponse, - SetSubnetsRequest, - SetSubnetsResponse, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCRequest, @@ -361,27 +357,6 @@ export class API extends ParentAPI { listSubnets = (request: Readonly = {}) => enrichForPagination('subnets', this.pageOfListSubnets, request) - /** - * 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. - * - * @param request - The request {@link SetSubnetsRequest} - * @returns A Promise of SetSubnetsResponse - */ - setSubnets = (request: Readonly) => - this.client.fetch( - { - body: JSON.stringify( - marshalSetSubnetsRequest(request, this.client.settings), - ), - headers: jsonContentHeaders, - method: 'PUT', - path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}/subnets`, - }, - unmarshalSetSubnetsResponse, - ) - /** * Add subnets to a Private Network. Add new subnets to an existing Private * Network. diff --git a/packages/clients/src/api/vpc/v2/index.gen.ts b/packages/clients/src/api/vpc/v2/index.gen.ts index 143ce3987..16294d2f3 100644 --- a/packages/clients/src/api/vpc/v2/index.gen.ts +++ b/packages/clients/src/api/vpc/v2/index.gen.ts @@ -35,8 +35,6 @@ export type { Route, SetAclRequest, SetAclResponse, - SetSubnetsRequest, - SetSubnetsResponse, Subnet, UpdatePrivateNetworkRequest, UpdateRouteRequest, diff --git a/packages/clients/src/api/vpc/v2/marshalling.gen.ts b/packages/clients/src/api/vpc/v2/marshalling.gen.ts index 77523bfff..2d99fbf3e 100644 --- a/packages/clients/src/api/vpc/v2/marshalling.gen.ts +++ b/packages/clients/src/api/vpc/v2/marshalling.gen.ts @@ -24,8 +24,6 @@ import type { Route, SetAclRequest, SetAclResponse, - SetSubnetsRequest, - SetSubnetsResponse, Subnet, UpdatePrivateNetworkRequest, UpdateRouteRequest, @@ -237,20 +235,6 @@ export const unmarshalSetAclResponse = (data: unknown): SetAclResponse => { } as SetAclResponse } -export const unmarshalSetSubnetsResponse = ( - data: unknown, -): SetSubnetsResponse => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'SetSubnetsResponse' failed as data isn't a dictionary.`, - ) - } - - return { - subnets: data.subnets, - } as SetSubnetsResponse -} - export const marshalAddSubnetsRequest = ( request: AddSubnetsRequest, defaults: DefaultValues, @@ -322,13 +306,6 @@ export const marshalSetAclRequest = ( rules: request.rules.map(elt => marshalAclRule(elt, defaults)), }) -export const marshalSetSubnetsRequest = ( - request: SetSubnetsRequest, - defaults: DefaultValues, -): Record => ({ - subnets: request.subnets, -}) - export const marshalUpdatePrivateNetworkRequest = ( request: UpdatePrivateNetworkRequest, defaults: DefaultValues, diff --git a/packages/clients/src/api/vpc/v2/types.gen.ts b/packages/clients/src/api/vpc/v2/types.gen.ts index a8fe0c269..a39782db8 100644 --- a/packages/clients/src/api/vpc/v2/types.gen.ts +++ b/packages/clients/src/api/vpc/v2/types.gen.ts @@ -500,22 +500,6 @@ export interface SetAclResponse { defaultPolicy: Action } -export type SetSubnetsRequest = { - /** - * Region to target. If none is passed will use default region from the - * config. - */ - region?: ScwRegion - /** Private Network ID. */ - privateNetworkId: string - /** Private Network subnets CIDR. */ - subnets?: string[] -} - -export interface SetSubnetsResponse { - subnets: string[] -} - export type UpdatePrivateNetworkRequest = { /** * Region to target. If none is passed will use default region from the