@mux/ai 0.22.0 → 0.23.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.
@@ -592,11 +592,11 @@ declare const chapterSchema: z.ZodObject<{
592
592
  startTime: z.ZodNumber;
593
593
  title: z.ZodString;
594
594
  }, "strip", z.ZodTypeAny, {
595
- startTime: number;
596
595
  title: string;
597
- }, {
598
596
  startTime: number;
597
+ }, {
599
598
  title: string;
599
+ startTime: number;
600
600
  }>;
601
601
  type Chapter = z.infer<typeof chapterSchema>;
602
602
  declare const chaptersSchema: z.ZodObject<{
@@ -604,21 +604,21 @@ declare const chaptersSchema: z.ZodObject<{
604
604
  startTime: z.ZodNumber;
605
605
  title: z.ZodString;
606
606
  }, "strip", z.ZodTypeAny, {
607
- startTime: number;
608
607
  title: string;
609
- }, {
610
608
  startTime: number;
609
+ }, {
611
610
  title: string;
611
+ startTime: number;
612
612
  }>, "many">;
613
613
  }, "strip", z.ZodTypeAny, {
614
614
  chapters: {
615
- startTime: number;
616
615
  title: string;
616
+ startTime: number;
617
617
  }[];
618
618
  }, {
619
619
  chapters: {
620
- startTime: number;
621
620
  title: string;
621
+ startTime: number;
622
622
  }[];
623
623
  }>;
624
624
  type ChaptersType = z.infer<typeof chaptersSchema>;
@@ -896,8 +896,6 @@ interface MomentInsight {
896
896
  startMs: number;
897
897
  /** End time in milliseconds */
898
898
  endMs: number;
899
- /** Human-readable timestamp (e.g., "2:15") */
900
- timestamp: string;
901
899
  /** Normalized engagement score (0-1) */
902
900
  engagementScore: number;
903
901
  /** Primary insight explaining the engagement pattern */
@@ -968,7 +966,7 @@ declare function mapShotsToHotspots(shots: Shot[], hotspots: Hotspot[]): string[
968
966
  * });
969
967
  *
970
968
  * result.momentInsights.forEach(m => {
971
- * console.log(`${m.timestamp}: ${m.insight}`);
969
+ * console.log(`${m.startMs}ms: ${m.insight}`);
972
970
  * });
973
971
  * ```
974
972
  */
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, b as SupportedISO639_3, g as getLanguageCodePair, c as getLanguageName, i as isUndeterminedLanguageCode, d as isValidISO639_1, e as isValidISO639_3, t as toISO639_1, f as toISO639_3, h as workflows } from './index-0a27mjs2.js';
1
+ export { I as ISO639_1, a as ISO639_3, L as LanguageCodePair, S as SupportedISO639_1, b as SupportedISO639_3, g as getLanguageCodePair, c as getLanguageName, i as isUndeterminedLanguageCode, d as isValidISO639_1, e as isValidISO639_3, t as toISO639_1, f as toISO639_3, h as workflows } from './index-ePt2EMpB.js';
2
2
  import { W as WorkflowCredentials, S as StoragePutObjectInput, a as StoragePresignGetObjectInput } from './shots-mGJfYGiO.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 StorageAdapter, T as TextChunk, g as TokenChunkingConfig, h as TokenUsage, i as ToneType, U as UsageMetadata, V as VTTChunkingConfig, j as VideoEmbeddingsResult, k as WorkflowCredentialsInput, l as WorkflowMuxClient, m as decryptFromWorkflow, n as encryptForWorkflow } from './shots-mGJfYGiO.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.22.0";
12
+ var version = "0.23.0";
13
13
 
14
14
  type MuxAiErrorType = "validation_error" | "processing_error" | "timeout_error";
15
15
  /**
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ var __export = (target, all) => {
5
5
  };
6
6
 
7
7
  // package.json
8
- var version = "0.22.0";
8
+ var version = "0.23.0";
9
9
 
10
10
  // src/lib/language-codes.ts
11
11
  var ISO639_1_TO_3 = {
@@ -1602,12 +1602,12 @@ function getShotsPath(assetId) {
1602
1602
  }
1603
1603
  function mapManifestShots(shots) {
1604
1604
  return shots.map((shot, index) => {
1605
- const { startTime, imageUrl } = shot;
1605
+ const { start_time: startTime, image_url: imageUrl } = shot;
1606
1606
  if (typeof startTime !== "number" || !Number.isFinite(startTime)) {
1607
- throw new TypeError(`Invalid shot startTime in shots manifest at index ${index}`);
1607
+ throw new TypeError(`Invalid shot start_time in shots manifest at index ${index}`);
1608
1608
  }
1609
1609
  if (typeof imageUrl !== "string" || imageUrl.length === 0) {
1610
- throw new TypeError(`Invalid shot imageUrl in shots manifest at index ${index}`);
1610
+ throw new TypeError(`Invalid shot image_url in shots manifest at index ${index}`);
1611
1611
  }
1612
1612
  return {
1613
1613
  startTime,
@@ -5091,7 +5091,6 @@ async function generateEngagementInsights(assetId, options = {}) {
5091
5091
  momentInsights.push({
5092
5092
  startMs: hotspot.startMs,
5093
5093
  endMs: hotspot.endMs,
5094
- timestamp: secondsToTimestamp(hotspot.startMs / 1e3),
5095
5094
  engagementScore: hotspot.score,
5096
5095
  insight: insightScrub.leaked ? "Insight suppressed by safety filter." : insightScrub.text
5097
5096
  });