@dreamlake/dreamlake-cli 0.105.1 → 0.107.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/dist/api/index.d.ts +255 -14
- package/dist/api/index.js +3 -0
- package/dist/api/lakeshore-connections.d.ts +30 -0
- package/dist/api/lakeshore-connections.js +29 -0
- package/dist/api/native-experiments.d.ts +218 -7
- package/dist/api/native-experiments.js +154 -9
- package/dist/cli/artifact/index.js +19 -3
- package/dist/cli/artifact/siteConfig.d.ts +12 -0
- package/dist/cli/artifact/siteConfig.js +17 -4
- package/dist/cli/auth/commands.d.ts +11 -1
- package/dist/cli/auth/commands.js +34 -10
- package/dist/cli/experiments/native-commands.d.ts +3 -1
- package/dist/cli/experiments/native-commands.js +21 -14
- package/dist/cli/experiments/native-run-data.d.ts +51 -0
- package/dist/cli/experiments/native-run-data.js +826 -0
- package/dist/cli/help-examples.generated.js +44 -31
- package/dist/cli/index.js +6 -3
- package/dist/cli/lakeshore/connections.d.ts +27 -0
- package/dist/cli/lakeshore/connections.js +268 -0
- package/dist/cli/memos/move-command.js +2 -2
- package/dist/cli/version.d.ts +1 -1
- package/dist/cli/version.js +1 -1
- package/package.json +9 -9
package/dist/api/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './lakeshore-connections.js';
|
|
1
2
|
export * from "./open-resources.js";
|
|
2
3
|
export * from "./library-manifest.js";
|
|
3
4
|
export * from "./library-edit.js";
|
|
@@ -167,13 +168,50 @@ export declare function createApi(transport: Transport): {
|
|
|
167
168
|
apiUrl: string;
|
|
168
169
|
provider: string;
|
|
169
170
|
}>;
|
|
170
|
-
create: (key: string) => Promise<{
|
|
171
|
+
create: (key: string, body?: import("./native-experiments.js").NativeRunCreate) => Promise<{
|
|
171
172
|
experiment: import("./native-experiments.js").NativeExperimentRun;
|
|
172
173
|
}>;
|
|
174
|
+
createAt: (segments: string[], body?: import("./native-experiments.js").NativeRunCreate) => Promise<{
|
|
175
|
+
experiment: import("./native-experiments.js").NativeExperimentRun;
|
|
176
|
+
}>;
|
|
177
|
+
purge: (id: string) => Promise<{
|
|
178
|
+
id: string;
|
|
179
|
+
deleted: boolean;
|
|
180
|
+
purged: boolean;
|
|
181
|
+
}>;
|
|
182
|
+
folders: {
|
|
183
|
+
create: (body: {
|
|
184
|
+
path: string;
|
|
185
|
+
} | {
|
|
186
|
+
parentId?: string | null;
|
|
187
|
+
name: string;
|
|
188
|
+
}) => Promise<unknown>;
|
|
189
|
+
list: (query?: {
|
|
190
|
+
parentId?: string;
|
|
191
|
+
limit?: number;
|
|
192
|
+
cursor?: string;
|
|
193
|
+
}) => Promise<unknown>;
|
|
194
|
+
get: (id: string) => Promise<unknown>;
|
|
195
|
+
update: (id: string, patch: {
|
|
196
|
+
name?: string;
|
|
197
|
+
parentId?: string | null;
|
|
198
|
+
}) => Promise<unknown>;
|
|
199
|
+
byPath: (segments: string[]) => Promise<unknown>;
|
|
200
|
+
operate: (id: string, kind: import("./native-experiments.js").NativeFolderOperation) => Promise<{
|
|
201
|
+
operationId: string;
|
|
202
|
+
state: string;
|
|
203
|
+
}>;
|
|
204
|
+
operation: (operationId: string) => Promise<unknown>;
|
|
205
|
+
};
|
|
206
|
+
batch: (action: "trash" | "purge", items: Array<{
|
|
207
|
+
type: "run" | "folder";
|
|
208
|
+
id: string;
|
|
209
|
+
}>) => Promise<unknown>;
|
|
173
210
|
list: (query?: {
|
|
174
211
|
limit?: number;
|
|
175
212
|
cursor?: string;
|
|
176
213
|
includeArchived?: boolean;
|
|
214
|
+
folderId?: string;
|
|
177
215
|
}) => Promise<{
|
|
178
216
|
runs: import("./native-experiments.js").NativeExperimentRun[];
|
|
179
217
|
hasMore: boolean;
|
|
@@ -199,15 +237,23 @@ export declare function createApi(transport: Transport): {
|
|
|
199
237
|
archive: (id: string, archived: boolean) => Promise<{
|
|
200
238
|
experiment: import("./native-experiments.js").NativeExperimentRun;
|
|
201
239
|
}>;
|
|
240
|
+
update: (id: string, patch: {
|
|
241
|
+
description?: string | null;
|
|
242
|
+
tags?: string[];
|
|
243
|
+
metadata?: Record<string, unknown> | null;
|
|
244
|
+
name?: string;
|
|
245
|
+
folderPath?: string;
|
|
246
|
+
writeProtected?: boolean;
|
|
247
|
+
}) => Promise<{
|
|
248
|
+
experiment: import("./native-experiments.js").NativeExperimentRun;
|
|
249
|
+
}>;
|
|
202
250
|
parameters: {
|
|
203
251
|
get: (id: string) => Promise<unknown>;
|
|
204
252
|
set: (id: string, data: Record<string, unknown>) => Promise<unknown>;
|
|
253
|
+
delete: (id: string) => Promise<unknown>;
|
|
205
254
|
};
|
|
206
255
|
logs: {
|
|
207
|
-
list: (id: string, query?:
|
|
208
|
-
limit?: number;
|
|
209
|
-
cursor?: string;
|
|
210
|
-
}) => Promise<unknown>;
|
|
256
|
+
list: (id: string, query?: import("./native-experiments.js").NativeLogQuery) => Promise<unknown>;
|
|
211
257
|
append: (id: string, entries: Array<{
|
|
212
258
|
timestamp: string;
|
|
213
259
|
level: string;
|
|
@@ -221,9 +267,67 @@ export declare function createApi(transport: Transport): {
|
|
|
221
267
|
limit?: number;
|
|
222
268
|
cursor?: string;
|
|
223
269
|
}) => Promise<unknown>;
|
|
224
|
-
append: (id: string, name: string, dataPoints: Record<string, unknown>[]) => Promise<unknown>;
|
|
270
|
+
append: (id: string, name: string, dataPoints: Record<string, unknown>[], descriptor?: import("./native-experiments.js").NativeItemMetadataPatch) => Promise<unknown>;
|
|
271
|
+
stats: (id: string, name: string) => Promise<unknown>;
|
|
272
|
+
updateMetadata: (id: string, name: string, patch: import("./native-experiments.js").NativeItemMetadataPatch) => Promise<unknown>;
|
|
225
273
|
};
|
|
226
|
-
|
|
274
|
+
files: {
|
|
275
|
+
list: (id: string, query?: {
|
|
276
|
+
prefix?: string;
|
|
277
|
+
tags?: string[];
|
|
278
|
+
}) => Promise<unknown>;
|
|
279
|
+
get: (id: string, fileId: string) => Promise<unknown>;
|
|
280
|
+
upload: (id: string, upload: import("./native-experiments.js").NativeFileUpload) => Promise<unknown>;
|
|
281
|
+
download: (id: string, fileId: string, options?: {
|
|
282
|
+
signal?: AbortSignal;
|
|
283
|
+
}) => Promise<Response>;
|
|
284
|
+
update: (id: string, fileId: string, patch: import("./native-experiments.js").NativeItemMetadataPatch) => Promise<unknown>;
|
|
285
|
+
delete: (id: string, fileId: string) => Promise<unknown>;
|
|
286
|
+
media: (id: string, fileId: string) => Promise<unknown>;
|
|
287
|
+
};
|
|
288
|
+
projectFiles: {
|
|
289
|
+
list: (query?: {
|
|
290
|
+
folderId?: string;
|
|
291
|
+
}) => Promise<unknown>;
|
|
292
|
+
upload: (upload: import("./native-experiments.js").NativeFileUpload) => Promise<unknown>;
|
|
293
|
+
get: (fileId: string) => Promise<unknown>;
|
|
294
|
+
text: (fileId: string) => Promise<unknown>;
|
|
295
|
+
download: (fileId: string, options?: {
|
|
296
|
+
signal?: AbortSignal;
|
|
297
|
+
}) => Promise<Response>;
|
|
298
|
+
media: (fileId: string) => Promise<unknown>;
|
|
299
|
+
replace: (fileId: string, upload: import("./native-experiments.js").NativeFileUpload) => Promise<unknown>;
|
|
300
|
+
update: (fileId: string, patch: import("./native-experiments.js").NativeItemMetadataPatch & {
|
|
301
|
+
filename?: string;
|
|
302
|
+
folderId?: string | null;
|
|
303
|
+
}) => Promise<unknown>;
|
|
304
|
+
delete: (fileId: string) => Promise<unknown>;
|
|
305
|
+
};
|
|
306
|
+
dashboard: {
|
|
307
|
+
section: (id: string, field: "header" | "metrics" | "charts" | "metadata") => Promise<unknown>;
|
|
308
|
+
charts: (id: string, type: "image" | "line" | "video") => Promise<unknown>;
|
|
309
|
+
};
|
|
310
|
+
bindrs: {
|
|
311
|
+
list: (id: string, item?: import("./native-experiments.js").NativeRunItem) => Promise<unknown>;
|
|
312
|
+
attach: (id: string, ref: import("./native-experiments.js").NativeBindrRef) => Promise<unknown>;
|
|
313
|
+
detach: (id: string, ref: import("./native-experiments.js").NativeBindrRef) => Promise<unknown>;
|
|
314
|
+
};
|
|
315
|
+
tracks: {
|
|
316
|
+
list: (id: string, query?: {
|
|
317
|
+
topic?: string;
|
|
318
|
+
}) => Promise<unknown>;
|
|
319
|
+
create: (id: string, topic: string, descriptor?: import("./native-experiments.js").NativeItemMetadataPatch) => Promise<unknown>;
|
|
320
|
+
append: (id: string, topic: string, entries: Array<Record<string, unknown> & {
|
|
321
|
+
timestamp: number;
|
|
322
|
+
}>) => Promise<unknown>;
|
|
323
|
+
read: (id: string, topic: string, query?: import("./native-experiments.js").NativeTrackQuery) => Promise<unknown>;
|
|
324
|
+
export: (id: string, topic: string, query: import("./native-experiments.js").NativeTrackQuery & {
|
|
325
|
+
format: "json" | "jsonl" | "parquet" | "mcap";
|
|
326
|
+
}, options?: {
|
|
327
|
+
signal?: AbortSignal;
|
|
328
|
+
}) => Promise<Response>;
|
|
329
|
+
};
|
|
330
|
+
setStatus: (id: string, status: import("./native-experiments.js").NativeRunStatus) => Promise<unknown>;
|
|
227
331
|
};
|
|
228
332
|
machine: {
|
|
229
333
|
self: () => Promise<unknown>;
|
|
@@ -1012,6 +1116,23 @@ export declare function createApi(transport: Transport): {
|
|
|
1012
1116
|
operation: (id: string) => Promise<unknown>;
|
|
1013
1117
|
findOperation: (requestId: string) => Promise<unknown>;
|
|
1014
1118
|
};
|
|
1119
|
+
lakeshores: (namespace: string) => {
|
|
1120
|
+
capabilities: () => Promise<{
|
|
1121
|
+
modelVersion: number;
|
|
1122
|
+
accessModes: string[];
|
|
1123
|
+
}>;
|
|
1124
|
+
create: (input: import("./lakeshore-connections.js").LakeshoreConnectionInput) => Promise<unknown>;
|
|
1125
|
+
list: (query?: {
|
|
1126
|
+
page?: number;
|
|
1127
|
+
pageSize?: number;
|
|
1128
|
+
}) => Promise<unknown>;
|
|
1129
|
+
get: (id: string) => Promise<unknown>;
|
|
1130
|
+
test: (id: string) => Promise<unknown>;
|
|
1131
|
+
update: (id: string, input: Partial<Omit<import("./lakeshore-connections.js").LakeshoreConnectionInput, "accessMode" | "token">> & {
|
|
1132
|
+
token?: string | null;
|
|
1133
|
+
}) => Promise<unknown>;
|
|
1134
|
+
disconnect: (id: string) => Promise<unknown>;
|
|
1135
|
+
};
|
|
1015
1136
|
queues: (namespace: string) => {
|
|
1016
1137
|
mounts: (query?: import("./common.js").Query) => Promise<unknown>;
|
|
1017
1138
|
mount: (input: {
|
|
@@ -1260,13 +1381,50 @@ export declare function createClient(options: ClientOptions): {
|
|
|
1260
1381
|
apiUrl: string;
|
|
1261
1382
|
provider: string;
|
|
1262
1383
|
}>;
|
|
1263
|
-
create: (key: string) => Promise<{
|
|
1384
|
+
create: (key: string, body?: import("./native-experiments.js").NativeRunCreate) => Promise<{
|
|
1264
1385
|
experiment: import("./native-experiments.js").NativeExperimentRun;
|
|
1265
1386
|
}>;
|
|
1387
|
+
createAt: (segments: string[], body?: import("./native-experiments.js").NativeRunCreate) => Promise<{
|
|
1388
|
+
experiment: import("./native-experiments.js").NativeExperimentRun;
|
|
1389
|
+
}>;
|
|
1390
|
+
purge: (id: string) => Promise<{
|
|
1391
|
+
id: string;
|
|
1392
|
+
deleted: boolean;
|
|
1393
|
+
purged: boolean;
|
|
1394
|
+
}>;
|
|
1395
|
+
folders: {
|
|
1396
|
+
create: (body: {
|
|
1397
|
+
path: string;
|
|
1398
|
+
} | {
|
|
1399
|
+
parentId?: string | null;
|
|
1400
|
+
name: string;
|
|
1401
|
+
}) => Promise<unknown>;
|
|
1402
|
+
list: (query?: {
|
|
1403
|
+
parentId?: string;
|
|
1404
|
+
limit?: number;
|
|
1405
|
+
cursor?: string;
|
|
1406
|
+
}) => Promise<unknown>;
|
|
1407
|
+
get: (id: string) => Promise<unknown>;
|
|
1408
|
+
update: (id: string, patch: {
|
|
1409
|
+
name?: string;
|
|
1410
|
+
parentId?: string | null;
|
|
1411
|
+
}) => Promise<unknown>;
|
|
1412
|
+
byPath: (segments: string[]) => Promise<unknown>;
|
|
1413
|
+
operate: (id: string, kind: import("./native-experiments.js").NativeFolderOperation) => Promise<{
|
|
1414
|
+
operationId: string;
|
|
1415
|
+
state: string;
|
|
1416
|
+
}>;
|
|
1417
|
+
operation: (operationId: string) => Promise<unknown>;
|
|
1418
|
+
};
|
|
1419
|
+
batch: (action: "trash" | "purge", items: Array<{
|
|
1420
|
+
type: "run" | "folder";
|
|
1421
|
+
id: string;
|
|
1422
|
+
}>) => Promise<unknown>;
|
|
1266
1423
|
list: (query?: {
|
|
1267
1424
|
limit?: number;
|
|
1268
1425
|
cursor?: string;
|
|
1269
1426
|
includeArchived?: boolean;
|
|
1427
|
+
folderId?: string;
|
|
1270
1428
|
}) => Promise<{
|
|
1271
1429
|
runs: import("./native-experiments.js").NativeExperimentRun[];
|
|
1272
1430
|
hasMore: boolean;
|
|
@@ -1292,15 +1450,23 @@ export declare function createClient(options: ClientOptions): {
|
|
|
1292
1450
|
archive: (id: string, archived: boolean) => Promise<{
|
|
1293
1451
|
experiment: import("./native-experiments.js").NativeExperimentRun;
|
|
1294
1452
|
}>;
|
|
1453
|
+
update: (id: string, patch: {
|
|
1454
|
+
description?: string | null;
|
|
1455
|
+
tags?: string[];
|
|
1456
|
+
metadata?: Record<string, unknown> | null;
|
|
1457
|
+
name?: string;
|
|
1458
|
+
folderPath?: string;
|
|
1459
|
+
writeProtected?: boolean;
|
|
1460
|
+
}) => Promise<{
|
|
1461
|
+
experiment: import("./native-experiments.js").NativeExperimentRun;
|
|
1462
|
+
}>;
|
|
1295
1463
|
parameters: {
|
|
1296
1464
|
get: (id: string) => Promise<unknown>;
|
|
1297
1465
|
set: (id: string, data: Record<string, unknown>) => Promise<unknown>;
|
|
1466
|
+
delete: (id: string) => Promise<unknown>;
|
|
1298
1467
|
};
|
|
1299
1468
|
logs: {
|
|
1300
|
-
list: (id: string, query?:
|
|
1301
|
-
limit?: number;
|
|
1302
|
-
cursor?: string;
|
|
1303
|
-
}) => Promise<unknown>;
|
|
1469
|
+
list: (id: string, query?: import("./native-experiments.js").NativeLogQuery) => Promise<unknown>;
|
|
1304
1470
|
append: (id: string, entries: Array<{
|
|
1305
1471
|
timestamp: string;
|
|
1306
1472
|
level: string;
|
|
@@ -1314,9 +1480,67 @@ export declare function createClient(options: ClientOptions): {
|
|
|
1314
1480
|
limit?: number;
|
|
1315
1481
|
cursor?: string;
|
|
1316
1482
|
}) => Promise<unknown>;
|
|
1317
|
-
append: (id: string, name: string, dataPoints: Record<string, unknown>[]) => Promise<unknown>;
|
|
1483
|
+
append: (id: string, name: string, dataPoints: Record<string, unknown>[], descriptor?: import("./native-experiments.js").NativeItemMetadataPatch) => Promise<unknown>;
|
|
1484
|
+
stats: (id: string, name: string) => Promise<unknown>;
|
|
1485
|
+
updateMetadata: (id: string, name: string, patch: import("./native-experiments.js").NativeItemMetadataPatch) => Promise<unknown>;
|
|
1318
1486
|
};
|
|
1319
|
-
|
|
1487
|
+
files: {
|
|
1488
|
+
list: (id: string, query?: {
|
|
1489
|
+
prefix?: string;
|
|
1490
|
+
tags?: string[];
|
|
1491
|
+
}) => Promise<unknown>;
|
|
1492
|
+
get: (id: string, fileId: string) => Promise<unknown>;
|
|
1493
|
+
upload: (id: string, upload: import("./native-experiments.js").NativeFileUpload) => Promise<unknown>;
|
|
1494
|
+
download: (id: string, fileId: string, options?: {
|
|
1495
|
+
signal?: AbortSignal;
|
|
1496
|
+
}) => Promise<Response>;
|
|
1497
|
+
update: (id: string, fileId: string, patch: import("./native-experiments.js").NativeItemMetadataPatch) => Promise<unknown>;
|
|
1498
|
+
delete: (id: string, fileId: string) => Promise<unknown>;
|
|
1499
|
+
media: (id: string, fileId: string) => Promise<unknown>;
|
|
1500
|
+
};
|
|
1501
|
+
projectFiles: {
|
|
1502
|
+
list: (query?: {
|
|
1503
|
+
folderId?: string;
|
|
1504
|
+
}) => Promise<unknown>;
|
|
1505
|
+
upload: (upload: import("./native-experiments.js").NativeFileUpload) => Promise<unknown>;
|
|
1506
|
+
get: (fileId: string) => Promise<unknown>;
|
|
1507
|
+
text: (fileId: string) => Promise<unknown>;
|
|
1508
|
+
download: (fileId: string, options?: {
|
|
1509
|
+
signal?: AbortSignal;
|
|
1510
|
+
}) => Promise<Response>;
|
|
1511
|
+
media: (fileId: string) => Promise<unknown>;
|
|
1512
|
+
replace: (fileId: string, upload: import("./native-experiments.js").NativeFileUpload) => Promise<unknown>;
|
|
1513
|
+
update: (fileId: string, patch: import("./native-experiments.js").NativeItemMetadataPatch & {
|
|
1514
|
+
filename?: string;
|
|
1515
|
+
folderId?: string | null;
|
|
1516
|
+
}) => Promise<unknown>;
|
|
1517
|
+
delete: (fileId: string) => Promise<unknown>;
|
|
1518
|
+
};
|
|
1519
|
+
dashboard: {
|
|
1520
|
+
section: (id: string, field: "header" | "metrics" | "charts" | "metadata") => Promise<unknown>;
|
|
1521
|
+
charts: (id: string, type: "image" | "line" | "video") => Promise<unknown>;
|
|
1522
|
+
};
|
|
1523
|
+
bindrs: {
|
|
1524
|
+
list: (id: string, item?: import("./native-experiments.js").NativeRunItem) => Promise<unknown>;
|
|
1525
|
+
attach: (id: string, ref: import("./native-experiments.js").NativeBindrRef) => Promise<unknown>;
|
|
1526
|
+
detach: (id: string, ref: import("./native-experiments.js").NativeBindrRef) => Promise<unknown>;
|
|
1527
|
+
};
|
|
1528
|
+
tracks: {
|
|
1529
|
+
list: (id: string, query?: {
|
|
1530
|
+
topic?: string;
|
|
1531
|
+
}) => Promise<unknown>;
|
|
1532
|
+
create: (id: string, topic: string, descriptor?: import("./native-experiments.js").NativeItemMetadataPatch) => Promise<unknown>;
|
|
1533
|
+
append: (id: string, topic: string, entries: Array<Record<string, unknown> & {
|
|
1534
|
+
timestamp: number;
|
|
1535
|
+
}>) => Promise<unknown>;
|
|
1536
|
+
read: (id: string, topic: string, query?: import("./native-experiments.js").NativeTrackQuery) => Promise<unknown>;
|
|
1537
|
+
export: (id: string, topic: string, query: import("./native-experiments.js").NativeTrackQuery & {
|
|
1538
|
+
format: "json" | "jsonl" | "parquet" | "mcap";
|
|
1539
|
+
}, options?: {
|
|
1540
|
+
signal?: AbortSignal;
|
|
1541
|
+
}) => Promise<Response>;
|
|
1542
|
+
};
|
|
1543
|
+
setStatus: (id: string, status: import("./native-experiments.js").NativeRunStatus) => Promise<unknown>;
|
|
1320
1544
|
};
|
|
1321
1545
|
machine: {
|
|
1322
1546
|
self: () => Promise<unknown>;
|
|
@@ -2105,6 +2329,23 @@ export declare function createClient(options: ClientOptions): {
|
|
|
2105
2329
|
operation: (id: string) => Promise<unknown>;
|
|
2106
2330
|
findOperation: (requestId: string) => Promise<unknown>;
|
|
2107
2331
|
};
|
|
2332
|
+
lakeshores: (namespace: string) => {
|
|
2333
|
+
capabilities: () => Promise<{
|
|
2334
|
+
modelVersion: number;
|
|
2335
|
+
accessModes: string[];
|
|
2336
|
+
}>;
|
|
2337
|
+
create: (input: import("./lakeshore-connections.js").LakeshoreConnectionInput) => Promise<unknown>;
|
|
2338
|
+
list: (query?: {
|
|
2339
|
+
page?: number;
|
|
2340
|
+
pageSize?: number;
|
|
2341
|
+
}) => Promise<unknown>;
|
|
2342
|
+
get: (id: string) => Promise<unknown>;
|
|
2343
|
+
test: (id: string) => Promise<unknown>;
|
|
2344
|
+
update: (id: string, input: Partial<Omit<import("./lakeshore-connections.js").LakeshoreConnectionInput, "accessMode" | "token">> & {
|
|
2345
|
+
token?: string | null;
|
|
2346
|
+
}) => Promise<unknown>;
|
|
2347
|
+
disconnect: (id: string) => Promise<unknown>;
|
|
2348
|
+
};
|
|
2108
2349
|
queues: (namespace: string) => {
|
|
2109
2350
|
mounts: (query?: import("./common.js").Query) => Promise<unknown>;
|
|
2110
2351
|
mount: (input: {
|
package/dist/api/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { lakeshoreConnectionsApi } from './lakeshore-connections.js';
|
|
2
|
+
export * from './lakeshore-connections.js';
|
|
1
3
|
import { openResourcesApi } from "./open-resources.js";
|
|
2
4
|
export * from "./open-resources.js";
|
|
3
5
|
export * from "./library-manifest.js";
|
|
@@ -95,6 +97,7 @@ export function createApi(transport) {
|
|
|
95
97
|
sources: (namespace) => sourcesApi(transport, namespace),
|
|
96
98
|
runs: (namespace) => runsApi(transport, namespace),
|
|
97
99
|
providers: (namespace) => providersApi(transport, namespace),
|
|
100
|
+
lakeshores: (namespace) => lakeshoreConnectionsApi(transport, namespace),
|
|
98
101
|
queues: (namespace) => queuesApi(transport, namespace),
|
|
99
102
|
ownership: (namespace) => ownershipApi(transport, namespace),
|
|
100
103
|
runConfigs: (namespace) => resourceApi(transport, namespacePath(namespace) + "/run-configs"),
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type Transport } from "./client.js";
|
|
2
|
+
export interface LakeshoreConnectionInput {
|
|
3
|
+
name: string;
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
lakeshoreNs: string;
|
|
6
|
+
slug?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
accessMode?: "management" | "queues";
|
|
9
|
+
token?: string;
|
|
10
|
+
skipValidation?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** The unified service-connection API. The caller supplies credentials explicitly;
|
|
13
|
+
* no saved login, Vault download or control-plane credential is read locally. */
|
|
14
|
+
export declare function lakeshoreConnectionsApi(t: Transport, namespace: string): {
|
|
15
|
+
capabilities: () => Promise<{
|
|
16
|
+
modelVersion: number;
|
|
17
|
+
accessModes: string[];
|
|
18
|
+
}>;
|
|
19
|
+
create: (input: LakeshoreConnectionInput) => Promise<unknown>;
|
|
20
|
+
list: (query?: {
|
|
21
|
+
page?: number;
|
|
22
|
+
pageSize?: number;
|
|
23
|
+
}) => Promise<unknown>;
|
|
24
|
+
get: (id: string) => Promise<unknown>;
|
|
25
|
+
test: (id: string) => Promise<unknown>;
|
|
26
|
+
update: (id: string, input: Partial<Omit<LakeshoreConnectionInput, "accessMode" | "token">> & {
|
|
27
|
+
token?: string | null;
|
|
28
|
+
}) => Promise<unknown>;
|
|
29
|
+
disconnect: (id: string) => Promise<unknown>;
|
|
30
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { seg } from "./client.js";
|
|
2
|
+
import { namespacePath, call } from "./common.js";
|
|
3
|
+
/** The unified service-connection API. The caller supplies credentials explicitly;
|
|
4
|
+
* no saved login, Vault download or control-plane credential is read locally. */
|
|
5
|
+
export function lakeshoreConnectionsApi(t, namespace) {
|
|
6
|
+
const ns = namespacePath(namespace), base = ns + "/lakeshores";
|
|
7
|
+
const capabilities = () => call(t, "GET", ns + "/lakeshore-connection-capabilities");
|
|
8
|
+
return {
|
|
9
|
+
capabilities,
|
|
10
|
+
create: async (input) => {
|
|
11
|
+
input = { ...input };
|
|
12
|
+
if (input.accessMode === "queues") {
|
|
13
|
+
const supported = await capabilities();
|
|
14
|
+
if (supported.modelVersion !== 1 ||
|
|
15
|
+
!supported.accessModes?.includes("queues"))
|
|
16
|
+
throw new Error("Server does not support unified queue connections");
|
|
17
|
+
}
|
|
18
|
+
return t.request("POST", base + (input.accessMode === "queues" ? "/connect-v1" : ""), { json: input, redirect: "error" });
|
|
19
|
+
},
|
|
20
|
+
list: (query = {}) => call(t, "GET", base, undefined, query),
|
|
21
|
+
get: (id) => call(t, "GET", base + "/" + seg(id)),
|
|
22
|
+
test: (id) => call(t, "POST", base + "/" + seg(id) + "/test"),
|
|
23
|
+
update: (id, input) => t.request("PATCH", base + "/" + seg(id), {
|
|
24
|
+
json: input,
|
|
25
|
+
redirect: "error",
|
|
26
|
+
}),
|
|
27
|
+
disconnect: (id) => call(t, "DELETE", base + "/" + seg(id)),
|
|
28
|
+
};
|
|
29
|
+
}
|