@hostinger/sdk 1.47.1 → 1.49.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 +877 -5
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +550 -5
- package/dist/api.js +665 -15
- 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 +550 -5
- package/dist/esm/api.js +655 -5
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/HostingNodeJSApi.md +367 -0
- package/docs/HostingV1NodeJsBuildAnalysisResource.md +22 -0
- package/docs/HostingV1NodeJsLogEntryResource.md +24 -0
- package/docs/HostingV1NodeJsRuntimeLogsResource.md +26 -0
- package/docs/HostingV1NodeJsStoredBuildSettingsResource.md +32 -0
- package/docs/HostingV1NodeJsUpdateBuildSettingsRequest.md +32 -0
- package/docs/VPSFirewallApi.md +56 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.49.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
|
|
@@ -7165,6 +7165,25 @@ export interface HostingV1FilesUploadUrlResource {
|
|
|
7165
7165
|
*/
|
|
7166
7166
|
'rest_auth_key': string;
|
|
7167
7167
|
}
|
|
7168
|
+
/**
|
|
7169
|
+
*
|
|
7170
|
+
* @export
|
|
7171
|
+
* @interface HostingV1NodeJsBuildAnalysisResource
|
|
7172
|
+
*/
|
|
7173
|
+
export interface HostingV1NodeJsBuildAnalysisResource {
|
|
7174
|
+
/**
|
|
7175
|
+
* Why the build failed. null when no analysis could be produced.
|
|
7176
|
+
* @type {string}
|
|
7177
|
+
* @memberof HostingV1NodeJsBuildAnalysisResource
|
|
7178
|
+
*/
|
|
7179
|
+
'analysis': string | null;
|
|
7180
|
+
/**
|
|
7181
|
+
* Suggested fix for the build failure. null when no analysis could be produced.
|
|
7182
|
+
* @type {string}
|
|
7183
|
+
* @memberof HostingV1NodeJsBuildAnalysisResource
|
|
7184
|
+
*/
|
|
7185
|
+
'solution': string | null;
|
|
7186
|
+
}
|
|
7168
7187
|
/**
|
|
7169
7188
|
*
|
|
7170
7189
|
* @export
|
|
@@ -7543,6 +7562,31 @@ export interface HostingV1NodeJsGetBuildSettingsRequest {
|
|
|
7543
7562
|
*/
|
|
7544
7563
|
'archive_path': string;
|
|
7545
7564
|
}
|
|
7565
|
+
/**
|
|
7566
|
+
*
|
|
7567
|
+
* @export
|
|
7568
|
+
* @interface HostingV1NodeJsLogEntryResource
|
|
7569
|
+
*/
|
|
7570
|
+
export interface HostingV1NodeJsLogEntryResource {
|
|
7571
|
+
/**
|
|
7572
|
+
* ISO 8601 timestamp of the log entry
|
|
7573
|
+
* @type {string}
|
|
7574
|
+
* @memberof HostingV1NodeJsLogEntryResource
|
|
7575
|
+
*/
|
|
7576
|
+
'timestamp': string;
|
|
7577
|
+
/**
|
|
7578
|
+
* Log level in upper case (usually ERROR, WARN, INFO, LOG, DEBUG or TRACE). Numeric pino levels are mapped to these names.
|
|
7579
|
+
* @type {string}
|
|
7580
|
+
* @memberof HostingV1NodeJsLogEntryResource
|
|
7581
|
+
*/
|
|
7582
|
+
'level': string;
|
|
7583
|
+
/**
|
|
7584
|
+
* Log message
|
|
7585
|
+
* @type {string}
|
|
7586
|
+
* @memberof HostingV1NodeJsLogEntryResource
|
|
7587
|
+
*/
|
|
7588
|
+
'message': string;
|
|
7589
|
+
}
|
|
7546
7590
|
/**
|
|
7547
7591
|
*
|
|
7548
7592
|
* @export
|
|
@@ -7587,6 +7631,37 @@ export interface HostingV1NodeJsPatchVulnerabilitiesRequest {
|
|
|
7587
7631
|
*/
|
|
7588
7632
|
'vulnerability_ids': Array<string>;
|
|
7589
7633
|
}
|
|
7634
|
+
/**
|
|
7635
|
+
*
|
|
7636
|
+
* @export
|
|
7637
|
+
* @interface HostingV1NodeJsRuntimeLogsResource
|
|
7638
|
+
*/
|
|
7639
|
+
export interface HostingV1NodeJsRuntimeLogsResource {
|
|
7640
|
+
/**
|
|
7641
|
+
* Array of [`Hosting.V1.NodeJs.LogEntryResource`](#model/hostingv1nodejslogentryresource)
|
|
7642
|
+
* @type {Array<HostingV1NodeJsLogEntryResource>}
|
|
7643
|
+
* @memberof HostingV1NodeJsRuntimeLogsResource
|
|
7644
|
+
*/
|
|
7645
|
+
'logs': Array<HostingV1NodeJsLogEntryResource>;
|
|
7646
|
+
/**
|
|
7647
|
+
* Timestamp of the first line of the log file; null when the file is empty or its first line has no timestamp field
|
|
7648
|
+
* @type {string}
|
|
7649
|
+
* @memberof HostingV1NodeJsRuntimeLogsResource
|
|
7650
|
+
*/
|
|
7651
|
+
'started_at': string | null;
|
|
7652
|
+
/**
|
|
7653
|
+
* Total number of lines in the raw log file. Send total_lines + 1 as from_line in the next poll to receive only new entries.
|
|
7654
|
+
* @type {number}
|
|
7655
|
+
* @memberof HostingV1NodeJsRuntimeLogsResource
|
|
7656
|
+
*/
|
|
7657
|
+
'total_lines': number;
|
|
7658
|
+
/**
|
|
7659
|
+
* Time of the last completed build; entries before it belong to the previous deployment. null when no build has completed yet.
|
|
7660
|
+
* @type {string}
|
|
7661
|
+
* @memberof HostingV1NodeJsRuntimeLogsResource
|
|
7662
|
+
*/
|
|
7663
|
+
'last_deployed_at': string | null;
|
|
7664
|
+
}
|
|
7590
7665
|
/**
|
|
7591
7666
|
*
|
|
7592
7667
|
* @export
|
|
@@ -7751,6 +7826,176 @@ export interface HostingV1NodeJsStartBuildRequestSourceOptions {
|
|
|
7751
7826
|
*/
|
|
7752
7827
|
'archive_path': string;
|
|
7753
7828
|
}
|
|
7829
|
+
/**
|
|
7830
|
+
*
|
|
7831
|
+
* @export
|
|
7832
|
+
* @interface HostingV1NodeJsStoredBuildSettingsResource
|
|
7833
|
+
*/
|
|
7834
|
+
export interface HostingV1NodeJsStoredBuildSettingsResource {
|
|
7835
|
+
/**
|
|
7836
|
+
* Node.js major version used to build and run the application
|
|
7837
|
+
* @type {number}
|
|
7838
|
+
* @memberof HostingV1NodeJsStoredBuildSettingsResource
|
|
7839
|
+
*/
|
|
7840
|
+
'node_version': number;
|
|
7841
|
+
/**
|
|
7842
|
+
* Detected or chosen application framework
|
|
7843
|
+
* @type {string}
|
|
7844
|
+
* @memberof HostingV1NodeJsStoredBuildSettingsResource
|
|
7845
|
+
*/
|
|
7846
|
+
'app_type': HostingV1NodeJsStoredBuildSettingsResourceAppTypeEnum | null;
|
|
7847
|
+
/**
|
|
7848
|
+
* Application root directory (where package.json is located) relative to public_html; null means public_html itself
|
|
7849
|
+
* @type {string}
|
|
7850
|
+
* @memberof HostingV1NodeJsStoredBuildSettingsResource
|
|
7851
|
+
*/
|
|
7852
|
+
'root_directory': string | null;
|
|
7853
|
+
/**
|
|
7854
|
+
* Build output directory relative to the root directory
|
|
7855
|
+
* @type {string}
|
|
7856
|
+
* @memberof HostingV1NodeJsStoredBuildSettingsResource
|
|
7857
|
+
*/
|
|
7858
|
+
'output_directory': string | null;
|
|
7859
|
+
/**
|
|
7860
|
+
* The package.json script that builds the application
|
|
7861
|
+
* @type {string}
|
|
7862
|
+
* @memberof HostingV1NodeJsStoredBuildSettingsResource
|
|
7863
|
+
*/
|
|
7864
|
+
'build_script': string | null;
|
|
7865
|
+
/**
|
|
7866
|
+
* The main entry point file for the application
|
|
7867
|
+
* @type {string}
|
|
7868
|
+
* @memberof HostingV1NodeJsStoredBuildSettingsResource
|
|
7869
|
+
*/
|
|
7870
|
+
'entry_file': string | null;
|
|
7871
|
+
/**
|
|
7872
|
+
* Package manager used to install dependencies
|
|
7873
|
+
* @type {string}
|
|
7874
|
+
* @memberof HostingV1NodeJsStoredBuildSettingsResource
|
|
7875
|
+
*/
|
|
7876
|
+
'package_manager': HostingV1NodeJsStoredBuildSettingsResourcePackageManagerEnum | null;
|
|
7877
|
+
}
|
|
7878
|
+
|
|
7879
|
+
export const HostingV1NodeJsStoredBuildSettingsResourceAppTypeEnum = {
|
|
7880
|
+
CreateReactApp: 'create-react-app',
|
|
7881
|
+
Gatsby: 'gatsby',
|
|
7882
|
+
Vite: 'vite',
|
|
7883
|
+
Angular: 'angular',
|
|
7884
|
+
React: 'react',
|
|
7885
|
+
Vue: 'vue',
|
|
7886
|
+
Parcel: 'parcel',
|
|
7887
|
+
Next: 'next',
|
|
7888
|
+
Nuxt: 'nuxt',
|
|
7889
|
+
Nest: 'nest',
|
|
7890
|
+
Express: 'express',
|
|
7891
|
+
Fastify: 'fastify',
|
|
7892
|
+
Astro: 'astro',
|
|
7893
|
+
Svelte: 'svelte',
|
|
7894
|
+
SvelteKit: 'svelte-kit',
|
|
7895
|
+
Hono: 'hono',
|
|
7896
|
+
ReactRouter: 'react-router',
|
|
7897
|
+
Nitro: 'nitro',
|
|
7898
|
+
Other: 'other'
|
|
7899
|
+
} as const;
|
|
7900
|
+
|
|
7901
|
+
export type HostingV1NodeJsStoredBuildSettingsResourceAppTypeEnum = typeof HostingV1NodeJsStoredBuildSettingsResourceAppTypeEnum[keyof typeof HostingV1NodeJsStoredBuildSettingsResourceAppTypeEnum];
|
|
7902
|
+
export const HostingV1NodeJsStoredBuildSettingsResourcePackageManagerEnum = {
|
|
7903
|
+
Npm: 'npm',
|
|
7904
|
+
Yarn: 'yarn',
|
|
7905
|
+
Pnpm: 'pnpm'
|
|
7906
|
+
} as const;
|
|
7907
|
+
|
|
7908
|
+
export type HostingV1NodeJsStoredBuildSettingsResourcePackageManagerEnum = typeof HostingV1NodeJsStoredBuildSettingsResourcePackageManagerEnum[keyof typeof HostingV1NodeJsStoredBuildSettingsResourcePackageManagerEnum];
|
|
7909
|
+
|
|
7910
|
+
/**
|
|
7911
|
+
*
|
|
7912
|
+
* @export
|
|
7913
|
+
* @interface HostingV1NodeJsUpdateBuildSettingsRequest
|
|
7914
|
+
*/
|
|
7915
|
+
export interface HostingV1NodeJsUpdateBuildSettingsRequest {
|
|
7916
|
+
/**
|
|
7917
|
+
* Node.js major version
|
|
7918
|
+
* @type {number}
|
|
7919
|
+
* @memberof HostingV1NodeJsUpdateBuildSettingsRequest
|
|
7920
|
+
*/
|
|
7921
|
+
'node_version': HostingV1NodeJsUpdateBuildSettingsRequestNodeVersionEnum;
|
|
7922
|
+
/**
|
|
7923
|
+
* Node.js application framework. Set it explicitly when auto-detection picked the wrong one.
|
|
7924
|
+
* @type {string}
|
|
7925
|
+
* @memberof HostingV1NodeJsUpdateBuildSettingsRequest
|
|
7926
|
+
*/
|
|
7927
|
+
'app_type': HostingV1NodeJsUpdateBuildSettingsRequestAppTypeEnum | null;
|
|
7928
|
+
/**
|
|
7929
|
+
* Application root directory (where package.json is located) relative to public_html. Omit it, or send \".\", for public_html itself.
|
|
7930
|
+
* @type {string}
|
|
7931
|
+
* @memberof HostingV1NodeJsUpdateBuildSettingsRequest
|
|
7932
|
+
*/
|
|
7933
|
+
'root_directory': string | null;
|
|
7934
|
+
/**
|
|
7935
|
+
* Build output directory relative to the root directory
|
|
7936
|
+
* @type {string}
|
|
7937
|
+
* @memberof HostingV1NodeJsUpdateBuildSettingsRequest
|
|
7938
|
+
*/
|
|
7939
|
+
'output_directory': string | null;
|
|
7940
|
+
/**
|
|
7941
|
+
* The package.json script that builds the application
|
|
7942
|
+
* @type {string}
|
|
7943
|
+
* @memberof HostingV1NodeJsUpdateBuildSettingsRequest
|
|
7944
|
+
*/
|
|
7945
|
+
'build_script': string | null;
|
|
7946
|
+
/**
|
|
7947
|
+
* The main entry point file for the application (required for express, fastify, nest, nuxt and hono app types)
|
|
7948
|
+
* @type {string}
|
|
7949
|
+
* @memberof HostingV1NodeJsUpdateBuildSettingsRequest
|
|
7950
|
+
*/
|
|
7951
|
+
'entry_file': string | null;
|
|
7952
|
+
/**
|
|
7953
|
+
* Package manager used to install dependencies
|
|
7954
|
+
* @type {string}
|
|
7955
|
+
* @memberof HostingV1NodeJsUpdateBuildSettingsRequest
|
|
7956
|
+
*/
|
|
7957
|
+
'package_manager': HostingV1NodeJsUpdateBuildSettingsRequestPackageManagerEnum | null;
|
|
7958
|
+
}
|
|
7959
|
+
|
|
7960
|
+
export const HostingV1NodeJsUpdateBuildSettingsRequestNodeVersionEnum = {
|
|
7961
|
+
NUMBER_18: 18,
|
|
7962
|
+
NUMBER_20: 20,
|
|
7963
|
+
NUMBER_22: 22,
|
|
7964
|
+
NUMBER_24: 24
|
|
7965
|
+
} as const;
|
|
7966
|
+
|
|
7967
|
+
export type HostingV1NodeJsUpdateBuildSettingsRequestNodeVersionEnum = typeof HostingV1NodeJsUpdateBuildSettingsRequestNodeVersionEnum[keyof typeof HostingV1NodeJsUpdateBuildSettingsRequestNodeVersionEnum];
|
|
7968
|
+
export const HostingV1NodeJsUpdateBuildSettingsRequestAppTypeEnum = {
|
|
7969
|
+
CreateReactApp: 'create-react-app',
|
|
7970
|
+
Gatsby: 'gatsby',
|
|
7971
|
+
Vite: 'vite',
|
|
7972
|
+
Angular: 'angular',
|
|
7973
|
+
React: 'react',
|
|
7974
|
+
Vue: 'vue',
|
|
7975
|
+
Parcel: 'parcel',
|
|
7976
|
+
Next: 'next',
|
|
7977
|
+
Nuxt: 'nuxt',
|
|
7978
|
+
Nest: 'nest',
|
|
7979
|
+
Express: 'express',
|
|
7980
|
+
Fastify: 'fastify',
|
|
7981
|
+
Astro: 'astro',
|
|
7982
|
+
Svelte: 'svelte',
|
|
7983
|
+
SvelteKit: 'svelte-kit',
|
|
7984
|
+
Hono: 'hono',
|
|
7985
|
+
ReactRouter: 'react-router',
|
|
7986
|
+
Nitro: 'nitro',
|
|
7987
|
+
Other: 'other'
|
|
7988
|
+
} as const;
|
|
7989
|
+
|
|
7990
|
+
export type HostingV1NodeJsUpdateBuildSettingsRequestAppTypeEnum = typeof HostingV1NodeJsUpdateBuildSettingsRequestAppTypeEnum[keyof typeof HostingV1NodeJsUpdateBuildSettingsRequestAppTypeEnum];
|
|
7991
|
+
export const HostingV1NodeJsUpdateBuildSettingsRequestPackageManagerEnum = {
|
|
7992
|
+
Npm: 'npm',
|
|
7993
|
+
Yarn: 'yarn',
|
|
7994
|
+
Pnpm: 'pnpm'
|
|
7995
|
+
} as const;
|
|
7996
|
+
|
|
7997
|
+
export type HostingV1NodeJsUpdateBuildSettingsRequestPackageManagerEnum = typeof HostingV1NodeJsUpdateBuildSettingsRequestPackageManagerEnum[keyof typeof HostingV1NodeJsUpdateBuildSettingsRequestPackageManagerEnum];
|
|
7998
|
+
|
|
7754
7999
|
/**
|
|
7755
8000
|
*
|
|
7756
8001
|
* @export
|
|
@@ -29864,6 +30109,94 @@ export type ListWebsiteFilesAndDirectoriesV1FileTypesEnum = typeof ListWebsiteFi
|
|
|
29864
30109
|
*/
|
|
29865
30110
|
export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
29866
30111
|
return {
|
|
30112
|
+
/**
|
|
30113
|
+
* Returns an AI analysis of why a build failed and how to fix it, based on the build logs, the project file list and package.json. Only builds in the `failed` state can be analysed; any other state returns 422. When no analysis could be produced both `analysis` and `solution` are null, in which case read `Get NodeJS build logs` instead. Each call runs the analysis again, so call it once per failed build and keep the result. Limited to 5 calls per minute per API client (429 above that).
|
|
30114
|
+
* @summary Analyse failed Node.js build
|
|
30115
|
+
* @param {string} username
|
|
30116
|
+
* @param {string} domain Domain name
|
|
30117
|
+
* @param {string} uuid Build UUID
|
|
30118
|
+
* @param {*} [options] Override http request option.
|
|
30119
|
+
* @throws {RequiredError}
|
|
30120
|
+
*/
|
|
30121
|
+
analyseFailedNodeJsBuildV1: async (username: string, domain: string, uuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
30122
|
+
// verify required parameter 'username' is not null or undefined
|
|
30123
|
+
assertParamExists('analyseFailedNodeJsBuildV1', 'username', username)
|
|
30124
|
+
// verify required parameter 'domain' is not null or undefined
|
|
30125
|
+
assertParamExists('analyseFailedNodeJsBuildV1', 'domain', domain)
|
|
30126
|
+
// verify required parameter 'uuid' is not null or undefined
|
|
30127
|
+
assertParamExists('analyseFailedNodeJsBuildV1', 'uuid', uuid)
|
|
30128
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/analysis`
|
|
30129
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
30130
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)))
|
|
30131
|
+
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
|
|
30132
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
30133
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
30134
|
+
let baseOptions;
|
|
30135
|
+
if (configuration) {
|
|
30136
|
+
baseOptions = configuration.baseOptions;
|
|
30137
|
+
}
|
|
30138
|
+
|
|
30139
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
30140
|
+
const localVarHeaderParameter = {} as any;
|
|
30141
|
+
const localVarQueryParameter = {} as any;
|
|
30142
|
+
|
|
30143
|
+
// authentication apiToken required
|
|
30144
|
+
// http bearer authentication required
|
|
30145
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
30146
|
+
|
|
30147
|
+
|
|
30148
|
+
|
|
30149
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
30150
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
30151
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
30152
|
+
|
|
30153
|
+
return {
|
|
30154
|
+
url: toPathString(localVarUrlObj),
|
|
30155
|
+
options: localVarRequestOptions,
|
|
30156
|
+
};
|
|
30157
|
+
},
|
|
30158
|
+
/**
|
|
30159
|
+
* Empties the Node.js application\'s runtime log file. This cannot be undone, so confirm with the user before calling it. Returns success even when no log file exists yet. Use it before reproducing a problem so the next `Get Node.js runtime logs` call returns only fresh entries; start that call with `period` again instead of reusing a `from_line` from before the clear.
|
|
30160
|
+
* @summary Clear Node.js runtime logs
|
|
30161
|
+
* @param {string} username
|
|
30162
|
+
* @param {string} domain Domain name
|
|
30163
|
+
* @param {*} [options] Override http request option.
|
|
30164
|
+
* @throws {RequiredError}
|
|
30165
|
+
*/
|
|
30166
|
+
clearNodeJsRuntimeLogsV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
30167
|
+
// verify required parameter 'username' is not null or undefined
|
|
30168
|
+
assertParamExists('clearNodeJsRuntimeLogsV1', 'username', username)
|
|
30169
|
+
// verify required parameter 'domain' is not null or undefined
|
|
30170
|
+
assertParamExists('clearNodeJsRuntimeLogsV1', 'domain', domain)
|
|
30171
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/runtime-logs`
|
|
30172
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
30173
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
30174
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
30175
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
30176
|
+
let baseOptions;
|
|
30177
|
+
if (configuration) {
|
|
30178
|
+
baseOptions = configuration.baseOptions;
|
|
30179
|
+
}
|
|
30180
|
+
|
|
30181
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
30182
|
+
const localVarHeaderParameter = {} as any;
|
|
30183
|
+
const localVarQueryParameter = {} as any;
|
|
30184
|
+
|
|
30185
|
+
// authentication apiToken required
|
|
30186
|
+
// http bearer authentication required
|
|
30187
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
30188
|
+
|
|
30189
|
+
|
|
30190
|
+
|
|
30191
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
30192
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
30193
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
30194
|
+
|
|
30195
|
+
return {
|
|
30196
|
+
url: toPathString(localVarUrlObj),
|
|
30197
|
+
options: localVarRequestOptions,
|
|
30198
|
+
};
|
|
30199
|
+
},
|
|
29867
30200
|
/**
|
|
29868
30201
|
* Retrieve logs from a specific Node.js build process. To stream live output while a build is running, poll this endpoint repeatedly while the build state is `running`, passing the previously returned `lines` count as `from_line` to fetch only new output since the last call. Log content may contain ANSI escape sequences (color codes).
|
|
29869
30202
|
* @summary Get NodeJS build logs
|
|
@@ -29906,6 +30239,52 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Confi
|
|
|
29906
30239
|
|
|
29907
30240
|
|
|
29908
30241
|
|
|
30242
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
30243
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
30244
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
30245
|
+
|
|
30246
|
+
return {
|
|
30247
|
+
url: toPathString(localVarUrlObj),
|
|
30248
|
+
options: localVarRequestOptions,
|
|
30249
|
+
};
|
|
30250
|
+
},
|
|
30251
|
+
/**
|
|
30252
|
+
* Returns one build by UUID: its state (`pending`, `running`, `completed`, `failed`), the options it ran with and timestamps. Poll this while a build is pending or running. When it is failed, read `Get NodeJS build logs` and `Analyse failed Node.js build` for the cause. Returns 404 when the UUID does not belong to a build of this website.
|
|
30253
|
+
* @summary Get Node.js build details
|
|
30254
|
+
* @param {string} username
|
|
30255
|
+
* @param {string} domain Domain name
|
|
30256
|
+
* @param {string} uuid Build UUID
|
|
30257
|
+
* @param {*} [options] Override http request option.
|
|
30258
|
+
* @throws {RequiredError}
|
|
30259
|
+
*/
|
|
30260
|
+
getNodeJsBuildDetailsV1: async (username: string, domain: string, uuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
30261
|
+
// verify required parameter 'username' is not null or undefined
|
|
30262
|
+
assertParamExists('getNodeJsBuildDetailsV1', 'username', username)
|
|
30263
|
+
// verify required parameter 'domain' is not null or undefined
|
|
30264
|
+
assertParamExists('getNodeJsBuildDetailsV1', 'domain', domain)
|
|
30265
|
+
// verify required parameter 'uuid' is not null or undefined
|
|
30266
|
+
assertParamExists('getNodeJsBuildDetailsV1', 'uuid', uuid)
|
|
30267
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}`
|
|
30268
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
30269
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)))
|
|
30270
|
+
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
|
|
30271
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
30272
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
30273
|
+
let baseOptions;
|
|
30274
|
+
if (configuration) {
|
|
30275
|
+
baseOptions = configuration.baseOptions;
|
|
30276
|
+
}
|
|
30277
|
+
|
|
30278
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
30279
|
+
const localVarHeaderParameter = {} as any;
|
|
30280
|
+
const localVarQueryParameter = {} as any;
|
|
30281
|
+
|
|
30282
|
+
// authentication apiToken required
|
|
30283
|
+
// http bearer authentication required
|
|
30284
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
30285
|
+
|
|
30286
|
+
|
|
30287
|
+
|
|
29909
30288
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
29910
30289
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
29911
30290
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -29955,6 +30334,110 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Confi
|
|
|
29955
30334
|
|
|
29956
30335
|
|
|
29957
30336
|
|
|
30337
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
30338
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
30339
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
30340
|
+
|
|
30341
|
+
return {
|
|
30342
|
+
url: toPathString(localVarUrlObj),
|
|
30343
|
+
options: localVarRequestOptions,
|
|
30344
|
+
};
|
|
30345
|
+
},
|
|
30346
|
+
/**
|
|
30347
|
+
* Returns the build settings stored for the website: framework (`app_type`), Node.js version, root and output directory, build script, entry file and package manager. Stored settings drive Git auto-deployment builds. A build started through the API uses the values sent in that request and saves them here only when no settings exist yet. Returns 404 until the first build or the first settings update stores them. Use this after a failed build to check whether the framework or the entry file were detected wrong, then fix them with the `Update Node.js build settings` endpoint.
|
|
30348
|
+
* @summary Get Node.js build settings
|
|
30349
|
+
* @param {string} username
|
|
30350
|
+
* @param {string} domain Domain name
|
|
30351
|
+
* @param {*} [options] Override http request option.
|
|
30352
|
+
* @throws {RequiredError}
|
|
30353
|
+
*/
|
|
30354
|
+
getNodeJsBuildSettingsV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
30355
|
+
// verify required parameter 'username' is not null or undefined
|
|
30356
|
+
assertParamExists('getNodeJsBuildSettingsV1', 'username', username)
|
|
30357
|
+
// verify required parameter 'domain' is not null or undefined
|
|
30358
|
+
assertParamExists('getNodeJsBuildSettingsV1', 'domain', domain)
|
|
30359
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings`
|
|
30360
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
30361
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
30362
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
30363
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
30364
|
+
let baseOptions;
|
|
30365
|
+
if (configuration) {
|
|
30366
|
+
baseOptions = configuration.baseOptions;
|
|
30367
|
+
}
|
|
30368
|
+
|
|
30369
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
30370
|
+
const localVarHeaderParameter = {} as any;
|
|
30371
|
+
const localVarQueryParameter = {} as any;
|
|
30372
|
+
|
|
30373
|
+
// authentication apiToken required
|
|
30374
|
+
// http bearer authentication required
|
|
30375
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
30376
|
+
|
|
30377
|
+
|
|
30378
|
+
|
|
30379
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
30380
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
30381
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
30382
|
+
|
|
30383
|
+
return {
|
|
30384
|
+
url: toPathString(localVarUrlObj),
|
|
30385
|
+
options: localVarRequestOptions,
|
|
30386
|
+
};
|
|
30387
|
+
},
|
|
30388
|
+
/**
|
|
30389
|
+
* Returns the Node.js application\'s runtime console log entries, oldest first, each with timestamp, level and message. On the first call send `period` (`1h`, `1d`, `1w` or `1m`) and optionally `levels` and `limit` (1-5000, default 1000); when more entries match than `limit`, the newest are kept. To poll for new entries send `total_lines + 1` from the previous response as `from_line` and omit `period`; `period` and `from_line` cannot be combined. Lines that are not JSON with a timestamp, level and message are skipped, so `logs` may hold fewer than `limit` entries while `total_lines` counts every raw line. Entries with a timestamp before `last_deployed_at` belong to the previous deployment. Returns an empty `logs` list when the application has not written a log file yet.
|
|
30390
|
+
* @summary Get Node.js runtime logs
|
|
30391
|
+
* @param {string} username
|
|
30392
|
+
* @param {string} domain Domain name
|
|
30393
|
+
* @param {GetNodeJsRuntimeLogsV1PeriodEnum} [period] Time window for the first fetch. Required when `from_line` is not sent.
|
|
30394
|
+
* @param {number} [fromLine] 1-based line of the log file to start from. For polling send `total_lines + 1` from the previous response. Cannot be combined with `period`.
|
|
30395
|
+
* @param {number} [limit] Maximum number of log entries to return. When more entries match, the newest are kept.
|
|
30396
|
+
* @param {Array<GetNodeJsRuntimeLogsV1LevelsEnum>} [levels] Return only entries with these log levels, sent as a comma-separated list, e.g. ERROR,WARN. Matching runs on the raw log line, so entries written with numeric levels (for example by pino) are excluded while this filter is set.
|
|
30397
|
+
* @param {*} [options] Override http request option.
|
|
30398
|
+
* @throws {RequiredError}
|
|
30399
|
+
*/
|
|
30400
|
+
getNodeJsRuntimeLogsV1: async (username: string, domain: string, period?: GetNodeJsRuntimeLogsV1PeriodEnum, fromLine?: number, limit?: number, levels?: Array<GetNodeJsRuntimeLogsV1LevelsEnum>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
30401
|
+
// verify required parameter 'username' is not null or undefined
|
|
30402
|
+
assertParamExists('getNodeJsRuntimeLogsV1', 'username', username)
|
|
30403
|
+
// verify required parameter 'domain' is not null or undefined
|
|
30404
|
+
assertParamExists('getNodeJsRuntimeLogsV1', 'domain', domain)
|
|
30405
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/runtime-logs`
|
|
30406
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
30407
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
30408
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
30409
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
30410
|
+
let baseOptions;
|
|
30411
|
+
if (configuration) {
|
|
30412
|
+
baseOptions = configuration.baseOptions;
|
|
30413
|
+
}
|
|
30414
|
+
|
|
30415
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
30416
|
+
const localVarHeaderParameter = {} as any;
|
|
30417
|
+
const localVarQueryParameter = {} as any;
|
|
30418
|
+
|
|
30419
|
+
// authentication apiToken required
|
|
30420
|
+
// http bearer authentication required
|
|
30421
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
30422
|
+
|
|
30423
|
+
if (period !== undefined) {
|
|
30424
|
+
localVarQueryParameter['period'] = period;
|
|
30425
|
+
}
|
|
30426
|
+
|
|
30427
|
+
if (fromLine !== undefined) {
|
|
30428
|
+
localVarQueryParameter['from_line'] = fromLine;
|
|
30429
|
+
}
|
|
30430
|
+
|
|
30431
|
+
if (limit !== undefined) {
|
|
30432
|
+
localVarQueryParameter['limit'] = limit;
|
|
30433
|
+
}
|
|
30434
|
+
|
|
30435
|
+
if (levels) {
|
|
30436
|
+
localVarQueryParameter['levels'] = levels.join(COLLECTION_FORMATS.csv);
|
|
30437
|
+
}
|
|
30438
|
+
|
|
30439
|
+
|
|
30440
|
+
|
|
29958
30441
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
29959
30442
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
29960
30443
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -30291,6 +30774,54 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Confi
|
|
|
30291
30774
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
30292
30775
|
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1NodeJsStartBuildRequest, localVarRequestOptions, configuration)
|
|
30293
30776
|
|
|
30777
|
+
return {
|
|
30778
|
+
url: toPathString(localVarUrlObj),
|
|
30779
|
+
options: localVarRequestOptions,
|
|
30780
|
+
};
|
|
30781
|
+
},
|
|
30782
|
+
/**
|
|
30783
|
+
* Replaces the build settings stored for the website. Send the full set: `node_version` is required and every nullable field you omit is stored as null. Creates the settings when none exist yet. This does not start a build. Stored settings drive Git auto-deployment builds; a build started through the API uses the values sent in that request, so to rebuild with corrected settings call `Start Node.js build` with the same values. Typical fixes: a wrong `app_type` after auto-detection, or a missing `entry_file` for express, fastify, nest, nuxt and hono apps.
|
|
30784
|
+
* @summary Update Node.js build settings
|
|
30785
|
+
* @param {string} username
|
|
30786
|
+
* @param {string} domain Domain name
|
|
30787
|
+
* @param {HostingV1NodeJsUpdateBuildSettingsRequest} hostingV1NodeJsUpdateBuildSettingsRequest
|
|
30788
|
+
* @param {*} [options] Override http request option.
|
|
30789
|
+
* @throws {RequiredError}
|
|
30790
|
+
*/
|
|
30791
|
+
updateNodeJsBuildSettingsV1: async (username: string, domain: string, hostingV1NodeJsUpdateBuildSettingsRequest: HostingV1NodeJsUpdateBuildSettingsRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
30792
|
+
// verify required parameter 'username' is not null or undefined
|
|
30793
|
+
assertParamExists('updateNodeJsBuildSettingsV1', 'username', username)
|
|
30794
|
+
// verify required parameter 'domain' is not null or undefined
|
|
30795
|
+
assertParamExists('updateNodeJsBuildSettingsV1', 'domain', domain)
|
|
30796
|
+
// verify required parameter 'hostingV1NodeJsUpdateBuildSettingsRequest' is not null or undefined
|
|
30797
|
+
assertParamExists('updateNodeJsBuildSettingsV1', 'hostingV1NodeJsUpdateBuildSettingsRequest', hostingV1NodeJsUpdateBuildSettingsRequest)
|
|
30798
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings`
|
|
30799
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
30800
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
30801
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
30802
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
30803
|
+
let baseOptions;
|
|
30804
|
+
if (configuration) {
|
|
30805
|
+
baseOptions = configuration.baseOptions;
|
|
30806
|
+
}
|
|
30807
|
+
|
|
30808
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
30809
|
+
const localVarHeaderParameter = {} as any;
|
|
30810
|
+
const localVarQueryParameter = {} as any;
|
|
30811
|
+
|
|
30812
|
+
// authentication apiToken required
|
|
30813
|
+
// http bearer authentication required
|
|
30814
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
30815
|
+
|
|
30816
|
+
|
|
30817
|
+
|
|
30818
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
30819
|
+
|
|
30820
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
30821
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
30822
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
30823
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1NodeJsUpdateBuildSettingsRequest, localVarRequestOptions, configuration)
|
|
30824
|
+
|
|
30294
30825
|
return {
|
|
30295
30826
|
url: toPathString(localVarUrlObj),
|
|
30296
30827
|
options: localVarRequestOptions,
|
|
@@ -30306,6 +30837,33 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Confi
|
|
|
30306
30837
|
export const HostingNodeJSApiFp = function(configuration?: Configuration) {
|
|
30307
30838
|
const localVarAxiosParamCreator = HostingNodeJSApiAxiosParamCreator(configuration)
|
|
30308
30839
|
return {
|
|
30840
|
+
/**
|
|
30841
|
+
* Returns an AI analysis of why a build failed and how to fix it, based on the build logs, the project file list and package.json. Only builds in the `failed` state can be analysed; any other state returns 422. When no analysis could be produced both `analysis` and `solution` are null, in which case read `Get NodeJS build logs` instead. Each call runs the analysis again, so call it once per failed build and keep the result. Limited to 5 calls per minute per API client (429 above that).
|
|
30842
|
+
* @summary Analyse failed Node.js build
|
|
30843
|
+
* @param {string} username
|
|
30844
|
+
* @param {string} domain Domain name
|
|
30845
|
+
* @param {string} uuid Build UUID
|
|
30846
|
+
* @param {*} [options] Override http request option.
|
|
30847
|
+
* @throws {RequiredError}
|
|
30848
|
+
*/
|
|
30849
|
+
async analyseFailedNodeJsBuildV1(username: string, domain: string, uuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1NodeJsBuildAnalysisResource>> {
|
|
30850
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.analyseFailedNodeJsBuildV1(username, domain, uuid, options);
|
|
30851
|
+
const localVarOperationServerBasePath = operationServerMap['HostingNodeJSApi.analyseFailedNodeJsBuildV1']?.[0]?.url;
|
|
30852
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
30853
|
+
},
|
|
30854
|
+
/**
|
|
30855
|
+
* Empties the Node.js application\'s runtime log file. This cannot be undone, so confirm with the user before calling it. Returns success even when no log file exists yet. Use it before reproducing a problem so the next `Get Node.js runtime logs` call returns only fresh entries; start that call with `period` again instead of reusing a `from_line` from before the clear.
|
|
30856
|
+
* @summary Clear Node.js runtime logs
|
|
30857
|
+
* @param {string} username
|
|
30858
|
+
* @param {string} domain Domain name
|
|
30859
|
+
* @param {*} [options] Override http request option.
|
|
30860
|
+
* @throws {RequiredError}
|
|
30861
|
+
*/
|
|
30862
|
+
async clearNodeJsRuntimeLogsV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
30863
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.clearNodeJsRuntimeLogsV1(username, domain, options);
|
|
30864
|
+
const localVarOperationServerBasePath = operationServerMap['HostingNodeJSApi.clearNodeJsRuntimeLogsV1']?.[0]?.url;
|
|
30865
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
30866
|
+
},
|
|
30309
30867
|
/**
|
|
30310
30868
|
* Retrieve logs from a specific Node.js build process. To stream live output while a build is running, poll this endpoint repeatedly while the build state is `running`, passing the previously returned `lines` count as `from_line` to fetch only new output since the last call. Log content may contain ANSI escape sequences (color codes).
|
|
30311
30869
|
* @summary Get NodeJS build logs
|
|
@@ -30321,6 +30879,20 @@ export const HostingNodeJSApiFp = function(configuration?: Configuration) {
|
|
|
30321
30879
|
const localVarOperationServerBasePath = operationServerMap['HostingNodeJSApi.getNodeJSBuildLogsV1']?.[0]?.url;
|
|
30322
30880
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
30323
30881
|
},
|
|
30882
|
+
/**
|
|
30883
|
+
* Returns one build by UUID: its state (`pending`, `running`, `completed`, `failed`), the options it ran with and timestamps. Poll this while a build is pending or running. When it is failed, read `Get NodeJS build logs` and `Analyse failed Node.js build` for the cause. Returns 404 when the UUID does not belong to a build of this website.
|
|
30884
|
+
* @summary Get Node.js build details
|
|
30885
|
+
* @param {string} username
|
|
30886
|
+
* @param {string} domain Domain name
|
|
30887
|
+
* @param {string} uuid Build UUID
|
|
30888
|
+
* @param {*} [options] Override http request option.
|
|
30889
|
+
* @throws {RequiredError}
|
|
30890
|
+
*/
|
|
30891
|
+
async getNodeJsBuildDetailsV1(username: string, domain: string, uuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1NodeJsBuildResource>> {
|
|
30892
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getNodeJsBuildDetailsV1(username, domain, uuid, options);
|
|
30893
|
+
const localVarOperationServerBasePath = operationServerMap['HostingNodeJSApi.getNodeJsBuildDetailsV1']?.[0]?.url;
|
|
30894
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
30895
|
+
},
|
|
30324
30896
|
/**
|
|
30325
30897
|
* Auto-detect Node.js build settings from a package.json inside an archive already on the server. Use this before calling `Start Node.js Build` to preview what settings will be used, or to let the user review and override values (framework, node version, root directory, output directory, build script) before committing to a build. The archive must already be present on the website\'s file storage. Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first.
|
|
30326
30898
|
* @summary Get Node.js build settings from archive
|
|
@@ -30335,6 +30907,36 @@ export const HostingNodeJSApiFp = function(configuration?: Configuration) {
|
|
|
30335
30907
|
const localVarOperationServerBasePath = operationServerMap['HostingNodeJSApi.getNodeJsBuildSettingsFromArchiveV1']?.[0]?.url;
|
|
30336
30908
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
30337
30909
|
},
|
|
30910
|
+
/**
|
|
30911
|
+
* Returns the build settings stored for the website: framework (`app_type`), Node.js version, root and output directory, build script, entry file and package manager. Stored settings drive Git auto-deployment builds. A build started through the API uses the values sent in that request and saves them here only when no settings exist yet. Returns 404 until the first build or the first settings update stores them. Use this after a failed build to check whether the framework or the entry file were detected wrong, then fix them with the `Update Node.js build settings` endpoint.
|
|
30912
|
+
* @summary Get Node.js build settings
|
|
30913
|
+
* @param {string} username
|
|
30914
|
+
* @param {string} domain Domain name
|
|
30915
|
+
* @param {*} [options] Override http request option.
|
|
30916
|
+
* @throws {RequiredError}
|
|
30917
|
+
*/
|
|
30918
|
+
async getNodeJsBuildSettingsV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1NodeJsStoredBuildSettingsResource>> {
|
|
30919
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getNodeJsBuildSettingsV1(username, domain, options);
|
|
30920
|
+
const localVarOperationServerBasePath = operationServerMap['HostingNodeJSApi.getNodeJsBuildSettingsV1']?.[0]?.url;
|
|
30921
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
30922
|
+
},
|
|
30923
|
+
/**
|
|
30924
|
+
* Returns the Node.js application\'s runtime console log entries, oldest first, each with timestamp, level and message. On the first call send `period` (`1h`, `1d`, `1w` or `1m`) and optionally `levels` and `limit` (1-5000, default 1000); when more entries match than `limit`, the newest are kept. To poll for new entries send `total_lines + 1` from the previous response as `from_line` and omit `period`; `period` and `from_line` cannot be combined. Lines that are not JSON with a timestamp, level and message are skipped, so `logs` may hold fewer than `limit` entries while `total_lines` counts every raw line. Entries with a timestamp before `last_deployed_at` belong to the previous deployment. Returns an empty `logs` list when the application has not written a log file yet.
|
|
30925
|
+
* @summary Get Node.js runtime logs
|
|
30926
|
+
* @param {string} username
|
|
30927
|
+
* @param {string} domain Domain name
|
|
30928
|
+
* @param {GetNodeJsRuntimeLogsV1PeriodEnum} [period] Time window for the first fetch. Required when `from_line` is not sent.
|
|
30929
|
+
* @param {number} [fromLine] 1-based line of the log file to start from. For polling send `total_lines + 1` from the previous response. Cannot be combined with `period`.
|
|
30930
|
+
* @param {number} [limit] Maximum number of log entries to return. When more entries match, the newest are kept.
|
|
30931
|
+
* @param {Array<GetNodeJsRuntimeLogsV1LevelsEnum>} [levels] Return only entries with these log levels, sent as a comma-separated list, e.g. ERROR,WARN. Matching runs on the raw log line, so entries written with numeric levels (for example by pino) are excluded while this filter is set.
|
|
30932
|
+
* @param {*} [options] Override http request option.
|
|
30933
|
+
* @throws {RequiredError}
|
|
30934
|
+
*/
|
|
30935
|
+
async getNodeJsRuntimeLogsV1(username: string, domain: string, period?: GetNodeJsRuntimeLogsV1PeriodEnum, fromLine?: number, limit?: number, levels?: Array<GetNodeJsRuntimeLogsV1LevelsEnum>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1NodeJsRuntimeLogsResource>> {
|
|
30936
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getNodeJsRuntimeLogsV1(username, domain, period, fromLine, limit, levels, options);
|
|
30937
|
+
const localVarOperationServerBasePath = operationServerMap['HostingNodeJSApi.getNodeJsRuntimeLogsV1']?.[0]?.url;
|
|
30938
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
30939
|
+
},
|
|
30338
30940
|
/**
|
|
30339
30941
|
* Retrieve a paginated list of Node.js build processes for a specific website. Each build represents a single run of the Node.js build pipeline. Use the `states` query parameter to filter results by build state (pending, running, completed, failed). Use the `uuid` from a build to poll its output via the `Get Node.js Build Logs` endpoint.
|
|
30340
30942
|
* @summary List NodeJS builds
|
|
@@ -30433,6 +31035,20 @@ export const HostingNodeJSApiFp = function(configuration?: Configuration) {
|
|
|
30433
31035
|
const localVarOperationServerBasePath = operationServerMap['HostingNodeJSApi.startNodeJsBuildV1']?.[0]?.url;
|
|
30434
31036
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
30435
31037
|
},
|
|
31038
|
+
/**
|
|
31039
|
+
* Replaces the build settings stored for the website. Send the full set: `node_version` is required and every nullable field you omit is stored as null. Creates the settings when none exist yet. This does not start a build. Stored settings drive Git auto-deployment builds; a build started through the API uses the values sent in that request, so to rebuild with corrected settings call `Start Node.js build` with the same values. Typical fixes: a wrong `app_type` after auto-detection, or a missing `entry_file` for express, fastify, nest, nuxt and hono apps.
|
|
31040
|
+
* @summary Update Node.js build settings
|
|
31041
|
+
* @param {string} username
|
|
31042
|
+
* @param {string} domain Domain name
|
|
31043
|
+
* @param {HostingV1NodeJsUpdateBuildSettingsRequest} hostingV1NodeJsUpdateBuildSettingsRequest
|
|
31044
|
+
* @param {*} [options] Override http request option.
|
|
31045
|
+
* @throws {RequiredError}
|
|
31046
|
+
*/
|
|
31047
|
+
async updateNodeJsBuildSettingsV1(username: string, domain: string, hostingV1NodeJsUpdateBuildSettingsRequest: HostingV1NodeJsUpdateBuildSettingsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1NodeJsStoredBuildSettingsResource>> {
|
|
31048
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateNodeJsBuildSettingsV1(username, domain, hostingV1NodeJsUpdateBuildSettingsRequest, options);
|
|
31049
|
+
const localVarOperationServerBasePath = operationServerMap['HostingNodeJSApi.updateNodeJsBuildSettingsV1']?.[0]?.url;
|
|
31050
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31051
|
+
},
|
|
30436
31052
|
}
|
|
30437
31053
|
};
|
|
30438
31054
|
|
|
@@ -30443,6 +31059,29 @@ export const HostingNodeJSApiFp = function(configuration?: Configuration) {
|
|
|
30443
31059
|
export const HostingNodeJSApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
30444
31060
|
const localVarFp = HostingNodeJSApiFp(configuration)
|
|
30445
31061
|
return {
|
|
31062
|
+
/**
|
|
31063
|
+
* Returns an AI analysis of why a build failed and how to fix it, based on the build logs, the project file list and package.json. Only builds in the `failed` state can be analysed; any other state returns 422. When no analysis could be produced both `analysis` and `solution` are null, in which case read `Get NodeJS build logs` instead. Each call runs the analysis again, so call it once per failed build and keep the result. Limited to 5 calls per minute per API client (429 above that).
|
|
31064
|
+
* @summary Analyse failed Node.js build
|
|
31065
|
+
* @param {string} username
|
|
31066
|
+
* @param {string} domain Domain name
|
|
31067
|
+
* @param {string} uuid Build UUID
|
|
31068
|
+
* @param {*} [options] Override http request option.
|
|
31069
|
+
* @throws {RequiredError}
|
|
31070
|
+
*/
|
|
31071
|
+
analyseFailedNodeJsBuildV1(username: string, domain: string, uuid: string, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1NodeJsBuildAnalysisResource> {
|
|
31072
|
+
return localVarFp.analyseFailedNodeJsBuildV1(username, domain, uuid, options).then((request) => request(axios, basePath));
|
|
31073
|
+
},
|
|
31074
|
+
/**
|
|
31075
|
+
* Empties the Node.js application\'s runtime log file. This cannot be undone, so confirm with the user before calling it. Returns success even when no log file exists yet. Use it before reproducing a problem so the next `Get Node.js runtime logs` call returns only fresh entries; start that call with `period` again instead of reusing a `from_line` from before the clear.
|
|
31076
|
+
* @summary Clear Node.js runtime logs
|
|
31077
|
+
* @param {string} username
|
|
31078
|
+
* @param {string} domain Domain name
|
|
31079
|
+
* @param {*} [options] Override http request option.
|
|
31080
|
+
* @throws {RequiredError}
|
|
31081
|
+
*/
|
|
31082
|
+
clearNodeJsRuntimeLogsV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
31083
|
+
return localVarFp.clearNodeJsRuntimeLogsV1(username, domain, options).then((request) => request(axios, basePath));
|
|
31084
|
+
},
|
|
30446
31085
|
/**
|
|
30447
31086
|
* Retrieve logs from a specific Node.js build process. To stream live output while a build is running, poll this endpoint repeatedly while the build state is `running`, passing the previously returned `lines` count as `from_line` to fetch only new output since the last call. Log content may contain ANSI escape sequences (color codes).
|
|
30448
31087
|
* @summary Get NodeJS build logs
|
|
@@ -30456,6 +31095,18 @@ export const HostingNodeJSApiFactory = function (configuration?: Configuration,
|
|
|
30456
31095
|
getNodeJSBuildLogsV1(username: string, domain: string, uuid: string, fromLine?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1NodeJsBuildLogsResource> {
|
|
30457
31096
|
return localVarFp.getNodeJSBuildLogsV1(username, domain, uuid, fromLine, options).then((request) => request(axios, basePath));
|
|
30458
31097
|
},
|
|
31098
|
+
/**
|
|
31099
|
+
* Returns one build by UUID: its state (`pending`, `running`, `completed`, `failed`), the options it ran with and timestamps. Poll this while a build is pending or running. When it is failed, read `Get NodeJS build logs` and `Analyse failed Node.js build` for the cause. Returns 404 when the UUID does not belong to a build of this website.
|
|
31100
|
+
* @summary Get Node.js build details
|
|
31101
|
+
* @param {string} username
|
|
31102
|
+
* @param {string} domain Domain name
|
|
31103
|
+
* @param {string} uuid Build UUID
|
|
31104
|
+
* @param {*} [options] Override http request option.
|
|
31105
|
+
* @throws {RequiredError}
|
|
31106
|
+
*/
|
|
31107
|
+
getNodeJsBuildDetailsV1(username: string, domain: string, uuid: string, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1NodeJsBuildResource> {
|
|
31108
|
+
return localVarFp.getNodeJsBuildDetailsV1(username, domain, uuid, options).then((request) => request(axios, basePath));
|
|
31109
|
+
},
|
|
30459
31110
|
/**
|
|
30460
31111
|
* Auto-detect Node.js build settings from a package.json inside an archive already on the server. Use this before calling `Start Node.js Build` to preview what settings will be used, or to let the user review and override values (framework, node version, root directory, output directory, build script) before committing to a build. The archive must already be present on the website\'s file storage. Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first.
|
|
30461
31112
|
* @summary Get Node.js build settings from archive
|
|
@@ -30468,6 +31119,32 @@ export const HostingNodeJSApiFactory = function (configuration?: Configuration,
|
|
|
30468
31119
|
getNodeJsBuildSettingsFromArchiveV1(username: string, domain: string, archivePath: string, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1NodeJsBuildSettingsResource> {
|
|
30469
31120
|
return localVarFp.getNodeJsBuildSettingsFromArchiveV1(username, domain, archivePath, options).then((request) => request(axios, basePath));
|
|
30470
31121
|
},
|
|
31122
|
+
/**
|
|
31123
|
+
* Returns the build settings stored for the website: framework (`app_type`), Node.js version, root and output directory, build script, entry file and package manager. Stored settings drive Git auto-deployment builds. A build started through the API uses the values sent in that request and saves them here only when no settings exist yet. Returns 404 until the first build or the first settings update stores them. Use this after a failed build to check whether the framework or the entry file were detected wrong, then fix them with the `Update Node.js build settings` endpoint.
|
|
31124
|
+
* @summary Get Node.js build settings
|
|
31125
|
+
* @param {string} username
|
|
31126
|
+
* @param {string} domain Domain name
|
|
31127
|
+
* @param {*} [options] Override http request option.
|
|
31128
|
+
* @throws {RequiredError}
|
|
31129
|
+
*/
|
|
31130
|
+
getNodeJsBuildSettingsV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1NodeJsStoredBuildSettingsResource> {
|
|
31131
|
+
return localVarFp.getNodeJsBuildSettingsV1(username, domain, options).then((request) => request(axios, basePath));
|
|
31132
|
+
},
|
|
31133
|
+
/**
|
|
31134
|
+
* Returns the Node.js application\'s runtime console log entries, oldest first, each with timestamp, level and message. On the first call send `period` (`1h`, `1d`, `1w` or `1m`) and optionally `levels` and `limit` (1-5000, default 1000); when more entries match than `limit`, the newest are kept. To poll for new entries send `total_lines + 1` from the previous response as `from_line` and omit `period`; `period` and `from_line` cannot be combined. Lines that are not JSON with a timestamp, level and message are skipped, so `logs` may hold fewer than `limit` entries while `total_lines` counts every raw line. Entries with a timestamp before `last_deployed_at` belong to the previous deployment. Returns an empty `logs` list when the application has not written a log file yet.
|
|
31135
|
+
* @summary Get Node.js runtime logs
|
|
31136
|
+
* @param {string} username
|
|
31137
|
+
* @param {string} domain Domain name
|
|
31138
|
+
* @param {GetNodeJsRuntimeLogsV1PeriodEnum} [period] Time window for the first fetch. Required when `from_line` is not sent.
|
|
31139
|
+
* @param {number} [fromLine] 1-based line of the log file to start from. For polling send `total_lines + 1` from the previous response. Cannot be combined with `period`.
|
|
31140
|
+
* @param {number} [limit] Maximum number of log entries to return. When more entries match, the newest are kept.
|
|
31141
|
+
* @param {Array<GetNodeJsRuntimeLogsV1LevelsEnum>} [levels] Return only entries with these log levels, sent as a comma-separated list, e.g. ERROR,WARN. Matching runs on the raw log line, so entries written with numeric levels (for example by pino) are excluded while this filter is set.
|
|
31142
|
+
* @param {*} [options] Override http request option.
|
|
31143
|
+
* @throws {RequiredError}
|
|
31144
|
+
*/
|
|
31145
|
+
getNodeJsRuntimeLogsV1(username: string, domain: string, period?: GetNodeJsRuntimeLogsV1PeriodEnum, fromLine?: number, limit?: number, levels?: Array<GetNodeJsRuntimeLogsV1LevelsEnum>, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1NodeJsRuntimeLogsResource> {
|
|
31146
|
+
return localVarFp.getNodeJsRuntimeLogsV1(username, domain, period, fromLine, limit, levels, options).then((request) => request(axios, basePath));
|
|
31147
|
+
},
|
|
30471
31148
|
/**
|
|
30472
31149
|
* Retrieve a paginated list of Node.js build processes for a specific website. Each build represents a single run of the Node.js build pipeline. Use the `states` query parameter to filter results by build state (pending, running, completed, failed). Use the `uuid` from a build to poll its output via the `Get Node.js Build Logs` endpoint.
|
|
30473
31150
|
* @summary List NodeJS builds
|
|
@@ -30552,6 +31229,18 @@ export const HostingNodeJSApiFactory = function (configuration?: Configuration,
|
|
|
30552
31229
|
startNodeJsBuildV1(username: string, domain: string, hostingV1NodeJsStartBuildRequest: HostingV1NodeJsStartBuildRequest, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1NodeJsBuildResource> {
|
|
30553
31230
|
return localVarFp.startNodeJsBuildV1(username, domain, hostingV1NodeJsStartBuildRequest, options).then((request) => request(axios, basePath));
|
|
30554
31231
|
},
|
|
31232
|
+
/**
|
|
31233
|
+
* Replaces the build settings stored for the website. Send the full set: `node_version` is required and every nullable field you omit is stored as null. Creates the settings when none exist yet. This does not start a build. Stored settings drive Git auto-deployment builds; a build started through the API uses the values sent in that request, so to rebuild with corrected settings call `Start Node.js build` with the same values. Typical fixes: a wrong `app_type` after auto-detection, or a missing `entry_file` for express, fastify, nest, nuxt and hono apps.
|
|
31234
|
+
* @summary Update Node.js build settings
|
|
31235
|
+
* @param {string} username
|
|
31236
|
+
* @param {string} domain Domain name
|
|
31237
|
+
* @param {HostingV1NodeJsUpdateBuildSettingsRequest} hostingV1NodeJsUpdateBuildSettingsRequest
|
|
31238
|
+
* @param {*} [options] Override http request option.
|
|
31239
|
+
* @throws {RequiredError}
|
|
31240
|
+
*/
|
|
31241
|
+
updateNodeJsBuildSettingsV1(username: string, domain: string, hostingV1NodeJsUpdateBuildSettingsRequest: HostingV1NodeJsUpdateBuildSettingsRequest, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1NodeJsStoredBuildSettingsResource> {
|
|
31242
|
+
return localVarFp.updateNodeJsBuildSettingsV1(username, domain, hostingV1NodeJsUpdateBuildSettingsRequest, options).then((request) => request(axios, basePath));
|
|
31243
|
+
},
|
|
30555
31244
|
};
|
|
30556
31245
|
};
|
|
30557
31246
|
|
|
@@ -30562,6 +31251,33 @@ export const HostingNodeJSApiFactory = function (configuration?: Configuration,
|
|
|
30562
31251
|
* @extends {BaseAPI}
|
|
30563
31252
|
*/
|
|
30564
31253
|
export class HostingNodeJSApi extends BaseAPI {
|
|
31254
|
+
/**
|
|
31255
|
+
* Returns an AI analysis of why a build failed and how to fix it, based on the build logs, the project file list and package.json. Only builds in the `failed` state can be analysed; any other state returns 422. When no analysis could be produced both `analysis` and `solution` are null, in which case read `Get NodeJS build logs` instead. Each call runs the analysis again, so call it once per failed build and keep the result. Limited to 5 calls per minute per API client (429 above that).
|
|
31256
|
+
* @summary Analyse failed Node.js build
|
|
31257
|
+
* @param {string} username
|
|
31258
|
+
* @param {string} domain Domain name
|
|
31259
|
+
* @param {string} uuid Build UUID
|
|
31260
|
+
* @param {*} [options] Override http request option.
|
|
31261
|
+
* @throws {RequiredError}
|
|
31262
|
+
* @memberof HostingNodeJSApi
|
|
31263
|
+
*/
|
|
31264
|
+
public analyseFailedNodeJsBuildV1(username: string, domain: string, uuid: string, options?: RawAxiosRequestConfig) {
|
|
31265
|
+
return HostingNodeJSApiFp(this.configuration).analyseFailedNodeJsBuildV1(username, domain, uuid, options).then((request) => request(this.axios, this.basePath));
|
|
31266
|
+
}
|
|
31267
|
+
|
|
31268
|
+
/**
|
|
31269
|
+
* Empties the Node.js application\'s runtime log file. This cannot be undone, so confirm with the user before calling it. Returns success even when no log file exists yet. Use it before reproducing a problem so the next `Get Node.js runtime logs` call returns only fresh entries; start that call with `period` again instead of reusing a `from_line` from before the clear.
|
|
31270
|
+
* @summary Clear Node.js runtime logs
|
|
31271
|
+
* @param {string} username
|
|
31272
|
+
* @param {string} domain Domain name
|
|
31273
|
+
* @param {*} [options] Override http request option.
|
|
31274
|
+
* @throws {RequiredError}
|
|
31275
|
+
* @memberof HostingNodeJSApi
|
|
31276
|
+
*/
|
|
31277
|
+
public clearNodeJsRuntimeLogsV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
31278
|
+
return HostingNodeJSApiFp(this.configuration).clearNodeJsRuntimeLogsV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
31279
|
+
}
|
|
31280
|
+
|
|
30565
31281
|
/**
|
|
30566
31282
|
* Retrieve logs from a specific Node.js build process. To stream live output while a build is running, poll this endpoint repeatedly while the build state is `running`, passing the previously returned `lines` count as `from_line` to fetch only new output since the last call. Log content may contain ANSI escape sequences (color codes).
|
|
30567
31283
|
* @summary Get NodeJS build logs
|
|
@@ -30577,6 +31293,20 @@ export class HostingNodeJSApi extends BaseAPI {
|
|
|
30577
31293
|
return HostingNodeJSApiFp(this.configuration).getNodeJSBuildLogsV1(username, domain, uuid, fromLine, options).then((request) => request(this.axios, this.basePath));
|
|
30578
31294
|
}
|
|
30579
31295
|
|
|
31296
|
+
/**
|
|
31297
|
+
* Returns one build by UUID: its state (`pending`, `running`, `completed`, `failed`), the options it ran with and timestamps. Poll this while a build is pending or running. When it is failed, read `Get NodeJS build logs` and `Analyse failed Node.js build` for the cause. Returns 404 when the UUID does not belong to a build of this website.
|
|
31298
|
+
* @summary Get Node.js build details
|
|
31299
|
+
* @param {string} username
|
|
31300
|
+
* @param {string} domain Domain name
|
|
31301
|
+
* @param {string} uuid Build UUID
|
|
31302
|
+
* @param {*} [options] Override http request option.
|
|
31303
|
+
* @throws {RequiredError}
|
|
31304
|
+
* @memberof HostingNodeJSApi
|
|
31305
|
+
*/
|
|
31306
|
+
public getNodeJsBuildDetailsV1(username: string, domain: string, uuid: string, options?: RawAxiosRequestConfig) {
|
|
31307
|
+
return HostingNodeJSApiFp(this.configuration).getNodeJsBuildDetailsV1(username, domain, uuid, options).then((request) => request(this.axios, this.basePath));
|
|
31308
|
+
}
|
|
31309
|
+
|
|
30580
31310
|
/**
|
|
30581
31311
|
* Auto-detect Node.js build settings from a package.json inside an archive already on the server. Use this before calling `Start Node.js Build` to preview what settings will be used, or to let the user review and override values (framework, node version, root directory, output directory, build script) before committing to a build. The archive must already be present on the website\'s file storage. Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first.
|
|
30582
31312
|
* @summary Get Node.js build settings from archive
|
|
@@ -30591,6 +31321,36 @@ export class HostingNodeJSApi extends BaseAPI {
|
|
|
30591
31321
|
return HostingNodeJSApiFp(this.configuration).getNodeJsBuildSettingsFromArchiveV1(username, domain, archivePath, options).then((request) => request(this.axios, this.basePath));
|
|
30592
31322
|
}
|
|
30593
31323
|
|
|
31324
|
+
/**
|
|
31325
|
+
* Returns the build settings stored for the website: framework (`app_type`), Node.js version, root and output directory, build script, entry file and package manager. Stored settings drive Git auto-deployment builds. A build started through the API uses the values sent in that request and saves them here only when no settings exist yet. Returns 404 until the first build or the first settings update stores them. Use this after a failed build to check whether the framework or the entry file were detected wrong, then fix them with the `Update Node.js build settings` endpoint.
|
|
31326
|
+
* @summary Get Node.js build settings
|
|
31327
|
+
* @param {string} username
|
|
31328
|
+
* @param {string} domain Domain name
|
|
31329
|
+
* @param {*} [options] Override http request option.
|
|
31330
|
+
* @throws {RequiredError}
|
|
31331
|
+
* @memberof HostingNodeJSApi
|
|
31332
|
+
*/
|
|
31333
|
+
public getNodeJsBuildSettingsV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
31334
|
+
return HostingNodeJSApiFp(this.configuration).getNodeJsBuildSettingsV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
31335
|
+
}
|
|
31336
|
+
|
|
31337
|
+
/**
|
|
31338
|
+
* Returns the Node.js application\'s runtime console log entries, oldest first, each with timestamp, level and message. On the first call send `period` (`1h`, `1d`, `1w` or `1m`) and optionally `levels` and `limit` (1-5000, default 1000); when more entries match than `limit`, the newest are kept. To poll for new entries send `total_lines + 1` from the previous response as `from_line` and omit `period`; `period` and `from_line` cannot be combined. Lines that are not JSON with a timestamp, level and message are skipped, so `logs` may hold fewer than `limit` entries while `total_lines` counts every raw line. Entries with a timestamp before `last_deployed_at` belong to the previous deployment. Returns an empty `logs` list when the application has not written a log file yet.
|
|
31339
|
+
* @summary Get Node.js runtime logs
|
|
31340
|
+
* @param {string} username
|
|
31341
|
+
* @param {string} domain Domain name
|
|
31342
|
+
* @param {GetNodeJsRuntimeLogsV1PeriodEnum} [period] Time window for the first fetch. Required when `from_line` is not sent.
|
|
31343
|
+
* @param {number} [fromLine] 1-based line of the log file to start from. For polling send `total_lines + 1` from the previous response. Cannot be combined with `period`.
|
|
31344
|
+
* @param {number} [limit] Maximum number of log entries to return. When more entries match, the newest are kept.
|
|
31345
|
+
* @param {Array<GetNodeJsRuntimeLogsV1LevelsEnum>} [levels] Return only entries with these log levels, sent as a comma-separated list, e.g. ERROR,WARN. Matching runs on the raw log line, so entries written with numeric levels (for example by pino) are excluded while this filter is set.
|
|
31346
|
+
* @param {*} [options] Override http request option.
|
|
31347
|
+
* @throws {RequiredError}
|
|
31348
|
+
* @memberof HostingNodeJSApi
|
|
31349
|
+
*/
|
|
31350
|
+
public getNodeJsRuntimeLogsV1(username: string, domain: string, period?: GetNodeJsRuntimeLogsV1PeriodEnum, fromLine?: number, limit?: number, levels?: Array<GetNodeJsRuntimeLogsV1LevelsEnum>, options?: RawAxiosRequestConfig) {
|
|
31351
|
+
return HostingNodeJSApiFp(this.configuration).getNodeJsRuntimeLogsV1(username, domain, period, fromLine, limit, levels, options).then((request) => request(this.axios, this.basePath));
|
|
31352
|
+
}
|
|
31353
|
+
|
|
30594
31354
|
/**
|
|
30595
31355
|
* Retrieve a paginated list of Node.js build processes for a specific website. Each build represents a single run of the Node.js build pipeline. Use the `states` query parameter to filter results by build state (pending, running, completed, failed). Use the `uuid` from a build to poll its output via the `Get Node.js Build Logs` endpoint.
|
|
30596
31356
|
* @summary List NodeJS builds
|
|
@@ -30688,8 +31448,44 @@ export class HostingNodeJSApi extends BaseAPI {
|
|
|
30688
31448
|
public startNodeJsBuildV1(username: string, domain: string, hostingV1NodeJsStartBuildRequest: HostingV1NodeJsStartBuildRequest, options?: RawAxiosRequestConfig) {
|
|
30689
31449
|
return HostingNodeJSApiFp(this.configuration).startNodeJsBuildV1(username, domain, hostingV1NodeJsStartBuildRequest, options).then((request) => request(this.axios, this.basePath));
|
|
30690
31450
|
}
|
|
31451
|
+
|
|
31452
|
+
/**
|
|
31453
|
+
* Replaces the build settings stored for the website. Send the full set: `node_version` is required and every nullable field you omit is stored as null. Creates the settings when none exist yet. This does not start a build. Stored settings drive Git auto-deployment builds; a build started through the API uses the values sent in that request, so to rebuild with corrected settings call `Start Node.js build` with the same values. Typical fixes: a wrong `app_type` after auto-detection, or a missing `entry_file` for express, fastify, nest, nuxt and hono apps.
|
|
31454
|
+
* @summary Update Node.js build settings
|
|
31455
|
+
* @param {string} username
|
|
31456
|
+
* @param {string} domain Domain name
|
|
31457
|
+
* @param {HostingV1NodeJsUpdateBuildSettingsRequest} hostingV1NodeJsUpdateBuildSettingsRequest
|
|
31458
|
+
* @param {*} [options] Override http request option.
|
|
31459
|
+
* @throws {RequiredError}
|
|
31460
|
+
* @memberof HostingNodeJSApi
|
|
31461
|
+
*/
|
|
31462
|
+
public updateNodeJsBuildSettingsV1(username: string, domain: string, hostingV1NodeJsUpdateBuildSettingsRequest: HostingV1NodeJsUpdateBuildSettingsRequest, options?: RawAxiosRequestConfig) {
|
|
31463
|
+
return HostingNodeJSApiFp(this.configuration).updateNodeJsBuildSettingsV1(username, domain, hostingV1NodeJsUpdateBuildSettingsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
31464
|
+
}
|
|
30691
31465
|
}
|
|
30692
31466
|
|
|
31467
|
+
/**
|
|
31468
|
+
* @export
|
|
31469
|
+
*/
|
|
31470
|
+
export const GetNodeJsRuntimeLogsV1PeriodEnum = {
|
|
31471
|
+
_1h: '1h',
|
|
31472
|
+
_1d: '1d',
|
|
31473
|
+
_1w: '1w',
|
|
31474
|
+
_1m: '1m'
|
|
31475
|
+
} as const;
|
|
31476
|
+
export type GetNodeJsRuntimeLogsV1PeriodEnum = typeof GetNodeJsRuntimeLogsV1PeriodEnum[keyof typeof GetNodeJsRuntimeLogsV1PeriodEnum];
|
|
31477
|
+
/**
|
|
31478
|
+
* @export
|
|
31479
|
+
*/
|
|
31480
|
+
export const GetNodeJsRuntimeLogsV1LevelsEnum = {
|
|
31481
|
+
Log: 'LOG',
|
|
31482
|
+
Error: 'ERROR',
|
|
31483
|
+
Warn: 'WARN',
|
|
31484
|
+
Info: 'INFO',
|
|
31485
|
+
Debug: 'DEBUG',
|
|
31486
|
+
Trace: 'TRACE'
|
|
31487
|
+
} as const;
|
|
31488
|
+
export type GetNodeJsRuntimeLogsV1LevelsEnum = typeof GetNodeJsRuntimeLogsV1LevelsEnum[keyof typeof GetNodeJsRuntimeLogsV1LevelsEnum];
|
|
30693
31489
|
/**
|
|
30694
31490
|
* @export
|
|
30695
31491
|
*/
|
|
@@ -42330,11 +43126,50 @@ export const VPSFirewallApiAxiosParamCreator = function (configuration?: Configu
|
|
|
42330
43126
|
};
|
|
42331
43127
|
},
|
|
42332
43128
|
/**
|
|
42333
|
-
* Sync a firewall
|
|
43129
|
+
* Sync a firewall\'s rules to every virtual machine it\'s assigned to. Firewall can lose sync with a virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to all VPS instances assigned to the firewall.
|
|
43130
|
+
* @summary Sync firewall to all assigned VMs
|
|
43131
|
+
* @param {number} firewallId Firewall ID
|
|
43132
|
+
* @param {*} [options] Override http request option.
|
|
43133
|
+
* @throws {RequiredError}
|
|
43134
|
+
*/
|
|
43135
|
+
syncFirewallToAllAssignedVMsV1: async (firewallId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
43136
|
+
// verify required parameter 'firewallId' is not null or undefined
|
|
43137
|
+
assertParamExists('syncFirewallToAllAssignedVMsV1', 'firewallId', firewallId)
|
|
43138
|
+
const localVarPath = `/api/vps/v1/firewall/{firewallId}/sync`
|
|
43139
|
+
.replace(`{${"firewallId"}}`, encodeURIComponent(String(firewallId)));
|
|
43140
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
43141
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
43142
|
+
let baseOptions;
|
|
43143
|
+
if (configuration) {
|
|
43144
|
+
baseOptions = configuration.baseOptions;
|
|
43145
|
+
}
|
|
43146
|
+
|
|
43147
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
43148
|
+
const localVarHeaderParameter = {} as any;
|
|
43149
|
+
const localVarQueryParameter = {} as any;
|
|
43150
|
+
|
|
43151
|
+
// authentication apiToken required
|
|
43152
|
+
// http bearer authentication required
|
|
43153
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
43154
|
+
|
|
43155
|
+
|
|
43156
|
+
|
|
43157
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
43158
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
43159
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
43160
|
+
|
|
43161
|
+
return {
|
|
43162
|
+
url: toPathString(localVarUrlObj),
|
|
43163
|
+
options: localVarRequestOptions,
|
|
43164
|
+
};
|
|
43165
|
+
},
|
|
43166
|
+
/**
|
|
43167
|
+
* Deprecated: use `POST /api/vps/v1/firewall/{firewallId}/sync` instead, which syncs the firewall to all virtual machines assigned to it. Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
|
|
42334
43168
|
* @summary Sync firewall
|
|
42335
43169
|
* @param {number} firewallId Firewall ID
|
|
42336
43170
|
* @param {number} virtualMachineId Virtual Machine ID
|
|
42337
43171
|
* @param {*} [options] Override http request option.
|
|
43172
|
+
* @deprecated
|
|
42338
43173
|
* @throws {RequiredError}
|
|
42339
43174
|
*/
|
|
42340
43175
|
syncFirewallV1: async (firewallId: number, virtualMachineId: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
@@ -42543,11 +43378,24 @@ export const VPSFirewallApiFp = function(configuration?: Configuration) {
|
|
|
42543
43378
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
42544
43379
|
},
|
|
42545
43380
|
/**
|
|
42546
|
-
* Sync a firewall
|
|
43381
|
+
* Sync a firewall\'s rules to every virtual machine it\'s assigned to. Firewall can lose sync with a virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to all VPS instances assigned to the firewall.
|
|
43382
|
+
* @summary Sync firewall to all assigned VMs
|
|
43383
|
+
* @param {number} firewallId Firewall ID
|
|
43384
|
+
* @param {*} [options] Override http request option.
|
|
43385
|
+
* @throws {RequiredError}
|
|
43386
|
+
*/
|
|
43387
|
+
async syncFirewallToAllAssignedVMsV1(firewallId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
43388
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.syncFirewallToAllAssignedVMsV1(firewallId, options);
|
|
43389
|
+
const localVarOperationServerBasePath = operationServerMap['VPSFirewallApi.syncFirewallToAllAssignedVMsV1']?.[0]?.url;
|
|
43390
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
43391
|
+
},
|
|
43392
|
+
/**
|
|
43393
|
+
* Deprecated: use `POST /api/vps/v1/firewall/{firewallId}/sync` instead, which syncs the firewall to all virtual machines assigned to it. Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
|
|
42547
43394
|
* @summary Sync firewall
|
|
42548
43395
|
* @param {number} firewallId Firewall ID
|
|
42549
43396
|
* @param {number} virtualMachineId Virtual Machine ID
|
|
42550
43397
|
* @param {*} [options] Override http request option.
|
|
43398
|
+
* @deprecated
|
|
42551
43399
|
* @throws {RequiredError}
|
|
42552
43400
|
*/
|
|
42553
43401
|
async syncFirewallV1(firewallId: number, virtualMachineId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VPSV1ActionActionResource>> {
|
|
@@ -42675,11 +43523,22 @@ export const VPSFirewallApiFactory = function (configuration?: Configuration, ba
|
|
|
42675
43523
|
return localVarFp.replaceAllFirewallRulesInGroupV1(firewallId, vPSV1FirewallRulesReplaceRequest, options).then((request) => request(axios, basePath));
|
|
42676
43524
|
},
|
|
42677
43525
|
/**
|
|
42678
|
-
* Sync a firewall
|
|
43526
|
+
* Sync a firewall\'s rules to every virtual machine it\'s assigned to. Firewall can lose sync with a virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to all VPS instances assigned to the firewall.
|
|
43527
|
+
* @summary Sync firewall to all assigned VMs
|
|
43528
|
+
* @param {number} firewallId Firewall ID
|
|
43529
|
+
* @param {*} [options] Override http request option.
|
|
43530
|
+
* @throws {RequiredError}
|
|
43531
|
+
*/
|
|
43532
|
+
syncFirewallToAllAssignedVMsV1(firewallId: number, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
43533
|
+
return localVarFp.syncFirewallToAllAssignedVMsV1(firewallId, options).then((request) => request(axios, basePath));
|
|
43534
|
+
},
|
|
43535
|
+
/**
|
|
43536
|
+
* Deprecated: use `POST /api/vps/v1/firewall/{firewallId}/sync` instead, which syncs the firewall to all virtual machines assigned to it. Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
|
|
42679
43537
|
* @summary Sync firewall
|
|
42680
43538
|
* @param {number} firewallId Firewall ID
|
|
42681
43539
|
* @param {number} virtualMachineId Virtual Machine ID
|
|
42682
43540
|
* @param {*} [options] Override http request option.
|
|
43541
|
+
* @deprecated
|
|
42683
43542
|
* @throws {RequiredError}
|
|
42684
43543
|
*/
|
|
42685
43544
|
syncFirewallV1(firewallId: number, virtualMachineId: number, options?: RawAxiosRequestConfig): AxiosPromise<VPSV1ActionActionResource> {
|
|
@@ -42821,11 +43680,24 @@ export class VPSFirewallApi extends BaseAPI {
|
|
|
42821
43680
|
}
|
|
42822
43681
|
|
|
42823
43682
|
/**
|
|
42824
|
-
* Sync a firewall
|
|
43683
|
+
* Sync a firewall\'s rules to every virtual machine it\'s assigned to. Firewall can lose sync with a virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to all VPS instances assigned to the firewall.
|
|
43684
|
+
* @summary Sync firewall to all assigned VMs
|
|
43685
|
+
* @param {number} firewallId Firewall ID
|
|
43686
|
+
* @param {*} [options] Override http request option.
|
|
43687
|
+
* @throws {RequiredError}
|
|
43688
|
+
* @memberof VPSFirewallApi
|
|
43689
|
+
*/
|
|
43690
|
+
public syncFirewallToAllAssignedVMsV1(firewallId: number, options?: RawAxiosRequestConfig) {
|
|
43691
|
+
return VPSFirewallApiFp(this.configuration).syncFirewallToAllAssignedVMsV1(firewallId, options).then((request) => request(this.axios, this.basePath));
|
|
43692
|
+
}
|
|
43693
|
+
|
|
43694
|
+
/**
|
|
43695
|
+
* Deprecated: use `POST /api/vps/v1/firewall/{firewallId}/sync` instead, which syncs the firewall to all virtual machines assigned to it. Sync a firewall for a specified virtual machine. Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated. Use this endpoint to apply updated firewall rules to VPS instances.
|
|
42825
43696
|
* @summary Sync firewall
|
|
42826
43697
|
* @param {number} firewallId Firewall ID
|
|
42827
43698
|
* @param {number} virtualMachineId Virtual Machine ID
|
|
42828
43699
|
* @param {*} [options] Override http request option.
|
|
43700
|
+
* @deprecated
|
|
42829
43701
|
* @throws {RequiredError}
|
|
42830
43702
|
* @memberof VPSFirewallApi
|
|
42831
43703
|
*/
|