From 380f8647cb0c8f85d54d5150784f9532fa66cc39 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Mon, 9 Jun 2025 14:51:55 +0000 Subject: [PATCH] feat: update generated APIs --- .../billing/src/v2beta1/index.gen.ts | 1 + .../function/src/v1beta1/api.gen.ts | 2 +- .../function/src/v1beta1/marshalling.gen.ts | 5 ++++ .../function/src/v1beta1/types.gen.ts | 25 +++++++++++++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/packages_generated/billing/src/v2beta1/index.gen.ts b/packages_generated/billing/src/v2beta1/index.gen.ts index e946ff71a..fb74b2fb3 100644 --- a/packages_generated/billing/src/v2beta1/index.gen.ts +++ b/packages_generated/billing/src/v2beta1/index.gen.ts @@ -30,4 +30,5 @@ export type { ListTaxesRequestOrderBy, ListTaxesResponse, ListTaxesResponseTax, + RedeemCouponRequest, } from './types.gen' diff --git a/packages_generated/function/src/v1beta1/api.gen.ts b/packages_generated/function/src/v1beta1/api.gen.ts index 948df4f29..592eb51c2 100644 --- a/packages_generated/function/src/v1beta1/api.gen.ts +++ b/packages_generated/function/src/v1beta1/api.gen.ts @@ -185,7 +185,7 @@ export class API extends ParentAPI { * @param request - The request {@link CreateNamespaceRequest} * @returns A Promise of Namespace */ - createNamespace = (request: Readonly = {}) => + createNamespace = (request: Readonly) => this.client.fetch( { body: JSON.stringify( diff --git a/packages_generated/function/src/v1beta1/marshalling.gen.ts b/packages_generated/function/src/v1beta1/marshalling.gen.ts index c70050644..898775137 100644 --- a/packages_generated/function/src/v1beta1/marshalling.gen.ts +++ b/packages_generated/function/src/v1beta1/marshalling.gen.ts @@ -117,6 +117,7 @@ export const unmarshalFunction = (data: unknown): Function => { name: data.name, namespaceId: data.namespace_id, privacy: data.privacy, + privateNetworkId: data.private_network_id, readyAt: unmarshalDate(data.ready_at), region: data.region, runtime: data.runtime, @@ -159,6 +160,7 @@ export const unmarshalNamespace = (data: unknown): Namespace => { status: data.status, tags: data.tags, updatedAt: unmarshalDate(data.updated_at), + vpcIntegrationActivated: data.vpc_integration_activated, } as Namespace } @@ -452,6 +454,7 @@ export const marshalCreateFunctionRequest = ( name: request.name || randomName('fn'), namespace_id: request.namespaceId, privacy: request.privacy, + private_network_id: request.privateNetworkId, runtime: request.runtime, sandbox: request.sandbox, secret_environment_variables: @@ -468,6 +471,7 @@ export const marshalCreateNamespaceRequest = ( request: CreateNamespaceRequest, defaults: DefaultValues, ): Record => ({ + activate_vpc_integration: request.activateVpcIntegration, description: request.description, environment_variables: request.environmentVariables, name: request.name || randomName('ns'), @@ -585,6 +589,7 @@ export const marshalUpdateFunctionRequest = ( memory_limit: request.memoryLimit, min_scale: request.minScale, privacy: request.privacy, + private_network_id: request.privateNetworkId, redeploy: request.redeploy, runtime: request.runtime, sandbox: request.sandbox, diff --git a/packages_generated/function/src/v1beta1/types.gen.ts b/packages_generated/function/src/v1beta1/types.gen.ts index 2be7aed15..ce07b46d8 100644 --- a/packages_generated/function/src/v1beta1/types.gen.ts +++ b/packages_generated/function/src/v1beta1/types.gen.ts @@ -409,6 +409,10 @@ export interface Function { * List of tags applied to the Serverless Function. */ tags: string[] + /** + * When connected to a Private Network, the function can access other Scaleway resources in this Private Network. + */ + privateNetworkId?: string } export interface Namespace { @@ -472,6 +476,11 @@ export interface Namespace { * Last update date of the namespace. */ updatedAt?: Date + /** + * @deprecated When activated, functions in the namespace can be connected to a Private Network. +Note that activating the VPC integration can only be done when creating a new namespace. + */ + vpcIntegrationActivated?: boolean } export interface Token { @@ -669,6 +678,12 @@ export type CreateFunctionRequest = { * Tags of the Serverless Function. */ tags?: string[] + /** + * When connected to a Private Network, the function can access other Scaleway resources in this Private Network. + +Note: this feature is currently in beta and requires a namespace with VPC integration activated, using the `activate_vpc_integration` flag. + */ + privateNetworkId?: string } export type CreateNamespaceRequest = { @@ -697,6 +712,10 @@ export type CreateNamespaceRequest = { * Tags of the Serverless Function Namespace. */ tags?: string[] + /** + * When activated, functions in the namespace can be connected to a Private Network. + */ + activateVpcIntegration: boolean } export type CreateTokenRequest = { @@ -1282,6 +1301,12 @@ export type UpdateFunctionRequest = { * Tags of the Serverless Function. */ tags?: string[] + /** + * When connected to a Private Network, the function can access other Scaleway resources in this Private Network. + +Note: this feature is currently in beta and requires a namespace with VPC integration activated, using the `activate_vpc_integration` flag. + */ + privateNetworkId?: string } export type UpdateNamespaceRequest = {