hostinger-api-sdk 0.0.9 → 0.0.11

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.
package/dist/api.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 0.0.25
7
+ * API Version: 0.0.68
8
8
  *
9
9
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
10
10
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -19,8 +19,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
19
19
  });
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.VPSActionsApiAxiosParamCreator = exports.DomainsPortfolioApi = exports.DomainsPortfolioApiFactory = exports.DomainsPortfolioApiFp = exports.DomainsPortfolioApiAxiosParamCreator = exports.DomainsAvailabilityApi = exports.DomainsAvailabilityApiFactory = exports.DomainsAvailabilityApiFp = exports.DomainsAvailabilityApiAxiosParamCreator = exports.DNSZoneApi = exports.DNSZoneApiFactory = exports.DNSZoneApiFp = exports.DNSZoneApiAxiosParamCreator = exports.DNSSnapshotApi = exports.DNSSnapshotApiFactory = exports.DNSSnapshotApiFp = exports.DNSSnapshotApiAxiosParamCreator = exports.BillingSubscriptionsApi = exports.BillingSubscriptionsApiFactory = exports.BillingSubscriptionsApiFp = exports.BillingSubscriptionsApiAxiosParamCreator = exports.BillingPaymentMethodsApi = exports.BillingPaymentMethodsApiFactory = exports.BillingPaymentMethodsApiFp = exports.BillingPaymentMethodsApiAxiosParamCreator = exports.BillingOrdersApi = exports.BillingOrdersApiFactory = exports.BillingOrdersApiFp = exports.BillingOrdersApiAxiosParamCreator = exports.BillingCatalogApi = exports.BillingCatalogApiFactory = exports.BillingCatalogApiFp = exports.BillingCatalogApiAxiosParamCreator = exports.VPSV1VirtualMachineVirtualMachineResourceActionsLockEnum = exports.VPSV1VirtualMachineVirtualMachineResourceStateEnum = exports.VPSV1FirewallRulesStoreRequestSourceEnum = exports.VPSV1FirewallRulesStoreRequestProtocolEnum = exports.VPSV1FirewallFirewallRuleResourceProtocolEnum = exports.VPSV1FirewallFirewallRuleResourceActionEnum = exports.VPSV1ActionActionResourceStateEnum = exports.DomainsV1DomainDomainResourceStatusEnum = exports.DomainsV1DomainDomainResourceTypeEnum = exports.DNSV1ZoneUpdateRequestZoneInnerTypeEnum = exports.DNSV1ZoneRecordResourceTypeEnum = exports.DNSV1ZoneDestroyRequestFiltersInnerTypeEnum = exports.BillingV1SubscriptionSubscriptionResourceStatusEnum = exports.BillingV1SubscriptionCancelRequestCancelOptionEnum = exports.BillingV1SubscriptionCancelRequestReasonCodeEnum = exports.BillingV1OrderOrderResourceStatusEnum = exports.BillingV1CatalogCatalogItemPriceResourcePeriodUnitEnum = void 0;
23
- exports.VPSVirtualMachineApi = exports.VPSVirtualMachineApiFactory = exports.VPSVirtualMachineApiFp = exports.VPSVirtualMachineApiAxiosParamCreator = exports.VPSSnapshotsApi = exports.VPSSnapshotsApiFactory = exports.VPSSnapshotsApiFp = exports.VPSSnapshotsApiAxiosParamCreator = exports.VPSRecoveryApi = exports.VPSRecoveryApiFactory = exports.VPSRecoveryApiFp = exports.VPSRecoveryApiAxiosParamCreator = exports.VPSPublicKeysApi = exports.VPSPublicKeysApiFactory = exports.VPSPublicKeysApiFp = exports.VPSPublicKeysApiAxiosParamCreator = exports.VPSPostInstallScriptsApi = exports.VPSPostInstallScriptsApiFactory = exports.VPSPostInstallScriptsApiFp = exports.VPSPostInstallScriptsApiAxiosParamCreator = exports.VPSPTRRecordsApi = exports.VPSPTRRecordsApiFactory = exports.VPSPTRRecordsApiFp = exports.VPSPTRRecordsApiAxiosParamCreator = exports.VPSOSTemplatesApi = exports.VPSOSTemplatesApiFactory = exports.VPSOSTemplatesApiFp = exports.VPSOSTemplatesApiAxiosParamCreator = exports.VPSMalwareScannerApi = exports.VPSMalwareScannerApiFactory = exports.VPSMalwareScannerApiFp = exports.VPSMalwareScannerApiAxiosParamCreator = exports.VPSFirewallApi = exports.VPSFirewallApiFactory = exports.VPSFirewallApiFp = exports.VPSFirewallApiAxiosParamCreator = exports.VPSDataCentersApi = exports.VPSDataCentersApiFactory = exports.VPSDataCentersApiFp = exports.VPSDataCentersApiAxiosParamCreator = exports.VPSBackupsApi = exports.VPSBackupsApiFactory = exports.VPSBackupsApiFp = exports.VPSBackupsApiAxiosParamCreator = exports.VPSActionsApi = exports.VPSActionsApiFactory = exports.VPSActionsApiFp = void 0;
22
+ exports.DomainsAvailabilityApiFactory = exports.DomainsAvailabilityApiFp = exports.DomainsAvailabilityApiAxiosParamCreator = exports.DNSZoneApi = exports.DNSZoneApiFactory = exports.DNSZoneApiFp = exports.DNSZoneApiAxiosParamCreator = exports.DNSSnapshotApi = exports.DNSSnapshotApiFactory = exports.DNSSnapshotApiFp = exports.DNSSnapshotApiAxiosParamCreator = exports.BillingSubscriptionsApi = exports.BillingSubscriptionsApiFactory = exports.BillingSubscriptionsApiFp = exports.BillingSubscriptionsApiAxiosParamCreator = exports.BillingPaymentMethodsApi = exports.BillingPaymentMethodsApiFactory = exports.BillingPaymentMethodsApiFp = exports.BillingPaymentMethodsApiAxiosParamCreator = exports.BillingOrdersApi = exports.BillingOrdersApiFactory = exports.BillingOrdersApiFp = exports.BillingOrdersApiAxiosParamCreator = exports.GetCatalogItemListV1CategoryEnum = exports.BillingCatalogApi = exports.BillingCatalogApiFactory = exports.BillingCatalogApiFp = exports.BillingCatalogApiAxiosParamCreator = exports.VPSV1VirtualMachineVirtualMachineResourceActionsLockEnum = exports.VPSV1VirtualMachineVirtualMachineResourceStateEnum = exports.VPSV1FirewallRulesStoreRequestSourceEnum = exports.VPSV1FirewallRulesStoreRequestProtocolEnum = exports.VPSV1FirewallFirewallRuleResourceProtocolEnum = exports.VPSV1FirewallFirewallRuleResourceActionEnum = exports.VPSV1ActionActionResourceStateEnum = exports.DomainsV1WHOISStoreRequestEntityTypeEnum = exports.DomainsV1WHOISProfileResourceEntityTypeEnum = exports.DomainsV1ForwardingStoreRequestRedirectTypeEnum = exports.DomainsV1ForwardingForwardingResourceRedirectTypeEnum = exports.DomainsV1DomainDomainResourceStatusEnum = exports.DomainsV1DomainDomainResourceTypeEnum = exports.DomainsV1DomainDomainExtendedResourceStatusEnum = exports.DNSV1ZoneUpdateRequestZoneInnerTypeEnum = exports.DNSV1ZoneRecordResourceTypeEnum = exports.DNSV1ZoneDestroyRequestFiltersInnerTypeEnum = exports.BillingV1SubscriptionSubscriptionResourceStatusEnum = exports.BillingV1SubscriptionCancelRequestCancelOptionEnum = exports.BillingV1SubscriptionCancelRequestReasonCodeEnum = exports.BillingV1OrderOrderResourceStatusEnum = exports.BillingV1CatalogCatalogItemPriceResourcePeriodUnitEnum = void 0;
23
+ exports.VPSRecoveryApiAxiosParamCreator = exports.VPSPublicKeysApi = exports.VPSPublicKeysApiFactory = exports.VPSPublicKeysApiFp = exports.VPSPublicKeysApiAxiosParamCreator = exports.VPSPostInstallScriptsApi = exports.VPSPostInstallScriptsApiFactory = exports.VPSPostInstallScriptsApiFp = exports.VPSPostInstallScriptsApiAxiosParamCreator = exports.VPSPTRRecordsApi = exports.VPSPTRRecordsApiFactory = exports.VPSPTRRecordsApiFp = exports.VPSPTRRecordsApiAxiosParamCreator = exports.VPSOSTemplatesApi = exports.VPSOSTemplatesApiFactory = exports.VPSOSTemplatesApiFp = exports.VPSOSTemplatesApiAxiosParamCreator = exports.VPSMalwareScannerApi = exports.VPSMalwareScannerApiFactory = exports.VPSMalwareScannerApiFp = exports.VPSMalwareScannerApiAxiosParamCreator = exports.VPSFirewallApi = exports.VPSFirewallApiFactory = exports.VPSFirewallApiFp = exports.VPSFirewallApiAxiosParamCreator = exports.VPSDataCentersApi = exports.VPSDataCentersApiFactory = exports.VPSDataCentersApiFp = exports.VPSDataCentersApiAxiosParamCreator = exports.VPSBackupsApi = exports.VPSBackupsApiFactory = exports.VPSBackupsApiFp = exports.VPSBackupsApiAxiosParamCreator = exports.VPSActionsApi = exports.VPSActionsApiFactory = exports.VPSActionsApiFp = exports.VPSActionsApiAxiosParamCreator = exports.DomainsWHOISApi = exports.DomainsWHOISApiFactory = exports.DomainsWHOISApiFp = exports.DomainsWHOISApiAxiosParamCreator = exports.DomainsPortfolioApi = exports.DomainsPortfolioApiFactory = exports.DomainsPortfolioApiFp = exports.DomainsPortfolioApiAxiosParamCreator = exports.DomainsForwardingApi = exports.DomainsForwardingApiFactory = exports.DomainsForwardingApiFp = exports.DomainsForwardingApiAxiosParamCreator = exports.DomainsAvailabilityApi = void 0;
24
+ exports.VPSVirtualMachineApi = exports.VPSVirtualMachineApiFactory = exports.VPSVirtualMachineApiFp = exports.VPSVirtualMachineApiAxiosParamCreator = exports.VPSSnapshotsApi = exports.VPSSnapshotsApiFactory = exports.VPSSnapshotsApiFp = exports.VPSSnapshotsApiAxiosParamCreator = exports.VPSRecoveryApi = exports.VPSRecoveryApiFactory = exports.VPSRecoveryApiFp = void 0;
24
25
  const axios_1 = require("axios");
25
26
  // Some imports not used depending on template conditions
26
27
  // @ts-ignore
@@ -96,6 +97,13 @@ exports.DNSV1ZoneUpdateRequestZoneInnerTypeEnum = {
96
97
  Srv: 'SRV',
97
98
  Caa: 'CAA'
98
99
  };
100
+ exports.DomainsV1DomainDomainExtendedResourceStatusEnum = {
101
+ Active: 'active',
102
+ PendingSetup: 'pending_setup',
103
+ Expired: 'expired',
104
+ Requested: 'requested',
105
+ PendingVerification: 'pending_verification'
106
+ };
99
107
  exports.DomainsV1DomainDomainResourceTypeEnum = {
100
108
  Domain: 'domain',
101
109
  FreeDomain: 'free_domain'
@@ -103,7 +111,25 @@ exports.DomainsV1DomainDomainResourceTypeEnum = {
103
111
  exports.DomainsV1DomainDomainResourceStatusEnum = {
104
112
  Active: 'active',
105
113
  PendingSetup: 'pending_setup',
106
- Expired: 'expired'
114
+ Expired: 'expired',
115
+ Requested: 'requested',
116
+ PendingVerification: 'pending_verification'
117
+ };
118
+ exports.DomainsV1ForwardingForwardingResourceRedirectTypeEnum = {
119
+ _301: '301',
120
+ _302: '302'
121
+ };
122
+ exports.DomainsV1ForwardingStoreRequestRedirectTypeEnum = {
123
+ _301: '301',
124
+ _302: '302'
125
+ };
126
+ exports.DomainsV1WHOISProfileResourceEntityTypeEnum = {
127
+ Individual: 'individual',
128
+ Organization: 'organization'
129
+ };
130
+ exports.DomainsV1WHOISStoreRequestEntityTypeEnum = {
131
+ Individual: 'individual',
132
+ Organization: 'organization'
107
133
  };
108
134
  exports.VPSV1ActionActionResourceStateEnum = {
109
135
  Success: 'success',
@@ -181,10 +207,12 @@ const BillingCatalogApiAxiosParamCreator = function (configuration) {
181
207
  /**
182
208
  * This endpoint retrieves a list of catalog items available for order. Prices in catalog items is displayed as cents (without floating point), e.g: float `17.99` is displayed as integer `1799`.
183
209
  * @summary Get catalog item list
210
+ * @param {GetCatalogItemListV1CategoryEnum} [category] Filter catalog items by category
211
+ * @param {string} [name] Filter catalog items by name. Use `*` for wildcard search, e.g. `.COM*` to find .com domain
184
212
  * @param {*} [options] Override http request option.
185
213
  * @throws {RequiredError}
186
214
  */
187
- getCatalogItemListV1: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
215
+ getCatalogItemListV1: (category_1, name_1, ...args_1) => __awaiter(this, [category_1, name_1, ...args_1], void 0, function* (category, name, options = {}) {
188
216
  const localVarPath = `/api/billing/v1/catalog`;
189
217
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
190
218
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -198,6 +226,12 @@ const BillingCatalogApiAxiosParamCreator = function (configuration) {
198
226
  // authentication apiToken required
199
227
  // http bearer authentication required
200
228
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
229
+ if (category !== undefined) {
230
+ localVarQueryParameter['category'] = category;
231
+ }
232
+ if (name !== undefined) {
233
+ localVarQueryParameter['name'] = name;
234
+ }
201
235
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
202
236
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
203
237
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -219,13 +253,15 @@ const BillingCatalogApiFp = function (configuration) {
219
253
  /**
220
254
  * This endpoint retrieves a list of catalog items available for order. Prices in catalog items is displayed as cents (without floating point), e.g: float `17.99` is displayed as integer `1799`.
221
255
  * @summary Get catalog item list
256
+ * @param {GetCatalogItemListV1CategoryEnum} [category] Filter catalog items by category
257
+ * @param {string} [name] Filter catalog items by name. Use `*` for wildcard search, e.g. `.COM*` to find .com domain
222
258
  * @param {*} [options] Override http request option.
223
259
  * @throws {RequiredError}
224
260
  */
225
- getCatalogItemListV1(options) {
261
+ getCatalogItemListV1(category, name, options) {
226
262
  return __awaiter(this, void 0, void 0, function* () {
227
263
  var _a, _b;
228
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getCatalogItemListV1(options);
264
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCatalogItemListV1(category, name, options);
229
265
  const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['BillingCatalogApi.getCatalogItemListV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
230
266
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
231
267
  });
@@ -243,11 +279,13 @@ const BillingCatalogApiFactory = function (configuration, basePath, axios) {
243
279
  /**
244
280
  * This endpoint retrieves a list of catalog items available for order. Prices in catalog items is displayed as cents (without floating point), e.g: float `17.99` is displayed as integer `1799`.
245
281
  * @summary Get catalog item list
282
+ * @param {GetCatalogItemListV1CategoryEnum} [category] Filter catalog items by category
283
+ * @param {string} [name] Filter catalog items by name. Use `*` for wildcard search, e.g. `.COM*` to find .com domain
246
284
  * @param {*} [options] Override http request option.
247
285
  * @throws {RequiredError}
248
286
  */
249
- getCatalogItemListV1(options) {
250
- return localVarFp.getCatalogItemListV1(options).then((request) => request(axios, basePath));
287
+ getCatalogItemListV1(category, name, options) {
288
+ return localVarFp.getCatalogItemListV1(category, name, options).then((request) => request(axios, basePath));
251
289
  },
252
290
  };
253
291
  };
@@ -262,15 +300,24 @@ class BillingCatalogApi extends base_1.BaseAPI {
262
300
  /**
263
301
  * This endpoint retrieves a list of catalog items available for order. Prices in catalog items is displayed as cents (without floating point), e.g: float `17.99` is displayed as integer `1799`.
264
302
  * @summary Get catalog item list
303
+ * @param {GetCatalogItemListV1CategoryEnum} [category] Filter catalog items by category
304
+ * @param {string} [name] Filter catalog items by name. Use `*` for wildcard search, e.g. `.COM*` to find .com domain
265
305
  * @param {*} [options] Override http request option.
266
306
  * @throws {RequiredError}
267
307
  * @memberof BillingCatalogApi
268
308
  */
269
- getCatalogItemListV1(options) {
270
- return (0, exports.BillingCatalogApiFp)(this.configuration).getCatalogItemListV1(options).then((request) => request(this.axios, this.basePath));
309
+ getCatalogItemListV1(category, name, options) {
310
+ return (0, exports.BillingCatalogApiFp)(this.configuration).getCatalogItemListV1(category, name, options).then((request) => request(this.axios, this.basePath));
271
311
  }
272
312
  }
273
313
  exports.BillingCatalogApi = BillingCatalogApi;
314
+ /**
315
+ * @export
316
+ */
317
+ exports.GetCatalogItemListV1CategoryEnum = {
318
+ Domain: 'DOMAIN',
319
+ Vps: 'VPS'
320
+ };
274
321
  /**
275
322
  * BillingOrdersApi - axios parameter creator
276
323
  * @export
@@ -278,10 +325,11 @@ exports.BillingCatalogApi = BillingCatalogApi;
278
325
  const BillingOrdersApiAxiosParamCreator = function (configuration) {
279
326
  return {
280
327
  /**
281
- * This endpoint creates a new service order. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
328
+ * This endpoint creates a new service order. **DEPRECATED** To purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead. To purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
282
329
  * @summary Create new service order
283
330
  * @param {BillingV1OrderStoreRequest} billingV1OrderStoreRequest
284
331
  * @param {*} [options] Override http request option.
332
+ * @deprecated
285
333
  * @throws {RequiredError}
286
334
  */
287
335
  createNewServiceOrderV1: (billingV1OrderStoreRequest_1, ...args_1) => __awaiter(this, [billingV1OrderStoreRequest_1, ...args_1], void 0, function* (billingV1OrderStoreRequest, options = {}) {
@@ -321,10 +369,11 @@ const BillingOrdersApiFp = function (configuration) {
321
369
  const localVarAxiosParamCreator = (0, exports.BillingOrdersApiAxiosParamCreator)(configuration);
322
370
  return {
323
371
  /**
324
- * This endpoint creates a new service order. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
372
+ * This endpoint creates a new service order. **DEPRECATED** To purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead. To purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
325
373
  * @summary Create new service order
326
374
  * @param {BillingV1OrderStoreRequest} billingV1OrderStoreRequest
327
375
  * @param {*} [options] Override http request option.
376
+ * @deprecated
328
377
  * @throws {RequiredError}
329
378
  */
330
379
  createNewServiceOrderV1(billingV1OrderStoreRequest, options) {
@@ -346,10 +395,11 @@ const BillingOrdersApiFactory = function (configuration, basePath, axios) {
346
395
  const localVarFp = (0, exports.BillingOrdersApiFp)(configuration);
347
396
  return {
348
397
  /**
349
- * This endpoint creates a new service order. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
398
+ * This endpoint creates a new service order. **DEPRECATED** To purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead. To purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
350
399
  * @summary Create new service order
351
400
  * @param {BillingV1OrderStoreRequest} billingV1OrderStoreRequest
352
401
  * @param {*} [options] Override http request option.
402
+ * @deprecated
353
403
  * @throws {RequiredError}
354
404
  */
355
405
  createNewServiceOrderV1(billingV1OrderStoreRequest, options) {
@@ -366,10 +416,11 @@ exports.BillingOrdersApiFactory = BillingOrdersApiFactory;
366
416
  */
367
417
  class BillingOrdersApi extends base_1.BaseAPI {
368
418
  /**
369
- * This endpoint creates a new service order. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
419
+ * This endpoint creates a new service order. **DEPRECATED** To purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead. To purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead. To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity. Coupons also can be provided during order creation. Orders created using this endpoint will be set for automatic renewal. Some `credit_card` payments might need additional verification, rendering purchase unprocessed. We recommend use other payment methods than `credit_card` if you encounter this issue.
370
420
  * @summary Create new service order
371
421
  * @param {BillingV1OrderStoreRequest} billingV1OrderStoreRequest
372
422
  * @param {*} [options] Override http request option.
423
+ * @deprecated
373
424
  * @throws {RequiredError}
374
425
  * @memberof BillingOrdersApi
375
426
  */
@@ -1461,120 +1512,1080 @@ exports.DNSZoneApi = DNSZoneApi;
1461
1512
  const DomainsAvailabilityApiAxiosParamCreator = function (configuration) {
1462
1513
  return {
1463
1514
  /**
1464
- * This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. Endpoint has rate limit of 10 requests per minute.
1465
- * @summary Check domain availability
1466
- * @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
1515
+ * This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. If you want to get alternative domains with response, provide only one TLD in the request and set `with_alternatives` to `true`. TLDs should be provided without the leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of 10 requests per minute.
1516
+ * @summary Check domain availability
1517
+ * @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
1518
+ * @param {*} [options] Override http request option.
1519
+ * @throws {RequiredError}
1520
+ */
1521
+ checkDomainAvailabilityV1: (domainsV1AvailabilityAvailabilityRequest_1, ...args_1) => __awaiter(this, [domainsV1AvailabilityAvailabilityRequest_1, ...args_1], void 0, function* (domainsV1AvailabilityAvailabilityRequest, options = {}) {
1522
+ // verify required parameter 'domainsV1AvailabilityAvailabilityRequest' is not null or undefined
1523
+ (0, common_1.assertParamExists)('checkDomainAvailabilityV1', 'domainsV1AvailabilityAvailabilityRequest', domainsV1AvailabilityAvailabilityRequest);
1524
+ const localVarPath = `/api/domains/v1/availability`;
1525
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1526
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1527
+ let baseOptions;
1528
+ if (configuration) {
1529
+ baseOptions = configuration.baseOptions;
1530
+ }
1531
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1532
+ const localVarHeaderParameter = {};
1533
+ const localVarQueryParameter = {};
1534
+ // authentication apiToken required
1535
+ // http bearer authentication required
1536
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1537
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1538
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1539
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1540
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1541
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(domainsV1AvailabilityAvailabilityRequest, localVarRequestOptions, configuration);
1542
+ return {
1543
+ url: (0, common_1.toPathString)(localVarUrlObj),
1544
+ options: localVarRequestOptions,
1545
+ };
1546
+ }),
1547
+ };
1548
+ };
1549
+ exports.DomainsAvailabilityApiAxiosParamCreator = DomainsAvailabilityApiAxiosParamCreator;
1550
+ /**
1551
+ * DomainsAvailabilityApi - functional programming interface
1552
+ * @export
1553
+ */
1554
+ const DomainsAvailabilityApiFp = function (configuration) {
1555
+ const localVarAxiosParamCreator = (0, exports.DomainsAvailabilityApiAxiosParamCreator)(configuration);
1556
+ return {
1557
+ /**
1558
+ * This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. If you want to get alternative domains with response, provide only one TLD in the request and set `with_alternatives` to `true`. TLDs should be provided without the leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of 10 requests per minute.
1559
+ * @summary Check domain availability
1560
+ * @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
1561
+ * @param {*} [options] Override http request option.
1562
+ * @throws {RequiredError}
1563
+ */
1564
+ checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options) {
1565
+ return __awaiter(this, void 0, void 0, function* () {
1566
+ var _a, _b;
1567
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options);
1568
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsAvailabilityApi.checkDomainAvailabilityV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1569
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1570
+ });
1571
+ },
1572
+ };
1573
+ };
1574
+ exports.DomainsAvailabilityApiFp = DomainsAvailabilityApiFp;
1575
+ /**
1576
+ * DomainsAvailabilityApi - factory interface
1577
+ * @export
1578
+ */
1579
+ const DomainsAvailabilityApiFactory = function (configuration, basePath, axios) {
1580
+ const localVarFp = (0, exports.DomainsAvailabilityApiFp)(configuration);
1581
+ return {
1582
+ /**
1583
+ * This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. If you want to get alternative domains with response, provide only one TLD in the request and set `with_alternatives` to `true`. TLDs should be provided without the leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of 10 requests per minute.
1584
+ * @summary Check domain availability
1585
+ * @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
1586
+ * @param {*} [options] Override http request option.
1587
+ * @throws {RequiredError}
1588
+ */
1589
+ checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options) {
1590
+ return localVarFp.checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options).then((request) => request(axios, basePath));
1591
+ },
1592
+ };
1593
+ };
1594
+ exports.DomainsAvailabilityApiFactory = DomainsAvailabilityApiFactory;
1595
+ /**
1596
+ * DomainsAvailabilityApi - object-oriented interface
1597
+ * @export
1598
+ * @class DomainsAvailabilityApi
1599
+ * @extends {BaseAPI}
1600
+ */
1601
+ class DomainsAvailabilityApi extends base_1.BaseAPI {
1602
+ /**
1603
+ * This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. If you want to get alternative domains with response, provide only one TLD in the request and set `with_alternatives` to `true`. TLDs should be provided without the leading dot (e.g. `com`, `net`, `org`). Endpoint has rate limit of 10 requests per minute.
1604
+ * @summary Check domain availability
1605
+ * @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
1606
+ * @param {*} [options] Override http request option.
1607
+ * @throws {RequiredError}
1608
+ * @memberof DomainsAvailabilityApi
1609
+ */
1610
+ checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options) {
1611
+ return (0, exports.DomainsAvailabilityApiFp)(this.configuration).checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options).then((request) => request(this.axios, this.basePath));
1612
+ }
1613
+ }
1614
+ exports.DomainsAvailabilityApi = DomainsAvailabilityApi;
1615
+ /**
1616
+ * DomainsForwardingApi - axios parameter creator
1617
+ * @export
1618
+ */
1619
+ const DomainsForwardingApiAxiosParamCreator = function (configuration) {
1620
+ return {
1621
+ /**
1622
+ * This endpoint creates domain forwarding data.
1623
+ * @summary Create forwarding data
1624
+ * @param {DomainsV1ForwardingStoreRequest} domainsV1ForwardingStoreRequest
1625
+ * @param {*} [options] Override http request option.
1626
+ * @throws {RequiredError}
1627
+ */
1628
+ createForwardingDataV1: (domainsV1ForwardingStoreRequest_1, ...args_1) => __awaiter(this, [domainsV1ForwardingStoreRequest_1, ...args_1], void 0, function* (domainsV1ForwardingStoreRequest, options = {}) {
1629
+ // verify required parameter 'domainsV1ForwardingStoreRequest' is not null or undefined
1630
+ (0, common_1.assertParamExists)('createForwardingDataV1', 'domainsV1ForwardingStoreRequest', domainsV1ForwardingStoreRequest);
1631
+ const localVarPath = `/api/domains/v1/forwarding`;
1632
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1633
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1634
+ let baseOptions;
1635
+ if (configuration) {
1636
+ baseOptions = configuration.baseOptions;
1637
+ }
1638
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1639
+ const localVarHeaderParameter = {};
1640
+ const localVarQueryParameter = {};
1641
+ // authentication apiToken required
1642
+ // http bearer authentication required
1643
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1644
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1645
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1646
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1647
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1648
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(domainsV1ForwardingStoreRequest, localVarRequestOptions, configuration);
1649
+ return {
1650
+ url: (0, common_1.toPathString)(localVarUrlObj),
1651
+ options: localVarRequestOptions,
1652
+ };
1653
+ }),
1654
+ /**
1655
+ * This endpoint deletes domain forwarding data.
1656
+ * @summary Delete forwarding data
1657
+ * @param {string} domain Domain name
1658
+ * @param {*} [options] Override http request option.
1659
+ * @throws {RequiredError}
1660
+ */
1661
+ deleteForwardingDataV1: (domain_1, ...args_1) => __awaiter(this, [domain_1, ...args_1], void 0, function* (domain, options = {}) {
1662
+ // verify required parameter 'domain' is not null or undefined
1663
+ (0, common_1.assertParamExists)('deleteForwardingDataV1', 'domain', domain);
1664
+ const localVarPath = `/api/domains/v1/forwarding/{domain}`
1665
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
1666
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1667
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1668
+ let baseOptions;
1669
+ if (configuration) {
1670
+ baseOptions = configuration.baseOptions;
1671
+ }
1672
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1673
+ const localVarHeaderParameter = {};
1674
+ const localVarQueryParameter = {};
1675
+ // authentication apiToken required
1676
+ // http bearer authentication required
1677
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1678
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1679
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1680
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1681
+ return {
1682
+ url: (0, common_1.toPathString)(localVarUrlObj),
1683
+ options: localVarRequestOptions,
1684
+ };
1685
+ }),
1686
+ /**
1687
+ * This endpoint retrieves domain forwarding data.
1688
+ * @summary Get forwarding data
1689
+ * @param {string} domain Domain name
1690
+ * @param {*} [options] Override http request option.
1691
+ * @throws {RequiredError}
1692
+ */
1693
+ getForwardingDataV1: (domain_1, ...args_1) => __awaiter(this, [domain_1, ...args_1], void 0, function* (domain, options = {}) {
1694
+ // verify required parameter 'domain' is not null or undefined
1695
+ (0, common_1.assertParamExists)('getForwardingDataV1', 'domain', domain);
1696
+ const localVarPath = `/api/domains/v1/forwarding/{domain}`
1697
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
1698
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1699
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1700
+ let baseOptions;
1701
+ if (configuration) {
1702
+ baseOptions = configuration.baseOptions;
1703
+ }
1704
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1705
+ const localVarHeaderParameter = {};
1706
+ const localVarQueryParameter = {};
1707
+ // authentication apiToken required
1708
+ // http bearer authentication required
1709
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1710
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1711
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1712
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1713
+ return {
1714
+ url: (0, common_1.toPathString)(localVarUrlObj),
1715
+ options: localVarRequestOptions,
1716
+ };
1717
+ }),
1718
+ };
1719
+ };
1720
+ exports.DomainsForwardingApiAxiosParamCreator = DomainsForwardingApiAxiosParamCreator;
1721
+ /**
1722
+ * DomainsForwardingApi - functional programming interface
1723
+ * @export
1724
+ */
1725
+ const DomainsForwardingApiFp = function (configuration) {
1726
+ const localVarAxiosParamCreator = (0, exports.DomainsForwardingApiAxiosParamCreator)(configuration);
1727
+ return {
1728
+ /**
1729
+ * This endpoint creates domain forwarding data.
1730
+ * @summary Create forwarding data
1731
+ * @param {DomainsV1ForwardingStoreRequest} domainsV1ForwardingStoreRequest
1732
+ * @param {*} [options] Override http request option.
1733
+ * @throws {RequiredError}
1734
+ */
1735
+ createForwardingDataV1(domainsV1ForwardingStoreRequest, options) {
1736
+ return __awaiter(this, void 0, void 0, function* () {
1737
+ var _a, _b;
1738
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createForwardingDataV1(domainsV1ForwardingStoreRequest, options);
1739
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsForwardingApi.createForwardingDataV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1740
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1741
+ });
1742
+ },
1743
+ /**
1744
+ * This endpoint deletes domain forwarding data.
1745
+ * @summary Delete forwarding data
1746
+ * @param {string} domain Domain name
1747
+ * @param {*} [options] Override http request option.
1748
+ * @throws {RequiredError}
1749
+ */
1750
+ deleteForwardingDataV1(domain, options) {
1751
+ return __awaiter(this, void 0, void 0, function* () {
1752
+ var _a, _b;
1753
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteForwardingDataV1(domain, options);
1754
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsForwardingApi.deleteForwardingDataV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1755
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1756
+ });
1757
+ },
1758
+ /**
1759
+ * This endpoint retrieves domain forwarding data.
1760
+ * @summary Get forwarding data
1761
+ * @param {string} domain Domain name
1762
+ * @param {*} [options] Override http request option.
1763
+ * @throws {RequiredError}
1764
+ */
1765
+ getForwardingDataV1(domain, options) {
1766
+ return __awaiter(this, void 0, void 0, function* () {
1767
+ var _a, _b;
1768
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getForwardingDataV1(domain, options);
1769
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsForwardingApi.getForwardingDataV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1770
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1771
+ });
1772
+ },
1773
+ };
1774
+ };
1775
+ exports.DomainsForwardingApiFp = DomainsForwardingApiFp;
1776
+ /**
1777
+ * DomainsForwardingApi - factory interface
1778
+ * @export
1779
+ */
1780
+ const DomainsForwardingApiFactory = function (configuration, basePath, axios) {
1781
+ const localVarFp = (0, exports.DomainsForwardingApiFp)(configuration);
1782
+ return {
1783
+ /**
1784
+ * This endpoint creates domain forwarding data.
1785
+ * @summary Create forwarding data
1786
+ * @param {DomainsV1ForwardingStoreRequest} domainsV1ForwardingStoreRequest
1787
+ * @param {*} [options] Override http request option.
1788
+ * @throws {RequiredError}
1789
+ */
1790
+ createForwardingDataV1(domainsV1ForwardingStoreRequest, options) {
1791
+ return localVarFp.createForwardingDataV1(domainsV1ForwardingStoreRequest, options).then((request) => request(axios, basePath));
1792
+ },
1793
+ /**
1794
+ * This endpoint deletes domain forwarding data.
1795
+ * @summary Delete forwarding data
1796
+ * @param {string} domain Domain name
1797
+ * @param {*} [options] Override http request option.
1798
+ * @throws {RequiredError}
1799
+ */
1800
+ deleteForwardingDataV1(domain, options) {
1801
+ return localVarFp.deleteForwardingDataV1(domain, options).then((request) => request(axios, basePath));
1802
+ },
1803
+ /**
1804
+ * This endpoint retrieves domain forwarding data.
1805
+ * @summary Get forwarding data
1806
+ * @param {string} domain Domain name
1807
+ * @param {*} [options] Override http request option.
1808
+ * @throws {RequiredError}
1809
+ */
1810
+ getForwardingDataV1(domain, options) {
1811
+ return localVarFp.getForwardingDataV1(domain, options).then((request) => request(axios, basePath));
1812
+ },
1813
+ };
1814
+ };
1815
+ exports.DomainsForwardingApiFactory = DomainsForwardingApiFactory;
1816
+ /**
1817
+ * DomainsForwardingApi - object-oriented interface
1818
+ * @export
1819
+ * @class DomainsForwardingApi
1820
+ * @extends {BaseAPI}
1821
+ */
1822
+ class DomainsForwardingApi extends base_1.BaseAPI {
1823
+ /**
1824
+ * This endpoint creates domain forwarding data.
1825
+ * @summary Create forwarding data
1826
+ * @param {DomainsV1ForwardingStoreRequest} domainsV1ForwardingStoreRequest
1827
+ * @param {*} [options] Override http request option.
1828
+ * @throws {RequiredError}
1829
+ * @memberof DomainsForwardingApi
1830
+ */
1831
+ createForwardingDataV1(domainsV1ForwardingStoreRequest, options) {
1832
+ return (0, exports.DomainsForwardingApiFp)(this.configuration).createForwardingDataV1(domainsV1ForwardingStoreRequest, options).then((request) => request(this.axios, this.basePath));
1833
+ }
1834
+ /**
1835
+ * This endpoint deletes domain forwarding data.
1836
+ * @summary Delete forwarding data
1837
+ * @param {string} domain Domain name
1838
+ * @param {*} [options] Override http request option.
1839
+ * @throws {RequiredError}
1840
+ * @memberof DomainsForwardingApi
1841
+ */
1842
+ deleteForwardingDataV1(domain, options) {
1843
+ return (0, exports.DomainsForwardingApiFp)(this.configuration).deleteForwardingDataV1(domain, options).then((request) => request(this.axios, this.basePath));
1844
+ }
1845
+ /**
1846
+ * This endpoint retrieves domain forwarding data.
1847
+ * @summary Get forwarding data
1848
+ * @param {string} domain Domain name
1849
+ * @param {*} [options] Override http request option.
1850
+ * @throws {RequiredError}
1851
+ * @memberof DomainsForwardingApi
1852
+ */
1853
+ getForwardingDataV1(domain, options) {
1854
+ return (0, exports.DomainsForwardingApiFp)(this.configuration).getForwardingDataV1(domain, options).then((request) => request(this.axios, this.basePath));
1855
+ }
1856
+ }
1857
+ exports.DomainsForwardingApi = DomainsForwardingApi;
1858
+ /**
1859
+ * DomainsPortfolioApi - axios parameter creator
1860
+ * @export
1861
+ */
1862
+ const DomainsPortfolioApiAxiosParamCreator = function (configuration) {
1863
+ return {
1864
+ /**
1865
+ * This endpoint disables domain lock for the domain. Domain lock needs to be disabled before transferring the domain to another registrar.
1866
+ * @summary Disable domain lock
1867
+ * @param {string} domain Domain name
1868
+ * @param {*} [options] Override http request option.
1869
+ * @throws {RequiredError}
1870
+ */
1871
+ disableDomainLockV1: (domain_1, ...args_1) => __awaiter(this, [domain_1, ...args_1], void 0, function* (domain, options = {}) {
1872
+ // verify required parameter 'domain' is not null or undefined
1873
+ (0, common_1.assertParamExists)('disableDomainLockV1', 'domain', domain);
1874
+ const localVarPath = `/api/domains/v1/portfolio/{domain}/domain-lock`
1875
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
1876
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1877
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1878
+ let baseOptions;
1879
+ if (configuration) {
1880
+ baseOptions = configuration.baseOptions;
1881
+ }
1882
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1883
+ const localVarHeaderParameter = {};
1884
+ const localVarQueryParameter = {};
1885
+ // authentication apiToken required
1886
+ // http bearer authentication required
1887
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1888
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1889
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1890
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1891
+ return {
1892
+ url: (0, common_1.toPathString)(localVarUrlObj),
1893
+ options: localVarRequestOptions,
1894
+ };
1895
+ }),
1896
+ /**
1897
+ * This endpoint disables privacy protection for the domain. When privacy protection is disabled, the domain owner\'s personal information is visible in the public WHOIS database.
1898
+ * @summary Disable privacy protection
1899
+ * @param {string} domain Domain name
1900
+ * @param {*} [options] Override http request option.
1901
+ * @throws {RequiredError}
1902
+ */
1903
+ disablePrivacyProtectionV1: (domain_1, ...args_1) => __awaiter(this, [domain_1, ...args_1], void 0, function* (domain, options = {}) {
1904
+ // verify required parameter 'domain' is not null or undefined
1905
+ (0, common_1.assertParamExists)('disablePrivacyProtectionV1', 'domain', domain);
1906
+ const localVarPath = `/api/domains/v1/portfolio/{domain}/privacy-protection`
1907
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
1908
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1909
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1910
+ let baseOptions;
1911
+ if (configuration) {
1912
+ baseOptions = configuration.baseOptions;
1913
+ }
1914
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1915
+ const localVarHeaderParameter = {};
1916
+ const localVarQueryParameter = {};
1917
+ // authentication apiToken required
1918
+ // http bearer authentication required
1919
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1920
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1921
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1922
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1923
+ return {
1924
+ url: (0, common_1.toPathString)(localVarUrlObj),
1925
+ options: localVarRequestOptions,
1926
+ };
1927
+ }),
1928
+ /**
1929
+ * This endpoint enables domain lock for the domain. When domain lock is enabled, the domain cannot be transferred to another registrar without first disabling the lock.
1930
+ * @summary Enable domain lock
1931
+ * @param {string} domain Domain name
1932
+ * @param {*} [options] Override http request option.
1933
+ * @throws {RequiredError}
1934
+ */
1935
+ enableDomainLockV1: (domain_1, ...args_1) => __awaiter(this, [domain_1, ...args_1], void 0, function* (domain, options = {}) {
1936
+ // verify required parameter 'domain' is not null or undefined
1937
+ (0, common_1.assertParamExists)('enableDomainLockV1', 'domain', domain);
1938
+ const localVarPath = `/api/domains/v1/portfolio/{domain}/domain-lock`
1939
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
1940
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1941
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1942
+ let baseOptions;
1943
+ if (configuration) {
1944
+ baseOptions = configuration.baseOptions;
1945
+ }
1946
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
1947
+ const localVarHeaderParameter = {};
1948
+ const localVarQueryParameter = {};
1949
+ // authentication apiToken required
1950
+ // http bearer authentication required
1951
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1952
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1953
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1954
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1955
+ return {
1956
+ url: (0, common_1.toPathString)(localVarUrlObj),
1957
+ options: localVarRequestOptions,
1958
+ };
1959
+ }),
1960
+ /**
1961
+ * This endpoint enables privacy protection for the domain. When privacy protection is enabled, the domain owner\'s personal information is hidden from the public WHOIS database.
1962
+ * @summary Enable privacy protection
1963
+ * @param {string} domain Domain name
1964
+ * @param {*} [options] Override http request option.
1965
+ * @throws {RequiredError}
1966
+ */
1967
+ enablePrivacyProtectionV1: (domain_1, ...args_1) => __awaiter(this, [domain_1, ...args_1], void 0, function* (domain, options = {}) {
1968
+ // verify required parameter 'domain' is not null or undefined
1969
+ (0, common_1.assertParamExists)('enablePrivacyProtectionV1', 'domain', domain);
1970
+ const localVarPath = `/api/domains/v1/portfolio/{domain}/privacy-protection`
1971
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
1972
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1973
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1974
+ let baseOptions;
1975
+ if (configuration) {
1976
+ baseOptions = configuration.baseOptions;
1977
+ }
1978
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
1979
+ const localVarHeaderParameter = {};
1980
+ const localVarQueryParameter = {};
1981
+ // authentication apiToken required
1982
+ // http bearer authentication required
1983
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1984
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1985
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1986
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1987
+ return {
1988
+ url: (0, common_1.toPathString)(localVarUrlObj),
1989
+ options: localVarRequestOptions,
1990
+ };
1991
+ }),
1992
+ /**
1993
+ * This endpoint retrieves a list of all domains associated with your account.
1994
+ * @summary Get domain list
1995
+ * @param {*} [options] Override http request option.
1996
+ * @throws {RequiredError}
1997
+ */
1998
+ getDomainListV1: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
1999
+ const localVarPath = `/api/domains/v1/portfolio`;
2000
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2001
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2002
+ let baseOptions;
2003
+ if (configuration) {
2004
+ baseOptions = configuration.baseOptions;
2005
+ }
2006
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2007
+ const localVarHeaderParameter = {};
2008
+ const localVarQueryParameter = {};
2009
+ // authentication apiToken required
2010
+ // http bearer authentication required
2011
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2012
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2013
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2014
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2015
+ return {
2016
+ url: (0, common_1.toPathString)(localVarUrlObj),
2017
+ options: localVarRequestOptions,
2018
+ };
2019
+ }),
2020
+ /**
2021
+ * This endpoint retrieves details for specified domain.
2022
+ * @summary Get domain
2023
+ * @param {string} domain Domain name
2024
+ * @param {*} [options] Override http request option.
2025
+ * @throws {RequiredError}
2026
+ */
2027
+ getDomainV1: (domain_1, ...args_1) => __awaiter(this, [domain_1, ...args_1], void 0, function* (domain, options = {}) {
2028
+ // verify required parameter 'domain' is not null or undefined
2029
+ (0, common_1.assertParamExists)('getDomainV1', 'domain', domain);
2030
+ const localVarPath = `/api/domains/v1/portfolio/{domain}`
2031
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
2032
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2033
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2034
+ let baseOptions;
2035
+ if (configuration) {
2036
+ baseOptions = configuration.baseOptions;
2037
+ }
2038
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2039
+ const localVarHeaderParameter = {};
2040
+ const localVarQueryParameter = {};
2041
+ // authentication apiToken required
2042
+ // http bearer authentication required
2043
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2044
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2045
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2046
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2047
+ return {
2048
+ url: (0, common_1.toPathString)(localVarUrlObj),
2049
+ options: localVarRequestOptions,
2050
+ };
2051
+ }),
2052
+ /**
2053
+ * This endpoint allows you to buy (purchase) and register a new domain name. If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check the domain registration status. If no payment method is provided, your default payment method will be used automatically. If no WHOIS information is provided, the default contact information for that TLD (Top-Level Domain) will be used. Before making a request, ensure that WHOIS information for the desired TLD exists in your account. Some TLDs require `additional_details` to be provided and these will be validated before completing the purchase. The required additional details vary by TLD.
2054
+ * @summary Purchase new domain
2055
+ * @param {DomainsV1PortfolioPurchaseRequest} domainsV1PortfolioPurchaseRequest
2056
+ * @param {*} [options] Override http request option.
2057
+ * @throws {RequiredError}
2058
+ */
2059
+ purchaseNewDomainV1: (domainsV1PortfolioPurchaseRequest_1, ...args_1) => __awaiter(this, [domainsV1PortfolioPurchaseRequest_1, ...args_1], void 0, function* (domainsV1PortfolioPurchaseRequest, options = {}) {
2060
+ // verify required parameter 'domainsV1PortfolioPurchaseRequest' is not null or undefined
2061
+ (0, common_1.assertParamExists)('purchaseNewDomainV1', 'domainsV1PortfolioPurchaseRequest', domainsV1PortfolioPurchaseRequest);
2062
+ const localVarPath = `/api/domains/v1/portfolio`;
2063
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2064
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2065
+ let baseOptions;
2066
+ if (configuration) {
2067
+ baseOptions = configuration.baseOptions;
2068
+ }
2069
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2070
+ const localVarHeaderParameter = {};
2071
+ const localVarQueryParameter = {};
2072
+ // authentication apiToken required
2073
+ // http bearer authentication required
2074
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2075
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2076
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2077
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2078
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2079
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(domainsV1PortfolioPurchaseRequest, localVarRequestOptions, configuration);
2080
+ return {
2081
+ url: (0, common_1.toPathString)(localVarUrlObj),
2082
+ options: localVarRequestOptions,
2083
+ };
2084
+ }),
2085
+ /**
2086
+ * This endpoint sets the nameservers for a specified domain. Be aware, that improper nameserver configuration can lead to the domain being unresolvable or unavailable.
2087
+ * @summary Update nameservers
2088
+ * @param {string} domain Domain name
2089
+ * @param {DomainsV1PortfolioUpdateNameserversRequest} domainsV1PortfolioUpdateNameserversRequest
2090
+ * @param {*} [options] Override http request option.
2091
+ * @throws {RequiredError}
2092
+ */
2093
+ updateNameserversV1: (domain_1, domainsV1PortfolioUpdateNameserversRequest_1, ...args_1) => __awaiter(this, [domain_1, domainsV1PortfolioUpdateNameserversRequest_1, ...args_1], void 0, function* (domain, domainsV1PortfolioUpdateNameserversRequest, options = {}) {
2094
+ // verify required parameter 'domain' is not null or undefined
2095
+ (0, common_1.assertParamExists)('updateNameserversV1', 'domain', domain);
2096
+ // verify required parameter 'domainsV1PortfolioUpdateNameserversRequest' is not null or undefined
2097
+ (0, common_1.assertParamExists)('updateNameserversV1', 'domainsV1PortfolioUpdateNameserversRequest', domainsV1PortfolioUpdateNameserversRequest);
2098
+ const localVarPath = `/api/domains/v1/portfolio/{domain}/nameservers`
2099
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
2100
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2101
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2102
+ let baseOptions;
2103
+ if (configuration) {
2104
+ baseOptions = configuration.baseOptions;
2105
+ }
2106
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2107
+ const localVarHeaderParameter = {};
2108
+ const localVarQueryParameter = {};
2109
+ // authentication apiToken required
2110
+ // http bearer authentication required
2111
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2112
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2113
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2114
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2115
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2116
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(domainsV1PortfolioUpdateNameserversRequest, localVarRequestOptions, configuration);
2117
+ return {
2118
+ url: (0, common_1.toPathString)(localVarUrlObj),
2119
+ options: localVarRequestOptions,
2120
+ };
2121
+ }),
2122
+ };
2123
+ };
2124
+ exports.DomainsPortfolioApiAxiosParamCreator = DomainsPortfolioApiAxiosParamCreator;
2125
+ /**
2126
+ * DomainsPortfolioApi - functional programming interface
2127
+ * @export
2128
+ */
2129
+ const DomainsPortfolioApiFp = function (configuration) {
2130
+ const localVarAxiosParamCreator = (0, exports.DomainsPortfolioApiAxiosParamCreator)(configuration);
2131
+ return {
2132
+ /**
2133
+ * This endpoint disables domain lock for the domain. Domain lock needs to be disabled before transferring the domain to another registrar.
2134
+ * @summary Disable domain lock
2135
+ * @param {string} domain Domain name
2136
+ * @param {*} [options] Override http request option.
2137
+ * @throws {RequiredError}
2138
+ */
2139
+ disableDomainLockV1(domain, options) {
2140
+ return __awaiter(this, void 0, void 0, function* () {
2141
+ var _a, _b;
2142
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.disableDomainLockV1(domain, options);
2143
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsPortfolioApi.disableDomainLockV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2144
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2145
+ });
2146
+ },
2147
+ /**
2148
+ * This endpoint disables privacy protection for the domain. When privacy protection is disabled, the domain owner\'s personal information is visible in the public WHOIS database.
2149
+ * @summary Disable privacy protection
2150
+ * @param {string} domain Domain name
2151
+ * @param {*} [options] Override http request option.
2152
+ * @throws {RequiredError}
2153
+ */
2154
+ disablePrivacyProtectionV1(domain, options) {
2155
+ return __awaiter(this, void 0, void 0, function* () {
2156
+ var _a, _b;
2157
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.disablePrivacyProtectionV1(domain, options);
2158
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsPortfolioApi.disablePrivacyProtectionV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2159
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2160
+ });
2161
+ },
2162
+ /**
2163
+ * This endpoint enables domain lock for the domain. When domain lock is enabled, the domain cannot be transferred to another registrar without first disabling the lock.
2164
+ * @summary Enable domain lock
2165
+ * @param {string} domain Domain name
2166
+ * @param {*} [options] Override http request option.
2167
+ * @throws {RequiredError}
2168
+ */
2169
+ enableDomainLockV1(domain, options) {
2170
+ return __awaiter(this, void 0, void 0, function* () {
2171
+ var _a, _b;
2172
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.enableDomainLockV1(domain, options);
2173
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsPortfolioApi.enableDomainLockV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2174
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2175
+ });
2176
+ },
2177
+ /**
2178
+ * This endpoint enables privacy protection for the domain. When privacy protection is enabled, the domain owner\'s personal information is hidden from the public WHOIS database.
2179
+ * @summary Enable privacy protection
2180
+ * @param {string} domain Domain name
2181
+ * @param {*} [options] Override http request option.
2182
+ * @throws {RequiredError}
2183
+ */
2184
+ enablePrivacyProtectionV1(domain, options) {
2185
+ return __awaiter(this, void 0, void 0, function* () {
2186
+ var _a, _b;
2187
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.enablePrivacyProtectionV1(domain, options);
2188
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsPortfolioApi.enablePrivacyProtectionV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2189
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2190
+ });
2191
+ },
2192
+ /**
2193
+ * This endpoint retrieves a list of all domains associated with your account.
2194
+ * @summary Get domain list
2195
+ * @param {*} [options] Override http request option.
2196
+ * @throws {RequiredError}
2197
+ */
2198
+ getDomainListV1(options) {
2199
+ return __awaiter(this, void 0, void 0, function* () {
2200
+ var _a, _b;
2201
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getDomainListV1(options);
2202
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsPortfolioApi.getDomainListV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2203
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2204
+ });
2205
+ },
2206
+ /**
2207
+ * This endpoint retrieves details for specified domain.
2208
+ * @summary Get domain
2209
+ * @param {string} domain Domain name
2210
+ * @param {*} [options] Override http request option.
2211
+ * @throws {RequiredError}
2212
+ */
2213
+ getDomainV1(domain, options) {
2214
+ return __awaiter(this, void 0, void 0, function* () {
2215
+ var _a, _b;
2216
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getDomainV1(domain, options);
2217
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsPortfolioApi.getDomainV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2218
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2219
+ });
2220
+ },
2221
+ /**
2222
+ * This endpoint allows you to buy (purchase) and register a new domain name. If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check the domain registration status. If no payment method is provided, your default payment method will be used automatically. If no WHOIS information is provided, the default contact information for that TLD (Top-Level Domain) will be used. Before making a request, ensure that WHOIS information for the desired TLD exists in your account. Some TLDs require `additional_details` to be provided and these will be validated before completing the purchase. The required additional details vary by TLD.
2223
+ * @summary Purchase new domain
2224
+ * @param {DomainsV1PortfolioPurchaseRequest} domainsV1PortfolioPurchaseRequest
2225
+ * @param {*} [options] Override http request option.
2226
+ * @throws {RequiredError}
2227
+ */
2228
+ purchaseNewDomainV1(domainsV1PortfolioPurchaseRequest, options) {
2229
+ return __awaiter(this, void 0, void 0, function* () {
2230
+ var _a, _b;
2231
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.purchaseNewDomainV1(domainsV1PortfolioPurchaseRequest, options);
2232
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsPortfolioApi.purchaseNewDomainV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2233
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2234
+ });
2235
+ },
2236
+ /**
2237
+ * This endpoint sets the nameservers for a specified domain. Be aware, that improper nameserver configuration can lead to the domain being unresolvable or unavailable.
2238
+ * @summary Update nameservers
2239
+ * @param {string} domain Domain name
2240
+ * @param {DomainsV1PortfolioUpdateNameserversRequest} domainsV1PortfolioUpdateNameserversRequest
2241
+ * @param {*} [options] Override http request option.
2242
+ * @throws {RequiredError}
2243
+ */
2244
+ updateNameserversV1(domain, domainsV1PortfolioUpdateNameserversRequest, options) {
2245
+ return __awaiter(this, void 0, void 0, function* () {
2246
+ var _a, _b;
2247
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateNameserversV1(domain, domainsV1PortfolioUpdateNameserversRequest, options);
2248
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsPortfolioApi.updateNameserversV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2249
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2250
+ });
2251
+ },
2252
+ };
2253
+ };
2254
+ exports.DomainsPortfolioApiFp = DomainsPortfolioApiFp;
2255
+ /**
2256
+ * DomainsPortfolioApi - factory interface
2257
+ * @export
2258
+ */
2259
+ const DomainsPortfolioApiFactory = function (configuration, basePath, axios) {
2260
+ const localVarFp = (0, exports.DomainsPortfolioApiFp)(configuration);
2261
+ return {
2262
+ /**
2263
+ * This endpoint disables domain lock for the domain. Domain lock needs to be disabled before transferring the domain to another registrar.
2264
+ * @summary Disable domain lock
2265
+ * @param {string} domain Domain name
2266
+ * @param {*} [options] Override http request option.
2267
+ * @throws {RequiredError}
2268
+ */
2269
+ disableDomainLockV1(domain, options) {
2270
+ return localVarFp.disableDomainLockV1(domain, options).then((request) => request(axios, basePath));
2271
+ },
2272
+ /**
2273
+ * This endpoint disables privacy protection for the domain. When privacy protection is disabled, the domain owner\'s personal information is visible in the public WHOIS database.
2274
+ * @summary Disable privacy protection
2275
+ * @param {string} domain Domain name
2276
+ * @param {*} [options] Override http request option.
2277
+ * @throws {RequiredError}
2278
+ */
2279
+ disablePrivacyProtectionV1(domain, options) {
2280
+ return localVarFp.disablePrivacyProtectionV1(domain, options).then((request) => request(axios, basePath));
2281
+ },
2282
+ /**
2283
+ * This endpoint enables domain lock for the domain. When domain lock is enabled, the domain cannot be transferred to another registrar without first disabling the lock.
2284
+ * @summary Enable domain lock
2285
+ * @param {string} domain Domain name
2286
+ * @param {*} [options] Override http request option.
2287
+ * @throws {RequiredError}
2288
+ */
2289
+ enableDomainLockV1(domain, options) {
2290
+ return localVarFp.enableDomainLockV1(domain, options).then((request) => request(axios, basePath));
2291
+ },
2292
+ /**
2293
+ * This endpoint enables privacy protection for the domain. When privacy protection is enabled, the domain owner\'s personal information is hidden from the public WHOIS database.
2294
+ * @summary Enable privacy protection
2295
+ * @param {string} domain Domain name
2296
+ * @param {*} [options] Override http request option.
2297
+ * @throws {RequiredError}
2298
+ */
2299
+ enablePrivacyProtectionV1(domain, options) {
2300
+ return localVarFp.enablePrivacyProtectionV1(domain, options).then((request) => request(axios, basePath));
2301
+ },
2302
+ /**
2303
+ * This endpoint retrieves a list of all domains associated with your account.
2304
+ * @summary Get domain list
2305
+ * @param {*} [options] Override http request option.
2306
+ * @throws {RequiredError}
2307
+ */
2308
+ getDomainListV1(options) {
2309
+ return localVarFp.getDomainListV1(options).then((request) => request(axios, basePath));
2310
+ },
2311
+ /**
2312
+ * This endpoint retrieves details for specified domain.
2313
+ * @summary Get domain
2314
+ * @param {string} domain Domain name
2315
+ * @param {*} [options] Override http request option.
2316
+ * @throws {RequiredError}
2317
+ */
2318
+ getDomainV1(domain, options) {
2319
+ return localVarFp.getDomainV1(domain, options).then((request) => request(axios, basePath));
2320
+ },
2321
+ /**
2322
+ * This endpoint allows you to buy (purchase) and register a new domain name. If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check the domain registration status. If no payment method is provided, your default payment method will be used automatically. If no WHOIS information is provided, the default contact information for that TLD (Top-Level Domain) will be used. Before making a request, ensure that WHOIS information for the desired TLD exists in your account. Some TLDs require `additional_details` to be provided and these will be validated before completing the purchase. The required additional details vary by TLD.
2323
+ * @summary Purchase new domain
2324
+ * @param {DomainsV1PortfolioPurchaseRequest} domainsV1PortfolioPurchaseRequest
2325
+ * @param {*} [options] Override http request option.
2326
+ * @throws {RequiredError}
2327
+ */
2328
+ purchaseNewDomainV1(domainsV1PortfolioPurchaseRequest, options) {
2329
+ return localVarFp.purchaseNewDomainV1(domainsV1PortfolioPurchaseRequest, options).then((request) => request(axios, basePath));
2330
+ },
2331
+ /**
2332
+ * This endpoint sets the nameservers for a specified domain. Be aware, that improper nameserver configuration can lead to the domain being unresolvable or unavailable.
2333
+ * @summary Update nameservers
2334
+ * @param {string} domain Domain name
2335
+ * @param {DomainsV1PortfolioUpdateNameserversRequest} domainsV1PortfolioUpdateNameserversRequest
2336
+ * @param {*} [options] Override http request option.
2337
+ * @throws {RequiredError}
2338
+ */
2339
+ updateNameserversV1(domain, domainsV1PortfolioUpdateNameserversRequest, options) {
2340
+ return localVarFp.updateNameserversV1(domain, domainsV1PortfolioUpdateNameserversRequest, options).then((request) => request(axios, basePath));
2341
+ },
2342
+ };
2343
+ };
2344
+ exports.DomainsPortfolioApiFactory = DomainsPortfolioApiFactory;
2345
+ /**
2346
+ * DomainsPortfolioApi - object-oriented interface
2347
+ * @export
2348
+ * @class DomainsPortfolioApi
2349
+ * @extends {BaseAPI}
2350
+ */
2351
+ class DomainsPortfolioApi extends base_1.BaseAPI {
2352
+ /**
2353
+ * This endpoint disables domain lock for the domain. Domain lock needs to be disabled before transferring the domain to another registrar.
2354
+ * @summary Disable domain lock
2355
+ * @param {string} domain Domain name
2356
+ * @param {*} [options] Override http request option.
2357
+ * @throws {RequiredError}
2358
+ * @memberof DomainsPortfolioApi
2359
+ */
2360
+ disableDomainLockV1(domain, options) {
2361
+ return (0, exports.DomainsPortfolioApiFp)(this.configuration).disableDomainLockV1(domain, options).then((request) => request(this.axios, this.basePath));
2362
+ }
2363
+ /**
2364
+ * This endpoint disables privacy protection for the domain. When privacy protection is disabled, the domain owner\'s personal information is visible in the public WHOIS database.
2365
+ * @summary Disable privacy protection
2366
+ * @param {string} domain Domain name
2367
+ * @param {*} [options] Override http request option.
2368
+ * @throws {RequiredError}
2369
+ * @memberof DomainsPortfolioApi
2370
+ */
2371
+ disablePrivacyProtectionV1(domain, options) {
2372
+ return (0, exports.DomainsPortfolioApiFp)(this.configuration).disablePrivacyProtectionV1(domain, options).then((request) => request(this.axios, this.basePath));
2373
+ }
2374
+ /**
2375
+ * This endpoint enables domain lock for the domain. When domain lock is enabled, the domain cannot be transferred to another registrar without first disabling the lock.
2376
+ * @summary Enable domain lock
2377
+ * @param {string} domain Domain name
2378
+ * @param {*} [options] Override http request option.
2379
+ * @throws {RequiredError}
2380
+ * @memberof DomainsPortfolioApi
2381
+ */
2382
+ enableDomainLockV1(domain, options) {
2383
+ return (0, exports.DomainsPortfolioApiFp)(this.configuration).enableDomainLockV1(domain, options).then((request) => request(this.axios, this.basePath));
2384
+ }
2385
+ /**
2386
+ * This endpoint enables privacy protection for the domain. When privacy protection is enabled, the domain owner\'s personal information is hidden from the public WHOIS database.
2387
+ * @summary Enable privacy protection
2388
+ * @param {string} domain Domain name
2389
+ * @param {*} [options] Override http request option.
2390
+ * @throws {RequiredError}
2391
+ * @memberof DomainsPortfolioApi
2392
+ */
2393
+ enablePrivacyProtectionV1(domain, options) {
2394
+ return (0, exports.DomainsPortfolioApiFp)(this.configuration).enablePrivacyProtectionV1(domain, options).then((request) => request(this.axios, this.basePath));
2395
+ }
2396
+ /**
2397
+ * This endpoint retrieves a list of all domains associated with your account.
2398
+ * @summary Get domain list
2399
+ * @param {*} [options] Override http request option.
2400
+ * @throws {RequiredError}
2401
+ * @memberof DomainsPortfolioApi
2402
+ */
2403
+ getDomainListV1(options) {
2404
+ return (0, exports.DomainsPortfolioApiFp)(this.configuration).getDomainListV1(options).then((request) => request(this.axios, this.basePath));
2405
+ }
2406
+ /**
2407
+ * This endpoint retrieves details for specified domain.
2408
+ * @summary Get domain
2409
+ * @param {string} domain Domain name
2410
+ * @param {*} [options] Override http request option.
2411
+ * @throws {RequiredError}
2412
+ * @memberof DomainsPortfolioApi
2413
+ */
2414
+ getDomainV1(domain, options) {
2415
+ return (0, exports.DomainsPortfolioApiFp)(this.configuration).getDomainV1(domain, options).then((request) => request(this.axios, this.basePath));
2416
+ }
2417
+ /**
2418
+ * This endpoint allows you to buy (purchase) and register a new domain name. If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check the domain registration status. If no payment method is provided, your default payment method will be used automatically. If no WHOIS information is provided, the default contact information for that TLD (Top-Level Domain) will be used. Before making a request, ensure that WHOIS information for the desired TLD exists in your account. Some TLDs require `additional_details` to be provided and these will be validated before completing the purchase. The required additional details vary by TLD.
2419
+ * @summary Purchase new domain
2420
+ * @param {DomainsV1PortfolioPurchaseRequest} domainsV1PortfolioPurchaseRequest
2421
+ * @param {*} [options] Override http request option.
2422
+ * @throws {RequiredError}
2423
+ * @memberof DomainsPortfolioApi
2424
+ */
2425
+ purchaseNewDomainV1(domainsV1PortfolioPurchaseRequest, options) {
2426
+ return (0, exports.DomainsPortfolioApiFp)(this.configuration).purchaseNewDomainV1(domainsV1PortfolioPurchaseRequest, options).then((request) => request(this.axios, this.basePath));
2427
+ }
2428
+ /**
2429
+ * This endpoint sets the nameservers for a specified domain. Be aware, that improper nameserver configuration can lead to the domain being unresolvable or unavailable.
2430
+ * @summary Update nameservers
2431
+ * @param {string} domain Domain name
2432
+ * @param {DomainsV1PortfolioUpdateNameserversRequest} domainsV1PortfolioUpdateNameserversRequest
2433
+ * @param {*} [options] Override http request option.
2434
+ * @throws {RequiredError}
2435
+ * @memberof DomainsPortfolioApi
2436
+ */
2437
+ updateNameserversV1(domain, domainsV1PortfolioUpdateNameserversRequest, options) {
2438
+ return (0, exports.DomainsPortfolioApiFp)(this.configuration).updateNameserversV1(domain, domainsV1PortfolioUpdateNameserversRequest, options).then((request) => request(this.axios, this.basePath));
2439
+ }
2440
+ }
2441
+ exports.DomainsPortfolioApi = DomainsPortfolioApi;
2442
+ /**
2443
+ * DomainsWHOISApi - axios parameter creator
2444
+ * @export
2445
+ */
2446
+ const DomainsWHOISApiAxiosParamCreator = function (configuration) {
2447
+ return {
2448
+ /**
2449
+ * This endpoint creates WHOIS contact profile.
2450
+ * @summary Create WHOIS profile
2451
+ * @param {DomainsV1WHOISStoreRequest} domainsV1WHOISStoreRequest
2452
+ * @param {*} [options] Override http request option.
2453
+ * @throws {RequiredError}
2454
+ */
2455
+ createWHOISProfileV1: (domainsV1WHOISStoreRequest_1, ...args_1) => __awaiter(this, [domainsV1WHOISStoreRequest_1, ...args_1], void 0, function* (domainsV1WHOISStoreRequest, options = {}) {
2456
+ // verify required parameter 'domainsV1WHOISStoreRequest' is not null or undefined
2457
+ (0, common_1.assertParamExists)('createWHOISProfileV1', 'domainsV1WHOISStoreRequest', domainsV1WHOISStoreRequest);
2458
+ const localVarPath = `/api/domains/v1/whois`;
2459
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2460
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2461
+ let baseOptions;
2462
+ if (configuration) {
2463
+ baseOptions = configuration.baseOptions;
2464
+ }
2465
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2466
+ const localVarHeaderParameter = {};
2467
+ const localVarQueryParameter = {};
2468
+ // authentication apiToken required
2469
+ // http bearer authentication required
2470
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2471
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2472
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2473
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2474
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2475
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(domainsV1WHOISStoreRequest, localVarRequestOptions, configuration);
2476
+ return {
2477
+ url: (0, common_1.toPathString)(localVarUrlObj),
2478
+ options: localVarRequestOptions,
2479
+ };
2480
+ }),
2481
+ /**
2482
+ * This endpoint deletes WHOIS contact profile.
2483
+ * @summary Delete WHOIS profile
2484
+ * @param {number} whoisId WHOIS ID
2485
+ * @param {*} [options] Override http request option.
2486
+ * @throws {RequiredError}
2487
+ */
2488
+ deleteWHOISProfileV1: (whoisId_1, ...args_1) => __awaiter(this, [whoisId_1, ...args_1], void 0, function* (whoisId, options = {}) {
2489
+ // verify required parameter 'whoisId' is not null or undefined
2490
+ (0, common_1.assertParamExists)('deleteWHOISProfileV1', 'whoisId', whoisId);
2491
+ const localVarPath = `/api/domains/v1/whois/{whoisId}`
2492
+ .replace(`{${"whoisId"}}`, encodeURIComponent(String(whoisId)));
2493
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2494
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2495
+ let baseOptions;
2496
+ if (configuration) {
2497
+ baseOptions = configuration.baseOptions;
2498
+ }
2499
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
2500
+ const localVarHeaderParameter = {};
2501
+ const localVarQueryParameter = {};
2502
+ // authentication apiToken required
2503
+ // http bearer authentication required
2504
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2505
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2506
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2507
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2508
+ return {
2509
+ url: (0, common_1.toPathString)(localVarUrlObj),
2510
+ options: localVarRequestOptions,
2511
+ };
2512
+ }),
2513
+ /**
2514
+ * This endpoint retrieves a list of WHOIS contact profiles.
2515
+ * @summary Get WHOIS profile list
2516
+ * @param {string} [tld] Filter by TLD (without leading dot)
1467
2517
  * @param {*} [options] Override http request option.
1468
2518
  * @throws {RequiredError}
1469
2519
  */
1470
- checkDomainAvailabilityV1: (domainsV1AvailabilityAvailabilityRequest_1, ...args_1) => __awaiter(this, [domainsV1AvailabilityAvailabilityRequest_1, ...args_1], void 0, function* (domainsV1AvailabilityAvailabilityRequest, options = {}) {
1471
- // verify required parameter 'domainsV1AvailabilityAvailabilityRequest' is not null or undefined
1472
- (0, common_1.assertParamExists)('checkDomainAvailabilityV1', 'domainsV1AvailabilityAvailabilityRequest', domainsV1AvailabilityAvailabilityRequest);
1473
- const localVarPath = `/api/domains/v1/availability`;
2520
+ getWHOISProfileListV1: (tld_1, ...args_1) => __awaiter(this, [tld_1, ...args_1], void 0, function* (tld, options = {}) {
2521
+ const localVarPath = `/api/domains/v1/whois`;
1474
2522
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1475
2523
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1476
2524
  let baseOptions;
1477
2525
  if (configuration) {
1478
2526
  baseOptions = configuration.baseOptions;
1479
2527
  }
1480
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2528
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1481
2529
  const localVarHeaderParameter = {};
1482
2530
  const localVarQueryParameter = {};
1483
2531
  // authentication apiToken required
1484
2532
  // http bearer authentication required
1485
2533
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1486
- localVarHeaderParameter['Content-Type'] = 'application/json';
2534
+ if (tld !== undefined) {
2535
+ localVarQueryParameter['tld'] = tld;
2536
+ }
1487
2537
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1488
2538
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1489
2539
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1490
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(domainsV1AvailabilityAvailabilityRequest, localVarRequestOptions, configuration);
1491
2540
  return {
1492
2541
  url: (0, common_1.toPathString)(localVarUrlObj),
1493
2542
  options: localVarRequestOptions,
1494
2543
  };
1495
2544
  }),
1496
- };
1497
- };
1498
- exports.DomainsAvailabilityApiAxiosParamCreator = DomainsAvailabilityApiAxiosParamCreator;
1499
- /**
1500
- * DomainsAvailabilityApi - functional programming interface
1501
- * @export
1502
- */
1503
- const DomainsAvailabilityApiFp = function (configuration) {
1504
- const localVarAxiosParamCreator = (0, exports.DomainsAvailabilityApiAxiosParamCreator)(configuration);
1505
- return {
1506
- /**
1507
- * This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. Endpoint has rate limit of 10 requests per minute.
1508
- * @summary Check domain availability
1509
- * @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
1510
- * @param {*} [options] Override http request option.
1511
- * @throws {RequiredError}
1512
- */
1513
- checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options) {
1514
- return __awaiter(this, void 0, void 0, function* () {
1515
- var _a, _b;
1516
- const localVarAxiosArgs = yield localVarAxiosParamCreator.checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options);
1517
- const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsAvailabilityApi.checkDomainAvailabilityV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1518
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1519
- });
1520
- },
1521
- };
1522
- };
1523
- exports.DomainsAvailabilityApiFp = DomainsAvailabilityApiFp;
1524
- /**
1525
- * DomainsAvailabilityApi - factory interface
1526
- * @export
1527
- */
1528
- const DomainsAvailabilityApiFactory = function (configuration, basePath, axios) {
1529
- const localVarFp = (0, exports.DomainsAvailabilityApiFp)(configuration);
1530
- return {
1531
2545
  /**
1532
- * This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. Endpoint has rate limit of 10 requests per minute.
1533
- * @summary Check domain availability
1534
- * @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
2546
+ * This endpoint retrieves a domain list where provided WHOIS contact profile is used.
2547
+ * @summary Get WHOIS profile usage
2548
+ * @param {number} whoisId WHOIS ID
1535
2549
  * @param {*} [options] Override http request option.
1536
2550
  * @throws {RequiredError}
1537
2551
  */
1538
- checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options) {
1539
- return localVarFp.checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options).then((request) => request(axios, basePath));
1540
- },
1541
- };
1542
- };
1543
- exports.DomainsAvailabilityApiFactory = DomainsAvailabilityApiFactory;
1544
- /**
1545
- * DomainsAvailabilityApi - object-oriented interface
1546
- * @export
1547
- * @class DomainsAvailabilityApi
1548
- * @extends {BaseAPI}
1549
- */
1550
- class DomainsAvailabilityApi extends base_1.BaseAPI {
1551
- /**
1552
- * This endpoint checks the availability of a domain name. Multiple TLDs can be checked at once. Endpoint has rate limit of 10 requests per minute.
1553
- * @summary Check domain availability
1554
- * @param {DomainsV1AvailabilityAvailabilityRequest} domainsV1AvailabilityAvailabilityRequest
1555
- * @param {*} [options] Override http request option.
1556
- * @throws {RequiredError}
1557
- * @memberof DomainsAvailabilityApi
1558
- */
1559
- checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options) {
1560
- return (0, exports.DomainsAvailabilityApiFp)(this.configuration).checkDomainAvailabilityV1(domainsV1AvailabilityAvailabilityRequest, options).then((request) => request(this.axios, this.basePath));
1561
- }
1562
- }
1563
- exports.DomainsAvailabilityApi = DomainsAvailabilityApi;
1564
- /**
1565
- * DomainsPortfolioApi - axios parameter creator
1566
- * @export
1567
- */
1568
- const DomainsPortfolioApiAxiosParamCreator = function (configuration) {
1569
- return {
2552
+ getWHOISProfileUsageV1: (whoisId_1, ...args_1) => __awaiter(this, [whoisId_1, ...args_1], void 0, function* (whoisId, options = {}) {
2553
+ // verify required parameter 'whoisId' is not null or undefined
2554
+ (0, common_1.assertParamExists)('getWHOISProfileUsageV1', 'whoisId', whoisId);
2555
+ const localVarPath = `/api/domains/v1/whois/{whoisId}/usage`
2556
+ .replace(`{${"whoisId"}}`, encodeURIComponent(String(whoisId)));
2557
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2558
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2559
+ let baseOptions;
2560
+ if (configuration) {
2561
+ baseOptions = configuration.baseOptions;
2562
+ }
2563
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2564
+ const localVarHeaderParameter = {};
2565
+ const localVarQueryParameter = {};
2566
+ // authentication apiToken required
2567
+ // http bearer authentication required
2568
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2569
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2570
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2571
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2572
+ return {
2573
+ url: (0, common_1.toPathString)(localVarUrlObj),
2574
+ options: localVarRequestOptions,
2575
+ };
2576
+ }),
1570
2577
  /**
1571
- * This endpoint retrieves a list of all domains associated with your account.
1572
- * @summary Get domain list
2578
+ * This endpoint retrieves a WHOIS contact profile.
2579
+ * @summary Get WHOIS profile
2580
+ * @param {number} whoisId WHOIS ID
1573
2581
  * @param {*} [options] Override http request option.
1574
2582
  * @throws {RequiredError}
1575
2583
  */
1576
- getDomainListV1: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
1577
- const localVarPath = `/api/domains/v1/portfolio`;
2584
+ getWHOISProfileV1: (whoisId_1, ...args_1) => __awaiter(this, [whoisId_1, ...args_1], void 0, function* (whoisId, options = {}) {
2585
+ // verify required parameter 'whoisId' is not null or undefined
2586
+ (0, common_1.assertParamExists)('getWHOISProfileV1', 'whoisId', whoisId);
2587
+ const localVarPath = `/api/domains/v1/whois/{whoisId}`
2588
+ .replace(`{${"whoisId"}}`, encodeURIComponent(String(whoisId)));
1578
2589
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1579
2590
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1580
2591
  let baseOptions;
@@ -1597,69 +2608,216 @@ const DomainsPortfolioApiAxiosParamCreator = function (configuration) {
1597
2608
  }),
1598
2609
  };
1599
2610
  };
1600
- exports.DomainsPortfolioApiAxiosParamCreator = DomainsPortfolioApiAxiosParamCreator;
2611
+ exports.DomainsWHOISApiAxiosParamCreator = DomainsWHOISApiAxiosParamCreator;
1601
2612
  /**
1602
- * DomainsPortfolioApi - functional programming interface
2613
+ * DomainsWHOISApi - functional programming interface
1603
2614
  * @export
1604
2615
  */
1605
- const DomainsPortfolioApiFp = function (configuration) {
1606
- const localVarAxiosParamCreator = (0, exports.DomainsPortfolioApiAxiosParamCreator)(configuration);
2616
+ const DomainsWHOISApiFp = function (configuration) {
2617
+ const localVarAxiosParamCreator = (0, exports.DomainsWHOISApiAxiosParamCreator)(configuration);
1607
2618
  return {
1608
2619
  /**
1609
- * This endpoint retrieves a list of all domains associated with your account.
1610
- * @summary Get domain list
2620
+ * This endpoint creates WHOIS contact profile.
2621
+ * @summary Create WHOIS profile
2622
+ * @param {DomainsV1WHOISStoreRequest} domainsV1WHOISStoreRequest
1611
2623
  * @param {*} [options] Override http request option.
1612
2624
  * @throws {RequiredError}
1613
2625
  */
1614
- getDomainListV1(options) {
2626
+ createWHOISProfileV1(domainsV1WHOISStoreRequest, options) {
1615
2627
  return __awaiter(this, void 0, void 0, function* () {
1616
2628
  var _a, _b;
1617
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getDomainListV1(options);
1618
- const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsPortfolioApi.getDomainListV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2629
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createWHOISProfileV1(domainsV1WHOISStoreRequest, options);
2630
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsWHOISApi.createWHOISProfileV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2631
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2632
+ });
2633
+ },
2634
+ /**
2635
+ * This endpoint deletes WHOIS contact profile.
2636
+ * @summary Delete WHOIS profile
2637
+ * @param {number} whoisId WHOIS ID
2638
+ * @param {*} [options] Override http request option.
2639
+ * @throws {RequiredError}
2640
+ */
2641
+ deleteWHOISProfileV1(whoisId, options) {
2642
+ return __awaiter(this, void 0, void 0, function* () {
2643
+ var _a, _b;
2644
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteWHOISProfileV1(whoisId, options);
2645
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsWHOISApi.deleteWHOISProfileV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2646
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2647
+ });
2648
+ },
2649
+ /**
2650
+ * This endpoint retrieves a list of WHOIS contact profiles.
2651
+ * @summary Get WHOIS profile list
2652
+ * @param {string} [tld] Filter by TLD (without leading dot)
2653
+ * @param {*} [options] Override http request option.
2654
+ * @throws {RequiredError}
2655
+ */
2656
+ getWHOISProfileListV1(tld, options) {
2657
+ return __awaiter(this, void 0, void 0, function* () {
2658
+ var _a, _b;
2659
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getWHOISProfileListV1(tld, options);
2660
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsWHOISApi.getWHOISProfileListV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2661
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2662
+ });
2663
+ },
2664
+ /**
2665
+ * This endpoint retrieves a domain list where provided WHOIS contact profile is used.
2666
+ * @summary Get WHOIS profile usage
2667
+ * @param {number} whoisId WHOIS ID
2668
+ * @param {*} [options] Override http request option.
2669
+ * @throws {RequiredError}
2670
+ */
2671
+ getWHOISProfileUsageV1(whoisId, options) {
2672
+ return __awaiter(this, void 0, void 0, function* () {
2673
+ var _a, _b;
2674
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getWHOISProfileUsageV1(whoisId, options);
2675
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsWHOISApi.getWHOISProfileUsageV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
2676
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2677
+ });
2678
+ },
2679
+ /**
2680
+ * This endpoint retrieves a WHOIS contact profile.
2681
+ * @summary Get WHOIS profile
2682
+ * @param {number} whoisId WHOIS ID
2683
+ * @param {*} [options] Override http request option.
2684
+ * @throws {RequiredError}
2685
+ */
2686
+ getWHOISProfileV1(whoisId, options) {
2687
+ return __awaiter(this, void 0, void 0, function* () {
2688
+ var _a, _b;
2689
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getWHOISProfileV1(whoisId, options);
2690
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['DomainsWHOISApi.getWHOISProfileV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1619
2691
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1620
2692
  });
1621
2693
  },
1622
2694
  };
1623
2695
  };
1624
- exports.DomainsPortfolioApiFp = DomainsPortfolioApiFp;
2696
+ exports.DomainsWHOISApiFp = DomainsWHOISApiFp;
1625
2697
  /**
1626
- * DomainsPortfolioApi - factory interface
2698
+ * DomainsWHOISApi - factory interface
1627
2699
  * @export
1628
2700
  */
1629
- const DomainsPortfolioApiFactory = function (configuration, basePath, axios) {
1630
- const localVarFp = (0, exports.DomainsPortfolioApiFp)(configuration);
2701
+ const DomainsWHOISApiFactory = function (configuration, basePath, axios) {
2702
+ const localVarFp = (0, exports.DomainsWHOISApiFp)(configuration);
1631
2703
  return {
1632
2704
  /**
1633
- * This endpoint retrieves a list of all domains associated with your account.
1634
- * @summary Get domain list
2705
+ * This endpoint creates WHOIS contact profile.
2706
+ * @summary Create WHOIS profile
2707
+ * @param {DomainsV1WHOISStoreRequest} domainsV1WHOISStoreRequest
1635
2708
  * @param {*} [options] Override http request option.
1636
2709
  * @throws {RequiredError}
1637
2710
  */
1638
- getDomainListV1(options) {
1639
- return localVarFp.getDomainListV1(options).then((request) => request(axios, basePath));
2711
+ createWHOISProfileV1(domainsV1WHOISStoreRequest, options) {
2712
+ return localVarFp.createWHOISProfileV1(domainsV1WHOISStoreRequest, options).then((request) => request(axios, basePath));
2713
+ },
2714
+ /**
2715
+ * This endpoint deletes WHOIS contact profile.
2716
+ * @summary Delete WHOIS profile
2717
+ * @param {number} whoisId WHOIS ID
2718
+ * @param {*} [options] Override http request option.
2719
+ * @throws {RequiredError}
2720
+ */
2721
+ deleteWHOISProfileV1(whoisId, options) {
2722
+ return localVarFp.deleteWHOISProfileV1(whoisId, options).then((request) => request(axios, basePath));
2723
+ },
2724
+ /**
2725
+ * This endpoint retrieves a list of WHOIS contact profiles.
2726
+ * @summary Get WHOIS profile list
2727
+ * @param {string} [tld] Filter by TLD (without leading dot)
2728
+ * @param {*} [options] Override http request option.
2729
+ * @throws {RequiredError}
2730
+ */
2731
+ getWHOISProfileListV1(tld, options) {
2732
+ return localVarFp.getWHOISProfileListV1(tld, options).then((request) => request(axios, basePath));
2733
+ },
2734
+ /**
2735
+ * This endpoint retrieves a domain list where provided WHOIS contact profile is used.
2736
+ * @summary Get WHOIS profile usage
2737
+ * @param {number} whoisId WHOIS ID
2738
+ * @param {*} [options] Override http request option.
2739
+ * @throws {RequiredError}
2740
+ */
2741
+ getWHOISProfileUsageV1(whoisId, options) {
2742
+ return localVarFp.getWHOISProfileUsageV1(whoisId, options).then((request) => request(axios, basePath));
2743
+ },
2744
+ /**
2745
+ * This endpoint retrieves a WHOIS contact profile.
2746
+ * @summary Get WHOIS profile
2747
+ * @param {number} whoisId WHOIS ID
2748
+ * @param {*} [options] Override http request option.
2749
+ * @throws {RequiredError}
2750
+ */
2751
+ getWHOISProfileV1(whoisId, options) {
2752
+ return localVarFp.getWHOISProfileV1(whoisId, options).then((request) => request(axios, basePath));
1640
2753
  },
1641
2754
  };
1642
2755
  };
1643
- exports.DomainsPortfolioApiFactory = DomainsPortfolioApiFactory;
2756
+ exports.DomainsWHOISApiFactory = DomainsWHOISApiFactory;
1644
2757
  /**
1645
- * DomainsPortfolioApi - object-oriented interface
2758
+ * DomainsWHOISApi - object-oriented interface
1646
2759
  * @export
1647
- * @class DomainsPortfolioApi
2760
+ * @class DomainsWHOISApi
1648
2761
  * @extends {BaseAPI}
1649
2762
  */
1650
- class DomainsPortfolioApi extends base_1.BaseAPI {
2763
+ class DomainsWHOISApi extends base_1.BaseAPI {
1651
2764
  /**
1652
- * This endpoint retrieves a list of all domains associated with your account.
1653
- * @summary Get domain list
2765
+ * This endpoint creates WHOIS contact profile.
2766
+ * @summary Create WHOIS profile
2767
+ * @param {DomainsV1WHOISStoreRequest} domainsV1WHOISStoreRequest
1654
2768
  * @param {*} [options] Override http request option.
1655
2769
  * @throws {RequiredError}
1656
- * @memberof DomainsPortfolioApi
2770
+ * @memberof DomainsWHOISApi
1657
2771
  */
1658
- getDomainListV1(options) {
1659
- return (0, exports.DomainsPortfolioApiFp)(this.configuration).getDomainListV1(options).then((request) => request(this.axios, this.basePath));
2772
+ createWHOISProfileV1(domainsV1WHOISStoreRequest, options) {
2773
+ return (0, exports.DomainsWHOISApiFp)(this.configuration).createWHOISProfileV1(domainsV1WHOISStoreRequest, options).then((request) => request(this.axios, this.basePath));
2774
+ }
2775
+ /**
2776
+ * This endpoint deletes WHOIS contact profile.
2777
+ * @summary Delete WHOIS profile
2778
+ * @param {number} whoisId WHOIS ID
2779
+ * @param {*} [options] Override http request option.
2780
+ * @throws {RequiredError}
2781
+ * @memberof DomainsWHOISApi
2782
+ */
2783
+ deleteWHOISProfileV1(whoisId, options) {
2784
+ return (0, exports.DomainsWHOISApiFp)(this.configuration).deleteWHOISProfileV1(whoisId, options).then((request) => request(this.axios, this.basePath));
2785
+ }
2786
+ /**
2787
+ * This endpoint retrieves a list of WHOIS contact profiles.
2788
+ * @summary Get WHOIS profile list
2789
+ * @param {string} [tld] Filter by TLD (without leading dot)
2790
+ * @param {*} [options] Override http request option.
2791
+ * @throws {RequiredError}
2792
+ * @memberof DomainsWHOISApi
2793
+ */
2794
+ getWHOISProfileListV1(tld, options) {
2795
+ return (0, exports.DomainsWHOISApiFp)(this.configuration).getWHOISProfileListV1(tld, options).then((request) => request(this.axios, this.basePath));
2796
+ }
2797
+ /**
2798
+ * This endpoint retrieves a domain list where provided WHOIS contact profile is used.
2799
+ * @summary Get WHOIS profile usage
2800
+ * @param {number} whoisId WHOIS ID
2801
+ * @param {*} [options] Override http request option.
2802
+ * @throws {RequiredError}
2803
+ * @memberof DomainsWHOISApi
2804
+ */
2805
+ getWHOISProfileUsageV1(whoisId, options) {
2806
+ return (0, exports.DomainsWHOISApiFp)(this.configuration).getWHOISProfileUsageV1(whoisId, options).then((request) => request(this.axios, this.basePath));
2807
+ }
2808
+ /**
2809
+ * This endpoint retrieves a WHOIS contact profile.
2810
+ * @summary Get WHOIS profile
2811
+ * @param {number} whoisId WHOIS ID
2812
+ * @param {*} [options] Override http request option.
2813
+ * @throws {RequiredError}
2814
+ * @memberof DomainsWHOISApi
2815
+ */
2816
+ getWHOISProfileV1(whoisId, options) {
2817
+ return (0, exports.DomainsWHOISApiFp)(this.configuration).getWHOISProfileV1(whoisId, options).then((request) => request(this.axios, this.basePath));
1660
2818
  }
1661
2819
  }
1662
- exports.DomainsPortfolioApi = DomainsPortfolioApi;
2820
+ exports.DomainsWHOISApi = DomainsWHOISApi;
1663
2821
  /**
1664
2822
  * VPSActionsApi - axios parameter creator
1665
2823
  * @export
@@ -4807,8 +5965,8 @@ const VPSVirtualMachineApiAxiosParamCreator = function (configuration) {
4807
5965
  * This endpoint retrieves the historical metrics for a specified virtual machine. It includes the following metrics: - CPU usage - Memory usage - Disk usage - Network usage - Uptime
4808
5966
  * @summary Get metrics
4809
5967
  * @param {number} virtualMachineId Virtual Machine ID
4810
- * @param {string} dateFrom the date-time notation as defined by RFC 3339, section 5.6
4811
- * @param {string} dateTo the date-time notation as defined by RFC 3339, section 5.6
5968
+ * @param {string} dateFrom
5969
+ * @param {string} dateTo
4812
5970
  * @param {*} [options] Override http request option.
4813
5971
  * @throws {RequiredError}
4814
5972
  */
@@ -4834,10 +5992,14 @@ const VPSVirtualMachineApiAxiosParamCreator = function (configuration) {
4834
5992
  // http bearer authentication required
4835
5993
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
4836
5994
  if (dateFrom !== undefined) {
4837
- localVarQueryParameter['date_from'] = dateFrom;
5995
+ localVarQueryParameter['date_from'] = (dateFrom instanceof Date) ?
5996
+ dateFrom.toISOString() :
5997
+ dateFrom;
4838
5998
  }
4839
5999
  if (dateTo !== undefined) {
4840
- localVarQueryParameter['date_to'] = dateTo;
6000
+ localVarQueryParameter['date_to'] = (dateTo instanceof Date) ?
6001
+ dateTo.toISOString() :
6002
+ dateTo;
4841
6003
  }
4842
6004
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
4843
6005
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -4907,6 +6069,39 @@ const VPSVirtualMachineApiAxiosParamCreator = function (configuration) {
4907
6069
  options: localVarRequestOptions,
4908
6070
  };
4909
6071
  }),
6072
+ /**
6073
+ * This endpoint allows you to buy (purchase) and setup a new virtual machine. If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually. If no payment method is provided, your default payment method will be used automatically.
6074
+ * @summary Purchase new virtual machine
6075
+ * @param {VPSV1VirtualMachinePurchaseRequest} vPSV1VirtualMachinePurchaseRequest
6076
+ * @param {*} [options] Override http request option.
6077
+ * @throws {RequiredError}
6078
+ */
6079
+ purchaseNewVirtualMachineV1: (vPSV1VirtualMachinePurchaseRequest_1, ...args_1) => __awaiter(this, [vPSV1VirtualMachinePurchaseRequest_1, ...args_1], void 0, function* (vPSV1VirtualMachinePurchaseRequest, options = {}) {
6080
+ // verify required parameter 'vPSV1VirtualMachinePurchaseRequest' is not null or undefined
6081
+ (0, common_1.assertParamExists)('purchaseNewVirtualMachineV1', 'vPSV1VirtualMachinePurchaseRequest', vPSV1VirtualMachinePurchaseRequest);
6082
+ const localVarPath = `/api/vps/v1/virtual-machines`;
6083
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
6084
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
6085
+ let baseOptions;
6086
+ if (configuration) {
6087
+ baseOptions = configuration.baseOptions;
6088
+ }
6089
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
6090
+ const localVarHeaderParameter = {};
6091
+ const localVarQueryParameter = {};
6092
+ // authentication apiToken required
6093
+ // http bearer authentication required
6094
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
6095
+ localVarHeaderParameter['Content-Type'] = 'application/json';
6096
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
6097
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
6098
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
6099
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(vPSV1VirtualMachinePurchaseRequest, localVarRequestOptions, configuration);
6100
+ return {
6101
+ url: (0, common_1.toPathString)(localVarUrlObj),
6102
+ options: localVarRequestOptions,
6103
+ };
6104
+ }),
4910
6105
  /**
4911
6106
  * This endpoint will recreate a virtual machine from scratch. The recreation process involves reinstalling the operating system and resetting the virtual machine to its initial state. Snapshots, if there are any, will be deleted. ## Password Requirements Password will be checked against leaked password databases. Requirements for the password are: - At least 8 characters long - At least one uppercase letter - At least one lowercase letter - At least one number - Is not leaked publicly **This operation is irreversible and will result in the loss of all data stored on the virtual machine!**
4912
6107
  * @summary Recreate virtual machine
@@ -5157,7 +6352,7 @@ const VPSVirtualMachineApiAxiosParamCreator = function (configuration) {
5157
6352
  };
5158
6353
  }),
5159
6354
  /**
5160
- * This endpoint will setup newly purchased virtual machine. Such virtual machines has `initial` state. New virtual machine can be purchased using [`/api/billing/v1/orders`](/#tag/billing-orders/POST/api/billing/v1/orders) endpoint.
6355
+ * This endpoint will setup newly purchased virtual machine with `initial` state.
5161
6356
  * @summary Setup new virtual machine
5162
6357
  * @param {number} virtualMachineId Virtual Machine ID
5163
6358
  * @param {VPSV1VirtualMachineSetupRequest} vPSV1VirtualMachineSetupRequest
@@ -5287,8 +6482,8 @@ const VPSVirtualMachineApiFp = function (configuration) {
5287
6482
  * This endpoint retrieves the historical metrics for a specified virtual machine. It includes the following metrics: - CPU usage - Memory usage - Disk usage - Network usage - Uptime
5288
6483
  * @summary Get metrics
5289
6484
  * @param {number} virtualMachineId Virtual Machine ID
5290
- * @param {string} dateFrom the date-time notation as defined by RFC 3339, section 5.6
5291
- * @param {string} dateTo the date-time notation as defined by RFC 3339, section 5.6
6485
+ * @param {string} dateFrom
6486
+ * @param {string} dateTo
5292
6487
  * @param {*} [options] Override http request option.
5293
6488
  * @throws {RequiredError}
5294
6489
  */
@@ -5329,6 +6524,21 @@ const VPSVirtualMachineApiFp = function (configuration) {
5329
6524
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5330
6525
  });
5331
6526
  },
6527
+ /**
6528
+ * This endpoint allows you to buy (purchase) and setup a new virtual machine. If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually. If no payment method is provided, your default payment method will be used automatically.
6529
+ * @summary Purchase new virtual machine
6530
+ * @param {VPSV1VirtualMachinePurchaseRequest} vPSV1VirtualMachinePurchaseRequest
6531
+ * @param {*} [options] Override http request option.
6532
+ * @throws {RequiredError}
6533
+ */
6534
+ purchaseNewVirtualMachineV1(vPSV1VirtualMachinePurchaseRequest, options) {
6535
+ return __awaiter(this, void 0, void 0, function* () {
6536
+ var _a, _b;
6537
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.purchaseNewVirtualMachineV1(vPSV1VirtualMachinePurchaseRequest, options);
6538
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['VPSVirtualMachineApi.purchaseNewVirtualMachineV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
6539
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
6540
+ });
6541
+ },
5332
6542
  /**
5333
6543
  * This endpoint will recreate a virtual machine from scratch. The recreation process involves reinstalling the operating system and resetting the virtual machine to its initial state. Snapshots, if there are any, will be deleted. ## Password Requirements Password will be checked against leaked password databases. Requirements for the password are: - At least 8 characters long - At least one uppercase letter - At least one lowercase letter - At least one number - Is not leaked publicly **This operation is irreversible and will result in the loss of all data stored on the virtual machine!**
5334
6544
  * @summary Recreate virtual machine
@@ -5440,7 +6650,7 @@ const VPSVirtualMachineApiFp = function (configuration) {
5440
6650
  });
5441
6651
  },
5442
6652
  /**
5443
- * This endpoint will setup newly purchased virtual machine. Such virtual machines has `initial` state. New virtual machine can be purchased using [`/api/billing/v1/orders`](/#tag/billing-orders/POST/api/billing/v1/orders) endpoint.
6653
+ * This endpoint will setup newly purchased virtual machine with `initial` state.
5444
6654
  * @summary Setup new virtual machine
5445
6655
  * @param {number} virtualMachineId Virtual Machine ID
5446
6656
  * @param {VPSV1VirtualMachineSetupRequest} vPSV1VirtualMachineSetupRequest
@@ -5510,8 +6720,8 @@ const VPSVirtualMachineApiFactory = function (configuration, basePath, axios) {
5510
6720
  * This endpoint retrieves the historical metrics for a specified virtual machine. It includes the following metrics: - CPU usage - Memory usage - Disk usage - Network usage - Uptime
5511
6721
  * @summary Get metrics
5512
6722
  * @param {number} virtualMachineId Virtual Machine ID
5513
- * @param {string} dateFrom the date-time notation as defined by RFC 3339, section 5.6
5514
- * @param {string} dateTo the date-time notation as defined by RFC 3339, section 5.6
6723
+ * @param {string} dateFrom
6724
+ * @param {string} dateTo
5515
6725
  * @param {*} [options] Override http request option.
5516
6726
  * @throws {RequiredError}
5517
6727
  */
@@ -5537,6 +6747,16 @@ const VPSVirtualMachineApiFactory = function (configuration, basePath, axios) {
5537
6747
  getVirtualMachineV1(virtualMachineId, options) {
5538
6748
  return localVarFp.getVirtualMachineV1(virtualMachineId, options).then((request) => request(axios, basePath));
5539
6749
  },
6750
+ /**
6751
+ * This endpoint allows you to buy (purchase) and setup a new virtual machine. If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually. If no payment method is provided, your default payment method will be used automatically.
6752
+ * @summary Purchase new virtual machine
6753
+ * @param {VPSV1VirtualMachinePurchaseRequest} vPSV1VirtualMachinePurchaseRequest
6754
+ * @param {*} [options] Override http request option.
6755
+ * @throws {RequiredError}
6756
+ */
6757
+ purchaseNewVirtualMachineV1(vPSV1VirtualMachinePurchaseRequest, options) {
6758
+ return localVarFp.purchaseNewVirtualMachineV1(vPSV1VirtualMachinePurchaseRequest, options).then((request) => request(axios, basePath));
6759
+ },
5540
6760
  /**
5541
6761
  * This endpoint will recreate a virtual machine from scratch. The recreation process involves reinstalling the operating system and resetting the virtual machine to its initial state. Snapshots, if there are any, will be deleted. ## Password Requirements Password will be checked against leaked password databases. Requirements for the password are: - At least 8 characters long - At least one uppercase letter - At least one lowercase letter - At least one number - Is not leaked publicly **This operation is irreversible and will result in the loss of all data stored on the virtual machine!**
5542
6762
  * @summary Recreate virtual machine
@@ -5613,7 +6833,7 @@ const VPSVirtualMachineApiFactory = function (configuration, basePath, axios) {
5613
6833
  return localVarFp.setRootPasswordV1(virtualMachineId, vPSV1VirtualMachineRootPasswordUpdateRequest, options).then((request) => request(axios, basePath));
5614
6834
  },
5615
6835
  /**
5616
- * This endpoint will setup newly purchased virtual machine. Such virtual machines has `initial` state. New virtual machine can be purchased using [`/api/billing/v1/orders`](/#tag/billing-orders/POST/api/billing/v1/orders) endpoint.
6836
+ * This endpoint will setup newly purchased virtual machine with `initial` state.
5617
6837
  * @summary Setup new virtual machine
5618
6838
  * @param {number} virtualMachineId Virtual Machine ID
5619
6839
  * @param {VPSV1VirtualMachineSetupRequest} vPSV1VirtualMachineSetupRequest
@@ -5669,8 +6889,8 @@ class VPSVirtualMachineApi extends base_1.BaseAPI {
5669
6889
  * This endpoint retrieves the historical metrics for a specified virtual machine. It includes the following metrics: - CPU usage - Memory usage - Disk usage - Network usage - Uptime
5670
6890
  * @summary Get metrics
5671
6891
  * @param {number} virtualMachineId Virtual Machine ID
5672
- * @param {string} dateFrom the date-time notation as defined by RFC 3339, section 5.6
5673
- * @param {string} dateTo the date-time notation as defined by RFC 3339, section 5.6
6892
+ * @param {string} dateFrom
6893
+ * @param {string} dateTo
5674
6894
  * @param {*} [options] Override http request option.
5675
6895
  * @throws {RequiredError}
5676
6896
  * @memberof VPSVirtualMachineApi
@@ -5699,6 +6919,17 @@ class VPSVirtualMachineApi extends base_1.BaseAPI {
5699
6919
  getVirtualMachineV1(virtualMachineId, options) {
5700
6920
  return (0, exports.VPSVirtualMachineApiFp)(this.configuration).getVirtualMachineV1(virtualMachineId, options).then((request) => request(this.axios, this.basePath));
5701
6921
  }
6922
+ /**
6923
+ * This endpoint allows you to buy (purchase) and setup a new virtual machine. If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually. If no payment method is provided, your default payment method will be used automatically.
6924
+ * @summary Purchase new virtual machine
6925
+ * @param {VPSV1VirtualMachinePurchaseRequest} vPSV1VirtualMachinePurchaseRequest
6926
+ * @param {*} [options] Override http request option.
6927
+ * @throws {RequiredError}
6928
+ * @memberof VPSVirtualMachineApi
6929
+ */
6930
+ purchaseNewVirtualMachineV1(vPSV1VirtualMachinePurchaseRequest, options) {
6931
+ return (0, exports.VPSVirtualMachineApiFp)(this.configuration).purchaseNewVirtualMachineV1(vPSV1VirtualMachinePurchaseRequest, options).then((request) => request(this.axios, this.basePath));
6932
+ }
5702
6933
  /**
5703
6934
  * This endpoint will recreate a virtual machine from scratch. The recreation process involves reinstalling the operating system and resetting the virtual machine to its initial state. Snapshots, if there are any, will be deleted. ## Password Requirements Password will be checked against leaked password databases. Requirements for the password are: - At least 8 characters long - At least one uppercase letter - At least one lowercase letter - At least one number - Is not leaked publicly **This operation is irreversible and will result in the loss of all data stored on the virtual machine!**
5704
6935
  * @summary Recreate virtual machine
@@ -5782,7 +7013,7 @@ class VPSVirtualMachineApi extends base_1.BaseAPI {
5782
7013
  return (0, exports.VPSVirtualMachineApiFp)(this.configuration).setRootPasswordV1(virtualMachineId, vPSV1VirtualMachineRootPasswordUpdateRequest, options).then((request) => request(this.axios, this.basePath));
5783
7014
  }
5784
7015
  /**
5785
- * This endpoint will setup newly purchased virtual machine. Such virtual machines has `initial` state. New virtual machine can be purchased using [`/api/billing/v1/orders`](/#tag/billing-orders/POST/api/billing/v1/orders) endpoint.
7016
+ * This endpoint will setup newly purchased virtual machine with `initial` state.
5786
7017
  * @summary Setup new virtual machine
5787
7018
  * @param {number} virtualMachineId Virtual Machine ID
5788
7019
  * @param {VPSV1VirtualMachineSetupRequest} vPSV1VirtualMachineSetupRequest