hostinger-api-sdk 1.4.0 → 1.5.1

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: 1.4.0
7
+ * API Version: 1.5.1
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
@@ -4446,91 +4446,22 @@ const HostingCacheApiAxiosParamCreator = function (configuration) {
4446
4446
  };
4447
4447
  }),
4448
4448
  /**
4449
- * Turns off development (cacheless) mode and returns the website to normal caching. Use it after finishing development work to restore the performance benefits of caching.
4450
- * @summary Disable cacheless mode
4449
+ * Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching.
4450
+ * @summary Toggle cacheless mode
4451
4451
  * @param {string} username
4452
4452
  * @param {string} domain Domain name
4453
+ * @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
4453
4454
  * @param {*} [options] Override http request option.
4454
4455
  * @throws {RequiredError}
4455
4456
  */
4456
- disableCachelessModeV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
4457
+ toggleCachelessModeV1: (username_1, domain_1, hostingV1CacheToggleCachelessModeRequest_1, ...args_1) => __awaiter(this, [username_1, domain_1, hostingV1CacheToggleCachelessModeRequest_1, ...args_1], void 0, function* (username, domain, hostingV1CacheToggleCachelessModeRequest, options = {}) {
4457
4458
  // verify required parameter 'username' is not null or undefined
4458
- (0, common_1.assertParamExists)('disableCachelessModeV1', 'username', username);
4459
+ (0, common_1.assertParamExists)('toggleCachelessModeV1', 'username', username);
4459
4460
  // verify required parameter 'domain' is not null or undefined
4460
- (0, common_1.assertParamExists)('disableCachelessModeV1', 'domain', domain);
4461
- const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cacheless-mode/disable`
4462
- .replace(`{${"username"}}`, encodeURIComponent(String(username)))
4463
- .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
4464
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
4465
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
4466
- let baseOptions;
4467
- if (configuration) {
4468
- baseOptions = configuration.baseOptions;
4469
- }
4470
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
4471
- const localVarHeaderParameter = {};
4472
- const localVarQueryParameter = {};
4473
- // authentication apiToken required
4474
- // http bearer authentication required
4475
- yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
4476
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
4477
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4478
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4479
- return {
4480
- url: (0, common_1.toPathString)(localVarUrlObj),
4481
- options: localVarRequestOptions,
4482
- };
4483
- }),
4484
- /**
4485
- * Turns off server-side caching for the website until it is enabled again. May impact performance. Use it when experiencing cache-related issues; to temporarily bypass caching while developing or debugging, prefer enabling cacheless mode instead. Does nothing if caching is already disabled.
4486
- * @summary Disable website cache
4487
- * @param {string} username
4488
- * @param {string} domain Domain name
4489
- * @param {*} [options] Override http request option.
4490
- * @throws {RequiredError}
4491
- */
4492
- disableWebsiteCacheV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
4493
- // verify required parameter 'username' is not null or undefined
4494
- (0, common_1.assertParamExists)('disableWebsiteCacheV1', 'username', username);
4495
- // verify required parameter 'domain' is not null or undefined
4496
- (0, common_1.assertParamExists)('disableWebsiteCacheV1', 'domain', domain);
4497
- const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cache/disable`
4498
- .replace(`{${"username"}}`, encodeURIComponent(String(username)))
4499
- .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
4500
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
4501
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
4502
- let baseOptions;
4503
- if (configuration) {
4504
- baseOptions = configuration.baseOptions;
4505
- }
4506
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
4507
- const localVarHeaderParameter = {};
4508
- const localVarQueryParameter = {};
4509
- // authentication apiToken required
4510
- // http bearer authentication required
4511
- yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
4512
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
4513
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4514
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4515
- return {
4516
- url: (0, common_1.toPathString)(localVarUrlObj),
4517
- options: localVarRequestOptions,
4518
- };
4519
- }),
4520
- /**
4521
- * Enables development (cacheless) mode where nothing is cached, effectively turning off all caching for the website. Use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable cacheless mode afterwards to restore normal caching.
4522
- * @summary Enable cacheless mode
4523
- * @param {string} username
4524
- * @param {string} domain Domain name
4525
- * @param {*} [options] Override http request option.
4526
- * @throws {RequiredError}
4527
- */
4528
- enableCachelessModeV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
4529
- // verify required parameter 'username' is not null or undefined
4530
- (0, common_1.assertParamExists)('enableCachelessModeV1', 'username', username);
4531
- // verify required parameter 'domain' is not null or undefined
4532
- (0, common_1.assertParamExists)('enableCachelessModeV1', 'domain', domain);
4533
- const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cacheless-mode/enable`
4461
+ (0, common_1.assertParamExists)('toggleCachelessModeV1', 'domain', domain);
4462
+ // verify required parameter 'hostingV1CacheToggleCachelessModeRequest' is not null or undefined
4463
+ (0, common_1.assertParamExists)('toggleCachelessModeV1', 'hostingV1CacheToggleCachelessModeRequest', hostingV1CacheToggleCachelessModeRequest);
4464
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cacheless-mode/toggle`
4534
4465
  .replace(`{${"username"}}`, encodeURIComponent(String(username)))
4535
4466
  .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
4536
4467
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -4545,28 +4476,33 @@ const HostingCacheApiAxiosParamCreator = function (configuration) {
4545
4476
  // authentication apiToken required
4546
4477
  // http bearer authentication required
4547
4478
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
4479
+ localVarHeaderParameter['Content-Type'] = 'application/json';
4548
4480
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
4549
4481
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4550
4482
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4483
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(hostingV1CacheToggleCachelessModeRequest, localVarRequestOptions, configuration);
4551
4484
  return {
4552
4485
  url: (0, common_1.toPathString)(localVarUrlObj),
4553
4486
  options: localVarRequestOptions,
4554
4487
  };
4555
4488
  }),
4556
4489
  /**
4557
- * Turns on server-side caching for the website for better performance. Use it for faster page loads, reduced server load, or improved user experience. Recommended for production websites. Does nothing if caching is already enabled.
4558
- * @summary Enable website cache
4490
+ * Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
4491
+ * @summary Toggle website cache
4559
4492
  * @param {string} username
4560
4493
  * @param {string} domain Domain name
4494
+ * @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
4561
4495
  * @param {*} [options] Override http request option.
4562
4496
  * @throws {RequiredError}
4563
4497
  */
4564
- enableWebsiteCacheV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
4498
+ toggleWebsiteCacheV1: (username_1, domain_1, hostingV1CacheToggleCacheRequest_1, ...args_1) => __awaiter(this, [username_1, domain_1, hostingV1CacheToggleCacheRequest_1, ...args_1], void 0, function* (username, domain, hostingV1CacheToggleCacheRequest, options = {}) {
4565
4499
  // verify required parameter 'username' is not null or undefined
4566
- (0, common_1.assertParamExists)('enableWebsiteCacheV1', 'username', username);
4500
+ (0, common_1.assertParamExists)('toggleWebsiteCacheV1', 'username', username);
4567
4501
  // verify required parameter 'domain' is not null or undefined
4568
- (0, common_1.assertParamExists)('enableWebsiteCacheV1', 'domain', domain);
4569
- const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cache/enable`
4502
+ (0, common_1.assertParamExists)('toggleWebsiteCacheV1', 'domain', domain);
4503
+ // verify required parameter 'hostingV1CacheToggleCacheRequest' is not null or undefined
4504
+ (0, common_1.assertParamExists)('toggleWebsiteCacheV1', 'hostingV1CacheToggleCacheRequest', hostingV1CacheToggleCacheRequest);
4505
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cache/toggle`
4570
4506
  .replace(`{${"username"}}`, encodeURIComponent(String(username)))
4571
4507
  .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
4572
4508
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -4581,9 +4517,11 @@ const HostingCacheApiAxiosParamCreator = function (configuration) {
4581
4517
  // authentication apiToken required
4582
4518
  // http bearer authentication required
4583
4519
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
4520
+ localVarHeaderParameter['Content-Type'] = 'application/json';
4584
4521
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
4585
4522
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4586
4523
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4524
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(hostingV1CacheToggleCacheRequest, localVarRequestOptions, configuration);
4587
4525
  return {
4588
4526
  url: (0, common_1.toPathString)(localVarUrlObj),
4589
4527
  options: localVarRequestOptions,
@@ -4617,66 +4555,36 @@ const HostingCacheApiFp = function (configuration) {
4617
4555
  });
4618
4556
  },
4619
4557
  /**
4620
- * Turns off development (cacheless) mode and returns the website to normal caching. Use it after finishing development work to restore the performance benefits of caching.
4621
- * @summary Disable cacheless mode
4622
- * @param {string} username
4623
- * @param {string} domain Domain name
4624
- * @param {*} [options] Override http request option.
4625
- * @throws {RequiredError}
4626
- */
4627
- disableCachelessModeV1(username, domain, options) {
4628
- return __awaiter(this, void 0, void 0, function* () {
4629
- var _a, _b;
4630
- const localVarAxiosArgs = yield localVarAxiosParamCreator.disableCachelessModeV1(username, domain, options);
4631
- const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['HostingCacheApi.disableCachelessModeV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
4632
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4633
- });
4634
- },
4635
- /**
4636
- * Turns off server-side caching for the website until it is enabled again. May impact performance. Use it when experiencing cache-related issues; to temporarily bypass caching while developing or debugging, prefer enabling cacheless mode instead. Does nothing if caching is already disabled.
4637
- * @summary Disable website cache
4558
+ * Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching.
4559
+ * @summary Toggle cacheless mode
4638
4560
  * @param {string} username
4639
4561
  * @param {string} domain Domain name
4562
+ * @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
4640
4563
  * @param {*} [options] Override http request option.
4641
4564
  * @throws {RequiredError}
4642
4565
  */
4643
- disableWebsiteCacheV1(username, domain, options) {
4566
+ toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options) {
4644
4567
  return __awaiter(this, void 0, void 0, function* () {
4645
4568
  var _a, _b;
4646
- const localVarAxiosArgs = yield localVarAxiosParamCreator.disableWebsiteCacheV1(username, domain, options);
4647
- const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['HostingCacheApi.disableWebsiteCacheV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
4569
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options);
4570
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['HostingCacheApi.toggleCachelessModeV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
4648
4571
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4649
4572
  });
4650
4573
  },
4651
4574
  /**
4652
- * Enables development (cacheless) mode where nothing is cached, effectively turning off all caching for the website. Use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable cacheless mode afterwards to restore normal caching.
4653
- * @summary Enable cacheless mode
4575
+ * Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
4576
+ * @summary Toggle website cache
4654
4577
  * @param {string} username
4655
4578
  * @param {string} domain Domain name
4579
+ * @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
4656
4580
  * @param {*} [options] Override http request option.
4657
4581
  * @throws {RequiredError}
4658
4582
  */
4659
- enableCachelessModeV1(username, domain, options) {
4583
+ toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options) {
4660
4584
  return __awaiter(this, void 0, void 0, function* () {
4661
4585
  var _a, _b;
4662
- const localVarAxiosArgs = yield localVarAxiosParamCreator.enableCachelessModeV1(username, domain, options);
4663
- const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['HostingCacheApi.enableCachelessModeV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
4664
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4665
- });
4666
- },
4667
- /**
4668
- * Turns on server-side caching for the website for better performance. Use it for faster page loads, reduced server load, or improved user experience. Recommended for production websites. Does nothing if caching is already enabled.
4669
- * @summary Enable website cache
4670
- * @param {string} username
4671
- * @param {string} domain Domain name
4672
- * @param {*} [options] Override http request option.
4673
- * @throws {RequiredError}
4674
- */
4675
- enableWebsiteCacheV1(username, domain, options) {
4676
- return __awaiter(this, void 0, void 0, function* () {
4677
- var _a, _b;
4678
- const localVarAxiosArgs = yield localVarAxiosParamCreator.enableWebsiteCacheV1(username, domain, options);
4679
- const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['HostingCacheApi.enableWebsiteCacheV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
4586
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options);
4587
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['HostingCacheApi.toggleWebsiteCacheV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
4680
4588
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4681
4589
  });
4682
4590
  },
@@ -4703,48 +4611,28 @@ const HostingCacheApiFactory = function (configuration, basePath, axios) {
4703
4611
  return localVarFp.clearWebsiteCacheV1(username, domain, directory, options).then((request) => request(axios, basePath));
4704
4612
  },
4705
4613
  /**
4706
- * Turns off development (cacheless) mode and returns the website to normal caching. Use it after finishing development work to restore the performance benefits of caching.
4707
- * @summary Disable cacheless mode
4708
- * @param {string} username
4709
- * @param {string} domain Domain name
4710
- * @param {*} [options] Override http request option.
4711
- * @throws {RequiredError}
4712
- */
4713
- disableCachelessModeV1(username, domain, options) {
4714
- return localVarFp.disableCachelessModeV1(username, domain, options).then((request) => request(axios, basePath));
4715
- },
4716
- /**
4717
- * Turns off server-side caching for the website until it is enabled again. May impact performance. Use it when experiencing cache-related issues; to temporarily bypass caching while developing or debugging, prefer enabling cacheless mode instead. Does nothing if caching is already disabled.
4718
- * @summary Disable website cache
4719
- * @param {string} username
4720
- * @param {string} domain Domain name
4721
- * @param {*} [options] Override http request option.
4722
- * @throws {RequiredError}
4723
- */
4724
- disableWebsiteCacheV1(username, domain, options) {
4725
- return localVarFp.disableWebsiteCacheV1(username, domain, options).then((request) => request(axios, basePath));
4726
- },
4727
- /**
4728
- * Enables development (cacheless) mode where nothing is cached, effectively turning off all caching for the website. Use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable cacheless mode afterwards to restore normal caching.
4729
- * @summary Enable cacheless mode
4614
+ * Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching.
4615
+ * @summary Toggle cacheless mode
4730
4616
  * @param {string} username
4731
4617
  * @param {string} domain Domain name
4618
+ * @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
4732
4619
  * @param {*} [options] Override http request option.
4733
4620
  * @throws {RequiredError}
4734
4621
  */
4735
- enableCachelessModeV1(username, domain, options) {
4736
- return localVarFp.enableCachelessModeV1(username, domain, options).then((request) => request(axios, basePath));
4622
+ toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options) {
4623
+ return localVarFp.toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options).then((request) => request(axios, basePath));
4737
4624
  },
4738
4625
  /**
4739
- * Turns on server-side caching for the website for better performance. Use it for faster page loads, reduced server load, or improved user experience. Recommended for production websites. Does nothing if caching is already enabled.
4740
- * @summary Enable website cache
4626
+ * Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
4627
+ * @summary Toggle website cache
4741
4628
  * @param {string} username
4742
4629
  * @param {string} domain Domain name
4630
+ * @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
4743
4631
  * @param {*} [options] Override http request option.
4744
4632
  * @throws {RequiredError}
4745
4633
  */
4746
- enableWebsiteCacheV1(username, domain, options) {
4747
- return localVarFp.enableWebsiteCacheV1(username, domain, options).then((request) => request(axios, basePath));
4634
+ toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options) {
4635
+ return localVarFp.toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options).then((request) => request(axios, basePath));
4748
4636
  },
4749
4637
  };
4750
4638
  };
@@ -4770,52 +4658,30 @@ class HostingCacheApi extends base_1.BaseAPI {
4770
4658
  return (0, exports.HostingCacheApiFp)(this.configuration).clearWebsiteCacheV1(username, domain, directory, options).then((request) => request(this.axios, this.basePath));
4771
4659
  }
4772
4660
  /**
4773
- * Turns off development (cacheless) mode and returns the website to normal caching. Use it after finishing development work to restore the performance benefits of caching.
4774
- * @summary Disable cacheless mode
4661
+ * Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching.
4662
+ * @summary Toggle cacheless mode
4775
4663
  * @param {string} username
4776
4664
  * @param {string} domain Domain name
4665
+ * @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
4777
4666
  * @param {*} [options] Override http request option.
4778
4667
  * @throws {RequiredError}
4779
4668
  * @memberof HostingCacheApi
4780
4669
  */
4781
- disableCachelessModeV1(username, domain, options) {
4782
- return (0, exports.HostingCacheApiFp)(this.configuration).disableCachelessModeV1(username, domain, options).then((request) => request(this.axios, this.basePath));
4670
+ toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options) {
4671
+ return (0, exports.HostingCacheApiFp)(this.configuration).toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options).then((request) => request(this.axios, this.basePath));
4783
4672
  }
4784
4673
  /**
4785
- * Turns off server-side caching for the website until it is enabled again. May impact performance. Use it when experiencing cache-related issues; to temporarily bypass caching while developing or debugging, prefer enabling cacheless mode instead. Does nothing if caching is already disabled.
4786
- * @summary Disable website cache
4674
+ * Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
4675
+ * @summary Toggle website cache
4787
4676
  * @param {string} username
4788
4677
  * @param {string} domain Domain name
4678
+ * @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
4789
4679
  * @param {*} [options] Override http request option.
4790
4680
  * @throws {RequiredError}
4791
4681
  * @memberof HostingCacheApi
4792
4682
  */
4793
- disableWebsiteCacheV1(username, domain, options) {
4794
- return (0, exports.HostingCacheApiFp)(this.configuration).disableWebsiteCacheV1(username, domain, options).then((request) => request(this.axios, this.basePath));
4795
- }
4796
- /**
4797
- * Enables development (cacheless) mode where nothing is cached, effectively turning off all caching for the website. Use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable cacheless mode afterwards to restore normal caching.
4798
- * @summary Enable cacheless mode
4799
- * @param {string} username
4800
- * @param {string} domain Domain name
4801
- * @param {*} [options] Override http request option.
4802
- * @throws {RequiredError}
4803
- * @memberof HostingCacheApi
4804
- */
4805
- enableCachelessModeV1(username, domain, options) {
4806
- return (0, exports.HostingCacheApiFp)(this.configuration).enableCachelessModeV1(username, domain, options).then((request) => request(this.axios, this.basePath));
4807
- }
4808
- /**
4809
- * Turns on server-side caching for the website for better performance. Use it for faster page loads, reduced server load, or improved user experience. Recommended for production websites. Does nothing if caching is already enabled.
4810
- * @summary Enable website cache
4811
- * @param {string} username
4812
- * @param {string} domain Domain name
4813
- * @param {*} [options] Override http request option.
4814
- * @throws {RequiredError}
4815
- * @memberof HostingCacheApi
4816
- */
4817
- enableWebsiteCacheV1(username, domain, options) {
4818
- return (0, exports.HostingCacheApiFp)(this.configuration).enableWebsiteCacheV1(username, domain, options).then((request) => request(this.axios, this.basePath));
4683
+ toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options) {
4684
+ return (0, exports.HostingCacheApiFp)(this.configuration).toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options).then((request) => request(this.axios, this.basePath));
4819
4685
  }
4820
4686
  }
4821
4687
  exports.HostingCacheApi = HostingCacheApi;
@@ -6813,6 +6679,42 @@ const HostingNodeJSApiAxiosParamCreator = function (configuration) {
6813
6679
  options: localVarRequestOptions,
6814
6680
  };
6815
6681
  }),
6682
+ /**
6683
+ * Restarts the Node.js server process for the website. Does not rebuild or redeploy the application. Use it to apply environment or configuration changes, or to recover a hung application. Only applicable to server-side applications (Express, Next.js, NestJS, etc.). Static front-end apps (React, Vue, Vite) have no persistent server process, so restarting them has no effect. Returns success even when the website has no server process to restart.
6684
+ * @summary Restart Node.js application
6685
+ * @param {string} username
6686
+ * @param {string} domain Domain name
6687
+ * @param {*} [options] Override http request option.
6688
+ * @throws {RequiredError}
6689
+ */
6690
+ restartNodeJsApplicationV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
6691
+ // verify required parameter 'username' is not null or undefined
6692
+ (0, common_1.assertParamExists)('restartNodeJsApplicationV1', 'username', username);
6693
+ // verify required parameter 'domain' is not null or undefined
6694
+ (0, common_1.assertParamExists)('restartNodeJsApplicationV1', 'domain', domain);
6695
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/server/restart`
6696
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
6697
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
6698
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
6699
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
6700
+ let baseOptions;
6701
+ if (configuration) {
6702
+ baseOptions = configuration.baseOptions;
6703
+ }
6704
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
6705
+ const localVarHeaderParameter = {};
6706
+ const localVarQueryParameter = {};
6707
+ // authentication apiToken required
6708
+ // http bearer authentication required
6709
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
6710
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
6711
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
6712
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
6713
+ return {
6714
+ url: (0, common_1.toPathString)(localVarUrlObj),
6715
+ options: localVarRequestOptions,
6716
+ };
6717
+ }),
6816
6718
  };
6817
6719
  };
6818
6720
  exports.HostingNodeJSApiAxiosParamCreator = HostingNodeJSApiAxiosParamCreator;
@@ -6877,6 +6779,22 @@ const HostingNodeJSApiFp = function (configuration) {
6877
6779
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
6878
6780
  });
6879
6781
  },
6782
+ /**
6783
+ * Restarts the Node.js server process for the website. Does not rebuild or redeploy the application. Use it to apply environment or configuration changes, or to recover a hung application. Only applicable to server-side applications (Express, Next.js, NestJS, etc.). Static front-end apps (React, Vue, Vite) have no persistent server process, so restarting them has no effect. Returns success even when the website has no server process to restart.
6784
+ * @summary Restart Node.js application
6785
+ * @param {string} username
6786
+ * @param {string} domain Domain name
6787
+ * @param {*} [options] Override http request option.
6788
+ * @throws {RequiredError}
6789
+ */
6790
+ restartNodeJsApplicationV1(username, domain, options) {
6791
+ return __awaiter(this, void 0, void 0, function* () {
6792
+ var _a, _b;
6793
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.restartNodeJsApplicationV1(username, domain, options);
6794
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['HostingNodeJSApi.restartNodeJsApplicationV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
6795
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
6796
+ });
6797
+ },
6880
6798
  };
6881
6799
  };
6882
6800
  exports.HostingNodeJSApiFp = HostingNodeJSApiFp;
@@ -6926,6 +6844,17 @@ const HostingNodeJSApiFactory = function (configuration, basePath, axios) {
6926
6844
  listNodeJSBuildsV1(username, domain, page, perPage, states, options) {
6927
6845
  return localVarFp.listNodeJSBuildsV1(username, domain, page, perPage, states, options).then((request) => request(axios, basePath));
6928
6846
  },
6847
+ /**
6848
+ * Restarts the Node.js server process for the website. Does not rebuild or redeploy the application. Use it to apply environment or configuration changes, or to recover a hung application. Only applicable to server-side applications (Express, Next.js, NestJS, etc.). Static front-end apps (React, Vue, Vite) have no persistent server process, so restarting them has no effect. Returns success even when the website has no server process to restart.
6849
+ * @summary Restart Node.js application
6850
+ * @param {string} username
6851
+ * @param {string} domain Domain name
6852
+ * @param {*} [options] Override http request option.
6853
+ * @throws {RequiredError}
6854
+ */
6855
+ restartNodeJsApplicationV1(username, domain, options) {
6856
+ return localVarFp.restartNodeJsApplicationV1(username, domain, options).then((request) => request(axios, basePath));
6857
+ },
6929
6858
  };
6930
6859
  };
6931
6860
  exports.HostingNodeJSApiFactory = HostingNodeJSApiFactory;
@@ -6978,6 +6907,18 @@ class HostingNodeJSApi extends base_1.BaseAPI {
6978
6907
  listNodeJSBuildsV1(username, domain, page, perPage, states, options) {
6979
6908
  return (0, exports.HostingNodeJSApiFp)(this.configuration).listNodeJSBuildsV1(username, domain, page, perPage, states, options).then((request) => request(this.axios, this.basePath));
6980
6909
  }
6910
+ /**
6911
+ * Restarts the Node.js server process for the website. Does not rebuild or redeploy the application. Use it to apply environment or configuration changes, or to recover a hung application. Only applicable to server-side applications (Express, Next.js, NestJS, etc.). Static front-end apps (React, Vue, Vite) have no persistent server process, so restarting them has no effect. Returns success even when the website has no server process to restart.
6912
+ * @summary Restart Node.js application
6913
+ * @param {string} username
6914
+ * @param {string} domain Domain name
6915
+ * @param {*} [options] Override http request option.
6916
+ * @throws {RequiredError}
6917
+ * @memberof HostingNodeJSApi
6918
+ */
6919
+ restartNodeJsApplicationV1(username, domain, options) {
6920
+ return (0, exports.HostingNodeJSApiFp)(this.configuration).restartNodeJsApplicationV1(username, domain, options).then((request) => request(this.axios, this.basePath));
6921
+ }
6981
6922
  }
6982
6923
  exports.HostingNodeJSApi = HostingNodeJSApi;
6983
6924
  /**
package/dist/base.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.4.0
4
+ * API Version: 1.5.1
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/base.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.4.0
7
+ * API Version: 1.5.1
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
package/dist/common.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.4.0
4
+ * API Version: 1.5.1
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/common.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.4.0
7
+ * API Version: 1.5.1
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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.4.0
4
+ * API Version: 1.5.1
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
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.4.0
7
+ * API Version: 1.5.1
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
@@ -16,7 +16,7 @@ class Configuration {
16
16
  var _a;
17
17
  this.accessToken = param.accessToken;
18
18
  this.basePath = param.basePath;
19
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.4.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
19
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.5.1" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
20
20
  this.formDataCtor = param.formDataCtor;
21
21
  }
22
22
  /**