Skip to content

Commit 71b90b0

Browse files
committed
feat: update generated APIs
1 parent 7ed8bf5 commit 71b90b0

File tree

4 files changed

+371
-126
lines changed

4 files changed

+371
-126
lines changed

packages/clients/src/api/webhosting/v1/api.gen.ts

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@ import {
1515
marshalDatabaseApiCreateDatabaseRequest,
1616
marshalDatabaseApiCreateDatabaseUserRequest,
1717
marshalDatabaseApiUnassignDatabaseUserRequest,
18+
marshalDnsApiCheckUserOwnsDomainRequest,
1819
marshalFtpAccountApiChangeFtpAccountPasswordRequest,
1920
marshalFtpAccountApiCreateFtpAccountRequest,
2021
marshalHostingApiCreateHostingRequest,
2122
marshalHostingApiUpdateHostingRequest,
2223
marshalMailAccountApiChangeMailAccountPasswordRequest,
2324
marshalMailAccountApiCreateMailAccountRequest,
2425
marshalMailAccountApiRemoveMailAccountRequest,
26+
unmarshalCheckUserOwnsDomainResponse,
2527
unmarshalDatabase,
2628
unmarshalDatabaseUser,
29+
unmarshalDnsRecords,
2730
unmarshalFtpAccount,
2831
unmarshalHosting,
2932
unmarshalListControlPanelsResponse,
@@ -40,6 +43,7 @@ import {
4043
unmarshalSession,
4144
} from './marshalling.gen'
4245
import type {
46+
CheckUserOwnsDomainResponse,
4347
ControlPanelApiListControlPanelsRequest,
4448
Database,
4549
DatabaseApiAssignDatabaseUserRequest,
@@ -54,6 +58,9 @@ import type {
5458
DatabaseApiListDatabasesRequest,
5559
DatabaseApiUnassignDatabaseUserRequest,
5660
DatabaseUser,
61+
DnsApiCheckUserOwnsDomainRequest,
62+
DnsApiGetDomainDnsRecordsRequest,
63+
DnsRecords,
5764
FtpAccount,
5865
FtpAccountApiChangeFtpAccountPasswordRequest,
5966
FtpAccountApiCreateFtpAccountRequest,
@@ -93,13 +100,13 @@ const jsonContentHeaders = {
93100
}
94101

95102
/**
96-
* Web Hosting API.
103+
* Web Hosting Control Panel API.
97104
*
98105
* This API allows you to manage your Web Hosting services.
99106
*/
100107
export class ControlPanelAPI extends ParentAPI {
101108
/** Lists the available regions of the API. */
102-
public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams']
109+
public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams', 'pl-waw']
103110

104111
protected pageOfListControlPanels = (
105112
request: Readonly<ControlPanelApiListControlPanelsRequest> = {},
@@ -380,6 +387,54 @@ export class DatabaseAPI extends ParentAPI {
380387
)
381388
}
382389

390+
/**
391+
* Web Hosting Dns API.
392+
*
393+
* This API allows you to manage your Web Hosting services.
394+
*/
395+
export class DnsAPI extends ParentAPI {
396+
/** Lists the available regions of the API. */
397+
public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams', 'pl-waw']
398+
399+
/**
400+
* Get DNS records. Get the set of DNS records of a specified domain
401+
* associated with a Web Hosting plan's domain.
402+
*
403+
* @param request - The request {@link DnsApiGetDomainDnsRecordsRequest}
404+
* @returns A Promise of DnsRecords
405+
*/
406+
getDomainDnsRecords = (request: Readonly<DnsApiGetDomainDnsRecordsRequest>) =>
407+
this.client.fetch<DnsRecords>(
408+
{
409+
method: 'GET',
410+
path: `/webhosting/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domain', request.domain)}/dns-records`,
411+
},
412+
unmarshalDnsRecords,
413+
)
414+
415+
/**
416+
* "Check whether you own this domain or not.".
417+
*
418+
* @param request - The request {@link DnsApiCheckUserOwnsDomainRequest}
419+
* @returns A Promise of CheckUserOwnsDomainResponse
420+
*/
421+
checkUserOwnsDomain = (request: Readonly<DnsApiCheckUserOwnsDomainRequest>) =>
422+
this.client.fetch<CheckUserOwnsDomainResponse>(
423+
{
424+
body: JSON.stringify(
425+
marshalDnsApiCheckUserOwnsDomainRequest(
426+
request,
427+
this.client.settings,
428+
),
429+
),
430+
headers: jsonContentHeaders,
431+
method: 'POST',
432+
path: `/webhosting/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domain', request.domain)}/check-ownership`,
433+
},
434+
unmarshalCheckUserOwnsDomainResponse,
435+
)
436+
}
437+
383438
/**
384439
* Web Hosting Offer API.
385440
*
@@ -428,7 +483,7 @@ export class OfferAPI extends ParentAPI {
428483
*/
429484
export class HostingAPI extends ParentAPI {
430485
/** Lists the available regions of the API. */
431-
public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams']
486+
public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams', 'pl-waw']
432487

433488
/**
434489
* Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer

packages/clients/src/api/webhosting/v1/index.gen.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
export {
44
ControlPanelAPI,
55
DatabaseAPI,
6+
DnsAPI,
67
FtpAccountAPI,
78
HostingAPI,
89
MailAccountAPI,
@@ -11,6 +12,7 @@ export {
1112
} from './api.gen'
1213
export * from './content.gen'
1314
export type {
15+
CheckUserOwnsDomainResponse,
1416
ControlPanel,
1517
ControlPanelApiListControlPanelsRequest,
1618
CreateHostingRequestDomainConfiguration,
@@ -27,6 +29,13 @@ export type {
2729
DatabaseApiListDatabasesRequest,
2830
DatabaseApiUnassignDatabaseUserRequest,
2931
DatabaseUser,
32+
DnsApiCheckUserOwnsDomainRequest,
33+
DnsApiGetDomainDnsRecordsRequest,
34+
DnsRecord,
35+
DnsRecordStatus,
36+
DnsRecordType,
37+
DnsRecords,
38+
DnsRecordsStatus,
3039
FtpAccount,
3140
FtpAccountApiChangeFtpAccountPasswordRequest,
3241
FtpAccountApiCreateFtpAccountRequest,
@@ -41,12 +50,10 @@ export type {
4150
HostingApiListHostingsRequest,
4251
HostingApiResetHostingPasswordRequest,
4352
HostingApiUpdateHostingRequest,
44-
HostingCpanelUrls,
45-
HostingDnsStatus,
46-
HostingOption,
4753
HostingStatus,
4854
HostingSummary,
4955
HostingSummaryStatus,
56+
HostingUser,
5057
ListControlPanelsResponse,
5158
ListDatabaseUsersRequestOrderBy,
5259
ListDatabaseUsersResponse,
@@ -67,12 +74,18 @@ export type {
6774
MailAccountApiCreateMailAccountRequest,
6875
MailAccountApiListMailAccountsRequest,
6976
MailAccountApiRemoveMailAccountRequest,
77+
Nameserver,
78+
NameserverStatus,
7079
Offer,
7180
OfferApiListOffersRequest,
7281
OfferOption,
7382
OfferOptionName,
7483
OfferOptionRequest,
7584
OfferOptionWarning,
85+
Platform,
86+
PlatformControlPanel,
87+
PlatformControlPanelUrls,
88+
PlatformPlatformGroup,
7689
ResetHostingPasswordResponse,
7790
ResourceSummary,
7891
Session,

0 commit comments

Comments
 (0)