@hostinger/sdk 1.48.0 → 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/api.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.48.0
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
@@ -29865,23 +30110,22 @@ export type ListWebsiteFilesAndDirectoriesV1FileTypesEnum = typeof ListWebsiteFi
29865
30110
  export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Configuration) {
29866
30111
  return {
29867
30112
  /**
29868
- * 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
- * @summary Get NodeJS build logs
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
29870
30115
  * @param {string} username
29871
30116
  * @param {string} domain Domain name
29872
30117
  * @param {string} uuid Build UUID
29873
- * @param {number | null} [fromLine] Line from which to start retrieving logs
29874
30118
  * @param {*} [options] Override http request option.
29875
30119
  * @throws {RequiredError}
29876
30120
  */
29877
- getNodeJSBuildLogsV1: async (username: string, domain: string, uuid: string, fromLine?: number | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
30121
+ analyseFailedNodeJsBuildV1: async (username: string, domain: string, uuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29878
30122
  // verify required parameter 'username' is not null or undefined
29879
- assertParamExists('getNodeJSBuildLogsV1', 'username', username)
30123
+ assertParamExists('analyseFailedNodeJsBuildV1', 'username', username)
29880
30124
  // verify required parameter 'domain' is not null or undefined
29881
- assertParamExists('getNodeJSBuildLogsV1', 'domain', domain)
30125
+ assertParamExists('analyseFailedNodeJsBuildV1', 'domain', domain)
29882
30126
  // verify required parameter 'uuid' is not null or undefined
29883
- assertParamExists('getNodeJSBuildLogsV1', 'uuid', uuid)
29884
- const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/logs`
30127
+ assertParamExists('analyseFailedNodeJsBuildV1', 'uuid', uuid)
30128
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/analysis`
29885
30129
  .replace(`{${"username"}}`, encodeURIComponent(String(username)))
29886
30130
  .replace(`{${"domain"}}`, encodeURIComponent(String(domain)))
29887
30131
  .replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
@@ -29900,10 +30144,6 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Confi
29900
30144
  // http bearer authentication required
29901
30145
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
29902
30146
 
29903
- if (fromLine !== undefined) {
29904
- localVarQueryParameter['from_line'] = fromLine;
29905
- }
29906
-
29907
30147
 
29908
30148
 
29909
30149
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -29916,22 +30156,19 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Confi
29916
30156
  };
29917
30157
  },
29918
30158
  /**
29919
- * 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.
29920
- * @summary Get Node.js build settings from archive
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
29921
30161
  * @param {string} username
29922
30162
  * @param {string} domain Domain name
29923
- * @param {string} archivePath The path to the archive file relative to the document root of the vhost
29924
30163
  * @param {*} [options] Override http request option.
29925
30164
  * @throws {RequiredError}
29926
30165
  */
29927
- getNodeJsBuildSettingsFromArchiveV1: async (username: string, domain: string, archivePath: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
30166
+ clearNodeJsRuntimeLogsV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29928
30167
  // verify required parameter 'username' is not null or undefined
29929
- assertParamExists('getNodeJsBuildSettingsFromArchiveV1', 'username', username)
30168
+ assertParamExists('clearNodeJsRuntimeLogsV1', 'username', username)
29930
30169
  // verify required parameter 'domain' is not null or undefined
29931
- assertParamExists('getNodeJsBuildSettingsFromArchiveV1', 'domain', domain)
29932
- // verify required parameter 'archivePath' is not null or undefined
29933
- assertParamExists('getNodeJsBuildSettingsFromArchiveV1', 'archivePath', archivePath)
29934
- const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/from-archive`
30170
+ assertParamExists('clearNodeJsRuntimeLogsV1', 'domain', domain)
30171
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/runtime-logs`
29935
30172
  .replace(`{${"username"}}`, encodeURIComponent(String(username)))
29936
30173
  .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
29937
30174
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -29941,7 +30178,7 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Confi
29941
30178
  baseOptions = configuration.baseOptions;
29942
30179
  }
29943
30180
 
29944
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
30181
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
29945
30182
  const localVarHeaderParameter = {} as any;
29946
30183
  const localVarQueryParameter = {} as any;
29947
30184
 
@@ -29949,10 +30186,6 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Confi
29949
30186
  // http bearer authentication required
29950
30187
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
29951
30188
 
29952
- if (archivePath !== undefined) {
29953
- localVarQueryParameter['archive_path'] = archivePath;
29954
- }
29955
-
29956
30189
 
29957
30190
 
29958
30191
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -29965,24 +30198,26 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Confi
29965
30198
  };
29966
30199
  },
29967
30200
  /**
29968
- * 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.
29969
- * @summary List NodeJS builds
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).
30202
+ * @summary Get NodeJS build logs
29970
30203
  * @param {string} username
29971
30204
  * @param {string} domain Domain name
29972
- * @param {number} [page] Page number
29973
- * @param {number} [perPage] Number of items per page
29974
- * @param {Array<ListNodeJSBuildsV1StatesEnum>} [states] Build states to filter by
30205
+ * @param {string} uuid Build UUID
30206
+ * @param {number | null} [fromLine] Line from which to start retrieving logs
29975
30207
  * @param {*} [options] Override http request option.
29976
30208
  * @throws {RequiredError}
29977
30209
  */
29978
- listNodeJSBuildsV1: async (username: string, domain: string, page?: number, perPage?: number, states?: Array<ListNodeJSBuildsV1StatesEnum>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
30210
+ getNodeJSBuildLogsV1: async (username: string, domain: string, uuid: string, fromLine?: number | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
29979
30211
  // verify required parameter 'username' is not null or undefined
29980
- assertParamExists('listNodeJSBuildsV1', 'username', username)
30212
+ assertParamExists('getNodeJSBuildLogsV1', 'username', username)
29981
30213
  // verify required parameter 'domain' is not null or undefined
29982
- assertParamExists('listNodeJSBuildsV1', 'domain', domain)
29983
- const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds`
30214
+ assertParamExists('getNodeJSBuildLogsV1', 'domain', domain)
30215
+ // verify required parameter 'uuid' is not null or undefined
30216
+ assertParamExists('getNodeJSBuildLogsV1', 'uuid', uuid)
30217
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/logs`
29984
30218
  .replace(`{${"username"}}`, encodeURIComponent(String(username)))
29985
- .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
30219
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)))
30220
+ .replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
29986
30221
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
29987
30222
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
29988
30223
  let baseOptions;
@@ -29998,16 +30233,8 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Confi
29998
30233
  // http bearer authentication required
29999
30234
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
30000
30235
 
30001
- if (page !== undefined) {
30002
- localVarQueryParameter['page'] = page;
30003
- }
30004
-
30005
- if (perPage !== undefined) {
30006
- localVarQueryParameter['per_page'] = perPage;
30007
- }
30008
-
30009
- if (states) {
30010
- localVarQueryParameter['states'] = states;
30236
+ if (fromLine !== undefined) {
30237
+ localVarQueryParameter['from_line'] = fromLine;
30011
30238
  }
30012
30239
 
30013
30240
 
@@ -30022,21 +30249,25 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Confi
30022
30249
  };
30023
30250
  },
30024
30251
  /**
30025
- * 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.
30026
- * @summary List Node.js environment variables
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
30027
30254
  * @param {string} username
30028
30255
  * @param {string} domain Domain name
30256
+ * @param {string} uuid Build UUID
30029
30257
  * @param {*} [options] Override http request option.
30030
30258
  * @throws {RequiredError}
30031
30259
  */
30032
- listNodeJsEnvironmentVariablesV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
30260
+ getNodeJsBuildDetailsV1: async (username: string, domain: string, uuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
30033
30261
  // verify required parameter 'username' is not null or undefined
30034
- assertParamExists('listNodeJsEnvironmentVariablesV1', 'username', username)
30262
+ assertParamExists('getNodeJsBuildDetailsV1', 'username', username)
30035
30263
  // verify required parameter 'domain' is not null or undefined
30036
- assertParamExists('listNodeJsEnvironmentVariablesV1', 'domain', domain)
30037
- const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/env`
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}`
30038
30268
  .replace(`{${"username"}}`, encodeURIComponent(String(username)))
30039
- .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
30269
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)))
30270
+ .replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
30040
30271
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
30041
30272
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
30042
30273
  let baseOptions;
@@ -30064,22 +30295,274 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Confi
30064
30295
  };
30065
30296
  },
30066
30297
  /**
30067
- * 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.
30068
- * @summary List Node.js vulnerabilities
30298
+ * 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.
30299
+ * @summary Get Node.js build settings from archive
30069
30300
  * @param {string} username
30070
30301
  * @param {string} domain Domain name
30071
- * @param {Array<ListNodeJsVulnerabilitiesV1SeveritiesEnum>} [severities] Severities to filter by
30302
+ * @param {string} archivePath The path to the archive file relative to the document root of the vhost
30072
30303
  * @param {*} [options] Override http request option.
30073
30304
  * @throws {RequiredError}
30074
30305
  */
30075
- listNodeJsVulnerabilitiesV1: async (username: string, domain: string, severities?: Array<ListNodeJsVulnerabilitiesV1SeveritiesEnum>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
30306
+ getNodeJsBuildSettingsFromArchiveV1: async (username: string, domain: string, archivePath: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
30076
30307
  // verify required parameter 'username' is not null or undefined
30077
- assertParamExists('listNodeJsVulnerabilitiesV1', 'username', username)
30308
+ assertParamExists('getNodeJsBuildSettingsFromArchiveV1', 'username', username)
30078
30309
  // verify required parameter 'domain' is not null or undefined
30079
- assertParamExists('listNodeJsVulnerabilitiesV1', 'domain', domain)
30080
- const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/vulnerabilities`
30081
- .replace(`{${"username"}}`, encodeURIComponent(String(username)))
30082
- .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
30310
+ assertParamExists('getNodeJsBuildSettingsFromArchiveV1', 'domain', domain)
30311
+ // verify required parameter 'archivePath' is not null or undefined
30312
+ assertParamExists('getNodeJsBuildSettingsFromArchiveV1', 'archivePath', archivePath)
30313
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/from-archive`
30314
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
30315
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
30316
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
30317
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
30318
+ let baseOptions;
30319
+ if (configuration) {
30320
+ baseOptions = configuration.baseOptions;
30321
+ }
30322
+
30323
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
30324
+ const localVarHeaderParameter = {} as any;
30325
+ const localVarQueryParameter = {} as any;
30326
+
30327
+ // authentication apiToken required
30328
+ // http bearer authentication required
30329
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
30330
+
30331
+ if (archivePath !== undefined) {
30332
+ localVarQueryParameter['archive_path'] = archivePath;
30333
+ }
30334
+
30335
+
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 &#x60;from_line&#x60; is not sent.
30394
+ * @param {number} [fromLine] 1-based line of the log file to start from. For polling send &#x60;total_lines + 1&#x60; from the previous response. Cannot be combined with &#x60;period&#x60;.
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
+
30441
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
30442
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
30443
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
30444
+
30445
+ return {
30446
+ url: toPathString(localVarUrlObj),
30447
+ options: localVarRequestOptions,
30448
+ };
30449
+ },
30450
+ /**
30451
+ * 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.
30452
+ * @summary List NodeJS builds
30453
+ * @param {string} username
30454
+ * @param {string} domain Domain name
30455
+ * @param {number} [page] Page number
30456
+ * @param {number} [perPage] Number of items per page
30457
+ * @param {Array<ListNodeJSBuildsV1StatesEnum>} [states] Build states to filter by
30458
+ * @param {*} [options] Override http request option.
30459
+ * @throws {RequiredError}
30460
+ */
30461
+ listNodeJSBuildsV1: async (username: string, domain: string, page?: number, perPage?: number, states?: Array<ListNodeJSBuildsV1StatesEnum>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
30462
+ // verify required parameter 'username' is not null or undefined
30463
+ assertParamExists('listNodeJSBuildsV1', 'username', username)
30464
+ // verify required parameter 'domain' is not null or undefined
30465
+ assertParamExists('listNodeJSBuildsV1', 'domain', domain)
30466
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds`
30467
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
30468
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
30469
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
30470
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
30471
+ let baseOptions;
30472
+ if (configuration) {
30473
+ baseOptions = configuration.baseOptions;
30474
+ }
30475
+
30476
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
30477
+ const localVarHeaderParameter = {} as any;
30478
+ const localVarQueryParameter = {} as any;
30479
+
30480
+ // authentication apiToken required
30481
+ // http bearer authentication required
30482
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
30483
+
30484
+ if (page !== undefined) {
30485
+ localVarQueryParameter['page'] = page;
30486
+ }
30487
+
30488
+ if (perPage !== undefined) {
30489
+ localVarQueryParameter['per_page'] = perPage;
30490
+ }
30491
+
30492
+ if (states) {
30493
+ localVarQueryParameter['states'] = states;
30494
+ }
30495
+
30496
+
30497
+
30498
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
30499
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
30500
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
30501
+
30502
+ return {
30503
+ url: toPathString(localVarUrlObj),
30504
+ options: localVarRequestOptions,
30505
+ };
30506
+ },
30507
+ /**
30508
+ * 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.
30509
+ * @summary List Node.js environment variables
30510
+ * @param {string} username
30511
+ * @param {string} domain Domain name
30512
+ * @param {*} [options] Override http request option.
30513
+ * @throws {RequiredError}
30514
+ */
30515
+ listNodeJsEnvironmentVariablesV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
30516
+ // verify required parameter 'username' is not null or undefined
30517
+ assertParamExists('listNodeJsEnvironmentVariablesV1', 'username', username)
30518
+ // verify required parameter 'domain' is not null or undefined
30519
+ assertParamExists('listNodeJsEnvironmentVariablesV1', 'domain', domain)
30520
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/env`
30521
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
30522
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
30523
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
30524
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
30525
+ let baseOptions;
30526
+ if (configuration) {
30527
+ baseOptions = configuration.baseOptions;
30528
+ }
30529
+
30530
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
30531
+ const localVarHeaderParameter = {} as any;
30532
+ const localVarQueryParameter = {} as any;
30533
+
30534
+ // authentication apiToken required
30535
+ // http bearer authentication required
30536
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
30537
+
30538
+
30539
+
30540
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
30541
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
30542
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
30543
+
30544
+ return {
30545
+ url: toPathString(localVarUrlObj),
30546
+ options: localVarRequestOptions,
30547
+ };
30548
+ },
30549
+ /**
30550
+ * 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.
30551
+ * @summary List Node.js vulnerabilities
30552
+ * @param {string} username
30553
+ * @param {string} domain Domain name
30554
+ * @param {Array<ListNodeJsVulnerabilitiesV1SeveritiesEnum>} [severities] Severities to filter by
30555
+ * @param {*} [options] Override http request option.
30556
+ * @throws {RequiredError}
30557
+ */
30558
+ listNodeJsVulnerabilitiesV1: async (username: string, domain: string, severities?: Array<ListNodeJsVulnerabilitiesV1SeveritiesEnum>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
30559
+ // verify required parameter 'username' is not null or undefined
30560
+ assertParamExists('listNodeJsVulnerabilitiesV1', 'username', username)
30561
+ // verify required parameter 'domain' is not null or undefined
30562
+ assertParamExists('listNodeJsVulnerabilitiesV1', 'domain', domain)
30563
+ const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/vulnerabilities`
30564
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
30565
+ .replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
30083
30566
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
30084
30567
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
30085
30568
  let baseOptions;
@@ -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 &#x60;from_line&#x60; is not sent.
30929
+ * @param {number} [fromLine] 1-based line of the log file to start from. For polling send &#x60;total_lines + 1&#x60; from the previous response. Cannot be combined with &#x60;period&#x60;.
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 &#x60;from_line&#x60; is not sent.
31139
+ * @param {number} [fromLine] 1-based line of the log file to start from. For polling send &#x60;total_lines + 1&#x60; from the previous response. Cannot be combined with &#x60;period&#x60;.
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 &#x60;from_line&#x60; is not sent.
31343
+ * @param {number} [fromLine] 1-based line of the log file to start from. For polling send &#x60;total_lines + 1&#x60; from the previous response. Cannot be combined with &#x60;period&#x60;.
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
  */