hostinger-api-sdk 2.4.1 → 2.4.3
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 +159 -9
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +114 -9
- package/dist/api.js +98 -20
- 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 +114 -9
- package/dist/esm/api.js +87 -9
- 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 +59 -2
- package/docs/HostingV1CacheCacheStatusResource.md +22 -0
- package/docs/HostingV1WebsitesTriggerEventRequest.md +20 -0
- package/docs/HostingV1WebsitesTriggerEventRequestEvent.md +23 -0
- package/docs/HostingV1WebsitesTriggerEventRequestEventParams.md +21 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
## @hostinger/sdk@2.4.
|
|
1
|
+
## @hostinger/sdk@2.4.3
|
|
2
2
|
|
|
3
3
|
For more information, please visit [https://developers.hostinger.com](https://developers.hostinger.com).
|
|
4
4
|
|
|
5
5
|
### Usage
|
|
6
6
|
|
|
7
7
|
```
|
|
8
|
-
npm install @hostinger/sdk@2.4.
|
|
8
|
+
npm install @hostinger/sdk@2.4.3 --save
|
|
9
9
|
```
|
package/api.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.4.
|
|
6
|
+
* API Version: 2.4.3
|
|
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
|
|
@@ -7202,6 +7202,25 @@ export interface HostingListWebsitesV1200Response {
|
|
|
7202
7202
|
*/
|
|
7203
7203
|
'meta': CommonSchemaPaginationMetaSchema;
|
|
7204
7204
|
}
|
|
7205
|
+
/**
|
|
7206
|
+
*
|
|
7207
|
+
* @export
|
|
7208
|
+
* @interface HostingV1CacheCacheStatusResource
|
|
7209
|
+
*/
|
|
7210
|
+
export interface HostingV1CacheCacheStatusResource {
|
|
7211
|
+
/**
|
|
7212
|
+
* Whether server-side caching is enabled for the website
|
|
7213
|
+
* @type {boolean}
|
|
7214
|
+
* @memberof HostingV1CacheCacheStatusResource
|
|
7215
|
+
*/
|
|
7216
|
+
'is_enabled': boolean;
|
|
7217
|
+
/**
|
|
7218
|
+
* Whether development (cacheless) mode is on. While it is on, caching is bypassed even when `is_enabled` is true. Can take a few minutes to follow a cacheless mode toggle.
|
|
7219
|
+
* @type {boolean}
|
|
7220
|
+
* @memberof HostingV1CacheCacheStatusResource
|
|
7221
|
+
*/
|
|
7222
|
+
'is_cacheless_mode_enabled': boolean;
|
|
7223
|
+
}
|
|
7205
7224
|
/**
|
|
7206
7225
|
*
|
|
7207
7226
|
* @export
|
|
@@ -10113,6 +10132,58 @@ export interface HostingV1WebsitesDeployArchiveRequest {
|
|
|
10113
10132
|
*/
|
|
10114
10133
|
'archive_path': string;
|
|
10115
10134
|
}
|
|
10135
|
+
/**
|
|
10136
|
+
*
|
|
10137
|
+
* @export
|
|
10138
|
+
* @interface HostingV1WebsitesTriggerEventRequest
|
|
10139
|
+
*/
|
|
10140
|
+
export interface HostingV1WebsitesTriggerEventRequest {
|
|
10141
|
+
/**
|
|
10142
|
+
*
|
|
10143
|
+
* @type {HostingV1WebsitesTriggerEventRequestEvent}
|
|
10144
|
+
* @memberof HostingV1WebsitesTriggerEventRequest
|
|
10145
|
+
*/
|
|
10146
|
+
'event': HostingV1WebsitesTriggerEventRequestEvent;
|
|
10147
|
+
}
|
|
10148
|
+
/**
|
|
10149
|
+
* Event to trigger; `name` decides which `params` it takes
|
|
10150
|
+
* @export
|
|
10151
|
+
* @interface HostingV1WebsitesTriggerEventRequestEvent
|
|
10152
|
+
*/
|
|
10153
|
+
export interface HostingV1WebsitesTriggerEventRequestEvent {
|
|
10154
|
+
/**
|
|
10155
|
+
* Name of the event: - `headless_onboarding.tool.connected`: an AI coding tool started building this website with the Hostinger headless skill. Takes `params.tool`.
|
|
10156
|
+
* @type {string}
|
|
10157
|
+
* @memberof HostingV1WebsitesTriggerEventRequestEvent
|
|
10158
|
+
*/
|
|
10159
|
+
'name': HostingV1WebsitesTriggerEventRequestEventNameEnum;
|
|
10160
|
+
/**
|
|
10161
|
+
*
|
|
10162
|
+
* @type {HostingV1WebsitesTriggerEventRequestEventParams}
|
|
10163
|
+
* @memberof HostingV1WebsitesTriggerEventRequestEvent
|
|
10164
|
+
*/
|
|
10165
|
+
'params': HostingV1WebsitesTriggerEventRequestEventParams;
|
|
10166
|
+
}
|
|
10167
|
+
|
|
10168
|
+
export const HostingV1WebsitesTriggerEventRequestEventNameEnum = {
|
|
10169
|
+
HeadlessOnboardingToolConnected: 'headless_onboarding.tool.connected'
|
|
10170
|
+
} as const;
|
|
10171
|
+
|
|
10172
|
+
export type HostingV1WebsitesTriggerEventRequestEventNameEnum = typeof HostingV1WebsitesTriggerEventRequestEventNameEnum[keyof typeof HostingV1WebsitesTriggerEventRequestEventNameEnum];
|
|
10173
|
+
|
|
10174
|
+
/**
|
|
10175
|
+
* Fields of the event
|
|
10176
|
+
* @export
|
|
10177
|
+
* @interface HostingV1WebsitesTriggerEventRequestEventParams
|
|
10178
|
+
*/
|
|
10179
|
+
export interface HostingV1WebsitesTriggerEventRequestEventParams {
|
|
10180
|
+
/**
|
|
10181
|
+
* Lowercase slug of the AI coding tool. Known slugs: `claude` (Claude Code), `cursor` (Cursor), `codex` (Codex), `vscode` (VS Code), `antigravity` (Antigravity) and `devin` (Devin). For any other tool, send its own slug.
|
|
10182
|
+
* @type {string}
|
|
10183
|
+
* @memberof HostingV1WebsitesTriggerEventRequestEventParams
|
|
10184
|
+
*/
|
|
10185
|
+
'tool': string;
|
|
10186
|
+
}
|
|
10116
10187
|
/**
|
|
10117
10188
|
*
|
|
10118
10189
|
* @export
|
|
@@ -31616,7 +31687,49 @@ export const HostingCacheApiAxiosParamCreator = function (configuration?: Config
|
|
|
31616
31687
|
};
|
|
31617
31688
|
},
|
|
31618
31689
|
/**
|
|
31619
|
-
*
|
|
31690
|
+
* Returns the caching state of the website: whether server-side caching is enabled and whether development (cacheless) mode is on. Works for the main domain, addon websites, parked domains and subdomains of the account; each reports its own settings and does not inherit them from its parent website. `is_enabled` is the setting changed by `Toggle website cache` and reflects a toggle immediately. `is_cacheless_mode_enabled` is true while development mode is on; caching is then bypassed even when `is_enabled` is true. `Toggle cacheless mode` is applied in the background, so this flag can take a few minutes to follow it. 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.
|
|
31691
|
+
* @summary Get cache status
|
|
31692
|
+
* @param {string} username
|
|
31693
|
+
* @param {string} domain Domain name
|
|
31694
|
+
* @param {*} [options] Override http request option.
|
|
31695
|
+
* @throws {RequiredError}
|
|
31696
|
+
*/
|
|
31697
|
+
getCacheStatusV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
31698
|
+
// verify required parameter 'username' is not null or undefined
|
|
31699
|
+
assertParamExists('getCacheStatusV1', 'username', username)
|
|
31700
|
+
// verify required parameter 'domain' is not null or undefined
|
|
31701
|
+
assertParamExists('getCacheStatusV1', 'domain', domain)
|
|
31702
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cache/status`
|
|
31703
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
31704
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
31705
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
31706
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
31707
|
+
let baseOptions;
|
|
31708
|
+
if (configuration) {
|
|
31709
|
+
baseOptions = configuration.baseOptions;
|
|
31710
|
+
}
|
|
31711
|
+
|
|
31712
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
31713
|
+
const localVarHeaderParameter = {} as any;
|
|
31714
|
+
const localVarQueryParameter = {} as any;
|
|
31715
|
+
|
|
31716
|
+
// authentication apiToken required
|
|
31717
|
+
// http bearer authentication required
|
|
31718
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
31719
|
+
|
|
31720
|
+
|
|
31721
|
+
|
|
31722
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
31723
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
31724
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
31725
|
+
|
|
31726
|
+
return {
|
|
31727
|
+
url: toPathString(localVarUrlObj),
|
|
31728
|
+
options: localVarRequestOptions,
|
|
31729
|
+
};
|
|
31730
|
+
},
|
|
31731
|
+
/**
|
|
31732
|
+
* Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching. The change is applied in the background and can take a few minutes. Use `Get cache status` to check the current state.
|
|
31620
31733
|
* @summary Toggle cacheless mode
|
|
31621
31734
|
* @param {string} username
|
|
31622
31735
|
* @param {string} domain Domain name
|
|
@@ -31664,7 +31777,7 @@ export const HostingCacheApiAxiosParamCreator = function (configuration?: Config
|
|
|
31664
31777
|
};
|
|
31665
31778
|
},
|
|
31666
31779
|
/**
|
|
31667
|
-
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
|
|
31780
|
+
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state. Use `Get cache status` to check the current state.
|
|
31668
31781
|
* @summary Toggle website cache
|
|
31669
31782
|
* @param {string} username
|
|
31670
31783
|
* @param {string} domain Domain name
|
|
@@ -31736,7 +31849,20 @@ export const HostingCacheApiFp = function(configuration?: Configuration) {
|
|
|
31736
31849
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31737
31850
|
},
|
|
31738
31851
|
/**
|
|
31739
|
-
*
|
|
31852
|
+
* Returns the caching state of the website: whether server-side caching is enabled and whether development (cacheless) mode is on. Works for the main domain, addon websites, parked domains and subdomains of the account; each reports its own settings and does not inherit them from its parent website. `is_enabled` is the setting changed by `Toggle website cache` and reflects a toggle immediately. `is_cacheless_mode_enabled` is true while development mode is on; caching is then bypassed even when `is_enabled` is true. `Toggle cacheless mode` is applied in the background, so this flag can take a few minutes to follow it. 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.
|
|
31853
|
+
* @summary Get cache status
|
|
31854
|
+
* @param {string} username
|
|
31855
|
+
* @param {string} domain Domain name
|
|
31856
|
+
* @param {*} [options] Override http request option.
|
|
31857
|
+
* @throws {RequiredError}
|
|
31858
|
+
*/
|
|
31859
|
+
async getCacheStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1CacheCacheStatusResource>> {
|
|
31860
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getCacheStatusV1(username, domain, options);
|
|
31861
|
+
const localVarOperationServerBasePath = operationServerMap['HostingCacheApi.getCacheStatusV1']?.[0]?.url;
|
|
31862
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31863
|
+
},
|
|
31864
|
+
/**
|
|
31865
|
+
* Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching. The change is applied in the background and can take a few minutes. Use `Get cache status` to check the current state.
|
|
31740
31866
|
* @summary Toggle cacheless mode
|
|
31741
31867
|
* @param {string} username
|
|
31742
31868
|
* @param {string} domain Domain name
|
|
@@ -31750,7 +31876,7 @@ export const HostingCacheApiFp = function(configuration?: Configuration) {
|
|
|
31750
31876
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31751
31877
|
},
|
|
31752
31878
|
/**
|
|
31753
|
-
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
|
|
31879
|
+
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state. Use `Get cache status` to check the current state.
|
|
31754
31880
|
* @summary Toggle website cache
|
|
31755
31881
|
* @param {string} username
|
|
31756
31882
|
* @param {string} domain Domain name
|
|
@@ -31786,7 +31912,18 @@ export const HostingCacheApiFactory = function (configuration?: Configuration, b
|
|
|
31786
31912
|
return localVarFp.clearWebsiteCacheV1(username, domain, directory, options).then((request) => request(axios, basePath));
|
|
31787
31913
|
},
|
|
31788
31914
|
/**
|
|
31789
|
-
*
|
|
31915
|
+
* Returns the caching state of the website: whether server-side caching is enabled and whether development (cacheless) mode is on. Works for the main domain, addon websites, parked domains and subdomains of the account; each reports its own settings and does not inherit them from its parent website. `is_enabled` is the setting changed by `Toggle website cache` and reflects a toggle immediately. `is_cacheless_mode_enabled` is true while development mode is on; caching is then bypassed even when `is_enabled` is true. `Toggle cacheless mode` is applied in the background, so this flag can take a few minutes to follow it. 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.
|
|
31916
|
+
* @summary Get cache status
|
|
31917
|
+
* @param {string} username
|
|
31918
|
+
* @param {string} domain Domain name
|
|
31919
|
+
* @param {*} [options] Override http request option.
|
|
31920
|
+
* @throws {RequiredError}
|
|
31921
|
+
*/
|
|
31922
|
+
getCacheStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1CacheCacheStatusResource> {
|
|
31923
|
+
return localVarFp.getCacheStatusV1(username, domain, options).then((request) => request(axios, basePath));
|
|
31924
|
+
},
|
|
31925
|
+
/**
|
|
31926
|
+
* Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching. The change is applied in the background and can take a few minutes. Use `Get cache status` to check the current state.
|
|
31790
31927
|
* @summary Toggle cacheless mode
|
|
31791
31928
|
* @param {string} username
|
|
31792
31929
|
* @param {string} domain Domain name
|
|
@@ -31798,7 +31935,7 @@ export const HostingCacheApiFactory = function (configuration?: Configuration, b
|
|
|
31798
31935
|
return localVarFp.toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options).then((request) => request(axios, basePath));
|
|
31799
31936
|
},
|
|
31800
31937
|
/**
|
|
31801
|
-
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
|
|
31938
|
+
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state. Use `Get cache status` to check the current state.
|
|
31802
31939
|
* @summary Toggle website cache
|
|
31803
31940
|
* @param {string} username
|
|
31804
31941
|
* @param {string} domain Domain name
|
|
@@ -31834,7 +31971,20 @@ export class HostingCacheApi extends BaseAPI {
|
|
|
31834
31971
|
}
|
|
31835
31972
|
|
|
31836
31973
|
/**
|
|
31837
|
-
*
|
|
31974
|
+
* Returns the caching state of the website: whether server-side caching is enabled and whether development (cacheless) mode is on. Works for the main domain, addon websites, parked domains and subdomains of the account; each reports its own settings and does not inherit them from its parent website. `is_enabled` is the setting changed by `Toggle website cache` and reflects a toggle immediately. `is_cacheless_mode_enabled` is true while development mode is on; caching is then bypassed even when `is_enabled` is true. `Toggle cacheless mode` is applied in the background, so this flag can take a few minutes to follow it. 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.
|
|
31975
|
+
* @summary Get cache status
|
|
31976
|
+
* @param {string} username
|
|
31977
|
+
* @param {string} domain Domain name
|
|
31978
|
+
* @param {*} [options] Override http request option.
|
|
31979
|
+
* @throws {RequiredError}
|
|
31980
|
+
* @memberof HostingCacheApi
|
|
31981
|
+
*/
|
|
31982
|
+
public getCacheStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
31983
|
+
return HostingCacheApiFp(this.configuration).getCacheStatusV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
31984
|
+
}
|
|
31985
|
+
|
|
31986
|
+
/**
|
|
31987
|
+
* Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching. The change is applied in the background and can take a few minutes. Use `Get cache status` to check the current state.
|
|
31838
31988
|
* @summary Toggle cacheless mode
|
|
31839
31989
|
* @param {string} username
|
|
31840
31990
|
* @param {string} domain Domain name
|
|
@@ -31848,7 +31998,7 @@ export class HostingCacheApi extends BaseAPI {
|
|
|
31848
31998
|
}
|
|
31849
31999
|
|
|
31850
32000
|
/**
|
|
31851
|
-
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
|
|
32001
|
+
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state. Use `Get cache status` to check the current state.
|
|
31852
32002
|
* @summary Toggle website cache
|
|
31853
32003
|
* @param {string} username
|
|
31854
32004
|
* @param {string} domain Domain name
|
package/base.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.4.
|
|
6
|
+
* API Version: 2.4.3
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/common.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.4.
|
|
6
|
+
* API Version: 2.4.3
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/configuration.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.4.
|
|
6
|
+
* API Version: 2.4.3
|
|
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
|
|
@@ -48,7 +48,7 @@ export class Configuration {
|
|
|
48
48
|
this.baseOptions = {
|
|
49
49
|
...param.baseOptions,
|
|
50
50
|
headers: {
|
|
51
|
-
'User-Agent': "hostinger-typescript-sdk/2.4.
|
|
51
|
+
'User-Agent': "hostinger-typescript-sdk/2.4.3",
|
|
52
52
|
...param.baseOptions?.headers,
|
|
53
53
|
},
|
|
54
54
|
};
|
package/dist/api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.4.
|
|
4
|
+
* API Version: 2.4.3
|
|
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
|
|
@@ -7050,6 +7050,25 @@ export interface HostingListWebsitesV1200Response {
|
|
|
7050
7050
|
*/
|
|
7051
7051
|
'meta': CommonSchemaPaginationMetaSchema;
|
|
7052
7052
|
}
|
|
7053
|
+
/**
|
|
7054
|
+
*
|
|
7055
|
+
* @export
|
|
7056
|
+
* @interface HostingV1CacheCacheStatusResource
|
|
7057
|
+
*/
|
|
7058
|
+
export interface HostingV1CacheCacheStatusResource {
|
|
7059
|
+
/**
|
|
7060
|
+
* Whether server-side caching is enabled for the website
|
|
7061
|
+
* @type {boolean}
|
|
7062
|
+
* @memberof HostingV1CacheCacheStatusResource
|
|
7063
|
+
*/
|
|
7064
|
+
'is_enabled': boolean;
|
|
7065
|
+
/**
|
|
7066
|
+
* Whether development (cacheless) mode is on. While it is on, caching is bypassed even when `is_enabled` is true. Can take a few minutes to follow a cacheless mode toggle.
|
|
7067
|
+
* @type {boolean}
|
|
7068
|
+
* @memberof HostingV1CacheCacheStatusResource
|
|
7069
|
+
*/
|
|
7070
|
+
'is_cacheless_mode_enabled': boolean;
|
|
7071
|
+
}
|
|
7053
7072
|
/**
|
|
7054
7073
|
*
|
|
7055
7074
|
* @export
|
|
@@ -9899,6 +9918,55 @@ export interface HostingV1WebsitesDeployArchiveRequest {
|
|
|
9899
9918
|
*/
|
|
9900
9919
|
'archive_path': string;
|
|
9901
9920
|
}
|
|
9921
|
+
/**
|
|
9922
|
+
*
|
|
9923
|
+
* @export
|
|
9924
|
+
* @interface HostingV1WebsitesTriggerEventRequest
|
|
9925
|
+
*/
|
|
9926
|
+
export interface HostingV1WebsitesTriggerEventRequest {
|
|
9927
|
+
/**
|
|
9928
|
+
*
|
|
9929
|
+
* @type {HostingV1WebsitesTriggerEventRequestEvent}
|
|
9930
|
+
* @memberof HostingV1WebsitesTriggerEventRequest
|
|
9931
|
+
*/
|
|
9932
|
+
'event': HostingV1WebsitesTriggerEventRequestEvent;
|
|
9933
|
+
}
|
|
9934
|
+
/**
|
|
9935
|
+
* Event to trigger; `name` decides which `params` it takes
|
|
9936
|
+
* @export
|
|
9937
|
+
* @interface HostingV1WebsitesTriggerEventRequestEvent
|
|
9938
|
+
*/
|
|
9939
|
+
export interface HostingV1WebsitesTriggerEventRequestEvent {
|
|
9940
|
+
/**
|
|
9941
|
+
* Name of the event: - `headless_onboarding.tool.connected`: an AI coding tool started building this website with the Hostinger headless skill. Takes `params.tool`.
|
|
9942
|
+
* @type {string}
|
|
9943
|
+
* @memberof HostingV1WebsitesTriggerEventRequestEvent
|
|
9944
|
+
*/
|
|
9945
|
+
'name': HostingV1WebsitesTriggerEventRequestEventNameEnum;
|
|
9946
|
+
/**
|
|
9947
|
+
*
|
|
9948
|
+
* @type {HostingV1WebsitesTriggerEventRequestEventParams}
|
|
9949
|
+
* @memberof HostingV1WebsitesTriggerEventRequestEvent
|
|
9950
|
+
*/
|
|
9951
|
+
'params': HostingV1WebsitesTriggerEventRequestEventParams;
|
|
9952
|
+
}
|
|
9953
|
+
export declare const HostingV1WebsitesTriggerEventRequestEventNameEnum: {
|
|
9954
|
+
readonly HeadlessOnboardingToolConnected: "headless_onboarding.tool.connected";
|
|
9955
|
+
};
|
|
9956
|
+
export type HostingV1WebsitesTriggerEventRequestEventNameEnum = typeof HostingV1WebsitesTriggerEventRequestEventNameEnum[keyof typeof HostingV1WebsitesTriggerEventRequestEventNameEnum];
|
|
9957
|
+
/**
|
|
9958
|
+
* Fields of the event
|
|
9959
|
+
* @export
|
|
9960
|
+
* @interface HostingV1WebsitesTriggerEventRequestEventParams
|
|
9961
|
+
*/
|
|
9962
|
+
export interface HostingV1WebsitesTriggerEventRequestEventParams {
|
|
9963
|
+
/**
|
|
9964
|
+
* Lowercase slug of the AI coding tool. Known slugs: `claude` (Claude Code), `cursor` (Cursor), `codex` (Codex), `vscode` (VS Code), `antigravity` (Antigravity) and `devin` (Devin). For any other tool, send its own slug.
|
|
9965
|
+
* @type {string}
|
|
9966
|
+
* @memberof HostingV1WebsitesTriggerEventRequestEventParams
|
|
9967
|
+
*/
|
|
9968
|
+
'tool': string;
|
|
9969
|
+
}
|
|
9902
9970
|
/**
|
|
9903
9971
|
*
|
|
9904
9972
|
* @export
|
|
@@ -24722,7 +24790,16 @@ export declare const HostingCacheApiAxiosParamCreator: (configuration?: Configur
|
|
|
24722
24790
|
*/
|
|
24723
24791
|
clearWebsiteCacheV1: (username: string, domain: string, directory?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
24724
24792
|
/**
|
|
24725
|
-
*
|
|
24793
|
+
* Returns the caching state of the website: whether server-side caching is enabled and whether development (cacheless) mode is on. Works for the main domain, addon websites, parked domains and subdomains of the account; each reports its own settings and does not inherit them from its parent website. `is_enabled` is the setting changed by `Toggle website cache` and reflects a toggle immediately. `is_cacheless_mode_enabled` is true while development mode is on; caching is then bypassed even when `is_enabled` is true. `Toggle cacheless mode` is applied in the background, so this flag can take a few minutes to follow it. 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.
|
|
24794
|
+
* @summary Get cache status
|
|
24795
|
+
* @param {string} username
|
|
24796
|
+
* @param {string} domain Domain name
|
|
24797
|
+
* @param {*} [options] Override http request option.
|
|
24798
|
+
* @throws {RequiredError}
|
|
24799
|
+
*/
|
|
24800
|
+
getCacheStatusV1: (username: string, domain: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
24801
|
+
/**
|
|
24802
|
+
* Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching. The change is applied in the background and can take a few minutes. Use `Get cache status` to check the current state.
|
|
24726
24803
|
* @summary Toggle cacheless mode
|
|
24727
24804
|
* @param {string} username
|
|
24728
24805
|
* @param {string} domain Domain name
|
|
@@ -24732,7 +24809,7 @@ export declare const HostingCacheApiAxiosParamCreator: (configuration?: Configur
|
|
|
24732
24809
|
*/
|
|
24733
24810
|
toggleCachelessModeV1: (username: string, domain: string, hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
24734
24811
|
/**
|
|
24735
|
-
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
|
|
24812
|
+
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state. Use `Get cache status` to check the current state.
|
|
24736
24813
|
* @summary Toggle website cache
|
|
24737
24814
|
* @param {string} username
|
|
24738
24815
|
* @param {string} domain Domain name
|
|
@@ -24758,7 +24835,16 @@ export declare const HostingCacheApiFp: (configuration?: Configuration) => {
|
|
|
24758
24835
|
*/
|
|
24759
24836
|
clearWebsiteCacheV1(username: string, domain: string, directory?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>>;
|
|
24760
24837
|
/**
|
|
24761
|
-
*
|
|
24838
|
+
* Returns the caching state of the website: whether server-side caching is enabled and whether development (cacheless) mode is on. Works for the main domain, addon websites, parked domains and subdomains of the account; each reports its own settings and does not inherit them from its parent website. `is_enabled` is the setting changed by `Toggle website cache` and reflects a toggle immediately. `is_cacheless_mode_enabled` is true while development mode is on; caching is then bypassed even when `is_enabled` is true. `Toggle cacheless mode` is applied in the background, so this flag can take a few minutes to follow it. 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.
|
|
24839
|
+
* @summary Get cache status
|
|
24840
|
+
* @param {string} username
|
|
24841
|
+
* @param {string} domain Domain name
|
|
24842
|
+
* @param {*} [options] Override http request option.
|
|
24843
|
+
* @throws {RequiredError}
|
|
24844
|
+
*/
|
|
24845
|
+
getCacheStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1CacheCacheStatusResource>>;
|
|
24846
|
+
/**
|
|
24847
|
+
* Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching. The change is applied in the background and can take a few minutes. Use `Get cache status` to check the current state.
|
|
24762
24848
|
* @summary Toggle cacheless mode
|
|
24763
24849
|
* @param {string} username
|
|
24764
24850
|
* @param {string} domain Domain name
|
|
@@ -24768,7 +24854,7 @@ export declare const HostingCacheApiFp: (configuration?: Configuration) => {
|
|
|
24768
24854
|
*/
|
|
24769
24855
|
toggleCachelessModeV1(username: string, domain: string, hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>>;
|
|
24770
24856
|
/**
|
|
24771
|
-
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
|
|
24857
|
+
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state. Use `Get cache status` to check the current state.
|
|
24772
24858
|
* @summary Toggle website cache
|
|
24773
24859
|
* @param {string} username
|
|
24774
24860
|
* @param {string} domain Domain name
|
|
@@ -24794,7 +24880,16 @@ export declare const HostingCacheApiFactory: (configuration?: Configuration, bas
|
|
|
24794
24880
|
*/
|
|
24795
24881
|
clearWebsiteCacheV1(username: string, domain: string, directory?: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource>;
|
|
24796
24882
|
/**
|
|
24797
|
-
*
|
|
24883
|
+
* Returns the caching state of the website: whether server-side caching is enabled and whether development (cacheless) mode is on. Works for the main domain, addon websites, parked domains and subdomains of the account; each reports its own settings and does not inherit them from its parent website. `is_enabled` is the setting changed by `Toggle website cache` and reflects a toggle immediately. `is_cacheless_mode_enabled` is true while development mode is on; caching is then bypassed even when `is_enabled` is true. `Toggle cacheless mode` is applied in the background, so this flag can take a few minutes to follow it. 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.
|
|
24884
|
+
* @summary Get cache status
|
|
24885
|
+
* @param {string} username
|
|
24886
|
+
* @param {string} domain Domain name
|
|
24887
|
+
* @param {*} [options] Override http request option.
|
|
24888
|
+
* @throws {RequiredError}
|
|
24889
|
+
*/
|
|
24890
|
+
getCacheStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1CacheCacheStatusResource>;
|
|
24891
|
+
/**
|
|
24892
|
+
* Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching. The change is applied in the background and can take a few minutes. Use `Get cache status` to check the current state.
|
|
24798
24893
|
* @summary Toggle cacheless mode
|
|
24799
24894
|
* @param {string} username
|
|
24800
24895
|
* @param {string} domain Domain name
|
|
@@ -24804,7 +24899,7 @@ export declare const HostingCacheApiFactory: (configuration?: Configuration, bas
|
|
|
24804
24899
|
*/
|
|
24805
24900
|
toggleCachelessModeV1(username: string, domain: string, hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource>;
|
|
24806
24901
|
/**
|
|
24807
|
-
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
|
|
24902
|
+
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state. Use `Get cache status` to check the current state.
|
|
24808
24903
|
* @summary Toggle website cache
|
|
24809
24904
|
* @param {string} username
|
|
24810
24905
|
* @param {string} domain Domain name
|
|
@@ -24833,7 +24928,17 @@ export declare class HostingCacheApi extends BaseAPI {
|
|
|
24833
24928
|
*/
|
|
24834
24929
|
clearWebsiteCacheV1(username: string, domain: string, directory?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CommonSuccessEmptyResource, any, {}, any>>;
|
|
24835
24930
|
/**
|
|
24836
|
-
*
|
|
24931
|
+
* Returns the caching state of the website: whether server-side caching is enabled and whether development (cacheless) mode is on. Works for the main domain, addon websites, parked domains and subdomains of the account; each reports its own settings and does not inherit them from its parent website. `is_enabled` is the setting changed by `Toggle website cache` and reflects a toggle immediately. `is_cacheless_mode_enabled` is true while development mode is on; caching is then bypassed even when `is_enabled` is true. `Toggle cacheless mode` is applied in the background, so this flag can take a few minutes to follow it. 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.
|
|
24932
|
+
* @summary Get cache status
|
|
24933
|
+
* @param {string} username
|
|
24934
|
+
* @param {string} domain Domain name
|
|
24935
|
+
* @param {*} [options] Override http request option.
|
|
24936
|
+
* @throws {RequiredError}
|
|
24937
|
+
* @memberof HostingCacheApi
|
|
24938
|
+
*/
|
|
24939
|
+
getCacheStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<HostingV1CacheCacheStatusResource, any, {}, any>>;
|
|
24940
|
+
/**
|
|
24941
|
+
* Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching. The change is applied in the background and can take a few minutes. Use `Get cache status` to check the current state.
|
|
24837
24942
|
* @summary Toggle cacheless mode
|
|
24838
24943
|
* @param {string} username
|
|
24839
24944
|
* @param {string} domain Domain name
|
|
@@ -24844,7 +24949,7 @@ export declare class HostingCacheApi extends BaseAPI {
|
|
|
24844
24949
|
*/
|
|
24845
24950
|
toggleCachelessModeV1(username: string, domain: string, hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CommonSuccessEmptyResource, any, {}, any>>;
|
|
24846
24951
|
/**
|
|
24847
|
-
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state.
|
|
24952
|
+
* Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead. Does nothing if caching is already in the requested state. Use `Get cache status` to check the current state.
|
|
24848
24953
|
* @summary Toggle website cache
|
|
24849
24954
|
* @param {string} username
|
|
24850
24955
|
* @param {string} domain Domain name
|