@vertracloud/api-types 0.1.0 → 0.2.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 +63 -35
- package/common/v1.d.ts +23 -7
- package/common/v1.js.map +1 -1
- package/package.json +5 -5
- package/payloads/v1/activity.d.ts +22 -10
- package/payloads/v1/activity.js +9 -0
- package/payloads/v1/activity.js.map +1 -1
- package/payloads/v1/activity.mjs +8 -0
- package/payloads/v1/api-error.d.ts +302 -0
- package/payloads/v1/api-error.js +216 -0
- package/payloads/v1/api-error.js.map +1 -0
- package/payloads/v1/api-error.mjs +188 -0
- package/payloads/v1/api-key.d.ts +88 -0
- package/payloads/v1/api-key.js +267 -0
- package/payloads/v1/api-key.js.map +1 -0
- package/payloads/v1/api-key.mjs +235 -0
- package/payloads/v1/application.d.ts +235 -47
- package/payloads/v1/application.js +34 -3
- package/payloads/v1/application.js.map +1 -1
- package/payloads/v1/application.mjs +28 -2
- package/payloads/v1/database-data.d.ts +329 -0
- package/payloads/v1/database-data.js +63 -0
- package/payloads/v1/database-data.js.map +1 -0
- package/payloads/v1/database-data.mjs +35 -0
- package/payloads/v1/database.d.ts +29 -31
- package/payloads/v1/database.js.map +1 -1
- package/payloads/v1/github.d.ts +20 -0
- package/{rest/v1/credits.js → payloads/v1/github.js} +4 -4
- package/payloads/v1/github.js.map +1 -0
- package/payloads/v1/github.mjs +1 -0
- package/payloads/v1/index.d.ts +12 -9
- package/payloads/v1/index.js +630 -10
- package/payloads/v1/index.js.map +1 -1
- package/payloads/v1/index.mjs +590 -9
- package/payloads/v1/notification.d.ts +2 -3
- package/payloads/v1/notification.js.map +1 -1
- package/payloads/v1/oauth.d.ts +27 -0
- package/payloads/v1/oauth.js +34 -0
- package/payloads/v1/oauth.js.map +1 -0
- package/payloads/v1/oauth.mjs +8 -0
- package/payloads/v1/orders.d.ts +52 -27
- package/payloads/v1/orders.js +30 -0
- package/payloads/v1/orders.js.map +1 -1
- package/payloads/v1/orders.mjs +21 -0
- package/payloads/v1/redeem.d.ts +1 -1
- package/payloads/v1/redeem.js.map +1 -1
- package/payloads/v1/snapshot.d.ts +37 -7
- package/payloads/v1/snapshot.js +8 -2
- package/payloads/v1/snapshot.js.map +1 -1
- package/payloads/v1/snapshot.mjs +6 -1
- package/payloads/v1/status.d.ts +2 -2
- package/payloads/v1/status.js.map +1 -1
- package/payloads/v1/user.d.ts +54 -20
- package/payloads/v1/user.js +16 -0
- package/payloads/v1/user.js.map +1 -1
- package/payloads/v1/user.mjs +9 -0
- package/payloads/v1/workspace.d.ts +296 -25
- package/payloads/v1/workspace.js +128 -8
- package/payloads/v1/workspace.js.map +1 -1
- package/payloads/v1/workspace.mjs +115 -7
- package/rest/v1/activity.d.ts +20 -9
- package/rest/v1/activity.js.map +1 -1
- package/rest/v1/api-key.d.ts +26 -0
- package/{payloads/v1/credits.js → rest/v1/api-key.js} +4 -4
- package/rest/v1/api-key.js.map +1 -0
- package/rest/v1/api-key.mjs +1 -0
- package/rest/v1/application.d.ts +305 -23
- package/rest/v1/application.js.map +1 -1
- package/rest/v1/database-data.d.ts +234 -0
- package/rest/v1/database-data.js +19 -0
- package/rest/v1/database-data.js.map +1 -0
- package/rest/v1/database-data.mjs +1 -0
- package/rest/v1/database.d.ts +55 -14
- package/rest/v1/database.js.map +1 -1
- package/rest/v1/github.d.ts +22 -0
- package/rest/v1/{wing.js → github.js} +4 -4
- package/rest/v1/github.js.map +1 -0
- package/rest/v1/github.mjs +1 -0
- package/rest/v1/index.d.ts +16 -11
- package/rest/v1/index.js.map +1 -1
- package/rest/v1/notification.d.ts +2 -3
- package/rest/v1/notification.js.map +1 -1
- package/rest/v1/oauth.d.ts +60 -0
- package/{payloads/v1/wing.js → rest/v1/oauth.js} +4 -4
- package/rest/v1/oauth.js.map +1 -0
- package/rest/v1/oauth.mjs +1 -0
- package/rest/v1/orders.d.ts +28 -7
- package/rest/v1/orders.js.map +1 -1
- package/rest/v1/redeem.d.ts +2 -1
- package/rest/v1/redeem.js.map +1 -1
- package/rest/v1/snapshot.d.ts +45 -10
- package/rest/v1/snapshot.js.map +1 -1
- package/rest/v1/status.d.ts +1 -0
- package/rest/v1/user.d.ts +56 -7
- package/rest/v1/user.js.map +1 -1
- package/rest/v1/workspace.d.ts +186 -18
- package/rest/v1/workspace.js.map +1 -1
- package/v1.d.ts +24 -19
- package/v1.js +630 -10
- package/v1.js.map +1 -1
- package/v1.mjs +590 -9
- package/payloads/v1/credits.d.ts +0 -56
- package/payloads/v1/credits.js.map +0 -1
- package/payloads/v1/credits.mjs +0 -1
- package/payloads/v1/wing.d.ts +0 -133
- package/payloads/v1/wing.js.map +0 -1
- package/payloads/v1/wing.mjs +0 -1
- package/rest/v1/credits.d.ts +0 -17
- package/rest/v1/credits.js.map +0 -1
- package/rest/v1/credits.mjs +0 -1
- package/rest/v1/wing.d.ts +0 -38
- package/rest/v1/wing.js.map +0 -1
- package/rest/v1/wing.mjs +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SnowFlake, UserPlan, ISODateString } from '../../common/v1.js';
|
|
2
|
+
import './api-error.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
5
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/get
|
|
5
6
|
*/
|
|
6
7
|
type ApplicationLanguage = "javascript" | "typescript" | "bun" | "python" | "static" | "php" | "go" | "ruby" | "java" | "rust";
|
|
7
8
|
declare const ApplicationLanguage: {
|
|
@@ -17,7 +18,7 @@ declare const ApplicationLanguage: {
|
|
|
17
18
|
readonly RUST: "rust";
|
|
18
19
|
};
|
|
19
20
|
/**
|
|
20
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
21
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/get
|
|
21
22
|
*/
|
|
22
23
|
type ApplicationStatus = "up" | "down";
|
|
23
24
|
declare const ApplicationStatus: {
|
|
@@ -25,7 +26,7 @@ declare const ApplicationStatus: {
|
|
|
25
26
|
readonly DOWN: "down";
|
|
26
27
|
};
|
|
27
28
|
/**
|
|
28
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
29
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/get
|
|
29
30
|
*/
|
|
30
31
|
type ApplicationCluster = number;
|
|
31
32
|
declare const ApplicationCluster: {
|
|
@@ -34,7 +35,7 @@ declare const ApplicationCluster: {
|
|
|
34
35
|
readonly USA_3: 3;
|
|
35
36
|
};
|
|
36
37
|
/**
|
|
37
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
38
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/get
|
|
38
39
|
*/
|
|
39
40
|
type ApplicationType = 1 | 2;
|
|
40
41
|
declare const ApplicationType: {
|
|
@@ -42,7 +43,7 @@ declare const ApplicationType: {
|
|
|
42
43
|
readonly WEBSITE: 2;
|
|
43
44
|
};
|
|
44
45
|
/**
|
|
45
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
46
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/files
|
|
46
47
|
*/
|
|
47
48
|
type ApplicationFileType = "file" | "directory";
|
|
48
49
|
declare const ApplicationFileType: {
|
|
@@ -50,7 +51,7 @@ declare const ApplicationFileType: {
|
|
|
50
51
|
readonly DIRECTORY: "directory";
|
|
51
52
|
};
|
|
52
53
|
/**
|
|
53
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
54
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/get
|
|
54
55
|
*/
|
|
55
56
|
type ApplicationVersion = "recommended" | "latest" | "auto" | (string & {});
|
|
56
57
|
declare const ApplicationVersion: {
|
|
@@ -59,14 +60,14 @@ declare const ApplicationVersion: {
|
|
|
59
60
|
readonly AUTO: "auto";
|
|
60
61
|
};
|
|
61
62
|
/**
|
|
62
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
63
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/content
|
|
63
64
|
*/
|
|
64
|
-
type ApplicationFileContentType = "
|
|
65
|
+
type ApplicationFileContentType = "base64";
|
|
65
66
|
declare const ApplicationFileContentType: {
|
|
66
|
-
readonly
|
|
67
|
+
readonly BASE64: "base64";
|
|
67
68
|
};
|
|
68
69
|
/**
|
|
69
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
70
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/files
|
|
70
71
|
*/
|
|
71
72
|
interface APIApplicationFile {
|
|
72
73
|
type: ApplicationFileType;
|
|
@@ -76,20 +77,44 @@ interface APIApplicationFile {
|
|
|
76
77
|
last_modified: ISODateString;
|
|
77
78
|
}
|
|
78
79
|
/**
|
|
79
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
80
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/tree
|
|
80
81
|
*/
|
|
81
82
|
interface APIApplicationFileTree extends APIApplicationFile {
|
|
82
83
|
children?: APIApplicationFileTree[];
|
|
83
84
|
}
|
|
84
85
|
/**
|
|
85
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
86
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/content
|
|
86
87
|
*/
|
|
87
88
|
interface APIApplicationFileContent {
|
|
88
|
-
type:
|
|
89
|
-
|
|
89
|
+
type: "base64";
|
|
90
|
+
/** File bytes in standard base64 (with padding). */
|
|
91
|
+
data: string;
|
|
92
|
+
/** Actual size in bytes (not the length of the base64 string). */
|
|
93
|
+
size: number;
|
|
94
|
+
/** File mtime; send it back on PUT (`last_modified`) to detect edit conflicts. */
|
|
95
|
+
last_modified: ISODateString;
|
|
90
96
|
}
|
|
91
97
|
/**
|
|
92
|
-
*
|
|
98
|
+
* Successful ZIP upload through `POST /v1/apps/:id/files/upload`.
|
|
99
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/upload
|
|
100
|
+
*/
|
|
101
|
+
interface APIApplicationFileUpload {
|
|
102
|
+
app_id: SnowFlake;
|
|
103
|
+
updated_at: ISODateString;
|
|
104
|
+
missing_dependencies: string[];
|
|
105
|
+
removed_directories: string[];
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Repository linked to the application for auto-deploy. The webhook URL is not included here.
|
|
109
|
+
*
|
|
110
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/get
|
|
111
|
+
*/
|
|
112
|
+
interface APIApplicationGithub {
|
|
113
|
+
repo_owner: string;
|
|
114
|
+
repo_name: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/get
|
|
93
118
|
*/
|
|
94
119
|
interface APIApplication {
|
|
95
120
|
id: SnowFlake;
|
|
@@ -103,56 +128,98 @@ interface APIApplication {
|
|
|
103
128
|
ram: number;
|
|
104
129
|
status: ApplicationStatus;
|
|
105
130
|
subdomain: string | null;
|
|
131
|
+
/**
|
|
132
|
+
* Canonical public URL of the app, computed by the server (`custom_domain` > `subdomain` >
|
|
133
|
+
* `null`). Clients should use it as-is instead of building the URL from the subdomain.
|
|
134
|
+
*/
|
|
135
|
+
public_url: string | null;
|
|
136
|
+
/**
|
|
137
|
+
* GitHub integration of this application, if any. `null` = the source is a zip (or snapshot).
|
|
138
|
+
* May be absent in older payloads. The webhook URL is available from
|
|
139
|
+
* `GET /v1/apps/:id/deploys/webhook`.
|
|
140
|
+
*/
|
|
141
|
+
github?: APIApplicationGithub | null;
|
|
106
142
|
custom_domain: string | null;
|
|
107
143
|
last_snapshot: ISODateString | null;
|
|
108
144
|
created_at: ISODateString;
|
|
109
145
|
updated_at: ISODateString;
|
|
110
146
|
main_file: string;
|
|
111
147
|
version: ApplicationVersion;
|
|
148
|
+
/** @deprecated Always `true` since 2026-09-17 — auto-restart is on for every plan; any value sent is ignored. */
|
|
112
149
|
auto_restart: boolean;
|
|
113
150
|
start_command: string | null;
|
|
114
|
-
|
|
115
|
-
|
|
151
|
+
/**
|
|
152
|
+
* Build command, run once per deploy, after dependencies are installed and before the app
|
|
153
|
+
* starts — in the build environment, with more memory than the app. `null` = no build step.
|
|
154
|
+
* If it fails, the deploy fails and the app does not start.
|
|
155
|
+
*/
|
|
156
|
+
build_command: string | null;
|
|
116
157
|
offline_since: ISODateString | null;
|
|
158
|
+
missing_dependencies?: string[];
|
|
159
|
+
/** Active Vertra Shield containment (burst/rate limit); `null` when there is none. */
|
|
160
|
+
shield_cooldown: APIApplicationShieldCooldown | null;
|
|
117
161
|
}
|
|
118
162
|
/**
|
|
119
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
163
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/get
|
|
120
164
|
*/
|
|
121
165
|
interface APIApplicationNetwork {
|
|
122
166
|
total: string;
|
|
123
167
|
now: string;
|
|
124
168
|
}
|
|
125
169
|
/**
|
|
126
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
127
|
-
*/
|
|
128
|
-
interface APIApplicationActivity {
|
|
129
|
-
message: string;
|
|
130
|
-
timestamp: ISODateString;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/applications
|
|
170
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/status
|
|
134
171
|
*/
|
|
135
172
|
interface APIApplicationStatus {
|
|
136
173
|
id: SnowFlake;
|
|
137
174
|
cpu: string;
|
|
138
175
|
ram: string;
|
|
139
|
-
status
|
|
176
|
+
/** @deprecated Not returned by `GET /v1/apps/:id/status`; use `running`. */
|
|
177
|
+
status?: ApplicationStatus;
|
|
140
178
|
running: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* `true` while dependencies are being installed.
|
|
181
|
+
*
|
|
182
|
+
* During this window the app itself is not running yet, so `running: false` alone does not
|
|
183
|
+
* mean the app is stopped. Optional: omitted when no installation is in progress.
|
|
184
|
+
*/
|
|
185
|
+
installing?: boolean;
|
|
141
186
|
storage: string;
|
|
142
|
-
network
|
|
187
|
+
/** `null` when network usage is unavailable (e.g. the app is stopped). */
|
|
188
|
+
network: APIApplicationNetwork | null;
|
|
143
189
|
uptime: number;
|
|
144
190
|
}
|
|
145
191
|
/**
|
|
146
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
192
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/allstatus
|
|
147
193
|
*/
|
|
148
194
|
interface APIApplicationStatusShort {
|
|
149
195
|
id: SnowFlake;
|
|
150
196
|
cpu: string;
|
|
151
197
|
ram: string;
|
|
198
|
+
/** Absent when the app's status could not be read. */
|
|
199
|
+
storage?: string;
|
|
200
|
+
/** Absent when the app's status could not be read; `null` when network usage is unavailable. */
|
|
201
|
+
network?: APIApplicationNetwork | null;
|
|
152
202
|
running: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* `true` while dependencies are being installed.
|
|
205
|
+
*
|
|
206
|
+
* During this window the app itself is not running yet, so `running: false` alone does not
|
|
207
|
+
* mean the app is stopped. Optional: omitted when no installation is in progress.
|
|
208
|
+
*/
|
|
209
|
+
installing?: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* Seconds since the app started.
|
|
212
|
+
*
|
|
213
|
+
* A duration, not a point in time — hence `number` rather than `ISODateString`. Same unit and
|
|
214
|
+
* type as `APIApplicationStatus.uptime`.
|
|
215
|
+
*
|
|
216
|
+
* `null` when unknown (the app is stopped or its status could not be read). **`0` is never used
|
|
217
|
+
* as a sentinel** — `0` means "just started".
|
|
218
|
+
*/
|
|
219
|
+
uptime: number | null;
|
|
153
220
|
}
|
|
154
221
|
/**
|
|
155
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
222
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/metrics
|
|
156
223
|
*/
|
|
157
224
|
interface APIApplicationMetric {
|
|
158
225
|
cpu: number;
|
|
@@ -162,7 +229,7 @@ interface APIApplicationMetric {
|
|
|
162
229
|
network: number[];
|
|
163
230
|
}
|
|
164
231
|
/**
|
|
165
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
232
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/create
|
|
166
233
|
*/
|
|
167
234
|
interface APIApplicationConfig {
|
|
168
235
|
NAME: string;
|
|
@@ -170,12 +237,15 @@ interface APIApplicationConfig {
|
|
|
170
237
|
MAIN: string;
|
|
171
238
|
VERSION: ApplicationVersion;
|
|
172
239
|
DESCRIPTION?: string;
|
|
240
|
+
/** @deprecated Always `true` since 2026-09-17 — auto-restart is on for every plan; any value sent is ignored. */
|
|
173
241
|
AUTORESTART?: boolean;
|
|
174
242
|
START?: string;
|
|
243
|
+
/** Build command (see `APIApplication.build_command`). */
|
|
244
|
+
BUILD?: string;
|
|
175
245
|
SUBDOMAIN?: string;
|
|
176
246
|
}
|
|
177
247
|
/**
|
|
178
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
248
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/enviroments/get
|
|
179
249
|
*/
|
|
180
250
|
interface APIApplicationEnvironment {
|
|
181
251
|
id: string;
|
|
@@ -185,13 +255,13 @@ interface APIApplicationEnvironment {
|
|
|
185
255
|
created_at: ISODateString;
|
|
186
256
|
}
|
|
187
257
|
/**
|
|
188
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
258
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/start
|
|
189
259
|
*/
|
|
190
260
|
interface APIApplicationOperationResponse {
|
|
191
|
-
status:
|
|
261
|
+
status: "success";
|
|
192
262
|
}
|
|
193
263
|
/**
|
|
194
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
264
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/recents
|
|
195
265
|
*/
|
|
196
266
|
interface APIApplicationDeployment {
|
|
197
267
|
app_id: SnowFlake;
|
|
@@ -202,31 +272,149 @@ interface APIApplicationDeployment {
|
|
|
202
272
|
created_at: ISODateString;
|
|
203
273
|
}
|
|
204
274
|
/**
|
|
205
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
275
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/dns
|
|
276
|
+
*/
|
|
277
|
+
type ApplicationDnsRecordType = "CNAME" | "TXT";
|
|
278
|
+
declare const ApplicationDnsRecordType: {
|
|
279
|
+
readonly CNAME: "CNAME";
|
|
280
|
+
readonly TXT: "TXT";
|
|
281
|
+
};
|
|
282
|
+
/**
|
|
283
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/dns
|
|
284
|
+
*/
|
|
285
|
+
type ApplicationDnsRecordStatus = "active" | "pending_validation";
|
|
286
|
+
declare const ApplicationDnsRecordStatus: {
|
|
287
|
+
readonly ACTIVE: "active";
|
|
288
|
+
readonly PENDING_VALIDATION: "pending_validation";
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* DNS record the user must create at their DNS provider for the custom domain.
|
|
292
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/dns
|
|
206
293
|
*/
|
|
207
|
-
interface
|
|
208
|
-
type:
|
|
294
|
+
interface APIApplicationDnsRecord {
|
|
295
|
+
type: ApplicationDnsRecordType;
|
|
209
296
|
name: string;
|
|
210
297
|
value: string;
|
|
211
|
-
status:
|
|
298
|
+
status: ApplicationDnsRecordStatus;
|
|
212
299
|
}
|
|
213
300
|
/**
|
|
214
|
-
*
|
|
301
|
+
* Returned when the auto-deploy webhook is created.
|
|
302
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/create
|
|
215
303
|
*/
|
|
216
|
-
interface
|
|
304
|
+
interface APIApplicationWebhookUrl {
|
|
217
305
|
url: string;
|
|
218
306
|
}
|
|
219
307
|
/**
|
|
220
|
-
*
|
|
308
|
+
* Auto-deploy webhook of an application and the repository it is linked to.
|
|
309
|
+
*
|
|
310
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/webhookurl
|
|
221
311
|
*/
|
|
222
|
-
interface
|
|
312
|
+
interface APIApplicationWebhook {
|
|
313
|
+
webhook_url: string;
|
|
314
|
+
repo_owner: string;
|
|
315
|
+
repo_name: string;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/subdomain
|
|
319
|
+
*/
|
|
320
|
+
interface APIApplicationSubdomain {
|
|
321
|
+
/** Full hostname (`my-app.vertraweb.app`). */
|
|
223
322
|
subdomain: string;
|
|
224
323
|
}
|
|
225
324
|
/**
|
|
226
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
325
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/customdomain
|
|
227
326
|
*/
|
|
228
|
-
interface
|
|
327
|
+
interface APIApplicationCustomDomain {
|
|
229
328
|
domain: string;
|
|
230
329
|
}
|
|
330
|
+
/**
|
|
331
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/get
|
|
332
|
+
*/
|
|
333
|
+
type ShieldIncidentReason = "burst" | "rate_limit";
|
|
334
|
+
declare const ShieldIncidentReason: {
|
|
335
|
+
readonly BURST: "burst";
|
|
336
|
+
readonly RATE_LIMIT: "rate_limit";
|
|
337
|
+
};
|
|
338
|
+
/**
|
|
339
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/get
|
|
340
|
+
*/
|
|
341
|
+
type ShieldIncidentDirection = "in" | "out";
|
|
342
|
+
declare const ShieldIncidentDirection: {
|
|
343
|
+
readonly IN: "in";
|
|
344
|
+
readonly OUT: "out";
|
|
345
|
+
};
|
|
346
|
+
/**
|
|
347
|
+
* Active Vertra Shield containment on this application (bandwidth limit after a burst/rate limit).
|
|
348
|
+
* `null` when no containment is in effect.
|
|
349
|
+
*
|
|
350
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/get
|
|
351
|
+
*/
|
|
352
|
+
interface APIApplicationShieldCooldown {
|
|
353
|
+
until: ISODateString;
|
|
354
|
+
reason: ShieldIncidentReason;
|
|
355
|
+
direction: ShieldIncidentDirection;
|
|
356
|
+
strikes: number;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Web publishing state of an application.
|
|
360
|
+
*
|
|
361
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/publish
|
|
362
|
+
*/
|
|
363
|
+
interface APIApplicationWebPublish {
|
|
364
|
+
/** `null` when web publishing is off. */
|
|
365
|
+
subdomain: string | null;
|
|
366
|
+
custom_domain: string | null;
|
|
367
|
+
type: ApplicationType;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Suggestions from scanning the zip before creating an application. Nothing is applied
|
|
371
|
+
* automatically: they are meant to pre-fill a creation form that the user can edit.
|
|
372
|
+
*
|
|
373
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/scan
|
|
374
|
+
*/
|
|
375
|
+
interface APIApplicationScanSuggestions {
|
|
376
|
+
suggested_start_command?: string;
|
|
377
|
+
suggested_build_command?: string;
|
|
378
|
+
suggested_memory_mb?: number;
|
|
379
|
+
suggested_public_web?: boolean;
|
|
380
|
+
missing_dependencies?: string[];
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* One runtime of `GET /v1/apps/runtimes`.
|
|
384
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/runtimes
|
|
385
|
+
*/
|
|
386
|
+
interface APIApplicationRuntime {
|
|
387
|
+
/** Recommended version for new applications. */
|
|
388
|
+
recommended: string;
|
|
389
|
+
latest: string;
|
|
390
|
+
/** Other exact versions that can be pinned. Empty for runtimes without version pinning. */
|
|
391
|
+
specific: string[];
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Catalog of supported runtimes, keyed by language.
|
|
395
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/runtimes
|
|
396
|
+
*/
|
|
397
|
+
type APIApplicationRuntimes = Record<ApplicationLanguage, APIApplicationRuntime>;
|
|
398
|
+
/**
|
|
399
|
+
* `event` field of the `GET /v1/apps/:id/realtime` stream (`text/event-stream`).
|
|
400
|
+
* `logs` = application output (one or more lines); `system` = stream/platform notices (e.g.
|
|
401
|
+
* `install_note:started`); `heartbeat` = keep-alive, no content.
|
|
402
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/realtime
|
|
403
|
+
*/
|
|
404
|
+
type ApplicationRealtimeEventType = "logs" | "system" | "heartbeat";
|
|
405
|
+
declare const ApplicationRealtimeEventType: {
|
|
406
|
+
readonly LOGS: "logs";
|
|
407
|
+
readonly SYSTEM: "system";
|
|
408
|
+
readonly HEARTBEAT: "heartbeat";
|
|
409
|
+
};
|
|
410
|
+
/**
|
|
411
|
+
* One server-sent event of `GET /v1/apps/:id/realtime`. `data` is plain text, not JSON; a `logs`
|
|
412
|
+
* event may carry several lines separated by `\n`.
|
|
413
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/apps/realtime
|
|
414
|
+
*/
|
|
415
|
+
interface APIApplicationRealtimeEvent {
|
|
416
|
+
event: ApplicationRealtimeEventType;
|
|
417
|
+
data: string;
|
|
418
|
+
}
|
|
231
419
|
|
|
232
|
-
export { type APIApplication, type
|
|
420
|
+
export { type APIApplication, type APIApplicationConfig, type APIApplicationCustomDomain, type APIApplicationDeployment, type APIApplicationDnsRecord, type APIApplicationEnvironment, type APIApplicationFile, type APIApplicationFileContent, type APIApplicationFileTree, type APIApplicationFileUpload, type APIApplicationGithub, type APIApplicationMetric, type APIApplicationNetwork, type APIApplicationOperationResponse, type APIApplicationRealtimeEvent, type APIApplicationRuntime, type APIApplicationRuntimes, type APIApplicationScanSuggestions, type APIApplicationShieldCooldown, type APIApplicationStatus, type APIApplicationStatusShort, type APIApplicationSubdomain, type APIApplicationWebPublish, type APIApplicationWebhook, type APIApplicationWebhookUrl, ApplicationCluster, ApplicationDnsRecordStatus, ApplicationDnsRecordType, ApplicationFileContentType, ApplicationFileType, ApplicationLanguage, ApplicationRealtimeEventType, ApplicationStatus, ApplicationType, ApplicationVersion, ShieldIncidentDirection, ShieldIncidentReason };
|
|
@@ -21,12 +21,17 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var application_exports = {};
|
|
22
22
|
__export(application_exports, {
|
|
23
23
|
ApplicationCluster: () => ApplicationCluster,
|
|
24
|
+
ApplicationDnsRecordStatus: () => ApplicationDnsRecordStatus,
|
|
25
|
+
ApplicationDnsRecordType: () => ApplicationDnsRecordType,
|
|
24
26
|
ApplicationFileContentType: () => ApplicationFileContentType,
|
|
25
27
|
ApplicationFileType: () => ApplicationFileType,
|
|
26
28
|
ApplicationLanguage: () => ApplicationLanguage,
|
|
29
|
+
ApplicationRealtimeEventType: () => ApplicationRealtimeEventType,
|
|
27
30
|
ApplicationStatus: () => ApplicationStatus,
|
|
28
31
|
ApplicationType: () => ApplicationType,
|
|
29
|
-
ApplicationVersion: () => ApplicationVersion
|
|
32
|
+
ApplicationVersion: () => ApplicationVersion,
|
|
33
|
+
ShieldIncidentDirection: () => ShieldIncidentDirection,
|
|
34
|
+
ShieldIncidentReason: () => ShieldIncidentReason
|
|
30
35
|
});
|
|
31
36
|
module.exports = __toCommonJS(application_exports);
|
|
32
37
|
var ApplicationLanguage = {
|
|
@@ -64,16 +69,42 @@ var ApplicationVersion = {
|
|
|
64
69
|
AUTO: "auto"
|
|
65
70
|
};
|
|
66
71
|
var ApplicationFileContentType = {
|
|
67
|
-
|
|
72
|
+
BASE64: "base64"
|
|
73
|
+
};
|
|
74
|
+
var ApplicationDnsRecordType = {
|
|
75
|
+
CNAME: "CNAME",
|
|
76
|
+
TXT: "TXT"
|
|
77
|
+
};
|
|
78
|
+
var ApplicationDnsRecordStatus = {
|
|
79
|
+
ACTIVE: "active",
|
|
80
|
+
PENDING_VALIDATION: "pending_validation"
|
|
81
|
+
};
|
|
82
|
+
var ShieldIncidentReason = {
|
|
83
|
+
BURST: "burst",
|
|
84
|
+
RATE_LIMIT: "rate_limit"
|
|
85
|
+
};
|
|
86
|
+
var ShieldIncidentDirection = {
|
|
87
|
+
IN: "in",
|
|
88
|
+
OUT: "out"
|
|
89
|
+
};
|
|
90
|
+
var ApplicationRealtimeEventType = {
|
|
91
|
+
LOGS: "logs",
|
|
92
|
+
SYSTEM: "system",
|
|
93
|
+
HEARTBEAT: "heartbeat"
|
|
68
94
|
};
|
|
69
95
|
// Annotate the CommonJS export names for ESM import in node:
|
|
70
96
|
0 && (module.exports = {
|
|
71
97
|
ApplicationCluster,
|
|
98
|
+
ApplicationDnsRecordStatus,
|
|
99
|
+
ApplicationDnsRecordType,
|
|
72
100
|
ApplicationFileContentType,
|
|
73
101
|
ApplicationFileType,
|
|
74
102
|
ApplicationLanguage,
|
|
103
|
+
ApplicationRealtimeEventType,
|
|
75
104
|
ApplicationStatus,
|
|
76
105
|
ApplicationType,
|
|
77
|
-
ApplicationVersion
|
|
106
|
+
ApplicationVersion,
|
|
107
|
+
ShieldIncidentDirection,
|
|
108
|
+
ShieldIncidentReason
|
|
78
109
|
});
|
|
79
110
|
//# sourceMappingURL=application.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["application.ts"],"sourcesContent":["import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport type ApplicationLanguage = \"javascript\" | \"typescript\" | \"bun\" | \"python\" | \"static\" | \"php\" | \"go\" | \"ruby\" | \"java\" | \"rust\";\nexport const ApplicationLanguage = {\n\tJAVASCRIPT: \"javascript\",\n\tTYPESCRIPT: \"typescript\",\n\tBUN: \"bun\",\n\tPYTHON: \"python\",\n\tSTATIC: \"static\",\n\tPHP: \"php\",\n\tGO: \"go\",\n\tRUBY: \"ruby\",\n\tJAVA: \"java\",\n\tRUST: \"rust\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport type ApplicationStatus = \"up\" | \"down\";\nexport const ApplicationStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport type ApplicationCluster = number;\nexport const ApplicationCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport type ApplicationType = 1 | 2;\nexport const ApplicationType = {\n\tBOT: 1,\n\tWEBSITE: 2,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport type ApplicationFileType = \"file\" | \"directory\";\nexport const ApplicationFileType = {\n\tFILE: \"file\",\n\tDIRECTORY: \"directory\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport type ApplicationVersion = \"recommended\" | \"latest\" | \"auto\" | (string & {});\nexport const ApplicationVersion = {\n\tRECOMMENDED: \"recommended\",\n\tLATEST: \"latest\",\n\tAUTO: \"auto\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport type ApplicationFileContentType = \"buffer\";\nexport const ApplicationFileContentType = {\n\tBUFFER: \"buffer\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFile {\n\ttype: ApplicationFileType;\n\tname: string;\n\tpath: string;\n\tsize?: string;\n\tlast_modified: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFileTree extends APIApplicationFile {\n\tchildren?: APIApplicationFileTree[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationFileContent {\n\ttype: ApplicationFileContentType;\n\tdata: number[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplication {\n\tid: SnowFlake;\n\tcluster: ApplicationCluster;\n\ttype: ApplicationType;\n\tname: string;\n\tdescription?: string;\n\towner_id: string; // UUID\n\towner_plan_id: UserPlan; // Owner App Plan\n\tlanguage: ApplicationLanguage;\n\tram: number;\n\tstatus: ApplicationStatus;\n\tsubdomain: string | null; // example: \"my-app.vertraweb.com\"\n\tcustom_domain: string | null; // example: \"my-app.com.br\"\n\tlast_snapshot: ISODateString | null;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tmain_file: string;\n\tversion: ApplicationVersion;\n\tauto_restart: boolean;\n\tstart_command: string | null;\n\tuse_credits: boolean;\n\tcredits_used?: number;\n\toffline_since: ISODateString | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationActivity {\n\tmessage: string;\n\ttimestamp: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: ApplicationStatus;\n\trunning: boolean;\n\tstorage: string;\n\tnetwork: APIApplicationNetwork;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationStatusShort {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\trunning: boolean;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationMetric {\n\tcpu: number;\n\tram: number;\n\tstorage: number;\n\tdate: ISODateString;\n\tnetwork: number[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationConfig {\n\tNAME: string;\n\tMEMORY: number;\n\tMAIN: string;\n\tVERSION: ApplicationVersion;\n\tDESCRIPTION?: string;\n\tAUTORESTART?: boolean;\n\tSTART?: string;\n\tSUBDOMAIN?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationEnvironment {\n\tid: string;\n\tkey: string;\n\tvalue: string;\n\tnote: string | null;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationOperationResponse {\n\tstatus: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIApplicationDeployment {\n\tapp_id: SnowFlake;\n\tcommit_id: string;\n\tmessage: string;\n\tpusher: string;\n\tbranch: string;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIDnsRecord {\n\ttype: string;\n\tname: string;\n\tvalue: string;\n\tstatus: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APIWebhookUrl {\n\turl: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APISubdomainResponse {\n\tsubdomain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/applications\n */\nexport interface APICustomDomainResponse {\n\tdomain: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,sBAAsB;AAAA,EAClC,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACP;AAMO,IAAM,oBAAoB;AAAA,EAChC,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,qBAAqB;AAAA,EACjC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,kBAAkB;AAAA,EAC9B,KAAK;AAAA,EACL,SAAS;AACV;AAMO,IAAM,sBAAsB;AAAA,EAClC,MAAM;AAAA,EACN,WAAW;AACZ;AAMO,IAAM,qBAAqB;AAAA,EACjC,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,MAAM;AACP;AAMO,IAAM,6BAA6B;AAAA,EACzC,QAAQ;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["application.ts"],"sourcesContent":["import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationLanguage = \"javascript\" | \"typescript\" | \"bun\" | \"python\" | \"static\" | \"php\" | \"go\" | \"ruby\" | \"java\" | \"rust\";\nexport const ApplicationLanguage = {\n\tJAVASCRIPT: \"javascript\",\n\tTYPESCRIPT: \"typescript\",\n\tBUN: \"bun\",\n\tPYTHON: \"python\",\n\tSTATIC: \"static\",\n\tPHP: \"php\",\n\tGO: \"go\",\n\tRUBY: \"ruby\",\n\tJAVA: \"java\",\n\tRUST: \"rust\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationStatus = \"up\" | \"down\";\nexport const ApplicationStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationCluster = number;\nexport const ApplicationCluster = {\n\tUSA_1: 1,\n\tUSA_2: 2,\n\tUSA_3: 3,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationType = 1 | 2;\nexport const ApplicationType = {\n\tBOT: 1,\n\tWEBSITE: 2,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/files\n */\nexport type ApplicationFileType = \"file\" | \"directory\";\nexport const ApplicationFileType = {\n\tFILE: \"file\",\n\tDIRECTORY: \"directory\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ApplicationVersion = \"recommended\" | \"latest\" | \"auto\" | (string & {});\nexport const ApplicationVersion = {\n\tRECOMMENDED: \"recommended\",\n\tLATEST: \"latest\",\n\tAUTO: \"auto\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/content\n */\nexport type ApplicationFileContentType = \"base64\";\nexport const ApplicationFileContentType = {\n\tBASE64: \"base64\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/files\n */\nexport interface APIApplicationFile {\n\ttype: ApplicationFileType;\n\tname: string;\n\tpath: string;\n\tsize?: string;\n\tlast_modified: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/tree\n */\nexport interface APIApplicationFileTree extends APIApplicationFile {\n\tchildren?: APIApplicationFileTree[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/content\n */\nexport interface APIApplicationFileContent {\n\ttype: \"base64\";\n\t/** File bytes in standard base64 (with padding). */\n\tdata: string;\n\t/** Actual size in bytes (not the length of the base64 string). */\n\tsize: number;\n\t/** File mtime; send it back on PUT (`last_modified`) to detect edit conflicts. */\n\tlast_modified: ISODateString;\n}\n\n/**\n * Successful ZIP upload through `POST /v1/apps/:id/files/upload`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/filemanager/upload\n */\nexport interface APIApplicationFileUpload {\n\tapp_id: SnowFlake;\n\tupdated_at: ISODateString;\n\tmissing_dependencies: string[];\n\tremoved_directories: string[];\n}\n\n/**\n * Repository linked to the application for auto-deploy. The webhook URL is not included here.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport interface APIApplicationGithub {\n\trepo_owner: string;\n\trepo_name: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport interface APIApplication {\n\tid: SnowFlake;\n\tcluster: ApplicationCluster;\n\ttype: ApplicationType;\n\tname: string;\n\tdescription?: string;\n\towner_id: string; // UUID\n\towner_plan_id: UserPlan; // Owner's plan\n\tlanguage: ApplicationLanguage;\n\tram: number;\n\tstatus: ApplicationStatus;\n\tsubdomain: string | null; // example: \"my-app.vertraweb.app\"\n\t/**\n\t * Canonical public URL of the app, computed by the server (`custom_domain` > `subdomain` >\n\t * `null`). Clients should use it as-is instead of building the URL from the subdomain.\n\t */\n\tpublic_url: string | null;\n\t/**\n\t * GitHub integration of this application, if any. `null` = the source is a zip (or snapshot).\n\t * May be absent in older payloads. The webhook URL is available from\n\t * `GET /v1/apps/:id/deploys/webhook`.\n\t */\n\tgithub?: APIApplicationGithub | null;\n\tcustom_domain: string | null; // example: \"my-app.com.br\"\n\tlast_snapshot: ISODateString | null;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tmain_file: string;\n\tversion: ApplicationVersion;\n\t/** @deprecated Always `true` since 2026-09-17 — auto-restart is on for every plan; any value sent is ignored. */\n\tauto_restart: boolean;\n\tstart_command: string | null;\n\t/**\n\t * Build command, run once per deploy, after dependencies are installed and before the app\n\t * starts — in the build environment, with more memory than the app. `null` = no build step.\n\t * If it fails, the deploy fails and the app does not start.\n\t */\n\tbuild_command: string | null;\n\toffline_since: ISODateString | null;\n\tmissing_dependencies?: string[]; // Undeclared packages detected on build/deploy\n\t/** Active Vertra Shield containment (burst/rate limit); `null` when there is none. */\n\tshield_cooldown: APIApplicationShieldCooldown | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport interface APIApplicationNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/status\n */\nexport interface APIApplicationStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\t/** @deprecated Not returned by `GET /v1/apps/:id/status`; use `running`. */\n\tstatus?: ApplicationStatus;\n\trunning: boolean;\n\t/**\n\t * `true` while dependencies are being installed.\n\t *\n\t * During this window the app itself is not running yet, so `running: false` alone does not\n\t * mean the app is stopped. Optional: omitted when no installation is in progress.\n\t */\n\tinstalling?: boolean;\n\tstorage: string;\n\t/** `null` when network usage is unavailable (e.g. the app is stopped). */\n\tnetwork: APIApplicationNetwork | null;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/allstatus\n */\nexport interface APIApplicationStatusShort {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\t/** Absent when the app's status could not be read. */\n\tstorage?: string;\n\t/** Absent when the app's status could not be read; `null` when network usage is unavailable. */\n\tnetwork?: APIApplicationNetwork | null;\n\trunning: boolean;\n\t/**\n\t * `true` while dependencies are being installed.\n\t *\n\t * During this window the app itself is not running yet, so `running: false` alone does not\n\t * mean the app is stopped. Optional: omitted when no installation is in progress.\n\t */\n\tinstalling?: boolean;\n\t/**\n\t * Seconds since the app started.\n\t *\n\t * A duration, not a point in time — hence `number` rather than `ISODateString`. Same unit and\n\t * type as `APIApplicationStatus.uptime`.\n\t *\n\t * `null` when unknown (the app is stopped or its status could not be read). **`0` is never used\n\t * as a sentinel** — `0` means \"just started\".\n\t */\n\tuptime: number | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/metrics\n */\nexport interface APIApplicationMetric {\n\tcpu: number;\n\tram: number;\n\tstorage: number;\n\tdate: ISODateString;\n\tnetwork: number[];\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/create\n */\nexport interface APIApplicationConfig {\n\tNAME: string;\n\tMEMORY: number;\n\tMAIN: string;\n\tVERSION: ApplicationVersion;\n\tDESCRIPTION?: string;\n\t/** @deprecated Always `true` since 2026-09-17 — auto-restart is on for every plan; any value sent is ignored. */\n\tAUTORESTART?: boolean;\n\tSTART?: string;\n\t/** Build command (see `APIApplication.build_command`). */\n\tBUILD?: string;\n\tSUBDOMAIN?: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/enviroments/get\n */\nexport interface APIApplicationEnvironment {\n\tid: string;\n\tkey: string;\n\tvalue: string;\n\tnote: string | null;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/start\n */\nexport interface APIApplicationOperationResponse {\n\tstatus: \"success\";\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/recents\n */\nexport interface APIApplicationDeployment {\n\tapp_id: SnowFlake;\n\tcommit_id: string;\n\tmessage: string;\n\tpusher: string;\n\tbranch: string;\n\tcreated_at: ISODateString;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/dns\n */\nexport type ApplicationDnsRecordType = \"CNAME\" | \"TXT\";\nexport const ApplicationDnsRecordType = {\n\tCNAME: \"CNAME\",\n\tTXT: \"TXT\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/dns\n */\nexport type ApplicationDnsRecordStatus = \"active\" | \"pending_validation\";\nexport const ApplicationDnsRecordStatus = {\n\tACTIVE: \"active\",\n\tPENDING_VALIDATION: \"pending_validation\",\n} as const;\n\n/**\n * DNS record the user must create at their DNS provider for the custom domain.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/dns\n */\nexport interface APIApplicationDnsRecord {\n\ttype: ApplicationDnsRecordType;\n\tname: string;\n\tvalue: string;\n\tstatus: ApplicationDnsRecordStatus;\n}\n\n/**\n * Returned when the auto-deploy webhook is created.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/create\n */\nexport interface APIApplicationWebhookUrl {\n\turl: string;\n}\n\n/**\n * Auto-deploy webhook of an application and the repository it is linked to.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/deploys/webhookurl\n */\nexport interface APIApplicationWebhook {\n\twebhook_url: string;\n\trepo_owner: string;\n\trepo_name: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/subdomain\n */\nexport interface APIApplicationSubdomain {\n\t/** Full hostname (`my-app.vertraweb.app`). */\n\tsubdomain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/customdomain\n */\nexport interface APIApplicationCustomDomain {\n\tdomain: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ShieldIncidentReason = \"burst\" | \"rate_limit\";\nexport const ShieldIncidentReason = {\n\tBURST: \"burst\",\n\tRATE_LIMIT: \"rate_limit\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport type ShieldIncidentDirection = \"in\" | \"out\";\nexport const ShieldIncidentDirection = {\n\tIN: \"in\",\n\tOUT: \"out\",\n} as const;\n\n/**\n * Active Vertra Shield containment on this application (bandwidth limit after a burst/rate limit).\n * `null` when no containment is in effect.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/get\n */\nexport interface APIApplicationShieldCooldown {\n\tuntil: ISODateString;\n\treason: ShieldIncidentReason;\n\tdirection: ShieldIncidentDirection;\n\tstrikes: number;\n}\n\n/**\n * Web publishing state of an application.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/network/publish\n */\nexport interface APIApplicationWebPublish {\n\t/** `null` when web publishing is off. */\n\tsubdomain: string | null;\n\tcustom_domain: string | null;\n\ttype: ApplicationType;\n}\n\n/**\n * Suggestions from scanning the zip before creating an application. Nothing is applied\n * automatically: they are meant to pre-fill a creation form that the user can edit.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/scan\n */\nexport interface APIApplicationScanSuggestions {\n\tsuggested_start_command?: string;\n\tsuggested_build_command?: string;\n\tsuggested_memory_mb?: number;\n\tsuggested_public_web?: boolean;\n\tmissing_dependencies?: string[];\n}\n\n/**\n * One runtime of `GET /v1/apps/runtimes`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/runtimes\n */\nexport interface APIApplicationRuntime {\n\t/** Recommended version for new applications. */\n\trecommended: string;\n\tlatest: string;\n\t/** Other exact versions that can be pinned. Empty for runtimes without version pinning. */\n\tspecific: string[];\n}\n\n/**\n * Catalog of supported runtimes, keyed by language.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/runtimes\n */\nexport type APIApplicationRuntimes = Record<ApplicationLanguage, APIApplicationRuntime>;\n\n/**\n * `event` field of the `GET /v1/apps/:id/realtime` stream (`text/event-stream`).\n * `logs` = application output (one or more lines); `system` = stream/platform notices (e.g.\n * `install_note:started`); `heartbeat` = keep-alive, no content.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/realtime\n */\nexport type ApplicationRealtimeEventType = \"logs\" | \"system\" | \"heartbeat\";\nexport const ApplicationRealtimeEventType = {\n\tLOGS: \"logs\",\n\tSYSTEM: \"system\",\n\tHEARTBEAT: \"heartbeat\",\n} as const;\n\n/**\n * One server-sent event of `GET /v1/apps/:id/realtime`. `data` is plain text, not JSON; a `logs`\n * event may carry several lines separated by `\\n`.\n * @see https://docs.vertracloud.app/api-reference/endpoint/apps/realtime\n */\nexport interface APIApplicationRealtimeEvent {\n\tevent: ApplicationRealtimeEventType;\n\tdata: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,sBAAsB;AAAA,EAClC,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACP;AAMO,IAAM,oBAAoB;AAAA,EAChC,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,qBAAqB;AAAA,EACjC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,kBAAkB;AAAA,EAC9B,KAAK;AAAA,EACL,SAAS;AACV;AAMO,IAAM,sBAAsB;AAAA,EAClC,MAAM;AAAA,EACN,WAAW;AACZ;AAMO,IAAM,qBAAqB;AAAA,EACjC,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,MAAM;AACP;AAMO,IAAM,6BAA6B;AAAA,EACzC,QAAQ;AACT;AAiOO,IAAM,2BAA2B;AAAA,EACvC,OAAO;AAAA,EACP,KAAK;AACN;AAMO,IAAM,6BAA6B;AAAA,EACzC,QAAQ;AAAA,EACR,oBAAoB;AACrB;AAmDO,IAAM,uBAAuB;AAAA,EACnC,OAAO;AAAA,EACP,YAAY;AACb;AAMO,IAAM,0BAA0B;AAAA,EACtC,IAAI;AAAA,EACJ,KAAK;AACN;AAkEO,IAAM,+BAA+B;AAAA,EAC3C,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,WAAW;AACZ;","names":[]}
|
|
@@ -34,15 +34,41 @@ var ApplicationVersion = {
|
|
|
34
34
|
AUTO: "auto"
|
|
35
35
|
};
|
|
36
36
|
var ApplicationFileContentType = {
|
|
37
|
-
|
|
37
|
+
BASE64: "base64"
|
|
38
|
+
};
|
|
39
|
+
var ApplicationDnsRecordType = {
|
|
40
|
+
CNAME: "CNAME",
|
|
41
|
+
TXT: "TXT"
|
|
42
|
+
};
|
|
43
|
+
var ApplicationDnsRecordStatus = {
|
|
44
|
+
ACTIVE: "active",
|
|
45
|
+
PENDING_VALIDATION: "pending_validation"
|
|
46
|
+
};
|
|
47
|
+
var ShieldIncidentReason = {
|
|
48
|
+
BURST: "burst",
|
|
49
|
+
RATE_LIMIT: "rate_limit"
|
|
50
|
+
};
|
|
51
|
+
var ShieldIncidentDirection = {
|
|
52
|
+
IN: "in",
|
|
53
|
+
OUT: "out"
|
|
54
|
+
};
|
|
55
|
+
var ApplicationRealtimeEventType = {
|
|
56
|
+
LOGS: "logs",
|
|
57
|
+
SYSTEM: "system",
|
|
58
|
+
HEARTBEAT: "heartbeat"
|
|
38
59
|
};
|
|
39
60
|
export {
|
|
40
61
|
ApplicationCluster,
|
|
62
|
+
ApplicationDnsRecordStatus,
|
|
63
|
+
ApplicationDnsRecordType,
|
|
41
64
|
ApplicationFileContentType,
|
|
42
65
|
ApplicationFileType,
|
|
43
66
|
ApplicationLanguage,
|
|
67
|
+
ApplicationRealtimeEventType,
|
|
44
68
|
ApplicationStatus,
|
|
45
69
|
ApplicationType,
|
|
46
|
-
ApplicationVersion
|
|
70
|
+
ApplicationVersion,
|
|
71
|
+
ShieldIncidentDirection,
|
|
72
|
+
ShieldIncidentReason
|
|
47
73
|
};
|
|
48
74
|
//# sourceMappingURL=application.mjs.map
|