hostinger-api-sdk 1.3.0 → 1.4.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/README.md +2 -2
- package/api.ts +550 -108
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +329 -114
- package/dist/api.js +425 -5
- 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 +329 -114
- package/dist/esm/api.js +417 -1
- 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 +295 -0
- package/docs/VPSActionsApi.md +2 -2
- package/docs/VPSBackupsApi.md +2 -2
- package/docs/VPSFirewallApi.md +2 -2
- package/docs/VPSPostInstallScriptsApi.md +2 -2
- package/docs/VPSPublicKeysApi.md +2 -2
- package/docs/{VPSGetActionsV1200Response.md → VPSV1ActionListResponse.md} +3 -3
- package/docs/{VPSGetBackupsV1200Response.md → VPSV1BackupListResponse.md} +3 -3
- package/docs/{VPSGetFirewallListV1200Response.md → VPSV1FirewallListResponse.md} +3 -3
- package/docs/{VPSGetPostInstallScriptsV1200Response.md → VPSV1PostInstallScriptListResponse.md} +3 -3
- package/docs/{VPSGetPublicKeysV1200Response.md → VPSV1PublicKeyListResponse.md} +3 -3
- package/docs/VPSVirtualMachineApi.md +2 -2
- 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.4.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
|
|
@@ -4323,6 +4323,422 @@ export class HorizonsWebsitesApi extends BaseAPI {
|
|
|
4323
4323
|
return HorizonsWebsitesApiFp(this.configuration).getWebsiteV1(websiteId, options).then((request) => request(this.axios, this.basePath));
|
|
4324
4324
|
}
|
|
4325
4325
|
}
|
|
4326
|
+
/**
|
|
4327
|
+
* HostingCacheApi - axios parameter creator
|
|
4328
|
+
* @export
|
|
4329
|
+
*/
|
|
4330
|
+
export const HostingCacheApiAxiosParamCreator = function (configuration) {
|
|
4331
|
+
return {
|
|
4332
|
+
/**
|
|
4333
|
+
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
4334
|
+
* @summary Clear website cache
|
|
4335
|
+
* @param {string} username
|
|
4336
|
+
* @param {string} domain Domain name
|
|
4337
|
+
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
4338
|
+
* @param {*} [options] Override http request option.
|
|
4339
|
+
* @throws {RequiredError}
|
|
4340
|
+
*/
|
|
4341
|
+
clearWebsiteCacheV1: (username_1, domain_1, directory_1, ...args_1) => __awaiter(this, [username_1, domain_1, directory_1, ...args_1], void 0, function* (username, domain, directory, options = {}) {
|
|
4342
|
+
// verify required parameter 'username' is not null or undefined
|
|
4343
|
+
assertParamExists('clearWebsiteCacheV1', 'username', username);
|
|
4344
|
+
// verify required parameter 'domain' is not null or undefined
|
|
4345
|
+
assertParamExists('clearWebsiteCacheV1', 'domain', domain);
|
|
4346
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cache/clear`
|
|
4347
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
4348
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
4349
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4350
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4351
|
+
let baseOptions;
|
|
4352
|
+
if (configuration) {
|
|
4353
|
+
baseOptions = configuration.baseOptions;
|
|
4354
|
+
}
|
|
4355
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
4356
|
+
const localVarHeaderParameter = {};
|
|
4357
|
+
const localVarQueryParameter = {};
|
|
4358
|
+
// authentication apiToken required
|
|
4359
|
+
// http bearer authentication required
|
|
4360
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4361
|
+
if (directory !== undefined) {
|
|
4362
|
+
localVarQueryParameter['directory'] = directory;
|
|
4363
|
+
}
|
|
4364
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4365
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4366
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4367
|
+
return {
|
|
4368
|
+
url: toPathString(localVarUrlObj),
|
|
4369
|
+
options: localVarRequestOptions,
|
|
4370
|
+
};
|
|
4371
|
+
}),
|
|
4372
|
+
/**
|
|
4373
|
+
* 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.
|
|
4374
|
+
* @summary Disable cacheless mode
|
|
4375
|
+
* @param {string} username
|
|
4376
|
+
* @param {string} domain Domain name
|
|
4377
|
+
* @param {*} [options] Override http request option.
|
|
4378
|
+
* @throws {RequiredError}
|
|
4379
|
+
*/
|
|
4380
|
+
disableCachelessModeV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
4381
|
+
// verify required parameter 'username' is not null or undefined
|
|
4382
|
+
assertParamExists('disableCachelessModeV1', 'username', username);
|
|
4383
|
+
// verify required parameter 'domain' is not null or undefined
|
|
4384
|
+
assertParamExists('disableCachelessModeV1', 'domain', domain);
|
|
4385
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cacheless-mode/disable`
|
|
4386
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
4387
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
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`
|
|
4458
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
4459
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
4460
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4461
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4462
|
+
let baseOptions;
|
|
4463
|
+
if (configuration) {
|
|
4464
|
+
baseOptions = configuration.baseOptions;
|
|
4465
|
+
}
|
|
4466
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
4467
|
+
const localVarHeaderParameter = {};
|
|
4468
|
+
const localVarQueryParameter = {};
|
|
4469
|
+
// authentication apiToken required
|
|
4470
|
+
// http bearer authentication required
|
|
4471
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4472
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4473
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4474
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4475
|
+
return {
|
|
4476
|
+
url: toPathString(localVarUrlObj),
|
|
4477
|
+
options: localVarRequestOptions,
|
|
4478
|
+
};
|
|
4479
|
+
}),
|
|
4480
|
+
/**
|
|
4481
|
+
* 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.
|
|
4482
|
+
* @summary Enable website cache
|
|
4483
|
+
* @param {string} username
|
|
4484
|
+
* @param {string} domain Domain name
|
|
4485
|
+
* @param {*} [options] Override http request option.
|
|
4486
|
+
* @throws {RequiredError}
|
|
4487
|
+
*/
|
|
4488
|
+
enableWebsiteCacheV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
4489
|
+
// verify required parameter 'username' is not null or undefined
|
|
4490
|
+
assertParamExists('enableWebsiteCacheV1', 'username', username);
|
|
4491
|
+
// verify required parameter 'domain' is not null or undefined
|
|
4492
|
+
assertParamExists('enableWebsiteCacheV1', 'domain', domain);
|
|
4493
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cache/enable`
|
|
4494
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
4495
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
4496
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4497
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4498
|
+
let baseOptions;
|
|
4499
|
+
if (configuration) {
|
|
4500
|
+
baseOptions = configuration.baseOptions;
|
|
4501
|
+
}
|
|
4502
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
4503
|
+
const localVarHeaderParameter = {};
|
|
4504
|
+
const localVarQueryParameter = {};
|
|
4505
|
+
// authentication apiToken required
|
|
4506
|
+
// http bearer authentication required
|
|
4507
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
4508
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4509
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4510
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4511
|
+
return {
|
|
4512
|
+
url: toPathString(localVarUrlObj),
|
|
4513
|
+
options: localVarRequestOptions,
|
|
4514
|
+
};
|
|
4515
|
+
}),
|
|
4516
|
+
};
|
|
4517
|
+
};
|
|
4518
|
+
/**
|
|
4519
|
+
* HostingCacheApi - functional programming interface
|
|
4520
|
+
* @export
|
|
4521
|
+
*/
|
|
4522
|
+
export const HostingCacheApiFp = function (configuration) {
|
|
4523
|
+
const localVarAxiosParamCreator = HostingCacheApiAxiosParamCreator(configuration);
|
|
4524
|
+
return {
|
|
4525
|
+
/**
|
|
4526
|
+
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
4527
|
+
* @summary Clear website cache
|
|
4528
|
+
* @param {string} username
|
|
4529
|
+
* @param {string} domain Domain name
|
|
4530
|
+
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
4531
|
+
* @param {*} [options] Override http request option.
|
|
4532
|
+
* @throws {RequiredError}
|
|
4533
|
+
*/
|
|
4534
|
+
clearWebsiteCacheV1(username, domain, directory, options) {
|
|
4535
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4536
|
+
var _a, _b;
|
|
4537
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.clearWebsiteCacheV1(username, domain, directory, options);
|
|
4538
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCacheApi.clearWebsiteCacheV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
4539
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4540
|
+
});
|
|
4541
|
+
},
|
|
4542
|
+
/**
|
|
4543
|
+
* 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.
|
|
4544
|
+
* @summary Disable cacheless mode
|
|
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
|
|
4561
|
+
* @param {string} username
|
|
4562
|
+
* @param {string} domain Domain name
|
|
4563
|
+
* @param {*} [options] Override http request option.
|
|
4564
|
+
* @throws {RequiredError}
|
|
4565
|
+
*/
|
|
4566
|
+
disableWebsiteCacheV1(username, domain, options) {
|
|
4567
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4568
|
+
var _a, _b;
|
|
4569
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.disableWebsiteCacheV1(username, domain, options);
|
|
4570
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCacheApi.disableWebsiteCacheV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
4571
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4572
|
+
});
|
|
4573
|
+
},
|
|
4574
|
+
/**
|
|
4575
|
+
* 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.
|
|
4576
|
+
* @summary Enable cacheless mode
|
|
4577
|
+
* @param {string} username
|
|
4578
|
+
* @param {string} domain Domain name
|
|
4579
|
+
* @param {*} [options] Override http request option.
|
|
4580
|
+
* @throws {RequiredError}
|
|
4581
|
+
*/
|
|
4582
|
+
enableCachelessModeV1(username, domain, options) {
|
|
4583
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4584
|
+
var _a, _b;
|
|
4585
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.enableCachelessModeV1(username, domain, options);
|
|
4586
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCacheApi.enableCachelessModeV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
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;
|
|
4603
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4604
|
+
});
|
|
4605
|
+
},
|
|
4606
|
+
};
|
|
4607
|
+
};
|
|
4608
|
+
/**
|
|
4609
|
+
* HostingCacheApi - factory interface
|
|
4610
|
+
* @export
|
|
4611
|
+
*/
|
|
4612
|
+
export const HostingCacheApiFactory = function (configuration, basePath, axios) {
|
|
4613
|
+
const localVarFp = HostingCacheApiFp(configuration);
|
|
4614
|
+
return {
|
|
4615
|
+
/**
|
|
4616
|
+
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
4617
|
+
* @summary Clear website cache
|
|
4618
|
+
* @param {string} username
|
|
4619
|
+
* @param {string} domain Domain name
|
|
4620
|
+
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
4621
|
+
* @param {*} [options] Override http request option.
|
|
4622
|
+
* @throws {RequiredError}
|
|
4623
|
+
*/
|
|
4624
|
+
clearWebsiteCacheV1(username, domain, directory, options) {
|
|
4625
|
+
return localVarFp.clearWebsiteCacheV1(username, domain, directory, options).then((request) => request(axios, basePath));
|
|
4626
|
+
},
|
|
4627
|
+
/**
|
|
4628
|
+
* 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.
|
|
4629
|
+
* @summary Disable cacheless mode
|
|
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
|
|
4652
|
+
* @param {string} username
|
|
4653
|
+
* @param {string} domain Domain name
|
|
4654
|
+
* @param {*} [options] Override http request option.
|
|
4655
|
+
* @throws {RequiredError}
|
|
4656
|
+
*/
|
|
4657
|
+
enableCachelessModeV1(username, domain, options) {
|
|
4658
|
+
return localVarFp.enableCachelessModeV1(username, domain, options).then((request) => request(axios, basePath));
|
|
4659
|
+
},
|
|
4660
|
+
/**
|
|
4661
|
+
* 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.
|
|
4662
|
+
* @summary Enable website cache
|
|
4663
|
+
* @param {string} username
|
|
4664
|
+
* @param {string} domain Domain name
|
|
4665
|
+
* @param {*} [options] Override http request option.
|
|
4666
|
+
* @throws {RequiredError}
|
|
4667
|
+
*/
|
|
4668
|
+
enableWebsiteCacheV1(username, domain, options) {
|
|
4669
|
+
return localVarFp.enableWebsiteCacheV1(username, domain, options).then((request) => request(axios, basePath));
|
|
4670
|
+
},
|
|
4671
|
+
};
|
|
4672
|
+
};
|
|
4673
|
+
/**
|
|
4674
|
+
* HostingCacheApi - object-oriented interface
|
|
4675
|
+
* @export
|
|
4676
|
+
* @class HostingCacheApi
|
|
4677
|
+
* @extends {BaseAPI}
|
|
4678
|
+
*/
|
|
4679
|
+
export class HostingCacheApi extends BaseAPI {
|
|
4680
|
+
/**
|
|
4681
|
+
* Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes. Also purges the Hostinger CDN cache when CDN is enabled on the website. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
4682
|
+
* @summary Clear website cache
|
|
4683
|
+
* @param {string} username
|
|
4684
|
+
* @param {string} domain Domain name
|
|
4685
|
+
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
4686
|
+
* @param {*} [options] Override http request option.
|
|
4687
|
+
* @throws {RequiredError}
|
|
4688
|
+
* @memberof HostingCacheApi
|
|
4689
|
+
*/
|
|
4690
|
+
clearWebsiteCacheV1(username, domain, directory, options) {
|
|
4691
|
+
return HostingCacheApiFp(this.configuration).clearWebsiteCacheV1(username, domain, directory, options).then((request) => request(this.axios, this.basePath));
|
|
4692
|
+
}
|
|
4693
|
+
/**
|
|
4694
|
+
* 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.
|
|
4695
|
+
* @summary Disable cacheless mode
|
|
4696
|
+
* @param {string} username
|
|
4697
|
+
* @param {string} domain Domain name
|
|
4698
|
+
* @param {*} [options] Override http request option.
|
|
4699
|
+
* @throws {RequiredError}
|
|
4700
|
+
* @memberof HostingCacheApi
|
|
4701
|
+
*/
|
|
4702
|
+
disableCachelessModeV1(username, domain, options) {
|
|
4703
|
+
return HostingCacheApiFp(this.configuration).disableCachelessModeV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
4704
|
+
}
|
|
4705
|
+
/**
|
|
4706
|
+
* 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.
|
|
4707
|
+
* @summary Disable website cache
|
|
4708
|
+
* @param {string} username
|
|
4709
|
+
* @param {string} domain Domain name
|
|
4710
|
+
* @param {*} [options] Override http request option.
|
|
4711
|
+
* @throws {RequiredError}
|
|
4712
|
+
* @memberof HostingCacheApi
|
|
4713
|
+
*/
|
|
4714
|
+
disableWebsiteCacheV1(username, domain, options) {
|
|
4715
|
+
return HostingCacheApiFp(this.configuration).disableWebsiteCacheV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
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));
|
|
4740
|
+
}
|
|
4741
|
+
}
|
|
4326
4742
|
/**
|
|
4327
4743
|
* HostingCronJobsApi - axios parameter creator
|
|
4328
4744
|
* @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.4.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.
|
|
6
|
+
* API Version: 1.4.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/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.4.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/common.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.4.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.
|
|
4
|
+
* API Version: 1.4.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.
|
|
6
|
+
* API Version: 1.4.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.
|
|
16
|
+
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) });
|
|
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.4.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.
|
|
6
|
+
* API Version: 1.4.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.
|
|
4
|
+
* API Version: 1.4.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.
|
|
7
|
+
* API Version: 1.4.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
|