@mengine/medeo-client 2.0.1 → 2.1.1-dsl.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.
@@ -0,0 +1,809 @@
1
+ import { Cursor, TreeID } from "loro-crdt";
2
+
3
+ //#region ../medeo-dsl/src/types.d.ts
4
+ type TrackRole = 'video_clip' | 'speech' | 'caption' | 'bgm';
5
+ type ResourceSystem = 'memota' | 'memota-speech';
6
+ interface Track$1 {
7
+ role: TrackRole;
8
+ hidden?: boolean;
9
+ }
10
+ /**
11
+ * How a Clip plays its content: the window it takes from the source, its pace, and whether it
12
+ * fills the Timeline. One value: concurrent edits of the same marker keep one whole marker.
13
+ */
14
+ interface SeqMarker {
15
+ inMs: number;
16
+ outMs: number;
17
+ rate?: number;
18
+ fillTimeline?: true;
19
+ }
20
+ interface Clip {
21
+ seqMarker: SeqMarker;
22
+ volume?: number;
23
+ }
24
+ interface MediaLocator {
25
+ system: ResourceSystem;
26
+ key: string;
27
+ digest?: string;
28
+ }
29
+ type Media = MediaLocator & ({
30
+ kind: 'video';
31
+ durationMs: number;
32
+ storageKey?: string;
33
+ } | {
34
+ kind: 'audio' | 'voiceover-recording';
35
+ durationMs: number;
36
+ storageKey: string;
37
+ } | {
38
+ kind: 'image';
39
+ storageKey?: string;
40
+ });
41
+ interface AudioScript {
42
+ body: string;
43
+ defaultLanguage?: string;
44
+ }
45
+ interface CaptionStyle$1 {
46
+ font?: {
47
+ system: 'font-library';
48
+ key: string;
49
+ };
50
+ fontSize?: number;
51
+ fontColor?: string;
52
+ fontWeight?: number;
53
+ entranceAnimation?: string;
54
+ entranceAnimationDurationMs?: number;
55
+ strokeColor?: string;
56
+ strokeWidth?: number;
57
+ positionX?: number;
58
+ positionY?: number;
59
+ }
60
+ interface Caption {
61
+ text?: string;
62
+ style?: CaptionStyle$1;
63
+ }
64
+ interface Voice {
65
+ system: 'voice-library';
66
+ key: string;
67
+ name?: string;
68
+ }
69
+ interface Asset {
70
+ system: ResourceSystem;
71
+ key: string;
72
+ storageKey?: string;
73
+ digest?: string;
74
+ }
75
+ /** Table keys carry entity identity; values never duplicate an id or a single-table kind. */
76
+ interface EntityValues {
77
+ 'timeline-entities': Record<string, never>;
78
+ 'track-entities': Track$1;
79
+ 'clip-entities': Clip;
80
+ 'media-entities': Media;
81
+ 'audio-script-entities': AudioScript;
82
+ 'caption-entities': Caption;
83
+ 'voice-entities': Voice;
84
+ 'asset-entities': Asset;
85
+ }
86
+ interface TimeAnchor {
87
+ from: string;
88
+ to: string;
89
+ offsetMs: number;
90
+ fallback_abs_ms: number;
91
+ }
92
+ interface CaptionContent {
93
+ captionId: string;
94
+ audioScriptId: string;
95
+ start: Cursor;
96
+ end: Cursor;
97
+ }
98
+ interface RelationValues {
99
+ 'clip-source-relations': {
100
+ clipId: string;
101
+ sourceId: string;
102
+ };
103
+ 'time-anchor-relations': TimeAnchor;
104
+ 'caption-content-relations': CaptionContent;
105
+ 'caption-alignment-relations': {
106
+ captionId: string;
107
+ mediaId: string;
108
+ startMs: number;
109
+ endMs: number;
110
+ };
111
+ 'voice-timbre-relations': {
112
+ recordingId: string;
113
+ voiceId: string;
114
+ };
115
+ 'derived-from-relations': {
116
+ entityId: string;
117
+ sourceId: string;
118
+ };
119
+ 'from-asset-relations': {
120
+ audioScriptId: string;
121
+ assetId: string;
122
+ };
123
+ 'to-asset-relations': {
124
+ audioScriptId: string;
125
+ assetId: string;
126
+ };
127
+ }
128
+ type EntityTable = keyof EntityValues;
129
+ type RelationTable = keyof RelationValues;
130
+ type EntityTables = { [K in EntityTable]: Record<string, EntityValues[K]> };
131
+ type RelationTables = { [K in RelationTable]: Record<string, RelationValues[K]> };
132
+ type FieldPatch<T> = { [K in keyof T]?: NonNullable<T[K]> extends object ? FieldPatch<NonNullable<T[K]>> : T[K] | undefined };
133
+ type EntityMutation = { [K in EntityTable]: {
134
+ type: 'create-entity';
135
+ table: K;
136
+ id: string;
137
+ value: EntityValues[K];
138
+ } | {
139
+ type: 'patch-entity';
140
+ table: K;
141
+ id: string;
142
+ patch: FieldPatch<EntityValues[K]>;
143
+ } | {
144
+ type: 'delete-entity';
145
+ table: K;
146
+ id: string;
147
+ } }[EntityTable];
148
+ type RelationMutation = { [K in RelationTable]: {
149
+ type: 'set-relation';
150
+ table: K;
151
+ value: RelationValues[K];
152
+ } | {
153
+ type: 'delete-relation';
154
+ table: K;
155
+ id: string;
156
+ } }[RelationTable];
157
+ type ContainMutation = {
158
+ type: 'insert-node';
159
+ entityId: string;
160
+ parentId?: string;
161
+ index?: number;
162
+ } | {
163
+ type: 'move-node';
164
+ entityId: string;
165
+ parentId?: string;
166
+ index?: number;
167
+ } | {
168
+ type: 'delete-node';
169
+ entityId: string;
170
+ };
171
+ interface CaptionSelection {
172
+ captionId: string;
173
+ audioScriptId: string;
174
+ start: number;
175
+ end: number;
176
+ }
177
+ type TextMutation = {
178
+ type: 'edit-caption-text';
179
+ captionId: string;
180
+ expectedBodyId?: string;
181
+ edits: readonly TextEdit[];
182
+ } | {
183
+ type: 'edit-text';
184
+ audioScriptId: string;
185
+ expectedBodyId?: string;
186
+ edits: readonly TextEdit[];
187
+ } | ({
188
+ type: 'set-caption-content';
189
+ } & CaptionSelection);
190
+ type DslMutation = EntityMutation | RelationMutation | ContainMutation | TextMutation;
191
+ interface ContainNode {
192
+ treeId: TreeID;
193
+ entityId: string;
194
+ children: ContainNode[];
195
+ }
196
+ interface DslDiagnostic {
197
+ code: string;
198
+ path: string;
199
+ message: string;
200
+ }
201
+ interface TextRun {
202
+ insert: string;
203
+ attributes?: Record<string, unknown>;
204
+ }
205
+ interface RichTextSnapshot {
206
+ bodyId: string;
207
+ plainText: string;
208
+ delta: TextRun[];
209
+ }
210
+ interface CaptionText {
211
+ text: string;
212
+ start: number;
213
+ end: number;
214
+ bodyId: string;
215
+ }
216
+ type DeepReadonly<T> = T extends Cursor ? T : T extends object ? { readonly [K in keyof T]: DeepReadonly<T[K]> } : T;
217
+ type MedeoDslSnapshot = DeepReadonly<EntityTables & RelationTables & {
218
+ 'contain-relations': ContainNode[];
219
+ richText: Record<string, RichTextSnapshot>;
220
+ captionText: Record<string, CaptionText>;
221
+ diagnostics: DslDiagnostic[];
222
+ }>;
223
+ type TextMark = 'language' | 'pauseMs';
224
+ type TextEdit = {
225
+ type: 'insert';
226
+ at: number;
227
+ text: string;
228
+ } | {
229
+ type: 'delete';
230
+ at: number;
231
+ length: number;
232
+ } | {
233
+ type: 'mark';
234
+ start: number;
235
+ end: number;
236
+ key: TextMark;
237
+ value: string | number;
238
+ } | {
239
+ type: 'unmark';
240
+ start: number;
241
+ end: number;
242
+ key: TextMark;
243
+ } | {
244
+ type: 'delta';
245
+ delta: TextDelta[];
246
+ };
247
+ type TextDelta = {
248
+ insert: string;
249
+ attributes?: Record<string, string | number | null>;
250
+ } | {
251
+ retain: number;
252
+ attributes?: Record<string, string | number | null>;
253
+ } | {
254
+ delete: number;
255
+ };
256
+ //#endregion
257
+ //#region ../medeo-dsl/src/ids.d.ts
258
+ declare function tupleHash(tuple: readonly string[]): string;
259
+ declare function resourceId(kind: 'media' | 'voice' | 'asset', system: string, key: string): string;
260
+ declare function relationId<K extends RelationTable>(table: K, value: RelationValues[K]): string;
261
+ type EntityIdKind = 'timeline' | 'track' | 'clip' | 'audio-script' | 'caption';
262
+ type DslIdFactory = (kind: EntityIdKind) => string;
263
+ declare const defaultIdFactory: DslIdFactory;
264
+ //#endregion
265
+ //#region src/dsl/commit-options.d.ts
266
+ /** Self-reported audit author; authorization remains the server's responsibility. */
267
+ interface OpActor {
268
+ user_id: string;
269
+ role: 'user' | 'agent';
270
+ }
271
+ interface CommitOptions {
272
+ /** The server audit view exposes string intents; other JSON values remain in the native message. */
273
+ intent?: unknown;
274
+ actor?: OpActor;
275
+ }
276
+ //#endregion
277
+ //#region src/dsl/projection/generated/video-draft-idl.d.ts
278
+ /**
279
+ * @generated by @mengine/idl-codegen — DO NOT EDIT MANUALLY.
280
+ *
281
+ * VideoDraft read-view types extracted from the Smithy IDL
282
+ * (medeo-v2-design-materials). Re-run `vp run @mengine/idl-codegen#sync`.
283
+ * Source IDL commit: 902e82e3fec1e94b36e14ef671de91abd210dc86
284
+ *
285
+ * WHY EVERY FIELD IS `T | undefined`:
286
+ * AWS `smithy-typescript-codegen` widens every structure member to
287
+ * `T | undefined` regardless of the Smithy `@required` trait — it favours
288
+ * deserialization robustness (a peer may omit a field on the wire) over
289
+ * encoding requiredness in the static type. So these generated types are NOT
290
+ * the source of truth for which fields are required: the Smithy `.smithy`
291
+ * model is. Many fields here (e.g. `VideoClipPart.play_in` / `play_out` /
292
+ * `volume` / `origin_media_id`) are `@required` in the contract.
293
+ *
294
+ * Requiredness is restored by import and write-time validation, not here.
295
+ * DSL content constraints are owned by medeo-dsl and enforced at the medeo-client
296
+ * transaction and import boundaries.
297
+ * Do not assume a
298
+ * field is optional just because its type is `| undefined`.
299
+ */
300
+ /**
301
+ * @public
302
+ * @enum
303
+ */
304
+ declare const PartKind: {
305
+ readonly BGM: "bgm";
306
+ readonly CAPTION: "caption";
307
+ readonly SPEECH: "speech";
308
+ readonly VIDEO_CLIP: "video_clip";
309
+ };
310
+ /**
311
+ * @public
312
+ */
313
+ type PartKind = (typeof PartKind)[keyof typeof PartKind];
314
+ /**
315
+ * @public
316
+ */
317
+ interface VoiceSummary {
318
+ name: string | undefined;
319
+ id: string | undefined;
320
+ }
321
+ /**
322
+ * @public
323
+ */
324
+ interface SpeechPart$1 {
325
+ id: string | undefined;
326
+ duration_ms: number | undefined;
327
+ /**
328
+ * Types of parts that can be contained in tracks
329
+ * @public
330
+ */
331
+ kind: PartKind | undefined;
332
+ audio_script: string | undefined;
333
+ volume: number | undefined;
334
+ audio_storage_key: string | undefined;
335
+ origin_speech_id: string | undefined;
336
+ voice: VoiceSummary | undefined;
337
+ caption_ids: string[] | undefined;
338
+ }
339
+ /**
340
+ * Caption visual style configuration
341
+ * @public
342
+ */
343
+ interface CaptionStyle {
344
+ /**
345
+ * Font ID referencing a font from the font library. Defaults to system font if not provided
346
+ * @public
347
+ */
348
+ font_id?: string | undefined;
349
+ /**
350
+ * Font size in points
351
+ * @public
352
+ */
353
+ font_size?: number | undefined;
354
+ /**
355
+ * Font color as hex string (e.g. "#FFFFFF")
356
+ * @public
357
+ */
358
+ font_color?: string | undefined;
359
+ /**
360
+ * Numeric font weight, e.g. 400 for regular or 700 for bold
361
+ * @public
362
+ */
363
+ font_weight?: number | undefined;
364
+ /**
365
+ * Caption entrance animation preset ID, e.g. "fade", "slideUp", or "none"
366
+ * @public
367
+ */
368
+ entrance_animation?: string | undefined;
369
+ /**
370
+ * Caption entrance animation duration in milliseconds
371
+ * @public
372
+ */
373
+ entrance_animation_duration_ms?: number | undefined;
374
+ /**
375
+ * Caption outline/stroke color as hex string (e.g. "#000000")
376
+ * @public
377
+ */
378
+ stroke_color?: string | undefined;
379
+ /**
380
+ * Caption outline/stroke width in pixels
381
+ * @public
382
+ */
383
+ stroke_width?: number | undefined;
384
+ /**
385
+ * Caption center X position as a percentage (0.0 to 1.0)
386
+ * @public
387
+ */
388
+ position_x?: number | undefined;
389
+ /**
390
+ * Caption center Y position as a percentage (0.0 to 1.0)
391
+ * @public
392
+ */
393
+ position_y?: number | undefined;
394
+ }
395
+ /**
396
+ * @public
397
+ */
398
+ interface CaptionPart$1 {
399
+ id: string | undefined;
400
+ duration_ms: number | undefined;
401
+ /**
402
+ * Types of parts that can be contained in tracks
403
+ * @public
404
+ */
405
+ kind: PartKind | undefined;
406
+ speech_part_id: string | undefined;
407
+ text: string | undefined;
408
+ start_ms: number | undefined;
409
+ /**
410
+ * Caption visual style (font, size, color, weight, animation, outline). Uses default style if not provided
411
+ * @public
412
+ */
413
+ style?: CaptionStyle | undefined;
414
+ }
415
+ /**
416
+ * @public
417
+ * @enum
418
+ */
419
+ declare const AspectRatio: {
420
+ readonly RATIO_16_9: "16:9";
421
+ readonly RATIO_9_16: "9:16";
422
+ };
423
+ /**
424
+ * @public
425
+ */
426
+ type AspectRatio = (typeof AspectRatio)[keyof typeof AspectRatio];
427
+ /**
428
+ * @public
429
+ * @enum
430
+ */
431
+ declare const AssetSource: {
432
+ readonly AI_IMAGES: "ai_images";
433
+ readonly AI_VIDEOS: "ai_videos";
434
+ readonly MY_UPLOADED_ASSETS: "my_uploaded_assets";
435
+ readonly STOCK_VIDEOS: "stock_videos";
436
+ };
437
+ /**
438
+ * @public
439
+ */
440
+ type AssetSource = (typeof AssetSource)[keyof typeof AssetSource];
441
+ /**
442
+ * An extra aspect ratio variant with independent storage keys for thumbnail,
443
+ * preview video, and highlight video. Stored inside video_settings JSONB.
444
+ * @public
445
+ */
446
+ interface RatioVariant {
447
+ aspect_ratio: string | undefined;
448
+ thumb_storage_key: string | undefined;
449
+ video_storage_key: string | undefined;
450
+ highlight_video_storage_key?: string | undefined;
451
+ }
452
+ /**
453
+ * @public
454
+ */
455
+ interface VideoCreationSettings$1 {
456
+ voice_id?: string | undefined;
457
+ duration_ms?: number | undefined;
458
+ aspect_ratio?: AspectRatio | undefined;
459
+ video_style_id?: string | undefined;
460
+ asset_sources?: AssetSource[] | undefined;
461
+ recipe_id?: string | undefined;
462
+ enable_high_cost_confirm?: boolean | undefined;
463
+ user_confirm_cost_threshold?: number | undefined;
464
+ /**
465
+ * Extra aspect ratio variants with independent storage keys.
466
+ * Each variant carries its own thumbnail, preview video, and optional highlight video.
467
+ * Used when a recipe supports multiple aspect ratios (e.g. both 16:9 and 9:16).
468
+ * @public
469
+ */
470
+ extra_ratios?: RatioVariant[] | undefined;
471
+ }
472
+ /**
473
+ * @public
474
+ */
475
+ interface TrackItem {
476
+ abs_time_position: number | undefined;
477
+ part_id: string | undefined;
478
+ }
479
+ /**
480
+ * @public
481
+ */
482
+ interface Track {
483
+ id: string | undefined;
484
+ /**
485
+ * Types of parts that can be contained in tracks
486
+ * @public
487
+ */
488
+ parts_kind: PartKind | undefined;
489
+ is_hidden: boolean | undefined;
490
+ items: TrackItem[] | undefined;
491
+ }
492
+ /**
493
+ * @public
494
+ */
495
+ interface Attachment {
496
+ part_id: string | undefined;
497
+ relative_time_position: number | undefined;
498
+ }
499
+ /**
500
+ * @public
501
+ */
502
+ interface PartAggregation {
503
+ body_part_id: string | undefined;
504
+ attachments: Attachment[] | undefined;
505
+ }
506
+ /**
507
+ * @public
508
+ */
509
+ interface BgmPart$1 {
510
+ id: string | undefined;
511
+ duration_ms: number | undefined;
512
+ /**
513
+ * Types of parts that can be contained in tracks
514
+ * @public
515
+ */
516
+ kind: PartKind | undefined;
517
+ audio_storage_key: string | undefined;
518
+ volume: number | undefined;
519
+ origin_media_id: string | undefined;
520
+ }
521
+ /**
522
+ * @public
523
+ * @enum
524
+ */
525
+ declare const SpeedShiftCategory: {
526
+ /**
527
+ * Variable speed controlled by Bezier keyframes
528
+ */
529
+ readonly CURVE: "curve";
530
+ /**
531
+ * Constant speed multiplier across the entire clip
532
+ */
533
+ readonly LINEAR: "linear";
534
+ };
535
+ /**
536
+ * @public
537
+ */
538
+ type SpeedShiftCategory = (typeof SpeedShiftCategory)[keyof typeof SpeedShiftCategory];
539
+ /**
540
+ * @public
541
+ */
542
+ interface TangentHandle {
543
+ x: number | undefined;
544
+ y: number | undefined;
545
+ }
546
+ /**
547
+ * @public
548
+ */
549
+ interface SpeedKeyframe {
550
+ position: number | undefined;
551
+ rate: number | undefined;
552
+ in_tangent?: TangentHandle | undefined;
553
+ out_tangent?: TangentHandle | undefined;
554
+ }
555
+ /**
556
+ * @public
557
+ */
558
+ interface CurveConfig {
559
+ keyframes: SpeedKeyframe[] | undefined;
560
+ }
561
+ /**
562
+ * @public
563
+ */
564
+ interface LinearConfig {
565
+ speed: number | undefined;
566
+ }
567
+ /**
568
+ * @public
569
+ */
570
+ type SpeedShiftConfigUnion = SpeedShiftConfigUnion.CurveMember | SpeedShiftConfigUnion.LinearMember | SpeedShiftConfigUnion.$UnknownMember;
571
+ /**
572
+ * @public
573
+ */
574
+ declare namespace SpeedShiftConfigUnion {
575
+ interface LinearMember {
576
+ linear: LinearConfig;
577
+ curve?: never;
578
+ $unknown?: never;
579
+ }
580
+ interface CurveMember {
581
+ linear?: never;
582
+ curve: CurveConfig;
583
+ $unknown?: never;
584
+ }
585
+ /**
586
+ * @public
587
+ */
588
+ interface $UnknownMember {
589
+ linear?: never;
590
+ curve?: never;
591
+ $unknown: [string, any];
592
+ }
593
+ interface Visitor<T> {
594
+ linear: (value: LinearConfig) => T;
595
+ curve: (value: CurveConfig) => T;
596
+ _: (name: string, value: any) => T;
597
+ }
598
+ const visit: <T>(value: SpeedShiftConfigUnion, visitor: Visitor<T>) => T;
599
+ }
600
+ /**
601
+ * @public
602
+ */
603
+ interface SpeedShift {
604
+ category: SpeedShiftCategory | undefined;
605
+ mode: string | undefined;
606
+ config: SpeedShiftConfigUnion | undefined;
607
+ }
608
+ /**
609
+ * @public
610
+ */
611
+ interface VideoClipPart {
612
+ id: string | undefined;
613
+ duration_ms: number | undefined;
614
+ /**
615
+ * Types of parts that can be contained in tracks
616
+ * @public
617
+ */
618
+ kind: PartKind | undefined;
619
+ play_in: number | undefined;
620
+ play_out: number | undefined;
621
+ volume: number | undefined;
622
+ origin_media_id: string | undefined;
623
+ speed_shift?: SpeedShift | undefined;
624
+ }
625
+ /**
626
+ * @public
627
+ */
628
+ type PartUnion = PartUnion.BgmMember | PartUnion.CaptionMember | PartUnion.SpeechMember | PartUnion.Video_clipMember | PartUnion.$UnknownMember;
629
+ /**
630
+ * @public
631
+ */
632
+ declare namespace PartUnion {
633
+ interface Video_clipMember {
634
+ video_clip: VideoClipPart;
635
+ bgm?: never;
636
+ speech?: never;
637
+ caption?: never;
638
+ $unknown?: never;
639
+ }
640
+ interface BgmMember {
641
+ video_clip?: never;
642
+ bgm: BgmPart$1;
643
+ speech?: never;
644
+ caption?: never;
645
+ $unknown?: never;
646
+ }
647
+ interface SpeechMember {
648
+ video_clip?: never;
649
+ bgm?: never;
650
+ speech: SpeechPart$1;
651
+ caption?: never;
652
+ $unknown?: never;
653
+ }
654
+ interface CaptionMember {
655
+ video_clip?: never;
656
+ bgm?: never;
657
+ speech?: never;
658
+ caption: CaptionPart$1;
659
+ $unknown?: never;
660
+ }
661
+ /**
662
+ * @public
663
+ */
664
+ interface $UnknownMember {
665
+ video_clip?: never;
666
+ bgm?: never;
667
+ speech?: never;
668
+ caption?: never;
669
+ $unknown: [string, any];
670
+ }
671
+ interface Visitor<T> {
672
+ video_clip: (value: VideoClipPart) => T;
673
+ bgm: (value: BgmPart$1) => T;
674
+ speech: (value: SpeechPart$1) => T;
675
+ caption: (value: CaptionPart$1) => T;
676
+ _: (name: string, value: any) => T;
677
+ }
678
+ const visit: <T>(value: PartUnion, visitor: Visitor<T>) => T;
679
+ }
680
+ /**
681
+ * Timeline configuration for video editing
682
+ * @public
683
+ */
684
+ interface Timeline {
685
+ duration_ms: number | undefined;
686
+ unit_time_ms: number | undefined;
687
+ }
688
+ /**
689
+ * Complete video draft information with timeline and tracks
690
+ * @public
691
+ */
692
+ interface VideoDraft$1 {
693
+ id?: string | undefined;
694
+ project_id: string | undefined;
695
+ owner_id: string | undefined;
696
+ /**
697
+ * for-code-gen: property value may be empty string ("")
698
+ * @public
699
+ */
700
+ thumbnail_storage_key: string | undefined;
701
+ /**
702
+ * Timeline configuration for video editing
703
+ * @public
704
+ */
705
+ timeline?: Timeline | undefined;
706
+ video_creation_settings?: VideoCreationSettings$1 | undefined;
707
+ chat_session_id: string | undefined;
708
+ main_track?: Track | undefined;
709
+ above_main_tracks: Track[] | undefined;
710
+ below_main_tracks: Track[] | undefined;
711
+ part_aggregations: PartAggregation[] | undefined;
712
+ part_library: Record<string, PartUnion> | undefined;
713
+ version: number | undefined;
714
+ }
715
+ //#endregion
716
+ //#region src/dsl/projection/video-draft-types.d.ts
717
+ type VideoDraftTrack = Track;
718
+ type VideoDraftTrackItem = TrackItem;
719
+ type VideoDraftTimeline = Timeline;
720
+ type VideoDraftCaptionStyle = CaptionStyle;
721
+ interface CaptionDisplayCue {
722
+ segmentId: string;
723
+ text: string;
724
+ startMs: number;
725
+ durationMs: number;
726
+ }
727
+ type VideoCreationSettings = Omit<VideoCreationSettings$1, 'video_style_id' | 'duration_ms'> & {
728
+ video_style_id?: string | null;
729
+ duration_ms?: number | null;
730
+ };
731
+ type VideoPart = Omit<VideoClipPart, 'duration_ms'>;
732
+ type SpeechPart = Omit<SpeechPart$1, 'duration_ms'> & {
733
+ media_duration_ms?: number;
734
+ };
735
+ type CaptionPart = Omit<CaptionPart$1, 'duration_ms'> & {
736
+ initial_duration_ms?: number;
737
+ display_cues?: CaptionDisplayCue[];
738
+ };
739
+ type BgmPart = Omit<BgmPart$1, 'duration_ms'>;
740
+ /** Legacy inputs may omit derived durations; output always states the field. */
741
+ type VideoDraftPartUnion = {
742
+ video_clip: VideoPart & {
743
+ duration_ms?: number;
744
+ };
745
+ speech?: never;
746
+ caption?: never;
747
+ bgm?: never;
748
+ } | {
749
+ video_clip?: never;
750
+ speech: SpeechPart & {
751
+ duration_ms?: number;
752
+ };
753
+ caption?: never;
754
+ bgm?: never;
755
+ } | {
756
+ video_clip?: never;
757
+ speech?: never;
758
+ caption: CaptionPart & {
759
+ duration_ms?: number;
760
+ };
761
+ bgm?: never;
762
+ } | {
763
+ video_clip?: never;
764
+ speech?: never;
765
+ caption?: never;
766
+ bgm: BgmPart & {
767
+ duration_ms?: number;
768
+ };
769
+ };
770
+ type VideoDraftContentPartUnion = {
771
+ video_clip: VideoPart & {
772
+ duration_ms: number | undefined;
773
+ };
774
+ speech?: never;
775
+ caption?: never;
776
+ bgm?: never;
777
+ } | {
778
+ video_clip?: never;
779
+ speech: SpeechPart & {
780
+ duration_ms: number | undefined;
781
+ };
782
+ caption?: never;
783
+ bgm?: never;
784
+ } | {
785
+ video_clip?: never;
786
+ speech?: never;
787
+ caption: CaptionPart & {
788
+ duration_ms: number | undefined;
789
+ };
790
+ bgm?: never;
791
+ } | {
792
+ video_clip?: never;
793
+ speech?: never;
794
+ caption?: never;
795
+ bgm: BgmPart & {
796
+ duration_ms: number | undefined;
797
+ };
798
+ };
799
+ type VideoDraft = Omit<VideoDraft$1, 'part_library' | 'video_creation_settings'> & {
800
+ part_library: Record<string, VideoDraftPartUnion> | undefined;
801
+ video_creation_settings?: VideoCreationSettings;
802
+ };
803
+ type VideoDraftContent = Pick<VideoDraft, 'timeline' | 'main_track' | 'above_main_tracks' | 'below_main_tracks' | 'part_aggregations'> & {
804
+ part_library: Record<string, VideoDraftContentPartUnion> | undefined;
805
+ };
806
+ type VideoDraftInput = Pick<VideoDraft, keyof VideoDraftContent>;
807
+ declare const DEFAULT_UNIT_TIME_MS = 33.333;
808
+ //#endregion
809
+ export { Track$1 as $, ContainNode as A, Media as B, Caption as C, CaptionText as D, CaptionStyle$1 as E, EntityTable as F, ResourceSystem as G, RelationTable as H, EntityTables as I, TextEdit as J, RichTextSnapshot as K, EntityValues as L, DslDiagnostic as M, DslMutation as N, Clip as O, EntityMutation as P, TimeAnchor as Q, FieldPatch as R, AudioScript as S, CaptionSelection as T, RelationTables as U, RelationMutation as V, RelationValues as W, TextMutation as X, TextMark as Y, TextRun as Z, defaultIdFactory as _, VideoDraftCaptionStyle as a, tupleHash as b, VideoDraftInput as c, VideoDraftTrack as d, TrackRole as et, VideoDraftTrackItem as f, EntityIdKind as g, DslIdFactory as h, VideoDraft as i, DeepReadonly as j, ContainMutation as k, VideoDraftPartUnion as l, OpActor as m, DEFAULT_UNIT_TIME_MS as n, VideoDraftContent as o, CommitOptions as p, TextDelta as q, VideoCreationSettings as r, VideoDraftContentPartUnion as s, CaptionDisplayCue as t, Voice as tt, VideoDraftTimeline as u, relationId as v, CaptionContent as w, Asset as x, resourceId as y, MedeoDslSnapshot as z };