@mux/ai 0.39.0 → 0.41.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-Wjbq-_Z0.d.ts → index-C3PW73qH.d.ts} +206 -12
- package/dist/index.d.ts +2 -2
- package/dist/index.js +435 -122
- package/dist/index.js.map +1 -1
- package/dist/workflows/index.d.ts +1 -1
- package/dist/workflows/index.js +397 -97
- package/dist/workflows/index.js.map +1 -1
- package/package.json +17 -3
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { createAnthropic } from '@ai-sdk/anthropic';
|
|
3
3
|
import { createGoogleGenerativeAI } from '@ai-sdk/google';
|
|
4
4
|
import { createOpenAI } from '@ai-sdk/openai';
|
|
5
|
-
import { f as ScopedMuxAIOptions, I as ImageSubmissionMode, i as TokenUsage, M as MuxAIOptions, b as ChunkingStrategy, k as VideoEmbeddingsResult, H as Hotspot, v as Shot, j as ToneType, g as StorageAdapter } from './shots-CUI09Ohe.js';
|
|
5
|
+
import { l as WorkflowCredentialsInput, d as MuxAsset, A as AssetTextTrack, f as ScopedMuxAIOptions, I as ImageSubmissionMode, i as TokenUsage, M as MuxAIOptions, b as ChunkingStrategy, k as VideoEmbeddingsResult, H as Hotspot, v as Shot, j as ToneType, g as StorageAdapter } from './shots-CUI09Ohe.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Language Code Conversion Utilities
|
|
@@ -169,6 +169,138 @@ declare function isUndeterminedLanguageCode(code: string): boolean;
|
|
|
169
169
|
*/
|
|
170
170
|
declare function getLanguageName(code: string): string | undefined;
|
|
171
171
|
|
|
172
|
+
/**
|
|
173
|
+
* How a workflow treats tracks that already exist on the asset when it is
|
|
174
|
+
* about to create a new one.
|
|
175
|
+
*
|
|
176
|
+
* - `fail`: stop before doing any work if a same-language or same-name track exists.
|
|
177
|
+
* - `replace_all`: delete every same-language and same-name track first.
|
|
178
|
+
* - `replace_generated`: delete Mux-generated (ASR) tracks; stop if any other track is in the way.
|
|
179
|
+
* Audio tracks are never Mux-generated, so for audio this behaves like `fail`.
|
|
180
|
+
*/
|
|
181
|
+
type ReplaceExistingTracksPolicy = "fail" | "replace_all" | "replace_generated";
|
|
182
|
+
/** Mux track types that share a name-uniqueness group among themselves. */
|
|
183
|
+
type ReplaceableTrackType = "text" | "audio";
|
|
184
|
+
/** The `(type, language_code, name)` a workflow is about to write to Mux. `type` defaults to `text`. */
|
|
185
|
+
interface TextTrackTarget {
|
|
186
|
+
languageCode: string;
|
|
187
|
+
name: string;
|
|
188
|
+
type?: ReplaceableTrackType;
|
|
189
|
+
}
|
|
190
|
+
type TrackTarget = TextTrackTarget;
|
|
191
|
+
/** Serializable description of a track, safe to return across step boundaries. */
|
|
192
|
+
interface TextTrackSummary {
|
|
193
|
+
id: string;
|
|
194
|
+
type?: ReplaceableTrackType;
|
|
195
|
+
name?: string;
|
|
196
|
+
languageCode?: string;
|
|
197
|
+
status?: string;
|
|
198
|
+
textSource?: string;
|
|
199
|
+
passthrough?: string;
|
|
200
|
+
/** Audio only: the asset's original audio, which Mux refuses to delete. */
|
|
201
|
+
primary?: boolean;
|
|
202
|
+
}
|
|
203
|
+
type TrackSummary = TextTrackSummary;
|
|
204
|
+
type TextTrackReplacementPlan = {
|
|
205
|
+
kind: "clear";
|
|
206
|
+
} | {
|
|
207
|
+
kind: "blocked";
|
|
208
|
+
reason: string;
|
|
209
|
+
tracks: TextTrackSummary[];
|
|
210
|
+
} | {
|
|
211
|
+
kind: "replace";
|
|
212
|
+
toDelete: TextTrackSummary[];
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Every variant carries `deleted`: a `blocked` result can follow deletes when a
|
|
216
|
+
* conflicting track appears between the first pass and the duplicate-name retry,
|
|
217
|
+
* so callers must check it before assuming nothing was removed.
|
|
218
|
+
*/
|
|
219
|
+
type ReplaceAndCreateTextTrackResult = {
|
|
220
|
+
kind: "created";
|
|
221
|
+
trackId: string;
|
|
222
|
+
deleted: TextTrackSummary[];
|
|
223
|
+
} | {
|
|
224
|
+
kind: "blocked";
|
|
225
|
+
reason: string;
|
|
226
|
+
tracks: TextTrackSummary[];
|
|
227
|
+
deleted: TextTrackSummary[];
|
|
228
|
+
} | {
|
|
229
|
+
kind: "create_failed";
|
|
230
|
+
reason: string;
|
|
231
|
+
deleted: TextTrackSummary[];
|
|
232
|
+
};
|
|
233
|
+
/** Mux caps track `passthrough` at 255 characters. */
|
|
234
|
+
declare const MUX_TRACK_PASSTHROUGH_MAX_CHARS = 255;
|
|
235
|
+
/**
|
|
236
|
+
* Normalizes a track language code for matching: lowercase, ISO 639-3 → 639-1,
|
|
237
|
+
* primary subtag only (`en-US` → `en`). Returns `undefined` for codes that must
|
|
238
|
+
* never match anything (`auto`, `und`, `mul`, `mis`, `zxx`, empty).
|
|
239
|
+
*/
|
|
240
|
+
declare function normalizeTrackLanguageCode(code: string | undefined): string | undefined;
|
|
241
|
+
/** Normalizes a track name the way Mux compares them: trimmed, case-insensitive. */
|
|
242
|
+
declare function normalizeTrackName(name: string | undefined): string | undefined;
|
|
243
|
+
declare function isMuxGeneratedTextTrack(track: AssetTextTrack): boolean;
|
|
244
|
+
declare function summarizeTextTrack(track: AssetTextTrack): TextTrackSummary;
|
|
245
|
+
/**
|
|
246
|
+
* Tracks of the target's type whose language matches the target's, in any
|
|
247
|
+
* status but `deleted`. Text tracks must be subtitles; audio tracks match on
|
|
248
|
+
* language alone.
|
|
249
|
+
*/
|
|
250
|
+
declare function findSameLanguageTextTracks(asset: MuxAsset, target: TextTrackTarget): AssetTextTrack[];
|
|
251
|
+
/** Tracks of the target's type whose name collides with the target's under Mux's uniqueness rule. */
|
|
252
|
+
declare function findNameCollisionTextTracks(asset: MuxAsset, target: TextTrackTarget): AssetTextTrack[];
|
|
253
|
+
/**
|
|
254
|
+
* Decides which existing tracks stand in the way of `target` and what `policy`
|
|
255
|
+
* says to do about them. Pure: pass the freshest asset you have.
|
|
256
|
+
*
|
|
257
|
+
* `keepTrackIds` marks tracks that are allowed to coexist with the new one and
|
|
258
|
+
* are never treated as conflicts. edit-captions uses it under `fail` to keep
|
|
259
|
+
* the source track it is editing.
|
|
260
|
+
*
|
|
261
|
+
* A conflicting primary audio track always blocks: Mux refuses to delete it and
|
|
262
|
+
* it is the customer's original audio.
|
|
263
|
+
*/
|
|
264
|
+
declare function planTextTrackReplacement(asset: MuxAsset, target: TextTrackTarget, policy: ReplaceExistingTracksPolicy, options?: {
|
|
265
|
+
keepTrackIds?: string[];
|
|
266
|
+
}): TextTrackReplacementPlan;
|
|
267
|
+
/** True for Mux's `400 invalid_parameters` "Track name 'X' is not unique" rejection. */
|
|
268
|
+
declare function isDuplicateTrackNameError(error: unknown): boolean;
|
|
269
|
+
/** Default audit tag written to `passthrough` on tracks created by `@mux/ai`. */
|
|
270
|
+
declare function buildMuxAiTrackPassthrough(workflow: string): string;
|
|
271
|
+
declare function validateTrackPassthrough(passthrough: string | undefined): string | undefined;
|
|
272
|
+
interface ReplaceAndCreateTextTrackInput {
|
|
273
|
+
assetId: string;
|
|
274
|
+
target: TextTrackTarget;
|
|
275
|
+
policy: ReplaceExistingTracksPolicy;
|
|
276
|
+
presignedUrl: string;
|
|
277
|
+
/** Text tracks only. */
|
|
278
|
+
closedCaptions?: boolean;
|
|
279
|
+
passthrough?: string;
|
|
280
|
+
/** Tracks that may coexist with the new one; see `planTextTrackReplacement`. */
|
|
281
|
+
keepTrackIds?: string[];
|
|
282
|
+
credentials?: WorkflowCredentialsInput;
|
|
283
|
+
}
|
|
284
|
+
type ReplaceAndCreateTrackInput = ReplaceAndCreateTextTrackInput;
|
|
285
|
+
/**
|
|
286
|
+
* Fetches the asset fresh, deletes whatever `policy` allows, then creates the
|
|
287
|
+
* new track of `target.type` (default `text`). Known outcomes come back as
|
|
288
|
+
* discriminated results rather than throws so callers can react (Workflow
|
|
289
|
+
* DevKit turns repeated step throws into a FatalError).
|
|
290
|
+
*
|
|
291
|
+
* The only throw is a failed asset fetch before anything has been deleted,
|
|
292
|
+
* which is safe to retry. Once a track has been deleted every failure, Mux or
|
|
293
|
+
* otherwise, is returned as `create_failed` with the `deleted` list so the
|
|
294
|
+
* caller can restore what was removed.
|
|
295
|
+
*
|
|
296
|
+
* A duplicate-name rejection on create is retried once after re-planning
|
|
297
|
+
* against a fresh asset, which covers a track appearing between the plan and
|
|
298
|
+
* the create.
|
|
299
|
+
*/
|
|
300
|
+
declare function replaceAndCreateTrack(input: ReplaceAndCreateTextTrackInput): Promise<ReplaceAndCreateTextTrackResult>;
|
|
301
|
+
/** `replaceAndCreateTrack` pinned to text tracks. */
|
|
302
|
+
declare function replaceAndCreateTextTrack(input: ReplaceAndCreateTextTrackInput): Promise<ReplaceAndCreateTextTrackResult>;
|
|
303
|
+
|
|
172
304
|
interface ImageDownloadOptions {
|
|
173
305
|
/** Request timeout in milliseconds (default: 10000) */
|
|
174
306
|
timeout?: number;
|
|
@@ -407,16 +539,16 @@ declare const questionAnswerSchema: z.ZodObject<{
|
|
|
407
539
|
reasoning: z.ZodString;
|
|
408
540
|
skipped: z.ZodBoolean;
|
|
409
541
|
}, "strip", z.ZodTypeAny, {
|
|
410
|
-
reasoning: string;
|
|
411
542
|
question: string;
|
|
412
543
|
answer: string | null;
|
|
413
544
|
confidence: number;
|
|
545
|
+
reasoning: string;
|
|
414
546
|
skipped: boolean;
|
|
415
547
|
}, {
|
|
416
|
-
reasoning: string;
|
|
417
548
|
question: string;
|
|
418
549
|
answer: string | null;
|
|
419
550
|
confidence: number;
|
|
551
|
+
reasoning: string;
|
|
420
552
|
skipped: boolean;
|
|
421
553
|
}>;
|
|
422
554
|
type QuestionAnswerType = z.infer<typeof questionAnswerSchema>;
|
|
@@ -434,32 +566,32 @@ declare function createAskQuestionsSchema(answerSchema: z.ZodType<string>): z.Zo
|
|
|
434
566
|
} & {
|
|
435
567
|
answer: z.ZodType<string, z.ZodTypeDef, string>;
|
|
436
568
|
}, "strip", z.ZodTypeAny, {
|
|
437
|
-
reasoning: string;
|
|
438
569
|
question: string;
|
|
439
570
|
answer: string;
|
|
440
571
|
confidence: number;
|
|
572
|
+
reasoning: string;
|
|
441
573
|
skipped: boolean;
|
|
442
574
|
}, {
|
|
443
|
-
reasoning: string;
|
|
444
575
|
question: string;
|
|
445
576
|
answer: string;
|
|
446
577
|
confidence: number;
|
|
578
|
+
reasoning: string;
|
|
447
579
|
skipped: boolean;
|
|
448
580
|
}>, "many">;
|
|
449
581
|
}, "strip", z.ZodTypeAny, {
|
|
450
582
|
answers: {
|
|
451
|
-
reasoning: string;
|
|
452
583
|
question: string;
|
|
453
584
|
answer: string;
|
|
454
585
|
confidence: number;
|
|
586
|
+
reasoning: string;
|
|
455
587
|
skipped: boolean;
|
|
456
588
|
}[];
|
|
457
589
|
}, {
|
|
458
590
|
answers: {
|
|
459
|
-
reasoning: string;
|
|
460
591
|
question: string;
|
|
461
592
|
answer: string;
|
|
462
593
|
confidence: number;
|
|
594
|
+
reasoning: string;
|
|
463
595
|
skipped: boolean;
|
|
464
596
|
}[];
|
|
465
597
|
}>;
|
|
@@ -771,7 +903,25 @@ interface EditCaptionsOptions<P extends SupportedProvider = SupportedProvider> e
|
|
|
771
903
|
replacements?: CaptionReplacement[];
|
|
772
904
|
/** Replacements applied only to bracketed speaker labels at the start of cues. */
|
|
773
905
|
speakerReplacements?: SpeakerReplacement[];
|
|
774
|
-
/**
|
|
906
|
+
/**
|
|
907
|
+
* What to do with the source track and any other text track in the same
|
|
908
|
+
* language or with the same name as the edited track. Defaults to
|
|
909
|
+
* `"replace_all"`: the edited track takes the source track's place.
|
|
910
|
+
* `"fail"` keeps the source and requires `trackName`.
|
|
911
|
+
*/
|
|
912
|
+
replaceExistingTracks?: ReplaceExistingTracksPolicy;
|
|
913
|
+
/** Name for the edited Mux text track. Defaults to the source track's name. */
|
|
914
|
+
trackName?: string;
|
|
915
|
+
/**
|
|
916
|
+
* `passthrough` written on the edited Mux text track. Defaults to a JSON
|
|
917
|
+
* audit tag identifying this workflow. Max 255 characters.
|
|
918
|
+
*/
|
|
919
|
+
trackPassthrough?: string;
|
|
920
|
+
/**
|
|
921
|
+
* @deprecated Use `replaceExistingTracks`. When set, the workflow keeps its
|
|
922
|
+
* previous behavior: create `<source name> (<trackNameSuffix>)`, then delete
|
|
923
|
+
* the source when `true`. Cannot be combined with `replaceExistingTracks` or `trackName`.
|
|
924
|
+
*/
|
|
775
925
|
deleteOriginalTrack?: boolean;
|
|
776
926
|
/**
|
|
777
927
|
* When `true` the edited VTT is uploaded to the configured
|
|
@@ -793,7 +943,11 @@ interface EditCaptionsOptions<P extends SupportedProvider = SupportedProvider> e
|
|
|
793
943
|
s3Region?: string;
|
|
794
944
|
/** Bucket that will store edited VTT files. */
|
|
795
945
|
s3Bucket?: string;
|
|
796
|
-
/**
|
|
946
|
+
/**
|
|
947
|
+
* @deprecated Use `trackName`. Suffix appended to the source track name in the
|
|
948
|
+
* previous naming scheme, e.g. "edited" produces "Subtitles (edited)". Setting
|
|
949
|
+
* it selects that scheme; cannot be combined with `replaceExistingTracks` or `trackName`.
|
|
950
|
+
*/
|
|
797
951
|
trackNameSuffix?: string;
|
|
798
952
|
/** Expiry duration in seconds for S3 presigned GET URLs. Defaults to 86400 (24 hours). */
|
|
799
953
|
s3SignedUrlExpirySeconds?: number;
|
|
@@ -815,6 +969,8 @@ interface EditCaptionsResult {
|
|
|
815
969
|
replacements: ReplacementRecord[];
|
|
816
970
|
};
|
|
817
971
|
uploadedTrackId?: string;
|
|
972
|
+
/** Existing text tracks deleted before the edited track was created. Includes the source track when it was replaced. */
|
|
973
|
+
replacedTracks?: TextTrackSummary[];
|
|
818
974
|
presignedUrl?: string;
|
|
819
975
|
usage?: TokenUsage;
|
|
820
976
|
/**
|
|
@@ -1288,6 +1444,11 @@ interface AudioTranslationResult {
|
|
|
1288
1444
|
dubbingId: string;
|
|
1289
1445
|
uploadedTrackId?: string;
|
|
1290
1446
|
presignedUrl?: string;
|
|
1447
|
+
/**
|
|
1448
|
+
* Existing tracks deleted before the dubbed audio track and, when enabled, the
|
|
1449
|
+
* captions track were created. Each entry's `type` says which group it came from.
|
|
1450
|
+
*/
|
|
1451
|
+
replacedTracks?: TextTrackSummary[];
|
|
1291
1452
|
/** Mux text track ID for the dubbed captions, present when `uploadCaptionsToMux` is true and the upload succeeded. */
|
|
1292
1453
|
captionsTrackId?: string;
|
|
1293
1454
|
/** Presigned URL for the dub's translated transcript (WebVTT) staged to S3. */
|
|
@@ -1334,10 +1495,28 @@ interface AudioTranslationOptions extends MuxAIOptions {
|
|
|
1334
1495
|
/**
|
|
1335
1496
|
* When true the dub's translated transcript (the same translation that was
|
|
1336
1497
|
* voiced) is attached as a subtitles text track on the Mux asset. Implies
|
|
1337
|
-
* `uploadToS3: true`. Defaults to false.
|
|
1338
|
-
*
|
|
1498
|
+
* `uploadToS3: true`. Defaults to false. Existing text tracks are handled
|
|
1499
|
+
* according to `replaceExistingTracks`, checked before dubbing starts.
|
|
1339
1500
|
*/
|
|
1340
1501
|
uploadCaptionsToMux?: boolean;
|
|
1502
|
+
/**
|
|
1503
|
+
* What to do when the asset already has an audio track (or, with
|
|
1504
|
+
* `uploadCaptionsToMux`, a text track) in the target language or with the
|
|
1505
|
+
* target name. Defaults to `"fail"`, which rejects before dubbing starts.
|
|
1506
|
+
* The asset's primary audio track is never deleted under any policy.
|
|
1507
|
+
*/
|
|
1508
|
+
replaceExistingTracks?: ReplaceExistingTracksPolicy;
|
|
1509
|
+
/**
|
|
1510
|
+
* Name for the created Mux tracks. Audio and text tracks are separate name
|
|
1511
|
+
* groups, so the same name is used for both. Defaults to
|
|
1512
|
+
* "<Language> (Auto-dubbed)", e.g. "Spanish (Auto-dubbed)".
|
|
1513
|
+
*/
|
|
1514
|
+
trackName?: string;
|
|
1515
|
+
/**
|
|
1516
|
+
* `passthrough` written on the created Mux tracks. Defaults to a JSON audit
|
|
1517
|
+
* tag identifying this workflow. Max 255 characters.
|
|
1518
|
+
*/
|
|
1519
|
+
trackPassthrough?: string;
|
|
1341
1520
|
/**
|
|
1342
1521
|
* Cleanup for the audio-only static rendition this run created as dubbing
|
|
1343
1522
|
* input: `"delete"` (default) removes it when the workflow finishes, success
|
|
@@ -1378,6 +1557,8 @@ interface TranslationResult {
|
|
|
1378
1557
|
originalVtt: string;
|
|
1379
1558
|
translatedVtt: string;
|
|
1380
1559
|
uploadedTrackId?: string;
|
|
1560
|
+
/** Existing text tracks deleted before the translated track was created. */
|
|
1561
|
+
replacedTracks?: TextTrackSummary[];
|
|
1381
1562
|
presignedUrl?: string;
|
|
1382
1563
|
/** Token usage from the AI provider (for efficiency/cost analysis). */
|
|
1383
1564
|
usage?: TokenUsage;
|
|
@@ -1423,6 +1604,19 @@ interface TranslationOptions<P extends SupportedProvider = SupportedProvider> ex
|
|
|
1423
1604
|
* required for track creation.
|
|
1424
1605
|
*/
|
|
1425
1606
|
uploadToMux?: boolean;
|
|
1607
|
+
/**
|
|
1608
|
+
* What to do when the asset already has a text track in the target language
|
|
1609
|
+
* or with the target name. Defaults to `"fail"`, which rejects before any
|
|
1610
|
+
* translation happens.
|
|
1611
|
+
*/
|
|
1612
|
+
replaceExistingTracks?: ReplaceExistingTracksPolicy;
|
|
1613
|
+
/** Name for the created Mux text track. Defaults to "<Language> (Auto-translated)", e.g. "Spanish (Auto-translated)". */
|
|
1614
|
+
trackName?: string;
|
|
1615
|
+
/**
|
|
1616
|
+
* `passthrough` written on the created Mux text track. Defaults to a JSON
|
|
1617
|
+
* audit tag identifying this workflow. Max 255 characters.
|
|
1618
|
+
*/
|
|
1619
|
+
trackPassthrough?: string;
|
|
1426
1620
|
/** Optional storage adapter override for upload + presign operations. */
|
|
1427
1621
|
storageAdapter?: StorageAdapter;
|
|
1428
1622
|
/** Expiry duration in seconds for S3 presigned GET URLs. Defaults to 86400 (24 hours). */
|
|
@@ -1621,4 +1815,4 @@ declare namespace index {
|
|
|
1621
1815
|
export { index_ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH as ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH, index_ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH as ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH, index_ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL as ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL, index_ASK_QUESTIONS_MAX_QUESTION_LENGTH as ASK_QUESTIONS_MAX_QUESTION_LENGTH, type index_AskQuestionsOptions as AskQuestionsOptions, type index_AskQuestionsResult as AskQuestionsResult, type index_AskQuestionsType as AskQuestionsType, type index_AudioTranslationOptions as AudioTranslationOptions, type index_AudioTranslationResult as AudioTranslationResult, type index_AutoCensorProfanityOptions as AutoCensorProfanityOptions, type index_BurnedInCaptionsAnalysis as BurnedInCaptionsAnalysis, type index_BurnedInCaptionsOptions as BurnedInCaptionsOptions, type index_BurnedInCaptionsPromptOverrides as BurnedInCaptionsPromptOverrides, type index_BurnedInCaptionsPromptSections as BurnedInCaptionsPromptSections, type index_BurnedInCaptionsResult as BurnedInCaptionsResult, type index_CaptionReplacement as CaptionReplacement, type index_CensorMode as CensorMode, type index_Chapter as Chapter, type index_ChapterSystemPromptSections as ChapterSystemPromptSections, type index_ChaptersOptions as ChaptersOptions, type index_ChaptersPromptOverrides as ChaptersPromptOverrides, type index_ChaptersPromptSections as ChaptersPromptSections, type index_ChaptersResult as ChaptersResult, type index_ChaptersType as ChaptersType, index_DEFAULT_DESCRIPTION_LENGTH as DEFAULT_DESCRIPTION_LENGTH, index_DEFAULT_SUMMARY_KEYWORD_LIMIT as DEFAULT_SUMMARY_KEYWORD_LIMIT, index_DEFAULT_TITLE_LENGTH as DEFAULT_TITLE_LENGTH, type index_EditCaptionsOptions as EditCaptionsOptions, type index_EditCaptionsResult as EditCaptionsResult, type index_EmbeddingsOptions as EmbeddingsOptions, type index_EmbeddingsResult as EmbeddingsResult, type index_EngagementInsightsOptions as EngagementInsightsOptions, type index_EngagementInsightsResult as EngagementInsightsResult, index_GOOGLE_VISION_LIKELIHOOD_TO_SCORE as GOOGLE_VISION_LIKELIHOOD_TO_SCORE, index_HIVE_SEXUAL_CATEGORIES as HIVE_SEXUAL_CATEGORIES, index_HIVE_VIOLENCE_CATEGORIES as HIVE_VIOLENCE_CATEGORIES, type index_HiveModerationOutput as HiveModerationOutput, type index_HiveModerationSource as HiveModerationSource, type index_ModerationOptions as ModerationOptions, type index_ModerationProvider as ModerationProvider, type index_ModerationResult as ModerationResult, type index_MomentInsight as MomentInsight, type index_OverallInsight as OverallInsight, type index_ProfanityDetectionPayload as ProfanityDetectionPayload, type index_Question as Question, type index_QuestionAnswer as QuestionAnswer, type index_QuestionAnswerType as QuestionAnswerType, type index_ReplacementRecord as ReplacementRecord, type index_SpeakerReplacement as SpeakerReplacement, type index_StaticRenditionCleanupOutcome as StaticRenditionCleanupOutcome, type index_SummarizationOptions as SummarizationOptions, type index_SummarizationPromptOverrides as SummarizationPromptOverrides, type index_SummarizationPromptSections as SummarizationPromptSections, type index_SummaryAndTagsResult as SummaryAndTagsResult, type index_SummaryType as SummaryType, type index_ThumbnailModerationScore as ThumbnailModerationScore, type index_TranslationChunkingOptions as TranslationChunkingOptions, type index_TranslationOptions as TranslationOptions, type index_TranslationPayload as TranslationPayload, type index_TranslationResult as TranslationResult, index_aggregateTokenUsage as aggregateTokenUsage, index_applyOverrideLists as applyOverrideLists, index_applyReplacements as applyReplacements, index_applySpeakerReplacements as applySpeakerReplacements, index_askQuestions as askQuestions, index_buildReplacementRegex as buildReplacementRegex, index_burnedInCaptionsSchema as burnedInCaptionsSchema, index_censorVttContent as censorVttContent, index_chapterSchema as chapterSchema, index_chaptersSchema as chaptersSchema, index_createReplacer as createReplacer, index_editCaptions as editCaptions, index_extractTranscriptSegmentsForHotspots as extractTranscriptSegmentsForHotspots, index_generateChapters as generateChapters, index_generateEmbeddings as generateEmbeddings, index_generateEngagementInsights as generateEngagementInsights, index_generateVideoEmbeddings as generateVideoEmbeddings, index_getModerationScores as getModerationScores, index_getSummaryAndTags as getSummaryAndTags, index_hasBurnedInCaptions as hasBurnedInCaptions, index_mapShotsToHotspots as mapShotsToHotspots, index_normalizeTranslatedVtt as normalizeTranslatedVtt, index_profanityDetectionSchema as profanityDetectionSchema, index_questionAnswerSchema as questionAnswerSchema, index_shouldSplitChunkTranslationError as shouldSplitChunkTranslationError, index_summarySchema as summarySchema, index_transformCueText as transformCueText, index_translateAudio as translateAudio, index_translateCaptions as translateCaptions, index_translationSchema as translationSchema, index_validateNeverTranslateTerms as validateNeverTranslateTerms, index_verifyNeverTranslateTerms as verifyNeverTranslateTerms };
|
|
1622
1816
|
}
|
|
1623
1817
|
|
|
1624
|
-
export { type
|
|
1818
|
+
export { type Chapter as $, toISO639_1 as A, toISO639_3 as B, validateTrackPassthrough as C, index as D, ASK_QUESTIONS_DEFAULT_MAX_ANSWER_OPTION_LENGTH as E, ASK_QUESTIONS_DEFAULT_MAX_FREE_FORM_ANSWER_LENGTH as F, ASK_QUESTIONS_MAX_QUESTIONS_PER_CALL as G, ASK_QUESTIONS_MAX_QUESTION_LENGTH as H, type ISO639_1 as I, type AskQuestionsOptions as J, type AskQuestionsResult as K, type LanguageCodePair as L, MUX_TRACK_PASSTHROUGH_MAX_CHARS as M, type AskQuestionsType as N, type AudioTranslationOptions as O, type AudioTranslationResult as P, type AutoCensorProfanityOptions as Q, type ReplaceAndCreateTextTrackInput as R, type SupportedISO639_1 as S, type TextTrackReplacementPlan as T, type BurnedInCaptionsAnalysis as U, type BurnedInCaptionsOptions as V, type BurnedInCaptionsPromptOverrides as W, type BurnedInCaptionsPromptSections as X, type BurnedInCaptionsResult as Y, type CaptionReplacement as Z, type CensorMode as _, type ISO639_3 as a, normalizeTranslatedVtt as a$, type ChapterSystemPromptSections as a0, type ChaptersOptions as a1, type ChaptersPromptOverrides as a2, type ChaptersPromptSections as a3, type ChaptersResult as a4, type ChaptersType as a5, DEFAULT_DESCRIPTION_LENGTH as a6, DEFAULT_SUMMARY_KEYWORD_LIMIT as a7, DEFAULT_TITLE_LENGTH as a8, type EditCaptionsOptions as a9, type SummaryType as aA, type ThumbnailModerationScore as aB, type TranslationChunkingOptions as aC, type TranslationOptions as aD, type TranslationPayload as aE, type TranslationResult as aF, aggregateTokenUsage as aG, applyOverrideLists as aH, applyReplacements as aI, applySpeakerReplacements as aJ, askQuestions as aK, buildReplacementRegex as aL, burnedInCaptionsSchema as aM, censorVttContent as aN, chapterSchema as aO, chaptersSchema as aP, createReplacer as aQ, editCaptions as aR, extractTranscriptSegmentsForHotspots as aS, generateChapters as aT, generateEmbeddings as aU, generateEngagementInsights as aV, generateVideoEmbeddings as aW, getModerationScores as aX, getSummaryAndTags as aY, hasBurnedInCaptions as aZ, mapShotsToHotspots as a_, type EditCaptionsResult as aa, type EmbeddingsOptions as ab, type EmbeddingsResult as ac, type EngagementInsightsOptions as ad, type EngagementInsightsResult as ae, GOOGLE_VISION_LIKELIHOOD_TO_SCORE as af, HIVE_SEXUAL_CATEGORIES as ag, HIVE_VIOLENCE_CATEGORIES as ah, type HiveModerationOutput as ai, type HiveModerationSource as aj, type ModerationOptions as ak, type ModerationProvider as al, type ModerationResult as am, type MomentInsight as an, type OverallInsight as ao, type ProfanityDetectionPayload as ap, type Question as aq, type QuestionAnswer as ar, type QuestionAnswerType as as, type ReplacementRecord as at, type SpeakerReplacement as au, type StaticRenditionCleanupOutcome as av, type SummarizationOptions as aw, type SummarizationPromptOverrides as ax, type SummarizationPromptSections as ay, type SummaryAndTagsResult as az, type ReplaceAndCreateTextTrackResult as b, profanityDetectionSchema as b0, questionAnswerSchema as b1, shouldSplitChunkTranslationError as b2, summarySchema as b3, transformCueText as b4, translateAudio as b5, translateCaptions as b6, translationSchema as b7, validateNeverTranslateTerms as b8, verifyNeverTranslateTerms as b9, type ReplaceAndCreateTrackInput as c, type ReplaceExistingTracksPolicy as d, type ReplaceableTrackType as e, type SupportedISO639_3 as f, type TextTrackSummary as g, type TextTrackTarget as h, type TrackSummary as i, type TrackTarget as j, buildMuxAiTrackPassthrough as k, findNameCollisionTextTracks as l, findSameLanguageTextTracks as m, getLanguageCodePair as n, getLanguageName as o, isDuplicateTrackNameError as p, isMuxGeneratedTextTrack as q, isUndeterminedLanguageCode as r, isValidISO639_1 as s, isValidISO639_3 as t, normalizeTrackLanguageCode as u, normalizeTrackName as v, planTextTrackReplacement as w, replaceAndCreateTextTrack as x, replaceAndCreateTrack as y, summarizeTextTrack as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { I as ISO639_1, a as ISO639_3, L as LanguageCodePair, S as SupportedISO639_1,
|
|
1
|
+
export { I as ISO639_1, a as ISO639_3, L as LanguageCodePair, M as MUX_TRACK_PASSTHROUGH_MAX_CHARS, R as ReplaceAndCreateTextTrackInput, b as ReplaceAndCreateTextTrackResult, c as ReplaceAndCreateTrackInput, d as ReplaceExistingTracksPolicy, e as ReplaceableTrackType, S as SupportedISO639_1, f as SupportedISO639_3, T as TextTrackReplacementPlan, g as TextTrackSummary, h as TextTrackTarget, i as TrackSummary, j as TrackTarget, k as buildMuxAiTrackPassthrough, l as findNameCollisionTextTracks, m as findSameLanguageTextTracks, n as getLanguageCodePair, o as getLanguageName, p as isDuplicateTrackNameError, q as isMuxGeneratedTextTrack, r as isUndeterminedLanguageCode, s as isValidISO639_1, t as isValidISO639_3, u as normalizeTrackLanguageCode, v as normalizeTrackName, w as planTextTrackReplacement, x as replaceAndCreateTextTrack, y as replaceAndCreateTrack, z as summarizeTextTrack, A as toISO639_1, B as toISO639_3, C as validateTrackPassthrough, D as workflows } from './index-C3PW73qH.js';
|
|
2
2
|
import { W as WorkflowCredentials, S as StoragePutObjectInput, a as StoragePresignGetObjectInput } from './shots-CUI09Ohe.js';
|
|
3
3
|
export { A as AssetTextTrack, C as ChunkEmbedding, b as ChunkingStrategy, E as Encrypted, c as EncryptedPayload, I as ImageSubmissionMode, M as MuxAIOptions, d as MuxAsset, P as PlaybackAsset, e as PlaybackPolicy, f as ScopedMuxAIOptions, g as StorageAdapter, T as TextChunk, h as TokenChunkingConfig, i as TokenUsage, j as ToneType, U as UsageMetadata, V as VTTChunkingConfig, k as VideoEmbeddingsResult, l as WorkflowCredentialsInput, m as WorkflowMuxClient, n as WorkflowScope, o as decryptFromWorkflow, p as encryptForWorkflow } from './shots-CUI09Ohe.js';
|
|
4
4
|
import { WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from '@workflow/serde';
|
|
@@ -9,7 +9,7 @@ import '@ai-sdk/google';
|
|
|
9
9
|
import '@ai-sdk/openai';
|
|
10
10
|
import '@mux/mux-node';
|
|
11
11
|
|
|
12
|
-
var version = "0.
|
|
12
|
+
var version = "0.41.0";
|
|
13
13
|
|
|
14
14
|
type MuxAiErrorType = "validation_error" | "processing_error" | "timeout_error" | "content_policy_error";
|
|
15
15
|
/**
|