diff --git a/packages/clients/src/api/webhosting/v1alpha1/index.gen.ts b/packages/clients/src/api/webhosting/v1alpha1/index.gen.ts index c770c965f..c950c310f 100644 --- a/packages/clients/src/api/webhosting/v1alpha1/index.gen.ts +++ b/packages/clients/src/api/webhosting/v1alpha1/index.gen.ts @@ -5,6 +5,7 @@ export * from './content.gen' export type { ControlPanel, CreateHostingRequest, + CreateHostingRequestDomainConfiguration, DeleteHostingRequest, DnsRecord, DnsRecordStatus, diff --git a/packages/clients/src/api/webhosting/v1alpha1/marshalling.gen.ts b/packages/clients/src/api/webhosting/v1alpha1/marshalling.gen.ts index 169915f88..e78948fdf 100644 --- a/packages/clients/src/api/webhosting/v1alpha1/marshalling.gen.ts +++ b/packages/clients/src/api/webhosting/v1alpha1/marshalling.gen.ts @@ -10,6 +10,7 @@ import type { DefaultValues } from '../../../bridge' import type { ControlPanel, CreateHostingRequest, + CreateHostingRequestDomainConfiguration, DnsRecord, DnsRecords, Hosting, @@ -231,11 +232,28 @@ export const unmarshalListOffersResponse = ( } as ListOffersResponse } +const marshalCreateHostingRequestDomainConfiguration = ( + request: CreateHostingRequestDomainConfiguration, + defaults: DefaultValues, +): Record => ({ + update_all_records: request.updateAllRecords, + update_mail_record: request.updateMailRecord, + update_nameservers: request.updateNameservers, + update_web_record: request.updateWebRecord, +}) + export const marshalCreateHostingRequest = ( request: CreateHostingRequest, defaults: DefaultValues, ): Record => ({ domain: request.domain, + domain_configuration: + request.domainConfiguration !== undefined + ? marshalCreateHostingRequestDomainConfiguration( + request.domainConfiguration, + defaults, + ) + : undefined, email: request.email, language: request.language, offer_id: request.offerId, diff --git a/packages/clients/src/api/webhosting/v1alpha1/types.gen.ts b/packages/clients/src/api/webhosting/v1alpha1/types.gen.ts index ef7b2cf01..37a7531de 100644 --- a/packages/clients/src/api/webhosting/v1alpha1/types.gen.ts +++ b/packages/clients/src/api/webhosting/v1alpha1/types.gen.ts @@ -74,6 +74,13 @@ export interface OfferProduct { maxAddonDomains: number } +export interface CreateHostingRequestDomainConfiguration { + updateNameservers: boolean + updateWebRecord: boolean + updateMailRecord: boolean + updateAllRecords: boolean +} + export interface DnsRecord { /** Record name. */ name: string @@ -199,6 +206,11 @@ export type CreateHostingRequest = { optionIds?: string[] /** Default language for the control panel interface. */ language?: StdLanguageCode + /** + * Indicates whether to update hosting domain name servers and DNS records for + * domains managed by Scaleway Elements. + */ + domainConfiguration?: CreateHostingRequestDomainConfiguration } export type DeleteHostingRequest = {