hostinger-api-sdk 1.4.0 → 1.5.1
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 +160 -195
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +96 -99
- package/dist/api.js +130 -189
- 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 +96 -99
- package/dist/esm/api.js +130 -189
- 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 +26 -130
- package/docs/HostingNodeJSApi.md +57 -0
- package/docs/HostingV1CacheToggleCacheRequest.md +20 -0
- package/docs/HostingV1CacheToggleCachelessModeRequest.md +20 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
## hostinger-api-sdk@1.
|
|
1
|
+
## hostinger-api-sdk@1.5.1
|
|
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-api-sdk@1.
|
|
8
|
+
npm install hostinger-api-sdk@1.5.1 --save
|
|
9
9
|
```
|
package/api.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.5.1
|
|
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
|
|
@@ -2479,6 +2479,32 @@ export interface HostingListWebsitesV1200Response {
|
|
|
2479
2479
|
*/
|
|
2480
2480
|
'meta': CommonSchemaPaginationMetaSchema;
|
|
2481
2481
|
}
|
|
2482
|
+
/**
|
|
2483
|
+
*
|
|
2484
|
+
* @export
|
|
2485
|
+
* @interface HostingV1CacheToggleCacheRequest
|
|
2486
|
+
*/
|
|
2487
|
+
export interface HostingV1CacheToggleCacheRequest {
|
|
2488
|
+
/**
|
|
2489
|
+
* Turn server-side caching on (true) or off (false) for the website.
|
|
2490
|
+
* @type {boolean}
|
|
2491
|
+
* @memberof HostingV1CacheToggleCacheRequest
|
|
2492
|
+
*/
|
|
2493
|
+
'enabled': boolean;
|
|
2494
|
+
}
|
|
2495
|
+
/**
|
|
2496
|
+
*
|
|
2497
|
+
* @export
|
|
2498
|
+
* @interface HostingV1CacheToggleCachelessModeRequest
|
|
2499
|
+
*/
|
|
2500
|
+
export interface HostingV1CacheToggleCachelessModeRequest {
|
|
2501
|
+
/**
|
|
2502
|
+
* Turn development (cacheless) mode on (true) or off (false) for the website.
|
|
2503
|
+
* @type {boolean}
|
|
2504
|
+
* @memberof HostingV1CacheToggleCachelessModeRequest
|
|
2505
|
+
*/
|
|
2506
|
+
'enabled': boolean;
|
|
2507
|
+
}
|
|
2482
2508
|
/**
|
|
2483
2509
|
*
|
|
2484
2510
|
* @export
|
|
@@ -10974,19 +11000,22 @@ export const HostingCacheApiAxiosParamCreator = function (configuration?: Config
|
|
|
10974
11000
|
};
|
|
10975
11001
|
},
|
|
10976
11002
|
/**
|
|
10977
|
-
* Turns
|
|
10978
|
-
* @summary
|
|
11003
|
+
* 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.
|
|
11004
|
+
* @summary Toggle cacheless mode
|
|
10979
11005
|
* @param {string} username
|
|
10980
11006
|
* @param {string} domain Domain name
|
|
11007
|
+
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
10981
11008
|
* @param {*} [options] Override http request option.
|
|
10982
11009
|
* @throws {RequiredError}
|
|
10983
11010
|
*/
|
|
10984
|
-
|
|
11011
|
+
toggleCachelessModeV1: async (username: string, domain: string, hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
10985
11012
|
// verify required parameter 'username' is not null or undefined
|
|
10986
|
-
assertParamExists('
|
|
11013
|
+
assertParamExists('toggleCachelessModeV1', 'username', username)
|
|
10987
11014
|
// verify required parameter 'domain' is not null or undefined
|
|
10988
|
-
assertParamExists('
|
|
10989
|
-
|
|
11015
|
+
assertParamExists('toggleCachelessModeV1', 'domain', domain)
|
|
11016
|
+
// verify required parameter 'hostingV1CacheToggleCachelessModeRequest' is not null or undefined
|
|
11017
|
+
assertParamExists('toggleCachelessModeV1', 'hostingV1CacheToggleCachelessModeRequest', hostingV1CacheToggleCachelessModeRequest)
|
|
11018
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cacheless-mode/toggle`
|
|
10990
11019
|
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
10991
11020
|
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
10992
11021
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -11006,51 +11035,12 @@ export const HostingCacheApiAxiosParamCreator = function (configuration?: Config
|
|
|
11006
11035
|
|
|
11007
11036
|
|
|
11008
11037
|
|
|
11009
|
-
|
|
11010
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
11011
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
11012
|
-
|
|
11013
|
-
return {
|
|
11014
|
-
url: toPathString(localVarUrlObj),
|
|
11015
|
-
options: localVarRequestOptions,
|
|
11016
|
-
};
|
|
11017
|
-
},
|
|
11018
|
-
/**
|
|
11019
|
-
* Turns off server-side caching for the website until it is enabled again. May impact performance. Use it when experiencing cache-related issues; to temporarily bypass caching while developing or debugging, prefer enabling cacheless mode instead. Does nothing if caching is already disabled.
|
|
11020
|
-
* @summary Disable website cache
|
|
11021
|
-
* @param {string} username
|
|
11022
|
-
* @param {string} domain Domain name
|
|
11023
|
-
* @param {*} [options] Override http request option.
|
|
11024
|
-
* @throws {RequiredError}
|
|
11025
|
-
*/
|
|
11026
|
-
disableWebsiteCacheV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
11027
|
-
// verify required parameter 'username' is not null or undefined
|
|
11028
|
-
assertParamExists('disableWebsiteCacheV1', 'username', username)
|
|
11029
|
-
// verify required parameter 'domain' is not null or undefined
|
|
11030
|
-
assertParamExists('disableWebsiteCacheV1', 'domain', domain)
|
|
11031
|
-
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cache/disable`
|
|
11032
|
-
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
11033
|
-
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
11034
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
11035
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
11036
|
-
let baseOptions;
|
|
11037
|
-
if (configuration) {
|
|
11038
|
-
baseOptions = configuration.baseOptions;
|
|
11039
|
-
}
|
|
11040
|
-
|
|
11041
|
-
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
11042
|
-
const localVarHeaderParameter = {} as any;
|
|
11043
|
-
const localVarQueryParameter = {} as any;
|
|
11044
|
-
|
|
11045
|
-
// authentication apiToken required
|
|
11046
|
-
// http bearer authentication required
|
|
11047
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
11048
|
-
|
|
11038
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
11049
11039
|
|
|
11050
|
-
|
|
11051
11040
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
11052
11041
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
11053
11042
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
11043
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1CacheToggleCachelessModeRequest, localVarRequestOptions, configuration)
|
|
11054
11044
|
|
|
11055
11045
|
return {
|
|
11056
11046
|
url: toPathString(localVarUrlObj),
|
|
@@ -11058,19 +11048,22 @@ export const HostingCacheApiAxiosParamCreator = function (configuration?: Config
|
|
|
11058
11048
|
};
|
|
11059
11049
|
},
|
|
11060
11050
|
/**
|
|
11061
|
-
*
|
|
11062
|
-
* @summary
|
|
11051
|
+
* 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.
|
|
11052
|
+
* @summary Toggle website cache
|
|
11063
11053
|
* @param {string} username
|
|
11064
11054
|
* @param {string} domain Domain name
|
|
11055
|
+
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
11065
11056
|
* @param {*} [options] Override http request option.
|
|
11066
11057
|
* @throws {RequiredError}
|
|
11067
11058
|
*/
|
|
11068
|
-
|
|
11059
|
+
toggleWebsiteCacheV1: async (username: string, domain: string, hostingV1CacheToggleCacheRequest: HostingV1CacheToggleCacheRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
11069
11060
|
// verify required parameter 'username' is not null or undefined
|
|
11070
|
-
assertParamExists('
|
|
11061
|
+
assertParamExists('toggleWebsiteCacheV1', 'username', username)
|
|
11071
11062
|
// verify required parameter 'domain' is not null or undefined
|
|
11072
|
-
assertParamExists('
|
|
11073
|
-
|
|
11063
|
+
assertParamExists('toggleWebsiteCacheV1', 'domain', domain)
|
|
11064
|
+
// verify required parameter 'hostingV1CacheToggleCacheRequest' is not null or undefined
|
|
11065
|
+
assertParamExists('toggleWebsiteCacheV1', 'hostingV1CacheToggleCacheRequest', hostingV1CacheToggleCacheRequest)
|
|
11066
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cache/toggle`
|
|
11074
11067
|
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
11075
11068
|
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
11076
11069
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -11090,51 +11083,12 @@ export const HostingCacheApiAxiosParamCreator = function (configuration?: Config
|
|
|
11090
11083
|
|
|
11091
11084
|
|
|
11092
11085
|
|
|
11093
|
-
|
|
11094
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
11095
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
11096
|
-
|
|
11097
|
-
return {
|
|
11098
|
-
url: toPathString(localVarUrlObj),
|
|
11099
|
-
options: localVarRequestOptions,
|
|
11100
|
-
};
|
|
11101
|
-
},
|
|
11102
|
-
/**
|
|
11103
|
-
* Turns on server-side caching for the website for better performance. Use it for faster page loads, reduced server load, or improved user experience. Recommended for production websites. Does nothing if caching is already enabled.
|
|
11104
|
-
* @summary Enable website cache
|
|
11105
|
-
* @param {string} username
|
|
11106
|
-
* @param {string} domain Domain name
|
|
11107
|
-
* @param {*} [options] Override http request option.
|
|
11108
|
-
* @throws {RequiredError}
|
|
11109
|
-
*/
|
|
11110
|
-
enableWebsiteCacheV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
11111
|
-
// verify required parameter 'username' is not null or undefined
|
|
11112
|
-
assertParamExists('enableWebsiteCacheV1', 'username', username)
|
|
11113
|
-
// verify required parameter 'domain' is not null or undefined
|
|
11114
|
-
assertParamExists('enableWebsiteCacheV1', 'domain', domain)
|
|
11115
|
-
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/cache/enable`
|
|
11116
|
-
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
11117
|
-
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
11118
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
11119
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
11120
|
-
let baseOptions;
|
|
11121
|
-
if (configuration) {
|
|
11122
|
-
baseOptions = configuration.baseOptions;
|
|
11123
|
-
}
|
|
11124
|
-
|
|
11125
|
-
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
11126
|
-
const localVarHeaderParameter = {} as any;
|
|
11127
|
-
const localVarQueryParameter = {} as any;
|
|
11128
|
-
|
|
11129
|
-
// authentication apiToken required
|
|
11130
|
-
// http bearer authentication required
|
|
11131
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
11132
|
-
|
|
11086
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
11133
11087
|
|
|
11134
|
-
|
|
11135
11088
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
11136
11089
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
11137
11090
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
11091
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1CacheToggleCacheRequest, localVarRequestOptions, configuration)
|
|
11138
11092
|
|
|
11139
11093
|
return {
|
|
11140
11094
|
url: toPathString(localVarUrlObj),
|
|
@@ -11166,55 +11120,31 @@ export const HostingCacheApiFp = function(configuration?: Configuration) {
|
|
|
11166
11120
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
11167
11121
|
},
|
|
11168
11122
|
/**
|
|
11169
|
-
* Turns
|
|
11170
|
-
* @summary
|
|
11171
|
-
* @param {string} username
|
|
11172
|
-
* @param {string} domain Domain name
|
|
11173
|
-
* @param {*} [options] Override http request option.
|
|
11174
|
-
* @throws {RequiredError}
|
|
11175
|
-
*/
|
|
11176
|
-
async disableCachelessModeV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
11177
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.disableCachelessModeV1(username, domain, options);
|
|
11178
|
-
const localVarOperationServerBasePath = operationServerMap['HostingCacheApi.disableCachelessModeV1']?.[0]?.url;
|
|
11179
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
11180
|
-
},
|
|
11181
|
-
/**
|
|
11182
|
-
* Turns off server-side caching for the website until it is enabled again. May impact performance. Use it when experiencing cache-related issues; to temporarily bypass caching while developing or debugging, prefer enabling cacheless mode instead. Does nothing if caching is already disabled.
|
|
11183
|
-
* @summary Disable website cache
|
|
11184
|
-
* @param {string} username
|
|
11185
|
-
* @param {string} domain Domain name
|
|
11186
|
-
* @param {*} [options] Override http request option.
|
|
11187
|
-
* @throws {RequiredError}
|
|
11188
|
-
*/
|
|
11189
|
-
async disableWebsiteCacheV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
11190
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.disableWebsiteCacheV1(username, domain, options);
|
|
11191
|
-
const localVarOperationServerBasePath = operationServerMap['HostingCacheApi.disableWebsiteCacheV1']?.[0]?.url;
|
|
11192
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
11193
|
-
},
|
|
11194
|
-
/**
|
|
11195
|
-
* Enables development (cacheless) mode where nothing is cached, effectively turning off all caching for the website. Use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable cacheless mode afterwards to restore normal caching.
|
|
11196
|
-
* @summary Enable cacheless mode
|
|
11123
|
+
* 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.
|
|
11124
|
+
* @summary Toggle cacheless mode
|
|
11197
11125
|
* @param {string} username
|
|
11198
11126
|
* @param {string} domain Domain name
|
|
11127
|
+
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
11199
11128
|
* @param {*} [options] Override http request option.
|
|
11200
11129
|
* @throws {RequiredError}
|
|
11201
11130
|
*/
|
|
11202
|
-
async
|
|
11203
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
11204
|
-
const localVarOperationServerBasePath = operationServerMap['HostingCacheApi.
|
|
11131
|
+
async toggleCachelessModeV1(username: string, domain: string, hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
11132
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options);
|
|
11133
|
+
const localVarOperationServerBasePath = operationServerMap['HostingCacheApi.toggleCachelessModeV1']?.[0]?.url;
|
|
11205
11134
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
11206
11135
|
},
|
|
11207
11136
|
/**
|
|
11208
|
-
* Turns
|
|
11209
|
-
* @summary
|
|
11137
|
+
* 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.
|
|
11138
|
+
* @summary Toggle website cache
|
|
11210
11139
|
* @param {string} username
|
|
11211
11140
|
* @param {string} domain Domain name
|
|
11141
|
+
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
11212
11142
|
* @param {*} [options] Override http request option.
|
|
11213
11143
|
* @throws {RequiredError}
|
|
11214
11144
|
*/
|
|
11215
|
-
async
|
|
11216
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
11217
|
-
const localVarOperationServerBasePath = operationServerMap['HostingCacheApi.
|
|
11145
|
+
async toggleWebsiteCacheV1(username: string, domain: string, hostingV1CacheToggleCacheRequest: HostingV1CacheToggleCacheRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
11146
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options);
|
|
11147
|
+
const localVarOperationServerBasePath = operationServerMap['HostingCacheApi.toggleWebsiteCacheV1']?.[0]?.url;
|
|
11218
11148
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
11219
11149
|
},
|
|
11220
11150
|
}
|
|
@@ -11240,48 +11170,28 @@ export const HostingCacheApiFactory = function (configuration?: Configuration, b
|
|
|
11240
11170
|
return localVarFp.clearWebsiteCacheV1(username, domain, directory, options).then((request) => request(axios, basePath));
|
|
11241
11171
|
},
|
|
11242
11172
|
/**
|
|
11243
|
-
* Turns
|
|
11244
|
-
* @summary
|
|
11173
|
+
* 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.
|
|
11174
|
+
* @summary Toggle cacheless mode
|
|
11245
11175
|
* @param {string} username
|
|
11246
11176
|
* @param {string} domain Domain name
|
|
11177
|
+
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
11247
11178
|
* @param {*} [options] Override http request option.
|
|
11248
11179
|
* @throws {RequiredError}
|
|
11249
11180
|
*/
|
|
11250
|
-
|
|
11251
|
-
return localVarFp.
|
|
11181
|
+
toggleCachelessModeV1(username: string, domain: string, hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
11182
|
+
return localVarFp.toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options).then((request) => request(axios, basePath));
|
|
11252
11183
|
},
|
|
11253
11184
|
/**
|
|
11254
|
-
* Turns
|
|
11255
|
-
* @summary
|
|
11185
|
+
* 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.
|
|
11186
|
+
* @summary Toggle website cache
|
|
11256
11187
|
* @param {string} username
|
|
11257
11188
|
* @param {string} domain Domain name
|
|
11189
|
+
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
11258
11190
|
* @param {*} [options] Override http request option.
|
|
11259
11191
|
* @throws {RequiredError}
|
|
11260
11192
|
*/
|
|
11261
|
-
|
|
11262
|
-
return localVarFp.
|
|
11263
|
-
},
|
|
11264
|
-
/**
|
|
11265
|
-
* Enables development (cacheless) mode where nothing is cached, effectively turning off all caching for the website. Use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable cacheless mode afterwards to restore normal caching.
|
|
11266
|
-
* @summary Enable cacheless mode
|
|
11267
|
-
* @param {string} username
|
|
11268
|
-
* @param {string} domain Domain name
|
|
11269
|
-
* @param {*} [options] Override http request option.
|
|
11270
|
-
* @throws {RequiredError}
|
|
11271
|
-
*/
|
|
11272
|
-
enableCachelessModeV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
11273
|
-
return localVarFp.enableCachelessModeV1(username, domain, options).then((request) => request(axios, basePath));
|
|
11274
|
-
},
|
|
11275
|
-
/**
|
|
11276
|
-
* Turns on server-side caching for the website for better performance. Use it for faster page loads, reduced server load, or improved user experience. Recommended for production websites. Does nothing if caching is already enabled.
|
|
11277
|
-
* @summary Enable website cache
|
|
11278
|
-
* @param {string} username
|
|
11279
|
-
* @param {string} domain Domain name
|
|
11280
|
-
* @param {*} [options] Override http request option.
|
|
11281
|
-
* @throws {RequiredError}
|
|
11282
|
-
*/
|
|
11283
|
-
enableWebsiteCacheV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
11284
|
-
return localVarFp.enableWebsiteCacheV1(username, domain, options).then((request) => request(axios, basePath));
|
|
11193
|
+
toggleWebsiteCacheV1(username: string, domain: string, hostingV1CacheToggleCacheRequest: HostingV1CacheToggleCacheRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
11194
|
+
return localVarFp.toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options).then((request) => request(axios, basePath));
|
|
11285
11195
|
},
|
|
11286
11196
|
};
|
|
11287
11197
|
};
|
|
@@ -11308,55 +11218,31 @@ export class HostingCacheApi extends BaseAPI {
|
|
|
11308
11218
|
}
|
|
11309
11219
|
|
|
11310
11220
|
/**
|
|
11311
|
-
* Turns
|
|
11312
|
-
* @summary
|
|
11313
|
-
* @param {string} username
|
|
11314
|
-
* @param {string} domain Domain name
|
|
11315
|
-
* @param {*} [options] Override http request option.
|
|
11316
|
-
* @throws {RequiredError}
|
|
11317
|
-
* @memberof HostingCacheApi
|
|
11318
|
-
*/
|
|
11319
|
-
public disableCachelessModeV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
11320
|
-
return HostingCacheApiFp(this.configuration).disableCachelessModeV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
11321
|
-
}
|
|
11322
|
-
|
|
11323
|
-
/**
|
|
11324
|
-
* Turns off server-side caching for the website until it is enabled again. May impact performance. Use it when experiencing cache-related issues; to temporarily bypass caching while developing or debugging, prefer enabling cacheless mode instead. Does nothing if caching is already disabled.
|
|
11325
|
-
* @summary Disable website cache
|
|
11221
|
+
* 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.
|
|
11222
|
+
* @summary Toggle cacheless mode
|
|
11326
11223
|
* @param {string} username
|
|
11327
11224
|
* @param {string} domain Domain name
|
|
11225
|
+
* @param {HostingV1CacheToggleCachelessModeRequest} hostingV1CacheToggleCachelessModeRequest
|
|
11328
11226
|
* @param {*} [options] Override http request option.
|
|
11329
11227
|
* @throws {RequiredError}
|
|
11330
11228
|
* @memberof HostingCacheApi
|
|
11331
11229
|
*/
|
|
11332
|
-
public
|
|
11333
|
-
return HostingCacheApiFp(this.configuration).
|
|
11230
|
+
public toggleCachelessModeV1(username: string, domain: string, hostingV1CacheToggleCachelessModeRequest: HostingV1CacheToggleCachelessModeRequest, options?: RawAxiosRequestConfig) {
|
|
11231
|
+
return HostingCacheApiFp(this.configuration).toggleCachelessModeV1(username, domain, hostingV1CacheToggleCachelessModeRequest, options).then((request) => request(this.axios, this.basePath));
|
|
11334
11232
|
}
|
|
11335
11233
|
|
|
11336
11234
|
/**
|
|
11337
|
-
*
|
|
11338
|
-
* @summary
|
|
11235
|
+
* 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.
|
|
11236
|
+
* @summary Toggle website cache
|
|
11339
11237
|
* @param {string} username
|
|
11340
11238
|
* @param {string} domain Domain name
|
|
11239
|
+
* @param {HostingV1CacheToggleCacheRequest} hostingV1CacheToggleCacheRequest
|
|
11341
11240
|
* @param {*} [options] Override http request option.
|
|
11342
11241
|
* @throws {RequiredError}
|
|
11343
11242
|
* @memberof HostingCacheApi
|
|
11344
11243
|
*/
|
|
11345
|
-
public
|
|
11346
|
-
return HostingCacheApiFp(this.configuration).
|
|
11347
|
-
}
|
|
11348
|
-
|
|
11349
|
-
/**
|
|
11350
|
-
* Turns on server-side caching for the website for better performance. Use it for faster page loads, reduced server load, or improved user experience. Recommended for production websites. Does nothing if caching is already enabled.
|
|
11351
|
-
* @summary Enable website cache
|
|
11352
|
-
* @param {string} username
|
|
11353
|
-
* @param {string} domain Domain name
|
|
11354
|
-
* @param {*} [options] Override http request option.
|
|
11355
|
-
* @throws {RequiredError}
|
|
11356
|
-
* @memberof HostingCacheApi
|
|
11357
|
-
*/
|
|
11358
|
-
public enableWebsiteCacheV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
11359
|
-
return HostingCacheApiFp(this.configuration).enableWebsiteCacheV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
11244
|
+
public toggleWebsiteCacheV1(username: string, domain: string, hostingV1CacheToggleCacheRequest: HostingV1CacheToggleCacheRequest, options?: RawAxiosRequestConfig) {
|
|
11245
|
+
return HostingCacheApiFp(this.configuration).toggleWebsiteCacheV1(username, domain, hostingV1CacheToggleCacheRequest, options).then((request) => request(this.axios, this.basePath));
|
|
11360
11246
|
}
|
|
11361
11247
|
}
|
|
11362
11248
|
|
|
@@ -13477,6 +13363,48 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Confi
|
|
|
13477
13363
|
|
|
13478
13364
|
|
|
13479
13365
|
|
|
13366
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
13367
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
13368
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
13369
|
+
|
|
13370
|
+
return {
|
|
13371
|
+
url: toPathString(localVarUrlObj),
|
|
13372
|
+
options: localVarRequestOptions,
|
|
13373
|
+
};
|
|
13374
|
+
},
|
|
13375
|
+
/**
|
|
13376
|
+
* Restarts the Node.js server process for the website. Does not rebuild or redeploy the application. Use it to apply environment or configuration changes, or to recover a hung application. Only applicable to server-side applications (Express, Next.js, NestJS, etc.). Static front-end apps (React, Vue, Vite) have no persistent server process, so restarting them has no effect. Returns success even when the website has no server process to restart.
|
|
13377
|
+
* @summary Restart Node.js application
|
|
13378
|
+
* @param {string} username
|
|
13379
|
+
* @param {string} domain Domain name
|
|
13380
|
+
* @param {*} [options] Override http request option.
|
|
13381
|
+
* @throws {RequiredError}
|
|
13382
|
+
*/
|
|
13383
|
+
restartNodeJsApplicationV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
13384
|
+
// verify required parameter 'username' is not null or undefined
|
|
13385
|
+
assertParamExists('restartNodeJsApplicationV1', 'username', username)
|
|
13386
|
+
// verify required parameter 'domain' is not null or undefined
|
|
13387
|
+
assertParamExists('restartNodeJsApplicationV1', 'domain', domain)
|
|
13388
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/server/restart`
|
|
13389
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
13390
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
13391
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
13392
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
13393
|
+
let baseOptions;
|
|
13394
|
+
if (configuration) {
|
|
13395
|
+
baseOptions = configuration.baseOptions;
|
|
13396
|
+
}
|
|
13397
|
+
|
|
13398
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
13399
|
+
const localVarHeaderParameter = {} as any;
|
|
13400
|
+
const localVarQueryParameter = {} as any;
|
|
13401
|
+
|
|
13402
|
+
// authentication apiToken required
|
|
13403
|
+
// http bearer authentication required
|
|
13404
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
13405
|
+
|
|
13406
|
+
|
|
13407
|
+
|
|
13480
13408
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
13481
13409
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
13482
13410
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -13541,6 +13469,19 @@ export const HostingNodeJSApiFp = function(configuration?: Configuration) {
|
|
|
13541
13469
|
const localVarOperationServerBasePath = operationServerMap['HostingNodeJSApi.listNodeJSBuildsV1']?.[0]?.url;
|
|
13542
13470
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
13543
13471
|
},
|
|
13472
|
+
/**
|
|
13473
|
+
* Restarts the Node.js server process for the website. Does not rebuild or redeploy the application. Use it to apply environment or configuration changes, or to recover a hung application. Only applicable to server-side applications (Express, Next.js, NestJS, etc.). Static front-end apps (React, Vue, Vite) have no persistent server process, so restarting them has no effect. Returns success even when the website has no server process to restart.
|
|
13474
|
+
* @summary Restart Node.js application
|
|
13475
|
+
* @param {string} username
|
|
13476
|
+
* @param {string} domain Domain name
|
|
13477
|
+
* @param {*} [options] Override http request option.
|
|
13478
|
+
* @throws {RequiredError}
|
|
13479
|
+
*/
|
|
13480
|
+
async restartNodeJsApplicationV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
13481
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.restartNodeJsApplicationV1(username, domain, options);
|
|
13482
|
+
const localVarOperationServerBasePath = operationServerMap['HostingNodeJSApi.restartNodeJsApplicationV1']?.[0]?.url;
|
|
13483
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
13484
|
+
},
|
|
13544
13485
|
}
|
|
13545
13486
|
};
|
|
13546
13487
|
|
|
@@ -13590,6 +13531,17 @@ export const HostingNodeJSApiFactory = function (configuration?: Configuration,
|
|
|
13590
13531
|
listNodeJSBuildsV1(username: string, domain: string, page?: number, perPage?: number, states?: Array<ListNodeJSBuildsV1StatesEnum>, options?: RawAxiosRequestConfig): AxiosPromise<HostingListNodeJSBuildsV1200Response> {
|
|
13591
13532
|
return localVarFp.listNodeJSBuildsV1(username, domain, page, perPage, states, options).then((request) => request(axios, basePath));
|
|
13592
13533
|
},
|
|
13534
|
+
/**
|
|
13535
|
+
* Restarts the Node.js server process for the website. Does not rebuild or redeploy the application. Use it to apply environment or configuration changes, or to recover a hung application. Only applicable to server-side applications (Express, Next.js, NestJS, etc.). Static front-end apps (React, Vue, Vite) have no persistent server process, so restarting them has no effect. Returns success even when the website has no server process to restart.
|
|
13536
|
+
* @summary Restart Node.js application
|
|
13537
|
+
* @param {string} username
|
|
13538
|
+
* @param {string} domain Domain name
|
|
13539
|
+
* @param {*} [options] Override http request option.
|
|
13540
|
+
* @throws {RequiredError}
|
|
13541
|
+
*/
|
|
13542
|
+
restartNodeJsApplicationV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
13543
|
+
return localVarFp.restartNodeJsApplicationV1(username, domain, options).then((request) => request(axios, basePath));
|
|
13544
|
+
},
|
|
13593
13545
|
};
|
|
13594
13546
|
};
|
|
13595
13547
|
|
|
@@ -13644,6 +13596,19 @@ export class HostingNodeJSApi extends BaseAPI {
|
|
|
13644
13596
|
public listNodeJSBuildsV1(username: string, domain: string, page?: number, perPage?: number, states?: Array<ListNodeJSBuildsV1StatesEnum>, options?: RawAxiosRequestConfig) {
|
|
13645
13597
|
return HostingNodeJSApiFp(this.configuration).listNodeJSBuildsV1(username, domain, page, perPage, states, options).then((request) => request(this.axios, this.basePath));
|
|
13646
13598
|
}
|
|
13599
|
+
|
|
13600
|
+
/**
|
|
13601
|
+
* Restarts the Node.js server process for the website. Does not rebuild or redeploy the application. Use it to apply environment or configuration changes, or to recover a hung application. Only applicable to server-side applications (Express, Next.js, NestJS, etc.). Static front-end apps (React, Vue, Vite) have no persistent server process, so restarting them has no effect. Returns success even when the website has no server process to restart.
|
|
13602
|
+
* @summary Restart Node.js application
|
|
13603
|
+
* @param {string} username
|
|
13604
|
+
* @param {string} domain Domain name
|
|
13605
|
+
* @param {*} [options] Override http request option.
|
|
13606
|
+
* @throws {RequiredError}
|
|
13607
|
+
* @memberof HostingNodeJSApi
|
|
13608
|
+
*/
|
|
13609
|
+
public restartNodeJsApplicationV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
13610
|
+
return HostingNodeJSApiFp(this.configuration).restartNodeJsApplicationV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
13611
|
+
}
|
|
13647
13612
|
}
|
|
13648
13613
|
|
|
13649
13614
|
/**
|
package/base.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.5.1
|
|
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: 1.
|
|
6
|
+
* API Version: 1.5.1
|
|
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: 1.
|
|
6
|
+
* API Version: 1.5.1
|
|
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/1.
|
|
51
|
+
'User-Agent': "hostinger-typescript-sdk/1.5.1",
|
|
52
52
|
...param.baseOptions?.headers,
|
|
53
53
|
},
|
|
54
54
|
};
|