@enhance-eng/sdk 0.1.0-dev.sha-3f7dd0acb078 → 0.1.158

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.
@@ -0,0 +1,34 @@
1
+ import { S as captureError } from "./stall-watch.lib-C6VmIsz-.mjs";
2
+ import { t as version } from "./package-VWmCi21a.mjs";
3
+ import { t as createEnhance$1 } from "./capture-client.client-YvUy2nGh.mjs";
4
+ import process from "node:process";
5
+ //#region src/node/environment.config.ts
6
+ const endpoints = {
7
+ local: "http://localhost:3000",
8
+ development: "https://api.enhance3.karunalabs.ai",
9
+ production: "https://api.enhancelabs.ai"
10
+ };
11
+ const captureConnection = (options) => {
12
+ const selected = options.environment ?? process.env["ENHANCE_ENVIRONMENT"];
13
+ if (selected !== void 0 && selected !== "local" && selected !== "development" && selected !== "production") throw captureError("configuration", "ENHANCE_ENVIRONMENT must be local, development, or production.");
14
+ const environment = selected ?? (version.includes("-dev.") ? "development" : "production");
15
+ const apiUrl = options.apiUrl ?? process.env["ENHANCE_API_URL"] ?? endpoints[environment];
16
+ if (selected !== void 0) {
17
+ const url = URL.parse(apiUrl);
18
+ if (!(url !== null && (environment === "local" ? [
19
+ "localhost",
20
+ "127.0.0.1",
21
+ "[::1]"
22
+ ].includes(url.hostname) : url.origin === endpoints[environment]))) throw captureError("configuration", `The API URL does not match the ${environment} environment. Set its matching endpoint or remove the explicit environment to use a custom API.`);
23
+ }
24
+ return {
25
+ apiUrl,
26
+ token: options.token ?? process.env["ENHANCE_TOKEN"] ?? ""
27
+ };
28
+ };
29
+ const createEnhance = (options = {}) => createEnhance$1({
30
+ ...options,
31
+ ...captureConnection(options)
32
+ });
33
+ //#endregion
34
+ export { createEnhance as t };
@@ -0,0 +1,12 @@
1
+ import { r as EnhanceClient, s as CaptureClientOptions$1 } from "./capture-client.client--zU5zvd3.mjs";
2
+ //#region src/node/environment.config.d.ts
3
+ type CaptureEnvironment = 'local' | 'development' | 'production';
4
+ interface CaptureConnectionOptions {
5
+ readonly environment?: CaptureEnvironment;
6
+ readonly apiUrl?: string;
7
+ readonly token?: string;
8
+ }
9
+ interface CaptureClientOptions extends CaptureConnectionOptions, Pick<CaptureClientOptions$1, 'timeoutMs' | 'publicationTimeoutMs'> {}
10
+ declare const createEnhance: (options?: CaptureClientOptions) => EnhanceClient;
11
+ //#endregion
12
+ export { createEnhance as i, CaptureConnectionOptions as n, CaptureEnvironment as r, CaptureClientOptions as t };
@@ -0,0 +1,656 @@
1
+ import { z } from "zod";
2
+ //#region ../contract/src/capture/capture.schema.d.ts
3
+ declare const captureBlobSchema: z.ZodObject<{
4
+ sha256: z.ZodString;
5
+ bytes: z.ZodNumber;
6
+ mediaType: z.ZodString;
7
+ }, z.core.$strict>;
8
+ type CaptureBlob = z.infer<typeof captureBlobSchema>;
9
+ declare const captureVerdictSchema: z.ZodEnum<{
10
+ "awaiting-review": "awaiting-review";
11
+ approved: "approved";
12
+ "changes-requested": "changes-requested";
13
+ }>;
14
+ type CaptureVerdict = z.infer<typeof captureVerdictSchema>;
15
+ declare const captureArtifactSchema: z.ZodObject<{
16
+ format: z.ZodLiteral<"enhance-capture">;
17
+ version: z.ZodLiteral<1>;
18
+ key: z.ZodObject<{
19
+ source: z.ZodString;
20
+ journey: z.ZodString;
21
+ step: z.ZodString;
22
+ variant: z.ZodString;
23
+ }, z.core.$strict>;
24
+ label: z.ZodString;
25
+ journeyLabel: z.ZodString;
26
+ order: z.ZodNumber;
27
+ page: z.ZodOptional<z.ZodString>;
28
+ viewport: z.ZodObject<{
29
+ width: z.ZodNumber;
30
+ height: z.ZodNumber;
31
+ deviceScaleFactor: z.ZodNumber;
32
+ }, z.core.$strict>;
33
+ extent: z.ZodEnum<{
34
+ viewport: "viewport";
35
+ "full-page": "full-page";
36
+ }>;
37
+ source: z.ZodObject<{
38
+ format: z.ZodLiteral<"rrweb-screen">;
39
+ version: z.ZodLiteral<1>;
40
+ blob: z.ZodObject<{
41
+ sha256: z.ZodString;
42
+ bytes: z.ZodNumber;
43
+ mediaType: z.ZodString;
44
+ }, z.core.$strict>;
45
+ }, z.core.$strict>;
46
+ preview: z.ZodObject<{
47
+ blob: z.ZodObject<{
48
+ sha256: z.ZodString;
49
+ bytes: z.ZodNumber;
50
+ mediaType: z.ZodString;
51
+ }, z.core.$strict>;
52
+ width: z.ZodNumber;
53
+ height: z.ZodNumber;
54
+ pixelRatio: z.ZodNumber;
55
+ }, z.core.$strict>;
56
+ assets: z.ZodArray<z.ZodObject<{
57
+ url: z.ZodURL;
58
+ blob: z.ZodObject<{
59
+ sha256: z.ZodString;
60
+ bytes: z.ZodNumber;
61
+ mediaType: z.ZodString;
62
+ }, z.core.$strict>;
63
+ }, z.core.$strict>>;
64
+ provenance: z.ZodObject<{
65
+ adapter: z.ZodString;
66
+ sdkVersion: z.ZodString;
67
+ kernelVersion: z.ZodString;
68
+ browser: z.ZodString;
69
+ capturedAt: z.ZodISODateTime;
70
+ sourceUrl: z.ZodOptional<z.ZodURL>;
71
+ commit: z.ZodOptional<z.ZodString>;
72
+ }, z.core.$strict>;
73
+ issues: z.ZodArray<z.ZodObject<{
74
+ code: z.ZodString;
75
+ message: z.ZodString;
76
+ }, z.core.$strict>>;
77
+ }, z.core.$strict>;
78
+ type CaptureArtifact = z.infer<typeof captureArtifactSchema>;
79
+ declare const captureRunDescriptorSchema: z.ZodObject<{
80
+ id: z.ZodUUID;
81
+ canvasId: z.ZodUUID;
82
+ source: z.ZodString;
83
+ runKey: z.ZodString;
84
+ generation: z.ZodNumber;
85
+ participants: z.ZodArray<z.ZodString>;
86
+ expiresAt: z.ZodISODateTime;
87
+ formatVersion: z.ZodLiteral<1>;
88
+ review: z.ZodOptional<z.ZodObject<{
89
+ destination: z.ZodObject<{
90
+ organisationId: z.ZodOptional<z.ZodUUID>;
91
+ }, z.core.$strict>;
92
+ context: z.ZodOptional<z.ZodObject<{
93
+ key: z.ZodString;
94
+ label: z.ZodString;
95
+ url: z.ZodOptional<z.ZodURL>;
96
+ sequence: z.ZodNumber;
97
+ attempt: z.ZodDefault<z.ZodNumber>;
98
+ }, z.core.$strict>>;
99
+ revision: z.ZodOptional<z.ZodString>;
100
+ baselineRunId: z.ZodNullable<z.ZodUUID>;
101
+ compareTo: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
102
+ runId: z.ZodUUID;
103
+ }, z.core.$strict>, z.ZodObject<{
104
+ reference: z.ZodString;
105
+ revision: z.ZodOptional<z.ZodString>;
106
+ }, z.core.$strict>]>>;
107
+ }, z.core.$strict>>;
108
+ }, z.core.$strict>;
109
+ type CaptureRunDescriptor = z.infer<typeof captureRunDescriptorSchema>;
110
+ /** A capture the SDK or the selection left out; `message` is one of `CAPTURE_LEFT_OUT_REASONS`. */
111
+ declare const captureLeftOutSchema: z.ZodObject<{
112
+ key: z.ZodOptional<z.ZodObject<{
113
+ source: z.ZodString;
114
+ journey: z.ZodString;
115
+ step: z.ZodString;
116
+ variant: z.ZodString;
117
+ }, z.core.$strict>>;
118
+ testId: z.ZodOptional<z.ZodString>;
119
+ message: z.ZodString;
120
+ }, z.core.$strict>;
121
+ type CaptureLeftOut = z.infer<typeof captureLeftOutSchema>;
122
+ declare const captureManifestSchema: z.ZodObject<{
123
+ format: z.ZodLiteral<"enhance-capture-run">;
124
+ version: z.ZodLiteral<1>;
125
+ run: z.ZodObject<{
126
+ id: z.ZodUUID;
127
+ canvasId: z.ZodUUID;
128
+ source: z.ZodString;
129
+ runKey: z.ZodString;
130
+ generation: z.ZodNumber;
131
+ participants: z.ZodArray<z.ZodString>;
132
+ expiresAt: z.ZodISODateTime;
133
+ formatVersion: z.ZodLiteral<1>;
134
+ review: z.ZodOptional<z.ZodObject<{
135
+ destination: z.ZodObject<{
136
+ organisationId: z.ZodOptional<z.ZodUUID>;
137
+ }, z.core.$strict>;
138
+ context: z.ZodOptional<z.ZodObject<{
139
+ key: z.ZodString;
140
+ label: z.ZodString;
141
+ url: z.ZodOptional<z.ZodURL>;
142
+ sequence: z.ZodNumber;
143
+ attempt: z.ZodDefault<z.ZodNumber>;
144
+ }, z.core.$strict>>;
145
+ revision: z.ZodOptional<z.ZodString>;
146
+ baselineRunId: z.ZodNullable<z.ZodUUID>;
147
+ compareTo: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
148
+ runId: z.ZodUUID;
149
+ }, z.core.$strict>, z.ZodObject<{
150
+ reference: z.ZodString;
151
+ revision: z.ZodOptional<z.ZodString>;
152
+ }, z.core.$strict>]>>;
153
+ }, z.core.$strict>>;
154
+ }, z.core.$strict>;
155
+ participants: z.ZodArray<z.ZodObject<{
156
+ id: z.ZodString;
157
+ status: z.ZodEnum<{
158
+ passed: "passed";
159
+ failed: "failed";
160
+ interrupted: "interrupted";
161
+ }>;
162
+ }, z.core.$strict>>;
163
+ attempts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
164
+ participant: z.ZodString;
165
+ retry: z.ZodNumber;
166
+ status: z.ZodEnum<{
167
+ passed: "passed";
168
+ failed: "failed";
169
+ skipped: "skipped";
170
+ interrupted: "interrupted";
171
+ timedOut: "timedOut";
172
+ }>;
173
+ title: z.ZodOptional<z.ZodString>;
174
+ location: z.ZodOptional<z.ZodObject<{
175
+ file: z.ZodString;
176
+ line: z.ZodNumber;
177
+ }, z.core.$strict>>;
178
+ captures: z.ZodArray<z.ZodObject<{
179
+ format: z.ZodLiteral<"enhance-capture">;
180
+ version: z.ZodLiteral<1>;
181
+ key: z.ZodObject<{
182
+ source: z.ZodString;
183
+ journey: z.ZodString;
184
+ step: z.ZodString;
185
+ variant: z.ZodString;
186
+ }, z.core.$strict>;
187
+ label: z.ZodString;
188
+ journeyLabel: z.ZodString;
189
+ order: z.ZodNumber;
190
+ page: z.ZodOptional<z.ZodString>;
191
+ viewport: z.ZodObject<{
192
+ width: z.ZodNumber;
193
+ height: z.ZodNumber;
194
+ deviceScaleFactor: z.ZodNumber;
195
+ }, z.core.$strict>;
196
+ extent: z.ZodEnum<{
197
+ viewport: "viewport";
198
+ "full-page": "full-page";
199
+ }>;
200
+ source: z.ZodObject<{
201
+ format: z.ZodLiteral<"rrweb-screen">;
202
+ version: z.ZodLiteral<1>;
203
+ blob: z.ZodObject<{
204
+ sha256: z.ZodString;
205
+ bytes: z.ZodNumber;
206
+ mediaType: z.ZodString;
207
+ }, z.core.$strict>;
208
+ }, z.core.$strict>;
209
+ preview: z.ZodObject<{
210
+ blob: z.ZodObject<{
211
+ sha256: z.ZodString;
212
+ bytes: z.ZodNumber;
213
+ mediaType: z.ZodString;
214
+ }, z.core.$strict>;
215
+ width: z.ZodNumber;
216
+ height: z.ZodNumber;
217
+ pixelRatio: z.ZodNumber;
218
+ }, z.core.$strict>;
219
+ assets: z.ZodArray<z.ZodObject<{
220
+ url: z.ZodURL;
221
+ blob: z.ZodObject<{
222
+ sha256: z.ZodString;
223
+ bytes: z.ZodNumber;
224
+ mediaType: z.ZodString;
225
+ }, z.core.$strict>;
226
+ }, z.core.$strict>>;
227
+ provenance: z.ZodObject<{
228
+ adapter: z.ZodString;
229
+ sdkVersion: z.ZodString;
230
+ kernelVersion: z.ZodString;
231
+ browser: z.ZodString;
232
+ capturedAt: z.ZodISODateTime;
233
+ sourceUrl: z.ZodOptional<z.ZodURL>;
234
+ commit: z.ZodOptional<z.ZodString>;
235
+ }, z.core.$strict>;
236
+ issues: z.ZodArray<z.ZodObject<{
237
+ code: z.ZodString;
238
+ message: z.ZodString;
239
+ }, z.core.$strict>>;
240
+ }, z.core.$strict>>;
241
+ runner: z.ZodOptional<z.ZodLiteral<"playwright">>;
242
+ testId: z.ZodString;
243
+ project: z.ZodString;
244
+ }, z.core.$strict>, z.ZodObject<{
245
+ participant: z.ZodString;
246
+ retry: z.ZodNumber;
247
+ status: z.ZodEnum<{
248
+ passed: "passed";
249
+ failed: "failed";
250
+ skipped: "skipped";
251
+ interrupted: "interrupted";
252
+ timedOut: "timedOut";
253
+ }>;
254
+ title: z.ZodOptional<z.ZodString>;
255
+ location: z.ZodOptional<z.ZodObject<{
256
+ file: z.ZodString;
257
+ line: z.ZodNumber;
258
+ }, z.core.$strict>>;
259
+ captures: z.ZodArray<z.ZodObject<{
260
+ format: z.ZodLiteral<"enhance-capture">;
261
+ version: z.ZodLiteral<1>;
262
+ key: z.ZodObject<{
263
+ source: z.ZodString;
264
+ journey: z.ZodString;
265
+ step: z.ZodString;
266
+ variant: z.ZodString;
267
+ }, z.core.$strict>;
268
+ label: z.ZodString;
269
+ journeyLabel: z.ZodString;
270
+ order: z.ZodNumber;
271
+ page: z.ZodOptional<z.ZodString>;
272
+ viewport: z.ZodObject<{
273
+ width: z.ZodNumber;
274
+ height: z.ZodNumber;
275
+ deviceScaleFactor: z.ZodNumber;
276
+ }, z.core.$strict>;
277
+ extent: z.ZodEnum<{
278
+ viewport: "viewport";
279
+ "full-page": "full-page";
280
+ }>;
281
+ source: z.ZodObject<{
282
+ format: z.ZodLiteral<"rrweb-screen">;
283
+ version: z.ZodLiteral<1>;
284
+ blob: z.ZodObject<{
285
+ sha256: z.ZodString;
286
+ bytes: z.ZodNumber;
287
+ mediaType: z.ZodString;
288
+ }, z.core.$strict>;
289
+ }, z.core.$strict>;
290
+ preview: z.ZodObject<{
291
+ blob: z.ZodObject<{
292
+ sha256: z.ZodString;
293
+ bytes: z.ZodNumber;
294
+ mediaType: z.ZodString;
295
+ }, z.core.$strict>;
296
+ width: z.ZodNumber;
297
+ height: z.ZodNumber;
298
+ pixelRatio: z.ZodNumber;
299
+ }, z.core.$strict>;
300
+ assets: z.ZodArray<z.ZodObject<{
301
+ url: z.ZodURL;
302
+ blob: z.ZodObject<{
303
+ sha256: z.ZodString;
304
+ bytes: z.ZodNumber;
305
+ mediaType: z.ZodString;
306
+ }, z.core.$strict>;
307
+ }, z.core.$strict>>;
308
+ provenance: z.ZodObject<{
309
+ adapter: z.ZodString;
310
+ sdkVersion: z.ZodString;
311
+ kernelVersion: z.ZodString;
312
+ browser: z.ZodString;
313
+ capturedAt: z.ZodISODateTime;
314
+ sourceUrl: z.ZodOptional<z.ZodURL>;
315
+ commit: z.ZodOptional<z.ZodString>;
316
+ }, z.core.$strict>;
317
+ issues: z.ZodArray<z.ZodObject<{
318
+ code: z.ZodString;
319
+ message: z.ZodString;
320
+ }, z.core.$strict>>;
321
+ }, z.core.$strict>>;
322
+ runner: z.ZodLiteral<"script">;
323
+ }, z.core.$strict>]>>;
324
+ ordering: z.ZodEnum<{
325
+ partial: "partial";
326
+ complete: "complete";
327
+ }>;
328
+ leftOut: z.ZodOptional<z.ZodArray<z.ZodObject<{
329
+ key: z.ZodOptional<z.ZodObject<{
330
+ source: z.ZodString;
331
+ journey: z.ZodString;
332
+ step: z.ZodString;
333
+ variant: z.ZodString;
334
+ }, z.core.$strict>>;
335
+ testId: z.ZodOptional<z.ZodString>;
336
+ message: z.ZodString;
337
+ }, z.core.$strict>>>;
338
+ }, z.core.$strict>;
339
+ type CaptureManifest = z.infer<typeof captureManifestSchema>;
340
+ declare const captureReceiptSchema: z.ZodObject<{
341
+ runId: z.ZodUUID;
342
+ canvasId: z.ZodUUID;
343
+ canvasUrl: z.ZodURL;
344
+ version: z.ZodNumber;
345
+ manifestDigest: z.ZodString;
346
+ frames: z.ZodArray<z.ZodObject<{
347
+ key: z.ZodObject<{
348
+ source: z.ZodString;
349
+ journey: z.ZodString;
350
+ step: z.ZodString;
351
+ variant: z.ZodString;
352
+ }, z.core.$strict>;
353
+ frameId: z.ZodString;
354
+ captureId: z.ZodUUID;
355
+ }, z.core.$strict>>;
356
+ issues: z.ZodArray<z.ZodObject<{
357
+ code: z.ZodString;
358
+ message: z.ZodString;
359
+ }, z.core.$strict>>;
360
+ }, z.core.$strict>;
361
+ type CaptureReceipt = z.infer<typeof captureReceiptSchema>;
362
+ declare const beginCaptureRunInputSchema: z.ZodObject<{
363
+ canvasId: z.ZodOptional<z.ZodUUID>;
364
+ destination: z.ZodOptional<z.ZodObject<{
365
+ organisationId: z.ZodOptional<z.ZodUUID>;
366
+ }, z.core.$strict>>;
367
+ title: z.ZodOptional<z.ZodString>;
368
+ context: z.ZodOptional<z.ZodObject<{
369
+ key: z.ZodString;
370
+ label: z.ZodString;
371
+ url: z.ZodOptional<z.ZodURL>;
372
+ sequence: z.ZodNumber;
373
+ attempt: z.ZodDefault<z.ZodNumber>;
374
+ }, z.core.$strict>>;
375
+ revision: z.ZodOptional<z.ZodString>;
376
+ compareTo: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
377
+ runId: z.ZodUUID;
378
+ }, z.core.$strict>, z.ZodObject<{
379
+ reference: z.ZodString;
380
+ revision: z.ZodOptional<z.ZodString>;
381
+ }, z.core.$strict>]>>;
382
+ source: z.ZodDefault<z.ZodString>;
383
+ runKey: z.ZodString;
384
+ participants: z.ZodDefault<z.ZodArray<z.ZodString>>;
385
+ formatVersion: z.ZodDefault<z.ZodLiteral<1>>;
386
+ }, z.core.$strict>;
387
+ declare const getCaptureRunOutputSchema: z.ZodObject<{
388
+ run: z.ZodObject<{
389
+ id: z.ZodUUID;
390
+ canvasId: z.ZodUUID;
391
+ source: z.ZodString;
392
+ runKey: z.ZodString;
393
+ generation: z.ZodNumber;
394
+ participants: z.ZodArray<z.ZodString>;
395
+ expiresAt: z.ZodISODateTime;
396
+ formatVersion: z.ZodLiteral<1>;
397
+ review: z.ZodOptional<z.ZodObject<{
398
+ destination: z.ZodObject<{
399
+ organisationId: z.ZodOptional<z.ZodUUID>;
400
+ }, z.core.$strict>;
401
+ context: z.ZodOptional<z.ZodObject<{
402
+ key: z.ZodString;
403
+ label: z.ZodString;
404
+ url: z.ZodOptional<z.ZodURL>;
405
+ sequence: z.ZodNumber;
406
+ attempt: z.ZodDefault<z.ZodNumber>;
407
+ }, z.core.$strict>>;
408
+ revision: z.ZodOptional<z.ZodString>;
409
+ baselineRunId: z.ZodNullable<z.ZodUUID>;
410
+ compareTo: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
411
+ runId: z.ZodUUID;
412
+ }, z.core.$strict>, z.ZodObject<{
413
+ reference: z.ZodString;
414
+ revision: z.ZodOptional<z.ZodString>;
415
+ }, z.core.$strict>]>>;
416
+ }, z.core.$strict>>;
417
+ }, z.core.$strict>;
418
+ state: z.ZodEnum<{
419
+ failed: "failed";
420
+ collecting: "collecting";
421
+ sealed: "sealed";
422
+ converting: "converting";
423
+ committed: "committed";
424
+ cancelled: "cancelled";
425
+ }>;
426
+ receipt: z.ZodNullable<z.ZodObject<{
427
+ runId: z.ZodUUID;
428
+ canvasId: z.ZodUUID;
429
+ canvasUrl: z.ZodURL;
430
+ version: z.ZodNumber;
431
+ manifestDigest: z.ZodString;
432
+ frames: z.ZodArray<z.ZodObject<{
433
+ key: z.ZodObject<{
434
+ source: z.ZodString;
435
+ journey: z.ZodString;
436
+ step: z.ZodString;
437
+ variant: z.ZodString;
438
+ }, z.core.$strict>;
439
+ frameId: z.ZodString;
440
+ captureId: z.ZodUUID;
441
+ }, z.core.$strict>>;
442
+ issues: z.ZodArray<z.ZodObject<{
443
+ code: z.ZodString;
444
+ message: z.ZodString;
445
+ }, z.core.$strict>>;
446
+ }, z.core.$strict>>;
447
+ verdict: z.ZodOptional<z.ZodEnum<{
448
+ "awaiting-review": "awaiting-review";
449
+ approved: "approved";
450
+ "changes-requested": "changes-requested";
451
+ }>>;
452
+ failure: z.ZodNullable<z.ZodObject<{
453
+ code: z.ZodString;
454
+ message: z.ZodString;
455
+ }, z.core.$strict>>;
456
+ }, z.core.$strict>;
457
+ type BeginCaptureRunInput = z.infer<typeof beginCaptureRunInputSchema>;
458
+ //#endregion
459
+ //#region ../contract/src/capture/capture-manifest.lib.d.ts
460
+ /**
461
+ * The captures a run publishes, and every capture it leaves out: those the manifest already names
462
+ * and those the selection's own rules drop. A refused selection still hands back what it left out.
463
+ */
464
+ type CaptureSelection = {
465
+ readonly captures: readonly CaptureArtifact[];
466
+ readonly leftOut: readonly CaptureLeftOut[];
467
+ } | {
468
+ readonly refusal: string;
469
+ readonly leftOut: readonly CaptureLeftOut[];
470
+ };
471
+ /**
472
+ * All publishers select captures with the same rules, so the SDK and the API agree on every frame,
473
+ * and every capture the selection leaves out is named with its reason.
474
+ */
475
+ declare const captureSelection: (input: CaptureManifest) => CaptureSelection;
476
+ /**
477
+ * One manifest from each shard's. Each shard's left-out captures are kept, and an attempt that a
478
+ * shard's manifest holds for a shard it does not cover is named as left out. The selection, which
479
+ * every publisher runs, decides whether anything is left to publish.
480
+ */
481
+ declare const mergeCaptureManifests: (parts: readonly CaptureManifest[]) => CaptureManifest | string;
482
+ /** The selected captures, or why there are none: the shape the SDK has always published. */
483
+ declare const selectedCaptures: (input: CaptureManifest) => readonly CaptureArtifact[] | string;
484
+ //#endregion
485
+ //#region ../contract/src/capture/capture-review.schema.d.ts
486
+ declare const captureReferenceSchema: z.ZodObject<{
487
+ runId: z.ZodUUID;
488
+ revision: z.ZodString;
489
+ version: z.ZodNumber;
490
+ }, z.core.$strict>;
491
+ declare const updateCaptureReferenceInputSchema: z.ZodObject<{
492
+ canvasId: z.ZodUUID;
493
+ name: z.ZodString;
494
+ expectedVersion: z.ZodNumber;
495
+ revision: z.ZodString;
496
+ }, z.core.$strict>;
497
+ declare const captureReviewSchema: z.ZodObject<{
498
+ current: z.ZodObject<{
499
+ run: z.ZodObject<{
500
+ id: z.ZodUUID;
501
+ canvasId: z.ZodUUID;
502
+ source: z.ZodString;
503
+ runKey: z.ZodString;
504
+ generation: z.ZodNumber;
505
+ participants: z.ZodArray<z.ZodString>;
506
+ expiresAt: z.ZodISODateTime;
507
+ formatVersion: z.ZodLiteral<1>;
508
+ review: z.ZodOptional<z.ZodObject<{
509
+ destination: z.ZodObject<{
510
+ organisationId: z.ZodOptional<z.ZodUUID>;
511
+ }, z.core.$strict>;
512
+ context: z.ZodOptional<z.ZodObject<{
513
+ key: z.ZodString;
514
+ label: z.ZodString;
515
+ url: z.ZodOptional<z.ZodURL>;
516
+ sequence: z.ZodNumber;
517
+ attempt: z.ZodDefault<z.ZodNumber>;
518
+ }, z.core.$strict>>;
519
+ revision: z.ZodOptional<z.ZodString>;
520
+ baselineRunId: z.ZodNullable<z.ZodUUID>;
521
+ compareTo: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
522
+ runId: z.ZodUUID;
523
+ }, z.core.$strict>, z.ZodObject<{
524
+ reference: z.ZodString;
525
+ revision: z.ZodOptional<z.ZodString>;
526
+ }, z.core.$strict>]>>;
527
+ }, z.core.$strict>>;
528
+ }, z.core.$strict>;
529
+ state: z.ZodEnum<{
530
+ failed: "failed";
531
+ collecting: "collecting";
532
+ sealed: "sealed";
533
+ converting: "converting";
534
+ committed: "committed";
535
+ cancelled: "cancelled";
536
+ }>;
537
+ receipt: z.ZodNullable<z.ZodObject<{
538
+ runId: z.ZodUUID;
539
+ canvasId: z.ZodUUID;
540
+ canvasUrl: z.ZodURL;
541
+ version: z.ZodNumber;
542
+ manifestDigest: z.ZodString;
543
+ frames: z.ZodArray<z.ZodObject<{
544
+ key: z.ZodObject<{
545
+ source: z.ZodString;
546
+ journey: z.ZodString;
547
+ step: z.ZodString;
548
+ variant: z.ZodString;
549
+ }, z.core.$strict>;
550
+ frameId: z.ZodString;
551
+ captureId: z.ZodUUID;
552
+ }, z.core.$strict>>;
553
+ issues: z.ZodArray<z.ZodObject<{
554
+ code: z.ZodString;
555
+ message: z.ZodString;
556
+ }, z.core.$strict>>;
557
+ }, z.core.$strict>>;
558
+ verdict: z.ZodOptional<z.ZodEnum<{
559
+ "awaiting-review": "awaiting-review";
560
+ approved: "approved";
561
+ "changes-requested": "changes-requested";
562
+ }>>;
563
+ failure: z.ZodNullable<z.ZodObject<{
564
+ code: z.ZodString;
565
+ message: z.ZodString;
566
+ }, z.core.$strict>>;
567
+ }, z.core.$strict>;
568
+ latest: z.ZodObject<{
569
+ id: z.ZodUUID;
570
+ canvasId: z.ZodUUID;
571
+ source: z.ZodString;
572
+ runKey: z.ZodString;
573
+ generation: z.ZodNumber;
574
+ participants: z.ZodArray<z.ZodString>;
575
+ expiresAt: z.ZodISODateTime;
576
+ formatVersion: z.ZodLiteral<1>;
577
+ review: z.ZodOptional<z.ZodObject<{
578
+ destination: z.ZodObject<{
579
+ organisationId: z.ZodOptional<z.ZodUUID>;
580
+ }, z.core.$strict>;
581
+ context: z.ZodOptional<z.ZodObject<{
582
+ key: z.ZodString;
583
+ label: z.ZodString;
584
+ url: z.ZodOptional<z.ZodURL>;
585
+ sequence: z.ZodNumber;
586
+ attempt: z.ZodDefault<z.ZodNumber>;
587
+ }, z.core.$strict>>;
588
+ revision: z.ZodOptional<z.ZodString>;
589
+ baselineRunId: z.ZodNullable<z.ZodUUID>;
590
+ compareTo: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
591
+ runId: z.ZodUUID;
592
+ }, z.core.$strict>, z.ZodObject<{
593
+ reference: z.ZodString;
594
+ revision: z.ZodOptional<z.ZodString>;
595
+ }, z.core.$strict>]>>;
596
+ }, z.core.$strict>>;
597
+ }, z.core.$strict>;
598
+ related: z.ZodArray<z.ZodObject<{
599
+ run: z.ZodObject<{
600
+ id: z.ZodUUID;
601
+ canvasId: z.ZodUUID;
602
+ source: z.ZodString;
603
+ runKey: z.ZodString;
604
+ generation: z.ZodNumber;
605
+ participants: z.ZodArray<z.ZodString>;
606
+ expiresAt: z.ZodISODateTime;
607
+ formatVersion: z.ZodLiteral<1>;
608
+ review: z.ZodOptional<z.ZodObject<{
609
+ destination: z.ZodObject<{
610
+ organisationId: z.ZodOptional<z.ZodUUID>;
611
+ }, z.core.$strict>;
612
+ context: z.ZodOptional<z.ZodObject<{
613
+ key: z.ZodString;
614
+ label: z.ZodString;
615
+ url: z.ZodOptional<z.ZodURL>;
616
+ sequence: z.ZodNumber;
617
+ attempt: z.ZodDefault<z.ZodNumber>;
618
+ }, z.core.$strict>>;
619
+ revision: z.ZodOptional<z.ZodString>;
620
+ baselineRunId: z.ZodNullable<z.ZodUUID>;
621
+ compareTo: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
622
+ runId: z.ZodUUID;
623
+ }, z.core.$strict>, z.ZodObject<{
624
+ reference: z.ZodString;
625
+ revision: z.ZodOptional<z.ZodString>;
626
+ }, z.core.$strict>]>>;
627
+ }, z.core.$strict>>;
628
+ }, z.core.$strict>;
629
+ verdict: z.ZodEnum<{
630
+ "awaiting-review": "awaiting-review";
631
+ approved: "approved";
632
+ "changes-requested": "changes-requested";
633
+ }>;
634
+ }, z.core.$strict>>;
635
+ changes: z.ZodArray<z.ZodObject<{
636
+ key: z.ZodObject<{
637
+ source: z.ZodString;
638
+ journey: z.ZodString;
639
+ step: z.ZodString;
640
+ variant: z.ZodString;
641
+ }, z.core.$strict>;
642
+ frameId: z.ZodString;
643
+ label: z.ZodString;
644
+ journeyLabel: z.ZodString;
645
+ page: z.ZodOptional<z.ZodString>;
646
+ change: z.ZodEnum<{
647
+ new: "new";
648
+ changed: "changed";
649
+ unchanged: "unchanged";
650
+ uncompared: "uncompared";
651
+ }>;
652
+ }, z.core.$strict>>;
653
+ }, z.core.$strict>;
654
+ type CaptureReview = z.infer<typeof captureReviewSchema>;
655
+ //#endregion
656
+ export { captureManifestSchema as _, mergeCaptureManifests as a, CaptureArtifact as c, CaptureManifest as d, CaptureReceipt as f, captureArtifactSchema as g, beginCaptureRunInputSchema as h, captureSelection as i, CaptureBlob as l, CaptureVerdict as m, captureReferenceSchema as n, selectedCaptures as o, CaptureRunDescriptor as p, updateCaptureReferenceInputSchema as r, BeginCaptureRunInput as s, CaptureReview as t, CaptureLeftOut as u, getCaptureRunOutputSchema as v };