@braze/sanity-plugin-ai-translation 0.2.5 → 0.2.6

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.d.ts CHANGED
@@ -446,6 +446,21 @@ declare interface TranslatableVTTCaptions {
446
446
  _originalMetadata: VTTCaptionMetadata[];
447
447
  }
448
448
 
449
+ /**
450
+ * Special type to track transformed Wistia captions.
451
+ * This combines metadata separation for token efficiency with compact text format for translation.
452
+ */
453
+ declare interface TranslatableWistiaCaptions {
454
+ _type: "translatable.wistia.captions";
455
+ translationText: string;
456
+ _originalMetadata: WistiaCaptionsMetadata;
457
+ _srtCues: Array<{
458
+ index: number;
459
+ startTime: string;
460
+ endTime: string;
461
+ }>;
462
+ }
463
+
449
464
  /**
450
465
  * Schema for translation history
451
466
  *
@@ -497,4 +512,40 @@ export declare const vttCaptionTransform: FieldTransform<
497
512
  TranslatableVTTCaptions
498
513
  >;
499
514
 
515
+ /**
516
+ * Represents a Wistia captions object with SRT content and metadata.
517
+ */
518
+ declare interface WistiaCaptions {
519
+ captionContent?: string;
520
+ captionFileName?: string;
521
+ isoLanguage?: string;
522
+ captionUploadStatus?: string;
523
+ captionUploadMessage?: string;
524
+ [key: string]: string | undefined;
525
+ }
526
+
527
+ /**
528
+ * Wistia captions metadata without captionContent, used for preservation during translation.
529
+ */
530
+ declare interface WistiaCaptionsMetadata {
531
+ captionFileName?: string;
532
+ isoLanguage?: string;
533
+ captionUploadStatus?: string;
534
+ captionUploadMessage?: string;
535
+ _originalIndex: number;
536
+ [key: string]: string | number | undefined;
537
+ }
538
+
539
+ /**
540
+ * Transform for handling Wistia captions in documents using SRT format.
541
+ * This stores metadata separately for token efficiency while formatting
542
+ * text content in a compact indexed format for better translation results.
543
+ *
544
+ * @public
545
+ */
546
+ export declare const wistiaCaptionTransform: FieldTransform<
547
+ WistiaCaptions,
548
+ TranslatableWistiaCaptions
549
+ >;
550
+
500
551
  export {};