@cueframe/studio-contracts 0.1.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/index.js ADDED
@@ -0,0 +1,1932 @@
1
+ // src/commands.ts
2
+ import { z as z7 } from "zod";
3
+
4
+ // ../kernel/dist/chunk-2B5VJZHL.js
5
+ import { z } from "zod";
6
+ var Focus = z.discriminatedUnion("mode", [
7
+ z.object({ mode: z.literal("frame-center") }),
8
+ z.object({ mode: z.literal("point"), x: z.number().min(0).max(1), y: z.number().min(0).max(1) }),
9
+ z.object({
10
+ mode: z.literal("face"),
11
+ faceId: z.string().min(1),
12
+ shotScale: z.enum(["close", "standard", "wide"]).optional()
13
+ }),
14
+ z.object({ mode: z.literal("all-faces") }),
15
+ z.object({ mode: z.literal("active-speaker") })
16
+ ]);
17
+ var ReframeSegmentFields = z.object({
18
+ startSec: z.number().nonnegative().describe(
19
+ "Segment START in seconds, clip-relative. Segments tile the clip's duration in order."
20
+ ),
21
+ endSec: z.number().positive().describe(
22
+ "Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."
23
+ ),
24
+ focus: Focus.describe(
25
+ "WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."
26
+ ),
27
+ intent: z.string().optional().describe(
28
+ "Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."
29
+ ),
30
+ zoom: z.number().min(0.1).max(1).optional().describe(
31
+ "How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale`: a face-tracked shot is sized EITHER by the editorial scale (shotScale, calibrated to the detected face) OR by an explicit zoom \u2014 never both."
32
+ ),
33
+ ease: z.object({
34
+ in: z.number().nonnegative().describe("Ease-IN ramp DURATION in seconds at the segment START."),
35
+ out: z.number().nonnegative().describe("Ease-OUT ramp DURATION in seconds at the segment END.")
36
+ }).optional().describe(
37
+ "Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."
38
+ ),
39
+ bias: z.object({
40
+ x: z.number().min(-0.3).max(0.3).describe("Horizontal nudge, source-normalized (+ = right)."),
41
+ y: z.number().min(-0.3).max(0.3).describe("Vertical nudge, source-normalized (+ = down).")
42
+ }).optional().describe(
43
+ "Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus."
44
+ )
45
+ });
46
+ var ReframeSegment = ReframeSegmentFields.refine(
47
+ (s) => !(s.focus.mode === "face" && s.focus.shotScale !== void 0 && s.zoom !== void 0),
48
+ {
49
+ message: "a face segment takes EITHER focus.shotScale (editorial scale, calibrated to the detected face) OR an explicit zoom \u2014 never both; shotScale wins at bake time and the zoom would be silently discarded",
50
+ path: ["zoom"]
51
+ }
52
+ );
53
+ var Reframe = z.object({ segments: z.array(ReframeSegment).min(1) });
54
+
55
+ // ../kernel/dist/chunk-AEGHEOO3.js
56
+ import { z as z2 } from "zod";
57
+ import { z as z22 } from "zod";
58
+ import { z as z3 } from "zod";
59
+ var OpaqueId = z2.string();
60
+ var Format = z22.object({
61
+ aspectRatio: z22.enum(["16:9", "9:16", "1:1", "4:5"]),
62
+ fps: z22.union([z22.literal(24), z22.literal(30), z22.literal(60)]).optional(),
63
+ resolution: z22.enum(["hd", "fhd", "4k"]).optional(),
64
+ platform: z22.string().optional()
65
+ });
66
+ var Trim = z22.object({
67
+ start: z22.number().nonnegative(),
68
+ end: z22.number().nonnegative()
69
+ });
70
+ var ExcludedRange = z22.object({
71
+ start: z22.number().nonnegative(),
72
+ end: z22.number().nonnegative(),
73
+ reason: z22.string().optional()
74
+ });
75
+ var MediaClipSource = z22.object({
76
+ kind: z22.literal("media"),
77
+ mediaId: OpaqueId,
78
+ trim: Trim.optional(),
79
+ excludedRanges: z22.array(ExcludedRange).optional(),
80
+ volume: z22.number().min(0).max(4).optional(),
81
+ muted: z22.boolean().optional(),
82
+ playbackRate: z22.number().positive().optional(),
83
+ sync: z22.enum(["video", "independent"]).optional(),
84
+ kenBurns: z22.enum(["in", "out", "pan-l", "pan-r", "none"]).optional(),
85
+ volumeDb: z22.number().optional(),
86
+ fadeInMs: z22.number().nonnegative().optional(),
87
+ fadeOutMs: z22.number().nonnegative().optional(),
88
+ loop: z22.boolean().optional(),
89
+ audioRole: z22.enum(["sfx", "music", "vo", "ambience"]).optional(),
90
+ duck: z22.object({
91
+ duckDb: z22.number().max(0),
92
+ attackMs: z22.number().nonnegative(),
93
+ releaseMs: z22.number().nonnegative(),
94
+ windows: z22.array(z22.object({ startMs: z22.number(), endMs: z22.number() })).optional()
95
+ }).optional(),
96
+ anchor: z22.object({
97
+ clipId: z22.string().min(1),
98
+ offsetMs: z22.number()
99
+ }).optional(),
100
+ reframe: Reframe.optional()
101
+ });
102
+ var ComponentClipSource = z22.object({
103
+ kind: z22.literal("component"),
104
+ componentId: z22.string().min(1),
105
+ props: z22.record(z22.string(), z22.unknown()),
106
+ zPlane: z22.enum(["front", "behind-subject"]).optional()
107
+ });
108
+ var OverlayClipSource = z22.object({
109
+ kind: z22.literal("overlay"),
110
+ primitiveId: z22.string().min(1),
111
+ params: z22.record(z22.string(), z22.unknown()),
112
+ zPlane: z22.enum(["front", "behind-subject"]).optional(),
113
+ anchor: z22.object({ space: z22.literal("scene"), x: z22.number().min(0).max(1), y: z22.number().min(0).max(1) }).optional(),
114
+ parallax: z22.number().min(-0.3).max(0.3).optional()
115
+ });
116
+ var EffectClipSource = z22.object({
117
+ kind: z22.literal("effect"),
118
+ primitiveId: z22.string().min(1),
119
+ params: z22.record(z22.string(), z22.unknown()).optional()
120
+ });
121
+ var AlphaLayerClipSource = z22.object({
122
+ kind: z22.literal("alpha-layer"),
123
+ componentId: z22.string().min(1),
124
+ props: z22.record(z22.string(), z22.unknown()),
125
+ zPlane: z22.enum(["front", "behind-subject"]).optional()
126
+ });
127
+ var CardClipSource = z22.object({
128
+ kind: z22.literal("card"),
129
+ html: z22.string().min(1),
130
+ tokens: z22.record(z22.string(), z22.string()).optional(),
131
+ zPlane: z22.literal("front").optional()
132
+ });
133
+ var CompositionClipSource = z22.object({
134
+ kind: z22.literal("composition"),
135
+ compositionId: z22.string().min(1),
136
+ trim: Trim.optional()
137
+ }).strict();
138
+ var ClipSource = z22.discriminatedUnion("kind", [
139
+ MediaClipSource,
140
+ ComponentClipSource,
141
+ OverlayClipSource,
142
+ EffectClipSource,
143
+ AlphaLayerClipSource,
144
+ CardClipSource,
145
+ CompositionClipSource
146
+ ]);
147
+ var Transition = z22.object({
148
+ type: z22.string().min(1),
149
+ duration: z22.number().positive()
150
+ });
151
+ var Position = z22.object({
152
+ x: z22.number(),
153
+ y: z22.number()
154
+ });
155
+ var Region = z22.object({
156
+ x: z22.number().min(0).max(1),
157
+ y: z22.number().min(0).max(1),
158
+ w: z22.number().positive().max(1),
159
+ h: z22.number().positive().max(1)
160
+ });
161
+ var ClipFit = z22.enum(["cover", "contain"]);
162
+ var PerClipEffect = z22.object({
163
+ primitiveId: z22.string().min(1),
164
+ params: z22.record(z22.string(), z22.unknown()).optional()
165
+ });
166
+ var KeyframeEasing = z22.union([
167
+ z22.enum(["linear", "ease", "easeIn", "easeOut", "easeInOut"]),
168
+ z22.object({ cubicBezier: z22.tuple([z22.number(), z22.number(), z22.number(), z22.number()]) }).strict()
169
+ ]);
170
+ var Keyframe = z22.object({
171
+ time: z22.number().nonnegative(),
172
+ value: z22.number(),
173
+ easing: KeyframeEasing.optional()
174
+ }).strict();
175
+ var KeyframeChannel = z22.array(Keyframe).min(2);
176
+ var ANIMATABLE_PARAMS = [
177
+ "opacity",
178
+ "scale",
179
+ "rotation",
180
+ "position.x",
181
+ "position.y",
182
+ "volume"
183
+ ];
184
+ var TimelineClip = z22.object({
185
+ id: z22.string().min(1),
186
+ startTime: z22.number().nonnegative(),
187
+ duration: z22.number().positive(),
188
+ source: ClipSource,
189
+ kind: z22.enum(["video", "audio", "image", "overlay", "effect"]).optional(),
190
+ opacity: z22.number().min(0).max(1).optional(),
191
+ scale: z22.number().positive().optional(),
192
+ rotation: z22.number().optional(),
193
+ position: Position.optional(),
194
+ region: Region.optional(),
195
+ fit: ClipFit.optional(),
196
+ effects: z22.array(PerClipEffect).optional(),
197
+ transitionIn: Transition.optional(),
198
+ linkGroupId: z22.string().min(1).optional(),
199
+ animate: z22.record(z22.string(), KeyframeChannel).superRefine((channels, ctx) => {
200
+ for (const key of Object.keys(channels)) {
201
+ if (!ANIMATABLE_PARAMS.includes(key)) {
202
+ ctx.addIssue({
203
+ code: z22.ZodIssueCode.custom,
204
+ path: [key],
205
+ message: `"${key}" is not an animatable param (${ANIMATABLE_PARAMS.join(", ")})`
206
+ });
207
+ }
208
+ }
209
+ }).optional()
210
+ }).strict();
211
+ var Gap = z22.object({
212
+ id: z22.string().min(1),
213
+ startTime: z22.number().nonnegative(),
214
+ duration: z22.number().positive()
215
+ }).strict();
216
+ var TrackContent = z22.unknown().transform((val, ctx) => {
217
+ const hasSource = !!val && typeof val === "object" && "source" in val;
218
+ const res = (hasSource ? TimelineClip : Gap).safeParse(val);
219
+ if (!res.success) {
220
+ for (const issue of res.error.issues) ctx.addIssue(issue);
221
+ return z22.NEVER;
222
+ }
223
+ return res.data;
224
+ });
225
+ var Track = z22.object({
226
+ id: z22.string().min(1),
227
+ kind: z22.enum(["video", "audio", "image", "overlay", "effect"]),
228
+ name: z22.string().optional(),
229
+ enabled: z22.boolean().optional(),
230
+ volume: z22.number().min(0).max(4).optional(),
231
+ contents: z22.array(TrackContent)
232
+ }).strict();
233
+ var Marker = z22.object({
234
+ id: z22.string().min(1),
235
+ startTime: z22.number().nonnegative(),
236
+ endTime: z22.number().nonnegative().optional(),
237
+ kind: z22.string().min(1),
238
+ name: z22.string().optional(),
239
+ metadata: z22.record(z22.string(), z22.unknown()).optional()
240
+ }).strict();
241
+ var AccessControl = z22.object({
242
+ public: z22.boolean().optional(),
243
+ readerOrgIds: z22.array(z22.string()).optional(),
244
+ writerOrgIds: z22.array(z22.string()).optional()
245
+ });
246
+ var LicenseDeclaration = z22.object({
247
+ type: z22.string().min(1),
248
+ source: z22.string().optional(),
249
+ notes: z22.string().optional()
250
+ });
251
+ var CompositionAccessibility = z22.object({
252
+ audioDescriptionTrackId: z22.string().optional(),
253
+ captionsTrackId: z22.string().optional(),
254
+ signLanguageTrackId: z22.string().optional(),
255
+ notes: z22.string().optional()
256
+ });
257
+ var CaptionWord = z22.object({
258
+ text: z22.string().min(1),
259
+ startMs: z22.number().nonnegative(),
260
+ endMs: z22.number().nonnegative(),
261
+ emphasis: z22.boolean().optional(),
262
+ annotate: z22.enum(["circle", "underline"]).optional()
263
+ });
264
+ var CaptionStyle = z22.object({
265
+ fontFamily: z22.string().min(1).optional(),
266
+ fontSize: z22.number().min(1, "captions style.fontSize is PERCENT of composition height (1-15, default 5) \u2014 px values are not accepted").max(15, "captions style.fontSize is PERCENT of composition height (1-15, default 5) \u2014 px values are not accepted").optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),
267
+ fontWeight: z22.number().int().min(100).max(900).optional(),
268
+ color: z22.string().min(1).optional(),
269
+ highlightColor: z22.string().min(1).optional(),
270
+ backgroundColor: z22.string().optional(),
271
+ plate: z22.enum(["glass", "solid", "none"]).optional(),
272
+ position: z22.enum(["top", "center", "bottom"]).optional(),
273
+ textTransform: z22.enum(["none", "uppercase", "capitalize"]).optional(),
274
+ emphasisColor: z22.string().optional(),
275
+ emphasisGradient: z22.string().optional(),
276
+ emphasisScale: z22.number().positive().optional(),
277
+ emphasisFontFamily: z22.string().optional(),
278
+ emphasisFontWeight: z22.number().int().min(100).max(900).optional(),
279
+ emphasisTextTransform: z22.enum(["none", "uppercase", "capitalize"]).optional(),
280
+ emphasisLetterSpacing: z22.number().optional(),
281
+ emphasisFontStyle: z22.enum(["normal", "italic"]).optional(),
282
+ entrance: z22.enum(["none", "fade", "word-pop", "stagger-up"]).optional(),
283
+ entranceMs: z22.number().nonnegative().optional(),
284
+ entranceStaggerMs: z22.number().nonnegative().optional(),
285
+ exitMs: z22.number().nonnegative().optional(),
286
+ emphasisPlate: z22.boolean().optional(),
287
+ emphasisPlateColor: z22.string().optional(),
288
+ emphasisPlateTextColor: z22.string().optional(),
289
+ emphasisPlateAltColor: z22.string().optional(),
290
+ emphasisPlateAltTextColor: z22.string().optional(),
291
+ emphasisPlateRadius: z22.number().nonnegative().optional(),
292
+ emphasisPlatePadX: z22.number().optional(),
293
+ emphasisPlatePadY: z22.number().optional(),
294
+ annotationColor: z22.string().optional(),
295
+ maxWidthPercent: z22.number().positive().max(100, "captions style.maxWidthPercent is % of composition width (max 100)").optional()
296
+ });
297
+ var CaptionSegment = z22.object({
298
+ words: z22.array(CaptionWord)
299
+ });
300
+ var CaptionDepth = z22.enum(["front", "behind-subject"]).optional();
301
+ var CompositionCaptions = z22.discriminatedUnion("source", [
302
+ z22.object({
303
+ source: z22.literal("derived"),
304
+ from: z22.object({ clipId: z22.string() }),
305
+ segments: z22.array(CaptionSegment),
306
+ style: CaptionStyle.optional(),
307
+ zPlane: CaptionDepth
308
+ }),
309
+ z22.object({
310
+ source: z22.literal("authored"),
311
+ segments: z22.array(CaptionSegment),
312
+ style: CaptionStyle.optional(),
313
+ zPlane: CaptionDepth
314
+ })
315
+ ]);
316
+ var Composition = z22.object({
317
+ v: z22.literal(1, {
318
+ errorMap: (_issue, ctx) => ctx.data === void 0 ? { message: 'Missing version envelope: add top-level "v": 1 to the composition.' } : { message: `Invalid version envelope: top-level "v" must be the literal 1 (got ${JSON.stringify(ctx.data)}).` }
319
+ }),
320
+ format: Format,
321
+ tracks: z22.array(Track),
322
+ markers: z22.array(Marker).optional(),
323
+ captions: CompositionCaptions.optional(),
324
+ sourceSuggestionId: z22.string().optional(),
325
+ license: LicenseDeclaration.optional(),
326
+ licenseVerification: z22.enum([
327
+ "attested",
328
+ "cueframe-verified",
329
+ "third-party-verified"
330
+ ]).optional(),
331
+ accessibility: CompositionAccessibility.optional(),
332
+ ownerOrgId: z22.string().optional(),
333
+ acl: AccessControl.optional()
334
+ }).strict();
335
+ var CompositionAuthorKind = z22.enum(["user", "agent", "import"]);
336
+ var CompositionVersion = z22.object({
337
+ id: z22.string().min(1),
338
+ compositionId: OpaqueId,
339
+ predecessorId: z22.string().optional(),
340
+ createdAt: z22.number(),
341
+ // epoch ms — see CONVEX_ADAPTATIONS.md
342
+ etag: z22.string().min(1),
343
+ authorKind: CompositionAuthorKind,
344
+ // load-bearing for multi-agent lineage
345
+ authorId: z22.string().optional(),
346
+ // userId for 'user', agentId for 'agent', source for 'import'
347
+ composition: Composition
348
+ });
349
+ var GRAPHICS_PLAN_VERSION = "gp-1";
350
+ var Version = z3.literal(GRAPHICS_PLAN_VERSION);
351
+ var PlanRect = Region;
352
+ var GraphicRole = z3.enum([
353
+ "title-card",
354
+ // topic-setter / opener card
355
+ "stat",
356
+ // a single headline number + label
357
+ "lower-third",
358
+ // name/title tag over the speaker
359
+ "pull-quote",
360
+ // a short quoted line
361
+ "hero",
362
+ // big behind-subject phrase (zPlane: behind-subject)
363
+ "logo-tag",
364
+ // small brand mark / watermark beat
365
+ "enumeration",
366
+ "sequence",
367
+ // an ordered chain of steps — often the POINT is that it is too long
368
+ "comparison"
369
+ // labelled values set against each other (a benchmark, a before/after)
370
+ ]);
371
+ var Copy = z3.object({
372
+ headline: z3.string().max(120).optional(),
373
+ sub: z3.string().max(200).optional(),
374
+ value: z3.string().max(40).optional(),
375
+ label: z3.string().max(80).optional(),
376
+ items: z3.array(z3.string().max(80)).max(8).optional(),
377
+ series: z3.array(z3.object({ label: z3.string().max(40), value: z3.string().max(16) })).max(8).optional()
378
+ }).strict();
379
+ var ContentBeat = z3.object({
380
+ id: z3.string().min(1),
381
+ atSec: z3.number().min(0),
382
+ durSec: z3.number().positive(),
383
+ role: GraphicRole,
384
+ copy: Copy,
385
+ intent: z3.string().min(1).max(400),
386
+ priority: z3.number().int().min(0).max(10).default(5)
387
+ }).strict();
388
+ var ContentPlan = z3.object({
389
+ version: Version,
390
+ beats: z3.array(ContentBeat)
391
+ }).strict();
392
+ var ElementRole = z3.enum([
393
+ "headline",
394
+ // primary large text
395
+ "value",
396
+ // the stat number / the one word to remember
397
+ "label",
398
+ // supporting text
399
+ "sublabel",
400
+ // secondary supporting text
401
+ "logo",
402
+ // brand mark
403
+ "accent-shape",
404
+ // decorative block/line/underline
405
+ "backdrop"
406
+ // solid fill (takeover cards only)
407
+ ]);
408
+ var StyleRole = z3.enum([
409
+ "heading",
410
+ "body",
411
+ "accent",
412
+ "surface",
413
+ "on-accent",
414
+ "on-surface"
415
+ ]);
416
+ var ZPlane = z3.enum(["front", "behind-subject"]);
417
+ var LayoutElement = z3.object({
418
+ elId: z3.string().min(1),
419
+ role: ElementRole,
420
+ box: PlanRect,
421
+ styleRole: StyleRole,
422
+ z: ZPlane.default("front"),
423
+ text: z3.string().max(200).optional(),
424
+ typeScaleStep: z3.number().int().min(0).max(8).optional()
425
+ }).strict();
426
+ var EPS = 1e-6;
427
+ var rectsOverlapEps = (a, b) => a.x < b.x + b.w - EPS && a.x + a.w > b.x + EPS && a.y < b.y + b.h - EPS && a.y + a.h > b.y + EPS;
428
+ var LayoutPlan = z3.object({
429
+ version: Version,
430
+ beatId: z3.string().min(1),
431
+ frame: z3.object({ w: z3.number().positive(), h: z3.number().positive() }).strict(),
432
+ keepOut: z3.array(PlanRect),
433
+ safe: z3.object({
434
+ titleSafe: z3.number().min(0).max(1),
435
+ actionSafe: z3.number().min(0).max(1)
436
+ }).strict(),
437
+ elements: z3.array(LayoutElement),
438
+ dropped: z3.object({ reason: z3.string().min(1) }).strict().optional()
439
+ }).strict().superRefine((plan, ctx) => {
440
+ for (const el of plan.elements) {
441
+ if (el.z === "behind-subject") continue;
442
+ const b = el.box;
443
+ if (b.x + b.w > 1 + EPS || b.y + b.h > 1 + EPS) {
444
+ ctx.addIssue({ code: z3.ZodIssueCode.custom, message: `element ${el.elId} box spills past the frame`, path: ["elements"] });
445
+ }
446
+ for (const ko of plan.keepOut) {
447
+ if (rectsOverlapEps(b, ko)) {
448
+ ctx.addIssue({ code: z3.ZodIssueCode.custom, message: `element ${el.elId} overlaps a face keep-out (text on the speaker)`, path: ["elements"] });
449
+ }
450
+ }
451
+ }
452
+ });
453
+ var EnterType = z3.enum(["reveal", "fade", "rise", "count-up", "wipe"]);
454
+ var EmphasisType = z3.enum(["pulse", "underline", "color-shift"]);
455
+ var ExitType = z3.enum(["fade", "fall", "wipe", "cut"]);
456
+ var Ease = z3.enum(["spring", "ease-out", "ease-in-out", "linear"]);
457
+ var EnterMotion = z3.object({
458
+ type: EnterType,
459
+ atMs: z3.number().min(0),
460
+ durMs: z3.number().positive(),
461
+ ease: Ease.default("spring"),
462
+ stagger: z3.number().min(0).optional()
463
+ }).strict();
464
+ var EmphasisMotion = z3.object({ type: EmphasisType, atMs: z3.number().min(0), durMs: z3.number().positive() }).strict();
465
+ var ExitMotion = z3.object({ type: ExitType, atMs: z3.number().min(0), durMs: z3.number().positive() }).strict();
466
+ var MotionElement = z3.object({
467
+ elId: z3.string().min(1),
468
+ enter: EnterMotion,
469
+ emphasis: EmphasisMotion.optional(),
470
+ exit: ExitMotion.optional()
471
+ }).strict();
472
+ var MotionPlan = z3.object({
473
+ version: Version,
474
+ beatId: z3.string().min(1),
475
+ elements: z3.array(MotionElement)
476
+ }).strict();
477
+ var GraphicsPlan = z3.object({
478
+ version: Version,
479
+ content: ContentPlan,
480
+ layouts: z3.array(LayoutPlan),
481
+ motions: z3.array(MotionPlan)
482
+ }).strict();
483
+
484
+ // ../kernel/dist/composition-ops.js
485
+ import { z as z4 } from "zod";
486
+ var CompositionOp = z4.discriminatedUnion("type", [
487
+ z4.object({ type: z4.literal("clip.add"), clip: TimelineClip, trackId: z4.string().optional(), newTrack: z4.boolean().optional(), newTrackId: z4.string().optional() }).strict(),
488
+ z4.object({ type: z4.literal("clip.remove"), clipId: z4.string() }).strict(),
489
+ z4.object({ type: z4.literal("clip.update"), clipId: z4.string(), patch: TimelineClip.partial() }).strict(),
490
+ z4.object({ type: z4.literal("removeClipsByMediaId"), mediaId: z4.string() }).strict(),
491
+ z4.object({ type: z4.literal("loadOverlays"), clips: z4.array(TimelineClip) }).strict(),
492
+ z4.object({ type: z4.literal("addMarker"), marker: Marker }).strict(),
493
+ z4.object({ type: z4.literal("removeMarker"), markerId: z4.string() }).strict(),
494
+ z4.object({ type: z4.literal("updateMarker"), markerId: z4.string(), updates: Marker.partial() }).strict(),
495
+ z4.object({ type: z4.literal("setCropIntents"), clipId: z4.string(), segments: z4.array(ReframeSegment).nullable() }).strict(),
496
+ z4.object({ type: z4.literal("setEffects"), clipId: z4.string(), effects: z4.array(PerClipEffect) }).strict(),
497
+ z4.object({ type: z4.literal("setCaptionStyle"), style: CaptionStyle.partial() }).strict(),
498
+ z4.object({ type: z4.literal("setCaptionDepth"), zPlane: z4.enum(["front", "behind-subject"]) }).strict(),
499
+ z4.object({ type: z4.literal("setCaptions"), segments: z4.array(CaptionSegment), style: CaptionStyle.partial().optional() }).strict(),
500
+ z4.object({ type: z4.literal("applyMotionPreset"), clipId: z4.string(), preset: z4.string(), params: z4.object({ enterMs: z4.number().optional(), exitMs: z4.number().optional(), staggerMs: z4.number().optional() }).strict().optional() }).strict(),
501
+ z4.object({ type: z4.literal("materializeGrid"), clipId: z4.string(), grid: z4.enum(["beat", "word", "shot"]), maxMarkers: z4.number().int().positive().max(2e3).optional() }).strict(),
502
+ z4.object({
503
+ type: z4.literal("captions.fromTranscript"),
504
+ mediaId: z4.string().min(1),
505
+ window: z4.object({ startSec: z4.number().min(0), endSec: z4.number().positive() }).strict().optional()
506
+ }).strict(),
507
+ z4.object({ type: z4.literal("setFormat"), format: Format.pick({ aspectRatio: true, fps: true, resolution: true }) }).strict(),
508
+ z4.object({ type: z4.literal("addTrack"), kind: Track.shape.kind, name: z4.string().optional(), id: z4.string().optional() }).strict(),
509
+ z4.object({ type: z4.literal("removeTrack"), trackId: z4.string() }).strict(),
510
+ z4.object({ type: z4.literal("updateTrack"), trackId: z4.string(), updates: Track.pick({ name: true, enabled: true, volume: true }).partial() }).strict(),
511
+ z4.object({ type: z4.literal("reorderTracks"), fromIndex: z4.number(), toIndex: z4.number() }).strict(),
512
+ z4.object({ type: z4.literal("moveClipToTrack"), clipId: z4.string(), targetTrackId: z4.string(), newStartTime: z4.number().optional() }).strict(),
513
+ z4.object({ type: z4.literal("duplicateClip"), clipId: z4.string(), newClipId: z4.string().optional() }).strict(),
514
+ z4.object({ type: z4.literal("cutAndRipple"), start: z4.number(), end: z4.number() }).strict(),
515
+ z4.object({ type: z4.literal("ripple"), time: z4.number(), amount: z4.number() }).strict(),
516
+ z4.object({ type: z4.literal("addExcludedRange"), clipId: z4.string(), sourceStart: z4.number(), sourceEnd: z4.number(), reason: z4.string().optional() }).strict(),
517
+ z4.object({ type: z4.literal("removeExcludedRange"), clipId: z4.string(), rangeIdx: z4.number() }).strict()
518
+ ]);
519
+
520
+ // src/revisions.ts
521
+ import { z as z5 } from "zod";
522
+ var AggregateRevision = z5.number().int().nonnegative();
523
+
524
+ // src/ids.ts
525
+ import { z as z6 } from "zod";
526
+
527
+ // src/bounds.ts
528
+ var STUDIO_LIMITS = {
529
+ id: 128,
530
+ name: 255,
531
+ title: 200,
532
+ description: 1e4,
533
+ query: 500,
534
+ cursor: 4096,
535
+ version: 128,
536
+ shortText: 1e3,
537
+ longText: 1e5,
538
+ conversationMessages: 1e6,
539
+ componentBundle: 1e6,
540
+ collection: 1e3,
541
+ componentIds: 100,
542
+ timelineWords: 2e4,
543
+ commandOperations: 500,
544
+ commandPayloadBytes: 2e6,
545
+ jsonDepth: 8,
546
+ jsonCollection: 100,
547
+ pathSegment: 255,
548
+ contentType: 255,
549
+ templateContent: 1e6,
550
+ uploadBytes: 10 * 1024 * 1024 * 1024
551
+ };
552
+
553
+ // src/ids.ts
554
+ var OpaqueId2 = z6.string().min(1).max(STUDIO_LIMITS.id);
555
+ var ProjectId = OpaqueId2;
556
+ var CompositionId = OpaqueId2;
557
+ var CommandId = z6.string().min(1).max(128);
558
+ var OperationId = z6.string().min(1).max(128);
559
+ var JournalClientId = z6.string().min(1).max(128).regex(/^[^:]+$/);
560
+ var JournalSequence = z6.number().int().positive().safe();
561
+
562
+ // src/commands.ts
563
+ var DurableCommandFields = {
564
+ commandId: CommandId,
565
+ expectedRevision: AggregateRevision
566
+ };
567
+ var DurableCommand = z7.object(DurableCommandFields).strict();
568
+ var DurableOperation = z7.object({
569
+ operationId: OperationId,
570
+ operation: CompositionOp
571
+ }).strict();
572
+ var JournalCommandFields = {
573
+ ...DurableCommandFields,
574
+ clientId: JournalClientId,
575
+ sequence: JournalSequence
576
+ };
577
+ function isStructuredJournalCommand(value) {
578
+ return value.commandId === `${value.clientId}:${value.sequence}`;
579
+ }
580
+ function boundedPayload(schema) {
581
+ return z7.preprocess((value) => {
582
+ try {
583
+ return new TextEncoder().encode(JSON.stringify(value)).byteLength <= STUDIO_LIMITS.commandPayloadBytes ? value : void 0;
584
+ } catch {
585
+ return void 0;
586
+ }
587
+ }, schema);
588
+ }
589
+ var ApplyCompositionInput = z7.object({
590
+ projectId: ProjectId,
591
+ ...JournalCommandFields,
592
+ operations: boundedPayload(z7.array(DurableOperation).min(1).max(STUDIO_LIMITS.commandOperations))
593
+ }).strict().refine(isStructuredJournalCommand, "commandId must equal clientId:sequence");
594
+ var ReplaceCompositionInput = z7.object({
595
+ projectId: ProjectId,
596
+ ...JournalCommandFields,
597
+ operationId: OperationId,
598
+ composition: boundedPayload(Composition)
599
+ }).strict().refine(isStructuredJournalCommand, "commandId must equal clientId:sequence");
600
+ var CompositionCommitProjection = z7.object({
601
+ commandId: CommandId,
602
+ projectId: ProjectId,
603
+ compositionId: CompositionId,
604
+ revision: AggregateRevision,
605
+ acknowledgedOperationIds: z7.array(OperationId).max(STUDIO_LIMITS.commandOperations)
606
+ });
607
+ var ProjectSettings = z7.object({ width: z7.number().positive(), height: z7.number().positive() }).strict();
608
+ var CreateProjectInput = z7.object({
609
+ commandId: CommandId,
610
+ name: z7.string().min(1).max(STUDIO_LIMITS.name),
611
+ description: z7.string().max(STUDIO_LIMITS.description).optional(),
612
+ settings: ProjectSettings.optional()
613
+ }).strict();
614
+ var UpdateProjectInput = z7.object({
615
+ projectId: ProjectId,
616
+ ...DurableCommandFields,
617
+ name: z7.string().min(1).max(STUDIO_LIMITS.name).optional(),
618
+ description: z7.string().max(STUDIO_LIMITS.description).optional(),
619
+ settings: ProjectSettings.optional()
620
+ }).strict().refine(
621
+ (value) => value.name !== void 0 || value.description !== void 0 || value.settings !== void 0,
622
+ "at least one project field is required"
623
+ );
624
+ var RemoveProjectInput = z7.object({
625
+ projectId: ProjectId,
626
+ ...DurableCommandFields
627
+ }).strict();
628
+
629
+ // src/assistant.ts
630
+ import { z as z8 } from "zod";
631
+ var AssistantId = z8.string().min(1).max(512);
632
+ var AssistantResolveThreadInput = z8.object({
633
+ conversationKey: AssistantId
634
+ }).strict();
635
+ var AssistantThreadProjection = z8.object({
636
+ threadId: AssistantId
637
+ });
638
+ var AssistantForgetConversationInput = AssistantResolveThreadInput;
639
+ var AssistantForgetConversationProjection = z8.object({
640
+ deleted: z8.boolean()
641
+ });
642
+ var AssistantSendInput = z8.object({
643
+ threadId: AssistantId,
644
+ prompt: z8.string().min(1).max(32e3),
645
+ scope: z8.string().min(1).max(128),
646
+ projectId: ProjectId.optional()
647
+ }).strict();
648
+ var AssistantSendProjection = AssistantThreadProjection;
649
+ var AssistantMessagesInput = z8.object({
650
+ threadId: AssistantId
651
+ }).strict();
652
+ var AssistantMessageProjection = z8.object({
653
+ id: AssistantId,
654
+ role: z8.enum(["user", "assistant", "system", "tool"]),
655
+ parts: z8.array(z8.record(z8.unknown())).max(512),
656
+ text: z8.string().max(1e6).optional(),
657
+ status: z8.string().min(1).max(64),
658
+ createdAt: z8.number()
659
+ });
660
+ var AssistantMessagesProjection = z8.object({
661
+ messages: z8.array(AssistantMessageProjection).max(1e4)
662
+ });
663
+
664
+ // src/compatibility.ts
665
+ import { z as z9 } from "zod";
666
+ var STUDIO_CONTRACT_VERSION = 1;
667
+ var CompatibilityInput = z9.object({
668
+ clientVersion: z9.string().min(1).max(STUDIO_LIMITS.version),
669
+ contractVersion: z9.literal(STUDIO_CONTRACT_VERSION)
670
+ }).strict();
671
+ var CompatibilityProjection = z9.object({
672
+ compatible: z9.boolean(),
673
+ contractVersion: z9.literal(STUDIO_CONTRACT_VERSION),
674
+ minimumClientVersion: z9.string().min(1).max(STUDIO_LIMITS.version)
675
+ });
676
+
677
+ // src/errors.ts
678
+ import { z as z12 } from "zod";
679
+
680
+ // src/library.ts
681
+ import { z as z11 } from "zod";
682
+
683
+ // src/pagination.ts
684
+ import { z as z10 } from "zod";
685
+ var STUDIO_PAGE_MAX = 100;
686
+ var PageInput = z10.object({
687
+ cursor: z10.string().min(1).max(STUDIO_LIMITS.cursor).optional(),
688
+ limit: z10.number().int().positive().max(STUDIO_PAGE_MAX)
689
+ }).strict();
690
+ var pageResult = (item) => z10.object({
691
+ items: z10.array(item).max(STUDIO_PAGE_MAX),
692
+ nextCursor: z10.string().max(STUDIO_LIMITS.cursor).nullable(),
693
+ done: z10.boolean()
694
+ });
695
+
696
+ // src/library.ts
697
+ var ShortText = z11.string().max(STUDIO_LIMITS.shortText);
698
+ var LongText = z11.string().max(STUDIO_LIMITS.longText);
699
+ var Name = z11.string().min(1).max(STUDIO_LIMITS.name);
700
+ var PathSegment = z11.string().min(1).max(STUDIO_LIMITS.pathSegment).regex(/^[^/\\\0]+$/);
701
+ var ContentType = z11.string().min(1).max(STUDIO_LIMITS.contentType);
702
+ var UploadSize = z11.number().int().nonnegative().max(STUDIO_LIMITS.uploadBytes);
703
+ var boundedRecord = (value, maxEntries = 100) => z11.record(z11.string().min(1).max(STUDIO_LIMITS.pathSegment), value).refine((record) => Object.keys(record).length <= maxEntries, `must contain at most ${maxEntries} entries`);
704
+ var JsonPrimitive = z11.union([
705
+ LongText,
706
+ z11.number().finite(),
707
+ z11.boolean(),
708
+ z11.null()
709
+ ]);
710
+ function jsonValueAtDepth(depth) {
711
+ if (depth === 0) return JsonPrimitive;
712
+ const child = jsonValueAtDepth(depth - 1);
713
+ return z11.union([
714
+ JsonPrimitive,
715
+ z11.array(child).max(STUDIO_LIMITS.jsonCollection),
716
+ boundedRecord(child, STUDIO_LIMITS.jsonCollection)
717
+ ]);
718
+ }
719
+ var JsonValue = jsonValueAtDepth(STUDIO_LIMITS.jsonDepth);
720
+ var EmptyInput = z11.object({}).strict();
721
+ var MediaMetadataProjection = z11.object({
722
+ duration: z11.number().optional(),
723
+ width: z11.number(),
724
+ height: z11.number(),
725
+ codec: ShortText,
726
+ frameRate: z11.number(),
727
+ fileSize: z11.number(),
728
+ audioOffset: z11.number()
729
+ });
730
+ var MediaProcessingStatusProjection = z11.object({
731
+ phase: ShortText,
732
+ percent: z11.number().nullable(),
733
+ message: LongText.nullable(),
734
+ error: LongText.nullable()
735
+ });
736
+ var PublicMatteEntryProjection = z11.object({
737
+ status: z11.enum(["pending", "ready", "failed"]),
738
+ geometryUrl: z11.string().url().max(8192).optional(),
739
+ matteUrl: z11.string().url().max(8192).optional(),
740
+ bakeVersion: ShortText.optional(),
741
+ presenceFraction: z11.number().min(0).max(1).optional(),
742
+ window: z11.object({ startSec: z11.number(), endSec: z11.number() }).optional()
743
+ });
744
+ var PublicSubjectTrackEntryProjection = z11.object({
745
+ status: z11.enum(["pending", "ready", "failed"]),
746
+ trackUrl: z11.string().url().max(8192).optional(),
747
+ detectorVersion: ShortText.optional(),
748
+ window: z11.object({ startSec: z11.number(), endSec: z11.number() }).optional(),
749
+ faces: z11.array(z11.object({
750
+ faceId: OpaqueId2,
751
+ bbox: z11.object({ x: z11.number(), y: z11.number(), width: z11.number(), height: z11.number() }),
752
+ speakingShare: z11.number().optional()
753
+ })).max(STUDIO_LIMITS.collection).optional()
754
+ });
755
+ var MediaItemProjection = z11.object({
756
+ id: OpaqueId2,
757
+ name: Name,
758
+ kind: z11.enum(["video", "audio", "image"]),
759
+ assetUrl: z11.string().max(8192),
760
+ metadata: MediaMetadataProjection.nullable(),
761
+ processingStatus: MediaProcessingStatusProjection,
762
+ createdAt: z11.number(),
763
+ proxyUrl: z11.string().max(8192).nullable(),
764
+ proxyStatus: z11.enum(["none", "generating", "ready", "failed"]),
765
+ mediaSource: ShortText.optional(),
766
+ mattes: boundedRecord(PublicMatteEntryProjection).optional(),
767
+ subjectTracks: boundedRecord(PublicSubjectTrackEntryProjection).optional()
768
+ });
769
+ var MediaListInput = PageInput;
770
+ var MediaListProjection = pageResult(MediaItemProjection);
771
+ var MediaIdInput = z11.object({ mediaId: OpaqueId2 }).strict();
772
+ var MediaCommandInput = z11.object({ mediaId: OpaqueId2, commandId: CommandId }).strict();
773
+ var MediaMutationProjection = z11.object({ mediaId: OpaqueId2, commandId: CommandId });
774
+ var MediaUnderstandingProjection = z11.object({
775
+ mediaId: OpaqueId2,
776
+ summary: LongText,
777
+ scenes: z11.array(z11.object({
778
+ startTime: z11.number(),
779
+ endTime: z11.number(),
780
+ description: ShortText
781
+ })).max(STUDIO_LIMITS.collection),
782
+ tags: z11.array(ShortText).max(STUDIO_LIMITS.collection)
783
+ });
784
+ var MediaUnderstandingListInput = PageInput;
785
+ var MediaUnderstandingListProjection = pageResult(MediaUnderstandingProjection);
786
+ var TranscriptProjection = z11.object({
787
+ id: OpaqueId2,
788
+ mediaItemId: OpaqueId2,
789
+ downloadVersion: ShortText.nullable(),
790
+ model: ShortText.nullable(),
791
+ language: z11.string().max(64).nullable(),
792
+ createdAt: z11.number()
793
+ });
794
+ var TranscriptListInput = PageInput.extend({ projectId: ProjectId.optional() }).strict();
795
+ var TranscriptListProjection = pageResult(TranscriptProjection);
796
+ var TranscriptDownloadInput = MediaIdInput;
797
+ var TranscriptDownloadProjection = z11.object({
798
+ transcriptId: OpaqueId2,
799
+ presignedUrl: z11.string().url().max(8192).nullable(),
800
+ model: ShortText.nullable(),
801
+ language: z11.string().max(64).nullable(),
802
+ version: ShortText
803
+ });
804
+ var TranscriptSearchInput = z11.object({
805
+ query: z11.string().min(1).max(STUDIO_LIMITS.query),
806
+ limit: z11.number().int().positive().max(200)
807
+ }).strict();
808
+ var TranscriptSearchProjection = z11.object({
809
+ candidates: z11.array(TranscriptProjection).max(200)
810
+ });
811
+ var CorrectionProjection = z11.object({ key: z11.string().min(1).max(256), text: LongText });
812
+ var CorrectionListInput = PageInput.extend({ projectId: ProjectId }).strict();
813
+ var CorrectionListProjection = pageResult(CorrectionProjection);
814
+ var SaveCorrectionInput = z11.object({
815
+ projectId: ProjectId,
816
+ commandId: CommandId,
817
+ key: z11.string().min(1).max(256),
818
+ text: LongText
819
+ }).strict();
820
+ var RemoveCorrectionInput = z11.object({
821
+ projectId: ProjectId,
822
+ commandId: CommandId,
823
+ key: z11.string().min(1).max(256)
824
+ }).strict();
825
+ var CorrectionMutationProjection = z11.object({ commandId: CommandId, key: z11.string().max(256) });
826
+ var UserSettingsProjection = z11.object({
827
+ activeBrandKitId: OpaqueId2.nullable(),
828
+ enableUnderstanding: z11.boolean()
829
+ });
830
+ var UpdateProcessingSettingsInput = z11.object({
831
+ commandId: CommandId,
832
+ activeBrandKitId: OpaqueId2.nullable().optional(),
833
+ enableUnderstanding: z11.boolean().optional()
834
+ }).strict().refine(
835
+ (value) => value.activeBrandKitId !== void 0 || value.enableUnderstanding !== void 0,
836
+ "at least one processing setting is required"
837
+ );
838
+ var UserSettingsMutationProjection = UserSettingsProjection.extend({ commandId: CommandId });
839
+ var BrandKitProjection = z11.object({
840
+ id: OpaqueId2,
841
+ name: Name,
842
+ description: z11.string().max(STUDIO_LIMITS.description).optional(),
843
+ tagline: ShortText.optional(),
844
+ secondaryTagline: ShortText.optional(),
845
+ colors: z11.object({
846
+ primary: z11.string().max(128),
847
+ secondary: z11.string().max(128),
848
+ accent: z11.string().max(128),
849
+ background: z11.string().max(128),
850
+ text: z11.string().max(128)
851
+ }),
852
+ extraColors: z11.array(z11.object({
853
+ hex: z11.string().max(128),
854
+ label: z11.string().max(128),
855
+ usage: ShortText.optional()
856
+ })).max(64),
857
+ headingFont: z11.object({ fontFamily: z11.string().max(255), fontWeight: z11.number().int().min(1).max(1e3) }),
858
+ bodyFont: z11.object({ fontFamily: z11.string().max(255), fontWeight: z11.number().int().min(1).max(1e3) }),
859
+ voiceGuidelines: LongText,
860
+ syncCaptions: z11.boolean(),
861
+ captionProfile: boundedRecord(JsonValue, 64).optional(),
862
+ createdAt: z11.number(),
863
+ modifiedAt: z11.number()
864
+ });
865
+ var BrandKitListInput = PageInput;
866
+ var BrandKitListProjection = pageResult(BrandKitProjection);
867
+ var UpsertBrandKitInput = z11.object({
868
+ commandId: CommandId,
869
+ brandKit: BrandKitProjection
870
+ }).strict();
871
+ var BrandKitMutationProjection = z11.object({ commandId: CommandId, brandKit: BrandKitProjection });
872
+ var ComponentProjection = z11.object({
873
+ id: OpaqueId2,
874
+ name: Name,
875
+ category: ShortText,
876
+ bundleVersion: z11.string().min(1).max(128),
877
+ integritySha256: z11.string().regex(/^sha256:[a-f0-9]{64}$/)
878
+ });
879
+ var ComponentListInput = PageInput;
880
+ var ComponentListProjection = pageResult(ComponentProjection);
881
+ var ComponentBundlesInput = z11.object({
882
+ componentIds: z11.array(OpaqueId2).min(1).max(STUDIO_LIMITS.componentIds)
883
+ }).strict();
884
+ var ComponentBundleProjection = z11.object({
885
+ componentId: OpaqueId2,
886
+ version: z11.string().min(1).max(128),
887
+ integritySha256: z11.string().regex(/^sha256:[a-f0-9]{64}$/),
888
+ source: z11.string().max(STUDIO_LIMITS.componentBundle)
889
+ });
890
+ var ComponentBundlesProjection = z11.object({
891
+ bundles: z11.array(ComponentBundleProjection).max(STUDIO_LIMITS.componentIds)
892
+ });
893
+ var ProjectRefProjection = z11.object({ id: OpaqueId2, home: z11.enum(["local", "cloud"]) });
894
+ var ConversationProjection = z11.object({
895
+ id: OpaqueId2,
896
+ title: z11.string().max(STUDIO_LIMITS.title),
897
+ project: ProjectRefProjection.nullable(),
898
+ createdAt: z11.number(),
899
+ updatedAt: z11.number(),
900
+ messages: z11.string().max(STUDIO_LIMITS.conversationMessages)
901
+ });
902
+ var ConversationListInput = PageInput.extend({ project: ProjectRefProjection.nullable() }).strict();
903
+ var ConversationListProjection = pageResult(ConversationProjection.omit({ messages: true }));
904
+ var ConversationGetInput = z11.object({
905
+ conversationId: OpaqueId2,
906
+ project: ProjectRefProjection.nullable()
907
+ }).strict();
908
+ var ConversationGetProjection = z11.object({ conversation: ConversationProjection.nullable() });
909
+ var SaveConversationInput = z11.object({
910
+ commandId: CommandId,
911
+ conversation: ConversationProjection
912
+ }).strict();
913
+ var RemoveConversationInput = z11.object({ commandId: CommandId, conversationId: OpaqueId2 }).strict();
914
+ var ConversationMutationProjection = z11.object({ commandId: CommandId, conversationId: OpaqueId2 });
915
+ var RestorePointProjection = z11.object({
916
+ id: OpaqueId2,
917
+ conversationId: OpaqueId2,
918
+ project: ProjectRefProjection,
919
+ label: z11.string().max(STUDIO_LIMITS.title),
920
+ createdAt: z11.number()
921
+ });
922
+ var RestorePointListInput = PageInput.extend({ conversationId: OpaqueId2 }).strict();
923
+ var RestorePointListProjection = pageResult(RestorePointProjection);
924
+ var ForgetRestorePointsInput = z11.object({ commandId: CommandId, conversationId: OpaqueId2 }).strict();
925
+ var RestoreToPointInput = z11.object({
926
+ commandId: CommandId,
927
+ projectId: ProjectId,
928
+ expectedRevision: z11.number().int().nonnegative(),
929
+ conversationId: OpaqueId2,
930
+ restorePointId: OpaqueId2
931
+ }).strict();
932
+ var RestorePointMutationProjection = z11.object({ commandId: CommandId, conversationId: OpaqueId2 });
933
+ var RestorePointCommitProjection = z11.object({
934
+ commandId: CommandId,
935
+ conversationId: OpaqueId2,
936
+ restorePointId: OpaqueId2,
937
+ projectId: ProjectId,
938
+ compositionId: OpaqueId2,
939
+ revision: z11.number().int().nonnegative()
940
+ });
941
+ var RenderJobProjection = z11.object({
942
+ id: OpaqueId2,
943
+ status: ShortText,
944
+ progress: z11.number(),
945
+ hasOutput: z11.boolean(),
946
+ error: LongText.nullable(),
947
+ createdAt: z11.number()
948
+ });
949
+ var RenderListInput = PageInput.extend({ projectId: ProjectId }).strict();
950
+ var RenderListProjection = pageResult(RenderJobProjection);
951
+ var RenderPresignInput = z11.object({ renderId: OpaqueId2 }).strict();
952
+ var RenderPresignProjection = z11.object({ url: z11.string().url().max(8192).nullable() });
953
+ var CreateRenderInput = z11.object({
954
+ projectId: ProjectId,
955
+ commandId: CommandId,
956
+ expectedRevision: z11.number().int().nonnegative(),
957
+ format: z11.object({
958
+ aspectRatio: z11.string().max(64),
959
+ resolution: z11.enum(["fhd", "4k"])
960
+ }).optional()
961
+ }).strict();
962
+ var CreateRenderProjection = z11.object({
963
+ commandId: CommandId,
964
+ renderId: OpaqueId2,
965
+ revision: z11.number().int().nonnegative()
966
+ });
967
+ var CancelRenderInput = z11.object({
968
+ projectId: ProjectId,
969
+ renderId: OpaqueId2,
970
+ commandId: CommandId
971
+ }).strict();
972
+ var CancelRenderProjection = z11.object({ commandId: CommandId, renderId: OpaqueId2 });
973
+ var MediaSearchInput = z11.object({
974
+ query: z11.string().min(1).max(STUDIO_LIMITS.query),
975
+ limit: z11.number().int().positive().max(25)
976
+ }).strict();
977
+ var MediaSearchHitProjection = z11.object({
978
+ mediaId: OpaqueId2,
979
+ name: Name,
980
+ score: z11.number(),
981
+ startSec: z11.number(),
982
+ endSec: z11.number()
983
+ });
984
+ var MediaSearchProjection = z11.object({
985
+ results: z11.array(MediaSearchHitProjection).max(25),
986
+ indexing: z11.boolean()
987
+ });
988
+ var TimelineWordInput = z11.object({
989
+ text: ShortText,
990
+ timelineStart: z11.number(),
991
+ timelineEnd: z11.number(),
992
+ clipId: OpaqueId2,
993
+ poolItemId: OpaqueId2,
994
+ sourceStart: z11.number(),
995
+ sourceEnd: z11.number(),
996
+ speakerId: OpaqueId2.nullable()
997
+ });
998
+ var AnalyzeTimelineInput = z11.object({
999
+ words: z11.array(TimelineWordInput).max(STUDIO_LIMITS.timelineWords)
1000
+ }).strict();
1001
+ var AnalyzeTimelineProjection = z11.object({
1002
+ fillers: z11.array(z11.number()).max(STUDIO_LIMITS.timelineWords),
1003
+ silenceGaps: z11.array(z11.number()).max(STUDIO_LIMITS.timelineWords),
1004
+ emphasis: z11.array(z11.number()).max(STUDIO_LIMITS.timelineWords),
1005
+ model: ShortText
1006
+ });
1007
+ var SourceWindow = z11.object({
1008
+ startSec: z11.number().nonnegative(),
1009
+ endSec: z11.number().positive()
1010
+ }).refine((window) => window.endSec > window.startSec, "endSec must be greater than startSec");
1011
+ var MediaFactKind = z11.enum(["subjectTrack", "matte"]);
1012
+ var MediaFactInput = z11.object({
1013
+ mediaId: OpaqueId2,
1014
+ kind: MediaFactKind,
1015
+ window: SourceWindow
1016
+ }).strict();
1017
+ var MediaFactResolutionProjection = z11.object({
1018
+ kind: MediaFactKind,
1019
+ scope: SourceWindow,
1020
+ state: z11.enum(["pending", "ready", "failed", "available", "unavailable"]),
1021
+ fact: z11.object({
1022
+ status: z11.enum(["pending", "ready", "failed"]),
1023
+ summary: boundedRecord(z11.number(), 100).optional(),
1024
+ readyAt: z11.number().optional(),
1025
+ error: z11.object({
1026
+ code: ShortText,
1027
+ message: LongText
1028
+ }).optional()
1029
+ }).optional(),
1030
+ offer: z11.object({ quotedUsd: z11.number(), available: z11.boolean(), reason: ShortText.optional() }).optional()
1031
+ });
1032
+ var PurchaseMediaFactInput = MediaFactInput.extend({ commandId: CommandId });
1033
+ var MediaFactPurchaseProjection = z11.object({
1034
+ commandId: CommandId,
1035
+ factId: OpaqueId2,
1036
+ status: z11.enum(["pending", "ready", "failed"]),
1037
+ quotedUsd: z11.number()
1038
+ });
1039
+ var ResourceSearchInput = z11.object({
1040
+ query: z11.string().max(STUDIO_LIMITS.query),
1041
+ kind: z11.enum(["video", "photo", "gif", "sfx"]),
1042
+ limit: z11.number().int().positive().max(50)
1043
+ }).strict();
1044
+ var ResourceCandidateProjection = z11.object({
1045
+ id: OpaqueId2,
1046
+ provider: ShortText,
1047
+ kind: ShortText,
1048
+ thumbnail: z11.string().max(8192),
1049
+ previewUrl: z11.string().max(8192),
1050
+ downloadUrl: z11.string().max(8192).optional(),
1051
+ duration: z11.number().optional(),
1052
+ width: z11.number().optional(),
1053
+ height: z11.number().optional(),
1054
+ author: ShortText,
1055
+ authorUrl: z11.string().max(8192).optional(),
1056
+ license: ShortText.optional()
1057
+ });
1058
+ var ResourceSearchProjection = z11.object({ candidates: z11.array(ResourceCandidateProjection).max(50) });
1059
+ var DropboxResolveInput = z11.object({
1060
+ url: z11.string().url().max(8192),
1061
+ path: z11.string().max(1024).optional()
1062
+ }).strict();
1063
+ var DropboxEntryProjection = z11.object({
1064
+ type: z11.enum(["file", "folder"]),
1065
+ name: PathSegment,
1066
+ size: UploadSize,
1067
+ path: z11.string().max(1024)
1068
+ });
1069
+ var DropboxResolveProjection = z11.discriminatedUnion("type", [
1070
+ z11.object({ type: z11.literal("file"), name: PathSegment, size: UploadSize, downloadUrl: z11.string().url().max(8192) }),
1071
+ z11.object({ type: z11.literal("folder"), name: PathSegment, entries: z11.array(DropboxEntryProjection).max(STUDIO_LIMITS.collection) })
1072
+ ]);
1073
+ var DropboxImportFileInput = z11.object({
1074
+ commandId: CommandId,
1075
+ filename: PathSegment,
1076
+ size: UploadSize,
1077
+ contentType: ContentType,
1078
+ source: z11.discriminatedUnion("kind", [
1079
+ z11.object({ kind: z11.literal("url"), url: z11.string().url().max(8192) }),
1080
+ z11.object({ kind: z11.literal("dropbox"), shareUrl: z11.string().url().max(8192), path: z11.string().max(1024) })
1081
+ ])
1082
+ }).strict();
1083
+ var DropboxImportFileProjection = z11.object({ commandId: CommandId, mediaId: OpaqueId2 });
1084
+ var UploadHeaders = boundedRecord(z11.string().max(8192), 32);
1085
+ var UploadPlan = z11.discriminatedUnion("kind", [
1086
+ z11.object({ kind: z11.literal("single"), uploadUrl: z11.string().url().max(8192) }),
1087
+ z11.object({
1088
+ kind: z11.literal("multipart"),
1089
+ partSize: z11.number().int().positive(),
1090
+ minimumPartSize: z11.number().int().positive(),
1091
+ maximumParts: z11.number().int().positive().max(1e4),
1092
+ resumable: z11.boolean(),
1093
+ partUrls: z11.array(z11.object({
1094
+ partNumber: z11.number().int().positive(),
1095
+ uploadUrl: z11.string().url().max(8192)
1096
+ })).min(1).max(1e4)
1097
+ })
1098
+ ]);
1099
+ var UploadBeginInput = z11.object({
1100
+ commandId: CommandId,
1101
+ uploadRequestId: OpaqueId2,
1102
+ filename: PathSegment,
1103
+ contentType: ContentType,
1104
+ size: UploadSize,
1105
+ projectId: ProjectId.optional()
1106
+ }).strict();
1107
+ var UploadBeginProjection = z11.object({
1108
+ commandId: CommandId,
1109
+ uploadRequestId: OpaqueId2,
1110
+ mediaId: OpaqueId2,
1111
+ expiresAt: z11.number(),
1112
+ requiredHeaders: UploadHeaders,
1113
+ plan: UploadPlan
1114
+ });
1115
+ var UploadFinalizeInput = z11.object({
1116
+ commandId: CommandId,
1117
+ uploadRequestId: OpaqueId2,
1118
+ mediaId: OpaqueId2
1119
+ }).strict();
1120
+ var UploadFinalizeProjection = z11.object({
1121
+ commandId: CommandId,
1122
+ uploadRequestId: OpaqueId2,
1123
+ mediaId: OpaqueId2
1124
+ });
1125
+ var TemplateProjection = z11.object({
1126
+ id: OpaqueId2,
1127
+ content: z11.string().max(STUDIO_LIMITS.templateContent),
1128
+ updatedAt: z11.number()
1129
+ });
1130
+ var TemplateListInput = PageInput;
1131
+ var TemplateListProjection = pageResult(TemplateProjection);
1132
+ var TemplateGetInput = z11.object({ templateId: OpaqueId2 }).strict();
1133
+ var TemplateGetProjection = z11.object({ template: TemplateProjection.nullable() });
1134
+ var TemplateSaveInput = z11.object({
1135
+ commandId: CommandId,
1136
+ template: TemplateProjection.omit({ updatedAt: true })
1137
+ }).strict();
1138
+ var TemplateRemoveInput = z11.object({ commandId: CommandId, templateId: OpaqueId2 }).strict();
1139
+ var TemplateMutationProjection = z11.object({ commandId: CommandId, templateId: OpaqueId2 });
1140
+ var ProjectResourceIdentity = {
1141
+ projectId: ProjectId,
1142
+ resourceId: OpaqueId2
1143
+ };
1144
+ var ProjectResourceBeginUploadInput = z11.object({
1145
+ commandId: CommandId,
1146
+ ...ProjectResourceIdentity,
1147
+ name: PathSegment,
1148
+ contentType: ContentType,
1149
+ size: UploadSize
1150
+ }).strict();
1151
+ var ProjectResourceBeginUploadProjection = z11.object({
1152
+ commandId: CommandId,
1153
+ ...ProjectResourceIdentity,
1154
+ expiresAt: z11.number(),
1155
+ requiredHeaders: UploadHeaders,
1156
+ plan: UploadPlan
1157
+ });
1158
+ var ProjectResourceCommandInput = z11.object({
1159
+ commandId: CommandId,
1160
+ ...ProjectResourceIdentity
1161
+ }).strict();
1162
+ var ProjectResourceFinalizeUploadInput = ProjectResourceCommandInput;
1163
+ var ProjectResourceMutationProjection = z11.object({
1164
+ commandId: CommandId,
1165
+ ...ProjectResourceIdentity
1166
+ });
1167
+ var ProjectResourceDeliveryInput = z11.object(ProjectResourceIdentity).strict();
1168
+ var ProjectResourceDeliveryProjection = z11.object({
1169
+ url: z11.string().url().max(8192),
1170
+ expiresAt: z11.number()
1171
+ });
1172
+
1173
+ // src/errors.ts
1174
+ var StudioErrorCode = z12.enum([
1175
+ "unauthenticated",
1176
+ "forbidden",
1177
+ "not_found",
1178
+ "validation_failed",
1179
+ "stale_revision",
1180
+ "conflict",
1181
+ "idempotency_conflict",
1182
+ "rate_limited",
1183
+ "unavailable",
1184
+ "internal"
1185
+ ]);
1186
+ var StudioError = z12.object({
1187
+ code: StudioErrorCode,
1188
+ message: z12.string().min(1).max(STUDIO_LIMITS.longText),
1189
+ retryable: z12.boolean(),
1190
+ details: z12.record(z12.string().min(1).max(STUDIO_LIMITS.pathSegment), JsonValue).refine((record) => Object.keys(record).length <= STUDIO_LIMITS.jsonCollection).optional()
1191
+ });
1192
+ var StudioErrorEnvelope = z12.object({ error: StudioError });
1193
+
1194
+ // src/fixtures.ts
1195
+ function fixtures(validInput, invalidInput, validResult, invalidResult) {
1196
+ return Object.freeze({
1197
+ validInputs: Object.freeze([validInput]),
1198
+ invalidInputs: Object.freeze([invalidInput]),
1199
+ // Public result projections are additive. Every positive fixture proves it.
1200
+ validResults: Object.freeze([{ ...validResult, additiveFixtureField: "accepted" }]),
1201
+ invalidResults: Object.freeze([invalidResult])
1202
+ });
1203
+ }
1204
+ var pageInput = { limit: 10 };
1205
+ var invalidPageInput = { limit: 0 };
1206
+ var emptyPage = { items: [], nextCursor: null, done: true };
1207
+ var invalidPage = { items: "not-an-array", nextCursor: null, done: true };
1208
+ var composition = { v: 1, format: { aspectRatio: "16:9" }, tracks: [] };
1209
+ var project = { id: "project", name: "Project", createdAt: 1, updatedAt: 2, revision: 3 };
1210
+ var compositionCommit = {
1211
+ commandId: "client:1",
1212
+ projectId: "project",
1213
+ compositionId: "composition",
1214
+ revision: 3,
1215
+ acknowledgedOperationIds: ["operation"]
1216
+ };
1217
+ var media = {
1218
+ id: "media",
1219
+ name: "Clip",
1220
+ kind: "video",
1221
+ assetUrl: "https://media.example.test/clip.mp4",
1222
+ metadata: null,
1223
+ processingStatus: { phase: "complete", percent: 100, message: null, error: null },
1224
+ createdAt: 1,
1225
+ proxyUrl: null,
1226
+ proxyStatus: "none"
1227
+ };
1228
+ var transcript = {
1229
+ id: "transcript",
1230
+ mediaItemId: "media",
1231
+ downloadVersion: "v1",
1232
+ model: "model",
1233
+ language: "en",
1234
+ createdAt: 1
1235
+ };
1236
+ var brandKit = {
1237
+ id: "brand",
1238
+ name: "Brand",
1239
+ colors: { primary: "#111111", secondary: "#222222", accent: "#333333", background: "#ffffff", text: "#000000" },
1240
+ extraColors: [],
1241
+ headingFont: { fontFamily: "Inter", fontWeight: 700 },
1242
+ bodyFont: { fontFamily: "Inter", fontWeight: 400 },
1243
+ voiceGuidelines: "Clear and direct.",
1244
+ syncCaptions: true,
1245
+ createdAt: 1,
1246
+ modifiedAt: 2
1247
+ };
1248
+ var conversation = {
1249
+ id: "conversation",
1250
+ title: "Edit",
1251
+ project: { id: "project", home: "cloud" },
1252
+ createdAt: 1,
1253
+ updatedAt: 2,
1254
+ messages: "[]"
1255
+ };
1256
+ var integrity = `sha256:${"a".repeat(64)}`;
1257
+ var singleUploadPlan = { kind: "single", uploadUrl: "https://upload.example.test/object" };
1258
+ var STUDIO_OPERATION_FIXTURES = Object.freeze({
1259
+ compatibility: fixtures(
1260
+ { clientVersion: "1.0.0", contractVersion: 1 },
1261
+ { clientVersion: "1.0.0", contractVersion: 2 },
1262
+ { compatible: true, contractVersion: 1, minimumClientVersion: "1.0.0" },
1263
+ { compatible: true, contractVersion: 2, minimumClientVersion: "1.0.0" }
1264
+ ),
1265
+ sessionCurrent: fixtures(
1266
+ {},
1267
+ { unexpectedField: true },
1268
+ { user: null, activeOrg: null },
1269
+ { user: "not-a-user", activeOrg: null }
1270
+ ),
1271
+ assistantResolveThread: fixtures(
1272
+ { conversationKey: "conversation" },
1273
+ { conversationKey: "" },
1274
+ { threadId: "thread" },
1275
+ { threadId: "" }
1276
+ ),
1277
+ assistantForgetConversation: fixtures(
1278
+ { conversationKey: "conversation" },
1279
+ { conversationKey: "" },
1280
+ { deleted: true },
1281
+ { deleted: "yes" }
1282
+ ),
1283
+ assistantSend: fixtures(
1284
+ { threadId: "thread", prompt: "Tighten the opening.", scope: "editor", projectId: "project" },
1285
+ { threadId: "thread", prompt: "", scope: "editor" },
1286
+ { threadId: "thread" },
1287
+ { threadId: "" }
1288
+ ),
1289
+ assistantMessages: fixtures(
1290
+ { threadId: "thread" },
1291
+ { threadId: "" },
1292
+ {
1293
+ messages: [{
1294
+ id: "message",
1295
+ role: "assistant",
1296
+ parts: [{ type: "text", text: "Done." }],
1297
+ text: "Done.",
1298
+ status: "complete",
1299
+ createdAt: 1
1300
+ }]
1301
+ },
1302
+ { messages: [{ id: "message", role: "assistant", parts: [], status: "complete" }] }
1303
+ ),
1304
+ projectsList: fixtures(
1305
+ pageInput,
1306
+ invalidPageInput,
1307
+ emptyPage,
1308
+ invalidPage
1309
+ ),
1310
+ projectsSnapshot: fixtures(
1311
+ { projectId: "project" },
1312
+ { projectId: "" },
1313
+ { project, activeComposition: { id: "composition", composition }, revision: 3 },
1314
+ { project, activeComposition: null, revision: -1 }
1315
+ ),
1316
+ projectsCreate: fixtures(
1317
+ { commandId: "project:create", name: "Project" },
1318
+ { commandId: "project:create", name: "" },
1319
+ { commandId: "project:create", project, revision: 3 },
1320
+ { commandId: "project:create", project, revision: -1 }
1321
+ ),
1322
+ projectsUpdate: fixtures(
1323
+ { commandId: "project:update", projectId: "project", expectedRevision: 2, name: "Renamed" },
1324
+ { commandId: "project:update", projectId: "project", expectedRevision: 2 },
1325
+ { commandId: "project:update", project, revision: 3 },
1326
+ { commandId: "project:update", project, revision: -1 }
1327
+ ),
1328
+ projectsRemove: fixtures(
1329
+ { commandId: "project:remove", projectId: "project", expectedRevision: 3 },
1330
+ { commandId: "project:remove", projectId: "project", expectedRevision: -1 },
1331
+ { commandId: "project:remove", projectId: "project", revision: 4 },
1332
+ { commandId: "project:remove", projectId: "project", revision: -1 }
1333
+ ),
1334
+ compositionsApply: fixtures(
1335
+ {
1336
+ projectId: "project",
1337
+ commandId: "client:1",
1338
+ clientId: "client",
1339
+ sequence: 1,
1340
+ expectedRevision: 2,
1341
+ operations: [{ operationId: "operation", operation: { type: "clip.remove", clipId: "clip" } }]
1342
+ },
1343
+ {
1344
+ projectId: "project",
1345
+ commandId: "different:1",
1346
+ clientId: "client",
1347
+ sequence: 1,
1348
+ expectedRevision: 2,
1349
+ operations: [{ operationId: "operation", operation: { type: "clip.remove", clipId: "clip" } }]
1350
+ },
1351
+ compositionCommit,
1352
+ { ...compositionCommit, revision: -1 }
1353
+ ),
1354
+ compositionsReplace: fixtures(
1355
+ {
1356
+ projectId: "project",
1357
+ commandId: "client:2",
1358
+ clientId: "client",
1359
+ sequence: 2,
1360
+ expectedRevision: 2,
1361
+ operationId: "replacement",
1362
+ composition
1363
+ },
1364
+ {
1365
+ projectId: "project",
1366
+ commandId: "client:2",
1367
+ clientId: "client",
1368
+ sequence: 0,
1369
+ expectedRevision: 2,
1370
+ operationId: "replacement",
1371
+ composition
1372
+ },
1373
+ { ...compositionCommit, commandId: "client:2", acknowledgedOperationIds: ["replacement"] },
1374
+ { ...compositionCommit, commandId: "client:2", acknowledgedOperationIds: [1] }
1375
+ ),
1376
+ mediaList: fixtures(
1377
+ pageInput,
1378
+ invalidPageInput,
1379
+ { ...emptyPage, items: [media] },
1380
+ invalidPage
1381
+ ),
1382
+ mediaRemove: fixtures(
1383
+ { mediaId: "media", commandId: "media:remove" },
1384
+ { mediaId: "", commandId: "media:remove" },
1385
+ { mediaId: "media", commandId: "media:remove" },
1386
+ { mediaId: "media" }
1387
+ ),
1388
+ mediaCancelProcessing: fixtures(
1389
+ { mediaId: "media", commandId: "media:cancel" },
1390
+ { mediaId: "media" },
1391
+ { mediaId: "media", commandId: "media:cancel" },
1392
+ { commandId: "media:cancel" }
1393
+ ),
1394
+ mediaReprocess: fixtures(
1395
+ { mediaId: "media", commandId: "media:reprocess" },
1396
+ { mediaId: "", commandId: "media:reprocess" },
1397
+ { mediaId: "media", commandId: "media:reprocess" },
1398
+ { mediaId: "media", commandId: "" }
1399
+ ),
1400
+ mediaListUnderstanding: fixtures(
1401
+ pageInput,
1402
+ invalidPageInput,
1403
+ { ...emptyPage, items: [{ mediaId: "media", summary: "A speaker.", scenes: [], tags: ["speaker"] }] },
1404
+ invalidPage
1405
+ ),
1406
+ mediaSearch: fixtures(
1407
+ { query: "speaker at desk", limit: 25 },
1408
+ { query: "speaker at desk", limit: 26 },
1409
+ { results: [{ mediaId: "media", name: "Clip", score: 0.9, startSec: 0, endSec: 2 }], indexing: false },
1410
+ { results: [], indexing: "no" }
1411
+ ),
1412
+ mediaAnalyzeTimeline: fixtures(
1413
+ { words: [{ text: "Hello", timelineStart: 0, timelineEnd: 1, clipId: "clip", poolItemId: "media", sourceStart: 0, sourceEnd: 1, speakerId: null }] },
1414
+ { words: "not-an-array" },
1415
+ { fillers: [], silenceGaps: [], emphasis: [0], model: "analysis-v1" },
1416
+ { fillers: [], silenceGaps: [], emphasis: [], model: 1 }
1417
+ ),
1418
+ mediaFacts: fixtures(
1419
+ { mediaId: "media", kind: "matte", window: { startSec: 0, endSec: 2 } },
1420
+ { mediaId: "media", kind: "matte", window: { startSec: 2, endSec: 1 } },
1421
+ { kind: "matte", scope: { startSec: 0, endSec: 2 }, state: "ready", fact: { status: "ready", readyAt: 2 } },
1422
+ { kind: "matte", scope: { startSec: 0, endSec: 2 }, state: "unknown" }
1423
+ ),
1424
+ mediaPurchaseFact: fixtures(
1425
+ { commandId: "fact:purchase", mediaId: "media", kind: "subjectTrack", window: { startSec: 0, endSec: 2 } },
1426
+ { commandId: "fact:purchase", mediaId: "media", kind: "subjectTrack", window: { startSec: -1, endSec: 2 } },
1427
+ { commandId: "fact:purchase", factId: "fact", status: "pending", quotedUsd: 0.01 },
1428
+ { commandId: "fact:purchase", factId: "fact", status: "unknown", quotedUsd: 0.01 }
1429
+ ),
1430
+ transcriptsList: fixtures(
1431
+ { projectId: "project", limit: 10 },
1432
+ { projectId: "project", limit: 0 },
1433
+ { ...emptyPage, items: [transcript] },
1434
+ invalidPage
1435
+ ),
1436
+ transcriptsGetDownload: fixtures(
1437
+ { mediaId: "media" },
1438
+ { mediaId: "" },
1439
+ { transcriptId: "transcript", presignedUrl: "https://media.example.test/transcript.json", model: "model", language: "en", version: "v1" },
1440
+ { transcriptId: "", presignedUrl: null, model: null, language: null, version: "v1" }
1441
+ ),
1442
+ transcriptsSearch: fixtures(
1443
+ { query: "launch date", limit: 10 },
1444
+ { query: "", limit: 10 },
1445
+ { candidates: [transcript] },
1446
+ { candidates: "not-an-array" }
1447
+ ),
1448
+ correctionsList: fixtures(
1449
+ { projectId: "project", limit: 10 },
1450
+ { projectId: "", limit: 10 },
1451
+ { ...emptyPage, items: [{ key: "Acme", text: "ACME" }] },
1452
+ invalidPage
1453
+ ),
1454
+ correctionsSave: fixtures(
1455
+ { projectId: "project", commandId: "correction:save", key: "Acme", text: "ACME" },
1456
+ { projectId: "project", commandId: "correction:save", key: "", text: "ACME" },
1457
+ { commandId: "correction:save", key: "Acme" },
1458
+ { commandId: "correction:save" }
1459
+ ),
1460
+ correctionsRemove: fixtures(
1461
+ { projectId: "project", commandId: "correction:remove", key: "Acme" },
1462
+ { projectId: "project", commandId: "correction:remove", key: "" },
1463
+ { commandId: "correction:remove", key: "Acme" },
1464
+ { commandId: "correction:remove", key: 1 }
1465
+ ),
1466
+ settingsGetUser: fixtures(
1467
+ {},
1468
+ { unexpectedField: true },
1469
+ { activeBrandKitId: null, enableUnderstanding: true },
1470
+ { activeBrandKitId: null }
1471
+ ),
1472
+ settingsUpdateProcessing: fixtures(
1473
+ { commandId: "settings:update", enableUnderstanding: true },
1474
+ { commandId: "settings:update" },
1475
+ { commandId: "settings:update", activeBrandKitId: null, enableUnderstanding: true },
1476
+ { commandId: "settings:update", activeBrandKitId: null }
1477
+ ),
1478
+ brandKitsList: fixtures(
1479
+ pageInput,
1480
+ invalidPageInput,
1481
+ { ...emptyPage, items: [brandKit] },
1482
+ invalidPage
1483
+ ),
1484
+ brandKitsUpsert: fixtures(
1485
+ { commandId: "brand:upsert", brandKit },
1486
+ { commandId: "brand:upsert", brandKit: { ...brandKit, name: "" } },
1487
+ { commandId: "brand:upsert", brandKit },
1488
+ { commandId: "brand:upsert" }
1489
+ ),
1490
+ componentsList: fixtures(
1491
+ pageInput,
1492
+ invalidPageInput,
1493
+ { ...emptyPage, items: [{ id: "component", name: "Card", category: "overlay", bundleVersion: "v1", integritySha256: integrity }] },
1494
+ invalidPage
1495
+ ),
1496
+ componentsGetBundles: fixtures(
1497
+ { componentIds: ["component"] },
1498
+ { componentIds: [] },
1499
+ { bundles: [{ componentId: "component", version: "v1", integritySha256: integrity, source: "export default {}" }] },
1500
+ { bundles: [{ componentId: "component", version: "v1", integritySha256: "sha256:bad", source: "export default {}" }] }
1501
+ ),
1502
+ conversationsList: fixtures(
1503
+ { project: { id: "project", home: "cloud" }, limit: 10 },
1504
+ { project: { id: "project", home: "remote" }, limit: 10 },
1505
+ { ...emptyPage, items: [{ id: "conversation", title: "Edit", project: { id: "project", home: "cloud" }, createdAt: 1, updatedAt: 2 }] },
1506
+ invalidPage
1507
+ ),
1508
+ conversationsGet: fixtures(
1509
+ { conversationId: "conversation", project: { id: "project", home: "cloud" } },
1510
+ { conversationId: "", project: { id: "project", home: "cloud" } },
1511
+ { conversation },
1512
+ { conversation: { ...conversation, id: "" } }
1513
+ ),
1514
+ conversationsSave: fixtures(
1515
+ { commandId: "conversation:save", conversation },
1516
+ { commandId: "conversation:save", conversation: { ...conversation, id: "" } },
1517
+ { commandId: "conversation:save", conversationId: "conversation" },
1518
+ { commandId: "conversation:save" }
1519
+ ),
1520
+ conversationsAdopt: fixtures(
1521
+ { commandId: "conversation:adopt", conversation },
1522
+ { commandId: "conversation:adopt", conversation: { ...conversation, project: { id: "project", home: "remote" } } },
1523
+ { commandId: "conversation:adopt", conversationId: "conversation" },
1524
+ { conversationId: "conversation" }
1525
+ ),
1526
+ conversationsRemove: fixtures(
1527
+ { commandId: "conversation:remove", conversationId: "conversation" },
1528
+ { commandId: "conversation:remove", conversationId: "" },
1529
+ { commandId: "conversation:remove", conversationId: "conversation" },
1530
+ { commandId: "conversation:remove" }
1531
+ ),
1532
+ restorePointsList: fixtures(
1533
+ { conversationId: "conversation", limit: 10 },
1534
+ { conversationId: "", limit: 10 },
1535
+ { ...emptyPage, items: [{ id: "restore", conversationId: "conversation", project: { id: "project", home: "cloud" }, label: "Before edit", createdAt: 1 }] },
1536
+ invalidPage
1537
+ ),
1538
+ restorePointsForget: fixtures(
1539
+ { commandId: "restore:forget", conversationId: "conversation" },
1540
+ { commandId: "restore:forget", conversationId: "" },
1541
+ { commandId: "restore:forget", conversationId: "conversation" },
1542
+ { conversationId: "conversation" }
1543
+ ),
1544
+ restorePointsRestore: fixtures(
1545
+ { commandId: "restore:apply", projectId: "project", expectedRevision: 3, conversationId: "conversation", restorePointId: "restore" },
1546
+ { commandId: "restore:apply", projectId: "project", expectedRevision: -1, conversationId: "conversation", restorePointId: "restore" },
1547
+ { commandId: "restore:apply", conversationId: "conversation", restorePointId: "restore", projectId: "project", compositionId: "composition", revision: 4 },
1548
+ { commandId: "restore:apply", conversationId: "conversation", restorePointId: "restore", projectId: "project", compositionId: "composition", revision: -1 }
1549
+ ),
1550
+ rendersList: fixtures(
1551
+ { projectId: "project", limit: 10 },
1552
+ { projectId: "", limit: 10 },
1553
+ { ...emptyPage, items: [{ id: "render", status: "complete", progress: 1, hasOutput: true, error: null, createdAt: 1 }] },
1554
+ invalidPage
1555
+ ),
1556
+ rendersPresignOutput: fixtures(
1557
+ { renderId: "render" },
1558
+ { renderId: "" },
1559
+ { url: "https://media.example.test/render.mp4" },
1560
+ { url: "not-a-url" }
1561
+ ),
1562
+ rendersCreate: fixtures(
1563
+ { projectId: "project", commandId: "render:create", expectedRevision: 3, format: { aspectRatio: "16:9", resolution: "fhd" } },
1564
+ { projectId: "project", commandId: "render:create", expectedRevision: -1 },
1565
+ { commandId: "render:create", renderId: "render", revision: 4 },
1566
+ { commandId: "render:create", renderId: "render", revision: -1 }
1567
+ ),
1568
+ rendersCancel: fixtures(
1569
+ { projectId: "project", renderId: "render", commandId: "render:cancel" },
1570
+ { projectId: "project", renderId: "", commandId: "render:cancel" },
1571
+ { commandId: "render:cancel", renderId: "render" },
1572
+ { commandId: "render:cancel", renderId: "" }
1573
+ ),
1574
+ uploadsBegin: fixtures(
1575
+ { commandId: "upload:begin", uploadRequestId: "request", filename: "clip.mp4", contentType: "video/mp4", size: 1024 },
1576
+ { commandId: "upload:begin", uploadRequestId: "request", filename: "../clip.mp4", contentType: "video/mp4", size: 1024 },
1577
+ { commandId: "upload:begin", uploadRequestId: "request", mediaId: "media", expiresAt: 10, requiredHeaders: { "content-type": "video/mp4" }, plan: singleUploadPlan },
1578
+ { commandId: "upload:begin", uploadRequestId: "request", mediaId: "media", expiresAt: 10, requiredHeaders: {}, plan: { kind: "single", uploadUrl: "not-a-url" } }
1579
+ ),
1580
+ uploadsFinalize: fixtures(
1581
+ { commandId: "upload:finalize", uploadRequestId: "request", mediaId: "media" },
1582
+ { commandId: "upload:finalize", uploadRequestId: "request", mediaId: "media", unexpectedField: true },
1583
+ { commandId: "upload:finalize", uploadRequestId: "request", mediaId: "media" },
1584
+ { commandId: "upload:finalize", uploadRequestId: "request" }
1585
+ ),
1586
+ templatesList: fixtures(
1587
+ pageInput,
1588
+ invalidPageInput,
1589
+ { ...emptyPage, items: [{ id: "template", content: '{"v":1}', updatedAt: 1 }] },
1590
+ invalidPage
1591
+ ),
1592
+ templatesGet: fixtures(
1593
+ { templateId: "template" },
1594
+ { templateId: "" },
1595
+ { template: { id: "template", content: '{"v":1}', updatedAt: 1 } },
1596
+ { template: { id: "", content: "{}", updatedAt: 1 } }
1597
+ ),
1598
+ templatesSave: fixtures(
1599
+ { commandId: "template:save", template: { id: "template", content: '{"v":1}' } },
1600
+ { commandId: "template:save", template: { id: "", content: '{"v":1}' } },
1601
+ { commandId: "template:save", templateId: "template" },
1602
+ { commandId: "template:save" }
1603
+ ),
1604
+ templatesRemove: fixtures(
1605
+ { commandId: "template:remove", templateId: "template" },
1606
+ { commandId: "template:remove", templateId: "" },
1607
+ { commandId: "template:remove", templateId: "template" },
1608
+ { templateId: "template" }
1609
+ ),
1610
+ projectResourcesBeginUpload: fixtures(
1611
+ { commandId: "resource:begin", projectId: "project", resourceId: "resource", name: "font.woff2", contentType: "font/woff2", size: 1024 },
1612
+ { commandId: "resource:begin", projectId: "project", resourceId: "resource", name: "../font.woff2", contentType: "font/woff2", size: 1024 },
1613
+ { commandId: "resource:begin", projectId: "project", resourceId: "resource", expiresAt: 10, requiredHeaders: {}, plan: singleUploadPlan },
1614
+ { commandId: "resource:begin", projectId: "project", resourceId: "resource", expiresAt: 10, requiredHeaders: {}, plan: { kind: "single", uploadUrl: "not-a-url" } }
1615
+ ),
1616
+ projectResourcesFinalizeUpload: fixtures(
1617
+ { commandId: "resource:finalize", projectId: "project", resourceId: "resource" },
1618
+ { commandId: "resource:finalize", projectId: "project", resourceId: "resource", unexpectedField: true },
1619
+ { commandId: "resource:finalize", projectId: "project", resourceId: "resource" },
1620
+ { commandId: "resource:finalize", projectId: "project" }
1621
+ ),
1622
+ projectResourcesRemove: fixtures(
1623
+ { commandId: "resource:remove", projectId: "project", resourceId: "resource" },
1624
+ { commandId: "resource:remove", projectId: "", resourceId: "resource" },
1625
+ { commandId: "resource:remove", projectId: "project", resourceId: "resource" },
1626
+ { commandId: "resource:remove", projectId: "project" }
1627
+ ),
1628
+ projectResourcesGetDelivery: fixtures(
1629
+ { projectId: "project", resourceId: "resource" },
1630
+ { projectId: "project", resourceId: "" },
1631
+ { url: "https://media.example.test/resource", expiresAt: 10 },
1632
+ { url: "not-a-url", expiresAt: 10 }
1633
+ ),
1634
+ resourcesSearch: fixtures(
1635
+ { query: "cinematic", kind: "video", limit: 50 },
1636
+ { query: "cinematic", kind: "video", limit: 51 },
1637
+ { candidates: [{ id: "candidate", provider: "catalog", kind: "video", thumbnail: "https://media.example.test/thumb.jpg", previewUrl: "https://media.example.test/preview.mp4", author: "Creator" }] },
1638
+ { candidates: "not-an-array" }
1639
+ ),
1640
+ importsResolveDropbox: fixtures(
1641
+ { url: "https://dropbox.com/scl/fi/example/clip.mp4" },
1642
+ { url: "not-a-url" },
1643
+ { type: "file", name: "clip.mp4", size: 1024, downloadUrl: "https://media.example.test/clip.mp4" },
1644
+ { type: "file", name: "../clip.mp4", size: 1024, downloadUrl: "https://media.example.test/clip.mp4" }
1645
+ ),
1646
+ importsDropboxFile: fixtures(
1647
+ { commandId: "dropbox:import", filename: "clip.mp4", size: 1024, contentType: "video/mp4", source: { kind: "dropbox", shareUrl: "https://dropbox.com/scl/fo/example", path: "/clip.mp4" } },
1648
+ { commandId: "dropbox:import", filename: "clip.mp4", size: -1, contentType: "video/mp4", source: { kind: "dropbox", shareUrl: "https://dropbox.com/scl/fo/example", path: "/clip.mp4" } },
1649
+ { commandId: "dropbox:import", mediaId: "media" },
1650
+ { commandId: "dropbox:import" }
1651
+ )
1652
+ });
1653
+
1654
+ // src/projections.ts
1655
+ import { z as z13 } from "zod";
1656
+ var ProjectProjection = z13.object({
1657
+ id: ProjectId,
1658
+ name: z13.string().min(1).max(STUDIO_LIMITS.name),
1659
+ createdAt: z13.number(),
1660
+ updatedAt: z13.number()
1661
+ });
1662
+ var ProjectSummary = ProjectProjection.extend({
1663
+ revision: AggregateRevision
1664
+ });
1665
+ var ActiveCompositionProjection = z13.object({
1666
+ id: CompositionId,
1667
+ composition: Composition
1668
+ });
1669
+ var ProjectSnapshotProjection = z13.object({
1670
+ project: ProjectProjection,
1671
+ activeComposition: ActiveCompositionProjection.nullable(),
1672
+ revision: AggregateRevision
1673
+ });
1674
+ var ProjectListInput = PageInput;
1675
+ var ProjectListProjection = pageResult(ProjectSummary);
1676
+ var ProjectSnapshotInput = z13.object({ projectId: ProjectId }).strict();
1677
+ var ProjectMutationProjection = z13.object({
1678
+ commandId: CommandId,
1679
+ project: ProjectSummary,
1680
+ revision: AggregateRevision
1681
+ });
1682
+ var ProjectRemovalProjection = z13.object({
1683
+ commandId: CommandId,
1684
+ projectId: ProjectId,
1685
+ revision: AggregateRevision
1686
+ });
1687
+
1688
+ // src/session.ts
1689
+ import { z as z14 } from "zod";
1690
+ var SessionInput = z14.object({}).strict();
1691
+ var StudioUserProjection = z14.object({
1692
+ id: OpaqueId2,
1693
+ name: z14.string().max(STUDIO_LIMITS.name).nullable(),
1694
+ email: z14.string().max(STUDIO_LIMITS.shortText).nullable(),
1695
+ image: z14.string().max(8192).nullable()
1696
+ });
1697
+ var StudioOrganizationProjection = z14.object({
1698
+ id: OpaqueId2,
1699
+ name: z14.string().max(STUDIO_LIMITS.name).nullable().optional()
1700
+ });
1701
+ var SessionProjection = z14.object({
1702
+ user: StudioUserProjection.nullable(),
1703
+ activeOrg: StudioOrganizationProjection.nullable()
1704
+ });
1705
+
1706
+ // src/operations.ts
1707
+ var defineOperations = (value) => Object.fromEntries(Object.entries(value).map(([id, operation]) => [
1708
+ id,
1709
+ { revisionPolicy: "none", ...operation }
1710
+ ]));
1711
+ var STUDIO_OPERATIONS = defineOperations({
1712
+ compatibility: { kind: "query", input: CompatibilityInput, result: CompatibilityProjection, durable: false, aggregate: "none" },
1713
+ sessionCurrent: { kind: "query", input: SessionInput, result: SessionProjection, durable: false, aggregate: "none" },
1714
+ assistantResolveThread: { kind: "mutation", input: AssistantResolveThreadInput, result: AssistantThreadProjection, durable: false, aggregate: "none" },
1715
+ assistantForgetConversation: { kind: "mutation", input: AssistantForgetConversationInput, result: AssistantForgetConversationProjection, durable: false, aggregate: "none" },
1716
+ assistantSend: { kind: "action", input: AssistantSendInput, result: AssistantSendProjection, durable: false, aggregate: "none" },
1717
+ assistantMessages: { kind: "query", input: AssistantMessagesInput, result: AssistantMessagesProjection, durable: false, aggregate: "none" },
1718
+ projectsList: { kind: "query", input: ProjectListInput, result: ProjectListProjection, durable: false, aggregate: "none", paginated: true },
1719
+ projectsSnapshot: { kind: "query", input: ProjectSnapshotInput, result: ProjectSnapshotProjection, durable: false, aggregate: "project", revisionPolicy: "returns-project-revision" },
1720
+ projectsCreate: { kind: "mutation", input: CreateProjectInput, result: ProjectMutationProjection, durable: true, aggregate: "project", revisionPolicy: "returns-project-revision" },
1721
+ projectsUpdate: { kind: "mutation", input: UpdateProjectInput, result: ProjectMutationProjection, durable: true, aggregate: "project", revisionPolicy: "requires-expected-project-revision" },
1722
+ projectsRemove: { kind: "mutation", input: RemoveProjectInput, result: ProjectRemovalProjection, durable: true, aggregate: "project", revisionPolicy: "requires-expected-project-revision" },
1723
+ compositionsApply: { kind: "mutation", input: ApplyCompositionInput, result: CompositionCommitProjection, durable: true, aggregate: "project", revisionPolicy: "requires-expected-project-revision" },
1724
+ compositionsReplace: { kind: "mutation", input: ReplaceCompositionInput, result: CompositionCommitProjection, durable: true, aggregate: "project", revisionPolicy: "requires-expected-project-revision" },
1725
+ mediaList: { kind: "query", input: MediaListInput, result: MediaListProjection, durable: false, aggregate: "none", paginated: true },
1726
+ mediaRemove: { kind: "mutation", input: MediaCommandInput, result: MediaMutationProjection, durable: true, aggregate: "none" },
1727
+ mediaCancelProcessing: { kind: "mutation", input: MediaCommandInput, result: MediaMutationProjection, durable: true, aggregate: "none" },
1728
+ mediaReprocess: { kind: "action", input: MediaCommandInput, result: MediaMutationProjection, durable: true, aggregate: "none" },
1729
+ mediaListUnderstanding: { kind: "query", input: MediaUnderstandingListInput, result: MediaUnderstandingListProjection, durable: false, aggregate: "none", paginated: true },
1730
+ mediaSearch: { kind: "action", input: MediaSearchInput, result: MediaSearchProjection, durable: false, aggregate: "none" },
1731
+ mediaAnalyzeTimeline: { kind: "action", input: AnalyzeTimelineInput, result: AnalyzeTimelineProjection, durable: false, aggregate: "none" },
1732
+ mediaFacts: { kind: "query", input: MediaFactInput, result: MediaFactResolutionProjection, durable: false, aggregate: "none" },
1733
+ mediaPurchaseFact: { kind: "action", input: PurchaseMediaFactInput, result: MediaFactPurchaseProjection, durable: true, aggregate: "none" },
1734
+ transcriptsList: { kind: "query", input: TranscriptListInput, result: TranscriptListProjection, durable: false, aggregate: "none", paginated: true },
1735
+ transcriptsGetDownload: { kind: "query", input: TranscriptDownloadInput, result: TranscriptDownloadProjection, durable: false, aggregate: "none" },
1736
+ transcriptsSearch: { kind: "query", input: TranscriptSearchInput, result: TranscriptSearchProjection, durable: false, aggregate: "none" },
1737
+ correctionsList: { kind: "query", input: CorrectionListInput, result: CorrectionListProjection, durable: false, aggregate: "none", paginated: true },
1738
+ correctionsSave: { kind: "mutation", input: SaveCorrectionInput, result: CorrectionMutationProjection, durable: true, aggregate: "none" },
1739
+ correctionsRemove: { kind: "mutation", input: RemoveCorrectionInput, result: CorrectionMutationProjection, durable: true, aggregate: "none" },
1740
+ settingsGetUser: { kind: "query", input: EmptyInput, result: UserSettingsProjection, durable: false, aggregate: "none" },
1741
+ settingsUpdateProcessing: { kind: "mutation", input: UpdateProcessingSettingsInput, result: UserSettingsMutationProjection, durable: true, aggregate: "none" },
1742
+ brandKitsList: { kind: "query", input: BrandKitListInput, result: BrandKitListProjection, durable: false, aggregate: "none", paginated: true },
1743
+ brandKitsUpsert: { kind: "mutation", input: UpsertBrandKitInput, result: BrandKitMutationProjection, durable: true, aggregate: "none" },
1744
+ componentsList: { kind: "query", input: ComponentListInput, result: ComponentListProjection, durable: false, aggregate: "none", paginated: true },
1745
+ componentsGetBundles: { kind: "query", input: ComponentBundlesInput, result: ComponentBundlesProjection, durable: false, aggregate: "none" },
1746
+ conversationsList: { kind: "query", input: ConversationListInput, result: ConversationListProjection, durable: false, aggregate: "none", paginated: true },
1747
+ conversationsGet: { kind: "query", input: ConversationGetInput, result: ConversationGetProjection, durable: false, aggregate: "none" },
1748
+ conversationsSave: { kind: "mutation", input: SaveConversationInput, result: ConversationMutationProjection, durable: true, aggregate: "none" },
1749
+ conversationsAdopt: { kind: "mutation", input: SaveConversationInput, result: ConversationMutationProjection, durable: true, aggregate: "none" },
1750
+ conversationsRemove: { kind: "mutation", input: RemoveConversationInput, result: ConversationMutationProjection, durable: true, aggregate: "none" },
1751
+ restorePointsList: { kind: "query", input: RestorePointListInput, result: RestorePointListProjection, durable: false, aggregate: "none", paginated: true },
1752
+ restorePointsForget: { kind: "mutation", input: ForgetRestorePointsInput, result: RestorePointMutationProjection, durable: true, aggregate: "none" },
1753
+ restorePointsRestore: { kind: "mutation", input: RestoreToPointInput, result: RestorePointCommitProjection, durable: true, aggregate: "project", revisionPolicy: "requires-expected-project-revision" },
1754
+ rendersList: { kind: "query", input: RenderListInput, result: RenderListProjection, durable: false, aggregate: "project", paginated: true },
1755
+ rendersPresignOutput: { kind: "action", input: RenderPresignInput, result: RenderPresignProjection, durable: false, aggregate: "none" },
1756
+ rendersCreate: { kind: "action", input: CreateRenderInput, result: CreateRenderProjection, durable: true, aggregate: "project", revisionPolicy: "requires-expected-project-revision" },
1757
+ rendersCancel: { kind: "mutation", input: CancelRenderInput, result: CancelRenderProjection, durable: true, aggregate: "none" },
1758
+ uploadsBegin: { kind: "action", input: UploadBeginInput, result: UploadBeginProjection, durable: true, aggregate: "none" },
1759
+ uploadsFinalize: { kind: "action", input: UploadFinalizeInput, result: UploadFinalizeProjection, durable: true, aggregate: "none" },
1760
+ templatesList: { kind: "query", input: TemplateListInput, result: TemplateListProjection, durable: false, aggregate: "none", paginated: true },
1761
+ templatesGet: { kind: "query", input: TemplateGetInput, result: TemplateGetProjection, durable: false, aggregate: "none" },
1762
+ templatesSave: { kind: "mutation", input: TemplateSaveInput, result: TemplateMutationProjection, durable: true, aggregate: "none" },
1763
+ templatesRemove: { kind: "mutation", input: TemplateRemoveInput, result: TemplateMutationProjection, durable: true, aggregate: "none" },
1764
+ projectResourcesBeginUpload: { kind: "action", input: ProjectResourceBeginUploadInput, result: ProjectResourceBeginUploadProjection, durable: true, aggregate: "none" },
1765
+ projectResourcesFinalizeUpload: { kind: "action", input: ProjectResourceFinalizeUploadInput, result: ProjectResourceMutationProjection, durable: true, aggregate: "none" },
1766
+ projectResourcesRemove: { kind: "mutation", input: ProjectResourceCommandInput, result: ProjectResourceMutationProjection, durable: true, aggregate: "none" },
1767
+ projectResourcesGetDelivery: { kind: "action", input: ProjectResourceDeliveryInput, result: ProjectResourceDeliveryProjection, durable: false, aggregate: "none" },
1768
+ resourcesSearch: { kind: "action", input: ResourceSearchInput, result: ResourceSearchProjection, durable: false, aggregate: "none" },
1769
+ importsResolveDropbox: { kind: "action", input: DropboxResolveInput, result: DropboxResolveProjection, durable: false, aggregate: "none" },
1770
+ importsDropboxFile: { kind: "action", input: DropboxImportFileInput, result: DropboxImportFileProjection, durable: true, aggregate: "none" }
1771
+ });
1772
+ export {
1773
+ ActiveCompositionProjection,
1774
+ AggregateRevision,
1775
+ AnalyzeTimelineInput,
1776
+ AnalyzeTimelineProjection,
1777
+ ApplyCompositionInput,
1778
+ AssistantForgetConversationInput,
1779
+ AssistantForgetConversationProjection,
1780
+ AssistantMessageProjection,
1781
+ AssistantMessagesInput,
1782
+ AssistantMessagesProjection,
1783
+ AssistantResolveThreadInput,
1784
+ AssistantSendInput,
1785
+ AssistantSendProjection,
1786
+ AssistantThreadProjection,
1787
+ BrandKitListInput,
1788
+ BrandKitListProjection,
1789
+ BrandKitMutationProjection,
1790
+ BrandKitProjection,
1791
+ CancelRenderInput,
1792
+ CancelRenderProjection,
1793
+ CommandId,
1794
+ CompatibilityInput,
1795
+ CompatibilityProjection,
1796
+ ComponentBundleProjection,
1797
+ ComponentBundlesInput,
1798
+ ComponentBundlesProjection,
1799
+ ComponentListInput,
1800
+ ComponentListProjection,
1801
+ ComponentProjection,
1802
+ CompositionCommitProjection,
1803
+ CompositionId,
1804
+ ConversationGetInput,
1805
+ ConversationGetProjection,
1806
+ ConversationListInput,
1807
+ ConversationListProjection,
1808
+ ConversationMutationProjection,
1809
+ ConversationProjection,
1810
+ CorrectionListInput,
1811
+ CorrectionListProjection,
1812
+ CorrectionMutationProjection,
1813
+ CorrectionProjection,
1814
+ CreateProjectInput,
1815
+ CreateRenderInput,
1816
+ CreateRenderProjection,
1817
+ DropboxEntryProjection,
1818
+ DropboxImportFileInput,
1819
+ DropboxImportFileProjection,
1820
+ DropboxResolveInput,
1821
+ DropboxResolveProjection,
1822
+ DurableCommand,
1823
+ DurableCommandFields,
1824
+ DurableOperation,
1825
+ EmptyInput,
1826
+ ForgetRestorePointsInput,
1827
+ JournalClientId,
1828
+ JournalSequence,
1829
+ JsonValue,
1830
+ MediaCommandInput,
1831
+ MediaFactInput,
1832
+ MediaFactKind,
1833
+ MediaFactPurchaseProjection,
1834
+ MediaFactResolutionProjection,
1835
+ MediaIdInput,
1836
+ MediaItemProjection,
1837
+ MediaListInput,
1838
+ MediaListProjection,
1839
+ MediaMetadataProjection,
1840
+ MediaMutationProjection,
1841
+ MediaProcessingStatusProjection,
1842
+ MediaSearchHitProjection,
1843
+ MediaSearchInput,
1844
+ MediaSearchProjection,
1845
+ MediaUnderstandingListInput,
1846
+ MediaUnderstandingListProjection,
1847
+ MediaUnderstandingProjection,
1848
+ OpaqueId2 as OpaqueId,
1849
+ OperationId,
1850
+ PageInput,
1851
+ ProjectId,
1852
+ ProjectListInput,
1853
+ ProjectListProjection,
1854
+ ProjectMutationProjection,
1855
+ ProjectProjection,
1856
+ ProjectRefProjection,
1857
+ ProjectRemovalProjection,
1858
+ ProjectResourceBeginUploadInput,
1859
+ ProjectResourceBeginUploadProjection,
1860
+ ProjectResourceCommandInput,
1861
+ ProjectResourceDeliveryInput,
1862
+ ProjectResourceDeliveryProjection,
1863
+ ProjectResourceFinalizeUploadInput,
1864
+ ProjectResourceMutationProjection,
1865
+ ProjectSnapshotInput,
1866
+ ProjectSnapshotProjection,
1867
+ ProjectSummary,
1868
+ PublicMatteEntryProjection,
1869
+ PublicSubjectTrackEntryProjection,
1870
+ PurchaseMediaFactInput,
1871
+ RemoveConversationInput,
1872
+ RemoveCorrectionInput,
1873
+ RemoveProjectInput,
1874
+ RenderJobProjection,
1875
+ RenderListInput,
1876
+ RenderListProjection,
1877
+ RenderPresignInput,
1878
+ RenderPresignProjection,
1879
+ ReplaceCompositionInput,
1880
+ ResourceCandidateProjection,
1881
+ ResourceSearchInput,
1882
+ ResourceSearchProjection,
1883
+ RestorePointCommitProjection,
1884
+ RestorePointListInput,
1885
+ RestorePointListProjection,
1886
+ RestorePointMutationProjection,
1887
+ RestorePointProjection,
1888
+ RestoreToPointInput,
1889
+ STUDIO_CONTRACT_VERSION,
1890
+ STUDIO_LIMITS,
1891
+ STUDIO_OPERATIONS,
1892
+ STUDIO_OPERATION_FIXTURES,
1893
+ STUDIO_PAGE_MAX,
1894
+ SaveConversationInput,
1895
+ SaveCorrectionInput,
1896
+ SessionInput,
1897
+ SessionProjection,
1898
+ SourceWindow,
1899
+ StudioError,
1900
+ StudioErrorCode,
1901
+ StudioErrorEnvelope,
1902
+ StudioOrganizationProjection,
1903
+ StudioUserProjection,
1904
+ TemplateGetInput,
1905
+ TemplateGetProjection,
1906
+ TemplateListInput,
1907
+ TemplateListProjection,
1908
+ TemplateMutationProjection,
1909
+ TemplateProjection,
1910
+ TemplateRemoveInput,
1911
+ TemplateSaveInput,
1912
+ TimelineWordInput,
1913
+ TranscriptDownloadInput,
1914
+ TranscriptDownloadProjection,
1915
+ TranscriptListInput,
1916
+ TranscriptListProjection,
1917
+ TranscriptProjection,
1918
+ TranscriptSearchInput,
1919
+ TranscriptSearchProjection,
1920
+ UpdateProcessingSettingsInput,
1921
+ UpdateProjectInput,
1922
+ UploadBeginInput,
1923
+ UploadBeginProjection,
1924
+ UploadFinalizeInput,
1925
+ UploadFinalizeProjection,
1926
+ UploadHeaders,
1927
+ UploadPlan,
1928
+ UpsertBrandKitInput,
1929
+ UserSettingsMutationProjection,
1930
+ UserSettingsProjection,
1931
+ pageResult
1932
+ };