@scaleway/sdk 2.57.0 → 2.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ export type ListWebhookEventsRequestOrderBy = 'created_at_desc' | 'created_at_as
11
11
  export type ListWebhooksRequestOrderBy = 'created_at_desc' | 'created_at_asc';
12
12
  export type ProjectSettingsPeriodicReportFrequency = 'unknown_frequency' | 'monthly' | 'weekly' | 'daily';
13
13
  export type WebhookEventStatus = 'unknown_status' | 'sending' | 'sent' | 'failed';
14
- export type WebhookEventType = 'unknown_type' | 'email_queued' | 'email_dropped' | 'email_deferred' | 'email_delivered' | 'email_spam' | 'email_mailbox_not_found';
14
+ export type WebhookEventType = 'unknown_type' | 'email_queued' | 'email_dropped' | 'email_deferred' | 'email_delivered' | 'email_spam' | 'email_mailbox_not_found' | 'email_blocklisted' | 'blocklist_created';
15
15
  export interface DomainRecordsDMARC {
16
16
  /** Name of the DMARC TXT record. */
17
17
  name: string;
@@ -12,7 +12,7 @@ const jsonContentHeaders = {
12
12
  };
13
13
  class ControlPanelAPI extends api.API {
14
14
  /** Lists the available regions of the API. */
15
- static LOCALITIES = ["fr-par", "nl-ams"];
15
+ static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
16
16
  pageOfListControlPanels = (request = {}) => this.client.fetch(
17
17
  {
18
18
  method: "GET",
@@ -236,6 +236,44 @@ class DatabaseAPI extends api.API {
236
236
  marshalling_gen.unmarshalDatabaseUser
237
237
  );
238
238
  }
239
+ class DnsAPI extends api.API {
240
+ /** Lists the available regions of the API. */
241
+ static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
242
+ /**
243
+ * Get DNS records. Get the set of DNS records of a specified domain
244
+ * associated with a Web Hosting plan's domain.
245
+ *
246
+ * @param request - The request {@link DnsApiGetDomainDnsRecordsRequest}
247
+ * @returns A Promise of DnsRecords
248
+ */
249
+ getDomainDnsRecords = (request) => this.client.fetch(
250
+ {
251
+ method: "GET",
252
+ path: `/webhosting/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${marshalling.validatePathParam("domain", request.domain)}/dns-records`
253
+ },
254
+ marshalling_gen.unmarshalDnsRecords
255
+ );
256
+ /**
257
+ * "Check whether you own this domain or not.".
258
+ *
259
+ * @param request - The request {@link DnsApiCheckUserOwnsDomainRequest}
260
+ * @returns A Promise of CheckUserOwnsDomainResponse
261
+ */
262
+ checkUserOwnsDomain = (request) => this.client.fetch(
263
+ {
264
+ body: JSON.stringify(
265
+ marshalling_gen.marshalDnsApiCheckUserOwnsDomainRequest(
266
+ request,
267
+ this.client.settings
268
+ )
269
+ ),
270
+ headers: jsonContentHeaders,
271
+ method: "POST",
272
+ path: `/webhosting/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${marshalling.validatePathParam("domain", request.domain)}/check-ownership`
273
+ },
274
+ marshalling_gen.unmarshalCheckUserOwnsDomainResponse
275
+ );
276
+ }
239
277
  class OfferAPI extends api.API {
240
278
  /** Lists the available regions of the API. */
241
279
  static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
@@ -267,7 +305,7 @@ class OfferAPI extends api.API {
267
305
  }
268
306
  class HostingAPI extends api.API {
269
307
  /** Lists the available regions of the API. */
270
- static LOCALITIES = ["fr-par", "nl-ams"];
308
+ static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
271
309
  /**
272
310
  * Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer
273
311
  * type required via the `offer_id` parameter.
@@ -621,6 +659,7 @@ class WebsiteAPI extends api.API {
621
659
  }
622
660
  exports.ControlPanelAPI = ControlPanelAPI;
623
661
  exports.DatabaseAPI = DatabaseAPI;
662
+ exports.DnsAPI = DnsAPI;
624
663
  exports.FtpAccountAPI = FtpAccountAPI;
625
664
  exports.HostingAPI = HostingAPI;
626
665
  exports.MailAccountAPI = MailAccountAPI;
@@ -1,8 +1,8 @@
1
1
  import { API as ParentAPI } from '../../../bridge';
2
2
  import type { Region, WaitForOptions } from '../../../bridge';
3
- import type { ControlPanelApiListControlPanelsRequest, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, OfferApiListOffersRequest, ResetHostingPasswordResponse, ResourceSummary, Session, WebsiteApiListWebsitesRequest } from './types.gen';
3
+ import type { CheckUserOwnsDomainResponse, ControlPanelApiListControlPanelsRequest, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsRecords, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, OfferApiListOffersRequest, ResetHostingPasswordResponse, ResourceSummary, Session, WebsiteApiListWebsitesRequest } from './types.gen';
4
4
  /**
5
- * Web Hosting API.
5
+ * Web Hosting Control Panel API.
6
6
  *
7
7
  * This API allows you to manage your Web Hosting services.
8
8
  */
@@ -117,6 +117,30 @@ export declare class DatabaseAPI extends ParentAPI {
117
117
  */
118
118
  unassignDatabaseUser: (request: Readonly<DatabaseApiUnassignDatabaseUserRequest>) => Promise<DatabaseUser>;
119
119
  }
120
+ /**
121
+ * Web Hosting Dns API.
122
+ *
123
+ * This API allows you to manage your Web Hosting services.
124
+ */
125
+ export declare class DnsAPI extends ParentAPI {
126
+ /** Lists the available regions of the API. */
127
+ static readonly LOCALITIES: Region[];
128
+ /**
129
+ * Get DNS records. Get the set of DNS records of a specified domain
130
+ * associated with a Web Hosting plan's domain.
131
+ *
132
+ * @param request - The request {@link DnsApiGetDomainDnsRecordsRequest}
133
+ * @returns A Promise of DnsRecords
134
+ */
135
+ getDomainDnsRecords: (request: Readonly<DnsApiGetDomainDnsRecordsRequest>) => Promise<DnsRecords>;
136
+ /**
137
+ * "Check whether you own this domain or not.".
138
+ *
139
+ * @param request - The request {@link DnsApiCheckUserOwnsDomainRequest}
140
+ * @returns A Promise of CheckUserOwnsDomainResponse
141
+ */
142
+ checkUserOwnsDomain: (request: Readonly<DnsApiCheckUserOwnsDomainRequest>) => Promise<CheckUserOwnsDomainResponse>;
143
+ }
120
144
  /**
121
145
  * Web Hosting Offer API.
122
146
  *
@@ -4,13 +4,13 @@ import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
4
4
  import "../../../vendor/base64/index.js";
5
5
  import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
6
6
  import { HOSTING_TRANSIENT_STATUSES } from "./content.gen.js";
7
- import { unmarshalListControlPanelsResponse, marshalDatabaseApiCreateDatabaseRequest, unmarshalDatabase, unmarshalListDatabasesResponse, marshalDatabaseApiCreateDatabaseUserRequest, unmarshalDatabaseUser, unmarshalListDatabaseUsersResponse, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, unmarshalListOffersResponse, marshalHostingApiCreateHostingRequest, unmarshalHosting, unmarshalListHostingsResponse, marshalHostingApiUpdateHostingRequest, unmarshalSession, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, marshalFtpAccountApiCreateFtpAccountRequest, unmarshalFtpAccount, unmarshalListFtpAccountsResponse, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, unmarshalMailAccount, unmarshalListMailAccountsResponse, marshalMailAccountApiRemoveMailAccountRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, unmarshalListWebsitesResponse } from "./marshalling.gen.js";
7
+ import { unmarshalListControlPanelsResponse, marshalDatabaseApiCreateDatabaseRequest, unmarshalDatabase, unmarshalListDatabasesResponse, marshalDatabaseApiCreateDatabaseUserRequest, unmarshalDatabaseUser, unmarshalListDatabaseUsersResponse, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, unmarshalDnsRecords, marshalDnsApiCheckUserOwnsDomainRequest, unmarshalCheckUserOwnsDomainResponse, unmarshalListOffersResponse, marshalHostingApiCreateHostingRequest, unmarshalHosting, unmarshalListHostingsResponse, marshalHostingApiUpdateHostingRequest, unmarshalSession, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, marshalFtpAccountApiCreateFtpAccountRequest, unmarshalFtpAccount, unmarshalListFtpAccountsResponse, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, unmarshalMailAccount, unmarshalListMailAccountsResponse, marshalMailAccountApiRemoveMailAccountRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, unmarshalListWebsitesResponse } from "./marshalling.gen.js";
8
8
  const jsonContentHeaders = {
9
9
  "Content-Type": "application/json; charset=utf-8"
10
10
  };
11
11
  class ControlPanelAPI extends API$1 {
12
12
  /** Lists the available regions of the API. */
13
- static LOCALITIES = ["fr-par", "nl-ams"];
13
+ static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
14
14
  pageOfListControlPanels = (request = {}) => this.client.fetch(
15
15
  {
16
16
  method: "GET",
@@ -234,6 +234,44 @@ class DatabaseAPI extends API$1 {
234
234
  unmarshalDatabaseUser
235
235
  );
236
236
  }
237
+ class DnsAPI extends API$1 {
238
+ /** Lists the available regions of the API. */
239
+ static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
240
+ /**
241
+ * Get DNS records. Get the set of DNS records of a specified domain
242
+ * associated with a Web Hosting plan's domain.
243
+ *
244
+ * @param request - The request {@link DnsApiGetDomainDnsRecordsRequest}
245
+ * @returns A Promise of DnsRecords
246
+ */
247
+ getDomainDnsRecords = (request) => this.client.fetch(
248
+ {
249
+ method: "GET",
250
+ path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domain", request.domain)}/dns-records`
251
+ },
252
+ unmarshalDnsRecords
253
+ );
254
+ /**
255
+ * "Check whether you own this domain or not.".
256
+ *
257
+ * @param request - The request {@link DnsApiCheckUserOwnsDomainRequest}
258
+ * @returns A Promise of CheckUserOwnsDomainResponse
259
+ */
260
+ checkUserOwnsDomain = (request) => this.client.fetch(
261
+ {
262
+ body: JSON.stringify(
263
+ marshalDnsApiCheckUserOwnsDomainRequest(
264
+ request,
265
+ this.client.settings
266
+ )
267
+ ),
268
+ headers: jsonContentHeaders,
269
+ method: "POST",
270
+ path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domain", request.domain)}/check-ownership`
271
+ },
272
+ unmarshalCheckUserOwnsDomainResponse
273
+ );
274
+ }
237
275
  class OfferAPI extends API$1 {
238
276
  /** Lists the available regions of the API. */
239
277
  static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
@@ -265,7 +303,7 @@ class OfferAPI extends API$1 {
265
303
  }
266
304
  class HostingAPI extends API$1 {
267
305
  /** Lists the available regions of the API. */
268
- static LOCALITIES = ["fr-par", "nl-ams"];
306
+ static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
269
307
  /**
270
308
  * Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer
271
309
  * type required via the `offer_id` parameter.
@@ -620,6 +658,7 @@ class WebsiteAPI extends API$1 {
620
658
  export {
621
659
  ControlPanelAPI,
622
660
  DatabaseAPI,
661
+ DnsAPI,
623
662
  FtpAccountAPI,
624
663
  HostingAPI,
625
664
  MailAccountAPI,
@@ -5,6 +5,7 @@ const content_gen = require("./content.gen.cjs");
5
5
  const validationRules_gen = require("./validation-rules.gen.cjs");
6
6
  exports.ControlPanelAPI = api_gen.ControlPanelAPI;
7
7
  exports.DatabaseAPI = api_gen.DatabaseAPI;
8
+ exports.DnsAPI = api_gen.DnsAPI;
8
9
  exports.FtpAccountAPI = api_gen.FtpAccountAPI;
9
10
  exports.HostingAPI = api_gen.HostingAPI;
10
11
  exports.MailAccountAPI = api_gen.MailAccountAPI;
@@ -1,4 +1,4 @@
1
- export { ControlPanelAPI, DatabaseAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI, } from './api.gen';
1
+ export { ControlPanelAPI, DatabaseAPI, DnsAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI, } from './api.gen';
2
2
  export * from './content.gen';
3
- export type { ControlPanel, ControlPanelApiListControlPanelsRequest, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingCpanelUrls, HostingDnsStatus, HostingOption, HostingStatus, HostingSummary, HostingSummaryStatus, ListControlPanelsResponse, ListDatabaseUsersRequestOrderBy, ListDatabaseUsersResponse, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListFtpAccountsRequestOrderBy, ListFtpAccountsResponse, ListHostingsRequestOrderBy, ListHostingsResponse, ListMailAccountsRequestOrderBy, ListMailAccountsResponse, ListOffersRequestOrderBy, ListOffersResponse, ListWebsitesRequestOrderBy, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, Offer, OfferApiListOffersRequest, OfferOption, OfferOptionName, OfferOptionRequest, OfferOptionWarning, ResetHostingPasswordResponse, ResourceSummary, Session, Website, WebsiteApiListWebsitesRequest, } from './types.gen';
3
+ export type { CheckUserOwnsDomainResponse, ControlPanel, ControlPanelApiListControlPanelsRequest, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsRecord, DnsRecordStatus, DnsRecordType, DnsRecords, DnsRecordsStatus, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingStatus, HostingSummary, HostingSummaryStatus, HostingUser, ListControlPanelsResponse, ListDatabaseUsersRequestOrderBy, ListDatabaseUsersResponse, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListFtpAccountsRequestOrderBy, ListFtpAccountsResponse, ListHostingsRequestOrderBy, ListHostingsResponse, ListMailAccountsRequestOrderBy, ListMailAccountsResponse, ListOffersRequestOrderBy, ListOffersResponse, ListWebsitesRequestOrderBy, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, Nameserver, NameserverStatus, Offer, OfferApiListOffersRequest, OfferOption, OfferOptionName, OfferOptionRequest, OfferOptionWarning, Platform, PlatformControlPanel, PlatformControlPanelUrls, PlatformPlatformGroup, ResetHostingPasswordResponse, ResourceSummary, Session, Website, WebsiteApiListWebsitesRequest, } from './types.gen';
4
4
  export * as ValidationRules from './validation-rules.gen';
@@ -1,9 +1,10 @@
1
- import { ControlPanelAPI, DatabaseAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI } from "./api.gen.js";
1
+ import { ControlPanelAPI, DatabaseAPI, DnsAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI } from "./api.gen.js";
2
2
  import { HOSTING_SUMMARY_TRANSIENT_STATUSES, HOSTING_TRANSIENT_STATUSES } from "./content.gen.js";
3
3
  import * as validationRules_gen from "./validation-rules.gen.js";
4
4
  export {
5
5
  ControlPanelAPI,
6
6
  DatabaseAPI,
7
+ DnsAPI,
7
8
  FtpAccountAPI,
8
9
  HOSTING_SUMMARY_TRANSIENT_STATUSES,
9
10
  HOSTING_TRANSIENT_STATUSES,
@@ -47,10 +47,59 @@ const unmarshalMailAccount = (data) => {
47
47
  username: data.username
48
48
  };
49
49
  };
50
- const unmarshalHostingCpanelUrls = (data) => {
50
+ const unmarshalCheckUserOwnsDomainResponse = (data) => {
51
51
  if (!json.isJSONObject(data)) {
52
52
  throw new TypeError(
53
- `Unmarshalling the type 'HostingCpanelUrls' failed as data isn't a dictionary.`
53
+ `Unmarshalling the type 'CheckUserOwnsDomainResponse' failed as data isn't a dictionary.`
54
+ );
55
+ }
56
+ return {
57
+ ownsDomain: data.owns_domain
58
+ };
59
+ };
60
+ const unmarshalDnsRecord = (data) => {
61
+ if (!json.isJSONObject(data)) {
62
+ throw new TypeError(
63
+ `Unmarshalling the type 'DnsRecord' failed as data isn't a dictionary.`
64
+ );
65
+ }
66
+ return {
67
+ name: data.name,
68
+ priority: data.priority,
69
+ status: data.status,
70
+ ttl: data.ttl,
71
+ type: data.type,
72
+ value: data.value
73
+ };
74
+ };
75
+ const unmarshalNameserver = (data) => {
76
+ if (!json.isJSONObject(data)) {
77
+ throw new TypeError(
78
+ `Unmarshalling the type 'Nameserver' failed as data isn't a dictionary.`
79
+ );
80
+ }
81
+ return {
82
+ hostname: data.hostname,
83
+ isDefault: data.is_default,
84
+ status: data.status
85
+ };
86
+ };
87
+ const unmarshalDnsRecords = (data) => {
88
+ if (!json.isJSONObject(data)) {
89
+ throw new TypeError(
90
+ `Unmarshalling the type 'DnsRecords' failed as data isn't a dictionary.`
91
+ );
92
+ }
93
+ return {
94
+ nameServers: marshalling.unmarshalArrayOfObject(data.name_servers, unmarshalNameserver),
95
+ records: marshalling.unmarshalArrayOfObject(data.records, unmarshalDnsRecord),
96
+ status: data.status
97
+ };
98
+ };
99
+ const unmarshalPlatformControlPanelUrls = (data) => {
100
+ if (!json.isJSONObject(data)) {
101
+ throw new TypeError(
102
+ `Unmarshalling the type 'PlatformControlPanelUrls' failed as data isn't a dictionary.`
54
103
  );
55
104
  }
56
105
  return {
@@ -58,49 +107,98 @@ const unmarshalHostingCpanelUrls = (data) => {
58
107
  webmail: data.webmail
59
108
  };
60
109
  };
61
- const unmarshalHostingOption = (data) => {
110
+ const unmarshalOfferOption = (data) => {
62
111
  if (!json.isJSONObject(data)) {
63
112
  throw new TypeError(
64
- `Unmarshalling the type 'HostingOption' failed as data isn't a dictionary.`
113
+ `Unmarshalling the type 'OfferOption' failed as data isn't a dictionary.`
65
114
  );
66
115
  }
67
116
  return {
117
+ billingOperationPath: data.billing_operation_path,
118
+ currentValue: data.current_value,
68
119
  id: data.id,
120
+ maxValue: data.max_value,
121
+ minValue: data.min_value,
69
122
  name: data.name,
70
- quantity: data.quantity
123
+ price: data.price ? customMarshalling.unmarshalMoney(data.price) : void 0,
124
+ quotaWarning: data.quota_warning
71
125
  };
72
126
  };
73
- const unmarshalHosting = (data) => {
127
+ const unmarshalPlatformControlPanel = (data) => {
74
128
  if (!json.isJSONObject(data)) {
75
129
  throw new TypeError(
76
- `Unmarshalling the type 'Hosting' failed as data isn't a dictionary.`
130
+ `Unmarshalling the type 'PlatformControlPanel' failed as data isn't a dictionary.`
131
+ );
132
+ }
133
+ return {
134
+ name: data.name,
135
+ urls: data.urls ? unmarshalPlatformControlPanelUrls(data.urls) : void 0
136
+ };
137
+ };
138
+ const unmarshalHostingUser = (data) => {
139
+ if (!json.isJSONObject(data)) {
140
+ throw new TypeError(
141
+ `Unmarshalling the type 'HostingUser' failed as data isn't a dictionary.`
77
142
  );
78
143
  }
79
144
  return {
80
145
  contactEmail: data.contact_email,
146
+ oneTimePassword: data.one_time_password,
147
+ username: data.username
148
+ };
149
+ };
150
+ const unmarshalOffer = (data) => {
151
+ if (!json.isJSONObject(data)) {
152
+ throw new TypeError(
153
+ `Unmarshalling the type 'Offer' failed as data isn't a dictionary.`
154
+ );
155
+ }
156
+ return {
157
+ available: data.available,
158
+ billingOperationPath: data.billing_operation_path,
81
159
  controlPanelName: data.control_panel_name,
82
- cpanelUrls: data.cpanel_urls ? unmarshalHostingCpanelUrls(data.cpanel_urls) : void 0,
160
+ endOfLife: data.end_of_life,
161
+ id: data.id,
162
+ options: marshalling.unmarshalArrayOfObject(data.options, unmarshalOfferOption),
163
+ price: data.price ? customMarshalling.unmarshalMoney(data.price) : void 0
164
+ };
165
+ };
166
+ const unmarshalPlatform = (data) => {
167
+ if (!json.isJSONObject(data)) {
168
+ throw new TypeError(
169
+ `Unmarshalling the type 'Platform' failed as data isn't a dictionary.`
170
+ );
171
+ }
172
+ return {
173
+ controlPanel: data.control_panel ? unmarshalPlatformControlPanel(data.control_panel) : void 0,
174
+ groupName: data.group_name,
175
+ hostname: data.hostname,
176
+ ipv4: data.ipv4,
177
+ ipv6: data.ipv6,
178
+ number: data.number
179
+ };
180
+ };
181
+ const unmarshalHosting = (data) => {
182
+ if (!json.isJSONObject(data)) {
183
+ throw new TypeError(
184
+ `Unmarshalling the type 'Hosting' failed as data isn't a dictionary.`
185
+ );
186
+ }
187
+ return {
83
188
  createdAt: marshalling.unmarshalDate(data.created_at),
84
189
  dnsStatus: data.dns_status,
85
190
  domain: data.domain,
86
191
  id: data.id,
87
192
  ipv4: data.ipv4,
88
- ipv6: data.ipv6,
89
- offerEndOfLife: data.offer_end_of_life,
90
- offerId: data.offer_id,
91
- offerName: data.offer_name,
92
- oneTimePassword: data.one_time_password,
93
- options: marshalling.unmarshalArrayOfObject(data.options, unmarshalHostingOption),
94
- platformGroup: data.platform_group,
95
- platformHostname: data.platform_hostname,
96
- platformNumber: data.platform_number,
193
+ offer: data.offer ? unmarshalOffer(data.offer) : void 0,
194
+ platform: data.platform ? unmarshalPlatform(data.platform) : void 0,
97
195
  projectId: data.project_id,
98
196
  protected: data.protected,
99
197
  region: data.region,
100
198
  status: data.status,
101
199
  tags: data.tags,
102
200
  updatedAt: marshalling.unmarshalDate(data.updated_at),
103
- username: data.username
201
+ user: data.user ? unmarshalHostingUser(data.user) : void 0
104
202
  };
105
203
  };
106
204
  const unmarshalControlPanel = (data) => {
@@ -170,6 +268,7 @@ const unmarshalHostingSummary = (data) => {
170
268
  );
171
269
  }
172
270
  return {
271
+ createdAt: marshalling.unmarshalDate(data.created_at),
173
272
  domain: data.domain,
174
273
  id: data.id,
175
274
  projectId: data.project_id,
@@ -204,38 +303,6 @@ const unmarshalListMailAccountsResponse = (data) => {
204
303
  totalCount: data.total_count
205
304
  };
206
305
  };
207
- const unmarshalOfferOption = (data) => {
208
- if (!json.isJSONObject(data)) {
209
- throw new TypeError(
210
- `Unmarshalling the type 'OfferOption' failed as data isn't a dictionary.`
211
- );
212
- }
213
- return {
214
- billingOperationPath: data.billing_operation_path,
215
- currentValue: data.current_value,
216
- id: data.id,
217
- maxValue: data.max_value,
218
- minValue: data.min_value,
219
- name: data.name,
220
- quotaWarning: data.quota_warning
221
- };
222
- };
223
- const unmarshalOffer = (data) => {
224
- if (!json.isJSONObject(data)) {
225
- throw new TypeError(
226
- `Unmarshalling the type 'Offer' failed as data isn't a dictionary.`
227
- );
228
- }
229
- return {
230
- available: data.available,
231
- billingOperationPath: data.billing_operation_path,
232
- controlPanelName: data.control_panel_name,
233
- endOfLife: data.end_of_life,
234
- id: data.id,
235
- options: marshalling.unmarshalArrayOfObject(data.options, unmarshalOfferOption),
236
- price: data.price ? customMarshalling.unmarshalMoney(data.price) : void 0
237
- };
238
- };
239
306
  const unmarshalListOffersResponse = (data) => {
240
307
  if (!json.isJSONObject(data)) {
241
308
  throw new TypeError(
@@ -319,6 +386,9 @@ const marshalDatabaseApiCreateDatabaseUserRequest = (request, defaults) => ({
319
386
  const marshalDatabaseApiUnassignDatabaseUserRequest = (request, defaults) => ({
320
387
  username: request.username
321
388
  });
389
+ const marshalDnsApiCheckUserOwnsDomainRequest = (request, defaults) => ({
390
+ project_id: request.projectId ?? defaults.defaultProjectId
391
+ });
322
392
  const marshalFtpAccountApiChangeFtpAccountPasswordRequest = (request, defaults) => ({
323
393
  password: request.password
324
394
  });
@@ -380,6 +450,7 @@ exports.marshalDatabaseApiChangeDatabaseUserPasswordRequest = marshalDatabaseApi
380
450
  exports.marshalDatabaseApiCreateDatabaseRequest = marshalDatabaseApiCreateDatabaseRequest;
381
451
  exports.marshalDatabaseApiCreateDatabaseUserRequest = marshalDatabaseApiCreateDatabaseUserRequest;
382
452
  exports.marshalDatabaseApiUnassignDatabaseUserRequest = marshalDatabaseApiUnassignDatabaseUserRequest;
453
+ exports.marshalDnsApiCheckUserOwnsDomainRequest = marshalDnsApiCheckUserOwnsDomainRequest;
383
454
  exports.marshalFtpAccountApiChangeFtpAccountPasswordRequest = marshalFtpAccountApiChangeFtpAccountPasswordRequest;
384
455
  exports.marshalFtpAccountApiCreateFtpAccountRequest = marshalFtpAccountApiCreateFtpAccountRequest;
385
456
  exports.marshalHostingApiCreateHostingRequest = marshalHostingApiCreateHostingRequest;
@@ -387,8 +458,10 @@ exports.marshalHostingApiUpdateHostingRequest = marshalHostingApiUpdateHostingRe
387
458
  exports.marshalMailAccountApiChangeMailAccountPasswordRequest = marshalMailAccountApiChangeMailAccountPasswordRequest;
388
459
  exports.marshalMailAccountApiCreateMailAccountRequest = marshalMailAccountApiCreateMailAccountRequest;
389
460
  exports.marshalMailAccountApiRemoveMailAccountRequest = marshalMailAccountApiRemoveMailAccountRequest;
461
+ exports.unmarshalCheckUserOwnsDomainResponse = unmarshalCheckUserOwnsDomainResponse;
390
462
  exports.unmarshalDatabase = unmarshalDatabase;
391
463
  exports.unmarshalDatabaseUser = unmarshalDatabaseUser;
464
+ exports.unmarshalDnsRecords = unmarshalDnsRecords;
392
465
  exports.unmarshalFtpAccount = unmarshalFtpAccount;
393
466
  exports.unmarshalHosting = unmarshalHosting;
394
467
  exports.unmarshalListControlPanelsResponse = unmarshalListControlPanelsResponse;
@@ -1,9 +1,11 @@
1
1
  import type { DefaultValues } from '../../../bridge';
2
- import type { Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiRemoveMailAccountRequest, ResetHostingPasswordResponse, ResourceSummary, Session } from './types.gen';
2
+ import type { CheckUserOwnsDomainResponse, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsRecords, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiRemoveMailAccountRequest, ResetHostingPasswordResponse, ResourceSummary, Session } from './types.gen';
3
3
  export declare const unmarshalDatabaseUser: (data: unknown) => DatabaseUser;
4
4
  export declare const unmarshalDatabase: (data: unknown) => Database;
5
5
  export declare const unmarshalFtpAccount: (data: unknown) => FtpAccount;
6
6
  export declare const unmarshalMailAccount: (data: unknown) => MailAccount;
7
+ export declare const unmarshalCheckUserOwnsDomainResponse: (data: unknown) => CheckUserOwnsDomainResponse;
8
+ export declare const unmarshalDnsRecords: (data: unknown) => DnsRecords;
7
9
  export declare const unmarshalHosting: (data: unknown) => Hosting;
8
10
  export declare const unmarshalListControlPanelsResponse: (data: unknown) => ListControlPanelsResponse;
9
11
  export declare const unmarshalListDatabaseUsersResponse: (data: unknown) => ListDatabaseUsersResponse;
@@ -21,6 +23,7 @@ export declare const marshalDatabaseApiChangeDatabaseUserPasswordRequest: (reque
21
23
  export declare const marshalDatabaseApiCreateDatabaseRequest: (request: DatabaseApiCreateDatabaseRequest, defaults: DefaultValues) => Record<string, unknown>;
22
24
  export declare const marshalDatabaseApiCreateDatabaseUserRequest: (request: DatabaseApiCreateDatabaseUserRequest, defaults: DefaultValues) => Record<string, unknown>;
23
25
  export declare const marshalDatabaseApiUnassignDatabaseUserRequest: (request: DatabaseApiUnassignDatabaseUserRequest, defaults: DefaultValues) => Record<string, unknown>;
26
+ export declare const marshalDnsApiCheckUserOwnsDomainRequest: (request: DnsApiCheckUserOwnsDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
24
27
  export declare const marshalFtpAccountApiChangeFtpAccountPasswordRequest: (request: FtpAccountApiChangeFtpAccountPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
25
28
  export declare const marshalFtpAccountApiCreateFtpAccountRequest: (request: FtpAccountApiCreateFtpAccountRequest, defaults: DefaultValues) => Record<string, unknown>;
26
29
  export declare const marshalHostingApiCreateHostingRequest: (request: HostingApiCreateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;