@mengine/medeo-tool 1.0.1-alpha.2 → 1.2.1-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +118 -8
- package/dist/entity-contract-C5HHaYKk.d.mts +228 -0
- package/dist/index.d.mts +320 -54
- package/dist/index.mjs +1672 -129
- package/dist/index.mjs.map +1 -1
- package/dist/sandbox-api.d.mts +476 -643
- package/dist/script-session-B4fLNe-p.mjs +1942 -0
- package/dist/script-session-B4fLNe-p.mjs.map +1 -0
- package/dist/worker-entry.d.mts +6 -3
- package/dist/worker-entry.mjs +316 -8
- package/dist/worker-entry.mjs.map +1 -1
- package/package.json +4 -3
- package/dist/script-session-B8fc9Ccb.mjs +0 -439
- package/dist/script-session-B8fc9Ccb.mjs.map +0 -1
package/dist/sandbox-api.d.mts
CHANGED
|
@@ -1,669 +1,502 @@
|
|
|
1
|
-
//#region src/sandbox/generated/edit-sandbox-api.d.ts
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
interface
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
//#region src/sandbox/generated/entity-edit-sandbox-api.d.ts
|
|
2
|
+
/** @generated by gen:sandbox-dts. Entity-native editor contract; DO NOT EDIT. */
|
|
3
|
+
interface AudioMediaAssetFact {
|
|
4
|
+
readonly assetId: string;
|
|
5
|
+
readonly kind: 'audio';
|
|
6
|
+
readonly durationMs: number;
|
|
7
|
+
readonly storageKey: string;
|
|
8
|
+
}
|
|
9
|
+
interface BoundedDerivedSequencePayload extends JsonObject {
|
|
10
|
+
extent: {
|
|
11
|
+
kind: 'bounded';
|
|
12
|
+
start: number;
|
|
13
|
+
end: number;
|
|
14
|
+
};
|
|
15
|
+
sampling: 'derived';
|
|
16
|
+
coordinateSpace: JsonValue;
|
|
17
|
+
}
|
|
18
|
+
interface BoundedNativeSequencePayload extends JsonObject {
|
|
19
|
+
/** Factual coordinates from recalled media metadata; never invent an end/duration. */
|
|
20
|
+
extent: {
|
|
21
|
+
kind: 'bounded';
|
|
22
|
+
start: number;
|
|
23
|
+
end: number;
|
|
24
|
+
};
|
|
25
|
+
sampling: 'native';
|
|
26
|
+
coordinateSpace: JsonValue;
|
|
27
|
+
}
|
|
28
|
+
interface CaptionFontDescriptor {
|
|
29
|
+
readonly system: 'font-library';
|
|
30
|
+
readonly key: string;
|
|
31
|
+
}
|
|
32
|
+
interface CaptionStyleFields {
|
|
33
|
+
readonly font?: CaptionFontDescriptor;
|
|
34
|
+
readonly fontSize?: number;
|
|
35
|
+
readonly fontColor?: string;
|
|
36
|
+
readonly fontWeight?: number;
|
|
37
|
+
readonly entranceAnimation?: string;
|
|
38
|
+
readonly entranceAnimationDurationMs?: number;
|
|
39
|
+
readonly strokeColor?: string;
|
|
40
|
+
readonly strokeWidth?: number;
|
|
41
|
+
readonly positionX?: number;
|
|
42
|
+
readonly positionY?: number;
|
|
43
|
+
}
|
|
44
|
+
type ClipEntityId = EntityId;
|
|
45
|
+
type ClipPlacement = {
|
|
46
|
+
readonly kind: 'sequential';
|
|
47
|
+
readonly order: number;
|
|
48
|
+
} | {
|
|
49
|
+
readonly kind: 'absolute';
|
|
50
|
+
readonly targetRange: SequenceRange<number>;
|
|
51
|
+
} | {
|
|
52
|
+
readonly kind: 'anchored';
|
|
53
|
+
readonly hostClipEntityId: string;
|
|
54
|
+
readonly anchorOffset: number;
|
|
55
|
+
};
|
|
56
|
+
type CreateEntityInput = { [K in KnownEntityKind]: {
|
|
57
|
+
entity_id?: string;
|
|
58
|
+
entity_kind: K;
|
|
59
|
+
payload: EntityPayloadByKind[K];
|
|
60
|
+
} }[KnownEntityKind];
|
|
61
|
+
interface DeleteBgmInput {
|
|
62
|
+
readonly timelineEntityId: string;
|
|
63
|
+
}
|
|
64
|
+
interface DeleteClipInput {
|
|
65
|
+
readonly clipEntityId: string;
|
|
66
|
+
}
|
|
67
|
+
interface DeleteClipTreeInput {
|
|
68
|
+
readonly clipEntityIds: readonly string[];
|
|
69
|
+
readonly onAnchored: 'cascade' | 'detach';
|
|
70
|
+
}
|
|
71
|
+
interface DeleteEntityInput {
|
|
72
|
+
entity_id: string;
|
|
73
|
+
}
|
|
74
|
+
interface DeleteVoiceoverInput {
|
|
75
|
+
readonly voiceoverClipEntityIds: readonly string[];
|
|
76
|
+
}
|
|
77
|
+
type EmptyRelationKind = 'timeline-track' | 'track-clip' | 'clip-marker' | 'marker-content' | 'axvideo-marker' | 'marker-timeline';
|
|
78
|
+
interface EntityFacade {
|
|
79
|
+
list(): SandboxEntity[];
|
|
80
|
+
get(entityId: string): SandboxEntity | null;
|
|
81
|
+
/** Find document resources by external Memota asset id, including directly composed media variants. */
|
|
82
|
+
findByAssetId(assetId: string): SandboxEntity<ResourceEntityKind>[];
|
|
83
|
+
create(input: CreateEntityInput): string;
|
|
84
|
+
/** Replace one Entity's owned payload without changing its identity or kind. */
|
|
85
|
+
update(input: UpdateEntityInput): void;
|
|
86
|
+
/** Delete an Entity only after all of its incident Relations have been explicitly unlinked. */
|
|
87
|
+
delete(input: DeleteEntityInput): void;
|
|
88
|
+
/** Get or create one typed Asset by factual external id and return its single content identity. Never creates a Clip. */
|
|
89
|
+
ensureMedia(fact: MediaAssetFact): {
|
|
90
|
+
contentEntityId: string;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
type EntityId = string;
|
|
94
|
+
interface EntityPayloadByKind {
|
|
95
|
+
axvideo: BoundedDerivedSequencePayload;
|
|
96
|
+
timeline: JsonObject;
|
|
97
|
+
track: JsonObject & {
|
|
98
|
+
hidden?: boolean;
|
|
99
|
+
role?: string;
|
|
100
|
+
};
|
|
101
|
+
clip: JsonObject;
|
|
102
|
+
/** Inline caption text; external media uses a typed Asset variant. */
|
|
103
|
+
asset: JsonObject;
|
|
104
|
+
video: BoundedNativeSequencePayload & MediaAssetPayload;
|
|
105
|
+
audio: BoundedNativeSequencePayload & MediaAssetPayload;
|
|
106
|
+
voice: BoundedNativeSequencePayload & MediaAssetPayload;
|
|
107
|
+
image: UnboundedConstantSequencePayload & MediaAssetPayload;
|
|
108
|
+
'sequence-marker': JsonObject & {
|
|
109
|
+
sourceRange: {
|
|
110
|
+
start: number;
|
|
111
|
+
end: number;
|
|
112
|
+
};
|
|
113
|
+
targetRange?: {
|
|
114
|
+
start: number;
|
|
115
|
+
end: number;
|
|
37
116
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
keyframes: {
|
|
44
|
-
/**
|
|
45
|
-
* @constraint min(0)
|
|
46
|
-
* @constraint max(1)
|
|
47
|
-
*/
|
|
48
|
-
position: number;
|
|
49
|
-
/**
|
|
50
|
-
* @constraint min(0)
|
|
51
|
-
*/
|
|
52
|
-
rate: number;
|
|
53
|
-
/**
|
|
54
|
-
* Bezier tangent handle (x, y)
|
|
55
|
-
*/
|
|
56
|
-
in_tangent?: {
|
|
57
|
-
x: number;
|
|
58
|
-
y: number;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Bezier tangent handle (x, y)
|
|
62
|
-
*/
|
|
63
|
-
out_tangent?: {
|
|
64
|
-
x: number;
|
|
65
|
-
y: number;
|
|
66
|
-
};
|
|
67
|
-
}[];
|
|
117
|
+
duration: {
|
|
118
|
+
mode: 'from-source';
|
|
119
|
+
} | {
|
|
120
|
+
mode: 'fixed';
|
|
121
|
+
value: number;
|
|
68
122
|
};
|
|
123
|
+
timeRemapping?: JsonValue;
|
|
124
|
+
anchorOffset?: number;
|
|
125
|
+
durationPolicy?: 'timeline';
|
|
126
|
+
};
|
|
127
|
+
viewport: JsonObject;
|
|
128
|
+
'audio-script': JsonObject & {
|
|
129
|
+
segments: ScriptTextSegment[];
|
|
69
130
|
};
|
|
131
|
+
'phonetic-script': JsonObject & {
|
|
132
|
+
segments: ScriptTextSegment[];
|
|
133
|
+
};
|
|
134
|
+
caption: BoundedNativeSequencePayload;
|
|
70
135
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @constraint minLength(1)
|
|
77
|
-
*/
|
|
78
|
-
id: string;
|
|
79
|
-
name: string;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* A materialized speech-subtree write (speeches + their captions).
|
|
83
|
-
*/
|
|
84
|
-
interface SpeechAssets {
|
|
85
|
-
/**
|
|
86
|
-
* Materialized speech parts to write
|
|
87
|
-
* @constraint minLength(1)
|
|
88
|
-
*/
|
|
89
|
-
speeches: {
|
|
90
|
-
/**
|
|
91
|
-
* The speech part ID (= side-effect speech_parts[].id)
|
|
92
|
-
* @constraint minLength(1)
|
|
93
|
-
*/
|
|
94
|
-
speech_id: string;
|
|
95
|
-
/**
|
|
96
|
-
* Host video clip part ID the speech anchors to (RFC 02 §4)
|
|
97
|
-
* @constraint minLength(1)
|
|
98
|
-
*/
|
|
99
|
-
anchor_part_id: string;
|
|
100
|
-
/**
|
|
101
|
-
* Offset within the host clip (speech.abs = host.abs + offset_ms)
|
|
102
|
-
* @constraint int
|
|
103
|
-
* @constraint min(0)
|
|
104
|
-
*/
|
|
105
|
-
offset_ms: number;
|
|
106
|
-
/**
|
|
107
|
-
* @constraint minLength(1)
|
|
108
|
-
*/
|
|
109
|
-
audio_storage_key: string;
|
|
110
|
-
/**
|
|
111
|
-
* Duration in milliseconds (> 0)
|
|
112
|
-
* @constraint int
|
|
113
|
-
* @constraint positive
|
|
114
|
-
*/
|
|
115
|
-
duration_ms: number;
|
|
116
|
-
audio_script: string;
|
|
117
|
-
/**
|
|
118
|
-
* Volume in decibels (-60.0 to 20.0; 0.0 = original, -60 = mute, +20 = max)
|
|
119
|
-
* @constraint min(-60)
|
|
120
|
-
* @constraint max(20)
|
|
121
|
-
*/
|
|
122
|
-
volume: number;
|
|
123
|
-
/**
|
|
124
|
-
* TTS voice summary attached to a speech
|
|
125
|
-
*/
|
|
126
|
-
voice: {
|
|
127
|
-
/**
|
|
128
|
-
* @constraint minLength(1)
|
|
129
|
-
*/
|
|
130
|
-
id: string;
|
|
131
|
-
name: string;
|
|
132
|
-
};
|
|
133
|
-
/**
|
|
134
|
-
* @constraint minLength(1)
|
|
135
|
-
*/
|
|
136
|
-
origin_speech_id: string;
|
|
137
|
-
/**
|
|
138
|
-
* Caption part IDs owned by this speech
|
|
139
|
-
*/
|
|
140
|
-
caption_ids: string[];
|
|
141
|
-
}[];
|
|
142
|
-
/**
|
|
143
|
-
* Materialized caption parts owned by the speeches
|
|
144
|
-
*/
|
|
145
|
-
captions: {
|
|
146
|
-
/**
|
|
147
|
-
* The caption part ID (= side-effect created_caption_parts[].id)
|
|
148
|
-
* @constraint minLength(1)
|
|
149
|
-
*/
|
|
150
|
-
caption_id: string;
|
|
151
|
-
/**
|
|
152
|
-
* The owning speech part ID
|
|
153
|
-
* @constraint minLength(1)
|
|
154
|
-
*/
|
|
155
|
-
speech_part_id: string;
|
|
156
|
-
text: string;
|
|
157
|
-
/**
|
|
158
|
-
* Offset within the host speech (caption.abs = speech.abs + start_ms)
|
|
159
|
-
* @constraint int
|
|
160
|
-
* @constraint min(0)
|
|
161
|
-
*/
|
|
162
|
-
start_ms: number;
|
|
163
|
-
/**
|
|
164
|
-
* Duration in milliseconds (> 0)
|
|
165
|
-
* @constraint int
|
|
166
|
-
* @constraint positive
|
|
167
|
-
*/
|
|
168
|
-
duration_ms: number;
|
|
169
|
-
}[];
|
|
136
|
+
interface EntityStoreSnapshot {
|
|
137
|
+
revision: number;
|
|
138
|
+
entities: SandboxEntity[];
|
|
139
|
+
relations: SandboxRelation[];
|
|
170
140
|
}
|
|
171
|
-
interface
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
*/
|
|
176
|
-
clips: {
|
|
177
|
-
/**
|
|
178
|
-
* The video clip part ID to move
|
|
179
|
-
* @constraint minLength(1)
|
|
180
|
-
*/
|
|
181
|
-
clip_id: string;
|
|
182
|
-
/**
|
|
183
|
-
* New absolute start time in milliseconds on the timeline
|
|
184
|
-
* @constraint int
|
|
185
|
-
* @constraint min(0)
|
|
186
|
-
*/
|
|
187
|
-
new_start_ms: number;
|
|
188
|
-
/**
|
|
189
|
-
* Target track ID to move the clip to (optional)
|
|
190
|
-
* @constraint minLength(1)
|
|
191
|
-
*/
|
|
192
|
-
new_track_id?: string;
|
|
193
|
-
}[];
|
|
141
|
+
interface ImageMediaAssetFact {
|
|
142
|
+
readonly assetId: string;
|
|
143
|
+
readonly kind: 'image';
|
|
144
|
+
readonly storageKey?: string;
|
|
194
145
|
}
|
|
195
|
-
interface
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
*/
|
|
204
|
-
on_anchored?: 'cascade' | 'detach';
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Add video clips to a track.
|
|
208
|
-
*/
|
|
209
|
-
interface AddVideoClipsInput {
|
|
210
|
-
/**
|
|
211
|
-
* List of video clips to create
|
|
212
|
-
* @constraint minLength(1)
|
|
213
|
-
*/
|
|
214
|
-
clips: {
|
|
215
|
-
/**
|
|
216
|
-
* The media asset ID for the video clip
|
|
217
|
-
* @constraint minLength(1)
|
|
218
|
-
*/
|
|
219
|
-
media_id: string;
|
|
220
|
-
/**
|
|
221
|
-
* Absolute start time in milliseconds on the timeline
|
|
222
|
-
* @constraint int
|
|
223
|
-
* @constraint min(0)
|
|
224
|
-
*/
|
|
225
|
-
start_ms?: number;
|
|
226
|
-
/**
|
|
227
|
-
* The source media's intrinsic full length in ms
|
|
228
|
-
* @constraint int
|
|
229
|
-
* @constraint positive
|
|
230
|
-
*/
|
|
231
|
-
media_duration_ms: number;
|
|
232
|
-
/**
|
|
233
|
-
* Trim window start in the media (default 0)
|
|
234
|
-
* @constraint int
|
|
235
|
-
* @constraint min(0)
|
|
236
|
-
*/
|
|
237
|
-
play_in?: number;
|
|
238
|
-
/**
|
|
239
|
-
* Trim window end in the media (default media_duration_ms)
|
|
240
|
-
* @constraint int
|
|
241
|
-
* @constraint positive
|
|
242
|
-
*/
|
|
243
|
-
play_out?: number;
|
|
244
|
-
/**
|
|
245
|
-
* Target track ID (optional, defaults to main track)
|
|
246
|
-
* @constraint minLength(1)
|
|
247
|
-
*/
|
|
248
|
-
track_id?: string;
|
|
249
|
-
}[];
|
|
250
|
-
/**
|
|
251
|
-
* Insert new clips before this clip ID
|
|
252
|
-
* @constraint minLength(1)
|
|
253
|
-
*/
|
|
254
|
-
before_clip_id?: string;
|
|
255
|
-
/**
|
|
256
|
-
* Insert new clips after this clip ID
|
|
257
|
-
* @constraint minLength(1)
|
|
258
|
-
*/
|
|
259
|
-
after_clip_id?: string;
|
|
260
|
-
}
|
|
261
|
-
interface AdjustVideoClipVolumeInput {
|
|
262
|
-
/**
|
|
263
|
-
* List of video clips with their new volume settings
|
|
264
|
-
* @constraint minLength(1)
|
|
265
|
-
*/
|
|
266
|
-
clips: {
|
|
267
|
-
/**
|
|
268
|
-
* The video clip part ID to adjust volume for
|
|
269
|
-
* @constraint minLength(1)
|
|
270
|
-
*/
|
|
271
|
-
clip_id: string;
|
|
272
|
-
/**
|
|
273
|
-
* Volume in decibels (-60.0 to 20.0; 0.0 = original)
|
|
274
|
-
* @constraint min(-60)
|
|
275
|
-
* @constraint max(20)
|
|
276
|
-
*/
|
|
277
|
-
volume: number;
|
|
278
|
-
}[];
|
|
146
|
+
interface InsertClipInput {
|
|
147
|
+
readonly trackEntityId: string;
|
|
148
|
+
/** Existing Sequence media Entity id. Asset ids and URLs are not content ids. */
|
|
149
|
+
readonly contentEntityId: string;
|
|
150
|
+
readonly sourceRange: SequenceRange<number>;
|
|
151
|
+
readonly duration: SequenceDuration<number>;
|
|
152
|
+
readonly targetRange?: SequenceRange<number>;
|
|
153
|
+
readonly clipPayload?: JsonObject;
|
|
279
154
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
clips: {
|
|
289
|
-
/**
|
|
290
|
-
* The video clip part ID to set speed for
|
|
291
|
-
* @constraint minLength(1)
|
|
292
|
-
*/
|
|
293
|
-
clip_id: string;
|
|
294
|
-
/**
|
|
295
|
-
* The new speed setting, or null to reset to 1×
|
|
296
|
-
*/
|
|
297
|
-
speed_shift: {
|
|
298
|
-
category: 'linear' | 'curve';
|
|
299
|
-
mode: string;
|
|
300
|
-
config: {
|
|
301
|
-
linear: {
|
|
302
|
-
/**
|
|
303
|
-
* @constraint positive
|
|
304
|
-
*/
|
|
305
|
-
speed: number;
|
|
306
|
-
};
|
|
307
|
-
} | {
|
|
308
|
-
curve: {
|
|
309
|
-
/**
|
|
310
|
-
* @constraint minLength(2)
|
|
311
|
-
*/
|
|
312
|
-
keyframes: {
|
|
313
|
-
/**
|
|
314
|
-
* @constraint min(0)
|
|
315
|
-
* @constraint max(1)
|
|
316
|
-
*/
|
|
317
|
-
position: number;
|
|
318
|
-
/**
|
|
319
|
-
* @constraint min(0)
|
|
320
|
-
*/
|
|
321
|
-
rate: number;
|
|
322
|
-
/**
|
|
323
|
-
* Bezier tangent handle (x, y)
|
|
324
|
-
*/
|
|
325
|
-
in_tangent?: {
|
|
326
|
-
x: number;
|
|
327
|
-
y: number;
|
|
328
|
-
};
|
|
329
|
-
/**
|
|
330
|
-
* Bezier tangent handle (x, y)
|
|
331
|
-
*/
|
|
332
|
-
out_tangent?: {
|
|
333
|
-
x: number;
|
|
334
|
-
y: number;
|
|
335
|
-
};
|
|
336
|
-
}[];
|
|
337
|
-
};
|
|
338
|
-
};
|
|
339
|
-
} | null;
|
|
340
|
-
}[];
|
|
155
|
+
interface InsertMediaClipInput {
|
|
156
|
+
readonly timelineEntityId: string;
|
|
157
|
+
readonly clipEntityId?: string;
|
|
158
|
+
readonly media: VisualMediaAssetFact;
|
|
159
|
+
/** Source/display window in whole milliseconds. Images use this as their finite display span. */
|
|
160
|
+
readonly sourceRange: SequenceRange<number>;
|
|
161
|
+
readonly placement: ClipPlacement;
|
|
162
|
+
readonly volume?: number;
|
|
341
163
|
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
* Video clips whose media is being replaced
|
|
348
|
-
* @constraint minLength(1)
|
|
349
|
-
*/
|
|
350
|
-
clips: {
|
|
351
|
-
/**
|
|
352
|
-
* Existing video clip part ID to re-point
|
|
353
|
-
* @constraint minLength(1)
|
|
354
|
-
*/
|
|
355
|
-
clip_id: string;
|
|
356
|
-
/**
|
|
357
|
-
* The new media asset ID
|
|
358
|
-
* @constraint minLength(1)
|
|
359
|
-
*/
|
|
360
|
-
origin_media_id: string;
|
|
361
|
-
/**
|
|
362
|
-
* The new media's intrinsic full length
|
|
363
|
-
* @constraint int
|
|
364
|
-
* @constraint positive
|
|
365
|
-
*/
|
|
366
|
-
media_duration_ms: number;
|
|
367
|
-
/**
|
|
368
|
-
* Trim window start in the new media (usually 0)
|
|
369
|
-
* @constraint int
|
|
370
|
-
* @constraint min(0)
|
|
371
|
-
*/
|
|
372
|
-
play_in: number;
|
|
373
|
-
/**
|
|
374
|
-
* Trim window end in the new media (usually = media_duration_ms)
|
|
375
|
-
* @constraint int
|
|
376
|
-
* @constraint positive
|
|
377
|
-
*/
|
|
378
|
-
play_out: number;
|
|
379
|
-
/**
|
|
380
|
-
* Volume in decibels (-60.0 to 20.0; 0.0 = original, -60 = mute, +20 = max)
|
|
381
|
-
* @constraint min(-60)
|
|
382
|
-
* @constraint max(20)
|
|
383
|
-
*/
|
|
384
|
-
volume: number;
|
|
385
|
-
}[];
|
|
164
|
+
interface InsertMediaClipsInput {
|
|
165
|
+
readonly timelineEntityId: string;
|
|
166
|
+
readonly clips: readonly ReplacementMediaClipInput[];
|
|
167
|
+
/** One placement decision for the whole input-ordered block. */
|
|
168
|
+
readonly insertion: MediaClipInsertion;
|
|
386
169
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* The video clip part ID to re-trim
|
|
398
|
-
* @constraint minLength(1)
|
|
399
|
-
*/
|
|
400
|
-
clip_id: string;
|
|
401
|
-
/**
|
|
402
|
-
* New trim window start in the source media
|
|
403
|
-
* @constraint int
|
|
404
|
-
* @constraint min(0)
|
|
405
|
-
*/
|
|
406
|
-
play_in: number;
|
|
407
|
-
/**
|
|
408
|
-
* New trim window end in the source media
|
|
409
|
-
* @constraint int
|
|
410
|
-
* @constraint positive
|
|
411
|
-
*/
|
|
412
|
-
play_out: number;
|
|
413
|
-
}[];
|
|
170
|
+
interface InsertPlacedClipInput {
|
|
171
|
+
readonly trackEntityId: string;
|
|
172
|
+
readonly contentEntityId: string;
|
|
173
|
+
readonly sourceRange: SequenceRange<number>;
|
|
174
|
+
readonly duration: SequenceDuration<number>;
|
|
175
|
+
readonly placement: ClipPlacement;
|
|
176
|
+
readonly clipPayload?: JsonObject;
|
|
177
|
+
/** Stable caller-owned placement identity, when one already exists outside the graph. */
|
|
178
|
+
readonly clipEntityId?: string;
|
|
414
179
|
}
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
interface
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
*/
|
|
427
|
-
speech_ids: string[];
|
|
428
|
-
}
|
|
429
|
-
/**
|
|
430
|
-
* Move speeches in time.
|
|
431
|
-
*/
|
|
432
|
-
interface MoveSpeechesInput {
|
|
433
|
-
/**
|
|
434
|
-
* Speeches to move to new positions
|
|
435
|
-
* @constraint minLength(1)
|
|
436
|
-
*/
|
|
437
|
-
speeches: {
|
|
438
|
-
/**
|
|
439
|
-
* The speech part ID to move
|
|
440
|
-
* @constraint minLength(1)
|
|
441
|
-
*/
|
|
442
|
-
speech_id: string;
|
|
443
|
-
/**
|
|
444
|
-
* New absolute start time on the timeline
|
|
445
|
-
* @constraint int
|
|
446
|
-
* @constraint min(0)
|
|
447
|
-
*/
|
|
448
|
-
new_start_ms: number;
|
|
449
|
-
}[];
|
|
180
|
+
interface JsonObject {
|
|
181
|
+
[key: string]: JsonValue;
|
|
182
|
+
}
|
|
183
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
184
|
+
type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
|
|
185
|
+
type KnownEntityKind = 'axvideo' | 'timeline' | 'track' | 'clip' | 'asset' | 'video' | 'audio' | 'voice' | 'image' | 'sequence-marker' | 'viewport' | 'audio-script' | 'phonetic-script' | 'caption';
|
|
186
|
+
type KnownRelationKind = 'timeline-track' | 'track-clip' | 'clip-marker' | 'marker-content' | 'axvideo-marker' | 'marker-timeline' | 'physical-asset' | 'generated' | 'phonetic-script-provenance' | 'caption-provenance' | 'caption-alignment' | 'clip-anchor' | 'audio-script-render';
|
|
187
|
+
interface LinearClipSpeed {
|
|
188
|
+
readonly kind: 'linear';
|
|
189
|
+
readonly rate: number;
|
|
190
|
+
readonly mode?: string;
|
|
450
191
|
}
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
192
|
+
interface LinkAudioScriptRenderRelationInput {
|
|
193
|
+
relation_id?: string;
|
|
194
|
+
output_entity_id: string;
|
|
195
|
+
script_entity_id: string;
|
|
196
|
+
trace?: JsonObject;
|
|
197
|
+
}
|
|
198
|
+
interface LinkClipAnchorRelationInput {
|
|
199
|
+
relation_id?: string;
|
|
200
|
+
child_clip_entity_id: string;
|
|
201
|
+
host_clip_entity_id: string;
|
|
202
|
+
trace?: JsonObject;
|
|
203
|
+
}
|
|
204
|
+
interface LinkGeneratedRelationInput {
|
|
205
|
+
relation_id?: string;
|
|
206
|
+
output_entity_id: string;
|
|
207
|
+
input_entity_id: string;
|
|
208
|
+
trace?: JsonObject;
|
|
209
|
+
}
|
|
210
|
+
interface LinkRelationBase {
|
|
211
|
+
relation_id?: string;
|
|
212
|
+
endpoint_0_entity_id: string;
|
|
213
|
+
endpoint_1_entity_id: string;
|
|
214
|
+
trace?: JsonObject;
|
|
215
|
+
}
|
|
216
|
+
type LinkRelationInput = (LinkRelationBase & {
|
|
217
|
+
relation_kind: EmptyRelationKind;
|
|
218
|
+
metadata?: {
|
|
219
|
+
[key: string]: never;
|
|
220
|
+
};
|
|
221
|
+
}) | (LinkRelationBase & {
|
|
222
|
+
relation_kind: 'physical-asset';
|
|
223
|
+
metadata?: JsonObject;
|
|
224
|
+
}) | (LinkRelationBase & {
|
|
225
|
+
relation_kind: 'phonetic-script-provenance' | 'caption-provenance';
|
|
226
|
+
metadata: JsonObject & {
|
|
227
|
+
segmentAlignment: JsonValue;
|
|
228
|
+
};
|
|
229
|
+
}) | (LinkRelationBase & {
|
|
230
|
+
relation_kind: 'caption-alignment';
|
|
231
|
+
metadata: JsonObject & {
|
|
232
|
+
alignment: JsonValue;
|
|
233
|
+
};
|
|
234
|
+
});
|
|
235
|
+
/** Facts resolved from media storage. A trim window never substitutes for intrinsic duration. */
|
|
236
|
+
type MediaAssetFact = ImageMediaAssetFact | VideoMediaAssetFact | AudioMediaAssetFact | VoiceMediaAssetFact;
|
|
237
|
+
type MediaAssetPayload = JsonObject & {
|
|
238
|
+
external: {
|
|
239
|
+
system: 'memota' | 'memota-speech';
|
|
240
|
+
key: string;
|
|
241
|
+
};
|
|
242
|
+
storageKey?: string;
|
|
243
|
+
};
|
|
244
|
+
type MediaClipInsertion = {
|
|
245
|
+
readonly kind: 'before';
|
|
246
|
+
readonly clipEntityId: string;
|
|
247
|
+
} | {
|
|
248
|
+
readonly kind: 'after';
|
|
249
|
+
readonly clipEntityId: string;
|
|
250
|
+
} | {
|
|
251
|
+
readonly kind: 'firstStart';
|
|
252
|
+
readonly startMs: number;
|
|
253
|
+
};
|
|
254
|
+
interface MoveClipInput {
|
|
255
|
+
readonly clipEntityId: string;
|
|
256
|
+
readonly trackEntityId: string;
|
|
257
|
+
}
|
|
258
|
+
interface MoveClipsToStartsInput {
|
|
259
|
+
readonly moves: readonly {
|
|
260
|
+
readonly clipEntityId: string;
|
|
261
|
+
readonly newStartMs: number;
|
|
473
262
|
}[];
|
|
263
|
+
/** Absolute-time drags preserve every voiceover's current visible landing. */
|
|
264
|
+
readonly onAnchored: 'keepAbsolute';
|
|
474
265
|
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
/**
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
266
|
+
interface MoveSequentialClipsInput {
|
|
267
|
+
readonly clipEntityIds: readonly string[];
|
|
268
|
+
readonly anchor: SequentialClipAnchor;
|
|
269
|
+
readonly onAnchored: 'follow' | 'keepAbsolute';
|
|
270
|
+
}
|
|
271
|
+
interface MoveVoiceoverInput {
|
|
272
|
+
readonly voiceoverClipEntityId: string;
|
|
273
|
+
/** Absolute requested timeline start; MEngine resolves and persists the host relation. */
|
|
274
|
+
readonly newStartMs: number;
|
|
275
|
+
}
|
|
276
|
+
interface PatchCaptionStyleInput {
|
|
277
|
+
readonly timelineEntityId: string;
|
|
278
|
+
readonly style: CaptionStyleFields;
|
|
279
|
+
}
|
|
280
|
+
interface RelationFacade {
|
|
281
|
+
list(): SandboxRelation[];
|
|
282
|
+
/** Incident lookup is endpoint-agnostic; persisted endpoint positions stay unchanged. */
|
|
283
|
+
of(entityId: string, relationKind?: KnownRelationKind): SandboxRelation[];
|
|
284
|
+
/** physical-asset binds inline Caption text, never external media. */
|
|
285
|
+
link(input: LinkRelationInput): string;
|
|
286
|
+
/** Author ordered generated(output,input); generic link() deliberately rejects this kind. */
|
|
287
|
+
linkGenerated(input: LinkGeneratedRelationInput): string;
|
|
288
|
+
/** Author ordered clip-anchor(child,host) without positional endpoint ambiguity. */
|
|
289
|
+
linkClipAnchor(input: LinkClipAnchorRelationInput): string;
|
|
290
|
+
/** Author ordered audio-script-render(output,script) without positional endpoint ambiguity. */
|
|
291
|
+
linkAudioScriptRender(input: LinkAudioScriptRenderRelationInput): string;
|
|
292
|
+
/** Remove a Relation by identity; endpoint replacement is an explicit unlink plus link. */
|
|
293
|
+
unlink(input: UnlinkRelationInput): void;
|
|
294
|
+
}
|
|
295
|
+
interface ReplaceClipContentInput {
|
|
296
|
+
readonly clipEntityId: string;
|
|
297
|
+
/** Existing Sequence media Entity id. Asset ids and URLs are not content ids. */
|
|
298
|
+
readonly contentEntityId: string;
|
|
299
|
+
readonly sourceRange: SequenceRange<number>;
|
|
300
|
+
readonly duration: SequenceDuration<number>;
|
|
301
|
+
readonly targetRange?: SequenceRange<number>;
|
|
302
|
+
readonly timeRemapping?: JsonValue;
|
|
303
|
+
}
|
|
304
|
+
interface ReplaceMediaClipInput {
|
|
305
|
+
readonly clipEntityId: string;
|
|
306
|
+
readonly media: VisualMediaAssetFact;
|
|
307
|
+
readonly sourceRange: SequenceRange<number>;
|
|
308
|
+
}
|
|
309
|
+
interface ReplaceSequentialClipsInput {
|
|
310
|
+
readonly timelineEntityId: string;
|
|
311
|
+
readonly oldClipEntityIds: readonly string[];
|
|
312
|
+
readonly newClips: readonly ReplacementMediaClipInput[];
|
|
313
|
+
readonly onAnchored: 'remap' | 'cascade';
|
|
314
|
+
}
|
|
315
|
+
interface ReplacementMediaClipInput {
|
|
316
|
+
readonly clipEntityId?: string;
|
|
317
|
+
readonly media: VisualMediaAssetFact;
|
|
318
|
+
readonly sourceRange: SequenceRange<number>;
|
|
319
|
+
readonly volume?: number;
|
|
320
|
+
}
|
|
321
|
+
/** Asset identity, either an old physical-only row or a directly composed media variant. */
|
|
322
|
+
type ResourceEntityKind = 'image' | 'video' | 'audio' | 'voice';
|
|
323
|
+
interface SandboxEntity<K extends KnownEntityKind = KnownEntityKind> {
|
|
324
|
+
entity_id: string;
|
|
325
|
+
entity_kind: K;
|
|
326
|
+
payload: EntityPayloadByKind[K];
|
|
327
|
+
}
|
|
328
|
+
interface SandboxRelation {
|
|
329
|
+
relation_id: string;
|
|
330
|
+
relation_kind: KnownRelationKind;
|
|
331
|
+
endpoint_0_entity_id: string;
|
|
332
|
+
endpoint_1_entity_id: string;
|
|
333
|
+
metadata: JsonObject;
|
|
334
|
+
trace: JsonObject;
|
|
335
|
+
}
|
|
336
|
+
type ScriptTextSegment = JsonObject & {
|
|
337
|
+
segmentId: string;
|
|
338
|
+
text: string;
|
|
339
|
+
language?: string;
|
|
340
|
+
};
|
|
341
|
+
type SequenceDuration<Span = unknown> = {
|
|
342
|
+
readonly mode: 'from-source';
|
|
343
|
+
} | {
|
|
344
|
+
readonly mode: 'fixed';
|
|
345
|
+
readonly value: Span;
|
|
346
|
+
};
|
|
347
|
+
interface SequenceRange<Point = unknown> {
|
|
348
|
+
readonly start: Point;
|
|
349
|
+
readonly end: Point;
|
|
350
|
+
}
|
|
351
|
+
type SequentialClipAnchor = {
|
|
352
|
+
readonly position: 'before' | 'after';
|
|
353
|
+
readonly clipEntityId: string;
|
|
354
|
+
} | {
|
|
355
|
+
readonly position: 'trackStart';
|
|
356
|
+
};
|
|
539
357
|
interface SetBgmInput {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
bgm_id: string;
|
|
545
|
-
/**
|
|
546
|
-
* @constraint minLength(1)
|
|
547
|
-
*/
|
|
548
|
-
audio_storage_key: string;
|
|
549
|
-
/**
|
|
550
|
-
* The media asset ID
|
|
551
|
-
* @constraint minLength(1)
|
|
552
|
-
*/
|
|
553
|
-
origin_media_id: string;
|
|
554
|
-
/**
|
|
555
|
-
* Volume in decibels (-60.0 to 20.0; 0.0 = original, -60 = mute, +20 = max)
|
|
556
|
-
* @constraint min(-60)
|
|
557
|
-
* @constraint max(20)
|
|
558
|
-
*/
|
|
559
|
-
volume: number;
|
|
560
|
-
}
|
|
561
|
-
/**
|
|
562
|
-
* Remove the document BGM.
|
|
563
|
-
*/
|
|
564
|
-
interface DeleteBgmInput {
|
|
565
|
-
[key: string]: never;
|
|
566
|
-
}
|
|
567
|
-
interface AdjustBgmVolumeInput {
|
|
568
|
-
/**
|
|
569
|
-
* List of bgm parts with their new volume settings
|
|
570
|
-
* @constraint minLength(1)
|
|
571
|
-
*/
|
|
572
|
-
bgm: {
|
|
573
|
-
/**
|
|
574
|
-
* The bgm part ID to adjust volume for
|
|
575
|
-
* @constraint minLength(1)
|
|
576
|
-
*/
|
|
577
|
-
bgm_id: string;
|
|
578
|
-
/**
|
|
579
|
-
* Volume in decibels (-60.0 to 20.0; 0.0 = original)
|
|
580
|
-
* @constraint min(-60)
|
|
581
|
-
* @constraint max(20)
|
|
582
|
-
*/
|
|
583
|
-
volume: number;
|
|
584
|
-
}[];
|
|
358
|
+
readonly timelineEntityId: string;
|
|
359
|
+
readonly bgmClipEntityId: string;
|
|
360
|
+
readonly media: AudioMediaAssetFact;
|
|
361
|
+
readonly volume: number;
|
|
585
362
|
}
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
/** Set the caption visual style. */
|
|
612
|
-
setCaptionStyle(input: SetCaptionStyleInput): Promise<void>;
|
|
613
|
-
/** Set the document BGM. */
|
|
614
|
-
setBgm(input: SetBgmInput): Promise<void>;
|
|
615
|
-
/** Remove the document BGM. */
|
|
616
|
-
deleteBgm(input: DeleteBgmInput): Promise<void>;
|
|
617
|
-
adjustBgmVolume(input: AdjustBgmVolumeInput): Promise<void>;
|
|
618
|
-
}
|
|
619
|
-
/** Clip hit from `clipsInRange`. */
|
|
620
|
-
interface TimelineClipDescriptor {
|
|
621
|
-
id: string;
|
|
622
|
-
start_ms: number;
|
|
623
|
-
end_ms: number;
|
|
624
|
-
duration_ms: number;
|
|
625
|
-
speed_shift: unknown;
|
|
626
|
-
volume: number | undefined;
|
|
627
|
-
media_id: string | undefined;
|
|
628
|
-
}
|
|
629
|
-
/** Part descriptor from `part(id)`. */
|
|
630
|
-
interface TimelinePartDescriptor {
|
|
631
|
-
id: string;
|
|
632
|
-
kind: string;
|
|
633
|
-
lane: string;
|
|
634
|
-
start_ms: number;
|
|
635
|
-
end_ms: number;
|
|
636
|
-
duration_ms: number;
|
|
637
|
-
part: unknown;
|
|
638
|
-
}
|
|
639
|
-
/** Opaque VideoDraft projection (full IDL lives in host document types). */
|
|
640
|
-
type VideoDraftProjection = {
|
|
641
|
-
readonly timeline?: {
|
|
642
|
-
readonly duration_ms?: number;
|
|
363
|
+
interface SetCaptionVisibilityInput {
|
|
364
|
+
readonly timelineEntityId: string;
|
|
365
|
+
readonly hidden: boolean;
|
|
366
|
+
}
|
|
367
|
+
interface SetClipPlacementInput {
|
|
368
|
+
readonly clipEntityId: string;
|
|
369
|
+
readonly placement: ClipPlacement;
|
|
370
|
+
}
|
|
371
|
+
interface SetClipSpeedInput {
|
|
372
|
+
readonly clipEntityId: string;
|
|
373
|
+
readonly timeRemapping: LinearClipSpeed | null;
|
|
374
|
+
}
|
|
375
|
+
interface SetClipVolumeInput {
|
|
376
|
+
readonly clipEntityId: string;
|
|
377
|
+
/** Playback gain in decibels. */
|
|
378
|
+
readonly volume: number;
|
|
379
|
+
}
|
|
380
|
+
interface TrimClipInput {
|
|
381
|
+
readonly clipEntityId: string;
|
|
382
|
+
readonly sourceRange: SequenceRange<number>;
|
|
383
|
+
}
|
|
384
|
+
interface UnboundedConstantSequencePayload extends JsonObject {
|
|
385
|
+
extent: {
|
|
386
|
+
kind: 'unbounded';
|
|
387
|
+
start: number;
|
|
643
388
|
};
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
389
|
+
sampling: 'constant';
|
|
390
|
+
coordinateSpace: JsonValue;
|
|
391
|
+
}
|
|
392
|
+
interface UnlinkRelationInput {
|
|
393
|
+
relation_id: string;
|
|
394
|
+
}
|
|
395
|
+
interface UpdateClipInput {
|
|
396
|
+
readonly clipEntityId: string;
|
|
397
|
+
/** Complete replacement for the Clip-owned payload. */
|
|
398
|
+
readonly payload: JsonObject;
|
|
399
|
+
}
|
|
400
|
+
interface UpdateClipMarkerInput {
|
|
401
|
+
readonly clipEntityId: string;
|
|
402
|
+
readonly sourceRange?: SequenceRange<number>;
|
|
403
|
+
/** Passing `undefined` explicitly removes the optional target range. */
|
|
404
|
+
readonly targetRange?: SequenceRange<number> | undefined;
|
|
405
|
+
readonly duration?: SequenceDuration<number>;
|
|
406
|
+
/** Passing `undefined` explicitly removes the optional remapping value. */
|
|
407
|
+
readonly timeRemapping?: JsonValue | undefined;
|
|
408
|
+
}
|
|
409
|
+
interface UpdateEntityInput {
|
|
410
|
+
entity_id: string;
|
|
411
|
+
payload: JsonObject;
|
|
412
|
+
}
|
|
413
|
+
interface VideoMediaAssetFact {
|
|
414
|
+
readonly assetId: string;
|
|
415
|
+
readonly kind: 'video';
|
|
416
|
+
readonly durationMs: number;
|
|
417
|
+
readonly storageKey?: string;
|
|
418
|
+
}
|
|
419
|
+
type VisualMediaAssetFact = ImageMediaAssetFact | VideoMediaAssetFact;
|
|
420
|
+
interface VoiceDescriptor {
|
|
421
|
+
readonly system: 'voice-library';
|
|
422
|
+
readonly key: string;
|
|
423
|
+
readonly name?: string;
|
|
424
|
+
}
|
|
425
|
+
interface VoiceMediaAssetFact {
|
|
426
|
+
/** Stable external speech result id, independent of the placed Clip id. */
|
|
427
|
+
readonly assetId: string;
|
|
428
|
+
readonly kind: 'voice';
|
|
429
|
+
readonly durationMs: number;
|
|
430
|
+
readonly storageKey: string;
|
|
431
|
+
readonly voice: VoiceDescriptor;
|
|
432
|
+
}
|
|
433
|
+
interface VoiceoverCaptionFact {
|
|
434
|
+
/** Stable placed caption identity supplied by the materialized side effect. */
|
|
435
|
+
readonly captionClipEntityId: string;
|
|
436
|
+
readonly text: string;
|
|
437
|
+
readonly startMs: number;
|
|
438
|
+
readonly durationMs: number;
|
|
439
|
+
readonly style?: CaptionStyleFields;
|
|
440
|
+
}
|
|
441
|
+
interface VoiceoverTakeInput {
|
|
442
|
+
readonly timelineEntityId: string;
|
|
443
|
+
/** Stable placed speech identity, distinct from media.assetId. */
|
|
444
|
+
readonly voiceoverClipEntityId: string;
|
|
445
|
+
readonly hostClipEntityId: string;
|
|
446
|
+
readonly anchorOffset: number;
|
|
447
|
+
readonly media: VoiceMediaAssetFact;
|
|
448
|
+
/** Complete spoken text; the editor owns the deterministic local script segment identity. */
|
|
449
|
+
readonly scriptText: string;
|
|
450
|
+
readonly volume: number;
|
|
451
|
+
readonly captions: readonly VoiceoverCaptionFact[];
|
|
452
|
+
}
|
|
453
|
+
interface VoiceoverTakeResult {
|
|
454
|
+
readonly voiceoverClipEntityId: string;
|
|
455
|
+
readonly voiceEntityId: string;
|
|
456
|
+
readonly audioScriptEntityId: string;
|
|
457
|
+
readonly captionClipEntityIds: readonly string[];
|
|
458
|
+
}
|
|
459
|
+
/** Timeline writes accept existing media Entity ids, never Memota asset ids or URLs. */
|
|
460
|
+
interface EditApi {
|
|
461
|
+
insertClip(input: InsertClipInput): ClipEntityId;
|
|
462
|
+
insertPlacedClip(input: InsertPlacedClipInput): ClipEntityId;
|
|
463
|
+
updateClipMarker(input: UpdateClipMarkerInput): void;
|
|
464
|
+
setClipPlacement(input: SetClipPlacementInput): void;
|
|
465
|
+
moveSequentialClips(input: MoveSequentialClipsInput): void;
|
|
466
|
+
moveClip(input: MoveClipInput): void;
|
|
467
|
+
replaceClipContent(input: ReplaceClipContentInput): void;
|
|
468
|
+
insertMediaClip(input: InsertMediaClipInput): ClipEntityId;
|
|
469
|
+
insertMediaClips(input: InsertMediaClipsInput): readonly ClipEntityId[];
|
|
470
|
+
replaceMediaClip(input: ReplaceMediaClipInput): void;
|
|
471
|
+
setClipVolume(input: SetClipVolumeInput): void;
|
|
472
|
+
setClipSpeed(input: SetClipSpeedInput): void;
|
|
473
|
+
trimClip(input: TrimClipInput): void;
|
|
474
|
+
replaceSequentialClips(input: ReplaceSequentialClipsInput): readonly ClipEntityId[];
|
|
475
|
+
deleteClip(input: DeleteClipInput): void;
|
|
476
|
+
deleteClipTree(input: DeleteClipTreeInput): void;
|
|
477
|
+
updateClip(input: UpdateClipInput): void;
|
|
478
|
+
upsertVoiceoverTake(input: VoiceoverTakeInput): VoiceoverTakeResult;
|
|
479
|
+
moveVoiceover(input: MoveVoiceoverInput): void;
|
|
480
|
+
moveClipsToStarts(input: MoveClipsToStartsInput): void;
|
|
481
|
+
deleteVoiceover(input: DeleteVoiceoverInput): void;
|
|
482
|
+
setBgm(input: SetBgmInput): ClipEntityId;
|
|
483
|
+
deleteBgm(input: DeleteBgmInput): void;
|
|
484
|
+
setCaptionVisibility(input: SetCaptionVisibilityInput): void;
|
|
485
|
+
patchCaptionStyle(input: PatchCaptionStyleInput): void;
|
|
486
|
+
}
|
|
647
487
|
interface TimelineApi {
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
/** Clips whose midpoint falls in `[startMs, endMs)`. */
|
|
651
|
-
clipsInRange(startMs: number, endMs: number): TimelineClipDescriptor[];
|
|
652
|
-
/** Look up a part by id, or null if missing. */
|
|
653
|
-
part(id: string): TimelinePartDescriptor | null;
|
|
654
|
-
}
|
|
655
|
-
/** Opaque checkpoint handle for rollback. */
|
|
488
|
+
snapshot(): EntityStoreSnapshot;
|
|
489
|
+
}
|
|
656
490
|
interface SandboxCheckpoint {
|
|
657
491
|
readonly index: number;
|
|
658
492
|
}
|
|
659
493
|
declare const edit: EditApi;
|
|
660
494
|
declare const timeline: TimelineApi;
|
|
661
|
-
|
|
495
|
+
declare const entities: EntityFacade;
|
|
496
|
+
declare const relations: RelationFacade;
|
|
662
497
|
declare function checkpoint(): SandboxCheckpoint;
|
|
663
|
-
/** Roll the sandbox document back to a prior checkpoint. */
|
|
664
498
|
declare function rollbackTo(cp: SandboxCheckpoint): void;
|
|
665
|
-
|
|
666
|
-
declare const inputs: unknown;
|
|
499
|
+
declare const inputs: Readonly<Record<string, unknown>>;
|
|
667
500
|
//#endregion
|
|
668
|
-
export type {
|
|
501
|
+
export type { AudioMediaAssetFact, BoundedDerivedSequencePayload, BoundedNativeSequencePayload, CaptionFontDescriptor, CaptionStyleFields, ClipEntityId, ClipPlacement, CreateEntityInput, DeleteBgmInput, DeleteClipInput, DeleteClipTreeInput, DeleteEntityInput, DeleteVoiceoverInput, EditApi, EmptyRelationKind, EntityFacade, EntityId, EntityPayloadByKind, EntityStoreSnapshot, ImageMediaAssetFact, InsertClipInput, InsertMediaClipInput, InsertMediaClipsInput, InsertPlacedClipInput, JsonObject, JsonPrimitive, JsonValue, KnownEntityKind, KnownRelationKind, LinearClipSpeed, LinkAudioScriptRenderRelationInput, LinkClipAnchorRelationInput, LinkGeneratedRelationInput, LinkRelationInput, MediaAssetFact, MediaAssetPayload, MediaClipInsertion, MoveClipInput, MoveClipsToStartsInput, MoveSequentialClipsInput, MoveVoiceoverInput, PatchCaptionStyleInput, RelationFacade, ReplaceClipContentInput, ReplaceMediaClipInput, ReplaceSequentialClipsInput, ReplacementMediaClipInput, ResourceEntityKind, SandboxCheckpoint, SandboxEntity, SandboxRelation, ScriptTextSegment, SequenceDuration, SequenceRange, SequentialClipAnchor, SetBgmInput, SetCaptionVisibilityInput, SetClipPlacementInput, SetClipSpeedInput, SetClipVolumeInput, TimelineApi, TrimClipInput, UnboundedConstantSequencePayload, UnlinkRelationInput, UpdateClipInput, UpdateClipMarkerInput, UpdateEntityInput, VideoMediaAssetFact, VisualMediaAssetFact, VoiceDescriptor, VoiceMediaAssetFact, VoiceoverCaptionFact, VoiceoverTakeInput, VoiceoverTakeResult, checkpoint, edit, entities, inputs, relations, rollbackTo, timeline };
|
|
669
502
|
//# sourceMappingURL=sandbox-api.d.mts.map
|