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/dist/api.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 2.1.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