@vertracloud/api-types 0.1.1 → 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 +234 -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 +302 -30
- 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
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Payloads of the database **Data** tab (content management: SQL, Mongo, Redis).
|
|
3
|
+
*
|
|
4
|
+
* The resource here is the **content** of the user's database, not the database instance itself
|
|
5
|
+
* (see `database.ts`). No field carries credentials: password, connection string and certificate
|
|
6
|
+
* are never returned by these routes.
|
|
7
|
+
*
|
|
8
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/overview
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Tab header: which engine this is and how much it currently stores.
|
|
12
|
+
*
|
|
13
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/overview
|
|
14
|
+
*/
|
|
15
|
+
interface APIDatabaseDataOverview {
|
|
16
|
+
engine_version: string;
|
|
17
|
+
size_bytes: number;
|
|
18
|
+
/** Tables (SQL), collections (Mongo) or keys (Redis). */
|
|
19
|
+
objects_count: number;
|
|
20
|
+
connections_active: number;
|
|
21
|
+
connections_max: number;
|
|
22
|
+
uptime_seconds: number;
|
|
23
|
+
/** Engine-specific fields (e.g. `wal_size_bytes`, `replica_set`). Optional per engine. */
|
|
24
|
+
extra?: Record<string, string | number | boolean | null>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Sort direction for any listing in the tab.
|
|
28
|
+
*
|
|
29
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/overview
|
|
30
|
+
*/
|
|
31
|
+
type DatabaseSortDirection = "asc" | "desc";
|
|
32
|
+
declare const DatabaseSortDirection: {
|
|
33
|
+
readonly Asc: "asc";
|
|
34
|
+
readonly Desc: "desc";
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Operators accepted by the structured row filter (`APIDatabaseRowFilter.op`). Closed list —
|
|
38
|
+
* anything else is rejected.
|
|
39
|
+
*
|
|
40
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows
|
|
41
|
+
*/
|
|
42
|
+
type DatabaseFilterOperator = "=" | "!=" | "<" | "<=" | ">" | ">=" | "LIKE" | "IS NULL" | "IS NOT NULL";
|
|
43
|
+
declare const DatabaseFilterOperator: {
|
|
44
|
+
readonly Eq: "=";
|
|
45
|
+
readonly Ne: "!=";
|
|
46
|
+
readonly Lt: "<";
|
|
47
|
+
readonly Lte: "<=";
|
|
48
|
+
readonly Gt: ">";
|
|
49
|
+
readonly Gte: ">=";
|
|
50
|
+
readonly Like: "LIKE";
|
|
51
|
+
readonly IsNull: "IS NULL";
|
|
52
|
+
readonly IsNotNull: "IS NOT NULL";
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* One item of the structured row filter. `value` is omitted for `IS NULL`/`IS NOT NULL`.
|
|
56
|
+
*
|
|
57
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows
|
|
58
|
+
*/
|
|
59
|
+
interface APIDatabaseRowFilter {
|
|
60
|
+
column: string;
|
|
61
|
+
op: DatabaseFilterOperator;
|
|
62
|
+
value?: unknown;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Query-string parameters for paginated **row** listing. `per_page` is capped at 200.
|
|
66
|
+
*
|
|
67
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows
|
|
68
|
+
*/
|
|
69
|
+
interface APIDatabaseListParams {
|
|
70
|
+
page?: number;
|
|
71
|
+
per_page?: number;
|
|
72
|
+
/** Simple "contains" filter applied to the column/field given by `filter_field`. */
|
|
73
|
+
filter?: string;
|
|
74
|
+
filter_field?: string;
|
|
75
|
+
sort?: string;
|
|
76
|
+
direction?: DatabaseSortDirection;
|
|
77
|
+
/**
|
|
78
|
+
* Structured filter: `APIDatabaseRowFilter[]` serialized as JSON. Up to 20 items and 4096
|
|
79
|
+
* bytes — anything larger is rejected.
|
|
80
|
+
*/
|
|
81
|
+
filters?: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Query-string parameters for paginated **document** listing. `filter` is a serialized Mongo
|
|
85
|
+
* query JSON; `sort` is a serialized `{ field: 1 | -1 }`. No `direction`/`filter_field` — the
|
|
86
|
+
* Mongo filter already carries the operator.
|
|
87
|
+
*
|
|
88
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/documents
|
|
89
|
+
*/
|
|
90
|
+
interface APIDatabaseDocumentListParams {
|
|
91
|
+
page?: number;
|
|
92
|
+
per_page?: number;
|
|
93
|
+
filter?: string;
|
|
94
|
+
sort?: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Data operation error. Same error envelope as the rest of the API — `code` is a stable English
|
|
98
|
+
* sentinel (`DB_NOT_RUNNING`, `QUERY_TIMEOUT`, …) meant to be translated by the client.
|
|
99
|
+
*
|
|
100
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/errors
|
|
101
|
+
*/
|
|
102
|
+
interface APIDatabaseDataError {
|
|
103
|
+
code: string;
|
|
104
|
+
message?: string;
|
|
105
|
+
details?: unknown;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/schemas
|
|
109
|
+
*/
|
|
110
|
+
interface APIDatabaseSchema {
|
|
111
|
+
name: string;
|
|
112
|
+
tables_count: number;
|
|
113
|
+
size_bytes: number;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables
|
|
117
|
+
*/
|
|
118
|
+
type DatabaseTableKind = "table" | "view";
|
|
119
|
+
declare const DatabaseTableKind: {
|
|
120
|
+
readonly Table: "table";
|
|
121
|
+
readonly View: "view";
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables
|
|
125
|
+
*/
|
|
126
|
+
interface APIDatabaseTable {
|
|
127
|
+
schema: string;
|
|
128
|
+
name: string;
|
|
129
|
+
kind: DatabaseTableKind;
|
|
130
|
+
/** Engine estimate — an exact count would require a full scan. */
|
|
131
|
+
rows_estimate: number;
|
|
132
|
+
size_bytes: number;
|
|
133
|
+
columns_count: number;
|
|
134
|
+
indexes_count: number;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables
|
|
138
|
+
*/
|
|
139
|
+
interface APIDatabaseColumnReference {
|
|
140
|
+
schema: string;
|
|
141
|
+
table: string;
|
|
142
|
+
column: string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables
|
|
146
|
+
*/
|
|
147
|
+
interface APIDatabaseColumn {
|
|
148
|
+
name: string;
|
|
149
|
+
/** Raw engine type (`text`, `bigint`, `timestamptz`, `varchar(255)`…). */
|
|
150
|
+
data_type: string;
|
|
151
|
+
nullable: boolean;
|
|
152
|
+
default_value: string | null;
|
|
153
|
+
is_primary_key: boolean;
|
|
154
|
+
is_unique: boolean;
|
|
155
|
+
is_foreign_key: boolean;
|
|
156
|
+
references?: APIDatabaseColumnReference;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables
|
|
160
|
+
*/
|
|
161
|
+
interface APIDatabaseIndex {
|
|
162
|
+
name: string;
|
|
163
|
+
columns: string[];
|
|
164
|
+
unique: boolean;
|
|
165
|
+
primary: boolean;
|
|
166
|
+
size_bytes: number;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows
|
|
170
|
+
*/
|
|
171
|
+
interface APIDatabaseRowsPage {
|
|
172
|
+
columns: APIDatabaseColumn[];
|
|
173
|
+
rows: Record<string, unknown>[];
|
|
174
|
+
total: number;
|
|
175
|
+
page: number;
|
|
176
|
+
per_page: number;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/query
|
|
180
|
+
*/
|
|
181
|
+
interface APIDatabaseQueryResult {
|
|
182
|
+
columns: string[];
|
|
183
|
+
/** Positional matrix — order matches `columns`. */
|
|
184
|
+
rows: unknown[][];
|
|
185
|
+
row_count: number;
|
|
186
|
+
duration_ms: number;
|
|
187
|
+
/** `true` when the result was cut at the row limit. */
|
|
188
|
+
truncated: boolean;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/collections
|
|
192
|
+
*/
|
|
193
|
+
interface APIDatabaseCollection {
|
|
194
|
+
name: string;
|
|
195
|
+
documents_count: number;
|
|
196
|
+
size_bytes: number;
|
|
197
|
+
avg_document_size: number;
|
|
198
|
+
indexes_count: number;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/documents
|
|
202
|
+
*/
|
|
203
|
+
interface APIDatabaseDocumentsPage {
|
|
204
|
+
documents: Record<string, unknown>[];
|
|
205
|
+
total: number;
|
|
206
|
+
page: number;
|
|
207
|
+
per_page: number;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/collections
|
|
211
|
+
*/
|
|
212
|
+
interface APIDatabaseMongoIndex {
|
|
213
|
+
name: string;
|
|
214
|
+
/** `{ created_at: -1 }` — same shape as `createIndex`. */
|
|
215
|
+
keys: Record<string, 1 | -1>;
|
|
216
|
+
unique: boolean;
|
|
217
|
+
sparse: boolean;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* `SCAN` query-string parameters. `cursor` absent = start of the scan.
|
|
221
|
+
*
|
|
222
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys
|
|
223
|
+
*/
|
|
224
|
+
interface APIDatabaseRedisScanParams {
|
|
225
|
+
pattern?: string;
|
|
226
|
+
cursor?: string;
|
|
227
|
+
count?: number;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys
|
|
231
|
+
*/
|
|
232
|
+
type DatabaseRedisKeyType = "string" | "hash" | "list" | "set" | "zset" | "stream";
|
|
233
|
+
declare const DatabaseRedisKeyType: {
|
|
234
|
+
readonly String: "string";
|
|
235
|
+
readonly Hash: "hash";
|
|
236
|
+
readonly List: "list";
|
|
237
|
+
readonly Set: "set";
|
|
238
|
+
readonly ZSet: "zset";
|
|
239
|
+
readonly Stream: "stream";
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys
|
|
243
|
+
*/
|
|
244
|
+
interface APIDatabaseRedisKey {
|
|
245
|
+
key: string;
|
|
246
|
+
type: DatabaseRedisKeyType;
|
|
247
|
+
/** `null` = no expiration. */
|
|
248
|
+
ttl_seconds: number | null;
|
|
249
|
+
size_bytes: number;
|
|
250
|
+
/** Cardinality (items in the hash/list/set/zset/stream). Absent for `string`. */
|
|
251
|
+
length?: number;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys
|
|
255
|
+
*/
|
|
256
|
+
interface APIDatabaseRedisKeysPage {
|
|
257
|
+
keys: APIDatabaseRedisKey[];
|
|
258
|
+
/** `SCAN` cursor. `null` = the scan is complete. */
|
|
259
|
+
cursor: string | null;
|
|
260
|
+
scanned: number;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys
|
|
264
|
+
*/
|
|
265
|
+
interface APIDatabaseRedisZSetMember {
|
|
266
|
+
member: string;
|
|
267
|
+
score: number;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Value of a key, discriminated by `type`. Collections are truncated at 1000 items **or** at the
|
|
271
|
+
* read byte limit — `truncated: true` when the value was cut for either reason. Absent/`false` =
|
|
272
|
+
* the full value was returned.
|
|
273
|
+
*
|
|
274
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys
|
|
275
|
+
*/
|
|
276
|
+
type APIDatabaseRedisKeyValue = {
|
|
277
|
+
key: string;
|
|
278
|
+
type: "string";
|
|
279
|
+
ttl_seconds: number | null;
|
|
280
|
+
value: string;
|
|
281
|
+
truncated?: boolean;
|
|
282
|
+
} | {
|
|
283
|
+
key: string;
|
|
284
|
+
type: "hash";
|
|
285
|
+
ttl_seconds: number | null;
|
|
286
|
+
value: Record<string, string>;
|
|
287
|
+
truncated?: boolean;
|
|
288
|
+
} | {
|
|
289
|
+
key: string;
|
|
290
|
+
type: "list";
|
|
291
|
+
ttl_seconds: number | null;
|
|
292
|
+
value: string[];
|
|
293
|
+
truncated?: boolean;
|
|
294
|
+
} | {
|
|
295
|
+
key: string;
|
|
296
|
+
type: "set";
|
|
297
|
+
ttl_seconds: number | null;
|
|
298
|
+
value: string[];
|
|
299
|
+
truncated?: boolean;
|
|
300
|
+
} | {
|
|
301
|
+
key: string;
|
|
302
|
+
type: "zset";
|
|
303
|
+
ttl_seconds: number | null;
|
|
304
|
+
value: APIDatabaseRedisZSetMember[];
|
|
305
|
+
truncated?: boolean;
|
|
306
|
+
} | {
|
|
307
|
+
key: string;
|
|
308
|
+
type: "stream";
|
|
309
|
+
ttl_seconds: number | null;
|
|
310
|
+
value: string[];
|
|
311
|
+
truncated?: boolean;
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/info
|
|
315
|
+
*/
|
|
316
|
+
interface APIDatabaseRedisInfo {
|
|
317
|
+
version: string;
|
|
318
|
+
used_memory_bytes: number;
|
|
319
|
+
/** `null` = no `maxmemory` configured. */
|
|
320
|
+
max_memory_bytes: number | null;
|
|
321
|
+
keys_total: number;
|
|
322
|
+
expires_total: number;
|
|
323
|
+
hits: number;
|
|
324
|
+
misses: number;
|
|
325
|
+
connected_clients: number;
|
|
326
|
+
ops_per_second: number;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export { type APIDatabaseCollection, type APIDatabaseColumn, type APIDatabaseColumnReference, type APIDatabaseDataError, type APIDatabaseDataOverview, type APIDatabaseDocumentListParams, type APIDatabaseDocumentsPage, type APIDatabaseIndex, type APIDatabaseListParams, type APIDatabaseMongoIndex, type APIDatabaseQueryResult, type APIDatabaseRedisInfo, type APIDatabaseRedisKey, type APIDatabaseRedisKeyValue, type APIDatabaseRedisKeysPage, type APIDatabaseRedisScanParams, type APIDatabaseRedisZSetMember, type APIDatabaseRowFilter, type APIDatabaseRowsPage, type APIDatabaseSchema, type APIDatabaseTable, DatabaseFilterOperator, DatabaseRedisKeyType, DatabaseSortDirection, DatabaseTableKind };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// payloads/v1/database-data.ts
|
|
21
|
+
var database_data_exports = {};
|
|
22
|
+
__export(database_data_exports, {
|
|
23
|
+
DatabaseFilterOperator: () => DatabaseFilterOperator,
|
|
24
|
+
DatabaseRedisKeyType: () => DatabaseRedisKeyType,
|
|
25
|
+
DatabaseSortDirection: () => DatabaseSortDirection,
|
|
26
|
+
DatabaseTableKind: () => DatabaseTableKind
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(database_data_exports);
|
|
29
|
+
var DatabaseSortDirection = {
|
|
30
|
+
Asc: "asc",
|
|
31
|
+
Desc: "desc"
|
|
32
|
+
};
|
|
33
|
+
var DatabaseFilterOperator = {
|
|
34
|
+
Eq: "=",
|
|
35
|
+
Ne: "!=",
|
|
36
|
+
Lt: "<",
|
|
37
|
+
Lte: "<=",
|
|
38
|
+
Gt: ">",
|
|
39
|
+
Gte: ">=",
|
|
40
|
+
Like: "LIKE",
|
|
41
|
+
IsNull: "IS NULL",
|
|
42
|
+
IsNotNull: "IS NOT NULL"
|
|
43
|
+
};
|
|
44
|
+
var DatabaseTableKind = {
|
|
45
|
+
Table: "table",
|
|
46
|
+
View: "view"
|
|
47
|
+
};
|
|
48
|
+
var DatabaseRedisKeyType = {
|
|
49
|
+
String: "string",
|
|
50
|
+
Hash: "hash",
|
|
51
|
+
List: "list",
|
|
52
|
+
Set: "set",
|
|
53
|
+
ZSet: "zset",
|
|
54
|
+
Stream: "stream"
|
|
55
|
+
};
|
|
56
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
+
0 && (module.exports = {
|
|
58
|
+
DatabaseFilterOperator,
|
|
59
|
+
DatabaseRedisKeyType,
|
|
60
|
+
DatabaseSortDirection,
|
|
61
|
+
DatabaseTableKind
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=database-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["database-data.ts"],"sourcesContent":["/**\n * Payloads of the database **Data** tab (content management: SQL, Mongo, Redis).\n *\n * The resource here is the **content** of the user's database, not the database instance itself\n * (see `database.ts`). No field carries credentials: password, connection string and certificate\n * are never returned by these routes.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/overview\n */\n\n// ---------------------------------------------------------------------------\n// Common to every engine\n// ---------------------------------------------------------------------------\n\n/**\n * Tab header: which engine this is and how much it currently stores.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/overview\n */\nexport interface APIDatabaseDataOverview {\n\tengine_version: string;\n\tsize_bytes: number;\n\t/** Tables (SQL), collections (Mongo) or keys (Redis). */\n\tobjects_count: number;\n\tconnections_active: number;\n\tconnections_max: number;\n\tuptime_seconds: number;\n\t/** Engine-specific fields (e.g. `wal_size_bytes`, `replica_set`). Optional per engine. */\n\textra?: Record<string, string | number | boolean | null>;\n}\n\n/**\n * Sort direction for any listing in the tab.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/overview\n */\nexport type DatabaseSortDirection = \"asc\" | \"desc\";\nexport const DatabaseSortDirection = {\n\tAsc: \"asc\",\n\tDesc: \"desc\",\n} as const satisfies Record<string, DatabaseSortDirection>;\n\n/**\n * Operators accepted by the structured row filter (`APIDatabaseRowFilter.op`). Closed list —\n * anything else is rejected.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows\n */\nexport type DatabaseFilterOperator = \"=\" | \"!=\" | \"<\" | \"<=\" | \">\" | \">=\" | \"LIKE\" | \"IS NULL\" | \"IS NOT NULL\";\nexport const DatabaseFilterOperator = {\n\tEq: \"=\",\n\tNe: \"!=\",\n\tLt: \"<\",\n\tLte: \"<=\",\n\tGt: \">\",\n\tGte: \">=\",\n\tLike: \"LIKE\",\n\tIsNull: \"IS NULL\",\n\tIsNotNull: \"IS NOT NULL\",\n} as const satisfies Record<string, DatabaseFilterOperator>;\n\n/**\n * One item of the structured row filter. `value` is omitted for `IS NULL`/`IS NOT NULL`.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows\n */\nexport interface APIDatabaseRowFilter {\n\tcolumn: string;\n\top: DatabaseFilterOperator;\n\tvalue?: unknown;\n}\n\n/**\n * Query-string parameters for paginated **row** listing. `per_page` is capped at 200.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows\n */\nexport interface APIDatabaseListParams {\n\tpage?: number;\n\tper_page?: number;\n\t/** Simple \"contains\" filter applied to the column/field given by `filter_field`. */\n\tfilter?: string;\n\tfilter_field?: string;\n\tsort?: string;\n\tdirection?: DatabaseSortDirection;\n\t/**\n\t * Structured filter: `APIDatabaseRowFilter[]` serialized as JSON. Up to 20 items and 4096\n\t * bytes — anything larger is rejected.\n\t */\n\tfilters?: string;\n}\n\n/**\n * Query-string parameters for paginated **document** listing. `filter` is a serialized Mongo\n * query JSON; `sort` is a serialized `{ field: 1 | -1 }`. No `direction`/`filter_field` — the\n * Mongo filter already carries the operator.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/documents\n */\nexport interface APIDatabaseDocumentListParams {\n\tpage?: number;\n\tper_page?: number;\n\tfilter?: string;\n\tsort?: string;\n}\n\n/**\n * Data operation error. Same error envelope as the rest of the API — `code` is a stable English\n * sentinel (`DB_NOT_RUNNING`, `QUERY_TIMEOUT`, …) meant to be translated by the client.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/errors\n */\nexport interface APIDatabaseDataError {\n\tcode: string;\n\tmessage?: string;\n\tdetails?: unknown;\n}\n\n// ---------------------------------------------------------------------------\n// SQL (PostgreSQL / MySQL)\n// ---------------------------------------------------------------------------\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/schemas\n */\nexport interface APIDatabaseSchema {\n\tname: string;\n\ttables_count: number;\n\tsize_bytes: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables\n */\nexport type DatabaseTableKind = \"table\" | \"view\";\nexport const DatabaseTableKind = {\n\tTable: \"table\",\n\tView: \"view\",\n} as const satisfies Record<string, DatabaseTableKind>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables\n */\nexport interface APIDatabaseTable {\n\tschema: string;\n\tname: string;\n\tkind: DatabaseTableKind;\n\t/** Engine estimate — an exact count would require a full scan. */\n\trows_estimate: number;\n\tsize_bytes: number;\n\tcolumns_count: number;\n\tindexes_count: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables\n */\nexport interface APIDatabaseColumnReference {\n\tschema: string;\n\ttable: string;\n\tcolumn: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables\n */\nexport interface APIDatabaseColumn {\n\tname: string;\n\t/** Raw engine type (`text`, `bigint`, `timestamptz`, `varchar(255)`…). */\n\tdata_type: string;\n\tnullable: boolean;\n\tdefault_value: string | null;\n\tis_primary_key: boolean;\n\tis_unique: boolean;\n\tis_foreign_key: boolean;\n\treferences?: APIDatabaseColumnReference;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/tables\n */\nexport interface APIDatabaseIndex {\n\tname: string;\n\tcolumns: string[];\n\tunique: boolean;\n\tprimary: boolean;\n\tsize_bytes: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/rows\n */\nexport interface APIDatabaseRowsPage {\n\tcolumns: APIDatabaseColumn[];\n\trows: Record<string, unknown>[];\n\ttotal: number;\n\tpage: number;\n\tper_page: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/query\n */\nexport interface APIDatabaseQueryResult {\n\tcolumns: string[];\n\t/** Positional matrix — order matches `columns`. */\n\trows: unknown[][];\n\trow_count: number;\n\tduration_ms: number;\n\t/** `true` when the result was cut at the row limit. */\n\ttruncated: boolean;\n}\n\n// ---------------------------------------------------------------------------\n// MongoDB\n// ---------------------------------------------------------------------------\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/collections\n */\nexport interface APIDatabaseCollection {\n\tname: string;\n\tdocuments_count: number;\n\tsize_bytes: number;\n\tavg_document_size: number;\n\tindexes_count: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/documents\n */\nexport interface APIDatabaseDocumentsPage {\n\tdocuments: Record<string, unknown>[];\n\ttotal: number;\n\tpage: number;\n\tper_page: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/collections\n */\nexport interface APIDatabaseMongoIndex {\n\tname: string;\n\t/** `{ created_at: -1 }` — same shape as `createIndex`. */\n\tkeys: Record<string, 1 | -1>;\n\tunique: boolean;\n\tsparse: boolean;\n}\n\n// ---------------------------------------------------------------------------\n// Redis\n// ---------------------------------------------------------------------------\n\n/**\n * `SCAN` query-string parameters. `cursor` absent = start of the scan.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport interface APIDatabaseRedisScanParams {\n\tpattern?: string;\n\tcursor?: string;\n\tcount?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport type DatabaseRedisKeyType = \"string\" | \"hash\" | \"list\" | \"set\" | \"zset\" | \"stream\";\nexport const DatabaseRedisKeyType = {\n\tString: \"string\",\n\tHash: \"hash\",\n\tList: \"list\",\n\tSet: \"set\",\n\tZSet: \"zset\",\n\tStream: \"stream\",\n} as const satisfies Record<string, DatabaseRedisKeyType>;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport interface APIDatabaseRedisKey {\n\tkey: string;\n\ttype: DatabaseRedisKeyType;\n\t/** `null` = no expiration. */\n\tttl_seconds: number | null;\n\tsize_bytes: number;\n\t/** Cardinality (items in the hash/list/set/zset/stream). Absent for `string`. */\n\tlength?: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport interface APIDatabaseRedisKeysPage {\n\tkeys: APIDatabaseRedisKey[];\n\t/** `SCAN` cursor. `null` = the scan is complete. */\n\tcursor: string | null;\n\tscanned: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport interface APIDatabaseRedisZSetMember {\n\tmember: string;\n\tscore: number;\n}\n\n/**\n * Value of a key, discriminated by `type`. Collections are truncated at 1000 items **or** at the\n * read byte limit — `truncated: true` when the value was cut for either reason. Absent/`false` =\n * the full value was returned.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/keys\n */\nexport type APIDatabaseRedisKeyValue =\n\t| { key: string; type: \"string\"; ttl_seconds: number | null; value: string; truncated?: boolean }\n\t| { key: string; type: \"hash\"; ttl_seconds: number | null; value: Record<string, string>; truncated?: boolean }\n\t| { key: string; type: \"list\"; ttl_seconds: number | null; value: string[]; truncated?: boolean }\n\t| { key: string; type: \"set\"; ttl_seconds: number | null; value: string[]; truncated?: boolean }\n\t| { key: string; type: \"zset\"; ttl_seconds: number | null; value: APIDatabaseRedisZSetMember[]; truncated?: boolean }\n\t| { key: string; type: \"stream\"; ttl_seconds: number | null; value: string[]; truncated?: boolean };\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/data/info\n */\nexport interface APIDatabaseRedisInfo {\n\tversion: string;\n\tused_memory_bytes: number;\n\t/** `null` = no `maxmemory` configured. */\n\tmax_memory_bytes: number | null;\n\tkeys_total: number;\n\texpires_total: number;\n\thits: number;\n\tmisses: number;\n\tconnected_clients: number;\n\tops_per_second: number;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqCO,IAAM,wBAAwB;AAAA,EACpC,KAAK;AAAA,EACL,MAAM;AACP;AASO,IAAM,yBAAyB;AAAA,EACrC,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,WAAW;AACZ;AA4EO,IAAM,oBAAoB;AAAA,EAChC,OAAO;AAAA,EACP,MAAM;AACP;AAkIO,IAAM,uBAAuB;AAAA,EACnC,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QAAQ;AACT;","names":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// payloads/v1/database-data.ts
|
|
2
|
+
var DatabaseSortDirection = {
|
|
3
|
+
Asc: "asc",
|
|
4
|
+
Desc: "desc"
|
|
5
|
+
};
|
|
6
|
+
var DatabaseFilterOperator = {
|
|
7
|
+
Eq: "=",
|
|
8
|
+
Ne: "!=",
|
|
9
|
+
Lt: "<",
|
|
10
|
+
Lte: "<=",
|
|
11
|
+
Gt: ">",
|
|
12
|
+
Gte: ">=",
|
|
13
|
+
Like: "LIKE",
|
|
14
|
+
IsNull: "IS NULL",
|
|
15
|
+
IsNotNull: "IS NOT NULL"
|
|
16
|
+
};
|
|
17
|
+
var DatabaseTableKind = {
|
|
18
|
+
Table: "table",
|
|
19
|
+
View: "view"
|
|
20
|
+
};
|
|
21
|
+
var DatabaseRedisKeyType = {
|
|
22
|
+
String: "string",
|
|
23
|
+
Hash: "hash",
|
|
24
|
+
List: "list",
|
|
25
|
+
Set: "set",
|
|
26
|
+
ZSet: "zset",
|
|
27
|
+
Stream: "stream"
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
DatabaseFilterOperator,
|
|
31
|
+
DatabaseRedisKeyType,
|
|
32
|
+
DatabaseSortDirection,
|
|
33
|
+
DatabaseTableKind
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=database-data.mjs.map
|
|
@@ -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/databases
|
|
5
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/get
|
|
5
6
|
*/
|
|
6
7
|
type DatabaseType = 1 | 2 | 3 | 4;
|
|
7
8
|
declare const DatabaseType: {
|
|
@@ -11,7 +12,7 @@ declare const DatabaseType: {
|
|
|
11
12
|
readonly MYSQL: 4;
|
|
12
13
|
};
|
|
13
14
|
/**
|
|
14
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/databases
|
|
15
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/get
|
|
15
16
|
*/
|
|
16
17
|
type DatabaseStatus = "up" | "down";
|
|
17
18
|
declare const DatabaseStatus: {
|
|
@@ -19,7 +20,7 @@ declare const DatabaseStatus: {
|
|
|
19
20
|
readonly DOWN: "down";
|
|
20
21
|
};
|
|
21
22
|
/**
|
|
22
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
23
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/get
|
|
23
24
|
*/
|
|
24
25
|
type DatabaseCluster = number;
|
|
25
26
|
declare const DatabaseCluster: {
|
|
@@ -28,14 +29,7 @@ declare const DatabaseCluster: {
|
|
|
28
29
|
readonly USA_3: 3;
|
|
29
30
|
};
|
|
30
31
|
/**
|
|
31
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/databases
|
|
32
|
-
*/
|
|
33
|
-
interface APIDatabaseActivity {
|
|
34
|
-
message: string;
|
|
35
|
-
timestamp: ISODateString;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/databases
|
|
32
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/get
|
|
39
33
|
*/
|
|
40
34
|
interface APIDatabase {
|
|
41
35
|
id: SnowFlake;
|
|
@@ -52,29 +46,17 @@ interface APIDatabase {
|
|
|
52
46
|
created_at: ISODateString;
|
|
53
47
|
updated_at: ISODateString;
|
|
54
48
|
last_snapshot: ISODateString | null;
|
|
55
|
-
use_credits: boolean;
|
|
56
|
-
credits_used?: number;
|
|
57
49
|
offline_since: ISODateString | null;
|
|
58
50
|
}
|
|
59
51
|
/**
|
|
60
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/databases
|
|
52
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/get
|
|
61
53
|
*/
|
|
62
54
|
interface APIDatabaseNetwork {
|
|
63
55
|
total: string;
|
|
64
56
|
now: string;
|
|
65
57
|
}
|
|
66
58
|
/**
|
|
67
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/databases
|
|
68
|
-
*/
|
|
69
|
-
interface APIDatabaseSnapshot {
|
|
70
|
-
id: SnowFlake;
|
|
71
|
-
resource_id: SnowFlake;
|
|
72
|
-
author_id: SnowFlake | null;
|
|
73
|
-
size: string;
|
|
74
|
-
date: ISODateString;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/databases
|
|
59
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/status
|
|
78
60
|
*/
|
|
79
61
|
interface APIDatabaseStatus {
|
|
80
62
|
id: SnowFlake;
|
|
@@ -83,11 +65,12 @@ interface APIDatabaseStatus {
|
|
|
83
65
|
status: DatabaseStatus;
|
|
84
66
|
running: boolean;
|
|
85
67
|
storage: string;
|
|
86
|
-
network
|
|
68
|
+
/** `null` when network usage is unavailable. */
|
|
69
|
+
network: APIDatabaseNetwork | null;
|
|
87
70
|
uptime: number;
|
|
88
71
|
}
|
|
89
72
|
/**
|
|
90
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/databases
|
|
73
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/allstatus
|
|
91
74
|
*/
|
|
92
75
|
interface APIDatabaseStatusShort {
|
|
93
76
|
id: SnowFlake;
|
|
@@ -97,7 +80,22 @@ interface APIDatabaseStatusShort {
|
|
|
97
80
|
running: boolean;
|
|
98
81
|
}
|
|
99
82
|
/**
|
|
100
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/databases
|
|
83
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/get
|
|
84
|
+
*/
|
|
85
|
+
interface APIDatabaseOperationResponse {
|
|
86
|
+
status: "success";
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Client certificate for TLS connections to the database.
|
|
90
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/credentials/get
|
|
91
|
+
*/
|
|
92
|
+
interface APIDatabaseCertificate {
|
|
93
|
+
crt: string;
|
|
94
|
+
key: string;
|
|
95
|
+
pem: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/metrics
|
|
101
99
|
*/
|
|
102
100
|
interface APIDatabaseMetrics {
|
|
103
101
|
cpu: number;
|
|
@@ -107,10 +105,10 @@ interface APIDatabaseMetrics {
|
|
|
107
105
|
network: number[];
|
|
108
106
|
}
|
|
109
107
|
/**
|
|
110
|
-
* @see https://docs.vertracloud.app/api-reference/endpoint/databases
|
|
108
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/databases/credentials/resetpassword
|
|
111
109
|
*/
|
|
112
110
|
interface APIDatabasePasswordReset {
|
|
113
111
|
password: string;
|
|
114
112
|
}
|
|
115
113
|
|
|
116
|
-
export { type APIDatabase, type
|
|
114
|
+
export { type APIDatabase, type APIDatabaseCertificate, type APIDatabaseMetrics, type APIDatabaseNetwork, type APIDatabaseOperationResponse, type APIDatabasePasswordReset, type APIDatabaseStatus, type APIDatabaseStatusShort, DatabaseCluster, DatabaseStatus, DatabaseType };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["database.ts"],"sourcesContent":["import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport type DatabaseType = 1 | 2 | 3 | 4;\nexport const DatabaseType = {\n\tPOSTGRESQL: 1,\n\tMONGODB: 2,\n\tREDIS: 3,\n\tMYSQL: 4,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases\n */\nexport type DatabaseStatus = \"up\" | \"down\";\nexport const DatabaseStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/
|
|
1
|
+
{"version":3,"sources":["database.ts"],"sourcesContent":["import type { ISODateString, SnowFlake, UserPlan } from \"../../v1\";\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\nexport type DatabaseType = 1 | 2 | 3 | 4;\nexport const DatabaseType = {\n\tPOSTGRESQL: 1,\n\tMONGODB: 2,\n\tREDIS: 3,\n\tMYSQL: 4,\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\nexport type DatabaseStatus = \"up\" | \"down\";\nexport const DatabaseStatus = {\n\tUP: \"up\",\n\tDOWN: \"down\",\n} as const;\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\nexport type DatabaseCluster = number;\nexport const DatabaseCluster = {\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/databases/get\n */\n\nexport interface APIDatabase {\n\tid: SnowFlake;\n\tcluster: DatabaseCluster;\n\ttype: DatabaseType;\n\tname: string;\n\tdescription: string;\n\towner_id: SnowFlake;\n\towner_plan_id: UserPlan; // Owner's plan\n\tstatus: DatabaseStatus;\n\tram: number;\n\thost: string; // example: \"vertra-cloud-<type>-<dbId>.vertraweb.app\"\n\tport: number;\n\tcreated_at: ISODateString;\n\tupdated_at: ISODateString;\n\tlast_snapshot: ISODateString | null;\n\toffline_since: ISODateString | null;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\nexport interface APIDatabaseNetwork {\n\ttotal: string;\n\tnow: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/status\n */\nexport interface APIDatabaseStatus {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstatus: DatabaseStatus;\n\trunning: boolean;\n\tstorage: string;\n\t/** `null` when network usage is unavailable. */\n\tnetwork: APIDatabaseNetwork | null;\n\tuptime: number;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/allstatus\n */\nexport interface APIDatabaseStatusShort {\n\tid: SnowFlake;\n\tcpu: string;\n\tram: string;\n\tstorage: string;\n\trunning: boolean;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/get\n */\nexport interface APIDatabaseOperationResponse {\n\tstatus: \"success\";\n}\n\n/**\n * Client certificate for TLS connections to the database.\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/credentials/get\n */\nexport interface APIDatabaseCertificate {\n\tcrt: string;\n\tkey: string;\n\tpem: string;\n}\n\n/**\n * @see https://docs.vertracloud.app/api-reference/endpoint/databases/metrics\n */\nexport interface APIDatabaseMetrics {\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/databases/credentials/resetpassword\n */\nexport interface APIDatabasePasswordReset {\n\tpassword: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,eAAe;AAAA,EAC3B,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AACR;AAMO,IAAM,iBAAiB;AAAA,EAC7B,IAAI;AAAA,EACJ,MAAM;AACP;AAMO,IAAM,kBAAkB;AAAA,EAC9B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A file read from a GitHub repository, with secrets redacted.
|
|
3
|
+
*
|
|
4
|
+
* Secret values found in the file are redacted before the content is returned.
|
|
5
|
+
*
|
|
6
|
+
* @see https://docs.vertracloud.app/api-reference/endpoint/github/file
|
|
7
|
+
*/
|
|
8
|
+
interface APIGitHubFile {
|
|
9
|
+
path: string;
|
|
10
|
+
content: string;
|
|
11
|
+
/** Size in bytes of the original file in the repository, before redaction. */
|
|
12
|
+
size: number;
|
|
13
|
+
/**
|
|
14
|
+
* Always `false` today: files above the size limit are rejected with `FILE_TOO_LARGE` instead
|
|
15
|
+
* of being truncated. Reserved so truncation can be added later without a breaking change.
|
|
16
|
+
*/
|
|
17
|
+
truncated: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type { APIGitHubFile };
|
|
@@ -13,7 +13,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
13
13
|
};
|
|
14
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
15
|
|
|
16
|
-
//
|
|
17
|
-
var
|
|
18
|
-
module.exports = __toCommonJS(
|
|
19
|
-
//# sourceMappingURL=
|
|
16
|
+
// payloads/v1/github.ts
|
|
17
|
+
var github_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(github_exports);
|
|
19
|
+
//# sourceMappingURL=github.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["github.ts"],"sourcesContent":["/**\n * A file read from a GitHub repository, with secrets redacted.\n *\n * Secret values found in the file are redacted before the content is returned.\n *\n * @see https://docs.vertracloud.app/api-reference/endpoint/github/file\n */\nexport interface APIGitHubFile {\n\tpath: string;\n\tcontent: string;\n\t/** Size in bytes of the original file in the repository, before redaction. */\n\tsize: number;\n\t/**\n\t * Always `false` today: files above the size limit are rejected with `FILE_TOO_LARGE` instead\n\t * of being truncated. Reserved so truncation can be added later without a breaking change.\n\t */\n\ttruncated: boolean;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=github.mjs.map
|