@imferno/wasm 3.0.2-fix-napi-typescript-types.043fc9b → 3.0.2-fix-working-group-resolutions.9aee1e2

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/types.d.ts DELETED
@@ -1,1333 +0,0 @@
1
- /**
2
- * TypeScript declarations for the values imferno passes across the JS boundary.
3
- *
4
- * Auto-generated by `cargo xtask generate-types-ts` from the Rust types'
5
- * JSON Schema (schemars) — do not edit. @imferno/node and @imferno/wasm each
6
- * ship their own copy: the WASM build serialises some CPL fields in camelCase.
7
- */
8
-
9
- /**
10
- * A SMPTE IMF UUID, serialised as a bare UUID string (e.g. "0eb3d1b9-b77b-4d3f-bbe5-7c69b15dca85")
11
- */
12
- export type ImfUuid = string;
13
- /**
14
- * Category of validation issue
15
- */
16
- export type Category =
17
- | "Structure"
18
- | "Schema"
19
- | "Reference"
20
- | "Asset"
21
- | "Timing"
22
- | "Encoding"
23
- | "Container"
24
- | "Audio"
25
- | "Video"
26
- | "Subtitle"
27
- | "Data"
28
- | "Metadata"
29
- | "Security"
30
- | {
31
- StudioSpecific: string;
32
- };
33
- /**
34
- * Severity level of validation issues
35
- */
36
- export type Severity = "Info" | "Warning" | "Error" | "Critical";
37
- /**
38
- * Which authority produced a validation finding.
39
- *
40
- * Encodes the "prose vs XSD" provenance distinction that SMPTE ST 2067-3 §5.1 calls out ("the prose document takes precedence on conflict"), so callers can filter, group, or apply per-source severity overrides without inspecting the code string.
41
- *
42
- * Currently *inferred* from the code prefix on a `ValidationIssue` (see `ValidationIssue::source`) — no engine code needs to set it explicitly. If inference ever becomes ambiguous (e.g. a non-XSD engine internal rule that wants the `XSD/` prefix for catalogue reasons), we can add a `with_source()` builder without changing the public shape.
43
- */
44
- export type IssueSource = "XsdLayer" | "ProseRule" | "EngineInternal";
45
- /**
46
- * Validation profile determining strictness
47
- */
48
- export type ValidationProfile = "Minimal" | "SMPTE" | "Custom";
49
- export type LanguageString =
50
- | string
51
- | {
52
- $text: string;
53
- "@language"?: string | null;
54
- };
55
- export type ContentKindElement =
56
- | string
57
- | {
58
- $text: string;
59
- "@scope"?: string | null;
60
- };
61
- /**
62
- * Coding equations SMPTE Universal Label, per ST 2067-21:2023 §7.2.3.
63
- *
64
- * Defines the Y'C'BC'R matrix coefficients. Required for CDCI descriptors; R'G'B' descriptors (COLOR.6) do not use CodingEquations. Byte 8 (registry version) is masked per ST 298M (Architecture Decision 1).
65
- */
66
- export type CodingEquations =
67
- | "Bt601"
68
- | "Bt709"
69
- | "Bt2020Ncl"
70
- | {
71
- Unknown: string;
72
- };
73
- /**
74
- * Color primaries SMPTE Universal Label, per ST 2067-21:2023 §7.2.4 and SMPTE Registers.
75
- *
76
- * Discriminating bytes are in positions 13-16 of the UL (last 4 bytes of the 16-byte label), with the common prefix `060e2b34.0401XXXX.04010101.03......`. Byte 8 (the registry version) is masked per ST 298M (Architecture Decision 1).
77
- */
78
- export type ColorPrimaries =
79
- | "Bt601_625"
80
- | "Bt601_525"
81
- | "Bt709"
82
- | "Bt2020"
83
- | "DciP3"
84
- | "P3D65"
85
- | {
86
- Unknown: string;
87
- };
88
- /**
89
- * Video codec identified by SMPTE PictureEssenceCoding Universal Label.
90
- *
91
- * Per ST 2067-21:2023 §7.2.5 and Annex F. The full UL-to-codec mapping lives here. Called once at parse time; no runtime string decoding in downstream crates.
92
- *
93
- * Note: VideoCodec ULs have varying item-specific bytes, so we match on byte patterns rather than exact 16-byte comparisons. Byte 8 is still masked.
94
- */
95
- export type VideoCodec =
96
- | "Jpeg2000"
97
- | "Jpeg2000Imf2k"
98
- | "Jpeg2000Imf4k"
99
- | "Jpeg2000Imf8k"
100
- | "Jpeg2000Broadcast"
101
- | "Jpeg2000Ht"
102
- | "Vc5"
103
- | "Mpeg2"
104
- | "H264"
105
- | "H265"
106
- | "ProRes"
107
- | "Av1"
108
- | {
109
- Unknown: string;
110
- };
111
- /**
112
- * Opto-electronic transfer function SMPTE Universal Label, per ST 2067-21:2023 §7.2.2.
113
- *
114
- * Used in `<TransferCharacteristic>` elements in CPL EssenceDescriptors. Byte 8 (registry version) is masked per ST 298M (Architecture Decision 1).
115
- */
116
- export type TransferCharacteristic =
117
- | "Linear"
118
- | "Bt709"
119
- | "Smpte240M"
120
- | "XvYcc709"
121
- | "Bt2020"
122
- | "PqSt2084"
123
- | "Hlg"
124
- | {
125
- Unknown: string;
126
- };
127
- /**
128
- * An RFC 5646 language tag, e.g. `"en"`, `"fr-CA"`, `"zh-Hant"`.
129
- *
130
- * Validation is minimal (non-empty, trimmed). Full BCP 47 validation is out of scope for the parser layer.
131
- */
132
- export type LanguageTag = string;
133
- /**
134
- * MCA (Multi-Channel Audio) tag symbol per SMPTE ST 377-4.
135
- *
136
- * Used in `<MCATagSymbol>` in `SoundfieldGroupLabelSubDescriptor` and `AudioChannelLabelSubDescriptor`.
137
- */
138
- export type McaTagSymbol =
139
- | (
140
- | "Left"
141
- | "Right"
142
- | "Center"
143
- | "Lfe"
144
- | "LeftSurround"
145
- | "RightSurround"
146
- | "LeftSideSurround"
147
- | "RightSideSurround"
148
- | "LeftRearSurround"
149
- | "RightRearSurround"
150
- )
151
- | "Sg51"
152
- | "Sg71"
153
- | "Sg71Ds"
154
- | "SgSt"
155
- | "SgMono"
156
- | "Iab"
157
- | {
158
- Other: string;
159
- };
160
- export type MarkerLabelElement =
161
- | string
162
- | {
163
- $text: string;
164
- "@scope"?: string | null;
165
- };
166
- /**
167
- * The hash algorithm used for a PKL asset digest.
168
- *
169
- * Per SMPTE ST 2067-2:2020 §9, SHA-1 is the default algorithm. SHA-256 is supported via the `<HashAlgorithm>` element using XML Digital Signature algorithm URIs.
170
- */
171
- export type HashAlgorithm = "Sha1" | "Sha256";
172
- /**
173
- * MIME type as used in `<Type>` elements in PKL assets (SMPTE ST 2067-2 §9).
174
- */
175
- export type MimeType =
176
- | "TextXml"
177
- | "ApplicationXml"
178
- | "ApplicationMxf"
179
- | {
180
- Other: string;
181
- };
182
- /**
183
- * Per-rule severity override.
184
- *
185
- * Mirrors ESLint's `"off"` / `"warn"` / `"error"` vocabulary, extended with the two IMF severity levels.
186
- */
187
- export type RuleSeverity = "off" | "info" | "warn" | "error" | "critical";
188
-
189
- /**
190
- * @deprecated
191
- * Legacy report summary. Deprecated since v2.3.0.
192
- *
193
- * Use [`ValidationResult`] from [`validate()`](crate::package::validate) or [`Imferno::parse_and_validate()`] instead. `ImfReport` is a lossy summary that drops essence descriptors, locales, content versions, and other parsed data from the package.
194
- *
195
- * # Migration
196
- *
197
- * Before: ```ignore let report = build_report(&package, &options, None)?; for cpl in &report.cpls { /* ... * / } ```
198
- *
199
- * After: ```ignore let result = package.validate(&options); for (id, cpl) in &package.composition_playlists { /* ... * / } ```
200
- */
201
- export interface ImfReport {
202
- cpls: CplReport[];
203
- package: PackageSummary;
204
- validation: ValidationReport;
205
- }
206
- export interface CplReport {
207
- /**
208
- * Application profile, e.g. "App2E_2021", "App2E_2014", "App5"
209
- */
210
- applicationProfile?: string | null;
211
- /**
212
- * CPL-level edit rate, e.g. "24000/1001"
213
- */
214
- editRate?: string | null;
215
- id: string;
216
- /**
217
- * True if this CPL references track files not present in the current package (supplemental IMP)
218
- */
219
- isSupplemental: boolean;
220
- markers: CplMarker[];
221
- /**
222
- * Number of segments in this CPL
223
- */
224
- segmentCount: number;
225
- /**
226
- * Virtual tracks (sequences) merged across all segments
227
- */
228
- sequences: CplSequence[];
229
- /**
230
- * Timecode start address, e.g. "01:00:00:00"
231
- */
232
- timecodeStart?: string | null;
233
- title: string;
234
- /**
235
- * Track file UUIDs referenced in this CPL that are not in the current package's AssetMap. These must be resolved from an ancestor package.
236
- */
237
- unresolvedAncestorAssetIds: string[];
238
- }
239
- export interface CplMarker {
240
- annotation?: string | null;
241
- label: string;
242
- offset: number;
243
- }
244
- export interface CplSequence {
245
- /**
246
- * Audio channel count (e.g. 2, 6, 8) — only for audio sequences
247
- */
248
- channelCount?: number | null;
249
- id: string;
250
- /**
251
- * RFC 5646 language tag extracted from the essence descriptor (e.g. "en", "fr")
252
- */
253
- language?: string | null;
254
- resources: CplResource[];
255
- /**
256
- * MCA soundfield label (e.g. "5.1", "7.1", "Atmos") — only for audio sequences
257
- */
258
- soundfield?: string | null;
259
- trackId: string;
260
- /**
261
- * Sequence type: "MainImage", "MainAudio", "Subtitles", etc.
262
- */
263
- type: string;
264
- }
265
- export interface CplResource {
266
- /**
267
- * Edit rate as "N/D" string, e.g. "24000/1001"
268
- */
269
- editRate?: string | null;
270
- entryPoint?: number | null;
271
- id: string;
272
- intrinsicDuration: number;
273
- sourceDuration?: number | null;
274
- sourceEncoding?: string | null;
275
- trackFileId?: string | null;
276
- }
277
- export interface PackageSummary {
278
- assetCount: number;
279
- assetMapId: string;
280
- cplCount: number;
281
- creator?: string | null;
282
- issueDate: string;
283
- issuer?: string | null;
284
- pklCount: number;
285
- scmCount: number;
286
- sidecarCount: number;
287
- unreferencedAssets: UnreferencedAsset[];
288
- volumeIndex: number;
289
- }
290
- export interface UnreferencedAsset {
291
- id: string;
292
- path: string;
293
- }
294
- /**
295
- * Comprehensive validation report
296
- */
297
- export interface ValidationReport {
298
- /**
299
- * Critical issues that prevent usage
300
- */
301
- critical: ValidationIssue[];
302
- /**
303
- * Errors that must be fixed for compliance
304
- */
305
- errors: ValidationIssue[];
306
- /**
307
- * Informational issues
308
- */
309
- info: ValidationIssue[];
310
- /**
311
- * Whether the package is compliant with base SMPTE standards
312
- */
313
- is_compliant: boolean;
314
- /**
315
- * Whether the package is playable despite issues
316
- */
317
- is_playable: boolean;
318
- profile: ValidationProfile;
319
- /**
320
- * Issues that were suppressed by a `RuleSeverity::Off` override. These are not counted toward `is_playable`/`is_compliant` or surfaced by `has_errors`/`summary` — they exist so operators can debug their `RulesConfig` (`--show-suppressed`) without re-running validation. Each carries a `context["suppressed_by"]` annotation naming the rule key that matched.
321
- *
322
- * Skipped during serialisation when empty so reports without suppressed rules keep the previous on-wire shape.
323
- */
324
- suppressed?: ValidationIssue[];
325
- /**
326
- * Timestamp of validation
327
- */
328
- timestamp: string;
329
- /**
330
- * Warnings that should be addressed
331
- */
332
- warnings: ValidationIssue[];
333
- }
334
- /**
335
- * A single validation issue
336
- */
337
- export interface ValidationIssue {
338
- /**
339
- * Other `Location`s when this issue represents an aggregation of multiple identical-code occurrences (see [`ValidationReport::aggregate`]). Empty for fresh, un-aggregated issues. Skipped during serialisation when empty so the on-wire shape stays back-compatible for callers that don't aggregate.
340
- */
341
- additional_instances?: Location[];
342
- category: Category;
343
- /**
344
- * Error code (e.g., "ST2067-2:2020:8.3/FileNotFound")
345
- */
346
- code: string;
347
- /**
348
- * Additional context
349
- */
350
- context: {
351
- [k: string]: string | undefined;
352
- };
353
- location: Location;
354
- /**
355
- * Human-readable message
356
- */
357
- message: string;
358
- severity: Severity;
359
- source?: IssueSource;
360
- /**
361
- * Suggestion for how to fix
362
- */
363
- suggestion?: string | null;
364
- }
365
- /**
366
- * Location where the issue was found
367
- */
368
- export interface Location {
369
- /**
370
- * CPL filename if applicable
371
- */
372
- cpl_filename?: string | null;
373
- /**
374
- * CPL UUID if applicable
375
- */
376
- cpl_id?: ImfUuid | null;
377
- /**
378
- * CPL content title if applicable
379
- */
380
- cpl_title?: string | null;
381
- /**
382
- * File path if applicable
383
- */
384
- file?: string | null;
385
- /**
386
- * Line number in XML file
387
- */
388
- line?: number | null;
389
- /**
390
- * XPath or field path
391
- */
392
- path?: string | null;
393
- /**
394
- * Resource UUID if applicable
395
- */
396
- resource_id?: string | null;
397
- /**
398
- * Segment index (0-based)
399
- */
400
- segment?: number | null;
401
- /**
402
- * Sequence UUID if applicable
403
- */
404
- sequence_id?: string | null;
405
- /**
406
- * Timecode if applicable
407
- */
408
- timecode?: string | null;
409
- }
410
- /**
411
- * High-level IMF package representation.
412
- *
413
- * This is the full parsed package — all CPLs, PKLs, AssetMap, SCMs, and cross-references. Serializable to JSON for WASM/NAPI consumers.
414
- */
415
- export interface Imferno {
416
- assetMap: AssetMap;
417
- /**
418
- * Asset UUID to file path mapping
419
- */
420
- assetPaths: {
421
- [k: string]: string | undefined;
422
- };
423
- /**
424
- * Parsed CPL files mapped by UUID
425
- */
426
- compositionPlaylists: {
427
- [k: string]: CompositionPlaylist | undefined;
428
- };
429
- /**
430
- * Parsed Output Profile Lists mapped by UUID
431
- */
432
- outputProfileLists: {
433
- [k: string]: OutputProfileList | undefined;
434
- };
435
- /**
436
- * Parsed Packing Lists mapped by UUID
437
- */
438
- packingLists: {
439
- [k: string]: PackingList | undefined;
440
- };
441
- /**
442
- * Package root directory
443
- */
444
- rootPath: string;
445
- /**
446
- * Parsed Sidecar Composition Maps mapped by UUID (ST 2067-9:2018)
447
- */
448
- sidecarCompositionMaps: {
449
- [k: string]: SidecarCompositionMap | undefined;
450
- };
451
- volumeIndex: VolumeIndex;
452
- }
453
- /**
454
- * ASSETMAP.xml — maps UUIDs to physical file paths (ST 429-9 §6).
455
- */
456
- export interface AssetMap {
457
- annotationText?: string | null;
458
- assetList: AssetList;
459
- creator?: string | null;
460
- id: ImfUuid;
461
- /**
462
- * ISO 8601 issue date (e.g. `"2016-10-06T08:35:02-00:00"`).
463
- */
464
- issueDate: string;
465
- issuer?: string | null;
466
- volumeCount: number;
467
- }
468
- /**
469
- * The `<AssetList>` element in ASSETMAP.xml.
470
- */
471
- export interface AssetList {
472
- assets: Asset[];
473
- }
474
- /**
475
- * A single asset entry in ASSETMAP.xml.
476
- */
477
- export interface Asset {
478
- chunkList: ChunkList;
479
- id: ImfUuid;
480
- /**
481
- * Present and `true` when this entry refers to the Packing List file.
482
- */
483
- packingList?: boolean | null;
484
- }
485
- /**
486
- * A list of file chunks for a single asset.
487
- */
488
- export interface ChunkList {
489
- chunks: Chunk[];
490
- }
491
- /**
492
- * A single file path entry in a ChunkList.
493
- */
494
- export interface Chunk {
495
- /**
496
- * File path relative to the IMP root directory.
497
- */
498
- path: string;
499
- volumeIndex: number;
500
- }
501
- /**
502
- * Root CPL structure — defines a complete IMF composition.
503
- *
504
- * # Spec-required vs `Option<T>` policy (FIX-7 audit)
505
- *
506
- * The parser is intentionally lenient: every spec-required element that isn't strictly necessary to **construct** a valid `CompositionPlaylist` is exposed as `Option<T>` (or via a `default = "…"` serde attribute). Missing-required-field violations are surfaced as catalogue diagnostics by the validator (`validate_cpl`) rather than as parse errors, so a caller can still inspect the parsed structure of a non-conformant CPL.
507
- *
508
- * Field-by-field map against ST 2067-3 §6 / §7 (2013 / 2016 — the 2020 edition reuses the 2016 schema verbatim):
509
- *
510
- * | Field | Type | Spec status | |---------------------------|------------------|-------------------------------------------| | `id` | `ImfUuid` | required §6.1 — parse error if missing | | `annotation` | `Option<…>` | optional §6.2 | | `issue_date` | `String` | required §6.3 — parse error if missing | | `issuer` | `Option<…>` | optional §6.4 | | `creator` | `Option<…>` | optional §6.5 | | `content_originator` | `Option<…>` | optional §6.6 | | `content_title` | `LanguageString` | required §6.7 — parse error if missing | | `content_kind` | concrete (default) | required §6.8 — `default_content_kind` | | `content_version_list` | `Option<…>` | optional §6.10 | | `essence_descriptor_list` | `Option<…>` | **required** per ST 2067-2 §6.1.5 — | | | | parser-lenient; absence is reported by | | | | `validate_cpl` as Error | | `edit_rate` | `Option<…>` | required §6.13 — parser-lenient; absence | | | | reported by `validate_cpl` | | `total_running_time` | `Option<String>` | optional §6.14 | | `locale_list` | `Option<…>` | optional §6.15 | | `extension_properties` | `Option<…>` | optional §6.16 | | `composition_timecode` | `Option<…>` | optional §6.9 | | `segment_list` | `SegmentList` | required §6.17 — parse error if missing | | `has_signer`/`has_signature` | `bool` | reflect presence in raw XML (§8 signatures unparsed) | | `source_xml` | `Option<String>` | retained when parsed from XML; absent for JSON-deserialised |
511
- *
512
- * Five fields are spec-required but stored as `Option<T>` (with `default` on the serde side) to support the parser-lenient model: `content_kind` (defaults via `default_content_kind`), `content_version_list`, `essence_descriptor_list`, `edit_rate`, `locale_list`. The validator surfaces missing-required findings against the ST 2067-3 prose.
513
- */
514
- export interface CompositionPlaylist {
515
- annotation?: LanguageString | null;
516
- compositionTimecode?: CompositionTimecode | null;
517
- contentKind?: ContentKindElement;
518
- contentOriginator?: LanguageString | null;
519
- contentTitle: LanguageString;
520
- contentVersionList?: ContentVersionList | null;
521
- creator?: LanguageString | null;
522
- editRate?: EditRate | null;
523
- essenceDescriptorList?: EssenceDescriptorList | null;
524
- extensionProperties?: ExtensionProperties | null;
525
- id: ImfUuid;
526
- issueDate: string;
527
- issuer?: LanguageString | null;
528
- localeList?: LocaleList | null;
529
- segmentList: SegmentList;
530
- totalRunningTime?: string | null;
531
- }
532
- export interface CompositionTimecode {
533
- timecodeDropFrame?: boolean | null;
534
- timecodeRate?: number | null;
535
- timecodeStartAddress?: string | null;
536
- }
537
- export interface ContentVersionList {
538
- contentVersions: ContentVersion[];
539
- }
540
- export interface ContentVersion {
541
- id: string;
542
- labelText?: LanguageString | null;
543
- }
544
- /**
545
- * A rational frame/sample rate as specified in SMPTE ST 2067-3 §6.
546
- *
547
- * In XML the value is a space-separated pair: `"60000 1001"`. Common values: `24000/1001` (≈23.976), `24/1`, `25/1`, `30/1`, `30000/1001` (≈29.97), `48000/1`, `96000/1`.
548
- */
549
- export interface EditRate {
550
- denominator: number;
551
- numerator: number;
552
- }
553
- export interface EssenceDescriptorList {
554
- essenceDescriptors: EssenceDescriptor[];
555
- }
556
- export interface EssenceDescriptor {
557
- cdciDescriptor?: CDCIDescriptor | null;
558
- dcTimedTextDescriptor?: DCTimedTextDescriptor | null;
559
- iabEssenceDescriptor?: IABEssenceDescriptor | null;
560
- id: ImfUuid;
561
- isxdDataEssenceDescriptor?: ISXDDataEssenceDescriptor | null;
562
- rgbaDescriptor?: RGBADescriptor | null;
563
- wavePCMDescriptor?: WAVEPCMDescriptor | null;
564
- }
565
- /**
566
- * CDCI video descriptor (YCbCr content)
567
- */
568
- export interface CDCIDescriptor {
569
- ActiveHeight?: number | null;
570
- ActiveWidth?: number | null;
571
- /**
572
- * Table 12: AlphaSampleDepth — shall not be present
573
- */
574
- AlphaSampleDepth?: number | null;
575
- /**
576
- * Table 8: AlphaTransparency — shall not be present
577
- */
578
- AlphaTransparency?: string | null;
579
- /**
580
- * CDCI Descriptor: Black Ref Level (Table 13)
581
- */
582
- BlackRefLevel?: number | null;
583
- CodingEquations?: CodingEquations | null;
584
- ColorPrimaries?: ColorPrimaries | null;
585
- /**
586
- * CDCI Descriptor: Color Range (Table 13)
587
- */
588
- ColorRange?: number | null;
589
- /**
590
- * CDCI Descriptor: Color Siting (Table 12) Shall be 0 (CoSiting) but some encoders write a label string (e.g. "CoSiting").
591
- */
592
- ColorSiting?: number | null;
593
- ComponentDepth?: number | null;
594
- /**
595
- * Generic Picture Essence Descriptor: DisplayF2Offset
596
- */
597
- DisplayF2Offset?: number | null;
598
- DisplayHeight?: number | null;
599
- DisplayWidth?: number | null;
600
- /**
601
- * Table 8: FieldDominance — shall be present if interlaced, shall not be present if progressive
602
- */
603
- FieldDominance?: number | null;
604
- /**
605
- * Generic Picture Essence Descriptor: Frame Layout "FullFrame" (00h, progressive) or "SeparateFields" (01h, interlaced)
606
- */
607
- FrameLayout?: string | null;
608
- /**
609
- * CDCI Descriptor: Horizontal Subsampling (Table 12) 1 = 4:4:4, 2 = 4:2:2
610
- */
611
- HorizontalSubsampling?: number | null;
612
- /**
613
- * Table 8: ImageAlignmentOffset — shall not be present
614
- */
615
- ImageAlignmentOffset?: number | null;
616
- ImageAspectRatio?: string | null;
617
- /**
618
- * Table 8: ImageEndOffset — shall not be present
619
- */
620
- ImageEndOffset?: number | null;
621
- /**
622
- * Table 8: ImageStartOffset — shall not be present
623
- */
624
- ImageStartOffset?: number | null;
625
- InstanceUID?: string | null;
626
- LinkedTrackID?: number | null;
627
- /**
628
- * Table 12: PaddingBits — shall not be present
629
- */
630
- PaddingBits?: number | null;
631
- PictureCompression?: VideoCodec | null;
632
- /**
633
- * Table 12: ReversedByteOrder — shall not be present
634
- */
635
- ReversedByteOrder?: string | null;
636
- SampleRate?: EditRate | null;
637
- /**
638
- * Table 8: SampledHeight — shall not be present or shall be equal to StoredHeight
639
- */
640
- SampledHeight?: number | null;
641
- /**
642
- * Table 8: SampledWidth — shall not be present or shall be equal to StoredWidth
643
- */
644
- SampledWidth?: number | null;
645
- /**
646
- * Table 8: SampledXOffset — shall not be present or shall be 0
647
- */
648
- SampledXOffset?: number | null;
649
- /**
650
- * Table 8: SampledYOffset — shall not be present or shall be 0
651
- */
652
- SampledYOffset?: number | null;
653
- /**
654
- * Table 8: StoredF2Offset — shall not be present
655
- */
656
- StoredF2Offset?: number | null;
657
- StoredHeight?: number | null;
658
- StoredWidth?: number | null;
659
- SubDescriptors?: VideoSubDescriptors | null;
660
- TransferCharacteristic?: TransferCharacteristic | null;
661
- /**
662
- * CDCI Descriptor: Vertical Subsampling (Table 12) Shall be 1
663
- */
664
- VerticalSubsampling?: number | null;
665
- /**
666
- * CDCI Descriptor: White Ref Level (Table 13)
667
- */
668
- WhiteRefLevel?: number | null;
669
- }
670
- /**
671
- * SubDescriptors for video (RGBA/CDCI) descriptors
672
- */
673
- export interface VideoSubDescriptors {
674
- /**
675
- * JPEG 2000 Picture Sub Descriptor — Table 14 constraints
676
- */
677
- JPEG2000SubDescriptor?: JPEG2000SubDescriptor | null;
678
- /**
679
- * Presence indicates Dolby Vision HDR
680
- */
681
- PHDRMetadataTrackSubDescriptor?: PHDRMetadataTrackSubDescriptor | null;
682
- }
683
- /**
684
- * JPEG 2000 Picture Sub Descriptor (ST 422 / ST 2067-21 Table 14)
685
- */
686
- export interface JPEG2000SubDescriptor {
687
- /**
688
- * Table 14: Coding Style — shall be present
689
- */
690
- CodingStyleDefault?: string | null;
691
- /**
692
- * Number of components (Csiz)
693
- */
694
- Csiz?: number | null;
695
- InstanceID?: string | null;
696
- /**
697
- * Table 14: J2CLayout — shall be present (§6.5.2)
698
- */
699
- J2CLayout?: J2CLayout | null;
700
- /**
701
- * Table 14: J2KExtendedCapabilities — shall be present if ISO/IEC 15444-15 coding
702
- */
703
- J2KExtendedCapabilities?: J2KExtendedCapabilities | null;
704
- /**
705
- * Picture component sizing information
706
- */
707
- PictureComponentSizing?: PictureComponentSizing | null;
708
- /**
709
- * Quantization Default
710
- */
711
- QuantizationDefault?: string | null;
712
- /**
713
- * Decoder capabilities (Rsiz)
714
- */
715
- Rsiz?: number | null;
716
- /**
717
- * Image X offset (XOsiz)
718
- */
719
- XOsiz?: number | null;
720
- /**
721
- * Tile X offset (XTOsiz)
722
- */
723
- XTOsiz?: number | null;
724
- /**
725
- * Tile width (XTsiz)
726
- */
727
- XTsiz?: number | null;
728
- /**
729
- * Image width (Xsiz)
730
- */
731
- Xsiz?: number | null;
732
- /**
733
- * Image Y offset (YOsiz)
734
- */
735
- YOsiz?: number | null;
736
- /**
737
- * Tile Y offset (YTOsiz)
738
- */
739
- YTOsiz?: number | null;
740
- /**
741
- * Tile height (YTsiz)
742
- */
743
- YTsiz?: number | null;
744
- /**
745
- * Image height (Ysiz)
746
- */
747
- Ysiz?: number | null;
748
- }
749
- /**
750
- * J2CLayout — pixel component layout for JPEG 2000 (§6.5.2)
751
- */
752
- export interface J2CLayout {
753
- RGBAComponent?: RGBALayoutComponent[];
754
- }
755
- /**
756
- * RGBA component entry within J2CLayout or PixelLayout
757
- */
758
- export interface RGBALayoutComponent {
759
- /**
760
- * Absent in intentionally malformed corpus files (e.g. RGBAError1). Default to empty string so the parser succeeds; the validator flags missing codes.
761
- */
762
- Code?: string;
763
- ComponentSize?: number;
764
- }
765
- /**
766
- * J2K Extended Capabilities (ISO/IEC 15444-15)
767
- */
768
- export interface J2KExtendedCapabilities {
769
- /**
770
- * Profile capabilities (Pcap)
771
- */
772
- Pcap?: number | null;
773
- }
774
- /**
775
- * Picture component sizing information
776
- */
777
- export interface PictureComponentSizing {
778
- J2KComponentSizing?: J2KComponentSizing[];
779
- }
780
- /**
781
- * Individual J2K component sizing
782
- */
783
- export interface J2KComponentSizing {
784
- /**
785
- * Component bit depth minus 1
786
- */
787
- Ssiz?: number | null;
788
- /**
789
- * Horizontal separation of sample
790
- */
791
- XRSiz?: number | null;
792
- /**
793
- * Vertical separation of sample
794
- */
795
- YRSiz?: number | null;
796
- }
797
- /**
798
- * PHDR (Dolby Vision) metadata track sub-descriptor
799
- */
800
- export interface PHDRMetadataTrackSubDescriptor {
801
- InstanceID?: string | null;
802
- PHDRMetadataTrackSubDescriptor_DataDefinition?: string | null;
803
- PHDRMetadataTrackSubDescriptor_SimplePayloadSID?: number | null;
804
- PHDRMetadataTrackSubDescriptor_SourceTrackID?: number | null;
805
- }
806
- /**
807
- * DC Timed Text descriptor (subtitles/captions)
808
- */
809
- export interface DCTimedTextDescriptor {
810
- InstanceID?: string | null;
811
- LinkedTrackID?: number | null;
812
- NamespaceURI?: string | null;
813
- /**
814
- * Comma-separated RFC 5646 language tags for this timed text track
815
- */
816
- RFC5646LanguageTagList?: LanguageTag[];
817
- SampleRate?: EditRate | null;
818
- }
819
- /**
820
- * IAB (Immersive Audio Bitstream) essence descriptor — Dolby Atmos
821
- */
822
- export interface IABEssenceDescriptor {
823
- AudioSampleRate?: EditRate | null;
824
- ChannelCount?: number | null;
825
- /**
826
- * ST 2067-201 §5.9: Codec item shall NOT be present.
827
- */
828
- Codec?: string | null;
829
- /**
830
- * ST 2067-201 §5.3: ContainerFormat shall be the IAB essence container UL.
831
- */
832
- ContainerFormat?: string | null;
833
- /**
834
- * ST 2067-201 §5.9: ElectrospatialFormulation shall NOT be present.
835
- */
836
- ElectrospatialFormulation?: number | null;
837
- InstanceID?: string | null;
838
- LinkedTrackID?: number | null;
839
- /**
840
- * ST 2067-201 §5.9: QuantizationBits shall be 24.
841
- */
842
- QuantizationBits?: number | null;
843
- SampleRate?: EditRate | null;
844
- SoundCompression?: string | null;
845
- SubDescriptors?: IABSubDescriptors | null;
846
- }
847
- /**
848
- * SubDescriptors for IAB essence
849
- */
850
- export interface IABSubDescriptors {
851
- /**
852
- * ST 2067-201:2026 Annex E — IAB Channel SubDescriptor entries. Optional in 2021 (and earlier — silently dropped), recommended in 2026 ("should contain one instance for each channel of each BedDefinition"). Captured as a raw count via a bag struct so downstream code can probe presence without the parser needing to model every field defined in Annex E Table E.1.
853
- */
854
- IABChannelSubDescriptor?: IABChannelSubDescriptor[];
855
- IABSoundfieldLabelSubDescriptor?: IABSoundfieldLabelSubDescriptor | null;
856
- }
857
- /**
858
- * Presence-only stub for ST 2067-201:2026 Annex E `IABChannelSubDescriptor`.
859
- *
860
- * The 2026 spec defines the full item set in Table E.1 (`IABBedMetaID`, `IABChannelID`, `IABAudioDescription`, `IABAudioDescriptionText`); imferno's CPL parser only needs to count occurrences to fire the `IabChannelSubDescriptorRecommended` warning, so the inner shape is intentionally permissive — any nested content deserialises into the catch-all map without affecting presence.
861
- */
862
- export interface IABChannelSubDescriptor {
863
- /**
864
- * Annex E §E.2 — IAB Bed MetaID of the associated BedDefinition.
865
- */
866
- IABBedMetaID?: number | null;
867
- /**
868
- * Annex E §E.2 — Channel ID within the bed.
869
- */
870
- IABChannelID?: number | null;
871
- }
872
- /**
873
- * IAB soundfield label sub-descriptor — contains language for Atmos tracks
874
- */
875
- export interface IABSoundfieldLabelSubDescriptor {
876
- InstanceID?: string | null;
877
- /**
878
- * ST 2067-201 §5.9: MCALabelDictionaryID shall be `urn:smpte:ul:060e2b34.0401010d.03020221.00000000`.
879
- */
880
- MCALabelDictionaryID?: string | null;
881
- MCATagName?: string | null;
882
- MCATagSymbol?: McaTagSymbol | null;
883
- RFC5646SpokenLanguage?: LanguageTag | null;
884
- }
885
- /**
886
- * ISXD (Immersive Sound XML Data) essence descriptor — Dolby Atmos sidecar format
887
- */
888
- export interface ISXDDataEssenceDescriptor {
889
- DataEssenceCoding?: string | null;
890
- InstanceID?: string | null;
891
- LinkedTrackID?: number | null;
892
- NamespaceURI?: string | null;
893
- SampleRate?: EditRate | null;
894
- SubDescriptors?: IsxdSubDescriptors | null;
895
- }
896
- /**
897
- * SubDescriptors for ISXD essence descriptor
898
- */
899
- export interface IsxdSubDescriptors {
900
- /**
901
- * ST 2067-202: ContainerConstraintsSubDescriptor shall be present.
902
- */
903
- ContainerConstraintsSubDescriptor?: ContainerConstraintsSubDescriptor | null;
904
- }
905
- /**
906
- * ContainerConstraintsSubDescriptor — presence required by ST 2067-202 §5
907
- */
908
- export interface ContainerConstraintsSubDescriptor {
909
- InstanceID?: string | null;
910
- }
911
- /**
912
- * RGBA video descriptor (JPEG 2000 RGB content)
913
- */
914
- export interface RGBADescriptor {
915
- /**
916
- * Table 10: AlphaMaxRef — shall not be present
917
- */
918
- AlphaMaxRef?: number | null;
919
- /**
920
- * Table 10: AlphaMinRef — shall not be present
921
- */
922
- AlphaMinRef?: number | null;
923
- /**
924
- * Table 8: AlphaTransparency — shall not be present
925
- */
926
- AlphaTransparency?: string | null;
927
- CodingEquations?: CodingEquations | null;
928
- ColorPrimaries?: ColorPrimaries | null;
929
- /**
930
- * RGBA Descriptor: Component Max Ref (Table 10/11)
931
- */
932
- ComponentMaxRef?: number | null;
933
- /**
934
- * RGBA Descriptor: Component Min Ref (Table 10/11)
935
- */
936
- ComponentMinRef?: number | null;
937
- /**
938
- * Generic Picture Essence Descriptor: DisplayF2Offset
939
- */
940
- DisplayF2Offset?: number | null;
941
- DisplayHeight?: number | null;
942
- DisplayWidth?: number | null;
943
- /**
944
- * Table 8: FieldDominance — shall be present if interlaced, shall not be present if progressive
945
- */
946
- FieldDominance?: number | null;
947
- /**
948
- * Generic Picture Essence Descriptor: Frame Layout "FullFrame" (00h, progressive) or "SeparateFields" (01h, interlaced)
949
- */
950
- FrameLayout?: string | null;
951
- /**
952
- * Table 8: ImageAlignmentOffset — shall not be present
953
- */
954
- ImageAlignmentOffset?: number | null;
955
- ImageAspectRatio?: string | null;
956
- /**
957
- * Table 8: ImageEndOffset — shall not be present
958
- */
959
- ImageEndOffset?: number | null;
960
- /**
961
- * Table 8: ImageStartOffset — shall not be present
962
- */
963
- ImageStartOffset?: number | null;
964
- InstanceID?: string | null;
965
- LinkedTrackID?: number | null;
966
- /**
967
- * Table 10: Palette — shall not be present
968
- */
969
- Palette?: string | null;
970
- /**
971
- * Table 10: PaletteLayout — shall not be present
972
- */
973
- PaletteLayout?: string | null;
974
- PictureCompression?: VideoCodec | null;
975
- SampleRate?: EditRate | null;
976
- /**
977
- * Table 8: SampledHeight — shall not be present or shall be equal to StoredHeight
978
- */
979
- SampledHeight?: number | null;
980
- /**
981
- * Table 8: SampledWidth — shall not be present or shall be equal to StoredWidth
982
- */
983
- SampledWidth?: number | null;
984
- /**
985
- * Table 8: SampledXOffset — shall not be present or shall be 0
986
- */
987
- SampledXOffset?: number | null;
988
- /**
989
- * Table 8: SampledYOffset — shall not be present or shall be 0
990
- */
991
- SampledYOffset?: number | null;
992
- /**
993
- * RGBA Descriptor: Scanning Direction (Table 10) Shall be "ScanningDirection_LeftToRightTopToBottom" (00h)
994
- */
995
- ScanningDirection?: string | null;
996
- /**
997
- * Table 8: StoredF2Offset — shall not be present
998
- */
999
- StoredF2Offset?: number | null;
1000
- StoredHeight?: number | null;
1001
- StoredWidth?: number | null;
1002
- SubDescriptors?: VideoSubDescriptors | null;
1003
- TransferCharacteristic?: TransferCharacteristic | null;
1004
- }
1005
- /**
1006
- * WAVE PCM audio descriptor
1007
- */
1008
- export interface WAVEPCMDescriptor {
1009
- AudioSampleRate?: EditRate | null;
1010
- ChannelCount?: number | null;
1011
- InstanceID?: string | null;
1012
- LinkedTrackID?: number | null;
1013
- QuantizationBits?: number | null;
1014
- SampleRate?: EditRate | null;
1015
- SubDescriptors?: AudioSubDescriptors | null;
1016
- }
1017
- /**
1018
- * SubDescriptors for audio (WAVEPCMDescriptor)
1019
- */
1020
- export interface AudioSubDescriptors {
1021
- SoundfieldGroupLabelSubDescriptor?: SoundfieldGroupLabelSubDescriptor | null;
1022
- }
1023
- /**
1024
- * Soundfield group label sub-descriptor — contains language and audio content kind
1025
- */
1026
- export interface SoundfieldGroupLabelSubDescriptor {
1027
- MCAAudioContentKind?: string | null;
1028
- MCATagName?: string | null;
1029
- MCATagSymbol?: McaTagSymbol | null;
1030
- /**
1031
- * RFC 5646 language tag — field name varies between vendors
1032
- */
1033
- RFC5646SpokenLanguage?: LanguageTag | null;
1034
- }
1035
- export interface ExtensionProperties {
1036
- applicationIdentification?: string | null;
1037
- maxCLL?: number | null;
1038
- maxFALL?: number | null;
1039
- }
1040
- /**
1041
- * LocaleList - Content locale information
1042
- */
1043
- export interface LocaleList {
1044
- locales?: Locale[];
1045
- }
1046
- export interface Locale {
1047
- contentMaturityRatingList?: ContentMaturityRatingList | null;
1048
- languageList?: LanguageList | null;
1049
- regionList?: RegionList | null;
1050
- }
1051
- export interface ContentMaturityRatingList {
1052
- contentMaturityRatings: ContentMaturityRating[];
1053
- }
1054
- /**
1055
- * A single content maturity rating entry per ST 2067-3 / ST 2067-21 §5.1.3.
1056
- */
1057
- export interface ContentMaturityRating {
1058
- agency: string;
1059
- audience?: AudienceElement | null;
1060
- rating?: string | null;
1061
- }
1062
- /**
1063
- * The `<Audience>` element carries an optional `scope` attribute.
1064
- */
1065
- export interface AudienceElement {
1066
- $text?: string | null;
1067
- "@scope"?: string | null;
1068
- }
1069
- export interface LanguageList {
1070
- languages: LanguageTag[];
1071
- }
1072
- export interface RegionList {
1073
- regions: string[];
1074
- }
1075
- export interface SegmentList {
1076
- segments?: Segment[];
1077
- }
1078
- export interface Segment {
1079
- id: ImfUuid;
1080
- sequenceList: SequenceList;
1081
- }
1082
- export interface SequenceList {
1083
- forcedNarrativeSequences?: ForcedNarrativeSequence[];
1084
- hearingImpairedCaptionsSequences?: HearingImpairedCaptionsSequence[];
1085
- iabSequences?: IABSequence[];
1086
- isxdSequences?: ISXDSequence[];
1087
- mainAudioSequences?: MainAudioSequence[];
1088
- mainImageSequences?: MainImageSequence[];
1089
- markerSequences?: MarkerSequence[];
1090
- subtitlesSequences?: SubtitlesSequence[];
1091
- }
1092
- export interface ForcedNarrativeSequence {
1093
- id: ImfUuid;
1094
- resourceList: ResourceList;
1095
- trackId: ImfUuid;
1096
- }
1097
- export interface ResourceList {
1098
- resources?: Resource[];
1099
- }
1100
- export interface Resource {
1101
- annotation?: LanguageString | null;
1102
- editRate?: EditRate | null;
1103
- entryPoint?: number | null;
1104
- hash?: string | null;
1105
- id: ImfUuid;
1106
- intrinsicDuration: number;
1107
- keyId?: ImfUuid | null;
1108
- markers?: MarkerInfo[];
1109
- repeatCount?: number | null;
1110
- sourceDuration?: number | null;
1111
- sourceEncoding?: ImfUuid | null;
1112
- trackFileId?: ImfUuid | null;
1113
- }
1114
- export interface MarkerInfo {
1115
- annotation?: string | null;
1116
- label: MarkerLabelElement;
1117
- offset: number;
1118
- }
1119
- export interface HearingImpairedCaptionsSequence {
1120
- id: ImfUuid;
1121
- resourceList: ResourceList;
1122
- trackId: ImfUuid;
1123
- }
1124
- export interface IABSequence {
1125
- id: ImfUuid;
1126
- resourceList: ResourceList;
1127
- trackId: ImfUuid;
1128
- }
1129
- export interface ISXDSequence {
1130
- id: ImfUuid;
1131
- resourceList: ResourceList;
1132
- trackId: ImfUuid;
1133
- }
1134
- export interface MainAudioSequence {
1135
- id: ImfUuid;
1136
- resourceList: ResourceList;
1137
- trackId: ImfUuid;
1138
- }
1139
- export interface MainImageSequence {
1140
- id: ImfUuid;
1141
- resourceList: ResourceList;
1142
- trackId: ImfUuid;
1143
- }
1144
- export interface MarkerSequence {
1145
- id: ImfUuid;
1146
- resourceList: ResourceList;
1147
- trackId: ImfUuid;
1148
- }
1149
- export interface SubtitlesSequence {
1150
- id: ImfUuid;
1151
- resourceList: ResourceList;
1152
- trackId: ImfUuid;
1153
- }
1154
- /**
1155
- * OPL XML — Output Profile List (SMPTE ST 2067-100).
1156
- *
1157
- * Defines output processing instructions for a composition: image scaling, cropping, pixel encoding, and audio routing/mixing macros.
1158
- *
1159
- * `macros` carries every `<Macro xsi:type="...">` entry from the `<MacroList>`. The list is structurally extracted via a small `quick_xml` walker rather than serde because the XSD uses `xsi:type` polymorphism with vendor-specific extension namespaces (`opl:PresetMacroType`, `arm:AudioRoutingMixingMacroType`, etc.). Type-specific payload fields land in [`OplMacro::extra_fields`] as `(local_name, text)` pairs so the parser doesn't have to know every macro subtype to round-trip the list.
1160
- */
1161
- export interface OutputProfileList {
1162
- annotation?: string | null;
1163
- compositionPlaylistId: ImfUuid;
1164
- creator?: string | null;
1165
- id: ImfUuid;
1166
- /**
1167
- * ISO 8601 issue date.
1168
- */
1169
- issueDate: string;
1170
- issuer?: string | null;
1171
- /**
1172
- * Each `<Macro xsi:type="...">` entry from the `<MacroList>`. Empty when the OPL has no macros (or has `<MacroList/>`).
1173
- */
1174
- macros?: OplMacro[];
1175
- }
1176
- /**
1177
- * A single macro entry from an OPL `<MacroList>`.
1178
- *
1179
- * Captures the polymorphic `xsi:type` attribute plus the common `Name` / `Annotation` fields from the abstract `MacroType`. All other children of the macro are stored as `(local_name, text)` pairs in [`Self::extra_fields`] so that vendor-specific extensions remain accessible without the parser knowing each subtype.
1180
- */
1181
- export interface OplMacro {
1182
- /**
1183
- * `MacroType.Annotation` (optional, §6.5.2).
1184
- */
1185
- annotation?: string | null;
1186
- /**
1187
- * Every other direct-child element of the `<Macro>` element, as `(local_name, text_body)`. Element nesting deeper than one level is flattened into the outermost name with the joined text body — callers that need structured access to nested macro extensions should re-parse the OPL with a richer model.
1188
- */
1189
- extraFields: [string, string][];
1190
- /**
1191
- * `MacroType.Name` per ST 2067-100 §6.5.1; required by the XSD.
1192
- */
1193
- name: string;
1194
- /**
1195
- * Value of the `xsi:type` attribute, e.g. `"opl:PresetMacroType"`. `None` when the writer omitted the attribute (non-conformant, but we don't reject — the validator can flag it).
1196
- */
1197
- xsiType?: string | null;
1198
- }
1199
- /**
1200
- * PKL XML — Packing List (SMPTE ST 2067-2 §9).
1201
- *
1202
- * Assets carry SHA-1 (default) or SHA-256 checksums. The algorithm is determined by the optional `<HashAlgorithm>` element on each asset.
1203
- */
1204
- export interface PackingList {
1205
- annotationText?: string | null;
1206
- assetList: PklAssetList;
1207
- creator?: string | null;
1208
- /**
1209
- * Optional group identifier for partial deliveries (SMPTE ST 2067-2 §9).
1210
- */
1211
- groupId?: ImfUuid | null;
1212
- id: ImfUuid;
1213
- /**
1214
- * ISO 8601 issue date.
1215
- */
1216
- issueDate: string;
1217
- issuer?: string | null;
1218
- }
1219
- /**
1220
- * The `<AssetList>` element in a PKL.
1221
- */
1222
- export interface PklAssetList {
1223
- assets: PklAsset[];
1224
- }
1225
- /**
1226
- * A single asset entry in a PKL.
1227
- */
1228
- export interface PklAsset {
1229
- annotationText?: string | null;
1230
- hash: AssetHash;
1231
- id: ImfUuid;
1232
- mimeType: MimeType;
1233
- originalFileName?: string | null;
1234
- /**
1235
- * File size in bytes.
1236
- */
1237
- size: number;
1238
- }
1239
- /**
1240
- * A decoded asset hash from a Packing List, per SMPTE ST 2067-2 §9.
1241
- *
1242
- * PKL files carry base64-encoded SHA-1 or SHA-256 digests for each tracked asset.
1243
- */
1244
- export interface AssetHash {
1245
- algorithm: HashAlgorithm;
1246
- bytes: number[];
1247
- }
1248
- /**
1249
- * A parsed Sidecar Composition Map document (ST 2067-9:2018).
1250
- *
1251
- * Field naming flattens the XSD's `<Properties>` wrapper into the top-level struct; on the wire the document still carries `<Properties>{Annotation,IssueDate,Issuer}</Properties>` per ST 2067-9:2018 §7.2 Table 2.
1252
- */
1253
- export interface SidecarCompositionMap {
1254
- annotation?: string | null;
1255
- /**
1256
- * True if a `<Signature>` element was present (§7.2.5).
1257
- */
1258
- hasSignature: boolean;
1259
- /**
1260
- * True if a `<Signer>` element was present (§7.2.4).
1261
- */
1262
- hasSigner: boolean;
1263
- id: ImfUuid;
1264
- issueDate: string;
1265
- issuer?: string | null;
1266
- /**
1267
- * Sidecar asset associations.
1268
- */
1269
- sidecarAssets: SidecarAsset[];
1270
- }
1271
- /**
1272
- * A single sidecar asset association within an SCM document.
1273
- */
1274
- export interface SidecarAsset {
1275
- /**
1276
- * CPLs this sidecar asset is associated with (§7.3.1.1: one or more).
1277
- */
1278
- cplIds: ImfUuid[];
1279
- id: ImfUuid;
1280
- }
1281
- /**
1282
- * VOLINDEX document (SMPTE ST 2067-9 §5 / ST 429-9:2014).
1283
- *
1284
- * In practice this is always `<Index>1</Index>` for single-volume IMF packages. The spec allows multi-volume packages but they are rarely used.
1285
- */
1286
- export interface VolumeIndex {
1287
- /**
1288
- * The volume count. Almost always `1`.
1289
- */
1290
- index: number;
1291
- }
1292
- /**
1293
- * ESLint-style per-rule severity overrides.
1294
- *
1295
- * Keys are either: - A rule suffix — `"SegmentDuration"` — matched against the part of the issue code after the last `/`. - A full normalised code — `"ST2067-3:2020:7.2.2/SegmentDuration"`.
1296
- *
1297
- * Values are the desired [`RuleSeverity`], or [`RuleSeverity::Off`] to suppress the rule entirely.
1298
- *
1299
- * An empty map (the default) is a no-op.
1300
- */
1301
- export interface RulesConfig {
1302
- [k: string]: RuleSeverity | undefined;
1303
- }
1304
- /**
1305
- * Result of parsing and validating an IMF package.
1306
- *
1307
- * This is the primary return type — contains the full parsed package and all validation findings.
1308
- */
1309
- export interface ValidationResult {
1310
- package: Imferno;
1311
- validation: ValidationReport;
1312
- }
1313
-
1314
- /** Core constraints (ST 2067-2) edition to validate against. `"auto"` detects it from the CPL. */
1315
- export type CoreSpec = "auto" | "v2013" | "v2016" | "v2020";
1316
-
1317
- /**
1318
- * App #2E (ST 2067-21) edition to validate against. `"auto"` uses the CPL's
1319
- * ApplicationIdentification; `"none"` skips application-profile validation.
1320
- */
1321
- export type App2eSpec = "auto" | "none" | "v2014" | "v2016" | "v2020" | "v2023" | "v2026";
1322
-
1323
- /** Options accepted by every validating entry point. */
1324
- export interface ValidateOptions {
1325
- /** Core constraints edition. Default: `"auto"`. */
1326
- coreSpec?: CoreSpec;
1327
- /** App #2E edition. Default: `"auto"`. */
1328
- app2eSpec?: App2eSpec;
1329
- /** ESLint-style per-rule severity overrides, keyed by code, rule suffix, glob or `source:<kind>`. */
1330
- rules?: RulesConfig;
1331
- /** Collapse repeated identical findings into one issue with `additional_instances`. Default: `false`. */
1332
- aggregateRepeats?: boolean;
1333
- }