@osdk/foundry.mediasets 2.46.0 → 2.48.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.
@@ -15,12 +15,87 @@ export interface AffineTransform {
15
15
  yShear?: number;
16
16
  yScale?: number;
17
17
  }
18
+ /**
19
+ * The geometry for an annotation.
20
+ *
21
+ * Log Safety: UNSAFE
22
+ */
23
+ export type AnnotateGeometry = {
24
+ type: "boundingBox";
25
+ } & BoundingBoxGeometry;
26
+ /**
27
+ * Annotates an image with bounding boxes, labels, and colors.
28
+ *
29
+ * Log Safety: UNSAFE
30
+ */
31
+ export interface AnnotateImageOperation {
32
+ annotations: Array<Annotation>;
33
+ }
34
+ /**
35
+ * An annotation to draw on an image.
36
+ *
37
+ * Log Safety: UNSAFE
38
+ */
39
+ export interface Annotation {
40
+ geometry: AnnotateGeometry;
41
+ label?: string;
42
+ color?: Color;
43
+ thickness?: number;
44
+ fontSize?: number;
45
+ }
46
+ /**
47
+ * The output format for encoding archives.
48
+ *
49
+ * Log Safety: UNSAFE
50
+ */
51
+ export type ArchiveEncodeFormat = {
52
+ type: "tar";
53
+ } & TarFormat;
54
+ /**
55
+ * The audio channel layout configuration.
56
+ *
57
+ * Log Safety: UNSAFE
58
+ */
59
+ export type AudioChannelLayout = {
60
+ type: "numberOfChannels";
61
+ } & NumberOfChannels;
62
+ /**
63
+ * Selects a specific channel from multi-channel audio.
64
+ *
65
+ * Log Safety: UNSAFE
66
+ */
67
+ export interface AudioChannelOperation {
68
+ encodeFormat: AudioEncodeFormat;
69
+ channel: number;
70
+ }
71
+ /**
72
+ * Chunks audio into smaller segments of the specified duration.
73
+ *
74
+ * Log Safety: UNSAFE
75
+ */
76
+ export interface AudioChunkOperation {
77
+ chunkDurationMilliseconds: number;
78
+ encodeFormat: AudioEncodeFormat;
79
+ chunkIndex: number;
80
+ }
18
81
  /**
19
82
  * The format of an audio media item.
20
83
  *
21
84
  * Log Safety: SAFE
22
85
  */
23
86
  export type AudioDecodeFormat = "FLAC" | "MP2" | "MP3" | "MP4" | "NIST_SPHERE" | "OGG" | "WAV" | "WEBM";
87
+ /**
88
+ * The output format for encoding audio.
89
+ *
90
+ * Log Safety: UNSAFE
91
+ */
92
+ export type AudioEncodeFormat = ({
93
+ type: "mp3";
94
+ } & Mp3Format) | ({
95
+ type: "wav";
96
+ } & WavEncodeFormat) | ({
97
+ type: "ts";
98
+ } & TsAudioContainerFormat);
24
99
  /**
25
100
  * Metadata for audio media items.
26
101
  *
@@ -31,6 +106,18 @@ export interface AudioMediaItemMetadata {
31
106
  specification: AudioSpecification;
32
107
  sizeBytes: number;
33
108
  }
109
+ /**
110
+ * The operation to perform on audio.
111
+ *
112
+ * Log Safety: UNSAFE
113
+ */
114
+ export type AudioOperation = ({
115
+ type: "channel";
116
+ } & AudioChannelOperation) | ({
117
+ type: "chunk";
118
+ } & AudioChunkOperation) | ({
119
+ type: "convert";
120
+ } & ConvertAudioOperation);
34
121
  /**
35
122
  * Technical specifications for audio media items.
36
123
  *
@@ -41,6 +128,38 @@ export interface AudioSpecification {
41
128
  durationSeconds: number;
42
129
  numberOfChannels?: number;
43
130
  }
131
+ /**
132
+ * The operation to perform for audio to text conversion.
133
+ *
134
+ * Log Safety: UNSAFE
135
+ */
136
+ export type AudioToTextOperation = ({
137
+ type: "transcribe";
138
+ } & TranscribeOperation) | ({
139
+ type: "waveform";
140
+ } & WaveformOperation);
141
+ /**
142
+ * Converts audio to text.
143
+ *
144
+ * Log Safety: UNSAFE
145
+ */
146
+ export interface AudioToTextTransformation {
147
+ operation: AudioToTextOperation;
148
+ }
149
+ /**
150
+ * Transforms audio media items.
151
+ *
152
+ * Log Safety: UNSAFE
153
+ */
154
+ export interface AudioTransformation {
155
+ operation: AudioOperation;
156
+ }
157
+ /**
158
+ * Available embedding models that can be used with the service.
159
+ *
160
+ * Log Safety: SAFE
161
+ */
162
+ export type AvailableEmbeddingModelIds = "GOOGLE_SIGLIP_2";
44
163
  /**
45
164
  * Information about a band in an image.
46
165
  *
@@ -52,6 +171,25 @@ export interface BandInfo {
52
171
  paletteInterpretation?: PaletteInterpretation;
53
172
  unitInterpretation?: UnitInterpretation;
54
173
  }
174
+ /**
175
+ * A rectangular bounding box for annotations.
176
+ *
177
+ * Log Safety: SAFE
178
+ */
179
+ export interface BoundingBox {
180
+ left: number;
181
+ top: number;
182
+ width: number;
183
+ height: number;
184
+ }
185
+ /**
186
+ * A rectangular bounding box geometry for annotations.
187
+ *
188
+ * Log Safety: SAFE
189
+ */
190
+ export interface BoundingBoxGeometry {
191
+ boundingBox: BoundingBox;
192
+ }
55
193
  /**
56
194
  * A name for a media set branch. Valid branch names must be (a) non-empty, (b) less than 256 characters, and
57
195
  (c) not a valid ResourceIdentifier.
@@ -65,6 +203,17 @@ export type BranchName = LooselyBrandedString<"BranchName">;
65
203
  * Log Safety: SAFE
66
204
  */
67
205
  export type BranchRid = LooselyBrandedString<"BranchRid">;
206
+ /**
207
+ * An RGBA color value.
208
+ *
209
+ * Log Safety: SAFE
210
+ */
211
+ export interface Color {
212
+ r: number;
213
+ g: number;
214
+ b: number;
215
+ a?: number;
216
+ }
68
217
  /**
69
218
  * The color interpretation of a band.
70
219
  *
@@ -86,6 +235,72 @@ export interface CommonDicomDataElements {
86
235
  studyTime?: string;
87
236
  seriesTime?: string;
88
237
  }
238
+ /**
239
+ * Binarize contrast operation.
240
+ *
241
+ * Log Safety: SAFE
242
+ */
243
+ export interface ContrastBinarize {
244
+ threshold?: number;
245
+ }
246
+ /**
247
+ * Equalizes the histogram of an image to improve contrast.
248
+ *
249
+ * Log Safety: SAFE
250
+ */
251
+ export interface ContrastEqualize {
252
+ }
253
+ /**
254
+ * Applies contrast adjustments to an image.
255
+ *
256
+ * Log Safety: UNSAFE
257
+ */
258
+ export interface ContrastImageOperation {
259
+ contrastType: ContrastType;
260
+ }
261
+ /**
262
+ * Applies Rayleigh distribution-based contrast adjustment.
263
+ *
264
+ * Log Safety: SAFE
265
+ */
266
+ export interface ContrastRayleigh {
267
+ sigma: number;
268
+ }
269
+ /**
270
+ * The type of contrast adjustment to apply.
271
+ *
272
+ * Log Safety: UNSAFE
273
+ */
274
+ export type ContrastType = ({
275
+ type: "equalize";
276
+ } & ContrastEqualize) | ({
277
+ type: "rayleigh";
278
+ } & ContrastRayleigh) | ({
279
+ type: "binarize";
280
+ } & ContrastBinarize);
281
+ /**
282
+ * Converts audio to the specified format.
283
+ *
284
+ * Log Safety: UNSAFE
285
+ */
286
+ export interface ConvertAudioOperation {
287
+ encodeFormat: AudioEncodeFormat;
288
+ }
289
+ /**
290
+ * Converts a document to PDF format.
291
+ *
292
+ * Log Safety: SAFE
293
+ */
294
+ export interface ConvertDocumentOperation {
295
+ }
296
+ /**
297
+ * Converts a specified sheet to JSON format.
298
+ *
299
+ * Log Safety: UNSAFE
300
+ */
301
+ export interface ConvertSheetToJsonOperation {
302
+ sheetName: string;
303
+ }
89
304
  /**
90
305
  * The coordinate reference system for geo-referenced imagery.
91
306
  *
@@ -94,12 +309,39 @@ export interface CommonDicomDataElements {
94
309
  export interface CoordinateReferenceSystem {
95
310
  wkt?: string;
96
311
  }
312
+ /**
313
+ * Converts an image to a PDF document.
314
+ *
315
+ * Log Safety: SAFE
316
+ */
317
+ export interface CreatePdfOperation {
318
+ }
319
+ /**
320
+ * Crops an image to a rectangular sub-window.
321
+ *
322
+ * Log Safety: UNSAFE
323
+ */
324
+ export interface CropImageOperation {
325
+ xOffset: number;
326
+ yOffset: number;
327
+ width: number;
328
+ height: number;
329
+ }
97
330
  /**
98
331
  * The data type of a band.
99
332
  *
100
333
  * Log Safety: SAFE
101
334
  */
102
335
  export type DataType = "UNDEFINED" | "BYTE" | "UINT16" | "INT16" | "UINT32" | "INT32" | "FLOAT32" | "FLOAT64" | "COMPLEX_INT16" | "COMPLEX_INT32" | "COMPLEX_FLOAT32" | "COMPLEX_FLOAT64" | "UINT64" | "INT64" | "INT8";
336
+ /**
337
+ * Decrypts bounding boxes in an image using a commutative encryption algorithm.
338
+ *
339
+ * Log Safety: SAFE
340
+ */
341
+ export interface DecryptImageOperation {
342
+ polygons: Array<ImageRegionPolygon>;
343
+ cipherLicenseRid: string;
344
+ }
103
345
  /**
104
346
  * The key of a DICOM data element.
105
347
  *
@@ -142,6 +384,23 @@ export interface DicomMetaInformationV1 {
142
384
  mediaStorageSopInstance: string;
143
385
  transferSyntax: string;
144
386
  }
387
+ /**
388
+ * The operation to perform for DICOM to image conversion.
389
+ *
390
+ * Log Safety: UNSAFE
391
+ */
392
+ export type DicomToImageOperation = {
393
+ type: "renderImageLayer";
394
+ } & RenderImageLayerOperation;
395
+ /**
396
+ * Renders DICOM (Digital Imaging and Communications in Medicine) files as images.
397
+ *
398
+ * Log Safety: UNSAFE
399
+ */
400
+ export interface DicomToImageTransformation {
401
+ encoding: ImageryEncodeFormat;
402
+ operation: DicomToImageOperation;
403
+ }
145
404
  /**
146
405
  * The dimensions of an image.
147
406
  *
@@ -157,6 +416,22 @@ export interface Dimensions {
157
416
  * Log Safety: SAFE
158
417
  */
159
418
  export type DocumentDecodeFormat = "PDF" | "DOCX" | "TXT" | "PPTX";
419
+ /**
420
+ * The output format for encoding documents.
421
+ *
422
+ * Log Safety: UNSAFE
423
+ */
424
+ export type DocumentEncodeFormat = {
425
+ type: "pdf";
426
+ } & PdfFormat;
427
+ /**
428
+ * Extracts content from a document with layout information preserved.
429
+ *
430
+ * Log Safety: SAFE
431
+ */
432
+ export interface DocumentExtractLayoutAwareContentOperation {
433
+ parameters: LayoutAwareExtractionParameters;
434
+ }
160
435
  /**
161
436
  * Metadata for document media items.
162
437
  *
@@ -170,163 +445,788 @@ export interface DocumentMediaItemMetadata {
170
445
  author?: string;
171
446
  }
172
447
  /**
173
- * The flip axis from EXIF orientation.
448
+ * The operation to perform for document to document conversion.
174
449
  *
175
- * Log Safety: SAFE
450
+ * Log Safety: UNSAFE
176
451
  */
177
- export type FlipAxis = "HORIZONTAL" | "VERTICAL" | "UNKNOWN";
452
+ export type DocumentToDocumentOperation = ({
453
+ type: "slicePdfRange";
454
+ } & SlicePdfRangeOperation) | ({
455
+ type: "convertDocument";
456
+ } & ConvertDocumentOperation);
178
457
  /**
179
- * A list of ground control points for geo-referencing.
458
+ * Transforms documents to documents.
180
459
  *
181
- * Log Safety: SAFE
460
+ * Log Safety: UNSAFE
182
461
  */
183
- export interface GcpList {
184
- gcps: Array<GroundControlPoint>;
462
+ export interface DocumentToDocumentTransformation {
463
+ encoding: DocumentEncodeFormat;
464
+ operation: DocumentToDocumentOperation;
185
465
  }
186
466
  /**
187
- * Embedded geo-referencing data for an image.
467
+ * The operation to perform for document to image conversion.
188
468
  *
189
469
  * Log Safety: UNSAFE
190
470
  */
191
- export interface GeoMetadata {
192
- crs?: CoordinateReferenceSystem;
193
- geotransform?: AffineTransform;
194
- gcpInfo?: GcpList;
195
- gpsData?: GpsMetadata;
196
- }
471
+ export type DocumentToImageOperation = ({
472
+ type: "renderPageToFitBoundingBox";
473
+ } & RenderPageToFitBoundingBoxOperation) | ({
474
+ type: "renderPage";
475
+ } & RenderPageOperation);
197
476
  /**
477
+ * Renders document pages as images.
478
+ *
198
479
  * Log Safety: UNSAFE
199
480
  */
200
- export interface GetMediaItemInfoResponse {
201
- viewRid: _Core.MediaSetViewRid;
202
- path?: _Core.MediaItemPath;
203
- logicalTimestamp: LogicalTimestamp;
204
- attribution?: MediaAttribution;
481
+ export interface DocumentToImageTransformation {
482
+ encoding: ImageryEncodeFormat;
483
+ operation: DocumentToImageOperation;
205
484
  }
206
485
  /**
207
- * Log Safety: SAFE
486
+ * The operation to perform for document to text conversion.
487
+ *
488
+ * Log Safety: UNSAFE
208
489
  */
209
- export interface GetMediaItemRidByPathResponse {
210
- mediaItemRid?: _Core.MediaItemRid;
490
+ export type DocumentToTextOperation = ({
491
+ type: "extractTableOfContents";
492
+ } & ExtractTableOfContentsOperation) | ({
493
+ type: "getPdfPageDimensions";
494
+ } & GetPdfPageDimensionsOperation) | ({
495
+ type: "extractAllText";
496
+ } & ExtractAllTextOperation) | ({
497
+ type: "extractTextFromPagesToArray";
498
+ } & ExtractTextFromPagesToArrayOperation) | ({
499
+ type: "ocrOnPage";
500
+ } & OcrOnPageOperation) | ({
501
+ type: "extractFormFields";
502
+ } & ExtractFormFieldsOperation) | ({
503
+ type: "extractUnstructuredTextFromPage";
504
+ } & ExtractUnstructuredTextFromPageOperation) | ({
505
+ type: "extractLayoutAwareContent";
506
+ } & DocumentExtractLayoutAwareContentOperation) | ({
507
+ type: "ocrOnPages";
508
+ } & OcrOnPagesOperation);
509
+ /**
510
+ * Extracts text from documents.
511
+ *
512
+ * Log Safety: UNSAFE
513
+ */
514
+ export interface DocumentToTextTransformation {
515
+ operation: DocumentToTextOperation;
211
516
  }
212
517
  /**
213
- * GPS location metadata extracted from EXIF data embedded in the image.
518
+ * Metadata about an email attachment.
214
519
  *
215
520
  * Log Safety: UNSAFE
216
521
  */
217
- export interface GpsMetadata {
218
- latitude?: number;
219
- longitude?: number;
220
- altitude?: number;
522
+ export interface EmailAttachment {
523
+ attachmentIndex: number;
524
+ fileName?: string;
525
+ mimeType: string;
221
526
  }
222
527
  /**
223
- * A ground control point for geo-referencing.
528
+ * The format of an email media item.
224
529
  *
225
530
  * Log Safety: SAFE
226
531
  */
227
- export interface GroundControlPoint {
228
- pixX?: number;
229
- pixY?: number;
230
- projX?: number;
231
- projY?: number;
232
- projZ?: number;
532
+ export type EmailDecodeFormat = "EML";
533
+ /**
534
+ * Metadata for email media items.
535
+ *
536
+ * Log Safety: UNSAFE
537
+ */
538
+ export interface EmailMediaItemMetadata {
539
+ format: EmailDecodeFormat;
540
+ sizeBytes: number;
541
+ sender: Array<Mailbox>;
542
+ date: string;
543
+ attachmentCount: number;
544
+ to: Array<MailboxOrGroup>;
545
+ cc: Array<MailboxOrGroup>;
546
+ subject?: string;
547
+ attachments: Array<EmailAttachment>;
233
548
  }
234
549
  /**
235
- * The domain of an image attribute.
550
+ * The operation to perform for email to attachment extraction.
236
551
  *
237
552
  * Log Safety: UNSAFE
238
553
  */
239
- export type ImageAttributeDomain = LooselyBrandedString<"ImageAttributeDomain">;
554
+ export type EmailToAttachmentOperation = {
555
+ type: "getEmailAttachment";
556
+ } & GetEmailAttachmentOperation;
240
557
  /**
241
- * The key of an image attribute within a domain.
558
+ * Extracts attachments from email.
242
559
  *
243
560
  * Log Safety: UNSAFE
244
561
  */
245
- export type ImageAttributeKey = LooselyBrandedString<"ImageAttributeKey">;
562
+ export interface EmailToAttachmentTransformation {
563
+ operation: EmailToAttachmentOperation;
564
+ }
246
565
  /**
247
- * The format of an imagery media item.
566
+ * The output format for email body extraction.
248
567
  *
249
568
  * Log Safety: SAFE
250
569
  */
251
- export type ImageryDecodeFormat = "BMP" | "TIFF" | "NITF" | "JP2K" | "JPG" | "PNG" | "WEBP";
570
+ export type EmailToTextEncodeFormat = "TEXT" | "HTML";
252
571
  /**
253
- * Metadata for imagery (image) media items.
572
+ * The operation to perform for email to text extraction.
254
573
  *
255
574
  * Log Safety: UNSAFE
256
575
  */
257
- export interface ImageryMediaItemMetadata {
258
- format: ImageryDecodeFormat;
259
- dimensions?: Dimensions;
260
- bands: Array<BandInfo>;
261
- attributes: Record<ImageAttributeDomain, Record<ImageAttributeKey, string>>;
262
- iccProfile?: string;
263
- geo?: GeoMetadata;
264
- pages?: number;
265
- orientation?: Orientation;
266
- sizeBytes: number;
576
+ export type EmailToTextOperation = {
577
+ type: "getEmailBody";
578
+ } & GetEmailBodyOperation;
579
+ /**
580
+ * Extracts text content from email.
581
+ *
582
+ * Log Safety: UNSAFE
583
+ */
584
+ export interface EmailToTextTransformation {
585
+ operation: EmailToTextOperation;
267
586
  }
268
587
  /**
269
- * A number representing a logical ordering to be used for transactions, etc.
270
- This can be interpreted as a timestamp in microseconds, but may differ slightly from system clock time due
271
- to clock drift and slight adjustments for the sake of ordering.
272
- Only positive timestamps (representing times after epoch) are supported.
588
+ * Encrypts bounding boxes in an image using a commutative encryption algorithm.
589
+ *
590
+ * Log Safety: SAFE
591
+ */
592
+ export interface EncryptImageOperation {
593
+ polygons: Array<ImageRegionPolygon>;
594
+ cipherLicenseRid: string;
595
+ }
596
+ /**
597
+ * Extracts text across all pages of the document.
598
+ For PDF documents, includes all text. For DocX documents, includes only regular paragraphs.
273
599
  *
274
600
  * Log Safety: SAFE
275
601
  */
276
- export type LogicalTimestamp = string;
602
+ export interface ExtractAllTextOperation {
603
+ }
277
604
  /**
605
+ * Extracts the first audio stream from the video unchanged.
606
+ *
278
607
  * Log Safety: SAFE
279
608
  */
280
- export interface MediaAttribution {
281
- creatorId: _Core.UserId;
282
- creationTimestamp: string;
609
+ export interface ExtractAudioOperation {
283
610
  }
284
611
  /**
285
- * Detailed metadata about a media item, including type-specific information such as dimensions for images,
286
- duration for audio/video, page count for documents, etc.
612
+ * Extracts the first full scene frame from the video.
613
+ If both width and height are not specified, preserves the original size.
614
+ If only one dimension is specified, the other is calculated to preserve aspect ratio.
287
615
  *
288
- * Log Safety: UNSAFE
616
+ * Log Safety: SAFE
289
617
  */
290
- export type MediaItemMetadata = ({
291
- type: "document";
292
- } & DocumentMediaItemMetadata) | ({
293
- type: "imagery";
294
- } & ImageryMediaItemMetadata) | ({
295
- type: "spreadsheet";
296
- } & SpreadsheetMediaItemMetadata) | ({
297
- type: "untyped";
298
- } & UntypedMediaItemMetadata) | ({
299
- type: "audio";
300
- } & AudioMediaItemMetadata) | ({
301
- type: "video";
302
- } & VideoMediaItemMetadata) | ({
303
- type: "dicom";
304
- } & DicomMediaItemMetadata);
618
+ export interface ExtractFirstFrameOperation {
619
+ height?: number;
620
+ width?: number;
621
+ }
305
622
  /**
306
- * Format of the media item attempted to be decoded based on the XML structure.
623
+ * Extracts form field data from a PDF document.
307
624
  *
308
625
  * Log Safety: SAFE
309
626
  */
310
- export type MediaItemXmlFormat = "DOCX" | "XLSX" | "PPTX";
627
+ export interface ExtractFormFieldsOperation {
628
+ }
311
629
  /**
630
+ * Extracts frames from the video at specified timestamps.
631
+ If only one dimension is specified, the other is calculated to preserve aspect ratio.
632
+ *
633
+ * Log Safety: UNSAFE
634
+ */
635
+ export interface ExtractFramesAtTimestampsOperation {
636
+ height?: number;
637
+ width?: number;
638
+ timestamp: number;
639
+ }
640
+ /**
641
+ * Extracts all scene frames from a video as images in an archive.
642
+ *
643
+ * Log Safety: UNSAFE
644
+ */
645
+ export interface ExtractSceneFramesOperation {
646
+ encoding: ImageryEncodeFormat;
647
+ sceneScore?: SceneScore;
648
+ }
649
+ /**
650
+ * Extracts the table of contents from a document.
651
+ *
652
+ * Log Safety: SAFE
653
+ */
654
+ export interface ExtractTableOfContentsOperation {
655
+ }
656
+ /**
657
+ * Extracts text from multiple pages into a list of strings.
658
+ *
659
+ * Log Safety: SAFE
660
+ */
661
+ export interface ExtractTextFromPagesToArrayOperation {
662
+ startPage?: number;
663
+ endPage?: number;
664
+ }
665
+ /**
666
+ * Extracts unstructured text from a specified page.
667
+ *
668
+ * Log Safety: UNSAFE
669
+ */
670
+ export interface ExtractUnstructuredTextFromPageOperation {
671
+ pageNumber: number;
672
+ }
673
+ /**
674
+ * The flip axis from EXIF orientation.
675
+ *
676
+ * Log Safety: SAFE
677
+ */
678
+ export type FlipAxis = "HORIZONTAL" | "VERTICAL" | "UNKNOWN";
679
+ /**
680
+ * A list of ground control points for geo-referencing.
681
+ *
682
+ * Log Safety: SAFE
683
+ */
684
+ export interface GcpList {
685
+ gcps: Array<GroundControlPoint>;
686
+ }
687
+ /**
688
+ * Generates a vector embedding for an image using the specified model.
689
+ *
690
+ * Log Safety: SAFE
691
+ */
692
+ export interface GenerateEmbeddingOperation {
693
+ modelId: AvailableEmbeddingModelIds;
694
+ }
695
+ /**
696
+ * Embedded geo-referencing data for an image.
697
+ *
698
+ * Log Safety: UNSAFE
699
+ */
700
+ export interface GeoMetadata {
701
+ crs?: CoordinateReferenceSystem;
702
+ geotransform?: AffineTransform;
703
+ gcpInfo?: GcpList;
704
+ gpsData?: GpsMetadata;
705
+ }
706
+ /**
707
+ * Retrieves the bytes of an email attachment by index.
708
+ *
709
+ * Log Safety: UNSAFE
710
+ */
711
+ export interface GetEmailAttachmentOperation {
712
+ mimeType: string;
713
+ attachmentIndex: number;
714
+ }
715
+ /**
716
+ * Gets the email body in the specified format.
717
+ *
718
+ * Log Safety: SAFE
719
+ */
720
+ export interface GetEmailBodyOperation {
721
+ outputFormat: EmailToTextEncodeFormat;
722
+ }
723
+ /**
724
+ * Log Safety: UNSAFE
725
+ */
726
+ export interface GetMediaItemInfoResponse {
727
+ viewRid: _Core.MediaSetViewRid;
728
+ path?: _Core.MediaItemPath;
729
+ logicalTimestamp: LogicalTimestamp;
730
+ attribution?: MediaAttribution;
731
+ }
732
+ /**
733
+ * Log Safety: SAFE
734
+ */
735
+ export interface GetMediaItemRidByPathResponse {
736
+ mediaItemRid?: _Core.MediaItemRid;
737
+ }
738
+ /**
739
+ * Returns the dimensions of each page in a PDF document as JSON (in points).
740
+ *
741
+ * Log Safety: SAFE
742
+ */
743
+ export interface GetPdfPageDimensionsOperation {
744
+ }
745
+ /**
746
+ * Returns a list of timestamps for scene frames in the video as JSON.
747
+ *
748
+ * Log Safety: SAFE
749
+ */
750
+ export interface GetTimestampsForSceneFramesOperation {
751
+ sceneScore?: SceneScore;
752
+ }
753
+ /**
754
+ * Response containing the status of a transformation job.
755
+ *
756
+ * Log Safety: UNSAFE
757
+ */
758
+ export interface GetTransformationJobStatusResponse {
759
+ status: TransformationJobStatus;
760
+ jobId: TransformationJobId;
761
+ }
762
+ /**
763
+ * GPS location metadata extracted from EXIF data embedded in the image.
764
+ *
765
+ * Log Safety: UNSAFE
766
+ */
767
+ export interface GpsMetadata {
768
+ latitude?: number;
769
+ longitude?: number;
770
+ altitude?: number;
771
+ }
772
+ /**
773
+ * Converts an image to grayscale.
774
+ *
775
+ * Log Safety: SAFE
776
+ */
777
+ export interface GrayscaleImageOperation {
778
+ }
779
+ /**
780
+ * A ground control point for geo-referencing.
781
+ *
782
+ * Log Safety: SAFE
783
+ */
784
+ export interface GroundControlPoint {
785
+ pixX?: number;
786
+ pixY?: number;
787
+ projX?: number;
788
+ projY?: number;
789
+ projZ?: number;
790
+ }
791
+ /**
792
+ * A named group of mailboxes.
793
+ *
794
+ * Log Safety: UNSAFE
795
+ */
796
+ export interface Group {
797
+ groupName: string;
798
+ mailboxes: Array<Mailbox>;
799
+ }
800
+ /**
801
+ * A wrapper for a group in the MailboxOrGroup union.
802
+ *
803
+ * Log Safety: UNSAFE
804
+ */
805
+ export interface GroupWrapper {
806
+ group: Group;
807
+ }
808
+ /**
809
+ * The domain of an image attribute.
810
+ *
811
+ * Log Safety: UNSAFE
812
+ */
813
+ export type ImageAttributeDomain = LooselyBrandedString<"ImageAttributeDomain">;
814
+ /**
815
+ * The key of an image attribute within a domain.
816
+ *
817
+ * Log Safety: UNSAFE
818
+ */
819
+ export type ImageAttributeKey = LooselyBrandedString<"ImageAttributeKey">;
820
+ /**
821
+ * Extracts text from an image with layout information preserved.
822
+ *
823
+ * Log Safety: SAFE
824
+ */
825
+ export interface ImageExtractLayoutAwareContentOperation {
826
+ parameters: LayoutAwareExtractionParameters;
827
+ }
828
+ /**
829
+ * Performs OCR (Optical Character Recognition) on an image.
830
+ *
831
+ * Log Safety: UNSAFE
832
+ */
833
+ export interface ImageOcrOperation {
834
+ parameters: OcrParameters;
835
+ }
836
+ /**
837
+ * An operation to perform on an image.
838
+ *
839
+ * Log Safety: UNSAFE
840
+ */
841
+ export type ImageOperation = ({
842
+ type: "rotate";
843
+ } & RotateImageOperation) | ({
844
+ type: "resizeToFitBoundingBox";
845
+ } & ResizeToFitBoundingBoxOperation) | ({
846
+ type: "encrypt";
847
+ } & EncryptImageOperation) | ({
848
+ type: "contrast";
849
+ } & ContrastImageOperation) | ({
850
+ type: "tile";
851
+ } & TileImageOperation) | ({
852
+ type: "resize";
853
+ } & ResizeImageOperation) | ({
854
+ type: "annotate";
855
+ } & AnnotateImageOperation) | ({
856
+ type: "decrypt";
857
+ } & DecryptImageOperation) | ({
858
+ type: "crop";
859
+ } & CropImageOperation) | ({
860
+ type: "grayscale";
861
+ } & GrayscaleImageOperation);
862
+ /**
863
+ * Coordinate of a pixel in an image (x, y). Top left corner of the image is (0, 0).
864
+ *
865
+ * Log Safety: SAFE
866
+ */
867
+ export interface ImagePixelCoordinate {
868
+ x: number;
869
+ y: number;
870
+ }
871
+ /**
872
+ * Polygon drawn by connecting adjacent coordinates in the list with straight lines.
873
+ A line is drawn between the last and first coordinates in the list to create a closed shape.
874
+ Used to define regions in an image for operations like encryption/decryption.
875
+ *
876
+ * Log Safety: SAFE
877
+ */
878
+ export type ImageRegionPolygon = Array<ImagePixelCoordinate>;
879
+ /**
880
+ * The format of an imagery media item.
881
+ *
882
+ * Log Safety: SAFE
883
+ */
884
+ export type ImageryDecodeFormat = "BMP" | "TIFF" | "NITF" | "JP2K" | "JPG" | "PNG" | "WEBP";
885
+ /**
886
+ * The output format for encoding imagery.
887
+ *
888
+ * Log Safety: UNSAFE
889
+ */
890
+ export type ImageryEncodeFormat = ({
891
+ type: "jpg";
892
+ } & JpgFormat) | ({
893
+ type: "tiff";
894
+ } & TiffFormat) | ({
895
+ type: "png";
896
+ } & PngFormat) | ({
897
+ type: "webp";
898
+ } & WebpFormat);
899
+ /**
900
+ * Metadata for imagery (image) media items.
901
+ *
902
+ * Log Safety: UNSAFE
903
+ */
904
+ export interface ImageryMediaItemMetadata {
905
+ format: ImageryDecodeFormat;
906
+ dimensions?: Dimensions;
907
+ bands: Array<BandInfo>;
908
+ attributes: Record<ImageAttributeDomain, Record<ImageAttributeKey, string>>;
909
+ iccProfile?: string;
910
+ geo?: GeoMetadata;
911
+ pages?: number;
912
+ orientation?: Orientation;
913
+ sizeBytes: number;
914
+ }
915
+ /**
916
+ * The operation to perform for image to document conversion.
917
+ *
918
+ * Log Safety: UNSAFE
919
+ */
920
+ export type ImageToDocumentOperation = {
921
+ type: "createPdf";
922
+ } & CreatePdfOperation;
923
+ /**
924
+ * Converts images to documents.
925
+ *
926
+ * Log Safety: UNSAFE
927
+ */
928
+ export interface ImageToDocumentTransformation {
929
+ operation: ImageToDocumentOperation;
930
+ }
931
+ /**
932
+ * The operation to perform for image to embedding conversion.
933
+ *
934
+ * Log Safety: UNSAFE
935
+ */
936
+ export type ImageToEmbeddingOperation = {
937
+ type: "generateEmbedding";
938
+ } & GenerateEmbeddingOperation;
939
+ /**
940
+ * Generates embeddings from images.
941
+ *
942
+ * Log Safety: UNSAFE
943
+ */
944
+ export interface ImageToEmbeddingTransformation {
945
+ operation: ImageToEmbeddingOperation;
946
+ }
947
+ /**
948
+ * The operation to perform for image to text conversion.
949
+ *
950
+ * Log Safety: UNSAFE
951
+ */
952
+ export type ImageToTextOperation = ({
953
+ type: "extractLayoutAwareContent";
954
+ } & ImageExtractLayoutAwareContentOperation) | ({
955
+ type: "ocr";
956
+ } & ImageOcrOperation);
957
+ /**
958
+ * Extracts text from images.
959
+ *
960
+ * Log Safety: UNSAFE
961
+ */
962
+ export interface ImageToTextTransformation {
963
+ operation: ImageToTextOperation;
964
+ }
965
+ /**
966
+ * Transforms images with multiple operations applied in sequence.
967
+ Operations are applied in the order they appear in the list.
968
+ *
969
+ * Log Safety: UNSAFE
970
+ */
971
+ export interface ImageTransformation {
972
+ encoding: ImageryEncodeFormat;
973
+ operations: Array<ImageOperation>;
974
+ }
975
+ /**
976
+ * JPEG image format.
977
+ *
978
+ * Log Safety: SAFE
979
+ */
980
+ export interface JpgFormat {
981
+ }
982
+ /**
983
+ * Parameters for layout-aware content extraction.
984
+ *
985
+ * Log Safety: SAFE
986
+ */
987
+ export interface LayoutAwareExtractionParameters {
988
+ languages: Array<OcrLanguage>;
989
+ }
990
+ /**
991
+ * A number representing a logical ordering to be used for transactions, etc.
992
+ This can be interpreted as a timestamp in microseconds, but may differ slightly from system clock time due
993
+ to clock drift and slight adjustments for the sake of ordering.
994
+ Only positive timestamps (representing times after epoch) are supported.
995
+ *
996
+ * Log Safety: SAFE
997
+ */
998
+ export type LogicalTimestamp = string;
999
+ /**
1000
+ * An email mailbox with an optional display name and email address.
1001
+ *
1002
+ * Log Safety: UNSAFE
1003
+ */
1004
+ export interface Mailbox {
1005
+ displayName?: string;
1006
+ emailAddress: string;
1007
+ }
1008
+ /**
1009
+ * Either a mailbox or a group of mailboxes.
1010
+ *
1011
+ * Log Safety: UNSAFE
1012
+ */
1013
+ export type MailboxOrGroup = ({
1014
+ type: "mailbox";
1015
+ } & MailboxWrapper) | ({
1016
+ type: "group";
1017
+ } & GroupWrapper);
1018
+ /**
1019
+ * A wrapper for a mailbox in the MailboxOrGroup union.
1020
+ *
1021
+ * Log Safety: UNSAFE
1022
+ */
1023
+ export interface MailboxWrapper {
1024
+ mailbox: Mailbox;
1025
+ }
1026
+ /**
1027
+ * Log Safety: SAFE
1028
+ */
1029
+ export interface MediaAttribution {
1030
+ creatorId: _Core.UserId;
1031
+ creationTimestamp: string;
1032
+ }
1033
+ /**
1034
+ * Detailed metadata about a media item, including type-specific information such as dimensions for images,
1035
+ duration for audio/video, page count for documents, etc.
1036
+ *
1037
+ * Log Safety: UNSAFE
1038
+ */
1039
+ export type MediaItemMetadata = ({
1040
+ type: "document";
1041
+ } & DocumentMediaItemMetadata) | ({
1042
+ type: "imagery";
1043
+ } & ImageryMediaItemMetadata) | ({
1044
+ type: "spreadsheet";
1045
+ } & SpreadsheetMediaItemMetadata) | ({
1046
+ type: "untyped";
1047
+ } & UntypedMediaItemMetadata) | ({
1048
+ type: "audio";
1049
+ } & AudioMediaItemMetadata) | ({
1050
+ type: "model3d";
1051
+ } & Model3dMediaItemMetadata) | ({
1052
+ type: "video";
1053
+ } & VideoMediaItemMetadata) | ({
1054
+ type: "dicom";
1055
+ } & DicomMediaItemMetadata) | ({
1056
+ type: "email";
1057
+ } & EmailMediaItemMetadata);
1058
+ /**
1059
+ * Format of the media item attempted to be decoded based on the XML structure.
1060
+ *
1061
+ * Log Safety: SAFE
1062
+ */
1063
+ export type MediaItemXmlFormat = "DOCX" | "XLSX" | "PPTX";
1064
+ /**
1065
+ * Log Safety: UNSAFE
1066
+ */
1067
+ export interface MediaSet {
1068
+ rid: _Core.MediaSetRid;
1069
+ name: MediaSetName;
1070
+ parentFolderRid: _Core.FolderRid;
1071
+ }
1072
+ /**
1073
+ * Log Safety: UNSAFE
1074
+ */
1075
+ export type MediaSetName = LooselyBrandedString<"MediaSetName">;
1076
+ /**
1077
+ * MKV (Matroska) video container format.
1078
+ *
1079
+ * Log Safety: SAFE
1080
+ */
1081
+ export interface MkvVideoContainerFormat {
1082
+ }
1083
+ /**
1084
+ * DICOM modality code. A list of modalities and their meanings can be found in the DICOM specification.
1085
+ https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.3.html#sect_C.7.3.1.1.1
1086
+ *
1087
+ * Log Safety: SAFE
1088
+ */
1089
+ export type Modality = "AR" | "ASMT" | "AU" | "BDUS" | "BI" | "BMD" | "CR" | "CT" | "CTPROTOCOL" | "DG" | "DOC" | "DX" | "ECG" | "EPS" | "ES" | "FID" | "GM" | "HC" | "HD" | "IO" | "IOL" | "IVOCT" | "IVUS" | "KER" | "KO" | "LEN" | "LS" | "MG" | "MR" | "M3D" | "NM" | "OAM" | "OCT" | "OP" | "OPM" | "OPT" | "OPTBSV" | "OPTENF" | "OPV" | "OSS" | "OT" | "PLAN" | "PR" | "PT" | "PX" | "REG" | "RESP" | "RF" | "RG" | "RTDOSE" | "RTIMAGE" | "RTINTENT" | "RTPLAN" | "RTRAD" | "RTRECORD" | "RTSEGANN" | "RTSTRUCT" | "RWV" | "SEG" | "SM" | "SMR" | "SR" | "SRF" | "STAIN" | "TEXTUREMAP" | "TG" | "US" | "VA" | "XA" | "XC" | "AS" | "CD" | "CF" | "CP" | "CS" | "DD" | "DF" | "DM" | "DS" | "EC" | "FA" | "FS" | "LP" | "MA" | "MS" | "OPR" | "ST" | "VF";
1090
+ /**
1091
+ * The format of a 3D model media item.
1092
+ *
1093
+ * Log Safety: SAFE
1094
+ */
1095
+ export type Model3dDecodeFormat = "LAS" | "PLY" | "OBJ";
1096
+ /**
1097
+ * Metadata for 3D model media items.
1098
+ *
1099
+ * Log Safety: SAFE
1100
+ */
1101
+ export interface Model3dMediaItemMetadata {
1102
+ format: Model3dDecodeFormat;
1103
+ modelType: Model3dType;
1104
+ sizeBytes: number;
1105
+ }
1106
+ /**
1107
+ * The type of 3D model representation.
1108
+ *
1109
+ * Log Safety: SAFE
1110
+ */
1111
+ export type Model3dType = "POINT_CLOUD" | "MESH";
1112
+ /**
1113
+ * MOV (QuickTime) video container format.
1114
+ *
1115
+ * Log Safety: SAFE
1116
+ */
1117
+ export interface MovVideoContainerFormat {
1118
+ }
1119
+ /**
1120
+ * MP3 audio format.
1121
+ *
1122
+ * Log Safety: SAFE
1123
+ */
1124
+ export interface Mp3Format {
1125
+ }
1126
+ /**
1127
+ * MP4 video container format.
1128
+ *
1129
+ * Log Safety: SAFE
1130
+ */
1131
+ export interface Mp4VideoContainerFormat {
1132
+ }
1133
+ /**
1134
+ * Specifies the number of audio channels. Defaults to 2 (stereo).
1135
+ *
1136
+ * Log Safety: SAFE
1137
+ */
1138
+ export interface NumberOfChannels {
1139
+ numberOfChannels: number;
1140
+ }
1141
+ /**
1142
+ * hOCR (HTML-based OCR) output format.
1143
+ *
1144
+ * Log Safety: SAFE
1145
+ */
1146
+ export interface OcrHocrOutputFormat {
1147
+ }
1148
+ /**
1149
+ * Language codes for OCR.
1150
+ *
1151
+ * Log Safety: SAFE
1152
+ */
1153
+ export type OcrLanguage = "AFR" | "AMH" | "ARA" | "ASM" | "AZE" | "AZE_CYRL" | "BEL" | "BEN" | "BOD" | "BOS" | "BRE" | "BUL" | "CAT" | "CEB" | "CES" | "CHI_SIM" | "CHI_SIM_VERT" | "CHI_TRA" | "CHI_TRA_VERT" | "CHR" | "COS" | "CYM" | "DAN" | "DEU" | "DIV" | "DZO" | "ELL" | "ENG" | "ENM" | "EPO" | "EST" | "EUS" | "FAO" | "FAS" | "FIL" | "FIN" | "FRA" | "FRM" | "FRY" | "GLA" | "GLE" | "GLG" | "GRC" | "GUJ" | "HAT" | "HEB" | "HIN" | "HRV" | "HUN" | "HYE" | "IKU" | "IND" | "ISL" | "ITA" | "ITA_OLD" | "JAV" | "JPN" | "JPN_VERT" | "KAN" | "KAT" | "KAT_OLD" | "KAZ" | "KHM" | "KIR" | "KMR" | "KOR" | "KOR_VERT" | "LAO" | "LAT" | "LAV" | "LIT" | "LTZ" | "MAL" | "MAR" | "MKD" | "MLT" | "MON" | "MRI" | "MSA" | "MYA" | "NEP" | "NLD" | "NOR" | "OCI" | "ORI" | "OSD" | "PAN" | "POL" | "POR" | "PUS" | "QUE" | "RON" | "RUS" | "SAN" | "SIN" | "SLK" | "SLV" | "SND" | "SPA" | "SPA_OLD" | "SQI" | "SRP" | "SRP_LATN" | "SUN" | "SWA" | "SWE" | "SYR" | "TAM" | "TAT" | "TEL" | "TGK" | "THA" | "TIR" | "TON" | "TUR" | "UIG" | "UKR" | "URD" | "UZB" | "UZB_CYRL" | "VIE" | "YID" | "YOR";
1154
+ /**
1155
+ * Either a specific language or a script for OCR.
1156
+ *
1157
+ * Log Safety: UNSAFE
1158
+ */
1159
+ export type OcrLanguageOrScript = ({
1160
+ type: "language";
1161
+ } & OcrLanguageWrapper) | ({
1162
+ type: "script";
1163
+ } & OcrScriptWrapper);
1164
+ /**
1165
+ * Wrapper for an OCR language.
1166
+ *
1167
+ * Log Safety: SAFE
1168
+ */
1169
+ export interface OcrLanguageWrapper {
1170
+ language: OcrLanguage;
1171
+ }
1172
+ /**
1173
+ * Performs OCR (Optical Character Recognition) on a specific page of a document.
1174
+ *
312
1175
  * Log Safety: UNSAFE
313
1176
  */
314
- export interface MediaSet {
315
- rid: _Core.MediaSetRid;
316
- name: MediaSetName;
317
- parentFolderRid: _Core.FolderRid;
1177
+ export interface OcrOnPageOperation {
1178
+ pageNumber: number;
1179
+ parameters: OcrParameters;
318
1180
  }
319
1181
  /**
1182
+ * Creates access patterns for OCR across pages of a document.
1183
+ *
320
1184
  * Log Safety: UNSAFE
321
1185
  */
322
- export type MediaSetName = LooselyBrandedString<"MediaSetName">;
1186
+ export interface OcrOnPagesOperation {
1187
+ parameters: OcrParameters;
1188
+ pageNumber: number;
1189
+ }
323
1190
  /**
324
- * DICOM modality code. A list of modalities and their meanings can be found in the DICOM specification.
325
- https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.3.html#sect_C.7.3.1.1.1
326
- *
327
- * Log Safety: SAFE
328
- */
329
- export type Modality = "AR" | "ASMT" | "AU" | "BDUS" | "BI" | "BMD" | "CR" | "CT" | "CTPROTOCOL" | "DG" | "DOC" | "DX" | "ECG" | "EPS" | "ES" | "FID" | "GM" | "HC" | "HD" | "IO" | "IOL" | "IVOCT" | "IVUS" | "KER" | "KO" | "LEN" | "LS" | "MG" | "MR" | "M3D" | "NM" | "OAM" | "OCT" | "OP" | "OPM" | "OPT" | "OPTBSV" | "OPTENF" | "OPV" | "OSS" | "OT" | "PLAN" | "PR" | "PT" | "PX" | "REG" | "RESP" | "RF" | "RG" | "RTDOSE" | "RTIMAGE" | "RTINTENT" | "RTPLAN" | "RTRAD" | "RTRECORD" | "RTSEGANN" | "RTSTRUCT" | "RWV" | "SEG" | "SM" | "SMR" | "SR" | "SRF" | "STAIN" | "TEXTUREMAP" | "TG" | "US" | "VA" | "XA" | "XC" | "AS" | "CD" | "CF" | "CP" | "CS" | "DD" | "DF" | "DM" | "DS" | "EC" | "FA" | "FS" | "LP" | "MA" | "MS" | "OPR" | "ST" | "VF";
1191
+ * The output format for OCR results.
1192
+ *
1193
+ * Log Safety: UNSAFE
1194
+ */
1195
+ export type OcrOutputFormat = ({
1196
+ type: "hocr";
1197
+ } & OcrHocrOutputFormat) | ({
1198
+ type: "text";
1199
+ } & OcrTextOutputFormat);
1200
+ /**
1201
+ * Parameters for OCR (Optical Character Recognition) operations.
1202
+ *
1203
+ * Log Safety: UNSAFE
1204
+ */
1205
+ export interface OcrParameters {
1206
+ outputFormat: OcrOutputFormat;
1207
+ languages: Array<OcrLanguageOrScript>;
1208
+ }
1209
+ /**
1210
+ * Script codes for OCR.
1211
+ *
1212
+ * Log Safety: SAFE
1213
+ */
1214
+ export type OcrScript = "ARABIC" | "ARMENIAN" | "BENGALI" | "CANADIAN_ABORIGINAL" | "CHEROKEE" | "CYRILLIC" | "DEVANAGARI" | "ETHIOPIC" | "FRAKTUR" | "GEORGIAN" | "GREEK" | "GUJARATI" | "GURMUKHI" | "HAN_SIMPLIFIED" | "HAN_SIMPLIFIED_VERT" | "HAN_TRADITIONAL" | "HAN_TRADITIONAL_VERT" | "HANGUL" | "HANGUL_VERT" | "HEBREW" | "JAPANESE" | "JAPANESE_VERT" | "KANNADA" | "KHMER" | "LAO" | "LATIN" | "MALAYALAM" | "MYANMAR" | "ORIYA" | "SINHALA" | "SYRIAC" | "TAMIL" | "TELUGU" | "THAANA" | "THAI" | "TIBETAN" | "VIETNAMESE";
1215
+ /**
1216
+ * Wrapper for an OCR script.
1217
+ *
1218
+ * Log Safety: SAFE
1219
+ */
1220
+ export interface OcrScriptWrapper {
1221
+ script: OcrScript;
1222
+ }
1223
+ /**
1224
+ * Plain text output format for OCR.
1225
+ *
1226
+ * Log Safety: SAFE
1227
+ */
1228
+ export interface OcrTextOutputFormat {
1229
+ }
330
1230
  /**
331
1231
  * The orientation information as encoded in EXIF metadata.
332
1232
  *
@@ -342,18 +1242,129 @@ export interface Orientation {
342
1242
  * Log Safety: SAFE
343
1243
  */
344
1244
  export type PaletteInterpretation = "GRAY" | "RGB" | "RGBA" | "CMYK" | "HLS";
1245
+ /**
1246
+ * PDF document format.
1247
+ *
1248
+ * Log Safety: SAFE
1249
+ */
1250
+ export interface PdfFormat {
1251
+ }
1252
+ /**
1253
+ * The performance mode for transcription.
1254
+ *
1255
+ * Log Safety: SAFE
1256
+ */
1257
+ export type PerformanceMode = "MORE_ECONOMICAL" | "MORE_PERFORMANT";
1258
+ /**
1259
+ * Plain text transcription output format.
1260
+ *
1261
+ * Log Safety: SAFE
1262
+ */
1263
+ export interface PlainTextNoSegmentData {
1264
+ addTimestamps: boolean;
1265
+ }
1266
+ /**
1267
+ * PNG image format.
1268
+ *
1269
+ * Log Safety: SAFE
1270
+ */
1271
+ export interface PngFormat {
1272
+ }
1273
+ /**
1274
+ * PTTML (Palantir Timed Text Markup Language) transcription output format.
1275
+ *
1276
+ * Log Safety: SAFE
1277
+ */
1278
+ export interface Pttml {
1279
+ }
345
1280
  /**
346
1281
  * Log Safety: SAFE
347
1282
  */
348
1283
  export interface PutMediaItemResponse {
349
1284
  mediaItemRid: _Core.MediaItemRid;
350
1285
  }
1286
+ /**
1287
+ * Renders a frame of a DICOM file as an image.
1288
+ If only one dimension is specified, the other is calculated to preserve aspect ratio.
1289
+ *
1290
+ * Log Safety: SAFE
1291
+ */
1292
+ export interface RenderImageLayerOperation {
1293
+ layerNumber?: number;
1294
+ height?: number;
1295
+ width?: number;
1296
+ }
1297
+ /**
1298
+ * Renders a PDF page as an image.
1299
+ If only one dimension is specified, the other is calculated to preserve aspect ratio.
1300
+ *
1301
+ * Log Safety: SAFE
1302
+ */
1303
+ export interface RenderPageOperation {
1304
+ pageNumber?: number;
1305
+ height?: number;
1306
+ width?: number;
1307
+ }
1308
+ /**
1309
+ * Renders a PDF page to maximally fit within a bounding box while preserving aspect ratio.
1310
+ *
1311
+ * Log Safety: SAFE
1312
+ */
1313
+ export interface RenderPageToFitBoundingBoxOperation {
1314
+ pageNumber?: number;
1315
+ width: number;
1316
+ height: number;
1317
+ }
1318
+ /**
1319
+ * Resizes an image to the specified dimensions.
1320
+ If only one dimension is specified, the other is calculated to preserve aspect ratio.
1321
+ *
1322
+ * Log Safety: SAFE
1323
+ */
1324
+ export interface ResizeImageOperation {
1325
+ height?: number;
1326
+ width?: number;
1327
+ autoOrient?: boolean;
1328
+ }
1329
+ /**
1330
+ * Resizes an image to maximally fit within a bounding box while preserving aspect ratio.
1331
+ *
1332
+ * Log Safety: SAFE
1333
+ */
1334
+ export interface ResizeToFitBoundingBoxOperation {
1335
+ width: number;
1336
+ height: number;
1337
+ }
1338
+ /**
1339
+ * Rotates an image clockwise by the specified angle.
1340
+ *
1341
+ * Log Safety: SAFE
1342
+ */
1343
+ export interface RotateImageOperation {
1344
+ angle: RotationAngle;
1345
+ }
351
1346
  /**
352
1347
  * The rotation angle from EXIF orientation.
353
1348
  *
354
1349
  * Log Safety: SAFE
355
1350
  */
356
1351
  export type RotationAngle = "DEGREE_90" | "DEGREE_180" | "DEGREE_270" | "UNKNOWN";
1352
+ /**
1353
+ * The sensitivity threshold for scene detection.
1354
+ *
1355
+ * Log Safety: SAFE
1356
+ */
1357
+ export type SceneScore = "MORE_SENSITIVE" | "STANDARD" | "LESS_SENSITIVE";
1358
+ /**
1359
+ * Slices a PDF to a specified page range.
1360
+ *
1361
+ * Log Safety: SAFE
1362
+ */
1363
+ export interface SlicePdfRangeOperation {
1364
+ startPageInclusive: number;
1365
+ endPageExclusive: number;
1366
+ strictlyEnforceEndPage?: boolean;
1367
+ }
357
1368
  /**
358
1369
  * The format of a spreadsheet media item.
359
1370
  *
@@ -372,6 +1383,47 @@ export interface SpreadsheetMediaItemMetadata {
372
1383
  title?: string;
373
1384
  author?: string;
374
1385
  }
1386
+ /**
1387
+ * The operation to perform for spreadsheet to text conversion.
1388
+ *
1389
+ * Log Safety: UNSAFE
1390
+ */
1391
+ export type SpreadsheetToTextOperation = {
1392
+ type: "convertSheetToJson";
1393
+ } & ConvertSheetToJsonOperation;
1394
+ /**
1395
+ * Converts spreadsheet data to text/JSON.
1396
+ *
1397
+ * Log Safety: UNSAFE
1398
+ */
1399
+ export interface SpreadsheetToTextTransformation {
1400
+ operation: SpreadsheetToTextOperation;
1401
+ }
1402
+ /**
1403
+ * TAR archive format.
1404
+ *
1405
+ * Log Safety: SAFE
1406
+ */
1407
+ export interface TarFormat {
1408
+ }
1409
+ /**
1410
+ * TIFF image format.
1411
+ *
1412
+ * Log Safety: SAFE
1413
+ */
1414
+ export interface TiffFormat {
1415
+ }
1416
+ /**
1417
+ * Generates Slippy map tiles (EPSG 3857) from a geo-embedded image.
1418
+ Only supported for geo-embedded TIFF and NITF images with at most 100M square pixels.
1419
+ *
1420
+ * Log Safety: UNSAFE
1421
+ */
1422
+ export interface TileImageOperation {
1423
+ zoom: number;
1424
+ x: number;
1425
+ y: number;
1426
+ }
375
1427
  /**
376
1428
  * Log Safety: SAFE
377
1429
  */
@@ -403,6 +1455,136 @@ export interface TrackedTransformationSuccessfulResponse {
403
1455
  * Log Safety: SAFE
404
1456
  */
405
1457
  export type TransactionId = string;
1458
+ /**
1459
+ * Encodes video to the specified format.
1460
+ *
1461
+ * Log Safety: SAFE
1462
+ */
1463
+ export interface TranscodeOperation {
1464
+ }
1465
+ /**
1466
+ * JSON transcription output format.
1467
+ *
1468
+ * Log Safety: SAFE
1469
+ */
1470
+ export interface TranscribeJson {
1471
+ }
1472
+ /**
1473
+ * Transcribes speech in audio to text.
1474
+ *
1475
+ * Log Safety: UNSAFE
1476
+ */
1477
+ export interface TranscribeOperation {
1478
+ language?: TranscriptionLanguage;
1479
+ diarize?: boolean;
1480
+ outputFormat?: TranscribeTextEncodeFormat;
1481
+ performanceMode?: PerformanceMode;
1482
+ }
1483
+ /**
1484
+ * The output format for transcription results.
1485
+ *
1486
+ * Log Safety: UNSAFE
1487
+ */
1488
+ export type TranscribeTextEncodeFormat = ({
1489
+ type: "plainTextNoSegmentData";
1490
+ } & PlainTextNoSegmentData) | ({
1491
+ type: "json";
1492
+ } & TranscribeJson) | ({
1493
+ type: "pttml";
1494
+ } & Pttml);
1495
+ /**
1496
+ * Language codes for audio transcription.
1497
+ If not specified, the language will be auto-detected from the first 30 seconds of audio.
1498
+ *
1499
+ * Log Safety: SAFE
1500
+ */
1501
+ export type TranscriptionLanguage = "AF" | "AM" | "AR" | "AS" | "AZ" | "BA" | "BE" | "BG" | "BN" | "BO" | "BR" | "BS" | "CA" | "CS" | "CY" | "DA" | "DE" | "EL" | "EN" | "ES" | "ET" | "EU" | "FA" | "FI" | "FO" | "FR" | "GL" | "GU" | "HA" | "HAW" | "HE" | "HI" | "HR" | "HT" | "HU" | "HY" | "ID" | "IS" | "IT" | "JA" | "JW" | "KA" | "KK" | "KM" | "KN" | "KO" | "LA" | "LB" | "LN" | "LO" | "LT" | "LV" | "MG" | "MI" | "MK" | "ML" | "MN" | "MR" | "MS" | "MT" | "MY" | "NE" | "NL" | "NN" | "false" | "OC" | "PA" | "PL" | "PS" | "PT" | "RO" | "RU" | "SA" | "SD" | "SI" | "SK" | "SL" | "SN" | "SO" | "SQ" | "SR" | "SU" | "SV" | "SW" | "TA" | "TE" | "TG" | "TH" | "TK" | "TL" | "TR" | "TT" | "UK" | "UR" | "UZ" | "VI" | "YI" | "YO" | "YUE" | "ZH" | "AFRIKAANS" | "ALBANIAN" | "AMHARIC" | "ARABIC" | "ARMENIAN" | "ASSAMESE" | "AZERBAIJANI" | "BASHKIR" | "BASQUE" | "BELARUSIAN" | "BENGALI" | "BOSNIAN" | "BRETON" | "BULGARIAN" | "BURMESE" | "CANTONESE" | "CASTILIAN" | "CATALAN" | "CHINESE" | "CROATIAN" | "CZECH" | "DANISH" | "DUTCH" | "ENGLISH" | "ESTONIAN" | "FAROESE" | "FINNISH" | "FLEMISH" | "FRENCH" | "GALICIAN" | "GEORGIAN" | "GERMAN" | "GREEK" | "GUJARATI" | "HAITIAN" | "HAITIAN_CREOLE" | "HAUSA" | "HAWAIIAN" | "HEBREW" | "HINDI" | "HUNGARIAN" | "ICELANDIC" | "INDONESIAN" | "ITALIAN" | "JAPANESE" | "JAVANESE" | "KANNADA" | "KAZAKH" | "KHMER" | "KOREAN" | "LAO" | "LATIN" | "LATVIAN" | "LETZEBURGESCH" | "LINGALA" | "LITHUANIAN" | "LUXEMBOURGISH" | "MACEDONIAN" | "MALAGASY" | "MALAY" | "MALAYALAM" | "MALTESE" | "MANDARIN" | "MAORI" | "MARATHI" | "MOLDAVIAN" | "MOLDOVAN" | "MONGOLIAN" | "MYANMAR" | "NEPALI" | "NORWEGIAN" | "NYNORSK" | "OCCITAN" | "PANJABI" | "PASHTO" | "PERSIAN" | "POLISH" | "PORTUGUESE" | "PUNJABI" | "PUSHTO" | "ROMANIAN" | "RUSSIAN" | "SANSKRIT" | "SERBIAN" | "SHONA" | "SINDHI" | "SINHALA" | "SINHALESE" | "SLOVAK" | "SLOVENIAN" | "SOMALI" | "SPANISH" | "SUNDANESE" | "SWAHILI" | "SWEDISH" | "TAGALOG" | "TAJIK" | "TAMIL" | "TATAR" | "TELUGU" | "THAI" | "TIBETAN" | "TURKISH" | "TURKMEN" | "UKRAINIAN" | "URDU" | "UZBEK" | "VALENCIAN" | "VIETNAMESE" | "WELSH" | "YIDDISH" | "YORUBA";
1502
+ /**
1503
+ * A transformation to apply to a media item. Each variant specifies the type of transformation
1504
+ and any parameters required for the operation.
1505
+ *
1506
+ * Log Safety: UNSAFE
1507
+ */
1508
+ export type Transformation = ({
1509
+ type: "emailToText";
1510
+ } & EmailToTextTransformation) | ({
1511
+ type: "image";
1512
+ } & ImageTransformation) | ({
1513
+ type: "spreadsheetToText";
1514
+ } & SpreadsheetToTextTransformation) | ({
1515
+ type: "videoToAudio";
1516
+ } & VideoToAudioTransformation) | ({
1517
+ type: "audioToText";
1518
+ } & AudioToTextTransformation) | ({
1519
+ type: "emailToAttachment";
1520
+ } & EmailToAttachmentTransformation) | ({
1521
+ type: "videoToArchive";
1522
+ } & VideoToArchiveTransformation) | ({
1523
+ type: "videoToText";
1524
+ } & VideoToTextTransformation) | ({
1525
+ type: "imageToText";
1526
+ } & ImageToTextTransformation) | ({
1527
+ type: "videoToImage";
1528
+ } & VideoToImageTransformation) | ({
1529
+ type: "video";
1530
+ } & VideoTransformation) | ({
1531
+ type: "imageToDocument";
1532
+ } & ImageToDocumentTransformation) | ({
1533
+ type: "dicomToImage";
1534
+ } & DicomToImageTransformation) | ({
1535
+ type: "documentToDocument";
1536
+ } & DocumentToDocumentTransformation) | ({
1537
+ type: "documentToImage";
1538
+ } & DocumentToImageTransformation) | ({
1539
+ type: "imageToEmbedding";
1540
+ } & ImageToEmbeddingTransformation) | ({
1541
+ type: "audio";
1542
+ } & AudioTransformation) | ({
1543
+ type: "documentToText";
1544
+ } & DocumentToTextTransformation);
1545
+ /**
1546
+ * An identifier for a media item transformation job.
1547
+ *
1548
+ * Log Safety: UNSAFE
1549
+ */
1550
+ export type TransformationJobId = LooselyBrandedString<"TransformationJobId">;
1551
+ /**
1552
+ * The status of a transformation job.
1553
+ *
1554
+ * Log Safety: SAFE
1555
+ */
1556
+ export type TransformationJobStatus = "PENDING" | "FAILED" | "SUCCESSFUL";
1557
+ /**
1558
+ * Request to transform a media item.
1559
+ *
1560
+ * Log Safety: UNSAFE
1561
+ */
1562
+ export interface TransformMediaItemRequest {
1563
+ transformation: Transformation;
1564
+ }
1565
+ /**
1566
+ * Response from initiating a media item transformation.
1567
+ *
1568
+ * Log Safety: UNSAFE
1569
+ */
1570
+ export interface TransformMediaItemResponse {
1571
+ status: TransformationJobStatus;
1572
+ jobId: TransformationJobId;
1573
+ }
1574
+ /**
1575
+ * MPEG Transport Stream audio container format.
1576
+ *
1577
+ * Log Safety: SAFE
1578
+ */
1579
+ export interface TsAudioContainerFormat {
1580
+ }
1581
+ /**
1582
+ * MPEG Transport Stream video container format.
1583
+ *
1584
+ * Log Safety: SAFE
1585
+ */
1586
+ export interface TsVideoContainerFormat {
1587
+ }
406
1588
  /**
407
1589
  * The unit interpretation for a band.
408
1590
  *
@@ -421,12 +1603,36 @@ export interface UnitInterpretation {
421
1603
  export interface UntypedMediaItemMetadata {
422
1604
  sizeBytes: number;
423
1605
  }
1606
+ /**
1607
+ * Chunks video into smaller segments of the specified duration.
1608
+ The final chunk may be smaller than the specified duration.
1609
+ *
1610
+ * Log Safety: UNSAFE
1611
+ */
1612
+ export interface VideoChunkOperation {
1613
+ chunkDurationMilliseconds: number;
1614
+ chunkIndex: number;
1615
+ }
424
1616
  /**
425
1617
  * The format of a video media item.
426
1618
  *
427
1619
  * Log Safety: SAFE
428
1620
  */
429
1621
  export type VideoDecodeFormat = "MP4" | "MKV" | "MOV" | "TS";
1622
+ /**
1623
+ * The output format for encoding video.
1624
+ *
1625
+ * Log Safety: UNSAFE
1626
+ */
1627
+ export type VideoEncodeFormat = ({
1628
+ type: "mp4";
1629
+ } & Mp4VideoContainerFormat) | ({
1630
+ type: "mov";
1631
+ } & MovVideoContainerFormat) | ({
1632
+ type: "mkv";
1633
+ } & MkvVideoContainerFormat) | ({
1634
+ type: "ts";
1635
+ } & TsVideoContainerFormat);
430
1636
  /**
431
1637
  * Metadata for video media items.
432
1638
  *
@@ -437,6 +1643,16 @@ export interface VideoMediaItemMetadata {
437
1643
  specification: VideoSpecification;
438
1644
  sizeBytes: number;
439
1645
  }
1646
+ /**
1647
+ * The operation to perform on the video.
1648
+ *
1649
+ * Log Safety: UNSAFE
1650
+ */
1651
+ export type VideoOperation = ({
1652
+ type: "transcode";
1653
+ } & TranscodeOperation) | ({
1654
+ type: "chunk";
1655
+ } & VideoChunkOperation);
440
1656
  /**
441
1657
  * Technical specifications for video media items.
442
1658
  *
@@ -446,4 +1662,107 @@ export interface VideoSpecification {
446
1662
  bitRate: number;
447
1663
  durationSeconds: number;
448
1664
  }
1665
+ /**
1666
+ * The operation to perform for video to archive conversion.
1667
+ *
1668
+ * Log Safety: UNSAFE
1669
+ */
1670
+ export type VideoToArchiveOperation = {
1671
+ type: "extractSceneFrames";
1672
+ } & ExtractSceneFramesOperation;
1673
+ /**
1674
+ * Extracts video frames to an archive format.
1675
+ *
1676
+ * Log Safety: UNSAFE
1677
+ */
1678
+ export interface VideoToArchiveTransformation {
1679
+ encoding: ArchiveEncodeFormat;
1680
+ operation: VideoToArchiveOperation;
1681
+ }
1682
+ /**
1683
+ * The operation to perform for video to audio conversion.
1684
+ *
1685
+ * Log Safety: UNSAFE
1686
+ */
1687
+ export type VideoToAudioOperation = {
1688
+ type: "extractAudio";
1689
+ } & ExtractAudioOperation;
1690
+ /**
1691
+ * Extracts audio from video.
1692
+ *
1693
+ * Log Safety: UNSAFE
1694
+ */
1695
+ export interface VideoToAudioTransformation {
1696
+ encoding: AudioEncodeFormat;
1697
+ operation: VideoToAudioOperation;
1698
+ }
1699
+ /**
1700
+ * The operation to perform for video to image conversion.
1701
+ *
1702
+ * Log Safety: UNSAFE
1703
+ */
1704
+ export type VideoToImageOperation = ({
1705
+ type: "extractFirstFrame";
1706
+ } & ExtractFirstFrameOperation) | ({
1707
+ type: "extractFramesAtTimestamps";
1708
+ } & ExtractFramesAtTimestampsOperation);
1709
+ /**
1710
+ * Extracts video frames as images.
1711
+ *
1712
+ * Log Safety: UNSAFE
1713
+ */
1714
+ export interface VideoToImageTransformation {
1715
+ encoding: ImageryEncodeFormat;
1716
+ operation: VideoToImageOperation;
1717
+ }
1718
+ /**
1719
+ * The operation to perform for video to text conversion.
1720
+ *
1721
+ * Log Safety: UNSAFE
1722
+ */
1723
+ export type VideoToTextOperation = {
1724
+ type: "getTimestampsForSceneFrames";
1725
+ } & GetTimestampsForSceneFramesOperation;
1726
+ /**
1727
+ * Extracts metadata from video as text/JSON.
1728
+ *
1729
+ * Log Safety: UNSAFE
1730
+ */
1731
+ export interface VideoToTextTransformation {
1732
+ operation: VideoToTextOperation;
1733
+ }
1734
+ /**
1735
+ * Transforms video media items.
1736
+ *
1737
+ * Log Safety: UNSAFE
1738
+ */
1739
+ export interface VideoTransformation {
1740
+ encoding: VideoEncodeFormat;
1741
+ operation: VideoOperation;
1742
+ }
1743
+ /**
1744
+ * Generates waveform visualization data from audio.
1745
+ Returns JSON with normalized doubles (0-1) representing amplitude.
1746
+ *
1747
+ * Log Safety: UNSAFE
1748
+ */
1749
+ export interface WaveformOperation {
1750
+ peaksPerSecond: number;
1751
+ }
1752
+ /**
1753
+ * WAV audio format with optional sample rate and channel layout.
1754
+ *
1755
+ * Log Safety: UNSAFE
1756
+ */
1757
+ export interface WavEncodeFormat {
1758
+ sampleRate?: number;
1759
+ audioChannelLayout?: AudioChannelLayout;
1760
+ }
1761
+ /**
1762
+ * WebP image format.
1763
+ *
1764
+ * Log Safety: SAFE
1765
+ */
1766
+ export interface WebpFormat {
1767
+ }
449
1768
  //# sourceMappingURL=_components.d.ts.map