From ff19c5e5a19ea331f73eb1b3607c2d14155f7802 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Tue, 16 Sep 2025 14:35:08 +0000 Subject: [PATCH 1/2] feat: update generated APIs --- .../datawarehouse/src/index.gen.ts | 6 + .../datawarehouse/src/v1beta1/api.gen.ts | 427 +++++++++++++ .../datawarehouse/src/v1beta1/content.gen.ts | 12 + .../datawarehouse/src/v1beta1/index.gen.ts | 47 ++ .../src/v1beta1/marshalling.gen.ts | 353 +++++++++++ .../datawarehouse/src/v1beta1/types.gen.ts | 587 ++++++++++++++++++ .../src/v1beta1/validation-rules.gen.ts | 183 ++++++ 7 files changed, 1615 insertions(+) create mode 100644 packages_generated/datawarehouse/src/index.gen.ts create mode 100644 packages_generated/datawarehouse/src/v1beta1/api.gen.ts create mode 100644 packages_generated/datawarehouse/src/v1beta1/content.gen.ts create mode 100644 packages_generated/datawarehouse/src/v1beta1/index.gen.ts create mode 100644 packages_generated/datawarehouse/src/v1beta1/marshalling.gen.ts create mode 100644 packages_generated/datawarehouse/src/v1beta1/types.gen.ts create mode 100644 packages_generated/datawarehouse/src/v1beta1/validation-rules.gen.ts diff --git a/packages_generated/datawarehouse/src/index.gen.ts b/packages_generated/datawarehouse/src/index.gen.ts new file mode 100644 index 000000000..863917fac --- /dev/null +++ b/packages_generated/datawarehouse/src/index.gen.ts @@ -0,0 +1,6 @@ +/** + * This file is automatically generated + * PLEASE DO NOT EDIT HERE + */ + +export * as Datawarehousev1beta1 from './v1beta1/index.gen' diff --git a/packages_generated/datawarehouse/src/v1beta1/api.gen.ts b/packages_generated/datawarehouse/src/v1beta1/api.gen.ts new file mode 100644 index 000000000..be7844c68 --- /dev/null +++ b/packages_generated/datawarehouse/src/v1beta1/api.gen.ts @@ -0,0 +1,427 @@ +// This file was automatically generated. DO NOT EDIT. +// If you have any remark or suggestion do not hesitate to open an issue. + +import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client' +import { + enrichForPagination, + API as ParentAPI, + toApiLocality, + urlParams, + validatePathParam, + waitForResource, +} from '@scaleway/sdk-client' +import { DEPLOYMENT_TRANSIENT_STATUSES as DEPLOYMENT_TRANSIENT_STATUSES_DATAWAREHOUSE } from './content.gen' +import { + marshalCreateDatabaseRequest, + marshalCreateDeploymentRequest, + marshalCreateEndpointRequest, + marshalCreateUserRequest, + marshalUpdateDeploymentRequest, + marshalUpdateUserRequest, + unmarshalDatabase, + unmarshalDeployment, + unmarshalEndpoint, + unmarshalListDatabasesResponse, + unmarshalListDeploymentsResponse, + unmarshalListPresetsResponse, + unmarshalListUsersResponse, + unmarshalListVersionsResponse, + unmarshalUser, +} from './marshalling.gen' +import type { + CreateDatabaseRequest, + CreateDeploymentRequest, + CreateEndpointRequest, + CreateUserRequest, + Database, + DeleteDatabaseRequest, + DeleteDeploymentRequest, + DeleteEndpointRequest, + DeleteUserRequest, + Deployment, + Endpoint, + GetDeploymentCertificateRequest, + GetDeploymentRequest, + ListDatabasesRequest, + ListDatabasesResponse, + ListDeploymentsRequest, + ListDeploymentsResponse, + ListPresetsRequest, + ListPresetsResponse, + ListUsersRequest, + ListUsersResponse, + ListVersionsRequest, + ListVersionsResponse, + UpdateDeploymentRequest, + UpdateUserRequest, + User, +} from './types.gen' + +const jsonContentHeaders = { + 'Content-Type': 'application/json; charset=utf-8', +} + +/** + * Data Warehouse API. + +This API allows you to manage your Data Warehouse. + */ +export class API extends ParentAPI { + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par'], + }) + + protected pageOfListPresets = (request: Readonly = {}) => + this.client.fetch( + { + method: 'GET', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/presets`, + urlParams: urlParams( + ['page', request.page], + [ + 'page_size', + request.pageSize ?? this.client.settings.defaultPageSize, + ], + ), + }, + unmarshalListPresetsResponse, + ) + + /** + * List available presets. + * + * @param request - The request {@link ListPresetsRequest} + * @returns A Promise of ListPresetsResponse + */ + listPresets = (request: Readonly = {}) => + enrichForPagination('presets', this.pageOfListPresets, request) + + protected pageOfListVersions = ( + request: Readonly = {}, + ) => + this.client.fetch( + { + method: 'GET', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/versions`, + urlParams: urlParams( + ['page', request.page], + [ + 'page_size', + request.pageSize ?? this.client.settings.defaultPageSize, + ], + ['version', request.version], + ), + }, + unmarshalListVersionsResponse, + ) + + /** + * List available Clickhouse versions. + * + * @param request - The request {@link ListVersionsRequest} + * @returns A Promise of ListVersionsResponse + */ + listVersions = (request: Readonly = {}) => + enrichForPagination('versions', this.pageOfListVersions, request) + + protected pageOfListDeployments = ( + request: Readonly = {}, + ) => + this.client.fetch( + { + method: 'GET', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/deployments`, + urlParams: urlParams( + ['name', request.name], + ['order_by', request.orderBy], + ['organization_id', request.organizationId], + ['page', request.page], + [ + 'page_size', + request.pageSize ?? this.client.settings.defaultPageSize, + ], + ['project_id', request.projectId], + ['tags', request.tags], + ), + }, + unmarshalListDeploymentsResponse, + ) + + /** + * List deployments. List all deployments in the specified region, for a given Scaleway Project. By default, the deployments returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as `tags` and `name`. For the `name` parameter, the value you provide will be checked against the whole name string to see if it includes the string you put in the parameter. + * + * @param request - The request {@link ListDeploymentsRequest} + * @returns A Promise of ListDeploymentsResponse + */ + listDeployments = (request: Readonly = {}) => + enrichForPagination('deployments', this.pageOfListDeployments, request) + + /** + * Get a deployment. Retrieve information about a given deployment, specified by the `region` and `deployment_id` parameters. Its full details, including name, status are returned in the response object. + * + * @param request - The request {@link GetDeploymentRequest} + * @returns A Promise of Deployment + */ + getDeployment = (request: Readonly) => + this.client.fetch( + { + method: 'GET', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam('deploymentId', request.deploymentId)}`, + }, + unmarshalDeployment, + ) + + /** + * Waits for {@link Deployment} to be in a final state. + * + * @param request - The request {@link GetDeploymentRequest} + * @param options - The waiting options + * @returns A Promise of Deployment + */ + waitForDeployment = ( + request: Readonly, + options?: Readonly>, + ) => + waitForResource( + options?.stop ?? + (res => + Promise.resolve( + !DEPLOYMENT_TRANSIENT_STATUSES_DATAWAREHOUSE.includes(res.status), + )), + this.getDeployment, + request, + options, + ) + + /** + * Create a deployment. Create a new deployment. + * + * @param request - The request {@link CreateDeploymentRequest} + * @returns A Promise of Deployment + */ + createDeployment = (request: Readonly) => + this.client.fetch( + { + body: JSON.stringify( + marshalCreateDeploymentRequest(request, this.client.settings), + ), + headers: jsonContentHeaders, + method: 'POST', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/deployments`, + }, + unmarshalDeployment, + ) + + /** + * Update a deployment. Update the parameters of a deployment. + * + * @param request - The request {@link UpdateDeploymentRequest} + * @returns A Promise of Deployment + */ + updateDeployment = (request: Readonly) => + this.client.fetch( + { + body: JSON.stringify( + marshalUpdateDeploymentRequest(request, this.client.settings), + ), + headers: jsonContentHeaders, + method: 'PATCH', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam('deploymentId', request.deploymentId)}`, + }, + unmarshalDeployment, + ) + + /** + * Delete a deployment. Delete a given deployment, specified by the `region` and `deployment_id` parameters. Deleting a deployment is permanent, and cannot be undone. Upon deletion, deletion all your data will be lost. + * + * @param request - The request {@link DeleteDeploymentRequest} + * @returns A Promise of Deployment + */ + deleteDeployment = (request: Readonly) => + this.client.fetch( + { + method: 'DELETE', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam('deploymentId', request.deploymentId)}`, + }, + unmarshalDeployment, + ) + + getDeploymentCertificate = ( + request: Readonly, + ) => + this.client.fetch({ + method: 'GET', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam('deploymentId', request.deploymentId)}/certificate`, + urlParams: urlParams(['dl', 1]), + responseType: 'blob', + }) + + protected pageOfListUsers = (request: Readonly) => + this.client.fetch( + { + method: 'GET', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam('deploymentId', request.deploymentId)}/users`, + urlParams: urlParams( + ['name', request.name], + ['order_by', request.orderBy], + ['page', request.page], + [ + 'page_size', + request.pageSize ?? this.client.settings.defaultPageSize, + ], + ), + }, + unmarshalListUsersResponse, + ) + + /** + * List users associated with a deployment. + * + * @param request - The request {@link ListUsersRequest} + * @returns A Promise of ListUsersResponse + */ + listUsers = (request: Readonly) => + enrichForPagination('users', this.pageOfListUsers, request) + + /** + * Create a new user for a deployment. + * + * @param request - The request {@link CreateUserRequest} + * @returns A Promise of User + */ + createUser = (request: Readonly) => + this.client.fetch( + { + body: JSON.stringify( + marshalCreateUserRequest(request, this.client.settings), + ), + headers: jsonContentHeaders, + method: 'POST', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam('deploymentId', request.deploymentId)}/users`, + }, + unmarshalUser, + ) + + /** + * Update an existing user for a deployment. + * + * @param request - The request {@link UpdateUserRequest} + * @returns A Promise of User + */ + updateUser = (request: Readonly) => + this.client.fetch( + { + body: JSON.stringify( + marshalUpdateUserRequest(request, this.client.settings), + ), + headers: jsonContentHeaders, + method: 'PATCH', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam('deploymentId', request.deploymentId)}/users/${validatePathParam('name', request.name)}`, + }, + unmarshalUser, + ) + + /** + * Delete a user from a deployment. + * + * @param request - The request {@link DeleteUserRequest} + */ + deleteUser = (request: Readonly) => + this.client.fetch({ + body: '{}', + headers: jsonContentHeaders, + method: 'DELETE', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam('deploymentId', request.deploymentId)}/users/${validatePathParam('name', request.name)}`, + }) + + /** + * Delete an endpoint from a deployment. + * + * @param request - The request {@link DeleteEndpointRequest} + */ + deleteEndpoint = (request: Readonly) => + this.client.fetch({ + method: 'DELETE', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam('endpointId', request.endpointId)}`, + }) + + /** + * Create a new endpoint for a deployment. + * + * @param request - The request {@link CreateEndpointRequest} + * @returns A Promise of Endpoint + */ + createEndpoint = (request: Readonly) => + this.client.fetch( + { + body: JSON.stringify( + marshalCreateEndpointRequest(request, this.client.settings), + ), + headers: jsonContentHeaders, + method: 'POST', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/endpoints`, + }, + unmarshalEndpoint, + ) + + protected pageOfListDatabases = (request: Readonly) => + this.client.fetch( + { + method: 'GET', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam('deploymentId', request.deploymentId)}/databases`, + urlParams: urlParams( + ['name', request.name], + ['order_by', request.orderBy], + ['page', request.page], + [ + 'page_size', + request.pageSize ?? this.client.settings.defaultPageSize, + ], + ), + }, + unmarshalListDatabasesResponse, + ) + + /** + * List databases within a deployment. + * + * @param request - The request {@link ListDatabasesRequest} + * @returns A Promise of ListDatabasesResponse + */ + listDatabases = (request: Readonly) => + enrichForPagination('databases', this.pageOfListDatabases, request) + + /** + * Create a new database within a deployment. + * + * @param request - The request {@link CreateDatabaseRequest} + * @returns A Promise of Database + */ + createDatabase = (request: Readonly) => + this.client.fetch( + { + body: JSON.stringify( + marshalCreateDatabaseRequest(request, this.client.settings), + ), + headers: jsonContentHeaders, + method: 'POST', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam('deploymentId', request.deploymentId)}/databases`, + }, + unmarshalDatabase, + ) + + /** + * Delete a database from a deployment. + * + * @param request - The request {@link DeleteDatabaseRequest} + */ + deleteDatabase = (request: Readonly) => + this.client.fetch({ + method: 'DELETE', + path: `/datawarehouse/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/deployments/${validatePathParam('deploymentId', request.deploymentId)}/databases/${validatePathParam('name', request.name)}`, + }) +} diff --git a/packages_generated/datawarehouse/src/v1beta1/content.gen.ts b/packages_generated/datawarehouse/src/v1beta1/content.gen.ts new file mode 100644 index 000000000..0ce2aadd7 --- /dev/null +++ b/packages_generated/datawarehouse/src/v1beta1/content.gen.ts @@ -0,0 +1,12 @@ +// This file was automatically generated. DO NOT EDIT. +// If you have any remark or suggestion do not hesitate to open an issue. +import type { DeploymentStatus } from './types.gen' + +/** Lists transient statutes of the enum {@link DeploymentStatus}. */ +export const DEPLOYMENT_TRANSIENT_STATUSES: DeploymentStatus[] = [ + 'creating', + 'configuring', + 'deleting', + 'locking', + 'unlocking', +] diff --git a/packages_generated/datawarehouse/src/v1beta1/index.gen.ts b/packages_generated/datawarehouse/src/v1beta1/index.gen.ts new file mode 100644 index 000000000..003058cfc --- /dev/null +++ b/packages_generated/datawarehouse/src/v1beta1/index.gen.ts @@ -0,0 +1,47 @@ +// This file was automatically generated. DO NOT EDIT. +// If you have any remark or suggestion do not hesitate to open an issue. +export { API } from './api.gen' +export * from './content.gen' +export * from './marshalling.gen' +export type { + CreateDatabaseRequest, + CreateDeploymentRequest, + CreateEndpointRequest, + CreateUserRequest, + Database, + DeleteDatabaseRequest, + DeleteDeploymentRequest, + DeleteEndpointRequest, + DeleteUserRequest, + Deployment, + DeploymentStatus, + Endpoint, + EndpointPrivateNetworkDetails, + EndpointPublicDetails, + EndpointService, + EndpointServiceProtocol, + EndpointSpec, + EndpointSpecPrivateNetworkDetails, + EndpointSpecPublicDetails, + GetDeploymentCertificateRequest, + GetDeploymentRequest, + ListDatabasesRequest, + ListDatabasesRequestOrderBy, + ListDatabasesResponse, + ListDeploymentsRequest, + ListDeploymentsRequestOrderBy, + ListDeploymentsResponse, + ListPresetsRequest, + ListPresetsResponse, + ListUsersRequest, + ListUsersRequestOrderBy, + ListUsersResponse, + ListVersionsRequest, + ListVersionsResponse, + Preset, + UpdateDeploymentRequest, + UpdateUserRequest, + User, + Version, +} from './types.gen' +export * as ValidationRules from './validation-rules.gen' diff --git a/packages_generated/datawarehouse/src/v1beta1/marshalling.gen.ts b/packages_generated/datawarehouse/src/v1beta1/marshalling.gen.ts new file mode 100644 index 000000000..415fb3cf8 --- /dev/null +++ b/packages_generated/datawarehouse/src/v1beta1/marshalling.gen.ts @@ -0,0 +1,353 @@ +// This file was automatically generated. DO NOT EDIT. +// If you have any remark or suggestion do not hesitate to open an issue. + +import type { DefaultValues } from '@scaleway/sdk-client' +import { + isJSONObject, + resolveOneOf, + unmarshalArrayOfObject, + unmarshalDate, +} from '@scaleway/sdk-client' +import type { + CreateDatabaseRequest, + CreateDeploymentRequest, + CreateEndpointRequest, + CreateUserRequest, + Database, + Deployment, + Endpoint, + EndpointPrivateNetworkDetails, + EndpointPublicDetails, + EndpointService, + EndpointSpec, + EndpointSpecPrivateNetworkDetails, + EndpointSpecPublicDetails, + ListDatabasesResponse, + ListDeploymentsResponse, + ListPresetsResponse, + ListUsersResponse, + ListVersionsResponse, + Preset, + UpdateDeploymentRequest, + UpdateUserRequest, + User, + Version, +} from './types.gen' + +const unmarshalEndpointPrivateNetworkDetails = ( + data: unknown, +): EndpointPrivateNetworkDetails => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary.`, + ) + } + + return { + privateNetworkId: data.private_network_id, + } as EndpointPrivateNetworkDetails +} + +const unmarshalEndpointPublicDetails = ( + data: unknown, +): EndpointPublicDetails => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'EndpointPublicDetails' failed as data isn't a dictionary.`, + ) + } + + return {} as EndpointPublicDetails +} + +const unmarshalEndpointService = (data: unknown): EndpointService => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'EndpointService' failed as data isn't a dictionary.`, + ) + } + + return { + port: data.port, + protocol: data.protocol, + } as EndpointService +} + +export const unmarshalEndpoint = (data: unknown): Endpoint => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'Endpoint' failed as data isn't a dictionary.`, + ) + } + + return { + dnsRecord: data.dns_record, + id: data.id, + privateNetwork: data.private_network + ? unmarshalEndpointPrivateNetworkDetails(data.private_network) + : undefined, + public: data.public + ? unmarshalEndpointPublicDetails(data.public) + : undefined, + services: unmarshalArrayOfObject(data.services, unmarshalEndpointService), + } as Endpoint +} + +export const unmarshalDatabase = (data: unknown): Database => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'Database' failed as data isn't a dictionary.`, + ) + } + + return { + name: data.name, + size: data.size, + } as Database +} + +export const unmarshalDeployment = (data: unknown): Deployment => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'Deployment' failed as data isn't a dictionary.`, + ) + } + + return { + cpuMax: data.cpu_max, + cpuMin: data.cpu_min, + createdAt: unmarshalDate(data.created_at), + endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint), + id: data.id, + name: data.name, + organizationId: data.organization_id, + projectId: data.project_id, + ramPerCpu: data.ram_per_cpu, + region: data.region, + replicaCount: data.replica_count, + status: data.status, + tags: data.tags, + updatedAt: unmarshalDate(data.updated_at), + version: data.version, + } as Deployment +} + +export const unmarshalUser = (data: unknown): User => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'User' failed as data isn't a dictionary.`, + ) + } + + return { + isAdmin: data.is_admin, + name: data.name, + } as User +} + +export const unmarshalListDatabasesResponse = ( + data: unknown, +): ListDatabasesResponse => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'ListDatabasesResponse' failed as data isn't a dictionary.`, + ) + } + + return { + databases: unmarshalArrayOfObject(data.databases, unmarshalDatabase), + totalCount: data.total_count, + } as ListDatabasesResponse +} + +export const unmarshalListDeploymentsResponse = ( + data: unknown, +): ListDeploymentsResponse => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'ListDeploymentsResponse' failed as data isn't a dictionary.`, + ) + } + + return { + deployments: unmarshalArrayOfObject(data.deployments, unmarshalDeployment), + totalCount: data.total_count, + } as ListDeploymentsResponse +} + +const unmarshalPreset = (data: unknown): Preset => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'Preset' failed as data isn't a dictionary.`, + ) + } + + return { + category: data.category, + cpuMax: data.cpu_max, + cpuMin: data.cpu_min, + name: data.name, + ramPerCpu: data.ram_per_cpu, + replicaCount: data.replica_count, + } as Preset +} + +export const unmarshalListPresetsResponse = ( + data: unknown, +): ListPresetsResponse => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'ListPresetsResponse' failed as data isn't a dictionary.`, + ) + } + + return { + presets: unmarshalArrayOfObject(data.presets, unmarshalPreset), + totalCount: data.total_count, + } as ListPresetsResponse +} + +export const unmarshalListUsersResponse = ( + data: unknown, +): ListUsersResponse => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`, + ) + } + + return { + totalCount: data.total_count, + users: unmarshalArrayOfObject(data.users, unmarshalUser), + } as ListUsersResponse +} + +const unmarshalVersion = (data: unknown): Version => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'Version' failed as data isn't a dictionary.`, + ) + } + + return { + endOfLifeAt: unmarshalDate(data.end_of_life_at), + version: data.version, + } as Version +} + +export const unmarshalListVersionsResponse = ( + data: unknown, +): ListVersionsResponse => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`, + ) + } + + return { + totalCount: data.total_count, + versions: unmarshalArrayOfObject(data.versions, unmarshalVersion), + } as ListVersionsResponse +} + +export const marshalCreateDatabaseRequest = ( + request: CreateDatabaseRequest, + defaults: DefaultValues, +): Record => ({ + name: request.name, +}) + +const marshalEndpointSpecPrivateNetworkDetails = ( + request: EndpointSpecPrivateNetworkDetails, + defaults: DefaultValues, +): Record => ({ + private_network_id: request.privateNetworkId, +}) + +const marshalEndpointSpecPublicDetails = ( + request: EndpointSpecPublicDetails, + defaults: DefaultValues, +): Record => ({}) + +const marshalEndpointSpec = ( + request: EndpointSpec, + defaults: DefaultValues, +): Record => ({ + ...resolveOneOf([ + { + param: 'public', + value: + request.public !== undefined + ? marshalEndpointSpecPublicDetails(request.public, defaults) + : undefined, + }, + { + param: 'private_network', + value: + request.privateNetwork !== undefined + ? marshalEndpointSpecPrivateNetworkDetails( + request.privateNetwork, + defaults, + ) + : undefined, + }, + ]), +}) + +export const marshalCreateDeploymentRequest = ( + request: CreateDeploymentRequest, + defaults: DefaultValues, +): Record => ({ + cpu_max: request.cpuMax, + cpu_min: request.cpuMin, + endpoints: + request.endpoints !== undefined + ? request.endpoints.map(elt => marshalEndpointSpec(elt, defaults)) + : undefined, + name: request.name, + password: request.password, + project_id: request.projectId ?? defaults.defaultProjectId, + ram_per_cpu: request.ramPerCpu, + replica_count: request.replicaCount, + tags: request.tags, + version: request.version, +}) + +export const marshalCreateEndpointRequest = ( + request: CreateEndpointRequest, + defaults: DefaultValues, +): Record => ({ + deployment_id: request.deploymentId, + endpoint: + request.endpoint !== undefined + ? marshalEndpointSpec(request.endpoint, defaults) + : undefined, +}) + +export const marshalCreateUserRequest = ( + request: CreateUserRequest, + defaults: DefaultValues, +): Record => ({ + is_admin: request.isAdmin, + name: request.name, + password: request.password, +}) + +export const marshalUpdateDeploymentRequest = ( + request: UpdateDeploymentRequest, + defaults: DefaultValues, +): Record => ({ + cpu_max: request.cpuMax, + cpu_min: request.cpuMin, + name: request.name, + replica_count: request.replicaCount, + tags: request.tags, +}) + +export const marshalUpdateUserRequest = ( + request: UpdateUserRequest, + defaults: DefaultValues, +): Record => ({ + is_admin: request.isAdmin, + password: request.password, +}) diff --git a/packages_generated/datawarehouse/src/v1beta1/types.gen.ts b/packages_generated/datawarehouse/src/v1beta1/types.gen.ts new file mode 100644 index 000000000..54805e47d --- /dev/null +++ b/packages_generated/datawarehouse/src/v1beta1/types.gen.ts @@ -0,0 +1,587 @@ +// This file was automatically generated. DO NOT EDIT. +// If you have any remark or suggestion do not hesitate to open an issue. +import type { Region as ScwRegion } from '@scaleway/sdk-client' + +export type DeploymentStatus = + | 'unknown_status' + | 'ready' + | 'creating' + | 'configuring' + | 'deleting' + | 'error' + | 'locked' + | 'locking' + | 'unlocking' + +export type EndpointServiceProtocol = + | 'unknown_protocol' + | 'tcp' + | 'https' + | 'mysql' + +export type ListDatabasesRequestOrderBy = + | 'name_asc' + | 'name_desc' + | 'size_asc' + | 'size_desc' + +export type ListDeploymentsRequestOrderBy = + | 'created_at_desc' + | 'created_at_asc' + | 'name_asc' + | 'name_desc' + +export type ListUsersRequestOrderBy = 'name_asc' | 'name_desc' + +export interface EndpointPrivateNetworkDetails { + privateNetworkId: string +} + +export interface EndpointPublicDetails {} + +export interface EndpointService { + protocol: EndpointServiceProtocol + port: number +} + +export interface EndpointSpecPrivateNetworkDetails { + /** + * UUID of the Private Network. + */ + privateNetworkId: string +} + +export interface EndpointSpecPublicDetails {} + +export interface Endpoint { + /** + * Unique identifier of the endpoint. + */ + id: string + /** + * DNS record associated with the endpoint. + */ + dnsRecord: string + /** + * List of services associated with the endpoint. + */ + services: EndpointService[] + /** + * Private Network endpoint details. + * + * One-of ('details'): at most one of 'privateNetwork', 'public' could be set. + */ + privateNetwork?: EndpointPrivateNetworkDetails + /** + * Public endpoint details. + * + * One-of ('details'): at most one of 'privateNetwork', 'public' could be set. + */ + public?: EndpointPublicDetails +} + +export interface EndpointSpec { + /** + * + * One-of ('details'): at most one of 'public', 'privateNetwork' could be set. + */ + public?: EndpointSpecPublicDetails + /** + * + * One-of ('details'): at most one of 'public', 'privateNetwork' could be set. + */ + privateNetwork?: EndpointSpecPrivateNetworkDetails +} + +export interface Database { + /** + * Name of the database. + */ + name: string + /** + * Size of the database. + */ + size: number +} + +export interface Deployment { + /** + * Unique identifier. + */ + id: string + /** + * Name of the deployment. + */ + name: string + /** + * Organization ID. + */ + organizationId: string + /** + * Project ID. + */ + projectId: string + /** + * Status of the deployment. + */ + status: DeploymentStatus + /** + * List of tags applied to the deployment. + */ + tags: string[] + /** + * Creation date of the deployment. + */ + createdAt?: Date + /** + * Last modification date of the deployment. + */ + updatedAt?: Date + /** + * Clickhouse version. + */ + version: string + /** + * Number of replicas for the deployment. + */ + replicaCount: number + /** + * Minimum CPU count for the deployment. + */ + cpuMin: number + /** + * Maximum CPU count for the deployment. + */ + cpuMax: number + /** + * List of endpoints associated with the deployment. + */ + endpoints: Endpoint[] + /** + * RAM per CPU count for the deployment (in GB). + */ + ramPerCpu: number + /** + * Region of the deployment. + */ + region: ScwRegion +} + +export interface Preset { + /** + * Name of the preset. + */ + name: string + /** + * Category of the preset. + */ + category: string + /** + * Minimum CPU count for the preset. + */ + cpuMin: number + /** + * Maximum CPU count for the preset. + */ + cpuMax: number + /** + * RAM per CPU count for the preset (in GB). + */ + ramPerCpu: number + /** + * Number of replicas for the preset. + */ + replicaCount: number +} + +export interface User { + /** + * Name of the user. + */ + name: string + /** + * Indicates if the user is an administrator. + */ + isAdmin: boolean +} + +export interface Version { + /** + * Deployment version. + */ + version: string + /** + * Date of End of Life. + */ + endOfLifeAt?: Date +} + +export type CreateDatabaseRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + /** + * UUID of the deployment. + */ + deploymentId: string + /** + * Name of the database. + */ + name: string +} + +export type CreateDeploymentRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + /** + * The Project ID on which the deployment will be created. + */ + projectId?: string + /** + * Name of the deployment. + */ + name: string + /** + * Tags to apply to the deployment. + */ + tags?: string[] + /** + * Clickhouse version to use for the deployment. + */ + version: string + /** + * Number of replicas for the deployment. + */ + replicaCount: number + /** + * Password for the initial user. + */ + password: string + /** + * Minimum CPU count for the deployment. + */ + cpuMin: number + /** + * Maximum CPU count for the deployment. + */ + cpuMax: number + /** + * Endpoints to associate with the deployment. + */ + endpoints?: EndpointSpec[] + /** + * RAM per CPU count for the deployment (in GB). + */ + ramPerCpu: number +} + +export type CreateEndpointRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + /** + * UUID of the deployment. + */ + deploymentId: string + /** + * Endpoint specification. + */ + endpoint?: EndpointSpec +} + +export type CreateUserRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + /** + * UUID of the deployment. + */ + deploymentId: string + /** + * Name of the user. + */ + name: string + /** + * Password for the user. + */ + password: string + /** + * Indicates if the user is an administrator. + */ + isAdmin: boolean +} + +export type DeleteDatabaseRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + /** + * UUID of the deployment. + */ + deploymentId: string + /** + * Name of the database to delete. + */ + name: string +} + +export type DeleteDeploymentRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + /** + * UUID of the deployment to delete. + */ + deploymentId: string +} + +export type DeleteEndpointRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + /** + * UUID of the Endpoint to delete. + */ + endpointId: string +} + +export type DeleteUserRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + /** + * UUID of the deployment. + */ + deploymentId: string + /** + * Name of the user to delete. + */ + name: string +} + +export type GetDeploymentCertificateRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + deploymentId: string +} + +export type GetDeploymentRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + /** + * UUID of the deployment. + */ + deploymentId: string +} + +export type ListDatabasesRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + /** + * UUID of the deployment. + */ + deploymentId: string + /** + * Name of the database to filter by. + */ + name?: string + /** + * Criteria to use when ordering database listings. + */ + orderBy?: ListDatabasesRequestOrderBy + page?: number + pageSize?: number +} + +export interface ListDatabasesResponse { + /** + * List of databases associated with the deployment. + */ + databases: Database[] + /** + * Total count of databases associated with the deployment. + */ + totalCount: number +} + +export type ListDeploymentsRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + /** + * List deployments with a given tag. + */ + tags?: string[] + /** + * Lists deployments that match a name pattern. + */ + name?: string + /** + * Criteria to use when ordering deployment listings. + */ + orderBy?: ListDeploymentsRequestOrderBy + /** + * Organization ID the deployment belongs to. + */ + organizationId?: string + /** + * Project ID the deployment belongs to. + */ + projectId?: string + page?: number + pageSize?: number +} + +export interface ListDeploymentsResponse { + /** + * List of all deployments available in an Organization or Project. + */ + deployments: Deployment[] + /** + * Total count of deployments available in an Organization or Project. + */ + totalCount: number +} + +export type ListPresetsRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + page?: number + pageSize?: number +} + +export interface ListPresetsResponse { + /** + * List of available presets. + */ + presets: Preset[] + /** + * Total count of presets available. + */ + totalCount: number +} + +export type ListUsersRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + /** + * UUID of the deployment. + */ + deploymentId: string + /** + * Name of the user to filter by. + */ + name?: string + /** + * Criteria to use when ordering user listings. + */ + orderBy?: ListUsersRequestOrderBy + page?: number + pageSize?: number +} + +export interface ListUsersResponse { + /** + * List of users associated with the deployment. + */ + users: User[] + /** + * Total count of users associated with the deployment. + */ + totalCount: number +} + +export type ListVersionsRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + version?: string + page?: number + pageSize?: number +} + +export interface ListVersionsResponse { + /** + * Available deployment version. + */ + versions: Version[] + /** + * Total count of deployment version available. + */ + totalCount: number +} + +export type UpdateDeploymentRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + /** + * UUID of the deployment to update. + */ + deploymentId: string + /** + * Name of the deployment. + */ + name?: string + /** + * Tags of a deployment. + */ + tags?: string[] + /** + * Minimum CPU count for the deployment. + */ + cpuMin?: number + /** + * Maximum CPU count for the deployment. + */ + cpuMax?: number + /** + * Number of replicas for the deployment. + */ + replicaCount?: number +} + +export type UpdateUserRequest = { + /** + * Region to target. If none is passed will use default region from the config. + */ + region?: ScwRegion + /** + * UUID of the deployment. + */ + deploymentId: string + /** + * Name of the user. + */ + name: string + /** + * New password for the user. + */ + password?: string + /** + * Updates the user administrator permissions. + */ + isAdmin?: boolean +} diff --git a/packages_generated/datawarehouse/src/v1beta1/validation-rules.gen.ts b/packages_generated/datawarehouse/src/v1beta1/validation-rules.gen.ts new file mode 100644 index 000000000..7d7e6cb61 --- /dev/null +++ b/packages_generated/datawarehouse/src/v1beta1/validation-rules.gen.ts @@ -0,0 +1,183 @@ +// This file was automatically generated. DO NOT EDIT. +// If you have any remark or suggestion do not hesitate to open an issue. + +export const CreateDatabaseRequest = { + name: { + maxLength: 63, + minLength: 1, + pattern: /^[a-z][a-zA-Z0-9_\-]*$/, + }, +} + +export const CreateDeploymentRequest = { + cpuMax: { + greaterThanOrEqual: 1, + lessThanOrEqual: 15, + }, + cpuMin: { + greaterThanOrEqual: 1, + lessThanOrEqual: 15, + }, + name: { + maxLength: 255, + minLength: 1, + pattern: /^[A-Za-z0-9-_]+$/, + }, + password: { + maxLength: 50, + minLength: 12, + }, + replicaCount: { + greaterThanOrEqual: 1, + lessThanOrEqual: 6, + }, + version: { + maxLength: 10, + minLength: 1, + pattern: /^v[0-9]+$/, + }, +} + +export const CreateUserRequest = { + name: { + maxLength: 63, + minLength: 1, + pattern: /^[a-z][a-zA-Z0-9_\-]*$/, + }, + password: { + maxLength: 50, + minLength: 12, + }, +} + +export const DeleteDatabaseRequest = { + name: { + maxLength: 63, + minLength: 1, + pattern: /^[a-z][a-zA-Z0-9_\-]*$/, + }, +} + +export const DeleteUserRequest = { + name: { + maxLength: 63, + minLength: 1, + pattern: /^[a-z][a-zA-Z0-9_\-]*$/, + }, +} + +export const Deployment = { + cpuMax: { + greaterThanOrEqual: 1, + lessThanOrEqual: 15, + }, + cpuMin: { + lessThanOrEqual: 15, + }, + name: { + maxLength: 63, + minLength: 1, + }, +} + +export const ListDatabasesRequest = { + name: { + maxLength: 63, + minLength: 1, + pattern: /^[a-z][a-zA-Z0-9_\-]*$/, + }, + page: { + greaterThanOrEqual: 1, + }, + pageSize: { + greaterThanOrEqual: 1, + lessThanOrEqual: 100, + }, +} + +export const ListDeploymentsRequest = { + name: { + maxLength: 255, + minLength: 1, + pattern: /^[A-Za-z0-9-_]+$/, + }, + page: { + greaterThanOrEqual: 1, + }, + pageSize: { + greaterThanOrEqual: 1, + lessThanOrEqual: 100, + }, +} + +export const ListPresetsRequest = { + page: { + greaterThanOrEqual: 1, + }, + pageSize: { + greaterThanOrEqual: 1, + lessThanOrEqual: 100, + }, +} + +export const ListUsersRequest = { + name: { + maxLength: 63, + minLength: 1, + pattern: /^[a-zA-Z0-9_\-]*$/, + }, + page: { + greaterThanOrEqual: 1, + }, + pageSize: { + greaterThanOrEqual: 1, + lessThanOrEqual: 100, + }, +} + +export const ListVersionsRequest = { + page: { + greaterThanOrEqual: 1, + }, + pageSize: { + greaterThanOrEqual: 1, + lessThanOrEqual: 100, + }, + version: { + maxLength: 10, + minLength: 1, + pattern: /^v[0-9]+$/, + }, +} + +export const UpdateDeploymentRequest = { + cpuMax: { + greaterThanOrEqual: 1, + lessThanOrEqual: 15, + }, + cpuMin: { + greaterThanOrEqual: 1, + lessThanOrEqual: 15, + }, + name: { + maxLength: 255, + minLength: 1, + pattern: /^[A-Za-z0-9-_]+$/, + }, + replicaCount: { + greaterThanOrEqual: 1, + lessThanOrEqual: 6, + }, +} + +export const UpdateUserRequest = { + name: { + maxLength: 63, + minLength: 1, + pattern: /^[a-z][a-zA-Z0-9_\-]*$/, + }, + password: { + maxLength: 50, + minLength: 12, + }, +} From 1a91188b9e25368db19f08e601dc81417a0a6d45 Mon Sep 17 00:00:00 2001 From: Jonathan Remy Date: Tue, 16 Sep 2025 17:32:02 +0200 Subject: [PATCH 2/2] fix: package.json --- package.json | 2 +- packages/sdk/package.json | 1 + packages/sdk/src/index.gen.ts | 18 +++++++ packages_generated/datawarehouse/package.json | 48 +++++++++++++++++++ .../datawarehouse/tsconfig.build.json | 17 +++++++ .../datawarehouse/tsconfig.json | 4 ++ .../datawarehouse/vite.config.ts | 14 ++++++ pnpm-lock.yaml | 18 ++++++- 8 files changed, 120 insertions(+), 2 deletions(-) create mode 100644 packages_generated/datawarehouse/package.json create mode 100644 packages_generated/datawarehouse/tsconfig.build.json create mode 100644 packages_generated/datawarehouse/tsconfig.json create mode 100644 packages_generated/datawarehouse/vite.config.ts diff --git a/package.json b/package.json index 7655aaf7b..9d1ba9f1f 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "react": "^19.1.1", "read-pkg": "9.0.1", "tsc-alias": "^1.8.16", - "turbo": "2.5.6", + "turbo": "^2.5.6", "typedoc": "0.27.6", "typescript": "5.8.3", "vite": "6.3.6", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 8c858f477..25b34f3d1 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -40,6 +40,7 @@ "@scaleway/sdk-block": "workspace:*", "@scaleway/sdk-cockpit": "workspace:*", "@scaleway/sdk-container": "workspace:*", + "@scaleway/sdk-datawarehouse": "workspace:*", "@scaleway/sdk-dedibox": "workspace:*", "@scaleway/sdk-domain": "workspace:*", "@scaleway/sdk-edge-services": "workspace:*", diff --git a/packages/sdk/src/index.gen.ts b/packages/sdk/src/index.gen.ts index 9512827b4..34ce702ac 100644 --- a/packages/sdk/src/index.gen.ts +++ b/packages/sdk/src/index.gen.ts @@ -11,6 +11,7 @@ import { Billingv2beta1 } from '@scaleway/sdk-billing' import { Blockv1, Blockv1alpha1 } from '@scaleway/sdk-block' import { Cockpitv1 } from '@scaleway/sdk-cockpit' import { Containerv1beta1 } from '@scaleway/sdk-container' +import { Datawarehousev1beta1 } from '@scaleway/sdk-datawarehouse' import { Dediboxv1 } from '@scaleway/sdk-dedibox' import { Domainv2beta1 } from '@scaleway/sdk-domain' import { EdgeServicesv1beta1 } from '@scaleway/sdk-edge-services' @@ -35,6 +36,7 @@ import { Qaasv1alpha1 } from '@scaleway/sdk-qaas' import { Rdbv1 } from '@scaleway/sdk-rdb' import { Redisv1 } from '@scaleway/sdk-redis' import { Registryv1 } from '@scaleway/sdk-registry' +import { S2sVpnv1alpha1 } from '@scaleway/sdk-s2s-vpn' import { Secretv1beta1 } from '@scaleway/sdk-secret' import { ServerlessSqldbv1alpha1 } from '@scaleway/sdk-serverless-sqldb' import { Temv1alpha1 } from '@scaleway/sdk-tem' @@ -116,6 +118,14 @@ export const Container = { v1beta1: Containerv1beta1, } +/** + * @deprecated Direct version exports are deprecated. Use the 'Datawarehouse' namespace instead (e.g., Datawarehouse.v1). + */ +export { Datawarehousev1beta1 } +export const Datawarehouse = { + v1beta1: Datawarehousev1beta1, +} + /** * @deprecated Direct version exports are deprecated. Use the 'Dedibox' namespace instead (e.g., Dedibox.v1). */ @@ -310,6 +320,14 @@ export const Registry = { v1: Registryv1, } +/** + * @deprecated Direct version exports are deprecated. Use the 'S2sVpn' namespace instead (e.g., S2sVpn.v1). + */ +export { S2sVpnv1alpha1 } +export const S2sVpn = { + v1alpha1: S2sVpnv1alpha1, +} + /** * @deprecated Direct version exports are deprecated. Use the 'Secret' namespace instead (e.g., Secret.v1). */ diff --git a/packages_generated/datawarehouse/package.json b/packages_generated/datawarehouse/package.json new file mode 100644 index 000000000..d3571bb5f --- /dev/null +++ b/packages_generated/datawarehouse/package.json @@ -0,0 +1,48 @@ +{ + "name": "@scaleway/sdk-datawarehouse", + "version": "1.0.0", + "description": "Scaleway SDK datawarehouse", + "license": "Apache-2.0", + "files": [ + "dist" + ], + "type": "module", + "exports": { + ".": { + "types": "./dist/index.gen.d.ts", + "import": "./dist/index.gen.js", + "require": "./dist/index.gen.cjs", + "default": "./dist/index.gen.js" + }, + "./*": { + "types": "./dist/*/index.gen.d.ts", + "import": "./dist/*/index.gen.js", + "require": "./dist/*/index.gen.cjs", + "default": "./dist/*/index.gen.js" + } + }, + "repository": { + "type": "git", + "directory": "packages_generated/datawarehouse" + }, + "engines": { + "node": ">=20.18.3" + }, + "scripts": { + "package:check": "pnpm publint", + "typecheck": "tsc --noEmit", + "type:generate": "tsc --declaration -p tsconfig.build.json", + "build": "vite build --config vite.config.ts && pnpm run type:generate", + "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" + }, + "dependencies": { + "@scaleway/sdk-std": "workspace:*", + "@scaleway/random-name": "5.1.1" + }, + "peerDependencies": { + "@scaleway/sdk-client": "workspace:^" + }, + "devDependencies": { + "@scaleway/sdk-client": "workspace:^" + } +} \ No newline at end of file diff --git a/packages_generated/datawarehouse/tsconfig.build.json b/packages_generated/datawarehouse/tsconfig.build.json new file mode 100644 index 000000000..19ca82000 --- /dev/null +++ b/packages_generated/datawarehouse/tsconfig.build.json @@ -0,0 +1,17 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "noEmit": false, + "emitDeclarationOnly": true, + "rootDir": "src", + "outDir": "dist" + }, + "exclude": [ + "dist/*", + "*.config.ts", + "*.setup.ts", + "**/__tests__", + "**/__mocks__", + "src/**/*.test.tsx" + ] +} diff --git a/packages_generated/datawarehouse/tsconfig.json b/packages_generated/datawarehouse/tsconfig.json new file mode 100644 index 000000000..7c2b0759a --- /dev/null +++ b/packages_generated/datawarehouse/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"] +} diff --git a/packages_generated/datawarehouse/vite.config.ts b/packages_generated/datawarehouse/vite.config.ts new file mode 100644 index 000000000..5c0513828 --- /dev/null +++ b/packages_generated/datawarehouse/vite.config.ts @@ -0,0 +1,14 @@ +/* eslint-disable eslint-comments/disable-enable-pair */ +/* eslint-disable import/no-default-export */ +/* eslint-disable import/no-relative-packages */ +/* eslint-disable import/no-extraneous-dependencies */ +import { defineConfig, mergeConfig } from 'vite' +import { defaultConfig } from '../../vite.config' + +export default mergeConfig(defineConfig(defaultConfig), { + build: { + lib: { + entry: 'src/index.gen.ts', + }, + }, +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4c742c97..6620645be 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -86,7 +86,7 @@ importers: specifier: ^1.8.16 version: 1.8.16 turbo: - specifier: 2.5.6 + specifier: ^2.5.6 version: 2.5.6 typedoc: specifier: 0.27.6 @@ -138,6 +138,9 @@ importers: '@scaleway/sdk-container': specifier: workspace:* version: link:../../packages_generated/container + '@scaleway/sdk-datawarehouse': + specifier: workspace:* + version: link:../../packages_generated/datawarehouse '@scaleway/sdk-dedibox': specifier: workspace:* version: link:../../packages_generated/dedibox @@ -359,6 +362,19 @@ importers: specifier: workspace:^ version: link:../../packages/client + packages_generated/datawarehouse: + dependencies: + '@scaleway/random-name': + specifier: 5.1.1 + version: 5.1.1 + '@scaleway/sdk-std': + specifier: workspace:* + version: link:../std + devDependencies: + '@scaleway/sdk-client': + specifier: workspace:^ + version: link:../../packages/client + packages_generated/dedibox: dependencies: '@scaleway/random-name':