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/README.md +2 -2
- package/api.ts +160 -195
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +96 -99
- package/dist/api.js +130 -189
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +96 -99
- package/dist/esm/api.js +130 -189
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/HostingCacheApi.md +26 -130
- package/docs/HostingNodeJSApi.md +57 -0
- package/docs/HostingV1CacheToggleCacheRequest.md +20 -0
- package/docs/HostingV1CacheToggleCachelessModeRequest.md +20 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/esm/api.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.5.1
|
|
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
|
|
@@ -4370,91 +4370,22 @@ export const HostingCacheApiAxiosParamCreator = function (configuration) {
|
|
|
4370
4370
|
};
|
|
4371
4371
|
}),
|
|
4372
4372
|
/**
|
|
4373
|
-
* Turns
|
|
4374
|
-
* @summary
|
|
4373
|
+
* 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.
|
|
4374
|
+
* @summary Toggle cacheless mode
|
|
4375
4375
|
* @param {string} username
|
|
4376
4376
|
* @param {string} domain Domain name
|
|
4377
|
+
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
4377
4378
|
* @param {*} [options] Override http request option.
|
|
4378
4379
|
* @throws {RequiredError}
|
|
4379
4380
|
*/
|
|
4380
|
-
|
|
4381
|
+
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 = {}) {
|
|
4381
4382
|
// verify required parameter 'username' is not null or undefined
|
|
4382
|
-
assertParamExists('
|
|
4383
|
+
assertParamExists('toggleCachelessModeV1', 'username', username);
|
|
4383
4384
|
// verify required parameter 'domain' is not null or undefined
|
|
4384
|
-
assertParamExists('
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4389
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4390
|
-
let baseOptions;
|
|
4391
|
-
if (configuration) {
|
|
4392
|
-
baseOptions = configuration.baseOptions;
|
|
4393
|
-
}
|
|
4394
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
4395
|
-
const localVarHeaderParameter = {};
|
|
4396
|
-
const localVarQueryParameter = {};
|
|
4397
|
-
// authentication apiToken required
|
|
4398
|
-
// http bearer authentication required
|
|
4399
|
-
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4400
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4401
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4402
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4403
|
-
return {
|
|
4404
|
-
url: toPathString(localVarUrlObj),
|
|
4405
|
-
options: localVarRequestOptions,
|
|
4406
|
-
};
|
|
4407
|
-
}),
|
|
4408
|
-
/**
|
|
4409
|
-
* 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.
|
|
4410
|
-
* @summary Disable website cache
|
|
4411
|
-
* @param {string} username
|
|
4412
|
-
* @param {string} domain Domain name
|
|
4413
|
-
* @param {*} [options] Override http request option.
|
|
4414
|
-
* @throws {RequiredError}
|
|
4415
|
-
*/
|
|
4416
|
-
disableWebsiteCacheV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
4417
|
-
// verify required parameter 'username' is not null or undefined
|
|
4418
|
-
assertParamExists('disableWebsiteCacheV1', 'username', username);
|
|
4419
|
-
// verify required parameter 'domain' is not null or undefined
|
|
4420
|
-
assertParamExists('disableWebsiteCacheV1', 'domain', domain);
|
|
4421
|
-
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cache/disable`
|
|
4422
|
-
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
4423
|
-
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
4424
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4425
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4426
|
-
let baseOptions;
|
|
4427
|
-
if (configuration) {
|
|
4428
|
-
baseOptions = configuration.baseOptions;
|
|
4429
|
-
}
|
|
4430
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
4431
|
-
const localVarHeaderParameter = {};
|
|
4432
|
-
const localVarQueryParameter = {};
|
|
4433
|
-
// authentication apiToken required
|
|
4434
|
-
// http bearer authentication required
|
|
4435
|
-
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4436
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4437
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4438
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4439
|
-
return {
|
|
4440
|
-
url: toPathString(localVarUrlObj),
|
|
4441
|
-
options: localVarRequestOptions,
|
|
4442
|
-
};
|
|
4443
|
-
}),
|
|
4444
|
-
/**
|
|
4445
|
-
* 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.
|
|
4446
|
-
* @summary Enable cacheless mode
|
|
4447
|
-
* @param {string} username
|
|
4448
|
-
* @param {string} domain Domain name
|
|
4449
|
-
* @param {*} [options] Override http request option.
|
|
4450
|
-
* @throws {RequiredError}
|
|
4451
|
-
*/
|
|
4452
|
-
enableCachelessModeV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
4453
|
-
// verify required parameter 'username' is not null or undefined
|
|
4454
|
-
assertParamExists('enableCachelessModeV1', 'username', username);
|
|
4455
|
-
// verify required parameter 'domain' is not null or undefined
|
|
4456
|
-
assertParamExists('enableCachelessModeV1', 'domain', domain);
|
|
4457
|
-
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cacheless-mode/enable`
|
|
4385
|
+
assertParamExists('toggleCachelessModeV1', 'domain', domain);
|
|
4386
|
+
// verify required parameter 'hostingV1CacheToggleCachelessModeRequest' is not null or undefined
|
|
4387
|
+
assertParamExists('toggleCachelessModeV1', 'hostingV1CacheToggleCachelessModeRequest', hostingV1CacheToggleCachelessModeRequest);
|
|
4388
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cacheless-mode/toggle`
|
|
4458
4389
|
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
4459
4390
|
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
4460
4391
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -4469,28 +4400,33 @@ export const HostingCacheApiAxiosParamCreator = function (configuration) {
|
|
|
4469
4400
|
// authentication apiToken required
|
|
4470
4401
|
// http bearer authentication required
|
|
4471
4402
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4403
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4472
4404
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4473
4405
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4474
4406
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4407
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1CacheToggleCachelessModeRequest, localVarRequestOptions, configuration);
|
|
4475
4408
|
return {
|
|
4476
4409
|
url: toPathString(localVarUrlObj),
|
|
4477
4410
|
options: localVarRequestOptions,
|
|
4478
4411
|
};
|
|
4479
4412
|
}),
|
|
4480
4413
|
/**
|
|
4481
|
-
* Turns
|
|
4482
|
-
* @summary
|
|
4414
|
+
* 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.
|
|
4415
|
+
* @summary Toggle website cache
|
|
4483
4416
|
* @param {string} username
|
|
4484
4417
|
* @param {string} domain Domain name
|
|
4418
|
+
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
4485
4419
|
* @param {*} [options] Override http request option.
|
|
4486
4420
|
* @throws {RequiredError}
|
|
4487
4421
|
*/
|
|
4488
|
-
|
|
4422
|
+
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 = {}) {
|
|
4489
4423
|
// verify required parameter 'username' is not null or undefined
|
|
4490
|
-
assertParamExists('
|
|
4424
|
+
assertParamExists('toggleWebsiteCacheV1', 'username', username);
|
|
4491
4425
|
// verify required parameter 'domain' is not null or undefined
|
|
4492
|
-
assertParamExists('
|
|
4493
|
-
|
|
4426
|
+
assertParamExists('toggleWebsiteCacheV1', 'domain', domain);
|
|
4427
|
+
// verify required parameter 'hostingV1CacheToggleCacheRequest' is not null or undefined
|
|
4428
|
+
assertParamExists('toggleWebsiteCacheV1', 'hostingV1CacheToggleCacheRequest', hostingV1CacheToggleCacheRequest);
|
|
4429
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cache/toggle`
|
|
4494
4430
|
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
4495
4431
|
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
4496
4432
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -4505,9 +4441,11 @@ export const HostingCacheApiAxiosParamCreator = function (configuration) {
|
|
|
4505
4441
|
// authentication apiToken required
|
|
4506
4442
|
// http bearer authentication required
|
|
4507
4443
|
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4444
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4508
4445
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4509
4446
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4510
4447
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4448
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1CacheToggleCacheRequest, localVarRequestOptions, configuration);
|
|
4511
4449
|
return {
|
|
4512
4450
|
url: toPathString(localVarUrlObj),
|
|
4513
4451
|
options: localVarRequestOptions,
|
|
@@ -4540,66 +4478,36 @@ export const HostingCacheApiFp = function (configuration) {
|
|
|
4540
4478
|
});
|
|
4541
4479
|
},
|
|
4542
4480
|
/**
|
|
4543
|
-
* Turns
|
|
4544
|
-
* @summary
|
|
4545
|
-
* @param {string} username
|
|
4546
|
-
* @param {string} domain Domain name
|
|
4547
|
-
* @param {*} [options] Override http request option.
|
|
4548
|
-
* @throws {RequiredError}
|
|
4549
|
-
*/
|
|
4550
|
-
disableCachelessModeV1(username, domain, options) {
|
|
4551
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
4552
|
-
var _a, _b;
|
|
4553
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.disableCachelessModeV1(username, domain, options);
|
|
4554
|
-
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCacheApi.disableCachelessModeV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
4555
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4556
|
-
});
|
|
4557
|
-
},
|
|
4558
|
-
/**
|
|
4559
|
-
* 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.
|
|
4560
|
-
* @summary Disable website cache
|
|
4481
|
+
* 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.
|
|
4482
|
+
* @summary Toggle cacheless mode
|
|
4561
4483
|
* @param {string} username
|
|
4562
4484
|
* @param {string} domain Domain name
|
|
4485
|
+
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
4563
4486
|
* @param {*} [options] Override http request option.
|
|
4564
4487
|
* @throws {RequiredError}
|
|
4565
4488
|
*/
|
|
4566
|
-
|
|
4489
|
+
toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options) {
|
|
4567
4490
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4568
4491
|
var _a, _b;
|
|
4569
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
4570
|
-
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCacheApi.
|
|
4492
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options);
|
|
4493
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCacheApi.toggleCachelessModeV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
4571
4494
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4572
4495
|
});
|
|
4573
4496
|
},
|
|
4574
4497
|
/**
|
|
4575
|
-
*
|
|
4576
|
-
* @summary
|
|
4498
|
+
* 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.
|
|
4499
|
+
* @summary Toggle website cache
|
|
4577
4500
|
* @param {string} username
|
|
4578
4501
|
* @param {string} domain Domain name
|
|
4502
|
+
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
4579
4503
|
* @param {*} [options] Override http request option.
|
|
4580
4504
|
* @throws {RequiredError}
|
|
4581
4505
|
*/
|
|
4582
|
-
|
|
4506
|
+
toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options) {
|
|
4583
4507
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4584
4508
|
var _a, _b;
|
|
4585
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
4586
|
-
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCacheApi.
|
|
4587
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4588
|
-
});
|
|
4589
|
-
},
|
|
4590
|
-
/**
|
|
4591
|
-
* 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.
|
|
4592
|
-
* @summary Enable website cache
|
|
4593
|
-
* @param {string} username
|
|
4594
|
-
* @param {string} domain Domain name
|
|
4595
|
-
* @param {*} [options] Override http request option.
|
|
4596
|
-
* @throws {RequiredError}
|
|
4597
|
-
*/
|
|
4598
|
-
enableWebsiteCacheV1(username, domain, options) {
|
|
4599
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
4600
|
-
var _a, _b;
|
|
4601
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.enableWebsiteCacheV1(username, domain, options);
|
|
4602
|
-
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCacheApi.enableWebsiteCacheV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
4509
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options);
|
|
4510
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCacheApi.toggleWebsiteCacheV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
4603
4511
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4604
4512
|
});
|
|
4605
4513
|
},
|
|
@@ -4625,48 +4533,28 @@ export const HostingCacheApiFactory = function (configuration, basePath, axios)
|
|
|
4625
4533
|
return localVarFp.clearWebsiteCacheV1(username, domain, directory, options).then((request) => request(axios, basePath));
|
|
4626
4534
|
},
|
|
4627
4535
|
/**
|
|
4628
|
-
* Turns
|
|
4629
|
-
* @summary
|
|
4630
|
-
* @param {string} username
|
|
4631
|
-
* @param {string} domain Domain name
|
|
4632
|
-
* @param {*} [options] Override http request option.
|
|
4633
|
-
* @throws {RequiredError}
|
|
4634
|
-
*/
|
|
4635
|
-
disableCachelessModeV1(username, domain, options) {
|
|
4636
|
-
return localVarFp.disableCachelessModeV1(username, domain, options).then((request) => request(axios, basePath));
|
|
4637
|
-
},
|
|
4638
|
-
/**
|
|
4639
|
-
* 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.
|
|
4640
|
-
* @summary Disable website cache
|
|
4641
|
-
* @param {string} username
|
|
4642
|
-
* @param {string} domain Domain name
|
|
4643
|
-
* @param {*} [options] Override http request option.
|
|
4644
|
-
* @throws {RequiredError}
|
|
4645
|
-
*/
|
|
4646
|
-
disableWebsiteCacheV1(username, domain, options) {
|
|
4647
|
-
return localVarFp.disableWebsiteCacheV1(username, domain, options).then((request) => request(axios, basePath));
|
|
4648
|
-
},
|
|
4649
|
-
/**
|
|
4650
|
-
* 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.
|
|
4651
|
-
* @summary Enable cacheless mode
|
|
4536
|
+
* 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.
|
|
4537
|
+
* @summary Toggle cacheless mode
|
|
4652
4538
|
* @param {string} username
|
|
4653
4539
|
* @param {string} domain Domain name
|
|
4540
|
+
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
4654
4541
|
* @param {*} [options] Override http request option.
|
|
4655
4542
|
* @throws {RequiredError}
|
|
4656
4543
|
*/
|
|
4657
|
-
|
|
4658
|
-
return localVarFp.
|
|
4544
|
+
toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options) {
|
|
4545
|
+
return localVarFp.toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options).then((request) => request(axios, basePath));
|
|
4659
4546
|
},
|
|
4660
4547
|
/**
|
|
4661
|
-
* Turns
|
|
4662
|
-
* @summary
|
|
4548
|
+
* 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.
|
|
4549
|
+
* @summary Toggle website cache
|
|
4663
4550
|
* @param {string} username
|
|
4664
4551
|
* @param {string} domain Domain name
|
|
4552
|
+
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
4665
4553
|
* @param {*} [options] Override http request option.
|
|
4666
4554
|
* @throws {RequiredError}
|
|
4667
4555
|
*/
|
|
4668
|
-
|
|
4669
|
-
return localVarFp.
|
|
4556
|
+
toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options) {
|
|
4557
|
+
return localVarFp.toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options).then((request) => request(axios, basePath));
|
|
4670
4558
|
},
|
|
4671
4559
|
};
|
|
4672
4560
|
};
|
|
@@ -4691,52 +4579,30 @@ export class HostingCacheApi extends BaseAPI {
|
|
|
4691
4579
|
return HostingCacheApiFp(this.configuration).clearWebsiteCacheV1(username, domain, directory, options).then((request) => request(this.axios, this.basePath));
|
|
4692
4580
|
}
|
|
4693
4581
|
/**
|
|
4694
|
-
* Turns
|
|
4695
|
-
* @summary
|
|
4582
|
+
* 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.
|
|
4583
|
+
* @summary Toggle cacheless mode
|
|
4696
4584
|
* @param {string} username
|
|
4697
4585
|
* @param {string} domain Domain name
|
|
4586
|
+
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
4698
4587
|
* @param {*} [options] Override http request option.
|
|
4699
4588
|
* @throws {RequiredError}
|
|
4700
4589
|
* @memberof HostingCacheApi
|
|
4701
4590
|
*/
|
|
4702
|
-
|
|
4703
|
-
return HostingCacheApiFp(this.configuration).
|
|
4591
|
+
toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options) {
|
|
4592
|
+
return HostingCacheApiFp(this.configuration).toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4704
4593
|
}
|
|
4705
4594
|
/**
|
|
4706
|
-
* Turns
|
|
4707
|
-
* @summary
|
|
4595
|
+
* 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.
|
|
4596
|
+
* @summary Toggle website cache
|
|
4708
4597
|
* @param {string} username
|
|
4709
4598
|
* @param {string} domain Domain name
|
|
4599
|
+
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
4710
4600
|
* @param {*} [options] Override http request option.
|
|
4711
4601
|
* @throws {RequiredError}
|
|
4712
4602
|
* @memberof HostingCacheApi
|
|
4713
4603
|
*/
|
|
4714
|
-
|
|
4715
|
-
return HostingCacheApiFp(this.configuration).
|
|
4716
|
-
}
|
|
4717
|
-
/**
|
|
4718
|
-
* 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.
|
|
4719
|
-
* @summary Enable cacheless mode
|
|
4720
|
-
* @param {string} username
|
|
4721
|
-
* @param {string} domain Domain name
|
|
4722
|
-
* @param {*} [options] Override http request option.
|
|
4723
|
-
* @throws {RequiredError}
|
|
4724
|
-
* @memberof HostingCacheApi
|
|
4725
|
-
*/
|
|
4726
|
-
enableCachelessModeV1(username, domain, options) {
|
|
4727
|
-
return HostingCacheApiFp(this.configuration).enableCachelessModeV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
4728
|
-
}
|
|
4729
|
-
/**
|
|
4730
|
-
* 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.
|
|
4731
|
-
* @summary Enable website cache
|
|
4732
|
-
* @param {string} username
|
|
4733
|
-
* @param {string} domain Domain name
|
|
4734
|
-
* @param {*} [options] Override http request option.
|
|
4735
|
-
* @throws {RequiredError}
|
|
4736
|
-
* @memberof HostingCacheApi
|
|
4737
|
-
*/
|
|
4738
|
-
enableWebsiteCacheV1(username, domain, options) {
|
|
4739
|
-
return HostingCacheApiFp(this.configuration).enableWebsiteCacheV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
4604
|
+
toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options) {
|
|
4605
|
+
return HostingCacheApiFp(this.configuration).toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4740
4606
|
}
|
|
4741
4607
|
}
|
|
4742
4608
|
/**
|
|
@@ -6717,6 +6583,42 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration) {
|
|
|
6717
6583
|
options: localVarRequestOptions,
|
|
6718
6584
|
};
|
|
6719
6585
|
}),
|
|
6586
|
+
/**
|
|
6587
|
+
* 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.
|
|
6588
|
+
* @summary Restart Node.js application
|
|
6589
|
+
* @param {string} username
|
|
6590
|
+
* @param {string} domain Domain name
|
|
6591
|
+
* @param {*} [options] Override http request option.
|
|
6592
|
+
* @throws {RequiredError}
|
|
6593
|
+
*/
|
|
6594
|
+
restartNodeJsApplicationV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
6595
|
+
// verify required parameter 'username' is not null or undefined
|
|
6596
|
+
assertParamExists('restartNodeJsApplicationV1', 'username', username);
|
|
6597
|
+
// verify required parameter 'domain' is not null or undefined
|
|
6598
|
+
assertParamExists('restartNodeJsApplicationV1', 'domain', domain);
|
|
6599
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/server/restart`
|
|
6600
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
6601
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
6602
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6603
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
6604
|
+
let baseOptions;
|
|
6605
|
+
if (configuration) {
|
|
6606
|
+
baseOptions = configuration.baseOptions;
|
|
6607
|
+
}
|
|
6608
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
6609
|
+
const localVarHeaderParameter = {};
|
|
6610
|
+
const localVarQueryParameter = {};
|
|
6611
|
+
// authentication apiToken required
|
|
6612
|
+
// http bearer authentication required
|
|
6613
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
6614
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6615
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6616
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
6617
|
+
return {
|
|
6618
|
+
url: toPathString(localVarUrlObj),
|
|
6619
|
+
options: localVarRequestOptions,
|
|
6620
|
+
};
|
|
6621
|
+
}),
|
|
6720
6622
|
};
|
|
6721
6623
|
};
|
|
6722
6624
|
/**
|
|
@@ -6780,6 +6682,22 @@ export const HostingNodeJSApiFp = function (configuration) {
|
|
|
6780
6682
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6781
6683
|
});
|
|
6782
6684
|
},
|
|
6685
|
+
/**
|
|
6686
|
+
* 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.
|
|
6687
|
+
* @summary Restart Node.js application
|
|
6688
|
+
* @param {string} username
|
|
6689
|
+
* @param {string} domain Domain name
|
|
6690
|
+
* @param {*} [options] Override http request option.
|
|
6691
|
+
* @throws {RequiredError}
|
|
6692
|
+
*/
|
|
6693
|
+
restartNodeJsApplicationV1(username, domain, options) {
|
|
6694
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6695
|
+
var _a, _b;
|
|
6696
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.restartNodeJsApplicationV1(username, domain, options);
|
|
6697
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingNodeJSApi.restartNodeJsApplicationV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
6698
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6699
|
+
});
|
|
6700
|
+
},
|
|
6783
6701
|
};
|
|
6784
6702
|
};
|
|
6785
6703
|
/**
|
|
@@ -6828,6 +6746,17 @@ export const HostingNodeJSApiFactory = function (configuration, basePath, axios)
|
|
|
6828
6746
|
listNodeJSBuildsV1(username, domain, page, perPage, states, options) {
|
|
6829
6747
|
return localVarFp.listNodeJSBuildsV1(username, domain, page, perPage, states, options).then((request) => request(axios, basePath));
|
|
6830
6748
|
},
|
|
6749
|
+
/**
|
|
6750
|
+
* 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.
|
|
6751
|
+
* @summary Restart Node.js application
|
|
6752
|
+
* @param {string} username
|
|
6753
|
+
* @param {string} domain Domain name
|
|
6754
|
+
* @param {*} [options] Override http request option.
|
|
6755
|
+
* @throws {RequiredError}
|
|
6756
|
+
*/
|
|
6757
|
+
restartNodeJsApplicationV1(username, domain, options) {
|
|
6758
|
+
return localVarFp.restartNodeJsApplicationV1(username, domain, options).then((request) => request(axios, basePath));
|
|
6759
|
+
},
|
|
6831
6760
|
};
|
|
6832
6761
|
};
|
|
6833
6762
|
/**
|
|
@@ -6879,6 +6808,18 @@ export class HostingNodeJSApi extends BaseAPI {
|
|
|
6879
6808
|
listNodeJSBuildsV1(username, domain, page, perPage, states, options) {
|
|
6880
6809
|
return HostingNodeJSApiFp(this.configuration).listNodeJSBuildsV1(username, domain, page, perPage, states, options).then((request) => request(this.axios, this.basePath));
|
|
6881
6810
|
}
|
|
6811
|
+
/**
|
|
6812
|
+
* 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.
|
|
6813
|
+
* @summary Restart Node.js application
|
|
6814
|
+
* @param {string} username
|
|
6815
|
+
* @param {string} domain Domain name
|
|
6816
|
+
* @param {*} [options] Override http request option.
|
|
6817
|
+
* @throws {RequiredError}
|
|
6818
|
+
* @memberof HostingNodeJSApi
|
|
6819
|
+
*/
|
|
6820
|
+
restartNodeJsApplicationV1(username, domain, options) {
|
|
6821
|
+
return HostingNodeJSApiFp(this.configuration).restartNodeJsApplicationV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
6822
|
+
}
|
|
6882
6823
|
}
|
|
6883
6824
|
/**
|
|
6884
6825
|
* @export
|
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
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/esm/base.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.5.1
|
|
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/esm/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
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/esm/common.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.5.1
|
|
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.
|
|
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
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.5.1
|
|
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.
|
|
16
|
+
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) });
|
|
17
17
|
this.formDataCtor = param.formDataCtor;
|
|
18
18
|
}
|
|
19
19
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
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/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.5.1
|
|
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.
|
|
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/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 1.
|
|
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
|