@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/README.md +2 -2
- package/api.ts +859 -63
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +509 -1
- package/dist/api.js +589 -11
- 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 +509 -1
- package/dist/esm/api.js +579 -1
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/HostingNodeJSApi.md +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/index.ts +1 -1
- package/package.json +1 -1
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.49.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/base.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.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
|
package/dist/esm/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.49.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/common.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.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
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.49.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.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
|
|
@@ -13,7 +13,7 @@ export class Configuration {
|
|
|
13
13
|
var _a;
|
|
14
14
|
this.accessToken = param.accessToken;
|
|
15
15
|
this.basePath = param.basePath;
|
|
16
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.
|
|
16
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.49.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
17
17
|
this.formDataCtor = param.formDataCtor;
|
|
18
18
|
}
|
|
19
19
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.49.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.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
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 1.
|
|
4
|
+
* API Version: 1.49.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 1.
|
|
7
|
+
* API Version: 1.49.0
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/docs/HostingNodeJSApi.md
CHANGED
|
@@ -4,8 +4,13 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
4
4
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
|[**analyseFailedNodeJsBuildV1**](#analysefailednodejsbuildv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/analysis | Analyse failed Node.js build|
|
|
8
|
+
|[**clearNodeJsRuntimeLogsV1**](#clearnodejsruntimelogsv1) | **DELETE** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/runtime-logs | Clear Node.js runtime logs|
|
|
7
9
|
|[**getNodeJSBuildLogsV1**](#getnodejsbuildlogsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/logs | Get NodeJS build logs|
|
|
10
|
+
|[**getNodeJsBuildDetailsV1**](#getnodejsbuilddetailsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid} | Get Node.js build details|
|
|
8
11
|
|[**getNodeJsBuildSettingsFromArchiveV1**](#getnodejsbuildsettingsfromarchivev1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/from-archive | Get Node.js build settings from archive|
|
|
12
|
+
|[**getNodeJsBuildSettingsV1**](#getnodejsbuildsettingsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings | Get Node.js build settings|
|
|
13
|
+
|[**getNodeJsRuntimeLogsV1**](#getnodejsruntimelogsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/runtime-logs | Get Node.js runtime logs|
|
|
9
14
|
|[**listNodeJSBuildsV1**](#listnodejsbuildsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds | List NodeJS builds|
|
|
10
15
|
|[**listNodeJsEnvironmentVariablesV1**](#listnodejsenvironmentvariablesv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/env | List Node.js environment variables|
|
|
11
16
|
|[**listNodeJsVulnerabilitiesV1**](#listnodejsvulnerabilitiesv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/vulnerabilities | List Node.js vulnerabilities|
|
|
@@ -13,6 +18,123 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
13
18
|
|[**replaceNodeJsEnvironmentVariablesV1**](#replacenodejsenvironmentvariablesv1) | **PUT** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/env | Replace Node.js environment variables|
|
|
14
19
|
|[**restartNodeJsApplicationV1**](#restartnodejsapplicationv1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/server/restart | Restart Node.js application|
|
|
15
20
|
|[**startNodeJsBuildV1**](#startnodejsbuildv1) | **POST** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds | Start Node.js build|
|
|
21
|
+
|[**updateNodeJsBuildSettingsV1**](#updatenodejsbuildsettingsv1) | **PUT** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings | Update Node.js build settings|
|
|
22
|
+
|
|
23
|
+
# **analyseFailedNodeJsBuildV1**
|
|
24
|
+
> HostingV1NodeJsBuildAnalysisResource analyseFailedNodeJsBuildV1()
|
|
25
|
+
|
|
26
|
+
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).
|
|
27
|
+
|
|
28
|
+
### Example
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import {
|
|
32
|
+
HostingNodeJSApi,
|
|
33
|
+
Configuration
|
|
34
|
+
} from '@hostinger/sdk';
|
|
35
|
+
|
|
36
|
+
const configuration = new Configuration();
|
|
37
|
+
const apiInstance = new HostingNodeJSApi(configuration);
|
|
38
|
+
|
|
39
|
+
let username: string; // (default to undefined)
|
|
40
|
+
let domain: string; //Domain name (default to undefined)
|
|
41
|
+
let uuid: string; //Build UUID (default to undefined)
|
|
42
|
+
|
|
43
|
+
const { status, data } = await apiInstance.analyseFailedNodeJsBuildV1(
|
|
44
|
+
username,
|
|
45
|
+
domain,
|
|
46
|
+
uuid
|
|
47
|
+
);
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Parameters
|
|
51
|
+
|
|
52
|
+
|Name | Type | Description | Notes|
|
|
53
|
+
|------------- | ------------- | ------------- | -------------|
|
|
54
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
55
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
56
|
+
| **uuid** | [**string**] | Build UUID | defaults to undefined|
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### Return type
|
|
60
|
+
|
|
61
|
+
**HostingV1NodeJsBuildAnalysisResource**
|
|
62
|
+
|
|
63
|
+
### Authorization
|
|
64
|
+
|
|
65
|
+
[apiToken](../README.md#apiToken)
|
|
66
|
+
|
|
67
|
+
### HTTP request headers
|
|
68
|
+
|
|
69
|
+
- **Content-Type**: Not defined
|
|
70
|
+
- **Accept**: application/json
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### HTTP response details
|
|
74
|
+
| Status code | Description | Response headers |
|
|
75
|
+
|-------------|-------------|------------------|
|
|
76
|
+
|**200** | Success response | - |
|
|
77
|
+
|**422** | Validation error response | - |
|
|
78
|
+
|**401** | Unauthenticated response | - |
|
|
79
|
+
|**500** | Error response | - |
|
|
80
|
+
|
|
81
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
82
|
+
|
|
83
|
+
# **clearNodeJsRuntimeLogsV1**
|
|
84
|
+
> CommonSuccessEmptyResource clearNodeJsRuntimeLogsV1()
|
|
85
|
+
|
|
86
|
+
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.
|
|
87
|
+
|
|
88
|
+
### Example
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
import {
|
|
92
|
+
HostingNodeJSApi,
|
|
93
|
+
Configuration
|
|
94
|
+
} from '@hostinger/sdk';
|
|
95
|
+
|
|
96
|
+
const configuration = new Configuration();
|
|
97
|
+
const apiInstance = new HostingNodeJSApi(configuration);
|
|
98
|
+
|
|
99
|
+
let username: string; // (default to undefined)
|
|
100
|
+
let domain: string; //Domain name (default to undefined)
|
|
101
|
+
|
|
102
|
+
const { status, data } = await apiInstance.clearNodeJsRuntimeLogsV1(
|
|
103
|
+
username,
|
|
104
|
+
domain
|
|
105
|
+
);
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Parameters
|
|
109
|
+
|
|
110
|
+
|Name | Type | Description | Notes|
|
|
111
|
+
|------------- | ------------- | ------------- | -------------|
|
|
112
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
113
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
### Return type
|
|
117
|
+
|
|
118
|
+
**CommonSuccessEmptyResource**
|
|
119
|
+
|
|
120
|
+
### Authorization
|
|
121
|
+
|
|
122
|
+
[apiToken](../README.md#apiToken)
|
|
123
|
+
|
|
124
|
+
### HTTP request headers
|
|
125
|
+
|
|
126
|
+
- **Content-Type**: Not defined
|
|
127
|
+
- **Accept**: application/json
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
### HTTP response details
|
|
131
|
+
| Status code | Description | Response headers |
|
|
132
|
+
|-------------|-------------|------------------|
|
|
133
|
+
|**200** | Success empty response | - |
|
|
134
|
+
|**401** | Unauthenticated response | - |
|
|
135
|
+
|**500** | Error response | - |
|
|
136
|
+
|
|
137
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
16
138
|
|
|
17
139
|
# **getNodeJSBuildLogsV1**
|
|
18
140
|
> HostingV1NodeJsBuildLogsResource getNodeJSBuildLogsV1()
|
|
@@ -77,6 +199,65 @@ const { status, data } = await apiInstance.getNodeJSBuildLogsV1(
|
|
|
77
199
|
|
|
78
200
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
79
201
|
|
|
202
|
+
# **getNodeJsBuildDetailsV1**
|
|
203
|
+
> HostingV1NodeJsBuildResource getNodeJsBuildDetailsV1()
|
|
204
|
+
|
|
205
|
+
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.
|
|
206
|
+
|
|
207
|
+
### Example
|
|
208
|
+
|
|
209
|
+
```typescript
|
|
210
|
+
import {
|
|
211
|
+
HostingNodeJSApi,
|
|
212
|
+
Configuration
|
|
213
|
+
} from '@hostinger/sdk';
|
|
214
|
+
|
|
215
|
+
const configuration = new Configuration();
|
|
216
|
+
const apiInstance = new HostingNodeJSApi(configuration);
|
|
217
|
+
|
|
218
|
+
let username: string; // (default to undefined)
|
|
219
|
+
let domain: string; //Domain name (default to undefined)
|
|
220
|
+
let uuid: string; //Build UUID (default to undefined)
|
|
221
|
+
|
|
222
|
+
const { status, data } = await apiInstance.getNodeJsBuildDetailsV1(
|
|
223
|
+
username,
|
|
224
|
+
domain,
|
|
225
|
+
uuid
|
|
226
|
+
);
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Parameters
|
|
230
|
+
|
|
231
|
+
|Name | Type | Description | Notes|
|
|
232
|
+
|------------- | ------------- | ------------- | -------------|
|
|
233
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
234
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
235
|
+
| **uuid** | [**string**] | Build UUID | defaults to undefined|
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
### Return type
|
|
239
|
+
|
|
240
|
+
**HostingV1NodeJsBuildResource**
|
|
241
|
+
|
|
242
|
+
### Authorization
|
|
243
|
+
|
|
244
|
+
[apiToken](../README.md#apiToken)
|
|
245
|
+
|
|
246
|
+
### HTTP request headers
|
|
247
|
+
|
|
248
|
+
- **Content-Type**: Not defined
|
|
249
|
+
- **Accept**: application/json
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
### HTTP response details
|
|
253
|
+
| Status code | Description | Response headers |
|
|
254
|
+
|-------------|-------------|------------------|
|
|
255
|
+
|**200** | Success response | - |
|
|
256
|
+
|**401** | Unauthenticated response | - |
|
|
257
|
+
|**500** | Error response | - |
|
|
258
|
+
|
|
259
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
260
|
+
|
|
80
261
|
# **getNodeJsBuildSettingsFromArchiveV1**
|
|
81
262
|
> HostingV1NodeJsBuildSettingsResource getNodeJsBuildSettingsFromArchiveV1()
|
|
82
263
|
|
|
@@ -127,6 +308,131 @@ const { status, data } = await apiInstance.getNodeJsBuildSettingsFromArchiveV1(
|
|
|
127
308
|
- **Accept**: application/json
|
|
128
309
|
|
|
129
310
|
|
|
311
|
+
### HTTP response details
|
|
312
|
+
| Status code | Description | Response headers |
|
|
313
|
+
|-------------|-------------|------------------|
|
|
314
|
+
|**200** | Success response | - |
|
|
315
|
+
|**422** | Validation error response | - |
|
|
316
|
+
|**401** | Unauthenticated response | - |
|
|
317
|
+
|**500** | Error response | - |
|
|
318
|
+
|
|
319
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
320
|
+
|
|
321
|
+
# **getNodeJsBuildSettingsV1**
|
|
322
|
+
> HostingV1NodeJsStoredBuildSettingsResource getNodeJsBuildSettingsV1()
|
|
323
|
+
|
|
324
|
+
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.
|
|
325
|
+
|
|
326
|
+
### Example
|
|
327
|
+
|
|
328
|
+
```typescript
|
|
329
|
+
import {
|
|
330
|
+
HostingNodeJSApi,
|
|
331
|
+
Configuration
|
|
332
|
+
} from '@hostinger/sdk';
|
|
333
|
+
|
|
334
|
+
const configuration = new Configuration();
|
|
335
|
+
const apiInstance = new HostingNodeJSApi(configuration);
|
|
336
|
+
|
|
337
|
+
let username: string; // (default to undefined)
|
|
338
|
+
let domain: string; //Domain name (default to undefined)
|
|
339
|
+
|
|
340
|
+
const { status, data } = await apiInstance.getNodeJsBuildSettingsV1(
|
|
341
|
+
username,
|
|
342
|
+
domain
|
|
343
|
+
);
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### Parameters
|
|
347
|
+
|
|
348
|
+
|Name | Type | Description | Notes|
|
|
349
|
+
|------------- | ------------- | ------------- | -------------|
|
|
350
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
351
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
### Return type
|
|
355
|
+
|
|
356
|
+
**HostingV1NodeJsStoredBuildSettingsResource**
|
|
357
|
+
|
|
358
|
+
### Authorization
|
|
359
|
+
|
|
360
|
+
[apiToken](../README.md#apiToken)
|
|
361
|
+
|
|
362
|
+
### HTTP request headers
|
|
363
|
+
|
|
364
|
+
- **Content-Type**: Not defined
|
|
365
|
+
- **Accept**: application/json
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
### HTTP response details
|
|
369
|
+
| Status code | Description | Response headers |
|
|
370
|
+
|-------------|-------------|------------------|
|
|
371
|
+
|**200** | Success response | - |
|
|
372
|
+
|**401** | Unauthenticated response | - |
|
|
373
|
+
|**500** | Error response | - |
|
|
374
|
+
|
|
375
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
376
|
+
|
|
377
|
+
# **getNodeJsRuntimeLogsV1**
|
|
378
|
+
> HostingV1NodeJsRuntimeLogsResource getNodeJsRuntimeLogsV1()
|
|
379
|
+
|
|
380
|
+
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.
|
|
381
|
+
|
|
382
|
+
### Example
|
|
383
|
+
|
|
384
|
+
```typescript
|
|
385
|
+
import {
|
|
386
|
+
HostingNodeJSApi,
|
|
387
|
+
Configuration
|
|
388
|
+
} from '@hostinger/sdk';
|
|
389
|
+
|
|
390
|
+
const configuration = new Configuration();
|
|
391
|
+
const apiInstance = new HostingNodeJSApi(configuration);
|
|
392
|
+
|
|
393
|
+
let username: string; // (default to undefined)
|
|
394
|
+
let domain: string; //Domain name (default to undefined)
|
|
395
|
+
let period: '1h' | '1d' | '1w' | '1m'; //Time window for the first fetch. Required when `from_line` is not sent. (optional) (default to undefined)
|
|
396
|
+
let fromLine: number; //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`. (optional) (default to undefined)
|
|
397
|
+
let limit: number; //Maximum number of log entries to return. When more entries match, the newest are kept. (optional) (default to 1000)
|
|
398
|
+
let levels: Array<'LOG' | 'ERROR' | 'WARN' | 'INFO' | 'DEBUG' | 'TRACE'>; //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. (optional) (default to undefined)
|
|
399
|
+
|
|
400
|
+
const { status, data } = await apiInstance.getNodeJsRuntimeLogsV1(
|
|
401
|
+
username,
|
|
402
|
+
domain,
|
|
403
|
+
period,
|
|
404
|
+
fromLine,
|
|
405
|
+
limit,
|
|
406
|
+
levels
|
|
407
|
+
);
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### Parameters
|
|
411
|
+
|
|
412
|
+
|Name | Type | Description | Notes|
|
|
413
|
+
|------------- | ------------- | ------------- | -------------|
|
|
414
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
415
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
416
|
+
| **period** | [**'1h' | '1d' | '1w' | '1m'**]**Array<'1h' | '1d' | '1w' | '1m'>** | Time window for the first fetch. Required when `from_line` is not sent. | (optional) defaults to undefined|
|
|
417
|
+
| **fromLine** | [**number**] | 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`. | (optional) defaults to undefined|
|
|
418
|
+
| **limit** | [**number**] | Maximum number of log entries to return. When more entries match, the newest are kept. | (optional) defaults to 1000|
|
|
419
|
+
| **levels** | **Array<'LOG' | 'ERROR' | 'WARN' | 'INFO' | 'DEBUG' | 'TRACE'>** | 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. | (optional) defaults to undefined|
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
### Return type
|
|
423
|
+
|
|
424
|
+
**HostingV1NodeJsRuntimeLogsResource**
|
|
425
|
+
|
|
426
|
+
### Authorization
|
|
427
|
+
|
|
428
|
+
[apiToken](../README.md#apiToken)
|
|
429
|
+
|
|
430
|
+
### HTTP request headers
|
|
431
|
+
|
|
432
|
+
- **Content-Type**: Not defined
|
|
433
|
+
- **Accept**: application/json
|
|
434
|
+
|
|
435
|
+
|
|
130
436
|
### HTTP response details
|
|
131
437
|
| Status code | Description | Response headers |
|
|
132
438
|
|-------------|-------------|------------------|
|
|
@@ -556,3 +862,64 @@ const { status, data } = await apiInstance.startNodeJsBuildV1(
|
|
|
556
862
|
|
|
557
863
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
558
864
|
|
|
865
|
+
# **updateNodeJsBuildSettingsV1**
|
|
866
|
+
> HostingV1NodeJsStoredBuildSettingsResource updateNodeJsBuildSettingsV1(hostingV1NodeJsUpdateBuildSettingsRequest)
|
|
867
|
+
|
|
868
|
+
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.
|
|
869
|
+
|
|
870
|
+
### Example
|
|
871
|
+
|
|
872
|
+
```typescript
|
|
873
|
+
import {
|
|
874
|
+
HostingNodeJSApi,
|
|
875
|
+
Configuration,
|
|
876
|
+
HostingV1NodeJsUpdateBuildSettingsRequest
|
|
877
|
+
} from '@hostinger/sdk';
|
|
878
|
+
|
|
879
|
+
const configuration = new Configuration();
|
|
880
|
+
const apiInstance = new HostingNodeJSApi(configuration);
|
|
881
|
+
|
|
882
|
+
let username: string; // (default to undefined)
|
|
883
|
+
let domain: string; //Domain name (default to undefined)
|
|
884
|
+
let hostingV1NodeJsUpdateBuildSettingsRequest: HostingV1NodeJsUpdateBuildSettingsRequest; //
|
|
885
|
+
|
|
886
|
+
const { status, data } = await apiInstance.updateNodeJsBuildSettingsV1(
|
|
887
|
+
username,
|
|
888
|
+
domain,
|
|
889
|
+
hostingV1NodeJsUpdateBuildSettingsRequest
|
|
890
|
+
);
|
|
891
|
+
```
|
|
892
|
+
|
|
893
|
+
### Parameters
|
|
894
|
+
|
|
895
|
+
|Name | Type | Description | Notes|
|
|
896
|
+
|------------- | ------------- | ------------- | -------------|
|
|
897
|
+
| **hostingV1NodeJsUpdateBuildSettingsRequest** | **HostingV1NodeJsUpdateBuildSettingsRequest**| | |
|
|
898
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
899
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
### Return type
|
|
903
|
+
|
|
904
|
+
**HostingV1NodeJsStoredBuildSettingsResource**
|
|
905
|
+
|
|
906
|
+
### Authorization
|
|
907
|
+
|
|
908
|
+
[apiToken](../README.md#apiToken)
|
|
909
|
+
|
|
910
|
+
### HTTP request headers
|
|
911
|
+
|
|
912
|
+
- **Content-Type**: application/json
|
|
913
|
+
- **Accept**: application/json
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
### HTTP response details
|
|
917
|
+
| Status code | Description | Response headers |
|
|
918
|
+
|-------------|-------------|------------------|
|
|
919
|
+
|**200** | Success response | - |
|
|
920
|
+
|**422** | Validation error response | - |
|
|
921
|
+
|**401** | Unauthenticated response | - |
|
|
922
|
+
|**500** | Error response | - |
|
|
923
|
+
|
|
924
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
925
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# HostingV1NodeJsBuildAnalysisResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**analysis** | **string** | Why the build failed. null when no analysis could be produced. | [default to undefined]
|
|
9
|
+
**solution** | **string** | Suggested fix for the build failure. null when no analysis could be produced. | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { HostingV1NodeJsBuildAnalysisResource } from '@hostinger/sdk';
|
|
15
|
+
|
|
16
|
+
const instance: HostingV1NodeJsBuildAnalysisResource = {
|
|
17
|
+
analysis,
|
|
18
|
+
solution,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# HostingV1NodeJsLogEntryResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**timestamp** | **string** | ISO 8601 timestamp of the log entry | [default to undefined]
|
|
9
|
+
**level** | **string** | Log level in upper case (usually ERROR, WARN, INFO, LOG, DEBUG or TRACE). Numeric pino levels are mapped to these names. | [default to undefined]
|
|
10
|
+
**message** | **string** | Log message | [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { HostingV1NodeJsLogEntryResource } from '@hostinger/sdk';
|
|
16
|
+
|
|
17
|
+
const instance: HostingV1NodeJsLogEntryResource = {
|
|
18
|
+
timestamp,
|
|
19
|
+
level,
|
|
20
|
+
message,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# HostingV1NodeJsRuntimeLogsResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**logs** | [**Array<HostingV1NodeJsLogEntryResource>**](HostingV1NodeJsLogEntryResource.md) | Array of [`Hosting.V1.NodeJs.LogEntryResource`](#model/hostingv1nodejslogentryresource) | [default to undefined]
|
|
9
|
+
**started_at** | **string** | Timestamp of the first line of the log file; null when the file is empty or its first line has no timestamp field | [default to undefined]
|
|
10
|
+
**total_lines** | **number** | 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. | [default to undefined]
|
|
11
|
+
**last_deployed_at** | **string** | Time of the last completed build; entries before it belong to the previous deployment. null when no build has completed yet. | [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { HostingV1NodeJsRuntimeLogsResource } from '@hostinger/sdk';
|
|
17
|
+
|
|
18
|
+
const instance: HostingV1NodeJsRuntimeLogsResource = {
|
|
19
|
+
logs,
|
|
20
|
+
started_at,
|
|
21
|
+
total_lines,
|
|
22
|
+
last_deployed_at,
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# HostingV1NodeJsStoredBuildSettingsResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**node_version** | **number** | Node.js major version used to build and run the application | [default to undefined]
|
|
9
|
+
**app_type** | **string** | Detected or chosen application framework | [default to undefined]
|
|
10
|
+
**root_directory** | **string** | Application root directory (where package.json is located) relative to public_html; null means public_html itself | [default to undefined]
|
|
11
|
+
**output_directory** | **string** | Build output directory relative to the root directory | [default to undefined]
|
|
12
|
+
**build_script** | **string** | The package.json script that builds the application | [default to undefined]
|
|
13
|
+
**entry_file** | **string** | The main entry point file for the application | [default to undefined]
|
|
14
|
+
**package_manager** | **string** | Package manager used to install dependencies | [default to undefined]
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { HostingV1NodeJsStoredBuildSettingsResource } from '@hostinger/sdk';
|
|
20
|
+
|
|
21
|
+
const instance: HostingV1NodeJsStoredBuildSettingsResource = {
|
|
22
|
+
node_version,
|
|
23
|
+
app_type,
|
|
24
|
+
root_directory,
|
|
25
|
+
output_directory,
|
|
26
|
+
build_script,
|
|
27
|
+
entry_file,
|
|
28
|
+
package_manager,
|
|
29
|
+
};
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# HostingV1NodeJsUpdateBuildSettingsRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**node_version** | **number** | Node.js major version | [default to undefined]
|
|
9
|
+
**app_type** | **string** | Node.js application framework. Set it explicitly when auto-detection picked the wrong one. | [optional] [default to undefined]
|
|
10
|
+
**root_directory** | **string** | Application root directory (where package.json is located) relative to public_html. Omit it, or send \".\", for public_html itself. | [optional] [default to undefined]
|
|
11
|
+
**output_directory** | **string** | Build output directory relative to the root directory | [optional] [default to undefined]
|
|
12
|
+
**build_script** | **string** | The package.json script that builds the application | [optional] [default to undefined]
|
|
13
|
+
**entry_file** | **string** | The main entry point file for the application (required for express, fastify, nest, nuxt and hono app types) | [optional] [default to undefined]
|
|
14
|
+
**package_manager** | **string** | Package manager used to install dependencies | [optional] [default to undefined]
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { HostingV1NodeJsUpdateBuildSettingsRequest } from '@hostinger/sdk';
|
|
20
|
+
|
|
21
|
+
const instance: HostingV1NodeJsUpdateBuildSettingsRequest = {
|
|
22
|
+
node_version,
|
|
23
|
+
app_type,
|
|
24
|
+
root_directory,
|
|
25
|
+
output_directory,
|
|
26
|
+
build_script,
|
|
27
|
+
entry_file,
|
|
28
|
+
package_manager,
|
|
29
|
+
};
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.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
|