hostinger-api-sdk 2.1.1 → 2.1.2
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 +373 -5
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +192 -5
- package/dist/api.js +349 -11
- 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 +192 -5
- package/dist/esm/api.js +339 -5
- 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/HostingCDNApi.md +238 -0
- package/docs/HostingCacheApi.md +1 -1
- package/docs/HostingV1CdnCdnStatusResource.md +20 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/esm/api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.1.
|
|
4
|
+
* API Version: 2.1.2
|
|
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
|
|
@@ -7076,6 +7076,19 @@ export interface HostingV1CacheToggleCachelessModeRequest {
|
|
|
7076
7076
|
*/
|
|
7077
7077
|
'enabled': boolean;
|
|
7078
7078
|
}
|
|
7079
|
+
/**
|
|
7080
|
+
*
|
|
7081
|
+
* @export
|
|
7082
|
+
* @interface HostingV1CdnCdnStatusResource
|
|
7083
|
+
*/
|
|
7084
|
+
export interface HostingV1CdnCdnStatusResource {
|
|
7085
|
+
/**
|
|
7086
|
+
* Whether the Hostinger CDN is enabled for the website domain
|
|
7087
|
+
* @type {boolean}
|
|
7088
|
+
* @memberof HostingV1CdnCdnStatusResource
|
|
7089
|
+
*/
|
|
7090
|
+
'is_enabled': boolean;
|
|
7091
|
+
}
|
|
7079
7092
|
/**
|
|
7080
7093
|
*
|
|
7081
7094
|
* @export
|
|
@@ -24166,13 +24179,187 @@ export declare class HorizonsWebsitesApi extends BaseAPI {
|
|
|
24166
24179
|
*/
|
|
24167
24180
|
publishWebsiteV1(websiteId: string, horizonsV1WebsitesPublishWebsiteRequest?: HorizonsV1WebsitesPublishWebsiteRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<HorizonsV1WebsitesPublishedWebsiteResource, any, {}, any>>;
|
|
24168
24181
|
}
|
|
24182
|
+
/**
|
|
24183
|
+
* HostingCDNApi - axios parameter creator
|
|
24184
|
+
* @export
|
|
24185
|
+
*/
|
|
24186
|
+
export declare const HostingCDNApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
24187
|
+
/**
|
|
24188
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
24189
|
+
* @summary Disable CDN
|
|
24190
|
+
* @param {string} username
|
|
24191
|
+
* @param {string} domain Domain name
|
|
24192
|
+
* @param {*} [options] Override http request option.
|
|
24193
|
+
* @throws {RequiredError}
|
|
24194
|
+
*/
|
|
24195
|
+
disableCDNV1: (username: string, domain: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
24196
|
+
/**
|
|
24197
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
24198
|
+
* @summary Enable CDN
|
|
24199
|
+
* @param {string} username
|
|
24200
|
+
* @param {string} domain Domain name
|
|
24201
|
+
* @param {*} [options] Override http request option.
|
|
24202
|
+
* @throws {RequiredError}
|
|
24203
|
+
*/
|
|
24204
|
+
enableCDNV1: (username: string, domain: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
24205
|
+
/**
|
|
24206
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
24207
|
+
* @summary Get CDN status
|
|
24208
|
+
* @param {string} username
|
|
24209
|
+
* @param {string} domain Domain name
|
|
24210
|
+
* @param {*} [options] Override http request option.
|
|
24211
|
+
* @throws {RequiredError}
|
|
24212
|
+
*/
|
|
24213
|
+
getCDNStatusV1: (username: string, domain: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
24214
|
+
/**
|
|
24215
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
24216
|
+
* @summary Purge CDN cache
|
|
24217
|
+
* @param {string} username
|
|
24218
|
+
* @param {string} domain Domain name
|
|
24219
|
+
* @param {*} [options] Override http request option.
|
|
24220
|
+
* @throws {RequiredError}
|
|
24221
|
+
*/
|
|
24222
|
+
purgeCDNCacheV1: (username: string, domain: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
24223
|
+
};
|
|
24224
|
+
/**
|
|
24225
|
+
* HostingCDNApi - functional programming interface
|
|
24226
|
+
* @export
|
|
24227
|
+
*/
|
|
24228
|
+
export declare const HostingCDNApiFp: (configuration?: Configuration) => {
|
|
24229
|
+
/**
|
|
24230
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
24231
|
+
* @summary Disable CDN
|
|
24232
|
+
* @param {string} username
|
|
24233
|
+
* @param {string} domain Domain name
|
|
24234
|
+
* @param {*} [options] Override http request option.
|
|
24235
|
+
* @throws {RequiredError}
|
|
24236
|
+
*/
|
|
24237
|
+
disableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>>;
|
|
24238
|
+
/**
|
|
24239
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
24240
|
+
* @summary Enable CDN
|
|
24241
|
+
* @param {string} username
|
|
24242
|
+
* @param {string} domain Domain name
|
|
24243
|
+
* @param {*} [options] Override http request option.
|
|
24244
|
+
* @throws {RequiredError}
|
|
24245
|
+
*/
|
|
24246
|
+
enableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>>;
|
|
24247
|
+
/**
|
|
24248
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
24249
|
+
* @summary Get CDN status
|
|
24250
|
+
* @param {string} username
|
|
24251
|
+
* @param {string} domain Domain name
|
|
24252
|
+
* @param {*} [options] Override http request option.
|
|
24253
|
+
* @throws {RequiredError}
|
|
24254
|
+
*/
|
|
24255
|
+
getCDNStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1CdnCdnStatusResource>>;
|
|
24256
|
+
/**
|
|
24257
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
24258
|
+
* @summary Purge CDN cache
|
|
24259
|
+
* @param {string} username
|
|
24260
|
+
* @param {string} domain Domain name
|
|
24261
|
+
* @param {*} [options] Override http request option.
|
|
24262
|
+
* @throws {RequiredError}
|
|
24263
|
+
*/
|
|
24264
|
+
purgeCDNCacheV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>>;
|
|
24265
|
+
};
|
|
24266
|
+
/**
|
|
24267
|
+
* HostingCDNApi - factory interface
|
|
24268
|
+
* @export
|
|
24269
|
+
*/
|
|
24270
|
+
export declare const HostingCDNApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
24271
|
+
/**
|
|
24272
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
24273
|
+
* @summary Disable CDN
|
|
24274
|
+
* @param {string} username
|
|
24275
|
+
* @param {string} domain Domain name
|
|
24276
|
+
* @param {*} [options] Override http request option.
|
|
24277
|
+
* @throws {RequiredError}
|
|
24278
|
+
*/
|
|
24279
|
+
disableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource>;
|
|
24280
|
+
/**
|
|
24281
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
24282
|
+
* @summary Enable CDN
|
|
24283
|
+
* @param {string} username
|
|
24284
|
+
* @param {string} domain Domain name
|
|
24285
|
+
* @param {*} [options] Override http request option.
|
|
24286
|
+
* @throws {RequiredError}
|
|
24287
|
+
*/
|
|
24288
|
+
enableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource>;
|
|
24289
|
+
/**
|
|
24290
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
24291
|
+
* @summary Get CDN status
|
|
24292
|
+
* @param {string} username
|
|
24293
|
+
* @param {string} domain Domain name
|
|
24294
|
+
* @param {*} [options] Override http request option.
|
|
24295
|
+
* @throws {RequiredError}
|
|
24296
|
+
*/
|
|
24297
|
+
getCDNStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1CdnCdnStatusResource>;
|
|
24298
|
+
/**
|
|
24299
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
24300
|
+
* @summary Purge CDN cache
|
|
24301
|
+
* @param {string} username
|
|
24302
|
+
* @param {string} domain Domain name
|
|
24303
|
+
* @param {*} [options] Override http request option.
|
|
24304
|
+
* @throws {RequiredError}
|
|
24305
|
+
*/
|
|
24306
|
+
purgeCDNCacheV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource>;
|
|
24307
|
+
};
|
|
24308
|
+
/**
|
|
24309
|
+
* HostingCDNApi - object-oriented interface
|
|
24310
|
+
* @export
|
|
24311
|
+
* @class HostingCDNApi
|
|
24312
|
+
* @extends {BaseAPI}
|
|
24313
|
+
*/
|
|
24314
|
+
export declare class HostingCDNApi extends BaseAPI {
|
|
24315
|
+
/**
|
|
24316
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
24317
|
+
* @summary Disable CDN
|
|
24318
|
+
* @param {string} username
|
|
24319
|
+
* @param {string} domain Domain name
|
|
24320
|
+
* @param {*} [options] Override http request option.
|
|
24321
|
+
* @throws {RequiredError}
|
|
24322
|
+
* @memberof HostingCDNApi
|
|
24323
|
+
*/
|
|
24324
|
+
disableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CommonSuccessEmptyResource, any, {}, any>>;
|
|
24325
|
+
/**
|
|
24326
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
24327
|
+
* @summary Enable CDN
|
|
24328
|
+
* @param {string} username
|
|
24329
|
+
* @param {string} domain Domain name
|
|
24330
|
+
* @param {*} [options] Override http request option.
|
|
24331
|
+
* @throws {RequiredError}
|
|
24332
|
+
* @memberof HostingCDNApi
|
|
24333
|
+
*/
|
|
24334
|
+
enableCDNV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CommonSuccessEmptyResource, any, {}, any>>;
|
|
24335
|
+
/**
|
|
24336
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
24337
|
+
* @summary Get CDN status
|
|
24338
|
+
* @param {string} username
|
|
24339
|
+
* @param {string} domain Domain name
|
|
24340
|
+
* @param {*} [options] Override http request option.
|
|
24341
|
+
* @throws {RequiredError}
|
|
24342
|
+
* @memberof HostingCDNApi
|
|
24343
|
+
*/
|
|
24344
|
+
getCDNStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<HostingV1CdnCdnStatusResource, any, {}, any>>;
|
|
24345
|
+
/**
|
|
24346
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
24347
|
+
* @summary Purge CDN cache
|
|
24348
|
+
* @param {string} username
|
|
24349
|
+
* @param {string} domain Domain name
|
|
24350
|
+
* @param {*} [options] Override http request option.
|
|
24351
|
+
* @throws {RequiredError}
|
|
24352
|
+
* @memberof HostingCDNApi
|
|
24353
|
+
*/
|
|
24354
|
+
purgeCDNCacheV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CommonSuccessEmptyResource, any, {}, any>>;
|
|
24355
|
+
}
|
|
24169
24356
|
/**
|
|
24170
24357
|
* HostingCacheApi - axios parameter creator
|
|
24171
24358
|
* @export
|
|
24172
24359
|
*/
|
|
24173
24360
|
export declare const HostingCacheApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
24174
24361
|
/**
|
|
24175
|
-
* 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.
|
|
24362
|
+
* 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. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
24176
24363
|
* @summary Clear website cache
|
|
24177
24364
|
* @param {string} username
|
|
24178
24365
|
* @param {string} domain Domain name
|
|
@@ -24208,7 +24395,7 @@ export declare const HostingCacheApiAxiosParamCreator: (configuration?: Configur
|
|
|
24208
24395
|
*/
|
|
24209
24396
|
export declare const HostingCacheApiFp: (configuration?: Configuration) => {
|
|
24210
24397
|
/**
|
|
24211
|
-
* 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.
|
|
24398
|
+
* 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. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
24212
24399
|
* @summary Clear website cache
|
|
24213
24400
|
* @param {string} username
|
|
24214
24401
|
* @param {string} domain Domain name
|
|
@@ -24244,7 +24431,7 @@ export declare const HostingCacheApiFp: (configuration?: Configuration) => {
|
|
|
24244
24431
|
*/
|
|
24245
24432
|
export declare const HostingCacheApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
24246
24433
|
/**
|
|
24247
|
-
* 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.
|
|
24434
|
+
* 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. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
24248
24435
|
* @summary Clear website cache
|
|
24249
24436
|
* @param {string} username
|
|
24250
24437
|
* @param {string} domain Domain name
|
|
@@ -24282,7 +24469,7 @@ export declare const HostingCacheApiFactory: (configuration?: Configuration, bas
|
|
|
24282
24469
|
*/
|
|
24283
24470
|
export declare class HostingCacheApi extends BaseAPI {
|
|
24284
24471
|
/**
|
|
24285
|
-
* 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.
|
|
24472
|
+
* 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. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
24286
24473
|
* @summary Clear website cache
|
|
24287
24474
|
* @param {string} username
|
|
24288
24475
|
* @param {string} domain Domain name
|
package/dist/esm/api.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.1.
|
|
6
|
+
* API Version: 2.1.2
|
|
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
|
|
@@ -12623,6 +12623,340 @@ export class HorizonsWebsitesApi extends BaseAPI {
|
|
|
12623
12623
|
return HorizonsWebsitesApiFp(this.configuration).publishWebsiteV1(websiteId, horizonsV1WebsitesPublishWebsiteRequest, options).then((request) => request(this.axios, this.basePath));
|
|
12624
12624
|
}
|
|
12625
12625
|
}
|
|
12626
|
+
/**
|
|
12627
|
+
* HostingCDNApi - axios parameter creator
|
|
12628
|
+
* @export
|
|
12629
|
+
*/
|
|
12630
|
+
export const HostingCDNApiAxiosParamCreator = function (configuration) {
|
|
12631
|
+
return {
|
|
12632
|
+
/**
|
|
12633
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
12634
|
+
* @summary Disable CDN
|
|
12635
|
+
* @param {string} username
|
|
12636
|
+
* @param {string} domain Domain name
|
|
12637
|
+
* @param {*} [options] Override http request option.
|
|
12638
|
+
* @throws {RequiredError}
|
|
12639
|
+
*/
|
|
12640
|
+
disableCDNV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
12641
|
+
// verify required parameter 'username' is not null or undefined
|
|
12642
|
+
assertParamExists('disableCDNV1', 'username', username);
|
|
12643
|
+
// verify required parameter 'domain' is not null or undefined
|
|
12644
|
+
assertParamExists('disableCDNV1', 'domain', domain);
|
|
12645
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/disable`
|
|
12646
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
12647
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
12648
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12649
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12650
|
+
let baseOptions;
|
|
12651
|
+
if (configuration) {
|
|
12652
|
+
baseOptions = configuration.baseOptions;
|
|
12653
|
+
}
|
|
12654
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
12655
|
+
const localVarHeaderParameter = {};
|
|
12656
|
+
const localVarQueryParameter = {};
|
|
12657
|
+
// authentication apiToken required
|
|
12658
|
+
// http bearer authentication required
|
|
12659
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12660
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12661
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12662
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12663
|
+
return {
|
|
12664
|
+
url: toPathString(localVarUrlObj),
|
|
12665
|
+
options: localVarRequestOptions,
|
|
12666
|
+
};
|
|
12667
|
+
}),
|
|
12668
|
+
/**
|
|
12669
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
12670
|
+
* @summary Enable CDN
|
|
12671
|
+
* @param {string} username
|
|
12672
|
+
* @param {string} domain Domain name
|
|
12673
|
+
* @param {*} [options] Override http request option.
|
|
12674
|
+
* @throws {RequiredError}
|
|
12675
|
+
*/
|
|
12676
|
+
enableCDNV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
12677
|
+
// verify required parameter 'username' is not null or undefined
|
|
12678
|
+
assertParamExists('enableCDNV1', 'username', username);
|
|
12679
|
+
// verify required parameter 'domain' is not null or undefined
|
|
12680
|
+
assertParamExists('enableCDNV1', 'domain', domain);
|
|
12681
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/enable`
|
|
12682
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
12683
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
12684
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12685
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12686
|
+
let baseOptions;
|
|
12687
|
+
if (configuration) {
|
|
12688
|
+
baseOptions = configuration.baseOptions;
|
|
12689
|
+
}
|
|
12690
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
12691
|
+
const localVarHeaderParameter = {};
|
|
12692
|
+
const localVarQueryParameter = {};
|
|
12693
|
+
// authentication apiToken required
|
|
12694
|
+
// http bearer authentication required
|
|
12695
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12696
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12697
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12698
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12699
|
+
return {
|
|
12700
|
+
url: toPathString(localVarUrlObj),
|
|
12701
|
+
options: localVarRequestOptions,
|
|
12702
|
+
};
|
|
12703
|
+
}),
|
|
12704
|
+
/**
|
|
12705
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
12706
|
+
* @summary Get CDN status
|
|
12707
|
+
* @param {string} username
|
|
12708
|
+
* @param {string} domain Domain name
|
|
12709
|
+
* @param {*} [options] Override http request option.
|
|
12710
|
+
* @throws {RequiredError}
|
|
12711
|
+
*/
|
|
12712
|
+
getCDNStatusV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
12713
|
+
// verify required parameter 'username' is not null or undefined
|
|
12714
|
+
assertParamExists('getCDNStatusV1', 'username', username);
|
|
12715
|
+
// verify required parameter 'domain' is not null or undefined
|
|
12716
|
+
assertParamExists('getCDNStatusV1', 'domain', domain);
|
|
12717
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/status`
|
|
12718
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
12719
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
12720
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12721
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12722
|
+
let baseOptions;
|
|
12723
|
+
if (configuration) {
|
|
12724
|
+
baseOptions = configuration.baseOptions;
|
|
12725
|
+
}
|
|
12726
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
12727
|
+
const localVarHeaderParameter = {};
|
|
12728
|
+
const localVarQueryParameter = {};
|
|
12729
|
+
// authentication apiToken required
|
|
12730
|
+
// http bearer authentication required
|
|
12731
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12732
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12733
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12734
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12735
|
+
return {
|
|
12736
|
+
url: toPathString(localVarUrlObj),
|
|
12737
|
+
options: localVarRequestOptions,
|
|
12738
|
+
};
|
|
12739
|
+
}),
|
|
12740
|
+
/**
|
|
12741
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
12742
|
+
* @summary Purge CDN cache
|
|
12743
|
+
* @param {string} username
|
|
12744
|
+
* @param {string} domain Domain name
|
|
12745
|
+
* @param {*} [options] Override http request option.
|
|
12746
|
+
* @throws {RequiredError}
|
|
12747
|
+
*/
|
|
12748
|
+
purgeCDNCacheV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
12749
|
+
// verify required parameter 'username' is not null or undefined
|
|
12750
|
+
assertParamExists('purgeCDNCacheV1', 'username', username);
|
|
12751
|
+
// verify required parameter 'domain' is not null or undefined
|
|
12752
|
+
assertParamExists('purgeCDNCacheV1', 'domain', domain);
|
|
12753
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/purge`
|
|
12754
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
12755
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
12756
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
12757
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
12758
|
+
let baseOptions;
|
|
12759
|
+
if (configuration) {
|
|
12760
|
+
baseOptions = configuration.baseOptions;
|
|
12761
|
+
}
|
|
12762
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
12763
|
+
const localVarHeaderParameter = {};
|
|
12764
|
+
const localVarQueryParameter = {};
|
|
12765
|
+
// authentication apiToken required
|
|
12766
|
+
// http bearer authentication required
|
|
12767
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
12768
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
12769
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
12770
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
12771
|
+
return {
|
|
12772
|
+
url: toPathString(localVarUrlObj),
|
|
12773
|
+
options: localVarRequestOptions,
|
|
12774
|
+
};
|
|
12775
|
+
}),
|
|
12776
|
+
};
|
|
12777
|
+
};
|
|
12778
|
+
/**
|
|
12779
|
+
* HostingCDNApi - functional programming interface
|
|
12780
|
+
* @export
|
|
12781
|
+
*/
|
|
12782
|
+
export const HostingCDNApiFp = function (configuration) {
|
|
12783
|
+
const localVarAxiosParamCreator = HostingCDNApiAxiosParamCreator(configuration);
|
|
12784
|
+
return {
|
|
12785
|
+
/**
|
|
12786
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
12787
|
+
* @summary Disable CDN
|
|
12788
|
+
* @param {string} username
|
|
12789
|
+
* @param {string} domain Domain name
|
|
12790
|
+
* @param {*} [options] Override http request option.
|
|
12791
|
+
* @throws {RequiredError}
|
|
12792
|
+
*/
|
|
12793
|
+
disableCDNV1(username, domain, options) {
|
|
12794
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12795
|
+
var _a, _b;
|
|
12796
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.disableCDNV1(username, domain, options);
|
|
12797
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCDNApi.disableCDNV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12798
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12799
|
+
});
|
|
12800
|
+
},
|
|
12801
|
+
/**
|
|
12802
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
12803
|
+
* @summary Enable CDN
|
|
12804
|
+
* @param {string} username
|
|
12805
|
+
* @param {string} domain Domain name
|
|
12806
|
+
* @param {*} [options] Override http request option.
|
|
12807
|
+
* @throws {RequiredError}
|
|
12808
|
+
*/
|
|
12809
|
+
enableCDNV1(username, domain, options) {
|
|
12810
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12811
|
+
var _a, _b;
|
|
12812
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.enableCDNV1(username, domain, options);
|
|
12813
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCDNApi.enableCDNV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12814
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12815
|
+
});
|
|
12816
|
+
},
|
|
12817
|
+
/**
|
|
12818
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
12819
|
+
* @summary Get CDN status
|
|
12820
|
+
* @param {string} username
|
|
12821
|
+
* @param {string} domain Domain name
|
|
12822
|
+
* @param {*} [options] Override http request option.
|
|
12823
|
+
* @throws {RequiredError}
|
|
12824
|
+
*/
|
|
12825
|
+
getCDNStatusV1(username, domain, options) {
|
|
12826
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12827
|
+
var _a, _b;
|
|
12828
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCDNStatusV1(username, domain, options);
|
|
12829
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCDNApi.getCDNStatusV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12830
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12831
|
+
});
|
|
12832
|
+
},
|
|
12833
|
+
/**
|
|
12834
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
12835
|
+
* @summary Purge CDN cache
|
|
12836
|
+
* @param {string} username
|
|
12837
|
+
* @param {string} domain Domain name
|
|
12838
|
+
* @param {*} [options] Override http request option.
|
|
12839
|
+
* @throws {RequiredError}
|
|
12840
|
+
*/
|
|
12841
|
+
purgeCDNCacheV1(username, domain, options) {
|
|
12842
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12843
|
+
var _a, _b;
|
|
12844
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.purgeCDNCacheV1(username, domain, options);
|
|
12845
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingCDNApi.purgeCDNCacheV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
12846
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
12847
|
+
});
|
|
12848
|
+
},
|
|
12849
|
+
};
|
|
12850
|
+
};
|
|
12851
|
+
/**
|
|
12852
|
+
* HostingCDNApi - factory interface
|
|
12853
|
+
* @export
|
|
12854
|
+
*/
|
|
12855
|
+
export const HostingCDNApiFactory = function (configuration, basePath, axios) {
|
|
12856
|
+
const localVarFp = HostingCDNApiFp(configuration);
|
|
12857
|
+
return {
|
|
12858
|
+
/**
|
|
12859
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
12860
|
+
* @summary Disable CDN
|
|
12861
|
+
* @param {string} username
|
|
12862
|
+
* @param {string} domain Domain name
|
|
12863
|
+
* @param {*} [options] Override http request option.
|
|
12864
|
+
* @throws {RequiredError}
|
|
12865
|
+
*/
|
|
12866
|
+
disableCDNV1(username, domain, options) {
|
|
12867
|
+
return localVarFp.disableCDNV1(username, domain, options).then((request) => request(axios, basePath));
|
|
12868
|
+
},
|
|
12869
|
+
/**
|
|
12870
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
12871
|
+
* @summary Enable CDN
|
|
12872
|
+
* @param {string} username
|
|
12873
|
+
* @param {string} domain Domain name
|
|
12874
|
+
* @param {*} [options] Override http request option.
|
|
12875
|
+
* @throws {RequiredError}
|
|
12876
|
+
*/
|
|
12877
|
+
enableCDNV1(username, domain, options) {
|
|
12878
|
+
return localVarFp.enableCDNV1(username, domain, options).then((request) => request(axios, basePath));
|
|
12879
|
+
},
|
|
12880
|
+
/**
|
|
12881
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
12882
|
+
* @summary Get CDN status
|
|
12883
|
+
* @param {string} username
|
|
12884
|
+
* @param {string} domain Domain name
|
|
12885
|
+
* @param {*} [options] Override http request option.
|
|
12886
|
+
* @throws {RequiredError}
|
|
12887
|
+
*/
|
|
12888
|
+
getCDNStatusV1(username, domain, options) {
|
|
12889
|
+
return localVarFp.getCDNStatusV1(username, domain, options).then((request) => request(axios, basePath));
|
|
12890
|
+
},
|
|
12891
|
+
/**
|
|
12892
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
12893
|
+
* @summary Purge CDN cache
|
|
12894
|
+
* @param {string} username
|
|
12895
|
+
* @param {string} domain Domain name
|
|
12896
|
+
* @param {*} [options] Override http request option.
|
|
12897
|
+
* @throws {RequiredError}
|
|
12898
|
+
*/
|
|
12899
|
+
purgeCDNCacheV1(username, domain, options) {
|
|
12900
|
+
return localVarFp.purgeCDNCacheV1(username, domain, options).then((request) => request(axios, basePath));
|
|
12901
|
+
},
|
|
12902
|
+
};
|
|
12903
|
+
};
|
|
12904
|
+
/**
|
|
12905
|
+
* HostingCDNApi - object-oriented interface
|
|
12906
|
+
* @export
|
|
12907
|
+
* @class HostingCDNApi
|
|
12908
|
+
* @extends {BaseAPI}
|
|
12909
|
+
*/
|
|
12910
|
+
export class HostingCDNApi extends BaseAPI {
|
|
12911
|
+
/**
|
|
12912
|
+
* Turns off the Hostinger CDN for the website domain. Once DNS propagation completes, the website content is served directly from the origin server. Repeating the call is safe; when CDN is already disabled, it applies the DNS change again. Returns 422 for platform-managed domains (for example `*.hostingersite.com` and `*.app-preview.com`), where CDN cannot be disabled, even when CDN is already off. Also returns 422 while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
12913
|
+
* @summary Disable CDN
|
|
12914
|
+
* @param {string} username
|
|
12915
|
+
* @param {string} domain Domain name
|
|
12916
|
+
* @param {*} [options] Override http request option.
|
|
12917
|
+
* @throws {RequiredError}
|
|
12918
|
+
* @memberof HostingCDNApi
|
|
12919
|
+
*/
|
|
12920
|
+
disableCDNV1(username, domain, options) {
|
|
12921
|
+
return HostingCDNApiFp(this.configuration).disableCDNV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
12922
|
+
}
|
|
12923
|
+
/**
|
|
12924
|
+
* Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account. Enabling changes the domain\'s DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN. Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate. Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
|
|
12925
|
+
* @summary Enable CDN
|
|
12926
|
+
* @param {string} username
|
|
12927
|
+
* @param {string} domain Domain name
|
|
12928
|
+
* @param {*} [options] Override http request option.
|
|
12929
|
+
* @throws {RequiredError}
|
|
12930
|
+
* @memberof HostingCDNApi
|
|
12931
|
+
*/
|
|
12932
|
+
enableCDNV1(username, domain, options) {
|
|
12933
|
+
return HostingCDNApiFp(this.configuration).enableCDNV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
12934
|
+
}
|
|
12935
|
+
/**
|
|
12936
|
+
* Returns whether the Hostinger CDN is enabled for the website domain. Works for the main domain, parked domains and subdomains of the account. The domain must be the exact website name as listed on the account, without a `www.` prefix. Returns 404 when the domain is not a website on the account.
|
|
12937
|
+
* @summary Get CDN status
|
|
12938
|
+
* @param {string} username
|
|
12939
|
+
* @param {string} domain Domain name
|
|
12940
|
+
* @param {*} [options] Override http request option.
|
|
12941
|
+
* @throws {RequiredError}
|
|
12942
|
+
* @memberof HostingCDNApi
|
|
12943
|
+
*/
|
|
12944
|
+
getCDNStatusV1(username, domain, options) {
|
|
12945
|
+
return HostingCDNApiFp(this.configuration).getCDNStatusV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
12946
|
+
}
|
|
12947
|
+
/**
|
|
12948
|
+
* Purges the website\'s content from the Hostinger CDN edge cache only. The origin server cache is not touched; to clear both, use `Clear website cache`. Returns 422 when CDN is not enabled on the website. Returns 404 when the domain is not a website on the account.
|
|
12949
|
+
* @summary Purge CDN cache
|
|
12950
|
+
* @param {string} username
|
|
12951
|
+
* @param {string} domain Domain name
|
|
12952
|
+
* @param {*} [options] Override http request option.
|
|
12953
|
+
* @throws {RequiredError}
|
|
12954
|
+
* @memberof HostingCDNApi
|
|
12955
|
+
*/
|
|
12956
|
+
purgeCDNCacheV1(username, domain, options) {
|
|
12957
|
+
return HostingCDNApiFp(this.configuration).purgeCDNCacheV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
12958
|
+
}
|
|
12959
|
+
}
|
|
12626
12960
|
/**
|
|
12627
12961
|
* HostingCacheApi - axios parameter creator
|
|
12628
12962
|
* @export
|
|
@@ -12630,7 +12964,7 @@ export class HorizonsWebsitesApi extends BaseAPI {
|
|
|
12630
12964
|
export const HostingCacheApiAxiosParamCreator = function (configuration) {
|
|
12631
12965
|
return {
|
|
12632
12966
|
/**
|
|
12633
|
-
* 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.
|
|
12967
|
+
* 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. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
12634
12968
|
* @summary Clear website cache
|
|
12635
12969
|
* @param {string} username
|
|
12636
12970
|
* @param {string} domain Domain name
|
|
@@ -12761,7 +13095,7 @@ export const HostingCacheApiFp = function (configuration) {
|
|
|
12761
13095
|
const localVarAxiosParamCreator = HostingCacheApiAxiosParamCreator(configuration);
|
|
12762
13096
|
return {
|
|
12763
13097
|
/**
|
|
12764
|
-
* 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.
|
|
13098
|
+
* 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. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
12765
13099
|
* @summary Clear website cache
|
|
12766
13100
|
* @param {string} username
|
|
12767
13101
|
* @param {string} domain Domain name
|
|
@@ -12821,7 +13155,7 @@ export const HostingCacheApiFactory = function (configuration, basePath, axios)
|
|
|
12821
13155
|
const localVarFp = HostingCacheApiFp(configuration);
|
|
12822
13156
|
return {
|
|
12823
13157
|
/**
|
|
12824
|
-
* 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.
|
|
13158
|
+
* 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. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
12825
13159
|
* @summary Clear website cache
|
|
12826
13160
|
* @param {string} username
|
|
12827
13161
|
* @param {string} domain Domain name
|
|
@@ -12866,7 +13200,7 @@ export const HostingCacheApiFactory = function (configuration, basePath, axios)
|
|
|
12866
13200
|
*/
|
|
12867
13201
|
export class HostingCacheApi extends BaseAPI {
|
|
12868
13202
|
/**
|
|
12869
|
-
* 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.
|
|
13203
|
+
* 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. To purge only the CDN cache and leave the server cache untouched, use `Purge CDN cache`. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
|
|
12870
13204
|
* @summary Clear website cache
|
|
12871
13205
|
* @param {string} username
|
|
12872
13206
|
* @param {string} domain Domain name
|