hostinger-api-sdk 1.42.0 → 1.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/api.ts +219 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +130 -1
- package/dist/api.js +159 -1
- 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 +130 -1
- package/dist/esm/api.js +159 -1
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/HostingNodeJSApi.md +119 -0
- package/docs/HostingV1NodeJsEnvVarResource.md +22 -0
- package/docs/HostingV1NodeJsSetBuildEnvVarsRequest.md +20 -0
- package/docs/HostingV1NodeJsSetBuildEnvVarsRequestEnvVarsInner.md +22 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/esm/api.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.44.0
|
|
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
|
|
@@ -13993,6 +13993,42 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration) {
|
|
|
13993
13993
|
options: localVarRequestOptions,
|
|
13994
13994
|
};
|
|
13995
13995
|
}),
|
|
13996
|
+
/**
|
|
13997
|
+
* Lists the Node.js environment variables currently set for the website. Values are always masked as `********` and cannot be read back through this API. Use this endpoint to see which keys are configured or to verify a change, not to read values. To change variables, use the `Replace Node.js environment variables` endpoint. It replaces the whole set, so never copy the masked values from this response into that request; send the full desired set with real values taken from the project `.env` file or the user prompt instead.
|
|
13998
|
+
* @summary List Node.js environment variables
|
|
13999
|
+
* @param {string} username
|
|
14000
|
+
* @param {string} domain Domain name
|
|
14001
|
+
* @param {*} [options] Override http request option.
|
|
14002
|
+
* @throws {RequiredError}
|
|
14003
|
+
*/
|
|
14004
|
+
listNodeJsEnvironmentVariablesV1: (username_1, domain_1, ...args_1) => __awaiter(this, [username_1, domain_1, ...args_1], void 0, function* (username, domain, options = {}) {
|
|
14005
|
+
// verify required parameter 'username' is not null or undefined
|
|
14006
|
+
assertParamExists('listNodeJsEnvironmentVariablesV1', 'username', username);
|
|
14007
|
+
// verify required parameter 'domain' is not null or undefined
|
|
14008
|
+
assertParamExists('listNodeJsEnvironmentVariablesV1', 'domain', domain);
|
|
14009
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/env`
|
|
14010
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
14011
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
14012
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
14013
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
14014
|
+
let baseOptions;
|
|
14015
|
+
if (configuration) {
|
|
14016
|
+
baseOptions = configuration.baseOptions;
|
|
14017
|
+
}
|
|
14018
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
14019
|
+
const localVarHeaderParameter = {};
|
|
14020
|
+
const localVarQueryParameter = {};
|
|
14021
|
+
// authentication apiToken required
|
|
14022
|
+
// http bearer authentication required
|
|
14023
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
14024
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
14025
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
14026
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
14027
|
+
return {
|
|
14028
|
+
url: toPathString(localVarUrlObj),
|
|
14029
|
+
options: localVarRequestOptions,
|
|
14030
|
+
};
|
|
14031
|
+
}),
|
|
13996
14032
|
/**
|
|
13997
14033
|
* Lists known npm package vulnerabilities detected on a Node.js website, enriched with advisory metadata (severity, CVSS score, CVE, advisory URL). Results are sorted from the most severe to the least severe, then by publish date (newest first). Use the `severities` query parameter to filter. Vulnerabilities with `is_patchable` set to `true` can be auto-fixed via the `Patch Node.js Vulnerabilities` endpoint, which opens a GitHub pull request with updated package versions. Auto-fix is only available for websites deployed from a connected GitHub repository. Vulnerabilities with `is_patching_in_progress` set to `true` are already included in an open patch pull request; while any patch pull request is open, new patch requests for this website are rejected until it is merged or closed. Data comes from periodic dependency scans, so it may lag behind the latest deployment. An empty list means the most recent scan found no vulnerabilities; it does not guarantee the current deployment is vulnerability-free. Available on Business and Cloud Hosting plans.
|
|
13998
14034
|
* @summary List Node.js vulnerabilities
|
|
@@ -14074,6 +14110,47 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration) {
|
|
|
14074
14110
|
options: localVarRequestOptions,
|
|
14075
14111
|
};
|
|
14076
14112
|
}),
|
|
14113
|
+
/**
|
|
14114
|
+
* Replaces the website\'s Node.js environment variables with the ones provided. This is a full replace: any variable not in the request is deleted, and sending an empty `env_vars` array deletes every variable. Saving writes the values and restarts the running Node.js process. A restart is enough for apps that read environment variables at process start, such as Express or NestJS. It is not enough for frameworks that bake variables into the build. Next.js standalone is one of those: build-time values (including `NEXT_PUBLIC_*`) need a fresh build. After this call, use the `Start Node.js build` endpoint so those apps pick up the new values. The `List Node.js environment variables` endpoint returns masked values (`********`), so never copy values from it into this request. Always send the full desired set with real values taken from the project `.env` file or the user prompt.
|
|
14115
|
+
* @summary Replace Node.js environment variables
|
|
14116
|
+
* @param {string} username
|
|
14117
|
+
* @param {string} domain Domain name
|
|
14118
|
+
* @param {HostingV1NodeJsSetBuildEnvVarsRequest} hostingV1NodeJsSetBuildEnvVarsRequest
|
|
14119
|
+
* @param {*} [options] Override http request option.
|
|
14120
|
+
* @throws {RequiredError}
|
|
14121
|
+
*/
|
|
14122
|
+
replaceNodeJsEnvironmentVariablesV1: (username_1, domain_1, hostingV1NodeJsSetBuildEnvVarsRequest_1, ...args_1) => __awaiter(this, [username_1, domain_1, hostingV1NodeJsSetBuildEnvVarsRequest_1, ...args_1], void 0, function* (username, domain, hostingV1NodeJsSetBuildEnvVarsRequest, options = {}) {
|
|
14123
|
+
// verify required parameter 'username' is not null or undefined
|
|
14124
|
+
assertParamExists('replaceNodeJsEnvironmentVariablesV1', 'username', username);
|
|
14125
|
+
// verify required parameter 'domain' is not null or undefined
|
|
14126
|
+
assertParamExists('replaceNodeJsEnvironmentVariablesV1', 'domain', domain);
|
|
14127
|
+
// verify required parameter 'hostingV1NodeJsSetBuildEnvVarsRequest' is not null or undefined
|
|
14128
|
+
assertParamExists('replaceNodeJsEnvironmentVariablesV1', 'hostingV1NodeJsSetBuildEnvVarsRequest', hostingV1NodeJsSetBuildEnvVarsRequest);
|
|
14129
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/env`
|
|
14130
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
14131
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
14132
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
14133
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
14134
|
+
let baseOptions;
|
|
14135
|
+
if (configuration) {
|
|
14136
|
+
baseOptions = configuration.baseOptions;
|
|
14137
|
+
}
|
|
14138
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
14139
|
+
const localVarHeaderParameter = {};
|
|
14140
|
+
const localVarQueryParameter = {};
|
|
14141
|
+
// authentication apiToken required
|
|
14142
|
+
// http bearer authentication required
|
|
14143
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
14144
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
14145
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
14146
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
14147
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
14148
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1NodeJsSetBuildEnvVarsRequest, localVarRequestOptions, configuration);
|
|
14149
|
+
return {
|
|
14150
|
+
url: toPathString(localVarUrlObj),
|
|
14151
|
+
options: localVarRequestOptions,
|
|
14152
|
+
};
|
|
14153
|
+
}),
|
|
14077
14154
|
/**
|
|
14078
14155
|
* 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.
|
|
14079
14156
|
* @summary Restart Node.js application
|
|
@@ -14214,6 +14291,22 @@ export const HostingNodeJSApiFp = function (configuration) {
|
|
|
14214
14291
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
14215
14292
|
});
|
|
14216
14293
|
},
|
|
14294
|
+
/**
|
|
14295
|
+
* Lists the Node.js environment variables currently set for the website. Values are always masked as `********` and cannot be read back through this API. Use this endpoint to see which keys are configured or to verify a change, not to read values. To change variables, use the `Replace Node.js environment variables` endpoint. It replaces the whole set, so never copy the masked values from this response into that request; send the full desired set with real values taken from the project `.env` file or the user prompt instead.
|
|
14296
|
+
* @summary List Node.js environment variables
|
|
14297
|
+
* @param {string} username
|
|
14298
|
+
* @param {string} domain Domain name
|
|
14299
|
+
* @param {*} [options] Override http request option.
|
|
14300
|
+
* @throws {RequiredError}
|
|
14301
|
+
*/
|
|
14302
|
+
listNodeJsEnvironmentVariablesV1(username, domain, options) {
|
|
14303
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14304
|
+
var _a, _b;
|
|
14305
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listNodeJsEnvironmentVariablesV1(username, domain, options);
|
|
14306
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingNodeJSApi.listNodeJsEnvironmentVariablesV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
14307
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
14308
|
+
});
|
|
14309
|
+
},
|
|
14217
14310
|
/**
|
|
14218
14311
|
* Lists known npm package vulnerabilities detected on a Node.js website, enriched with advisory metadata (severity, CVSS score, CVE, advisory URL). Results are sorted from the most severe to the least severe, then by publish date (newest first). Use the `severities` query parameter to filter. Vulnerabilities with `is_patchable` set to `true` can be auto-fixed via the `Patch Node.js Vulnerabilities` endpoint, which opens a GitHub pull request with updated package versions. Auto-fix is only available for websites deployed from a connected GitHub repository. Vulnerabilities with `is_patching_in_progress` set to `true` are already included in an open patch pull request; while any patch pull request is open, new patch requests for this website are rejected until it is merged or closed. Data comes from periodic dependency scans, so it may lag behind the latest deployment. An empty list means the most recent scan found no vulnerabilities; it does not guarantee the current deployment is vulnerability-free. Available on Business and Cloud Hosting plans.
|
|
14219
14312
|
* @summary List Node.js vulnerabilities
|
|
@@ -14248,6 +14341,23 @@ export const HostingNodeJSApiFp = function (configuration) {
|
|
|
14248
14341
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
14249
14342
|
});
|
|
14250
14343
|
},
|
|
14344
|
+
/**
|
|
14345
|
+
* Replaces the website\'s Node.js environment variables with the ones provided. This is a full replace: any variable not in the request is deleted, and sending an empty `env_vars` array deletes every variable. Saving writes the values and restarts the running Node.js process. A restart is enough for apps that read environment variables at process start, such as Express or NestJS. It is not enough for frameworks that bake variables into the build. Next.js standalone is one of those: build-time values (including `NEXT_PUBLIC_*`) need a fresh build. After this call, use the `Start Node.js build` endpoint so those apps pick up the new values. The `List Node.js environment variables` endpoint returns masked values (`********`), so never copy values from it into this request. Always send the full desired set with real values taken from the project `.env` file or the user prompt.
|
|
14346
|
+
* @summary Replace Node.js environment variables
|
|
14347
|
+
* @param {string} username
|
|
14348
|
+
* @param {string} domain Domain name
|
|
14349
|
+
* @param {HostingV1NodeJsSetBuildEnvVarsRequest} hostingV1NodeJsSetBuildEnvVarsRequest
|
|
14350
|
+
* @param {*} [options] Override http request option.
|
|
14351
|
+
* @throws {RequiredError}
|
|
14352
|
+
*/
|
|
14353
|
+
replaceNodeJsEnvironmentVariablesV1(username, domain, hostingV1NodeJsSetBuildEnvVarsRequest, options) {
|
|
14354
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14355
|
+
var _a, _b;
|
|
14356
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.replaceNodeJsEnvironmentVariablesV1(username, domain, hostingV1NodeJsSetBuildEnvVarsRequest, options);
|
|
14357
|
+
const localVarOperationServerBasePath = (_b = (_a = operationServerMap['HostingNodeJSApi.replaceNodeJsEnvironmentVariablesV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
|
|
14358
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
14359
|
+
});
|
|
14360
|
+
},
|
|
14251
14361
|
/**
|
|
14252
14362
|
* 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.
|
|
14253
14363
|
* @summary Restart Node.js application
|
|
@@ -14329,6 +14439,17 @@ export const HostingNodeJSApiFactory = function (configuration, basePath, axios)
|
|
|
14329
14439
|
listNodeJSBuildsV1(username, domain, page, perPage, states, options) {
|
|
14330
14440
|
return localVarFp.listNodeJSBuildsV1(username, domain, page, perPage, states, options).then((request) => request(axios, basePath));
|
|
14331
14441
|
},
|
|
14442
|
+
/**
|
|
14443
|
+
* Lists the Node.js environment variables currently set for the website. Values are always masked as `********` and cannot be read back through this API. Use this endpoint to see which keys are configured or to verify a change, not to read values. To change variables, use the `Replace Node.js environment variables` endpoint. It replaces the whole set, so never copy the masked values from this response into that request; send the full desired set with real values taken from the project `.env` file or the user prompt instead.
|
|
14444
|
+
* @summary List Node.js environment variables
|
|
14445
|
+
* @param {string} username
|
|
14446
|
+
* @param {string} domain Domain name
|
|
14447
|
+
* @param {*} [options] Override http request option.
|
|
14448
|
+
* @throws {RequiredError}
|
|
14449
|
+
*/
|
|
14450
|
+
listNodeJsEnvironmentVariablesV1(username, domain, options) {
|
|
14451
|
+
return localVarFp.listNodeJsEnvironmentVariablesV1(username, domain, options).then((request) => request(axios, basePath));
|
|
14452
|
+
},
|
|
14332
14453
|
/**
|
|
14333
14454
|
* Lists known npm package vulnerabilities detected on a Node.js website, enriched with advisory metadata (severity, CVSS score, CVE, advisory URL). Results are sorted from the most severe to the least severe, then by publish date (newest first). Use the `severities` query parameter to filter. Vulnerabilities with `is_patchable` set to `true` can be auto-fixed via the `Patch Node.js Vulnerabilities` endpoint, which opens a GitHub pull request with updated package versions. Auto-fix is only available for websites deployed from a connected GitHub repository. Vulnerabilities with `is_patching_in_progress` set to `true` are already included in an open patch pull request; while any patch pull request is open, new patch requests for this website are rejected until it is merged or closed. Data comes from periodic dependency scans, so it may lag behind the latest deployment. An empty list means the most recent scan found no vulnerabilities; it does not guarantee the current deployment is vulnerability-free. Available on Business and Cloud Hosting plans.
|
|
14334
14455
|
* @summary List Node.js vulnerabilities
|
|
@@ -14353,6 +14474,18 @@ export const HostingNodeJSApiFactory = function (configuration, basePath, axios)
|
|
|
14353
14474
|
patchNodeJsVulnerabilitiesV1(username, domain, hostingV1NodeJsPatchVulnerabilitiesRequest, options) {
|
|
14354
14475
|
return localVarFp.patchNodeJsVulnerabilitiesV1(username, domain, hostingV1NodeJsPatchVulnerabilitiesRequest, options).then((request) => request(axios, basePath));
|
|
14355
14476
|
},
|
|
14477
|
+
/**
|
|
14478
|
+
* Replaces the website\'s Node.js environment variables with the ones provided. This is a full replace: any variable not in the request is deleted, and sending an empty `env_vars` array deletes every variable. Saving writes the values and restarts the running Node.js process. A restart is enough for apps that read environment variables at process start, such as Express or NestJS. It is not enough for frameworks that bake variables into the build. Next.js standalone is one of those: build-time values (including `NEXT_PUBLIC_*`) need a fresh build. After this call, use the `Start Node.js build` endpoint so those apps pick up the new values. The `List Node.js environment variables` endpoint returns masked values (`********`), so never copy values from it into this request. Always send the full desired set with real values taken from the project `.env` file or the user prompt.
|
|
14479
|
+
* @summary Replace Node.js environment variables
|
|
14480
|
+
* @param {string} username
|
|
14481
|
+
* @param {string} domain Domain name
|
|
14482
|
+
* @param {HostingV1NodeJsSetBuildEnvVarsRequest} hostingV1NodeJsSetBuildEnvVarsRequest
|
|
14483
|
+
* @param {*} [options] Override http request option.
|
|
14484
|
+
* @throws {RequiredError}
|
|
14485
|
+
*/
|
|
14486
|
+
replaceNodeJsEnvironmentVariablesV1(username, domain, hostingV1NodeJsSetBuildEnvVarsRequest, options) {
|
|
14487
|
+
return localVarFp.replaceNodeJsEnvironmentVariablesV1(username, domain, hostingV1NodeJsSetBuildEnvVarsRequest, options).then((request) => request(axios, basePath));
|
|
14488
|
+
},
|
|
14356
14489
|
/**
|
|
14357
14490
|
* 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.
|
|
14358
14491
|
* @summary Restart Node.js application
|
|
@@ -14427,6 +14560,18 @@ export class HostingNodeJSApi extends BaseAPI {
|
|
|
14427
14560
|
listNodeJSBuildsV1(username, domain, page, perPage, states, options) {
|
|
14428
14561
|
return HostingNodeJSApiFp(this.configuration).listNodeJSBuildsV1(username, domain, page, perPage, states, options).then((request) => request(this.axios, this.basePath));
|
|
14429
14562
|
}
|
|
14563
|
+
/**
|
|
14564
|
+
* Lists the Node.js environment variables currently set for the website. Values are always masked as `********` and cannot be read back through this API. Use this endpoint to see which keys are configured or to verify a change, not to read values. To change variables, use the `Replace Node.js environment variables` endpoint. It replaces the whole set, so never copy the masked values from this response into that request; send the full desired set with real values taken from the project `.env` file or the user prompt instead.
|
|
14565
|
+
* @summary List Node.js environment variables
|
|
14566
|
+
* @param {string} username
|
|
14567
|
+
* @param {string} domain Domain name
|
|
14568
|
+
* @param {*} [options] Override http request option.
|
|
14569
|
+
* @throws {RequiredError}
|
|
14570
|
+
* @memberof HostingNodeJSApi
|
|
14571
|
+
*/
|
|
14572
|
+
listNodeJsEnvironmentVariablesV1(username, domain, options) {
|
|
14573
|
+
return HostingNodeJSApiFp(this.configuration).listNodeJsEnvironmentVariablesV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
14574
|
+
}
|
|
14430
14575
|
/**
|
|
14431
14576
|
* Lists known npm package vulnerabilities detected on a Node.js website, enriched with advisory metadata (severity, CVSS score, CVE, advisory URL). Results are sorted from the most severe to the least severe, then by publish date (newest first). Use the `severities` query parameter to filter. Vulnerabilities with `is_patchable` set to `true` can be auto-fixed via the `Patch Node.js Vulnerabilities` endpoint, which opens a GitHub pull request with updated package versions. Auto-fix is only available for websites deployed from a connected GitHub repository. Vulnerabilities with `is_patching_in_progress` set to `true` are already included in an open patch pull request; while any patch pull request is open, new patch requests for this website are rejected until it is merged or closed. Data comes from periodic dependency scans, so it may lag behind the latest deployment. An empty list means the most recent scan found no vulnerabilities; it does not guarantee the current deployment is vulnerability-free. Available on Business and Cloud Hosting plans.
|
|
14432
14577
|
* @summary List Node.js vulnerabilities
|
|
@@ -14453,6 +14598,19 @@ export class HostingNodeJSApi extends BaseAPI {
|
|
|
14453
14598
|
patchNodeJsVulnerabilitiesV1(username, domain, hostingV1NodeJsPatchVulnerabilitiesRequest, options) {
|
|
14454
14599
|
return HostingNodeJSApiFp(this.configuration).patchNodeJsVulnerabilitiesV1(username, domain, hostingV1NodeJsPatchVulnerabilitiesRequest, options).then((request) => request(this.axios, this.basePath));
|
|
14455
14600
|
}
|
|
14601
|
+
/**
|
|
14602
|
+
* Replaces the website\'s Node.js environment variables with the ones provided. This is a full replace: any variable not in the request is deleted, and sending an empty `env_vars` array deletes every variable. Saving writes the values and restarts the running Node.js process. A restart is enough for apps that read environment variables at process start, such as Express or NestJS. It is not enough for frameworks that bake variables into the build. Next.js standalone is one of those: build-time values (including `NEXT_PUBLIC_*`) need a fresh build. After this call, use the `Start Node.js build` endpoint so those apps pick up the new values. The `List Node.js environment variables` endpoint returns masked values (`********`), so never copy values from it into this request. Always send the full desired set with real values taken from the project `.env` file or the user prompt.
|
|
14603
|
+
* @summary Replace Node.js environment variables
|
|
14604
|
+
* @param {string} username
|
|
14605
|
+
* @param {string} domain Domain name
|
|
14606
|
+
* @param {HostingV1NodeJsSetBuildEnvVarsRequest} hostingV1NodeJsSetBuildEnvVarsRequest
|
|
14607
|
+
* @param {*} [options] Override http request option.
|
|
14608
|
+
* @throws {RequiredError}
|
|
14609
|
+
* @memberof HostingNodeJSApi
|
|
14610
|
+
*/
|
|
14611
|
+
replaceNodeJsEnvironmentVariablesV1(username, domain, hostingV1NodeJsSetBuildEnvVarsRequest, options) {
|
|
14612
|
+
return HostingNodeJSApiFp(this.configuration).replaceNodeJsEnvironmentVariablesV1(username, domain, hostingV1NodeJsSetBuildEnvVarsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
14613
|
+
}
|
|
14456
14614
|
/**
|
|
14457
14615
|
* 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.
|
|
14458
14616
|
* @summary Restart Node.js application
|
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.44.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/base.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.44.0
|
|
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/dist/esm/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.44.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/common.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.44.0
|
|
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
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.44.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.44.0
|
|
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
|
|
@@ -13,7 +13,7 @@ export class Configuration {
|
|
|
13
13
|
var _a;
|
|
14
14
|
this.accessToken = param.accessToken;
|
|
15
15
|
this.basePath = param.basePath;
|
|
16
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.
|
|
16
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.43.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
17
17
|
this.formDataCtor = param.formDataCtor;
|
|
18
18
|
}
|
|
19
19
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.44.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.44.0
|
|
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/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.44.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 1.
|
|
7
|
+
* API Version: 1.44.0
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/docs/HostingNodeJSApi.md
CHANGED
|
@@ -7,8 +7,10 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
7
7
|
|[**getNodeJSBuildLogsV1**](#getnodejsbuildlogsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/logs | Get NodeJS build logs|
|
|
8
8
|
|[**getNodeJsBuildSettingsFromArchiveV1**](#getnodejsbuildsettingsfromarchivev1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/from-archive | Get Node.js build settings from archive|
|
|
9
9
|
|[**listNodeJSBuildsV1**](#listnodejsbuildsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds | List NodeJS builds|
|
|
10
|
+
|[**listNodeJsEnvironmentVariablesV1**](#listnodejsenvironmentvariablesv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/env | List Node.js environment variables|
|
|
10
11
|
|[**listNodeJsVulnerabilitiesV1**](#listnodejsvulnerabilitiesv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/vulnerabilities | List Node.js vulnerabilities|
|
|
11
12
|
|[**patchNodeJsVulnerabilitiesV1**](#patchnodejsvulnerabilitiesv1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/vulnerabilities/patch | Patch Node.js vulnerabilities|
|
|
13
|
+
|[**replaceNodeJsEnvironmentVariablesV1**](#replacenodejsenvironmentvariablesv1) | **PUT** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/env | Replace Node.js environment variables|
|
|
12
14
|
|[**restartNodeJsApplicationV1**](#restartnodejsapplicationv1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/server/restart | Restart Node.js application|
|
|
13
15
|
|[**startNodeJsBuildV1**](#startnodejsbuildv1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds | Start Node.js build|
|
|
14
16
|
|
|
@@ -191,6 +193,62 @@ const { status, data } = await apiInstance.listNodeJSBuildsV1(
|
|
|
191
193
|
- **Accept**: application/json
|
|
192
194
|
|
|
193
195
|
|
|
196
|
+
### HTTP response details
|
|
197
|
+
| Status code | Description | Response headers |
|
|
198
|
+
|-------------|-------------|------------------|
|
|
199
|
+
|**200** | Success response | - |
|
|
200
|
+
|**401** | Unauthenticated response | - |
|
|
201
|
+
|**500** | Error response | - |
|
|
202
|
+
|
|
203
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
204
|
+
|
|
205
|
+
# **listNodeJsEnvironmentVariablesV1**
|
|
206
|
+
> Array<HostingV1NodeJsEnvVarResource> listNodeJsEnvironmentVariablesV1()
|
|
207
|
+
|
|
208
|
+
Lists the Node.js environment variables currently set for the website. Values are always masked as `********` and cannot be read back through this API. Use this endpoint to see which keys are configured or to verify a change, not to read values. To change variables, use the `Replace Node.js environment variables` endpoint. It replaces the whole set, so never copy the masked values from this response into that request; send the full desired set with real values taken from the project `.env` file or the user prompt instead.
|
|
209
|
+
|
|
210
|
+
### Example
|
|
211
|
+
|
|
212
|
+
```typescript
|
|
213
|
+
import {
|
|
214
|
+
HostingNodeJSApi,
|
|
215
|
+
Configuration
|
|
216
|
+
} from 'hostinger-api-sdk';
|
|
217
|
+
|
|
218
|
+
const configuration = new Configuration();
|
|
219
|
+
const apiInstance = new HostingNodeJSApi(configuration);
|
|
220
|
+
|
|
221
|
+
let username: string; // (default to undefined)
|
|
222
|
+
let domain: string; //Domain name (default to undefined)
|
|
223
|
+
|
|
224
|
+
const { status, data } = await apiInstance.listNodeJsEnvironmentVariablesV1(
|
|
225
|
+
username,
|
|
226
|
+
domain
|
|
227
|
+
);
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Parameters
|
|
231
|
+
|
|
232
|
+
|Name | Type | Description | Notes|
|
|
233
|
+
|------------- | ------------- | ------------- | -------------|
|
|
234
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
235
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
### Return type
|
|
239
|
+
|
|
240
|
+
**Array<HostingV1NodeJsEnvVarResource>**
|
|
241
|
+
|
|
242
|
+
### Authorization
|
|
243
|
+
|
|
244
|
+
[apiToken](../README.md#apiToken)
|
|
245
|
+
|
|
246
|
+
### HTTP request headers
|
|
247
|
+
|
|
248
|
+
- **Content-Type**: Not defined
|
|
249
|
+
- **Accept**: application/json
|
|
250
|
+
|
|
251
|
+
|
|
194
252
|
### HTTP response details
|
|
195
253
|
| Status code | Description | Response headers |
|
|
196
254
|
|-------------|-------------|------------------|
|
|
@@ -320,6 +378,67 @@ const { status, data } = await apiInstance.patchNodeJsVulnerabilitiesV1(
|
|
|
320
378
|
|
|
321
379
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
322
380
|
|
|
381
|
+
# **replaceNodeJsEnvironmentVariablesV1**
|
|
382
|
+
> CommonSuccessEmptyResource replaceNodeJsEnvironmentVariablesV1(hostingV1NodeJsSetBuildEnvVarsRequest)
|
|
383
|
+
|
|
384
|
+
Replaces the website\'s Node.js environment variables with the ones provided. This is a full replace: any variable not in the request is deleted, and sending an empty `env_vars` array deletes every variable. Saving writes the values and restarts the running Node.js process. A restart is enough for apps that read environment variables at process start, such as Express or NestJS. It is not enough for frameworks that bake variables into the build. Next.js standalone is one of those: build-time values (including `NEXT_PUBLIC_*`) need a fresh build. After this call, use the `Start Node.js build` endpoint so those apps pick up the new values. The `List Node.js environment variables` endpoint returns masked values (`********`), so never copy values from it into this request. Always send the full desired set with real values taken from the project `.env` file or the user prompt.
|
|
385
|
+
|
|
386
|
+
### Example
|
|
387
|
+
|
|
388
|
+
```typescript
|
|
389
|
+
import {
|
|
390
|
+
HostingNodeJSApi,
|
|
391
|
+
Configuration,
|
|
392
|
+
HostingV1NodeJsSetBuildEnvVarsRequest
|
|
393
|
+
} from 'hostinger-api-sdk';
|
|
394
|
+
|
|
395
|
+
const configuration = new Configuration();
|
|
396
|
+
const apiInstance = new HostingNodeJSApi(configuration);
|
|
397
|
+
|
|
398
|
+
let username: string; // (default to undefined)
|
|
399
|
+
let domain: string; //Domain name (default to undefined)
|
|
400
|
+
let hostingV1NodeJsSetBuildEnvVarsRequest: HostingV1NodeJsSetBuildEnvVarsRequest; //
|
|
401
|
+
|
|
402
|
+
const { status, data } = await apiInstance.replaceNodeJsEnvironmentVariablesV1(
|
|
403
|
+
username,
|
|
404
|
+
domain,
|
|
405
|
+
hostingV1NodeJsSetBuildEnvVarsRequest
|
|
406
|
+
);
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Parameters
|
|
410
|
+
|
|
411
|
+
|Name | Type | Description | Notes|
|
|
412
|
+
|------------- | ------------- | ------------- | -------------|
|
|
413
|
+
| **hostingV1NodeJsSetBuildEnvVarsRequest** | **HostingV1NodeJsSetBuildEnvVarsRequest**| | |
|
|
414
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
415
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
### Return type
|
|
419
|
+
|
|
420
|
+
**CommonSuccessEmptyResource**
|
|
421
|
+
|
|
422
|
+
### Authorization
|
|
423
|
+
|
|
424
|
+
[apiToken](../README.md#apiToken)
|
|
425
|
+
|
|
426
|
+
### HTTP request headers
|
|
427
|
+
|
|
428
|
+
- **Content-Type**: application/json
|
|
429
|
+
- **Accept**: application/json
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
### HTTP response details
|
|
433
|
+
| Status code | Description | Response headers |
|
|
434
|
+
|-------------|-------------|------------------|
|
|
435
|
+
|**200** | Success empty response | - |
|
|
436
|
+
|**422** | Validation error response | - |
|
|
437
|
+
|**401** | Unauthenticated response | - |
|
|
438
|
+
|**500** | Error response | - |
|
|
439
|
+
|
|
440
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
441
|
+
|
|
323
442
|
# **restartNodeJsApplicationV1**
|
|
324
443
|
> CommonSuccessEmptyResource restartNodeJsApplicationV1()
|
|
325
444
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# HostingV1NodeJsEnvVarResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**key** | **string** | Environment variable name | [optional] [default to undefined]
|
|
9
|
+
**value** | **string** | Always the literal string ********. Real values cannot be read back through this API. | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { HostingV1NodeJsEnvVarResource } from 'hostinger-api-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: HostingV1NodeJsEnvVarResource = {
|
|
17
|
+
key,
|
|
18
|
+
value,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# HostingV1NodeJsSetBuildEnvVarsRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**env_vars** | [**Array<HostingV1NodeJsSetBuildEnvVarsRequestEnvVarsInner>**](HostingV1NodeJsSetBuildEnvVarsRequestEnvVarsInner.md) | Environment variables to set. This is the full desired set: any variable not in this list is deleted, and an empty array deletes every variable. | [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { HostingV1NodeJsSetBuildEnvVarsRequest } from 'hostinger-api-sdk';
|
|
14
|
+
|
|
15
|
+
const instance: HostingV1NodeJsSetBuildEnvVarsRequest = {
|
|
16
|
+
env_vars,
|
|
17
|
+
};
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# HostingV1NodeJsSetBuildEnvVarsRequestEnvVarsInner
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**key** | **string** | Environment variable name. Must start with an uppercase letter or underscore, followed by uppercase letters, digits or underscores. | [default to undefined]
|
|
9
|
+
**value** | **string** | Environment variable value. | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { HostingV1NodeJsSetBuildEnvVarsRequestEnvVarsInner } from 'hostinger-api-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: HostingV1NodeJsSetBuildEnvVarsRequestEnvVarsInner = {
|
|
17
|
+
key,
|
|
18
|
+
value,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.44.0
|
|
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
|