@mux/ai 0.60.0 → 0.61.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-DO8jM8_5.d.ts → index-CnI9D5S0.d.ts} +40 -2
- package/dist/index.d.ts +9 -5
- package/dist/index.js +329 -161
- package/dist/index.js.map +1 -1
- package/dist/primitives/index.js +22 -2
- package/dist/primitives/index.js.map +1 -1
- package/dist/workflows/index.d.ts +1 -1
- package/dist/workflows/index.js +300 -156
- package/dist/workflows/index.js.map +1 -1
- package/package.json +1 -1
package/dist/primitives/index.js
CHANGED
|
@@ -962,14 +962,16 @@ var MUX_AI_ERROR_DEPENDENCY_VALUES = Object.values(MUX_AI_ERROR_DEPENDENCIES);
|
|
|
962
962
|
var MUX_AI_ERROR_CODES = {
|
|
963
963
|
/** The requested time range is invalid, or has nothing to work with. Facts: `reason` (`invalid_start_time`, `invalid_end_time`, `exceeds_duration`, `empty_range`, `no_video`, `no_transcript`) and the bounds involved. */
|
|
964
964
|
INVALID_SCOPE: "invalid_scope",
|
|
965
|
-
/** Existing tracks block writing the output track under the chosen replacement policy. Facts: `reason` (`policy_fail`, `not_generated`, `name_collision`, `primary_audio`), `conflictingTracks` and the target track. */
|
|
965
|
+
/** Existing tracks block writing the output track under the chosen replacement policy. Facts: `reason` (`policy_fail`, `not_generated`, `name_collision`, `primary_audio`), `conflictingTracks` and the target track, plus `sourceRestored` and `restoredTrackId` when a source track was deleted first. */
|
|
966
966
|
TRACK_REPLACEMENT_BLOCKED: "track_replacement_blocked",
|
|
967
|
-
/** An option's value can't be used. Facts: `parameter` (the caller's option name), `reason` (`too_many`, `empty`, `too_long`, `disallowed_characters`, `not_normalized`) and the values the reason names: `count` and `max`, `index` (0-based entry), `length` and `maxLength`, `characters
|
|
967
|
+
/** An option's value can't be used. Facts: `parameter` (the caller's option name), `reason` (`too_many`, `empty`, `too_long`, `disallowed_characters`, `not_normalized`, `multiline`, `required_with`, `conflicts_with`, `not_allowed`, `one_of_required`) and the values the reason names: `count` and `max`, `index` (0-based entry), `length` and `maxLength`, `characters`, `with` and `withValue` (the other option), `allowed` and `value`, `parameters` (the options to choose from). */
|
|
968
968
|
INVALID_PARAMETER: "invalid_parameter",
|
|
969
969
|
/** A numeric option is outside its allowed range. Facts: `parameter` (the caller's option name), `value`, `min`, `max`, and `integer` when it must be a whole number. */
|
|
970
970
|
PARAMETER_OUT_OF_RANGE: "parameter_out_of_range",
|
|
971
971
|
/** No ready caption track matches the requested track or language. Facts: `trackId` or `languageCode`, and what is available. */
|
|
972
972
|
CAPTION_TRACK_NOT_FOUND: "caption_track_not_found",
|
|
973
|
+
/** The caption track has no language, so its source language can't be determined. Facts: `trackId`. */
|
|
974
|
+
CAPTION_TRACK_LANGUAGE_MISSING: "caption_track_language_missing",
|
|
973
975
|
/** The asset has no public or signed playback ID (DRM-only assets included). */
|
|
974
976
|
PLAYBACK_ID_NOT_FOUND: "playback_id_not_found",
|
|
975
977
|
/** Mux has no asset with the requested ID in this environment. Facts: `assetId`. */
|
|
@@ -986,6 +988,16 @@ var MUX_AI_ERROR_CODES = {
|
|
|
986
988
|
SIGNING_CREDENTIALS_MISSING: "signing_credentials_missing",
|
|
987
989
|
/** Storage is needed but the service running the SDK didn't configure it. */
|
|
988
990
|
STORAGE_NOT_CONFIGURED: "storage_not_configured",
|
|
991
|
+
/** A track write failed, but the opted-in result carried no classified error: a bug in the SDK's track-write path. Facts: `reason`, the raw failure's message. */
|
|
992
|
+
TRACK_WRITE_UNCLASSIFIED: "track_write_unclassified",
|
|
993
|
+
/** Mux answered a track create without a track id. The track may exist, so it isn't step-retried. Facts: `call`, `assetId`. */
|
|
994
|
+
TRACK_ID_MISSING: "track_id_missing",
|
|
995
|
+
/** The asset snapshot the service running the SDK passed in is for a different asset than the one requested. Facts: `assetId`, `snapshotAssetId`. */
|
|
996
|
+
ASSET_SNAPSHOT_MISMATCH: "asset_snapshot_mismatch",
|
|
997
|
+
/** Mux answered an asset fetch with a different asset than the one requested. Facts: `assetId`, `returnedAssetId`. */
|
|
998
|
+
ASSET_ID_MISMATCH: "asset_id_mismatch",
|
|
999
|
+
/** Translation needed to split a chunk of fewer than two cues: a bug in the SDK's chunking. Facts: `chunkId`, `cueCount`. */
|
|
1000
|
+
TRANSLATION_CHUNK_UNSPLITTABLE: "translation_chunk_unsplittable",
|
|
989
1001
|
/** The model provider refused the content. Facts: `reason` and `category`. */
|
|
990
1002
|
CONTENT_POLICY_BLOCKED: "content_policy_blocked",
|
|
991
1003
|
/** The model returned no output, or a required field was empty. Facts: `call`, `provider`, `model`, and `assetId` when there is one. */
|
|
@@ -1023,6 +1035,14 @@ var MUX_AI_ERROR_CATALOG = {
|
|
|
1023
1035
|
// The configuration of the service running the SDK.
|
|
1024
1036
|
[MUX_AI_ERROR_CODES.SIGNING_CREDENTIALS_MISSING]: { type: MUX_AI_ERROR_TYPES.SERVER_ERROR, source: MUX_AI_ERROR_SOURCES.INTERNAL },
|
|
1025
1037
|
[MUX_AI_ERROR_CODES.STORAGE_NOT_CONFIGURED]: { type: MUX_AI_ERROR_TYPES.SERVER_ERROR, source: MUX_AI_ERROR_SOURCES.INTERNAL },
|
|
1038
|
+
[MUX_AI_ERROR_CODES.ASSET_SNAPSHOT_MISMATCH]: { type: MUX_AI_ERROR_TYPES.SERVER_ERROR, source: MUX_AI_ERROR_SOURCES.INTERNAL },
|
|
1039
|
+
// The SDK's own bug: never expected.
|
|
1040
|
+
[MUX_AI_ERROR_CODES.TRACK_WRITE_UNCLASSIFIED]: { type: MUX_AI_ERROR_TYPES.SERVER_ERROR, source: MUX_AI_ERROR_SOURCES.INTERNAL },
|
|
1041
|
+
[MUX_AI_ERROR_CODES.TRANSLATION_CHUNK_UNSPLITTABLE]: { type: MUX_AI_ERROR_TYPES.SERVER_ERROR, source: MUX_AI_ERROR_SOURCES.INTERNAL },
|
|
1042
|
+
[MUX_AI_ERROR_CODES.CAPTION_TRACK_LANGUAGE_MISSING]: { type: MUX_AI_ERROR_TYPES.VALIDATION_ERROR, source: MUX_AI_ERROR_SOURCES.ASSET },
|
|
1043
|
+
// The track may exist, so a step retry could duplicate it; the job stays retryable.
|
|
1044
|
+
[MUX_AI_ERROR_CODES.TRACK_ID_MISSING]: { type: MUX_AI_ERROR_TYPES.PROCESSING_ERROR, source: MUX_AI_ERROR_SOURCES.UPSTREAM, dependency: MUX_AI_ERROR_DEPENDENCIES.MUX_VIDEO },
|
|
1045
|
+
[MUX_AI_ERROR_CODES.ASSET_ID_MISMATCH]: { type: MUX_AI_ERROR_TYPES.PROCESSING_ERROR, source: MUX_AI_ERROR_SOURCES.UPSTREAM, dependency: MUX_AI_ERROR_DEPENDENCIES.MUX_VIDEO },
|
|
1026
1046
|
// Model calls.
|
|
1027
1047
|
[MUX_AI_ERROR_CODES.CONTENT_POLICY_BLOCKED]: { type: MUX_AI_ERROR_TYPES.CONTENT_POLICY_ERROR, source: MUX_AI_ERROR_SOURCES.ASSET, dependency: MUX_AI_ERROR_DEPENDENCIES.AI_PROVIDER },
|
|
1028
1048
|
// The model-output policies below keep what these failures did before classification
|