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/api.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
|
|
@@ -21,10 +21,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.VPSV1VirtualMachineVirtualMachineResourceActionsLockEnum = exports.VPSV1VirtualMachineVirtualMachineResourceStateEnum = exports.VPSV1FirewallRulesStoreRequestSourceEnum = exports.VPSV1FirewallRulesStoreRequestProtocolEnum = exports.VPSV1FirewallFirewallRuleResourceProtocolEnum = exports.VPSV1FirewallFirewallRuleResourceActionEnum = exports.VPSV1DockerManagerProjectResourceStateEnum = exports.VPSV1DockerManagerContainerResourceHealthEnum = exports.VPSV1DockerManagerContainerResourceStateEnum = exports.VPSV1DockerManagerContainerPortResourceProtocolEnum = exports.VPSV1DockerManagerContainerPortResourceTypeEnum = exports.VPSV1ActionActionResourceStateEnum = exports.ReachV1ContactsSegmentsStoreRequestConditionsInnerAttributeEnum = exports.ReachV1ContactsSegmentsStoreRequestConditionsInnerOperatorEnum = exports.ReachV1ContactsSegmentsStoreRequestLogicEnum = exports.ReachV1ContactsSegmentsSegmentationContactResourceSourceEnum = exports.ReachV1ContactsSegmentsSegmentationContactResourceSubscriptionStatusEnum = exports.ReachV1ContactsContactResourceSourceEnum = exports.ReachV1ContactsContactResourceSubscriptionStatusEnum = exports.HostingV1WebsitesWebsiteResourceVhostTypeEnum = exports.HostingV1NodeJsCreateFromArchiveRequestPackageManagerEnum = exports.HostingV1NodeJsCreateFromArchiveRequestAppTypeEnum = exports.HostingV1NodeJsCreateFromArchiveRequestNodeVersionEnum = exports.HostingV1NodeJsBuildResourceStateEnum = exports.HostingV1NodeJsBuildOptionsResourceSourceTypeEnum = exports.HostingV1NodeJsBuildOptionsResourcePackageManagerEnum = exports.HostingV1NodeJsBuildOptionsResourceAppTypeEnum = exports.HostingV1DomainsParkedDomainResourceTypeEnum = exports.HorizonsV1WebsitesCreateWebsiteRequestMessageInnerTypeEnum = exports.EcommerceV1StoreStoreRequestSalesChannelTypeEnum = exports.EcommerceV1StoreStoreCreationResourceSalesChannelTypeEnum = exports.EcommerceV1SalesChannelStoreRequestTypeEnum = exports.EcommerceV1SalesChannelSalesChannelListResourceSalesChannelsInnerTypeEnum = exports.EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannelTypeEnum = exports.EcommerceV1ProductProductCreationResourceProductTypeEnum = exports.DomainsV1WHOISStoreRequestEntityTypeEnum = exports.DomainsV1WHOISProfileResourceEntityTypeEnum = exports.DomainsV1ForwardingStoreRequestRedirectTypeEnum = exports.DomainsV1ForwardingForwardingResourceRedirectTypeEnum = exports.DomainsV1DomainDomainResourceStatusEnum = exports.DomainsV1DomainDomainResourceTypeEnum = exports.DomainsV1DomainDomainExtendedResourceStatusEnum = exports.DNSV1ZoneUpdateRequestZoneInnerTypeEnum = exports.DNSV1ZoneRecordResourceTypeEnum = exports.DNSV1ZoneDestroyRequestFiltersInnerTypeEnum = exports.BillingV1SubscriptionSubscriptionResourceStatusEnum = exports.BillingV1SubscriptionCancelRequestCancelOptionEnum = exports.BillingV1SubscriptionCancelRequestReasonCodeEnum = exports.BillingV1OrderOrderResourceStatusEnum = exports.BillingV1CatalogCatalogItemPriceResourcePeriodUnitEnum = void 0;
|
|
23
23
|
exports.DomainsWHOISApiFactory = exports.DomainsWHOISApiFp = exports.DomainsWHOISApiAxiosParamCreator = exports.DomainsPortfolioApi = exports.DomainsPortfolioApiFactory = exports.DomainsPortfolioApiFp = exports.DomainsPortfolioApiAxiosParamCreator = exports.DomainsForwardingApi = exports.DomainsForwardingApiFactory = exports.DomainsForwardingApiFp = exports.DomainsForwardingApiAxiosParamCreator = exports.DomainsAvailabilityApi = exports.DomainsAvailabilityApiFactory = exports.DomainsAvailabilityApiFp = exports.DomainsAvailabilityApiAxiosParamCreator = exports.DomainAccessVerifierVerificationsApi = exports.DomainAccessVerifierVerificationsApiFactory = exports.DomainAccessVerifierVerificationsApiFp = exports.DomainAccessVerifierVerificationsApiAxiosParamCreator = exports.DNSZoneApi = exports.DNSZoneApiFactory = exports.DNSZoneApiFp = exports.DNSZoneApiAxiosParamCreator = exports.DNSSnapshotApi = exports.DNSSnapshotApiFactory = exports.DNSSnapshotApiFp = exports.DNSSnapshotApiAxiosParamCreator = exports.BillingSubscriptionsApi = exports.BillingSubscriptionsApiFactory = exports.BillingSubscriptionsApiFp = exports.BillingSubscriptionsApiAxiosParamCreator = exports.BillingPaymentMethodsApi = exports.BillingPaymentMethodsApiFactory = exports.BillingPaymentMethodsApiFp = exports.BillingPaymentMethodsApiAxiosParamCreator = exports.GetCatalogItemListV1CategoryEnum = exports.BillingCatalogApi = exports.BillingCatalogApiFactory = exports.BillingCatalogApiFp = exports.BillingCatalogApiAxiosParamCreator = exports.WordPressV1ThemesInstalledThemeResourceStatusEnum = exports.WordPressV1ThemesInstallThemeRequestFontEnum = exports.WordPressV1PluginsUpdateHostingerPluginRequestSlugEnum = exports.WordPressV1PluginsSuggestedPluginGroupResourceWebsiteTypeEnum = exports.WordPressV1PluginsInstalledPluginResourceStatusEnum = exports.WordPressV1MemcachedMemcachedStatusResourceStatusEnum = exports.WordPressV1MaintenanceMaintenanceStatusResourceStatusEnum = exports.WordPressV1InstallationsUpdateResourceTypeEnum = exports.WordPressV1InstallationsInstallWordPressRequestAutoUpdatesEnum = exports.WordPressV1HostingerPluginsUpdateAiOptionStatusRequestOptionEnum = void 0;
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.WordPressThemesApi = exports.WordPressThemesApiFactory = exports.WordPressThemesApiFp = exports.WordPressThemesApiAxiosParamCreator = exports.ListInstalledWordPressPluginsV1CategoryEnum = exports.WordPressPluginsApi = exports.WordPressPluginsApiFactory = exports.WordPressPluginsApiFp = exports.WordPressPluginsApiAxiosParamCreator = exports.WordPressObjectCacheApi = exports.WordPressObjectCacheApiFactory = exports.WordPressObjectCacheApiFp = exports.WordPressObjectCacheApiAxiosParamCreator = void 0;
|
|
24
|
+
exports.HostingNodeJSApiAxiosParamCreator = exports.HostingDomainsApi = exports.HostingDomainsApiFactory = exports.HostingDomainsApiFp = exports.HostingDomainsApiAxiosParamCreator = exports.HostingDatacentersApi = exports.HostingDatacentersApiFactory = exports.HostingDatacentersApiFp = exports.HostingDatacentersApiAxiosParamCreator = exports.HostingDatabasesApi = exports.HostingDatabasesApiFactory = exports.HostingDatabasesApiFp = exports.HostingDatabasesApiAxiosParamCreator = exports.HostingCronJobsApi = exports.HostingCronJobsApiFactory = exports.HostingCronJobsApiFp = exports.HostingCronJobsApiAxiosParamCreator = exports.HostingCacheApi = exports.HostingCacheApiFactory = exports.HostingCacheApiFp = exports.HostingCacheApiAxiosParamCreator = exports.HorizonsWebsitesApi = exports.HorizonsWebsitesApiFactory = exports.HorizonsWebsitesApiFp = exports.HorizonsWebsitesApiAxiosParamCreator = exports.EcommerceStoresApi = exports.EcommerceStoresApiFactory = exports.EcommerceStoresApiFp = exports.EcommerceStoresApiAxiosParamCreator = exports.EcommerceShippingApi = exports.EcommerceShippingApiFactory = exports.EcommerceShippingApiFp = exports.EcommerceShippingApiAxiosParamCreator = exports.EcommerceSalesChannelsApi = exports.EcommerceSalesChannelsApiFactory = exports.EcommerceSalesChannelsApiFp = exports.EcommerceSalesChannelsApiAxiosParamCreator = exports.EcommerceProductsApi = exports.EcommerceProductsApiFactory = exports.EcommerceProductsApiFp = exports.EcommerceProductsApiAxiosParamCreator = exports.EcommercePaymentsApi = exports.EcommercePaymentsApiFactory = exports.EcommercePaymentsApiFp = exports.EcommercePaymentsApiAxiosParamCreator = exports.EcommerceMiscellaneousApi = exports.EcommerceMiscellaneousApiFactory = exports.EcommerceMiscellaneousApiFp = exports.EcommerceMiscellaneousApiAxiosParamCreator = exports.DomainsWHOISApi = void 0;
|
|
25
|
+
exports.VPSFirewallApi = exports.VPSFirewallApiFactory = exports.VPSFirewallApiFp = exports.VPSFirewallApiAxiosParamCreator = exports.VPSDockerManagerApi = exports.VPSDockerManagerApiFactory = exports.VPSDockerManagerApiFp = exports.VPSDockerManagerApiAxiosParamCreator = exports.VPSDataCentersApi = exports.VPSDataCentersApiFactory = exports.VPSDataCentersApiFp = exports.VPSDataCentersApiAxiosParamCreator = exports.VPSBackupsApi = exports.VPSBackupsApiFactory = exports.VPSBackupsApiFp = exports.VPSBackupsApiAxiosParamCreator = exports.VPSActionsApi = exports.VPSActionsApiFactory = exports.VPSActionsApiFp = exports.VPSActionsApiAxiosParamCreator = exports.ReachSegmentsApi = exports.ReachSegmentsApiFactory = exports.ReachSegmentsApiFp = exports.ReachSegmentsApiAxiosParamCreator = exports.ReachProfilesApi = exports.ReachProfilesApiFactory = exports.ReachProfilesApiFp = exports.ReachProfilesApiAxiosParamCreator = exports.ListContactsV1SubscriptionStatusEnum = exports.ReachContactsApi = exports.ReachContactsApiFactory = exports.ReachContactsApiFp = exports.ReachContactsApiAxiosParamCreator = exports.HostingWebsitesApi = exports.HostingWebsitesApiFactory = exports.HostingWebsitesApiFp = exports.HostingWebsitesApiAxiosParamCreator = exports.HostingPHPApi = exports.HostingPHPApiFactory = exports.HostingPHPApiFp = exports.HostingPHPApiAxiosParamCreator = exports.ListOrdersV1StatusesEnum = exports.HostingOrdersApi = exports.HostingOrdersApiFactory = exports.HostingOrdersApiFp = exports.HostingOrdersApiAxiosParamCreator = exports.ListNodeJSBuildsV1StatesEnum = exports.HostingNodeJSApi = exports.HostingNodeJSApiFactory = exports.HostingNodeJSApiFp = void 0;
|
|
26
|
+
exports.WordPressLoginApi = exports.WordPressLoginApiFactory = exports.WordPressLoginApiFp = exports.WordPressLoginApiAxiosParamCreator = exports.WordPressLiteSpeedCacheApi = exports.WordPressLiteSpeedCacheApiFactory = exports.WordPressLiteSpeedCacheApiFp = exports.WordPressLiteSpeedCacheApiAxiosParamCreator = exports.ListWordPressInstallationsV1OwnershipEnum = exports.WordPressInstallationsApi = exports.WordPressInstallationsApiFactory = exports.WordPressInstallationsApiFp = exports.WordPressInstallationsApiAxiosParamCreator = exports.ShowAIOptionStatusV1OptionEnum = exports.WordPressAIToolsApi = exports.WordPressAIToolsApiFactory = exports.WordPressAIToolsApiFp = exports.WordPressAIToolsApiAxiosParamCreator = exports.VPSVirtualMachineApi = exports.VPSVirtualMachineApiFactory = exports.VPSVirtualMachineApiFp = exports.VPSVirtualMachineApiAxiosParamCreator = exports.VPSSnapshotsApi = exports.VPSSnapshotsApiFactory = exports.VPSSnapshotsApiFp = exports.VPSSnapshotsApiAxiosParamCreator = exports.VPSRecoveryApi = exports.VPSRecoveryApiFactory = exports.VPSRecoveryApiFp = exports.VPSRecoveryApiAxiosParamCreator = exports.VPSPublicKeysApi = exports.VPSPublicKeysApiFactory = exports.VPSPublicKeysApiFp = exports.VPSPublicKeysApiAxiosParamCreator = exports.VPSPostInstallScriptsApi = exports.VPSPostInstallScriptsApiFactory = exports.VPSPostInstallScriptsApiFp = exports.VPSPostInstallScriptsApiAxiosParamCreator = exports.VPSPTRRecordsApi = exports.VPSPTRRecordsApiFactory = exports.VPSPTRRecordsApiFp = exports.VPSPTRRecordsApiAxiosParamCreator = exports.VPSOSTemplatesApi = exports.VPSOSTemplatesApiFactory = exports.VPSOSTemplatesApiFp = exports.VPSOSTemplatesApiAxiosParamCreator = exports.VPSMalwareScannerApi = exports.VPSMalwareScannerApiFactory = exports.VPSMalwareScannerApiFp = exports.VPSMalwareScannerApiAxiosParamCreator = void 0;
|
|
27
|
+
exports.WordPressThemesApi = exports.WordPressThemesApiFactory = exports.WordPressThemesApiFp = exports.WordPressThemesApiAxiosParamCreator = exports.ListInstalledWordPressPluginsV1CategoryEnum = exports.WordPressPluginsApi = exports.WordPressPluginsApiFactory = exports.WordPressPluginsApiFp = exports.WordPressPluginsApiAxiosParamCreator = exports.WordPressObjectCacheApi = exports.WordPressObjectCacheApiFactory = exports.WordPressObjectCacheApiFp = exports.WordPressObjectCacheApiAxiosParamCreator = exports.WordPressMaintenanceApi = exports.WordPressMaintenanceApiFactory = exports.WordPressMaintenanceApiFp = exports.WordPressMaintenanceApiAxiosParamCreator = void 0;
|
|
28
28
|
const axios_1 = require("axios");
|
|
29
29
|
// Some imports not used depending on template conditions
|
|
30
30
|
// @ts-ignore
|
|
@@ -4399,6 +4399,426 @@ class HorizonsWebsitesApi extends base_1.BaseAPI {
|
|
|
4399
4399
|
}
|
|
4400
4400
|
}
|
|
4401
4401
|
exports.HorizonsWebsitesApi = HorizonsWebsitesApi;
|
|
4402
|
+
/**
|
|
4403
|
+
* HostingCacheApi - axios parameter creator
|
|
4404
|
+
* @export
|
|
4405
|
+
*/
|
|
4406
|
+
const HostingCacheApiAxiosParamCreator = function (configuration) {
|
|
4407
|
+
return {
|
|
4408
|
+
/**
|
|
4409
|
+
* 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.
|
|
4410
|
+
* @summary Clear website cache
|
|
4411
|
+
* @param {string} username
|
|
4412
|
+
* @param {string} domain Domain name
|
|
4413
|
+
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
4414
|
+
* @param {*} [options] Override http request option.
|
|
4415
|
+
* @throws {RequiredError}
|
|
4416
|
+
*/
|
|
4417
|
+
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 = {}) {
|
|
4418
|
+
// verify required parameter 'username' is not null or undefined
|
|
4419
|
+
(0, common_1.assertParamExists)('clearWebsiteCacheV1', 'username', username);
|
|
4420
|
+
// verify required parameter 'domain' is not null or undefined
|
|
4421
|
+
(0, common_1.assertParamExists)('clearWebsiteCacheV1', 'domain', domain);
|
|
4422
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cache/clear`
|
|
4423
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
4424
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
4425
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4426
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
4427
|
+
let baseOptions;
|
|
4428
|
+
if (configuration) {
|
|
4429
|
+
baseOptions = configuration.baseOptions;
|
|
4430
|
+
}
|
|
4431
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
4432
|
+
const localVarHeaderParameter = {};
|
|
4433
|
+
const localVarQueryParameter = {};
|
|
4434
|
+
// authentication apiToken required
|
|
4435
|
+
// http bearer authentication required
|
|
4436
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
4437
|
+
if (directory !== undefined) {
|
|
4438
|
+
localVarQueryParameter['directory'] = directory;
|
|
4439
|
+
}
|
|
4440
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
4441
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4442
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4443
|
+
return {
|
|
4444
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
4445
|
+
options: localVarRequestOptions,
|
|
4446
|
+
};
|
|
4447
|
+
}),
|
|
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
|
|
4451
|
+
* @param {string} username
|
|
4452
|
+
* @param {string} domain Domain name
|
|
4453
|
+
* @param {*} [options] Override http request option.
|
|
4454
|
+
* @throws {RequiredError}
|
|
4455
|
+
*/
|
|
4456
|
+
disableCachelessModeV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
4457
|
+
// verify required parameter 'username' is not null or undefined
|
|
4458
|
+
(0, common_1.assertParamExists)('disableCachelessModeV1', 'username', username);
|
|
4459
|
+
// 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`
|
|
4534
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
4535
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
4536
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4537
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
4538
|
+
let baseOptions;
|
|
4539
|
+
if (configuration) {
|
|
4540
|
+
baseOptions = configuration.baseOptions;
|
|
4541
|
+
}
|
|
4542
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
4543
|
+
const localVarHeaderParameter = {};
|
|
4544
|
+
const localVarQueryParameter = {};
|
|
4545
|
+
// authentication apiToken required
|
|
4546
|
+
// http bearer authentication required
|
|
4547
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
4548
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
4549
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4550
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4551
|
+
return {
|
|
4552
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
4553
|
+
options: localVarRequestOptions,
|
|
4554
|
+
};
|
|
4555
|
+
}),
|
|
4556
|
+
/**
|
|
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
|
|
4559
|
+
* @param {string} username
|
|
4560
|
+
* @param {string} domain Domain name
|
|
4561
|
+
* @param {*} [options] Override http request option.
|
|
4562
|
+
* @throws {RequiredError}
|
|
4563
|
+
*/
|
|
4564
|
+
enableWebsiteCacheV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
4565
|
+
// verify required parameter 'username' is not null or undefined
|
|
4566
|
+
(0, common_1.assertParamExists)('enableWebsiteCacheV1', 'username', username);
|
|
4567
|
+
// 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`
|
|
4570
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
4571
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
4572
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4573
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
4574
|
+
let baseOptions;
|
|
4575
|
+
if (configuration) {
|
|
4576
|
+
baseOptions = configuration.baseOptions;
|
|
4577
|
+
}
|
|
4578
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
4579
|
+
const localVarHeaderParameter = {};
|
|
4580
|
+
const localVarQueryParameter = {};
|
|
4581
|
+
// authentication apiToken required
|
|
4582
|
+
// http bearer authentication required
|
|
4583
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
4584
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
4585
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4586
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4587
|
+
return {
|
|
4588
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
4589
|
+
options: localVarRequestOptions,
|
|
4590
|
+
};
|
|
4591
|
+
}),
|
|
4592
|
+
};
|
|
4593
|
+
};
|
|
4594
|
+
exports.HostingCacheApiAxiosParamCreator = HostingCacheApiAxiosParamCreator;
|
|
4595
|
+
/**
|
|
4596
|
+
* HostingCacheApi - functional programming interface
|
|
4597
|
+
* @export
|
|
4598
|
+
*/
|
|
4599
|
+
const HostingCacheApiFp = function (configuration) {
|
|
4600
|
+
const localVarAxiosParamCreator = (0, exports.HostingCacheApiAxiosParamCreator)(configuration);
|
|
4601
|
+
return {
|
|
4602
|
+
/**
|
|
4603
|
+
* 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.
|
|
4604
|
+
* @summary Clear website cache
|
|
4605
|
+
* @param {string} username
|
|
4606
|
+
* @param {string} domain Domain name
|
|
4607
|
+
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
4608
|
+
* @param {*} [options] Override http request option.
|
|
4609
|
+
* @throws {RequiredError}
|
|
4610
|
+
*/
|
|
4611
|
+
clearWebsiteCacheV1(username, domain, directory, options) {
|
|
4612
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4613
|
+
var _a, _b;
|
|
4614
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.clearWebsiteCacheV1(username, domain, directory, options);
|
|
4615
|
+
const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['HostingCacheApi.clearWebsiteCacheV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
4616
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4617
|
+
});
|
|
4618
|
+
},
|
|
4619
|
+
/**
|
|
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
|
|
4638
|
+
* @param {string} username
|
|
4639
|
+
* @param {string} domain Domain name
|
|
4640
|
+
* @param {*} [options] Override http request option.
|
|
4641
|
+
* @throws {RequiredError}
|
|
4642
|
+
*/
|
|
4643
|
+
disableWebsiteCacheV1(username, domain, options) {
|
|
4644
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4645
|
+
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;
|
|
4648
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4649
|
+
});
|
|
4650
|
+
},
|
|
4651
|
+
/**
|
|
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
|
|
4654
|
+
* @param {string} username
|
|
4655
|
+
* @param {string} domain Domain name
|
|
4656
|
+
* @param {*} [options] Override http request option.
|
|
4657
|
+
* @throws {RequiredError}
|
|
4658
|
+
*/
|
|
4659
|
+
enableCachelessModeV1(username, domain, options) {
|
|
4660
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4661
|
+
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;
|
|
4680
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4681
|
+
});
|
|
4682
|
+
},
|
|
4683
|
+
};
|
|
4684
|
+
};
|
|
4685
|
+
exports.HostingCacheApiFp = HostingCacheApiFp;
|
|
4686
|
+
/**
|
|
4687
|
+
* HostingCacheApi - factory interface
|
|
4688
|
+
* @export
|
|
4689
|
+
*/
|
|
4690
|
+
const HostingCacheApiFactory = function (configuration, basePath, axios) {
|
|
4691
|
+
const localVarFp = (0, exports.HostingCacheApiFp)(configuration);
|
|
4692
|
+
return {
|
|
4693
|
+
/**
|
|
4694
|
+
* 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.
|
|
4695
|
+
* @summary Clear website cache
|
|
4696
|
+
* @param {string} username
|
|
4697
|
+
* @param {string} domain Domain name
|
|
4698
|
+
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
4699
|
+
* @param {*} [options] Override http request option.
|
|
4700
|
+
* @throws {RequiredError}
|
|
4701
|
+
*/
|
|
4702
|
+
clearWebsiteCacheV1(username, domain, directory, options) {
|
|
4703
|
+
return localVarFp.clearWebsiteCacheV1(username, domain, directory, options).then((request) => request(axios, basePath));
|
|
4704
|
+
},
|
|
4705
|
+
/**
|
|
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
|
|
4730
|
+
* @param {string} username
|
|
4731
|
+
* @param {string} domain Domain name
|
|
4732
|
+
* @param {*} [options] Override http request option.
|
|
4733
|
+
* @throws {RequiredError}
|
|
4734
|
+
*/
|
|
4735
|
+
enableCachelessModeV1(username, domain, options) {
|
|
4736
|
+
return localVarFp.enableCachelessModeV1(username, domain, options).then((request) => request(axios, basePath));
|
|
4737
|
+
},
|
|
4738
|
+
/**
|
|
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
|
|
4741
|
+
* @param {string} username
|
|
4742
|
+
* @param {string} domain Domain name
|
|
4743
|
+
* @param {*} [options] Override http request option.
|
|
4744
|
+
* @throws {RequiredError}
|
|
4745
|
+
*/
|
|
4746
|
+
enableWebsiteCacheV1(username, domain, options) {
|
|
4747
|
+
return localVarFp.enableWebsiteCacheV1(username, domain, options).then((request) => request(axios, basePath));
|
|
4748
|
+
},
|
|
4749
|
+
};
|
|
4750
|
+
};
|
|
4751
|
+
exports.HostingCacheApiFactory = HostingCacheApiFactory;
|
|
4752
|
+
/**
|
|
4753
|
+
* HostingCacheApi - object-oriented interface
|
|
4754
|
+
* @export
|
|
4755
|
+
* @class HostingCacheApi
|
|
4756
|
+
* @extends {BaseAPI}
|
|
4757
|
+
*/
|
|
4758
|
+
class HostingCacheApi extends base_1.BaseAPI {
|
|
4759
|
+
/**
|
|
4760
|
+
* 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.
|
|
4761
|
+
* @summary Clear website cache
|
|
4762
|
+
* @param {string} username
|
|
4763
|
+
* @param {string} domain Domain name
|
|
4764
|
+
* @param {string} [directory] Directory of the website installation to clear, relative to the website root. Defaults to the website root.
|
|
4765
|
+
* @param {*} [options] Override http request option.
|
|
4766
|
+
* @throws {RequiredError}
|
|
4767
|
+
* @memberof HostingCacheApi
|
|
4768
|
+
*/
|
|
4769
|
+
clearWebsiteCacheV1(username, domain, directory, options) {
|
|
4770
|
+
return (0, exports.HostingCacheApiFp)(this.configuration).clearWebsiteCacheV1(username, domain, directory, options).then((request) => request(this.axios, this.basePath));
|
|
4771
|
+
}
|
|
4772
|
+
/**
|
|
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
|
|
4775
|
+
* @param {string} username
|
|
4776
|
+
* @param {string} domain Domain name
|
|
4777
|
+
* @param {*} [options] Override http request option.
|
|
4778
|
+
* @throws {RequiredError}
|
|
4779
|
+
* @memberof HostingCacheApi
|
|
4780
|
+
*/
|
|
4781
|
+
disableCachelessModeV1(username, domain, options) {
|
|
4782
|
+
return (0, exports.HostingCacheApiFp)(this.configuration).disableCachelessModeV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
4783
|
+
}
|
|
4784
|
+
/**
|
|
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
|
|
4787
|
+
* @param {string} username
|
|
4788
|
+
* @param {string} domain Domain name
|
|
4789
|
+
* @param {*} [options] Override http request option.
|
|
4790
|
+
* @throws {RequiredError}
|
|
4791
|
+
* @memberof HostingCacheApi
|
|
4792
|
+
*/
|
|
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));
|
|
4819
|
+
}
|
|
4820
|
+
}
|
|
4821
|
+
exports.HostingCacheApi = HostingCacheApi;
|
|
4402
4822
|
/**
|
|
4403
4823
|
* HostingCronJobsApi - axios parameter creator
|
|
4404
4824
|
* @export
|
package/dist/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/base.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
|
package/dist/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/common.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
|
package/dist/configuration.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/configuration.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
|
|
@@ -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.
|
|
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) });
|
|
20
20
|
this.formDataCtor = param.formDataCtor;
|
|
21
21
|
}
|
|
22
22
|
/**
|