@sequenceholdings/artifact-studio 0.10.1 → 0.11.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 +35 -0
- package/dist/active-deploy-policy.d.ts +15 -2
- package/dist/active-deploy-policy.js +31 -7
- package/dist/build.js +6 -0
- package/dist/cli.js +43 -7
- package/dist/manifest-static.d.ts +5 -0
- package/dist/manifest-static.js +14 -0
- package/dist/manifest.d.ts +5 -0
- package/dist/platform-client.d.ts +838 -0
- package/dist/platform-client.js +47 -0
- package/dist/preview-key.d.ts +8 -0
- package/dist/preview-key.js +12 -0
- package/dist/sdk-processes.d.ts +28 -0
- package/dist/sdk-processes.js +30 -0
- package/dist/sdk.d.ts +33 -26
- package/dist/sdk.js +4 -1
- package/dist/server/broker-contract.d.ts +1 -1
- package/dist/server/client.d.ts +4 -1
- package/dist/server/client.js +3 -1
- package/dist/server/platform-client.d.ts +870 -0
- package/dist/server/platform-client.js +34 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +1 -0
- package/dist/templates/nextjs/pnpm-workspace.yaml +1 -0
- package/dist/templates/react-vite/package.json +1 -1
- package/package.json +5 -4
- package/templates/nextjs/pnpm-workspace.yaml +1 -0
- package/templates/react-vite/package.json +1 -1
|
@@ -0,0 +1,838 @@
|
|
|
1
|
+
import { type SequenceArtifactSdk, type SequenceApiUploadOptions } from './sdk.js';
|
|
2
|
+
/**
|
|
3
|
+
* Browser bootstrap for the shared Platform SDK. Authentication and capability checks
|
|
4
|
+
* stay in the trusted Artifact host; no base URL, token, or service authority is accepted.
|
|
5
|
+
* Create again with a new sdk when the host/action scope changes.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createArtifactPlatformClient({ sdk }?: {
|
|
8
|
+
sdk?: SequenceArtifactSdk;
|
|
9
|
+
}): {
|
|
10
|
+
/** App-owned compatibility routes, still subject to the artifact manifest and live grants. */
|
|
11
|
+
api: import("./sdk.js").SequenceApi;
|
|
12
|
+
user: import("./sdk.js").SequenceUser;
|
|
13
|
+
env: import("./sdk.js").SequenceEnvironment;
|
|
14
|
+
auth: import("./sdk.js").SequenceAuth;
|
|
15
|
+
flags: import("./sdk.js").SequenceFlags;
|
|
16
|
+
host: import("./sdk.js").SequenceHost;
|
|
17
|
+
offline: import("./sdk.js").SequenceOffline;
|
|
18
|
+
functions: {
|
|
19
|
+
invoke: ({ id, params }: {
|
|
20
|
+
id: string;
|
|
21
|
+
params?: Record<string, unknown>;
|
|
22
|
+
}) => Promise<unknown>;
|
|
23
|
+
get: ({ id }: {
|
|
24
|
+
id: string;
|
|
25
|
+
}) => Promise<unknown>;
|
|
26
|
+
};
|
|
27
|
+
lattice: {
|
|
28
|
+
context: () => import("./sdk.js").SequenceLatticeContext;
|
|
29
|
+
runs: {
|
|
30
|
+
list: (query?: {
|
|
31
|
+
process_id?: string;
|
|
32
|
+
status?: string;
|
|
33
|
+
entity_type?: string;
|
|
34
|
+
entity_id?: string;
|
|
35
|
+
limit?: number;
|
|
36
|
+
archived?: boolean;
|
|
37
|
+
}) => Promise<unknown>;
|
|
38
|
+
get: ({ runId }: {
|
|
39
|
+
runId: string;
|
|
40
|
+
}) => Promise<unknown>;
|
|
41
|
+
start: (input: import("@sequenceholdings/platform/browser").PlatformRunStart) => Promise<{
|
|
42
|
+
run_id: string;
|
|
43
|
+
process_id: string;
|
|
44
|
+
process_version: string;
|
|
45
|
+
bundle_hash: string;
|
|
46
|
+
status: "pending" | "existing";
|
|
47
|
+
idempotent_replay: boolean;
|
|
48
|
+
outcome: "existing" | "created" | "replayed" | "unclaimed" | "queued";
|
|
49
|
+
}>;
|
|
50
|
+
advance: ({ runId, ...body }: import("@sequenceholdings/platform/browser").PlatformRunAdvance) => Promise<unknown>;
|
|
51
|
+
};
|
|
52
|
+
steps: {
|
|
53
|
+
get: ({ runId, stepId }: {
|
|
54
|
+
runId: string;
|
|
55
|
+
stepId: string;
|
|
56
|
+
}) => Promise<unknown>;
|
|
57
|
+
getContext: ({ runId, stepId }: {
|
|
58
|
+
runId: string;
|
|
59
|
+
stepId: string;
|
|
60
|
+
}) => Promise<unknown>;
|
|
61
|
+
assign: ({ runId, stepId, assignment }: {
|
|
62
|
+
runId: string;
|
|
63
|
+
stepId: string;
|
|
64
|
+
assignment: {
|
|
65
|
+
users?: string[];
|
|
66
|
+
groups?: string[];
|
|
67
|
+
};
|
|
68
|
+
}) => Promise<unknown>;
|
|
69
|
+
};
|
|
70
|
+
principals: {
|
|
71
|
+
search: (query?: {
|
|
72
|
+
q?: string;
|
|
73
|
+
limit?: number;
|
|
74
|
+
types?: string;
|
|
75
|
+
requireAppAccess?: string;
|
|
76
|
+
}) => Promise<unknown>;
|
|
77
|
+
};
|
|
78
|
+
processes: {
|
|
79
|
+
listRuns: ({ process, ...query }: {
|
|
80
|
+
process: string;
|
|
81
|
+
limit?: number;
|
|
82
|
+
offset?: number;
|
|
83
|
+
status?: string;
|
|
84
|
+
entity_type?: string;
|
|
85
|
+
entity_id?: string;
|
|
86
|
+
}) => Promise<unknown>;
|
|
87
|
+
getCompletion: ({ process, cycle }: {
|
|
88
|
+
process: string;
|
|
89
|
+
cycle: string;
|
|
90
|
+
}) => Promise<unknown>;
|
|
91
|
+
listSchedules: ({ process }: {
|
|
92
|
+
process: string;
|
|
93
|
+
}) => Promise<unknown>;
|
|
94
|
+
createSchedule: ({ process, schedule }: {
|
|
95
|
+
process: string;
|
|
96
|
+
schedule: Record<string, unknown>;
|
|
97
|
+
}) => Promise<unknown>;
|
|
98
|
+
};
|
|
99
|
+
legacyV2: {
|
|
100
|
+
listRuns: (query?: import("@sequenceholdings/platform/browser").PlatformQuery) => Promise<unknown>;
|
|
101
|
+
getRun: ({ runId }: {
|
|
102
|
+
runId: string;
|
|
103
|
+
}) => Promise<unknown>;
|
|
104
|
+
startRun: (input: import("@sequenceholdings/platform/browser").PlatformRunStart) => Promise<unknown>;
|
|
105
|
+
advanceRun: ({ runId, ...body }: import("@sequenceholdings/platform/browser").PlatformRunAdvance) => Promise<unknown>;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
storage: {
|
|
109
|
+
preview: ((input: {
|
|
110
|
+
workspaceId: string;
|
|
111
|
+
fileId: string;
|
|
112
|
+
versionId: string;
|
|
113
|
+
filename: string;
|
|
114
|
+
mime: string;
|
|
115
|
+
}) => Promise<{
|
|
116
|
+
opened: true;
|
|
117
|
+
}>) | undefined;
|
|
118
|
+
workspace(id: string): {
|
|
119
|
+
uploads: {
|
|
120
|
+
put: (input: import("@sequenceholdings/storage").StartStorageUpload, file: Blob, options?: import("./sdk.js").SequenceStorageOptions) => Promise<{
|
|
121
|
+
id: string;
|
|
122
|
+
fileId: string;
|
|
123
|
+
uploadUrl: string | null;
|
|
124
|
+
expiresAt: string;
|
|
125
|
+
state: "aborted" | "complete" | "pending";
|
|
126
|
+
versionId: string | null;
|
|
127
|
+
maxBytes: number;
|
|
128
|
+
}>;
|
|
129
|
+
resume: (uploadId: string, file: Blob, options?: import("./sdk.js").SequenceStorageOptions) => Promise<{
|
|
130
|
+
id: string;
|
|
131
|
+
fileId: string;
|
|
132
|
+
uploadUrl: string | null;
|
|
133
|
+
expiresAt: string;
|
|
134
|
+
state: "aborted" | "complete" | "pending";
|
|
135
|
+
versionId: string | null;
|
|
136
|
+
maxBytes: number;
|
|
137
|
+
}>;
|
|
138
|
+
start: (input: import("@sequenceholdings/storage").StartStorageUpload) => Promise<{
|
|
139
|
+
id: string;
|
|
140
|
+
fileId: string;
|
|
141
|
+
uploadUrl: string | null;
|
|
142
|
+
expiresAt: string;
|
|
143
|
+
state: "aborted" | "pending" | "complete";
|
|
144
|
+
versionId: string | null;
|
|
145
|
+
maxBytes: number;
|
|
146
|
+
}>;
|
|
147
|
+
get: (id: string) => Promise<{
|
|
148
|
+
id: string;
|
|
149
|
+
fileId: string;
|
|
150
|
+
uploadUrl: string | null;
|
|
151
|
+
expiresAt: string;
|
|
152
|
+
state: "aborted" | "pending" | "complete";
|
|
153
|
+
versionId: string | null;
|
|
154
|
+
maxBytes: number;
|
|
155
|
+
}>;
|
|
156
|
+
complete: (id: string, input?: import("@sequenceholdings/storage").CompleteStorageUpload) => Promise<{
|
|
157
|
+
id: string;
|
|
158
|
+
fileId: string;
|
|
159
|
+
uploadUrl: string | null;
|
|
160
|
+
expiresAt: string;
|
|
161
|
+
state: "aborted" | "pending" | "complete";
|
|
162
|
+
versionId: string | null;
|
|
163
|
+
maxBytes: number;
|
|
164
|
+
}>;
|
|
165
|
+
abort: (id: string) => Promise<{
|
|
166
|
+
id: string;
|
|
167
|
+
fileId: string;
|
|
168
|
+
uploadUrl: string | null;
|
|
169
|
+
expiresAt: string;
|
|
170
|
+
state: "aborted" | "pending" | "complete";
|
|
171
|
+
versionId: string | null;
|
|
172
|
+
maxBytes: number;
|
|
173
|
+
}>;
|
|
174
|
+
startBatch: (items: import("@sequenceholdings/storage").StartStorageUpload[]) => Promise<{
|
|
175
|
+
items: {
|
|
176
|
+
id: string;
|
|
177
|
+
fileId: string;
|
|
178
|
+
uploadUrl: string | null;
|
|
179
|
+
expiresAt: string;
|
|
180
|
+
state: "aborted" | "pending" | "complete";
|
|
181
|
+
versionId: string | null;
|
|
182
|
+
maxBytes: number;
|
|
183
|
+
}[];
|
|
184
|
+
}>;
|
|
185
|
+
list: () => Promise<{
|
|
186
|
+
items: {
|
|
187
|
+
id: string;
|
|
188
|
+
fileId: string;
|
|
189
|
+
name: string;
|
|
190
|
+
state: "aborted" | "pending" | "complete";
|
|
191
|
+
expiresAt: string;
|
|
192
|
+
maxBytes: number;
|
|
193
|
+
expectedSize: number | null;
|
|
194
|
+
versionId: string | null;
|
|
195
|
+
}[];
|
|
196
|
+
limits: {
|
|
197
|
+
perPrincipal: number;
|
|
198
|
+
perWorkspace: number;
|
|
199
|
+
};
|
|
200
|
+
}>;
|
|
201
|
+
reconcile: (input?: {
|
|
202
|
+
abortIncomplete?: boolean;
|
|
203
|
+
}) => Promise<{
|
|
204
|
+
completed: {
|
|
205
|
+
id: string;
|
|
206
|
+
fileId: string;
|
|
207
|
+
name: string;
|
|
208
|
+
state: "aborted" | "pending" | "complete";
|
|
209
|
+
expiresAt: string;
|
|
210
|
+
maxBytes: number;
|
|
211
|
+
expectedSize: number | null;
|
|
212
|
+
versionId: string | null;
|
|
213
|
+
code: string;
|
|
214
|
+
message: string;
|
|
215
|
+
}[];
|
|
216
|
+
aborted: {
|
|
217
|
+
id: string;
|
|
218
|
+
fileId: string;
|
|
219
|
+
name: string;
|
|
220
|
+
state: "aborted" | "pending" | "complete";
|
|
221
|
+
expiresAt: string;
|
|
222
|
+
maxBytes: number;
|
|
223
|
+
expectedSize: number | null;
|
|
224
|
+
versionId: string | null;
|
|
225
|
+
code: string;
|
|
226
|
+
message: string;
|
|
227
|
+
}[];
|
|
228
|
+
pending: {
|
|
229
|
+
id: string;
|
|
230
|
+
fileId: string;
|
|
231
|
+
name: string;
|
|
232
|
+
state: "aborted" | "pending" | "complete";
|
|
233
|
+
expiresAt: string;
|
|
234
|
+
maxBytes: number;
|
|
235
|
+
expectedSize: number | null;
|
|
236
|
+
versionId: string | null;
|
|
237
|
+
code: string;
|
|
238
|
+
message: string;
|
|
239
|
+
}[];
|
|
240
|
+
}>;
|
|
241
|
+
};
|
|
242
|
+
get: () => Promise<{
|
|
243
|
+
id: string;
|
|
244
|
+
name: string;
|
|
245
|
+
description: string;
|
|
246
|
+
environment: string;
|
|
247
|
+
state: "active" | "trashed" | "purging";
|
|
248
|
+
revision: number;
|
|
249
|
+
createdAt: string;
|
|
250
|
+
role: "viewer" | "editor" | "admin" | "owner";
|
|
251
|
+
quotaBytes: number;
|
|
252
|
+
usedBytes: number;
|
|
253
|
+
reservedBytes: number;
|
|
254
|
+
}>;
|
|
255
|
+
delete: (expectedRevision: number) => Promise<{
|
|
256
|
+
id: string;
|
|
257
|
+
workspaceId: string;
|
|
258
|
+
targetId: string | null;
|
|
259
|
+
kind: "purge" | "delete_version";
|
|
260
|
+
status: "running" | "failed" | "queued" | "succeeded";
|
|
261
|
+
completed: number;
|
|
262
|
+
total: number;
|
|
263
|
+
error: string | null;
|
|
264
|
+
createdAt: string;
|
|
265
|
+
updatedAt: string;
|
|
266
|
+
canRetry: boolean;
|
|
267
|
+
}>;
|
|
268
|
+
list: (options?: import("@sequenceholdings/storage").StorageListOptions & {
|
|
269
|
+
parentId?: string | null;
|
|
270
|
+
trash?: boolean;
|
|
271
|
+
}) => Promise<{
|
|
272
|
+
items: {
|
|
273
|
+
id: string;
|
|
274
|
+
workspaceId: string;
|
|
275
|
+
parentId: string | null;
|
|
276
|
+
name: string;
|
|
277
|
+
kind: "file" | "folder";
|
|
278
|
+
state: "active" | "trashed" | "purging";
|
|
279
|
+
restricted: boolean;
|
|
280
|
+
revision: number;
|
|
281
|
+
currentVersionId: string | null;
|
|
282
|
+
metadata: Record<string, string>;
|
|
283
|
+
createdAt: string;
|
|
284
|
+
updatedAt: string;
|
|
285
|
+
role: "viewer" | "editor" | "admin";
|
|
286
|
+
size: number | null;
|
|
287
|
+
contentType: string | null;
|
|
288
|
+
}[];
|
|
289
|
+
nextCursor: string | null;
|
|
290
|
+
}>;
|
|
291
|
+
getNode: (id: string) => Promise<{
|
|
292
|
+
id: string;
|
|
293
|
+
workspaceId: string;
|
|
294
|
+
parentId: string | null;
|
|
295
|
+
name: string;
|
|
296
|
+
kind: "file" | "folder";
|
|
297
|
+
state: "active" | "trashed" | "purging";
|
|
298
|
+
restricted: boolean;
|
|
299
|
+
revision: number;
|
|
300
|
+
currentVersionId: string | null;
|
|
301
|
+
metadata: Record<string, string>;
|
|
302
|
+
createdAt: string;
|
|
303
|
+
updatedAt: string;
|
|
304
|
+
role: "viewer" | "editor" | "admin";
|
|
305
|
+
size: number | null;
|
|
306
|
+
contentType: string | null;
|
|
307
|
+
}>;
|
|
308
|
+
getNodeWithAncestors: (id: string) => Promise<{
|
|
309
|
+
id: string;
|
|
310
|
+
workspaceId: string;
|
|
311
|
+
parentId: string | null;
|
|
312
|
+
name: string;
|
|
313
|
+
kind: "file" | "folder";
|
|
314
|
+
state: "active" | "trashed" | "purging";
|
|
315
|
+
restricted: boolean;
|
|
316
|
+
revision: number;
|
|
317
|
+
currentVersionId: string | null;
|
|
318
|
+
metadata: Record<string, string>;
|
|
319
|
+
createdAt: string;
|
|
320
|
+
updatedAt: string;
|
|
321
|
+
role: "viewer" | "editor" | "admin";
|
|
322
|
+
size: number | null;
|
|
323
|
+
contentType: string | null;
|
|
324
|
+
ancestors: {
|
|
325
|
+
id: string;
|
|
326
|
+
workspaceId: string;
|
|
327
|
+
parentId: string | null;
|
|
328
|
+
name: string;
|
|
329
|
+
kind: "file" | "folder";
|
|
330
|
+
state: "active" | "trashed" | "purging";
|
|
331
|
+
restricted: boolean;
|
|
332
|
+
revision: number;
|
|
333
|
+
currentVersionId: string | null;
|
|
334
|
+
metadata: Record<string, string>;
|
|
335
|
+
createdAt: string;
|
|
336
|
+
updatedAt: string;
|
|
337
|
+
role: "viewer" | "editor" | "admin";
|
|
338
|
+
size: number | null;
|
|
339
|
+
contentType: string | null;
|
|
340
|
+
}[];
|
|
341
|
+
}>;
|
|
342
|
+
createFolder: (name: string, parentId?: string | null, { idempotencyKey, }?: {
|
|
343
|
+
idempotencyKey?: string;
|
|
344
|
+
}) => Promise<{
|
|
345
|
+
id: string;
|
|
346
|
+
workspaceId: string;
|
|
347
|
+
parentId: string | null;
|
|
348
|
+
name: string;
|
|
349
|
+
kind: "file" | "folder";
|
|
350
|
+
state: "active" | "trashed" | "purging";
|
|
351
|
+
restricted: boolean;
|
|
352
|
+
revision: number;
|
|
353
|
+
currentVersionId: string | null;
|
|
354
|
+
metadata: Record<string, string>;
|
|
355
|
+
createdAt: string;
|
|
356
|
+
updatedAt: string;
|
|
357
|
+
role: "viewer" | "editor" | "admin";
|
|
358
|
+
size: number | null;
|
|
359
|
+
contentType: string | null;
|
|
360
|
+
}>;
|
|
361
|
+
update: (id: string, input: import("zod").input<typeof import("@sequenceholdings/storage").updateNodeSchema>) => Promise<{
|
|
362
|
+
id: string;
|
|
363
|
+
workspaceId: string;
|
|
364
|
+
parentId: string | null;
|
|
365
|
+
name: string;
|
|
366
|
+
kind: "file" | "folder";
|
|
367
|
+
state: "active" | "trashed" | "purging";
|
|
368
|
+
restricted: boolean;
|
|
369
|
+
revision: number;
|
|
370
|
+
currentVersionId: string | null;
|
|
371
|
+
metadata: Record<string, string>;
|
|
372
|
+
createdAt: string;
|
|
373
|
+
updatedAt: string;
|
|
374
|
+
role: "viewer" | "editor" | "admin";
|
|
375
|
+
size: number | null;
|
|
376
|
+
contentType: string | null;
|
|
377
|
+
}>;
|
|
378
|
+
trash: (id: string, expectedRevision: number) => Promise<{
|
|
379
|
+
id: string;
|
|
380
|
+
workspaceId: string;
|
|
381
|
+
parentId: string | null;
|
|
382
|
+
name: string;
|
|
383
|
+
kind: "file" | "folder";
|
|
384
|
+
state: "active" | "trashed" | "purging";
|
|
385
|
+
restricted: boolean;
|
|
386
|
+
revision: number;
|
|
387
|
+
currentVersionId: string | null;
|
|
388
|
+
metadata: Record<string, string>;
|
|
389
|
+
createdAt: string;
|
|
390
|
+
updatedAt: string;
|
|
391
|
+
role: "viewer" | "editor" | "admin";
|
|
392
|
+
size: number | null;
|
|
393
|
+
contentType: string | null;
|
|
394
|
+
}>;
|
|
395
|
+
restore: (id: string, expectedRevision: number) => Promise<{
|
|
396
|
+
id: string;
|
|
397
|
+
workspaceId: string;
|
|
398
|
+
parentId: string | null;
|
|
399
|
+
name: string;
|
|
400
|
+
kind: "file" | "folder";
|
|
401
|
+
state: "active" | "trashed" | "purging";
|
|
402
|
+
restricted: boolean;
|
|
403
|
+
revision: number;
|
|
404
|
+
currentVersionId: string | null;
|
|
405
|
+
metadata: Record<string, string>;
|
|
406
|
+
createdAt: string;
|
|
407
|
+
updatedAt: string;
|
|
408
|
+
role: "viewer" | "editor" | "admin";
|
|
409
|
+
size: number | null;
|
|
410
|
+
contentType: string | null;
|
|
411
|
+
}>;
|
|
412
|
+
purge: (id: string, expectedRevision: number) => Promise<{
|
|
413
|
+
id: string;
|
|
414
|
+
workspaceId: string;
|
|
415
|
+
targetId: string | null;
|
|
416
|
+
kind: "purge" | "delete_version";
|
|
417
|
+
status: "running" | "failed" | "queued" | "succeeded";
|
|
418
|
+
completed: number;
|
|
419
|
+
total: number;
|
|
420
|
+
error: string | null;
|
|
421
|
+
createdAt: string;
|
|
422
|
+
updatedAt: string;
|
|
423
|
+
canRetry: boolean;
|
|
424
|
+
}>;
|
|
425
|
+
download: (id: string, options?: {
|
|
426
|
+
versionId?: string;
|
|
427
|
+
preview?: boolean;
|
|
428
|
+
}) => Promise<{
|
|
429
|
+
url: string;
|
|
430
|
+
expiresAt: string;
|
|
431
|
+
preview: boolean;
|
|
432
|
+
}>;
|
|
433
|
+
versions: (id: string, options?: {
|
|
434
|
+
before?: number;
|
|
435
|
+
limit?: number;
|
|
436
|
+
}) => Promise<{
|
|
437
|
+
items: {
|
|
438
|
+
id: string;
|
|
439
|
+
fileId: string;
|
|
440
|
+
revision: number;
|
|
441
|
+
size: number;
|
|
442
|
+
checksum: string;
|
|
443
|
+
contentType: string;
|
|
444
|
+
createdAt: string;
|
|
445
|
+
createdBy: string;
|
|
446
|
+
state: "active" | "purging";
|
|
447
|
+
}[];
|
|
448
|
+
nextRevision: number | null;
|
|
449
|
+
}>;
|
|
450
|
+
restoreVersion: (id: string, versionId: string, expectedRevision: number) => Promise<{
|
|
451
|
+
id: string;
|
|
452
|
+
fileId: string;
|
|
453
|
+
revision: number;
|
|
454
|
+
size: number;
|
|
455
|
+
checksum: string;
|
|
456
|
+
contentType: string;
|
|
457
|
+
createdAt: string;
|
|
458
|
+
createdBy: string;
|
|
459
|
+
state: "active" | "purging";
|
|
460
|
+
}>;
|
|
461
|
+
deleteVersion: (id: string, versionId: string, expectedRevision: number) => Promise<{
|
|
462
|
+
id: string;
|
|
463
|
+
workspaceId: string;
|
|
464
|
+
targetId: string | null;
|
|
465
|
+
kind: "purge" | "delete_version";
|
|
466
|
+
status: "running" | "failed" | "queued" | "succeeded";
|
|
467
|
+
completed: number;
|
|
468
|
+
total: number;
|
|
469
|
+
error: string | null;
|
|
470
|
+
createdAt: string;
|
|
471
|
+
updatedAt: string;
|
|
472
|
+
canRetry: boolean;
|
|
473
|
+
}>;
|
|
474
|
+
access: (id?: string) => Promise<{
|
|
475
|
+
revision: number;
|
|
476
|
+
restricted: boolean;
|
|
477
|
+
grants: {
|
|
478
|
+
type: "user" | "service_account" | "group" | "organization";
|
|
479
|
+
id: string;
|
|
480
|
+
role: "viewer" | "editor" | "admin";
|
|
481
|
+
}[];
|
|
482
|
+
owner: string | null;
|
|
483
|
+
inherited: boolean;
|
|
484
|
+
workspaceAdminOverride: true;
|
|
485
|
+
displayNames: Record<string, string>;
|
|
486
|
+
}>;
|
|
487
|
+
setAccess: (input: import("zod").input<typeof import("@sequenceholdings/storage").updateStorageAccessSchema>, id?: string) => Promise<{
|
|
488
|
+
revision: number;
|
|
489
|
+
restricted: boolean;
|
|
490
|
+
grants: {
|
|
491
|
+
type: "user" | "service_account" | "group" | "organization";
|
|
492
|
+
id: string;
|
|
493
|
+
role: "viewer" | "editor" | "admin";
|
|
494
|
+
}[];
|
|
495
|
+
owner: string | null;
|
|
496
|
+
inherited: boolean;
|
|
497
|
+
workspaceAdminOverride: true;
|
|
498
|
+
displayNames: Record<string, string>;
|
|
499
|
+
}>;
|
|
500
|
+
transferOwner: (principal: {
|
|
501
|
+
type: "user" | "service_account";
|
|
502
|
+
id: string;
|
|
503
|
+
}, expectedRevision: number) => Promise<{
|
|
504
|
+
revision: number;
|
|
505
|
+
restricted: boolean;
|
|
506
|
+
grants: {
|
|
507
|
+
type: "user" | "service_account" | "group" | "organization";
|
|
508
|
+
id: string;
|
|
509
|
+
role: "viewer" | "editor" | "admin";
|
|
510
|
+
}[];
|
|
511
|
+
owner: string | null;
|
|
512
|
+
inherited: boolean;
|
|
513
|
+
workspaceAdminOverride: true;
|
|
514
|
+
displayNames: Record<string, string>;
|
|
515
|
+
}>;
|
|
516
|
+
operations: (options?: {
|
|
517
|
+
before?: string;
|
|
518
|
+
limit?: number;
|
|
519
|
+
scope?: import("@sequenceholdings/storage").StorageOperationScope;
|
|
520
|
+
}) => Promise<{
|
|
521
|
+
items: {
|
|
522
|
+
id: string;
|
|
523
|
+
workspaceId: string;
|
|
524
|
+
targetId: string | null;
|
|
525
|
+
kind: "purge" | "delete_version";
|
|
526
|
+
status: "running" | "failed" | "queued" | "succeeded";
|
|
527
|
+
completed: number;
|
|
528
|
+
total: number;
|
|
529
|
+
error: string | null;
|
|
530
|
+
createdAt: string;
|
|
531
|
+
updatedAt: string;
|
|
532
|
+
canRetry: boolean;
|
|
533
|
+
}[];
|
|
534
|
+
nextCursor: string | null;
|
|
535
|
+
}>;
|
|
536
|
+
retryOperation: (id: string) => Promise<{
|
|
537
|
+
id: string;
|
|
538
|
+
workspaceId: string;
|
|
539
|
+
targetId: string | null;
|
|
540
|
+
kind: "purge" | "delete_version";
|
|
541
|
+
status: "running" | "failed" | "queued" | "succeeded";
|
|
542
|
+
completed: number;
|
|
543
|
+
total: number;
|
|
544
|
+
error: string | null;
|
|
545
|
+
createdAt: string;
|
|
546
|
+
updatedAt: string;
|
|
547
|
+
canRetry: boolean;
|
|
548
|
+
}>;
|
|
549
|
+
};
|
|
550
|
+
capabilities: () => Promise<{
|
|
551
|
+
canProvision: boolean;
|
|
552
|
+
uploadMethods: string[];
|
|
553
|
+
pendingUploads: {
|
|
554
|
+
perPrincipal: number;
|
|
555
|
+
perWorkspace: number;
|
|
556
|
+
};
|
|
557
|
+
uploadBatchLimit: number;
|
|
558
|
+
importConcurrency: {
|
|
559
|
+
default: number;
|
|
560
|
+
max: number;
|
|
561
|
+
};
|
|
562
|
+
}>;
|
|
563
|
+
list: (options?: import("@sequenceholdings/storage").StorageListOptions) => Promise<{
|
|
564
|
+
items: {
|
|
565
|
+
id: string;
|
|
566
|
+
name: string;
|
|
567
|
+
description: string;
|
|
568
|
+
environment: string;
|
|
569
|
+
state: "active" | "trashed" | "purging";
|
|
570
|
+
revision: number;
|
|
571
|
+
createdAt: string;
|
|
572
|
+
role: "viewer" | "editor" | "admin" | "owner";
|
|
573
|
+
quotaBytes: number;
|
|
574
|
+
usedBytes: number;
|
|
575
|
+
reservedBytes: number;
|
|
576
|
+
}[];
|
|
577
|
+
nextCursor: string | null;
|
|
578
|
+
}>;
|
|
579
|
+
shared: (options?: import("@sequenceholdings/storage").StorageListOptions & {
|
|
580
|
+
trash?: boolean;
|
|
581
|
+
}) => Promise<{
|
|
582
|
+
items: {
|
|
583
|
+
id: string;
|
|
584
|
+
workspaceId: string;
|
|
585
|
+
parentId: string | null;
|
|
586
|
+
name: string;
|
|
587
|
+
kind: "file" | "folder";
|
|
588
|
+
state: "active" | "trashed" | "purging";
|
|
589
|
+
restricted: boolean;
|
|
590
|
+
revision: number;
|
|
591
|
+
currentVersionId: string | null;
|
|
592
|
+
metadata: Record<string, string>;
|
|
593
|
+
createdAt: string;
|
|
594
|
+
updatedAt: string;
|
|
595
|
+
role: "viewer" | "editor" | "admin";
|
|
596
|
+
size: number | null;
|
|
597
|
+
contentType: string | null;
|
|
598
|
+
}[];
|
|
599
|
+
nextCursor: string | null;
|
|
600
|
+
}>;
|
|
601
|
+
apply: (manifest: import("@sequenceholdings/storage").WorkspaceManifest) => Promise<{
|
|
602
|
+
id: string;
|
|
603
|
+
name: string;
|
|
604
|
+
description: string;
|
|
605
|
+
environment: string;
|
|
606
|
+
state: "active" | "trashed" | "purging";
|
|
607
|
+
revision: number;
|
|
608
|
+
createdAt: string;
|
|
609
|
+
role: "viewer" | "editor" | "admin" | "owner";
|
|
610
|
+
quotaBytes: number;
|
|
611
|
+
usedBytes: number;
|
|
612
|
+
reservedBytes: number;
|
|
613
|
+
}>;
|
|
614
|
+
};
|
|
615
|
+
agents: {
|
|
616
|
+
chat: (options: {
|
|
617
|
+
body: unknown;
|
|
618
|
+
headers?: Record<string, string>;
|
|
619
|
+
}) => Promise<Response>;
|
|
620
|
+
files: {
|
|
621
|
+
download: (input: {
|
|
622
|
+
fileId: string;
|
|
623
|
+
}) => Promise<Response>;
|
|
624
|
+
create: ({ file, agentId }: {
|
|
625
|
+
file: File;
|
|
626
|
+
agentId?: string;
|
|
627
|
+
}) => Promise<unknown>;
|
|
628
|
+
getUrl: ({ fileId, workflowId, shareId }: {
|
|
629
|
+
fileId: string;
|
|
630
|
+
workflowId?: string;
|
|
631
|
+
shareId?: string;
|
|
632
|
+
}) => Promise<unknown>;
|
|
633
|
+
delete: ({ fileId, agentId }: {
|
|
634
|
+
fileId: string;
|
|
635
|
+
agentId?: string;
|
|
636
|
+
}) => Promise<unknown>;
|
|
637
|
+
contentPath: ({ fileId, agentId, workflowId }: {
|
|
638
|
+
fileId: string;
|
|
639
|
+
agentId?: string;
|
|
640
|
+
workflowId?: string;
|
|
641
|
+
}) => string;
|
|
642
|
+
};
|
|
643
|
+
list: (query?: {
|
|
644
|
+
view?: "list";
|
|
645
|
+
limit?: number;
|
|
646
|
+
offset?: number;
|
|
647
|
+
}) => Promise<unknown>;
|
|
648
|
+
get: ({ agentId }: {
|
|
649
|
+
agentId: string;
|
|
650
|
+
}) => Promise<unknown>;
|
|
651
|
+
tools: {
|
|
652
|
+
execute: ({ server, tool, input }: {
|
|
653
|
+
server: string;
|
|
654
|
+
tool: string;
|
|
655
|
+
input: Record<string, unknown>;
|
|
656
|
+
}) => Promise<unknown>;
|
|
657
|
+
};
|
|
658
|
+
threads: {
|
|
659
|
+
create: (input: import("@sequenceholdings/platform/browser").PlatformAgentThreadInput) => Promise<unknown>;
|
|
660
|
+
get: ({ threadId }: {
|
|
661
|
+
threadId: string;
|
|
662
|
+
}) => Promise<unknown>;
|
|
663
|
+
};
|
|
664
|
+
jobs: {
|
|
665
|
+
create: (input: import("@sequenceholdings/platform/browser").PlatformAgentJobInput) => Promise<unknown>;
|
|
666
|
+
get: ({ jobId }: {
|
|
667
|
+
jobId: string;
|
|
668
|
+
}) => Promise<unknown>;
|
|
669
|
+
cancel: ({ jobId }: {
|
|
670
|
+
jobId: string;
|
|
671
|
+
}) => Promise<unknown>;
|
|
672
|
+
};
|
|
673
|
+
workflows: {
|
|
674
|
+
get: ({ workflowId }: {
|
|
675
|
+
workflowId: string;
|
|
676
|
+
}) => Promise<unknown>;
|
|
677
|
+
start: ({ workflowId, input, metadata, expectedIdentity, idempotencyKey }: import("@sequenceholdings/platform/browser").PlatformWorkflowRunInput) => Promise<unknown>;
|
|
678
|
+
createRun: ({ workflowId, input, metadata, expectedIdentity, idempotencyKey }: import("@sequenceholdings/platform/browser").PlatformWorkflowRunInput) => Promise<unknown>;
|
|
679
|
+
getRun: ({ runId }: {
|
|
680
|
+
runId: string;
|
|
681
|
+
}) => Promise<unknown>;
|
|
682
|
+
cancelRun: ({ runId }: {
|
|
683
|
+
runId: string;
|
|
684
|
+
}) => Promise<unknown>;
|
|
685
|
+
};
|
|
686
|
+
};
|
|
687
|
+
files: {
|
|
688
|
+
upload: ({ file, fields, options }: {
|
|
689
|
+
file: File | readonly File[];
|
|
690
|
+
fields?: Record<string, string>;
|
|
691
|
+
options?: SequenceApiUploadOptions;
|
|
692
|
+
}) => Promise<import("./sdk.js").SequenceApiFetchResponse<unknown>>;
|
|
693
|
+
download: (input: {
|
|
694
|
+
fileId: string;
|
|
695
|
+
download?: boolean;
|
|
696
|
+
}) => Promise<import("./sdk.js").SequenceApiFetchResponse<unknown>>;
|
|
697
|
+
speech: {
|
|
698
|
+
transcribe: ({ file, timeoutMs }: {
|
|
699
|
+
file: File;
|
|
700
|
+
timeoutMs?: number;
|
|
701
|
+
}) => Promise<import("./sdk.js").SequenceApiFetchResponse<unknown>>;
|
|
702
|
+
getConfiguration: () => Promise<unknown>;
|
|
703
|
+
};
|
|
704
|
+
get: ({ fileId }: {
|
|
705
|
+
fileId: string;
|
|
706
|
+
}) => Promise<unknown>;
|
|
707
|
+
downloadPath: ({ fileId, download }: {
|
|
708
|
+
fileId: string;
|
|
709
|
+
download?: boolean;
|
|
710
|
+
}) => string;
|
|
711
|
+
};
|
|
712
|
+
identity: {
|
|
713
|
+
me: () => Promise<unknown>;
|
|
714
|
+
permissions: () => Promise<unknown>;
|
|
715
|
+
};
|
|
716
|
+
groups: {
|
|
717
|
+
get: ({ groupId }: {
|
|
718
|
+
groupId: string;
|
|
719
|
+
}) => Promise<unknown>;
|
|
720
|
+
};
|
|
721
|
+
directory: {
|
|
722
|
+
list: (query?: {
|
|
723
|
+
limit?: number;
|
|
724
|
+
offset?: number;
|
|
725
|
+
}) => Promise<unknown>;
|
|
726
|
+
};
|
|
727
|
+
permissions: {
|
|
728
|
+
searchPrincipals: (query?: {
|
|
729
|
+
q?: string;
|
|
730
|
+
limit?: number;
|
|
731
|
+
types?: string;
|
|
732
|
+
}) => Promise<unknown>;
|
|
733
|
+
};
|
|
734
|
+
activity: {
|
|
735
|
+
getFormSchema: ({ runId }: {
|
|
736
|
+
runId: string;
|
|
737
|
+
}) => Promise<unknown>;
|
|
738
|
+
advance: ({ runId, ...body }: import("@sequenceholdings/platform/browser").PlatformRunAdvance) => Promise<unknown>;
|
|
739
|
+
claim: ({ runId }: {
|
|
740
|
+
runId: string;
|
|
741
|
+
}) => Promise<unknown>;
|
|
742
|
+
ownership: {
|
|
743
|
+
setPrimary: ({ runId, primarySub }: {
|
|
744
|
+
runId: string;
|
|
745
|
+
primarySub: string;
|
|
746
|
+
}) => Promise<unknown>;
|
|
747
|
+
handToQueue: ({ runId, queueGroupId }: {
|
|
748
|
+
runId: string;
|
|
749
|
+
queueGroupId: string;
|
|
750
|
+
}) => Promise<unknown>;
|
|
751
|
+
addWatchers: ({ runId, ...input }: {
|
|
752
|
+
runId: string;
|
|
753
|
+
} & import("@sequenceholdings/platform/browser").PlatformTicketWatchers) => Promise<unknown>;
|
|
754
|
+
removeWatchers: ({ runId, ...input }: {
|
|
755
|
+
runId: string;
|
|
756
|
+
} & import("@sequenceholdings/platform/browser").PlatformTicketWatchers) => Promise<unknown>;
|
|
757
|
+
};
|
|
758
|
+
comments: {
|
|
759
|
+
list: ({ runId, ...query }: {
|
|
760
|
+
runId: string;
|
|
761
|
+
} & import("@sequenceholdings/platform/browser").PlatformQuery) => Promise<unknown>;
|
|
762
|
+
create: ({ runId, comment }: {
|
|
763
|
+
runId: string;
|
|
764
|
+
comment: import("@sequenceholdings/platform/browser").PlatformActivityComment;
|
|
765
|
+
}) => Promise<unknown>;
|
|
766
|
+
createForStep: ({ runId, stepId, comment }: {
|
|
767
|
+
runId: string;
|
|
768
|
+
stepId: string;
|
|
769
|
+
comment: Pick<import("@sequenceholdings/platform/browser").PlatformActivityComment, "body">;
|
|
770
|
+
}) => Promise<unknown>;
|
|
771
|
+
};
|
|
772
|
+
drafts: {
|
|
773
|
+
save: ({ runId, stepId, values }: {
|
|
774
|
+
runId: string;
|
|
775
|
+
stepId: string;
|
|
776
|
+
values: Record<string, unknown>;
|
|
777
|
+
}) => Promise<unknown>;
|
|
778
|
+
delete: ({ runId, stepId }: {
|
|
779
|
+
runId: string;
|
|
780
|
+
stepId: string;
|
|
781
|
+
}) => Promise<unknown>;
|
|
782
|
+
};
|
|
783
|
+
};
|
|
784
|
+
legacyShowcase: {
|
|
785
|
+
listAgents: () => Promise<unknown>;
|
|
786
|
+
listAgentRuns: ({ agentId }: {
|
|
787
|
+
agentId: string;
|
|
788
|
+
}) => Promise<unknown>;
|
|
789
|
+
getRun: ({ runId }: {
|
|
790
|
+
runId: string;
|
|
791
|
+
}) => Promise<unknown>;
|
|
792
|
+
};
|
|
793
|
+
usage: {
|
|
794
|
+
record: (event: Record<string, unknown>) => Promise<unknown>;
|
|
795
|
+
};
|
|
796
|
+
legacyProcesses: {
|
|
797
|
+
types: {
|
|
798
|
+
list: (query?: {
|
|
799
|
+
publishedOnly?: boolean;
|
|
800
|
+
}) => Promise<unknown>;
|
|
801
|
+
get: ({ typeId }: {
|
|
802
|
+
typeId: string;
|
|
803
|
+
}) => Promise<unknown>;
|
|
804
|
+
ensureSystem: () => Promise<unknown>;
|
|
805
|
+
};
|
|
806
|
+
instances: {
|
|
807
|
+
get: ({ instanceId }: {
|
|
808
|
+
instanceId: string;
|
|
809
|
+
}) => Promise<unknown>;
|
|
810
|
+
create: (input: Record<string, unknown>) => Promise<unknown>;
|
|
811
|
+
getRoles: ({ instanceId }: {
|
|
812
|
+
instanceId: string;
|
|
813
|
+
}) => Promise<unknown>;
|
|
814
|
+
setRoles: ({ instanceId, roles }: {
|
|
815
|
+
instanceId: string;
|
|
816
|
+
roles: Record<string, unknown>;
|
|
817
|
+
}) => Promise<unknown>;
|
|
818
|
+
completeStage: ({ instanceId, stageId, completion }: {
|
|
819
|
+
instanceId: string;
|
|
820
|
+
stageId: string;
|
|
821
|
+
completion: Record<string, unknown>;
|
|
822
|
+
}) => Promise<unknown>;
|
|
823
|
+
};
|
|
824
|
+
stages: {
|
|
825
|
+
assigned: (query?: import("@sequenceholdings/platform/browser").PlatformQuery) => Promise<unknown>;
|
|
826
|
+
};
|
|
827
|
+
principals: {
|
|
828
|
+
search: (query?: import("@sequenceholdings/platform/browser").PlatformQuery) => Promise<unknown>;
|
|
829
|
+
};
|
|
830
|
+
data: {
|
|
831
|
+
query: (input: Record<string, unknown>) => Promise<unknown>;
|
|
832
|
+
};
|
|
833
|
+
};
|
|
834
|
+
health: {
|
|
835
|
+
get: () => Promise<unknown>;
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
export type ArtifactPlatformClient = ReturnType<typeof createArtifactPlatformClient>;
|