hostinger-api-sdk 1.21.1 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.22.0
6
+ * API Version: 1.24.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3311,6 +3311,41 @@ export const BillingSubscriptionsApiAxiosParamCreator = function (configuration)
3311
3311
  options: localVarRequestOptions,
3312
3312
  };
3313
3313
  }),
3314
+ /**
3315
+ * Create a renewal order for an existing Hostinger subscription. This endpoint places a renewal order for a single subscription, leveraging the existing billing infrastructure. Use the [subscriptions endpoint](#tag/billing-subscriptions) to look up the `subscriptionId` values available for renewal. If no payment method is provided, your default payment method will be used automatically. Use this endpoint to renew any subscription available in your account.
3316
+ * @summary Renew subscription
3317
+ * @param {string} subscriptionId Subscription ID
3318
+ * @param {BillingV1SubscriptionRenewalRenewRequest} [billingV1SubscriptionRenewalRenewRequest]
3319
+ * @param {*} [options] Override http request option.
3320
+ * @throws {RequiredError}
3321
+ */
3322
+ renewSubscriptionV1: (subscriptionId_1, billingV1SubscriptionRenewalRenewRequest_1, ...args_1) => __awaiter(this, [subscriptionId_1, billingV1SubscriptionRenewalRenewRequest_1, ...args_1], void 0, function* (subscriptionId, billingV1SubscriptionRenewalRenewRequest, options = {}) {
3323
+ // verify required parameter 'subscriptionId' is not null or undefined
3324
+ assertParamExists('renewSubscriptionV1', 'subscriptionId', subscriptionId);
3325
+ const localVarPath = `/api/billing/v1/subscriptions/{subscriptionId}/renew`
3326
+ .replace(`{${"subscriptionId"}}`, encodeURIComponent(String(subscriptionId)));
3327
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3328
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3329
+ let baseOptions;
3330
+ if (configuration) {
3331
+ baseOptions = configuration.baseOptions;
3332
+ }
3333
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3334
+ const localVarHeaderParameter = {};
3335
+ const localVarQueryParameter = {};
3336
+ // authentication apiToken required
3337
+ // http bearer authentication required
3338
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
3339
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3340
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3341
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3342
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3343
+ localVarRequestOptions.data = serializeDataIfNeeded(billingV1SubscriptionRenewalRenewRequest, localVarRequestOptions, configuration);
3344
+ return {
3345
+ url: toPathString(localVarUrlObj),
3346
+ options: localVarRequestOptions,
3347
+ };
3348
+ }),
3314
3349
  };
3315
3350
  };
3316
3351
  /**
@@ -3364,6 +3399,22 @@ export const BillingSubscriptionsApiFp = function (configuration) {
3364
3399
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3365
3400
  });
3366
3401
  },
3402
+ /**
3403
+ * Create a renewal order for an existing Hostinger subscription. This endpoint places a renewal order for a single subscription, leveraging the existing billing infrastructure. Use the [subscriptions endpoint](#tag/billing-subscriptions) to look up the `subscriptionId` values available for renewal. If no payment method is provided, your default payment method will be used automatically. Use this endpoint to renew any subscription available in your account.
3404
+ * @summary Renew subscription
3405
+ * @param {string} subscriptionId Subscription ID
3406
+ * @param {BillingV1SubscriptionRenewalRenewRequest} [billingV1SubscriptionRenewalRenewRequest]
3407
+ * @param {*} [options] Override http request option.
3408
+ * @throws {RequiredError}
3409
+ */
3410
+ renewSubscriptionV1(subscriptionId, billingV1SubscriptionRenewalRenewRequest, options) {
3411
+ return __awaiter(this, void 0, void 0, function* () {
3412
+ var _a, _b;
3413
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.renewSubscriptionV1(subscriptionId, billingV1SubscriptionRenewalRenewRequest, options);
3414
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['BillingSubscriptionsApi.renewSubscriptionV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
3415
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3416
+ });
3417
+ },
3367
3418
  };
3368
3419
  };
3369
3420
  /**
@@ -3402,6 +3453,17 @@ export const BillingSubscriptionsApiFactory = function (configuration, basePath,
3402
3453
  getSubscriptionListV1(options) {
3403
3454
  return localVarFp.getSubscriptionListV1(options).then((request) => request(axios, basePath));
3404
3455
  },
3456
+ /**
3457
+ * Create a renewal order for an existing Hostinger subscription. This endpoint places a renewal order for a single subscription, leveraging the existing billing infrastructure. Use the [subscriptions endpoint](#tag/billing-subscriptions) to look up the `subscriptionId` values available for renewal. If no payment method is provided, your default payment method will be used automatically. Use this endpoint to renew any subscription available in your account.
3458
+ * @summary Renew subscription
3459
+ * @param {string} subscriptionId Subscription ID
3460
+ * @param {BillingV1SubscriptionRenewalRenewRequest} [billingV1SubscriptionRenewalRenewRequest]
3461
+ * @param {*} [options] Override http request option.
3462
+ * @throws {RequiredError}
3463
+ */
3464
+ renewSubscriptionV1(subscriptionId, billingV1SubscriptionRenewalRenewRequest, options) {
3465
+ return localVarFp.renewSubscriptionV1(subscriptionId, billingV1SubscriptionRenewalRenewRequest, options).then((request) => request(axios, basePath));
3466
+ },
3405
3467
  };
3406
3468
  };
3407
3469
  /**
@@ -3443,6 +3505,18 @@ export class BillingSubscriptionsApi extends BaseAPI {
3443
3505
  getSubscriptionListV1(options) {
3444
3506
  return BillingSubscriptionsApiFp(this.configuration).getSubscriptionListV1(options).then((request) => request(this.axios, this.basePath));
3445
3507
  }
3508
+ /**
3509
+ * Create a renewal order for an existing Hostinger subscription. This endpoint places a renewal order for a single subscription, leveraging the existing billing infrastructure. Use the [subscriptions endpoint](#tag/billing-subscriptions) to look up the `subscriptionId` values available for renewal. If no payment method is provided, your default payment method will be used automatically. Use this endpoint to renew any subscription available in your account.
3510
+ * @summary Renew subscription
3511
+ * @param {string} subscriptionId Subscription ID
3512
+ * @param {BillingV1SubscriptionRenewalRenewRequest} [billingV1SubscriptionRenewalRenewRequest]
3513
+ * @param {*} [options] Override http request option.
3514
+ * @throws {RequiredError}
3515
+ * @memberof BillingSubscriptionsApi
3516
+ */
3517
+ renewSubscriptionV1(subscriptionId, billingV1SubscriptionRenewalRenewRequest, options) {
3518
+ return BillingSubscriptionsApiFp(this.configuration).renewSubscriptionV1(subscriptionId, billingV1SubscriptionRenewalRenewRequest, options).then((request) => request(this.axios, this.basePath));
3519
+ }
3446
3520
  }
3447
3521
  /**
3448
3522
  * DNSSnapshotApi - axios parameter creator
@@ -5669,6 +5743,70 @@ export const DomainsWHOISApiAxiosParamCreator = function (configuration) {
5669
5743
  options: localVarRequestOptions,
5670
5744
  };
5671
5745
  }),
5746
+ /**
5747
+ * Set WHOIS contact profile as default. The default profile is pre-selected for the TLD it belongs to when registering new domains. Use this endpoint to avoid picking contact information for every registration.
5748
+ * @summary Set WHOIS profile as default
5749
+ * @param {number} whoisId WHOIS ID
5750
+ * @param {*} [options] Override http request option.
5751
+ * @throws {RequiredError}
5752
+ */
5753
+ setWHOISProfileAsDefaultV1: (whoisId_1, ...args_1) => __awaiter(this, [whoisId_1, ...args_1], void 0, function* (whoisId, options = {}) {
5754
+ // verify required parameter 'whoisId' is not null or undefined
5755
+ assertParamExists('setWHOISProfileAsDefaultV1', 'whoisId', whoisId);
5756
+ const localVarPath = `/api/domains/v1/whois/default/{whoisId}`
5757
+ .replace(`{${"whoisId"}}`, encodeURIComponent(String(whoisId)));
5758
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5759
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5760
+ let baseOptions;
5761
+ if (configuration) {
5762
+ baseOptions = configuration.baseOptions;
5763
+ }
5764
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
5765
+ const localVarHeaderParameter = {};
5766
+ const localVarQueryParameter = {};
5767
+ // authentication apiToken required
5768
+ // http bearer authentication required
5769
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
5770
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5771
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5772
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
5773
+ return {
5774
+ url: toPathString(localVarUrlObj),
5775
+ options: localVarRequestOptions,
5776
+ };
5777
+ }),
5778
+ /**
5779
+ * Unset WHOIS contact profile as default. The profile itself is kept, it is only no longer pre-selected for its TLD. Use this endpoint to stop reusing contact information for new registrations.
5780
+ * @summary Unset default WHOIS profile
5781
+ * @param {number} whoisId WHOIS ID
5782
+ * @param {*} [options] Override http request option.
5783
+ * @throws {RequiredError}
5784
+ */
5785
+ unsetDefaultWHOISProfileV1: (whoisId_1, ...args_1) => __awaiter(this, [whoisId_1, ...args_1], void 0, function* (whoisId, options = {}) {
5786
+ // verify required parameter 'whoisId' is not null or undefined
5787
+ assertParamExists('unsetDefaultWHOISProfileV1', 'whoisId', whoisId);
5788
+ const localVarPath = `/api/domains/v1/whois/default/{whoisId}`
5789
+ .replace(`{${"whoisId"}}`, encodeURIComponent(String(whoisId)));
5790
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5791
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5792
+ let baseOptions;
5793
+ if (configuration) {
5794
+ baseOptions = configuration.baseOptions;
5795
+ }
5796
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
5797
+ const localVarHeaderParameter = {};
5798
+ const localVarQueryParameter = {};
5799
+ // authentication apiToken required
5800
+ // http bearer authentication required
5801
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
5802
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5803
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5804
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
5805
+ return {
5806
+ url: toPathString(localVarUrlObj),
5807
+ options: localVarRequestOptions,
5808
+ };
5809
+ }),
5672
5810
  };
5673
5811
  };
5674
5812
  /**
@@ -5753,6 +5891,36 @@ export const DomainsWHOISApiFp = function (configuration) {
5753
5891
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5754
5892
  });
5755
5893
  },
5894
+ /**
5895
+ * Set WHOIS contact profile as default. The default profile is pre-selected for the TLD it belongs to when registering new domains. Use this endpoint to avoid picking contact information for every registration.
5896
+ * @summary Set WHOIS profile as default
5897
+ * @param {number} whoisId WHOIS ID
5898
+ * @param {*} [options] Override http request option.
5899
+ * @throws {RequiredError}
5900
+ */
5901
+ setWHOISProfileAsDefaultV1(whoisId, options) {
5902
+ return __awaiter(this, void 0, void 0, function* () {
5903
+ var _a, _b;
5904
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.setWHOISProfileAsDefaultV1(whoisId, options);
5905
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['DomainsWHOISApi.setWHOISProfileAsDefaultV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
5906
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5907
+ });
5908
+ },
5909
+ /**
5910
+ * Unset WHOIS contact profile as default. The profile itself is kept, it is only no longer pre-selected for its TLD. Use this endpoint to stop reusing contact information for new registrations.
5911
+ * @summary Unset default WHOIS profile
5912
+ * @param {number} whoisId WHOIS ID
5913
+ * @param {*} [options] Override http request option.
5914
+ * @throws {RequiredError}
5915
+ */
5916
+ unsetDefaultWHOISProfileV1(whoisId, options) {
5917
+ return __awaiter(this, void 0, void 0, function* () {
5918
+ var _a, _b;
5919
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.unsetDefaultWHOISProfileV1(whoisId, options);
5920
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['DomainsWHOISApi.unsetDefaultWHOISProfileV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
5921
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5922
+ });
5923
+ },
5756
5924
  };
5757
5925
  };
5758
5926
  /**
@@ -5812,6 +5980,26 @@ export const DomainsWHOISApiFactory = function (configuration, basePath, axios)
5812
5980
  getWHOISProfileV1(whoisId, options) {
5813
5981
  return localVarFp.getWHOISProfileV1(whoisId, options).then((request) => request(axios, basePath));
5814
5982
  },
5983
+ /**
5984
+ * Set WHOIS contact profile as default. The default profile is pre-selected for the TLD it belongs to when registering new domains. Use this endpoint to avoid picking contact information for every registration.
5985
+ * @summary Set WHOIS profile as default
5986
+ * @param {number} whoisId WHOIS ID
5987
+ * @param {*} [options] Override http request option.
5988
+ * @throws {RequiredError}
5989
+ */
5990
+ setWHOISProfileAsDefaultV1(whoisId, options) {
5991
+ return localVarFp.setWHOISProfileAsDefaultV1(whoisId, options).then((request) => request(axios, basePath));
5992
+ },
5993
+ /**
5994
+ * Unset WHOIS contact profile as default. The profile itself is kept, it is only no longer pre-selected for its TLD. Use this endpoint to stop reusing contact information for new registrations.
5995
+ * @summary Unset default WHOIS profile
5996
+ * @param {number} whoisId WHOIS ID
5997
+ * @param {*} [options] Override http request option.
5998
+ * @throws {RequiredError}
5999
+ */
6000
+ unsetDefaultWHOISProfileV1(whoisId, options) {
6001
+ return localVarFp.unsetDefaultWHOISProfileV1(whoisId, options).then((request) => request(axios, basePath));
6002
+ },
5815
6003
  };
5816
6004
  };
5817
6005
  /**
@@ -5876,6 +6064,28 @@ export class DomainsWHOISApi extends BaseAPI {
5876
6064
  getWHOISProfileV1(whoisId, options) {
5877
6065
  return DomainsWHOISApiFp(this.configuration).getWHOISProfileV1(whoisId, options).then((request) => request(this.axios, this.basePath));
5878
6066
  }
6067
+ /**
6068
+ * Set WHOIS contact profile as default. The default profile is pre-selected for the TLD it belongs to when registering new domains. Use this endpoint to avoid picking contact information for every registration.
6069
+ * @summary Set WHOIS profile as default
6070
+ * @param {number} whoisId WHOIS ID
6071
+ * @param {*} [options] Override http request option.
6072
+ * @throws {RequiredError}
6073
+ * @memberof DomainsWHOISApi
6074
+ */
6075
+ setWHOISProfileAsDefaultV1(whoisId, options) {
6076
+ return DomainsWHOISApiFp(this.configuration).setWHOISProfileAsDefaultV1(whoisId, options).then((request) => request(this.axios, this.basePath));
6077
+ }
6078
+ /**
6079
+ * Unset WHOIS contact profile as default. The profile itself is kept, it is only no longer pre-selected for its TLD. Use this endpoint to stop reusing contact information for new registrations.
6080
+ * @summary Unset default WHOIS profile
6081
+ * @param {number} whoisId WHOIS ID
6082
+ * @param {*} [options] Override http request option.
6083
+ * @throws {RequiredError}
6084
+ * @memberof DomainsWHOISApi
6085
+ */
6086
+ unsetDefaultWHOISProfileV1(whoisId, options) {
6087
+ return DomainsWHOISApiFp(this.configuration).unsetDefaultWHOISProfileV1(whoisId, options).then((request) => request(this.axios, this.basePath));
6088
+ }
5879
6089
  }
5880
6090
  /**
5881
6091
  * EcommerceMiscellaneousApi - axios parameter creator
@@ -19527,7 +19737,7 @@ export const VPSVirtualMachineApiAxiosParamCreator = function (configuration) {
19527
19737
  };
19528
19738
  }),
19529
19739
  /**
19530
- * Stop a specified virtual machine. If the virtual machine is already stopped, the request will still be processed without any effect. Use this endpoint to power off running VPS instances.
19740
+ * Stop a specified virtual machine. If the virtual machine is already stopped, the request will still be processed without any effect. This is a compute-only power state change and does not affect billing. To stop future charges, disable auto-renewal on the owning subscription. Use this endpoint to power off running VPS instances.
19531
19741
  * @summary Stop virtual machine
19532
19742
  * @param {number} virtualMachineId Virtual Machine ID
19533
19743
  * @param {*} [options] Override http request option.
@@ -19786,7 +19996,7 @@ export const VPSVirtualMachineApiFp = function (configuration) {
19786
19996
  });
19787
19997
  },
19788
19998
  /**
19789
- * Stop a specified virtual machine. If the virtual machine is already stopped, the request will still be processed without any effect. Use this endpoint to power off running VPS instances.
19999
+ * Stop a specified virtual machine. If the virtual machine is already stopped, the request will still be processed without any effect. This is a compute-only power state change and does not affect billing. To stop future charges, disable auto-renewal on the owning subscription. Use this endpoint to power off running VPS instances.
19790
20000
  * @summary Stop virtual machine
19791
20001
  * @param {number} virtualMachineId Virtual Machine ID
19792
20002
  * @param {*} [options] Override http request option.
@@ -19958,7 +20168,7 @@ export const VPSVirtualMachineApiFactory = function (configuration, basePath, ax
19958
20168
  return localVarFp.startVirtualMachineV1(virtualMachineId, options).then((request) => request(axios, basePath));
19959
20169
  },
19960
20170
  /**
19961
- * Stop a specified virtual machine. If the virtual machine is already stopped, the request will still be processed without any effect. Use this endpoint to power off running VPS instances.
20171
+ * Stop a specified virtual machine. If the virtual machine is already stopped, the request will still be processed without any effect. This is a compute-only power state change and does not affect billing. To stop future charges, disable auto-renewal on the owning subscription. Use this endpoint to power off running VPS instances.
19962
20172
  * @summary Stop virtual machine
19963
20173
  * @param {number} virtualMachineId Virtual Machine ID
19964
20174
  * @param {*} [options] Override http request option.
@@ -20139,7 +20349,7 @@ export class VPSVirtualMachineApi extends BaseAPI {
20139
20349
  return VPSVirtualMachineApiFp(this.configuration).startVirtualMachineV1(virtualMachineId, options).then((request) => request(this.axios, this.basePath));
20140
20350
  }
20141
20351
  /**
20142
- * Stop a specified virtual machine. If the virtual machine is already stopped, the request will still be processed without any effect. Use this endpoint to power off running VPS instances.
20352
+ * Stop a specified virtual machine. If the virtual machine is already stopped, the request will still be processed without any effect. This is a compute-only power state change and does not affect billing. To stop future charges, disable auto-renewal on the owning subscription. Use this endpoint to power off running VPS instances.
20143
20353
  * @summary Stop virtual machine
20144
20354
  * @param {number} virtualMachineId Virtual Machine ID
20145
20355
  * @param {*} [options] Override http request option.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.22.0
4
+ * API Version: 1.24.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/base.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.22.0
6
+ * API Version: 1.24.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.22.0
4
+ * API Version: 1.24.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.22.0
6
+ * API Version: 1.24.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.22.0
4
+ * API Version: 1.24.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.22.0
6
+ * API Version: 1.24.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -13,7 +13,7 @@ export class Configuration {
13
13
  var _a;
14
14
  this.accessToken = param.accessToken;
15
15
  this.basePath = param.basePath;
16
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.21.1" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
16
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.23.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
17
17
  this.formDataCtor = param.formDataCtor;
18
18
  }
19
19
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.22.0
4
+ * API Version: 1.24.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.22.0
6
+ * API Version: 1.24.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.22.0
4
+ * API Version: 1.24.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.22.0
7
+ * API Version: 1.24.0
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
@@ -7,6 +7,7 @@ All URIs are relative to *https://developers.hostinger.com*
7
7
  |[**disableAutoRenewalV1**](#disableautorenewalv1) | **DELETE** /api/billing/v1/subscriptions/{subscriptionId}/auto-renewal/disable | Disable auto-renewal|
8
8
  |[**enableAutoRenewalV1**](#enableautorenewalv1) | **PATCH** /api/billing/v1/subscriptions/{subscriptionId}/auto-renewal/enable | Enable auto-renewal|
9
9
  |[**getSubscriptionListV1**](#getsubscriptionlistv1) | **GET** /api/billing/v1/subscriptions | Get subscription list|
10
+ |[**renewSubscriptionV1**](#renewsubscriptionv1) | **POST** /api/billing/v1/subscriptions/{subscriptionId}/renew | Renew subscription|
10
11
 
11
12
  # **disableAutoRenewalV1**
12
13
  > BillingV1SubscriptionSubscriptionResource disableAutoRenewalV1()
@@ -160,3 +161,61 @@ This endpoint does not have any parameters.
160
161
 
161
162
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
162
163
 
164
+ # **renewSubscriptionV1**
165
+ > BillingV1OrderOrderResource renewSubscriptionV1()
166
+
167
+ Create a renewal order for an existing Hostinger subscription. This endpoint places a renewal order for a single subscription, leveraging the existing billing infrastructure. Use the [subscriptions endpoint](#tag/billing-subscriptions) to look up the `subscriptionId` values available for renewal. If no payment method is provided, your default payment method will be used automatically. Use this endpoint to renew any subscription available in your account.
168
+
169
+ ### Example
170
+
171
+ ```typescript
172
+ import {
173
+ BillingSubscriptionsApi,
174
+ Configuration,
175
+ BillingV1SubscriptionRenewalRenewRequest
176
+ } from 'hostinger-api-sdk';
177
+
178
+ const configuration = new Configuration();
179
+ const apiInstance = new BillingSubscriptionsApi(configuration);
180
+
181
+ let subscriptionId: string; //Subscription ID (default to undefined)
182
+ let billingV1SubscriptionRenewalRenewRequest: BillingV1SubscriptionRenewalRenewRequest; // (optional)
183
+
184
+ const { status, data } = await apiInstance.renewSubscriptionV1(
185
+ subscriptionId,
186
+ billingV1SubscriptionRenewalRenewRequest
187
+ );
188
+ ```
189
+
190
+ ### Parameters
191
+
192
+ |Name | Type | Description | Notes|
193
+ |------------- | ------------- | ------------- | -------------|
194
+ | **billingV1SubscriptionRenewalRenewRequest** | **BillingV1SubscriptionRenewalRenewRequest**| | |
195
+ | **subscriptionId** | [**string**] | Subscription ID | defaults to undefined|
196
+
197
+
198
+ ### Return type
199
+
200
+ **BillingV1OrderOrderResource**
201
+
202
+ ### Authorization
203
+
204
+ [apiToken](../README.md#apiToken)
205
+
206
+ ### HTTP request headers
207
+
208
+ - **Content-Type**: application/json
209
+ - **Accept**: application/json
210
+
211
+
212
+ ### HTTP response details
213
+ | Status code | Description | Response headers |
214
+ |-------------|-------------|------------------|
215
+ |**200** | Success response | - |
216
+ |**422** | Validation error response | - |
217
+ |**401** | Unauthenticated response | - |
218
+ |**500** | Error response | - |
219
+
220
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
221
+
@@ -0,0 +1,22 @@
1
+ # BillingV1SubscriptionRenewalRenewRequest
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **payment_method_id** | **number** | Payment method ID, default will be used if not provided | [optional] [default to undefined]
9
+ **coupons** | **Array<any>** | Discount coupon codes | [optional] [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { BillingV1SubscriptionRenewalRenewRequest } from 'hostinger-api-sdk';
15
+
16
+ const instance: BillingV1SubscriptionRenewalRenewRequest = {
17
+ payment_method_id,
18
+ coupons,
19
+ };
20
+ ```
21
+
22
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -9,6 +9,8 @@ All URIs are relative to *https://developers.hostinger.com*
9
9
  |[**getWHOISProfileListV1**](#getwhoisprofilelistv1) | **GET** /api/domains/v1/whois | Get WHOIS profile list|
10
10
  |[**getWHOISProfileUsageV1**](#getwhoisprofileusagev1) | **GET** /api/domains/v1/whois/{whoisId}/usage | Get WHOIS profile usage|
11
11
  |[**getWHOISProfileV1**](#getwhoisprofilev1) | **GET** /api/domains/v1/whois/{whoisId} | Get WHOIS profile|
12
+ |[**setWHOISProfileAsDefaultV1**](#setwhoisprofileasdefaultv1) | **PATCH** /api/domains/v1/whois/default/{whoisId} | Set WHOIS profile as default|
13
+ |[**unsetDefaultWHOISProfileV1**](#unsetdefaultwhoisprofilev1) | **DELETE** /api/domains/v1/whois/default/{whoisId} | Unset default WHOIS profile|
12
14
 
13
15
  # **createWHOISProfileV1**
14
16
  > DomainsV1WHOISProfileResource createWHOISProfileV1(domainsV1WHOISStoreRequest)
@@ -277,3 +279,109 @@ const { status, data } = await apiInstance.getWHOISProfileV1(
277
279
 
278
280
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
279
281
 
282
+ # **setWHOISProfileAsDefaultV1**
283
+ > CommonSuccessEmptyResource setWHOISProfileAsDefaultV1()
284
+
285
+ Set WHOIS contact profile as default. The default profile is pre-selected for the TLD it belongs to when registering new domains. Use this endpoint to avoid picking contact information for every registration.
286
+
287
+ ### Example
288
+
289
+ ```typescript
290
+ import {
291
+ DomainsWHOISApi,
292
+ Configuration
293
+ } from 'hostinger-api-sdk';
294
+
295
+ const configuration = new Configuration();
296
+ const apiInstance = new DomainsWHOISApi(configuration);
297
+
298
+ let whoisId: number; //WHOIS ID (default to undefined)
299
+
300
+ const { status, data } = await apiInstance.setWHOISProfileAsDefaultV1(
301
+ whoisId
302
+ );
303
+ ```
304
+
305
+ ### Parameters
306
+
307
+ |Name | Type | Description | Notes|
308
+ |------------- | ------------- | ------------- | -------------|
309
+ | **whoisId** | [**number**] | WHOIS ID | defaults to undefined|
310
+
311
+
312
+ ### Return type
313
+
314
+ **CommonSuccessEmptyResource**
315
+
316
+ ### Authorization
317
+
318
+ [apiToken](../README.md#apiToken)
319
+
320
+ ### HTTP request headers
321
+
322
+ - **Content-Type**: Not defined
323
+ - **Accept**: application/json
324
+
325
+
326
+ ### HTTP response details
327
+ | Status code | Description | Response headers |
328
+ |-------------|-------------|------------------|
329
+ |**200** | Success empty response | - |
330
+ |**401** | Unauthenticated response | - |
331
+ |**500** | Error response | - |
332
+
333
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
334
+
335
+ # **unsetDefaultWHOISProfileV1**
336
+ > CommonSuccessEmptyResource unsetDefaultWHOISProfileV1()
337
+
338
+ Unset WHOIS contact profile as default. The profile itself is kept, it is only no longer pre-selected for its TLD. Use this endpoint to stop reusing contact information for new registrations.
339
+
340
+ ### Example
341
+
342
+ ```typescript
343
+ import {
344
+ DomainsWHOISApi,
345
+ Configuration
346
+ } from 'hostinger-api-sdk';
347
+
348
+ const configuration = new Configuration();
349
+ const apiInstance = new DomainsWHOISApi(configuration);
350
+
351
+ let whoisId: number; //WHOIS ID (default to undefined)
352
+
353
+ const { status, data } = await apiInstance.unsetDefaultWHOISProfileV1(
354
+ whoisId
355
+ );
356
+ ```
357
+
358
+ ### Parameters
359
+
360
+ |Name | Type | Description | Notes|
361
+ |------------- | ------------- | ------------- | -------------|
362
+ | **whoisId** | [**number**] | WHOIS ID | defaults to undefined|
363
+
364
+
365
+ ### Return type
366
+
367
+ **CommonSuccessEmptyResource**
368
+
369
+ ### Authorization
370
+
371
+ [apiToken](../README.md#apiToken)
372
+
373
+ ### HTTP request headers
374
+
375
+ - **Content-Type**: Not defined
376
+ - **Accept**: application/json
377
+
378
+
379
+ ### HTTP response details
380
+ | Status code | Description | Response headers |
381
+ |-------------|-------------|------------------|
382
+ |**200** | Success empty response | - |
383
+ |**401** | Unauthenticated response | - |
384
+ |**500** | Error response | - |
385
+
386
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
387
+
@@ -800,7 +800,7 @@ const { status, data } = await apiInstance.startVirtualMachineV1(
800
800
  # **stopVirtualMachineV1**
801
801
  > VPSV1ActionActionResource stopVirtualMachineV1()
802
802
 
803
- Stop a specified virtual machine. If the virtual machine is already stopped, the request will still be processed without any effect. Use this endpoint to power off running VPS instances.
803
+ Stop a specified virtual machine. If the virtual machine is already stopped, the request will still be processed without any effect. This is a compute-only power state change and does not affect billing. To stop future charges, disable auto-renewal on the owning subscription. Use this endpoint to power off running VPS instances.
804
804
 
805
805
  ### Example
806
806
 
package/index.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.22.0
6
+ * API Version: 1.24.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hostinger-api-sdk",
3
- "version": "1.21.1",
3
+ "version": "1.23.0",
4
4
  "description": "Hostinger API TypeScript SDK",
5
5
  "author": "Hostinger",
6
6
  "repository": {