Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 58 additions & 3 deletions packages/clients/src/api/webhosting/v1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@ import {
marshalDatabaseApiCreateDatabaseRequest,
marshalDatabaseApiCreateDatabaseUserRequest,
marshalDatabaseApiUnassignDatabaseUserRequest,
marshalDnsApiCheckUserOwnsDomainRequest,
marshalFtpAccountApiChangeFtpAccountPasswordRequest,
marshalFtpAccountApiCreateFtpAccountRequest,
marshalHostingApiCreateHostingRequest,
marshalHostingApiUpdateHostingRequest,
marshalMailAccountApiChangeMailAccountPasswordRequest,
marshalMailAccountApiCreateMailAccountRequest,
marshalMailAccountApiRemoveMailAccountRequest,
unmarshalCheckUserOwnsDomainResponse,
unmarshalDatabase,
unmarshalDatabaseUser,
unmarshalDnsRecords,
unmarshalFtpAccount,
unmarshalHosting,
unmarshalListControlPanelsResponse,
Expand All @@ -40,6 +43,7 @@ import {
unmarshalSession,
} from './marshalling.gen'
import type {
CheckUserOwnsDomainResponse,
ControlPanelApiListControlPanelsRequest,
Database,
DatabaseApiAssignDatabaseUserRequest,
Expand All @@ -54,6 +58,9 @@ import type {
DatabaseApiListDatabasesRequest,
DatabaseApiUnassignDatabaseUserRequest,
DatabaseUser,
DnsApiCheckUserOwnsDomainRequest,
DnsApiGetDomainDnsRecordsRequest,
DnsRecords,
FtpAccount,
FtpAccountApiChangeFtpAccountPasswordRequest,
FtpAccountApiCreateFtpAccountRequest,
Expand Down Expand Up @@ -93,13 +100,13 @@ const jsonContentHeaders = {
}

/**
* Web Hosting API.
* Web Hosting Control Panel API.
*
* This API allows you to manage your Web Hosting services.
*/
export class ControlPanelAPI extends ParentAPI {
/** Lists the available regions of the API. */
public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams']
public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams', 'pl-waw']

protected pageOfListControlPanels = (
request: Readonly<ControlPanelApiListControlPanelsRequest> = {},
Expand Down Expand Up @@ -380,6 +387,54 @@ export class DatabaseAPI extends ParentAPI {
)
}

/**
* Web Hosting Dns API.
*
* This API allows you to manage your Web Hosting services.
*/
export class DnsAPI extends ParentAPI {
/** Lists the available regions of the API. */
public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams', 'pl-waw']

/**
* Get DNS records. Get the set of DNS records of a specified domain
* associated with a Web Hosting plan's domain.
*
* @param request - The request {@link DnsApiGetDomainDnsRecordsRequest}
* @returns A Promise of DnsRecords
*/
getDomainDnsRecords = (request: Readonly<DnsApiGetDomainDnsRecordsRequest>) =>
this.client.fetch<DnsRecords>(
{
method: 'GET',
path: `/webhosting/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domain', request.domain)}/dns-records`,
},
unmarshalDnsRecords,
)

/**
* "Check whether you own this domain or not.".
*
* @param request - The request {@link DnsApiCheckUserOwnsDomainRequest}
* @returns A Promise of CheckUserOwnsDomainResponse
*/
checkUserOwnsDomain = (request: Readonly<DnsApiCheckUserOwnsDomainRequest>) =>
this.client.fetch<CheckUserOwnsDomainResponse>(
{
body: JSON.stringify(
marshalDnsApiCheckUserOwnsDomainRequest(
request,
this.client.settings,
),
),
headers: jsonContentHeaders,
method: 'POST',
path: `/webhosting/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domain', request.domain)}/check-ownership`,
},
unmarshalCheckUserOwnsDomainResponse,
)
}

/**
* Web Hosting Offer API.
*
Expand Down Expand Up @@ -428,7 +483,7 @@ export class OfferAPI extends ParentAPI {
*/
export class HostingAPI extends ParentAPI {
/** Lists the available regions of the API. */
public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams']
public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams', 'pl-waw']

/**
* Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer
Expand Down
19 changes: 16 additions & 3 deletions packages/clients/src/api/webhosting/v1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export {
ControlPanelAPI,
DatabaseAPI,
DnsAPI,
FtpAccountAPI,
HostingAPI,
MailAccountAPI,
Expand All @@ -11,6 +12,7 @@ export {
} from './api.gen'
export * from './content.gen'
export type {
CheckUserOwnsDomainResponse,
ControlPanel,
ControlPanelApiListControlPanelsRequest,
CreateHostingRequestDomainConfiguration,
Expand All @@ -27,6 +29,13 @@ export type {
DatabaseApiListDatabasesRequest,
DatabaseApiUnassignDatabaseUserRequest,
DatabaseUser,
DnsApiCheckUserOwnsDomainRequest,
DnsApiGetDomainDnsRecordsRequest,
DnsRecord,
DnsRecordStatus,
DnsRecordType,
DnsRecords,
DnsRecordsStatus,
FtpAccount,
FtpAccountApiChangeFtpAccountPasswordRequest,
FtpAccountApiCreateFtpAccountRequest,
Expand All @@ -41,12 +50,10 @@ export type {
HostingApiListHostingsRequest,
HostingApiResetHostingPasswordRequest,
HostingApiUpdateHostingRequest,
HostingCpanelUrls,
HostingDnsStatus,
HostingOption,
HostingStatus,
HostingSummary,
HostingSummaryStatus,
HostingUser,
ListControlPanelsResponse,
ListDatabaseUsersRequestOrderBy,
ListDatabaseUsersResponse,
Expand All @@ -67,12 +74,18 @@ export type {
MailAccountApiCreateMailAccountRequest,
MailAccountApiListMailAccountsRequest,
MailAccountApiRemoveMailAccountRequest,
Nameserver,
NameserverStatus,
Offer,
OfferApiListOffersRequest,
OfferOption,
OfferOptionName,
OfferOptionRequest,
OfferOptionWarning,
Platform,
PlatformControlPanel,
PlatformControlPanelUrls,
PlatformPlatformGroup,
ResetHostingPasswordResponse,
ResourceSummary,
Session,
Expand Down
Loading
Loading