@imferno/wasm 3.0.2-beta.1b73397 → 3.0.2-beta.2427eb9
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/README.md +16 -10
- package/codes.d.ts +10 -0
- package/codes.js +10 -0
- package/imferno_wasm.d.ts +2 -479
- package/imferno_wasm.js +2 -7
- package/imferno_wasm_bg.wasm +0 -0
- package/index.d.ts +41 -48
- package/index.js +11 -4
- package/package.json +4 -1
- package/types.d.ts +1337 -0
package/types.d.ts
ADDED
|
@@ -0,0 +1,1337 @@
|
|
|
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()` 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
|
+
export interface ImfReport {
|
|
196
|
+
cpls: CplReport[];
|
|
197
|
+
package: PackageSummary;
|
|
198
|
+
validation: ValidationReport;
|
|
199
|
+
}
|
|
200
|
+
export interface CplReport {
|
|
201
|
+
/**
|
|
202
|
+
* Application profile, e.g. "App2E_2021", "App2E_2014", "App5"
|
|
203
|
+
*/
|
|
204
|
+
applicationProfile?: string | null;
|
|
205
|
+
/**
|
|
206
|
+
* CPL-level edit rate, e.g. "24000/1001"
|
|
207
|
+
*/
|
|
208
|
+
editRate?: string | null;
|
|
209
|
+
id: string;
|
|
210
|
+
/**
|
|
211
|
+
* True if this CPL references track files not present in the current package (supplemental IMP)
|
|
212
|
+
*/
|
|
213
|
+
isSupplemental: boolean;
|
|
214
|
+
markers: CplMarker[];
|
|
215
|
+
/**
|
|
216
|
+
* Number of segments in this CPL
|
|
217
|
+
*/
|
|
218
|
+
segmentCount: number;
|
|
219
|
+
/**
|
|
220
|
+
* Virtual tracks (sequences) merged across all segments
|
|
221
|
+
*/
|
|
222
|
+
sequences: CplSequence[];
|
|
223
|
+
/**
|
|
224
|
+
* Timecode start address, e.g. "01:00:00:00"
|
|
225
|
+
*/
|
|
226
|
+
timecodeStart?: string | null;
|
|
227
|
+
title: string;
|
|
228
|
+
/**
|
|
229
|
+
* Track file UUIDs referenced in this CPL that are not in the current package's AssetMap. These must be resolved from an ancestor package.
|
|
230
|
+
*/
|
|
231
|
+
unresolvedAncestorAssetIds: string[];
|
|
232
|
+
}
|
|
233
|
+
export interface CplMarker {
|
|
234
|
+
annotation?: string | null;
|
|
235
|
+
label: string;
|
|
236
|
+
offset: number;
|
|
237
|
+
}
|
|
238
|
+
export interface CplSequence {
|
|
239
|
+
/**
|
|
240
|
+
* Audio channel count (e.g. 2, 6, 8) — only for audio sequences
|
|
241
|
+
*/
|
|
242
|
+
channelCount?: number | null;
|
|
243
|
+
id: string;
|
|
244
|
+
/**
|
|
245
|
+
* RFC 5646 language tag extracted from the essence descriptor (e.g. "en", "fr")
|
|
246
|
+
*/
|
|
247
|
+
language?: string | null;
|
|
248
|
+
resources: CplResource[];
|
|
249
|
+
/**
|
|
250
|
+
* MCA soundfield label (e.g. "5.1", "7.1", "Atmos") — only for audio sequences
|
|
251
|
+
*/
|
|
252
|
+
soundfield?: string | null;
|
|
253
|
+
trackId: string;
|
|
254
|
+
/**
|
|
255
|
+
* Sequence type: "MainImage", "MainAudio", "Subtitles", etc.
|
|
256
|
+
*/
|
|
257
|
+
type: string;
|
|
258
|
+
}
|
|
259
|
+
export interface CplResource {
|
|
260
|
+
/**
|
|
261
|
+
* Edit rate as "N/D" string, e.g. "24000/1001"
|
|
262
|
+
*/
|
|
263
|
+
editRate?: string | null;
|
|
264
|
+
entryPoint?: number | null;
|
|
265
|
+
id: string;
|
|
266
|
+
intrinsicDuration: number;
|
|
267
|
+
sourceDuration?: number | null;
|
|
268
|
+
sourceEncoding?: string | null;
|
|
269
|
+
trackFileId?: string | null;
|
|
270
|
+
}
|
|
271
|
+
export interface PackageSummary {
|
|
272
|
+
assetCount: number;
|
|
273
|
+
assetMapId: string;
|
|
274
|
+
cplCount: number;
|
|
275
|
+
creator?: string | null;
|
|
276
|
+
issueDate: string;
|
|
277
|
+
issuer?: string | null;
|
|
278
|
+
pklCount: number;
|
|
279
|
+
scmCount: number;
|
|
280
|
+
sidecarCount: number;
|
|
281
|
+
unreferencedAssets: UnreferencedAsset[];
|
|
282
|
+
volumeIndex: number;
|
|
283
|
+
}
|
|
284
|
+
export interface UnreferencedAsset {
|
|
285
|
+
id: string;
|
|
286
|
+
path: string;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Comprehensive validation report
|
|
290
|
+
*/
|
|
291
|
+
export interface ValidationReport {
|
|
292
|
+
/**
|
|
293
|
+
* Critical issues that prevent usage
|
|
294
|
+
*/
|
|
295
|
+
critical: ValidationIssue[];
|
|
296
|
+
/**
|
|
297
|
+
* Errors that must be fixed for compliance
|
|
298
|
+
*/
|
|
299
|
+
errors: ValidationIssue[];
|
|
300
|
+
/**
|
|
301
|
+
* Informational issues
|
|
302
|
+
*/
|
|
303
|
+
info: ValidationIssue[];
|
|
304
|
+
/**
|
|
305
|
+
* Whether the package is compliant with base SMPTE standards
|
|
306
|
+
*/
|
|
307
|
+
is_compliant: boolean;
|
|
308
|
+
/**
|
|
309
|
+
* Whether the package is playable despite issues
|
|
310
|
+
*/
|
|
311
|
+
is_playable: boolean;
|
|
312
|
+
profile: ValidationProfile;
|
|
313
|
+
/**
|
|
314
|
+
* 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.
|
|
315
|
+
*
|
|
316
|
+
* Skipped during serialisation when empty so reports without suppressed rules keep the previous on-wire shape.
|
|
317
|
+
*/
|
|
318
|
+
suppressed?: ValidationIssue[];
|
|
319
|
+
/**
|
|
320
|
+
* Timestamp of validation
|
|
321
|
+
*/
|
|
322
|
+
timestamp: string;
|
|
323
|
+
/**
|
|
324
|
+
* Warnings that should be addressed
|
|
325
|
+
*/
|
|
326
|
+
warnings: ValidationIssue[];
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* A single validation issue
|
|
330
|
+
*/
|
|
331
|
+
export interface ValidationIssue {
|
|
332
|
+
/**
|
|
333
|
+
* 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.
|
|
334
|
+
*/
|
|
335
|
+
additional_instances?: Location[];
|
|
336
|
+
category: Category;
|
|
337
|
+
/**
|
|
338
|
+
* Error code (e.g., "ST2067-2:2020:8.3/FileNotFound")
|
|
339
|
+
*/
|
|
340
|
+
code: string;
|
|
341
|
+
/**
|
|
342
|
+
* Additional context
|
|
343
|
+
*/
|
|
344
|
+
context: {
|
|
345
|
+
[k: string]: string | undefined;
|
|
346
|
+
};
|
|
347
|
+
location: Location;
|
|
348
|
+
/**
|
|
349
|
+
* Human-readable message
|
|
350
|
+
*/
|
|
351
|
+
message: string;
|
|
352
|
+
severity: Severity;
|
|
353
|
+
source?: IssueSource;
|
|
354
|
+
/**
|
|
355
|
+
* Suggestion for how to fix
|
|
356
|
+
*/
|
|
357
|
+
suggestion?: string | null;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Location where the issue was found
|
|
361
|
+
*/
|
|
362
|
+
export interface Location {
|
|
363
|
+
/**
|
|
364
|
+
* CPL filename if applicable
|
|
365
|
+
*/
|
|
366
|
+
cpl_filename?: string | null;
|
|
367
|
+
/**
|
|
368
|
+
* CPL UUID if applicable
|
|
369
|
+
*/
|
|
370
|
+
cpl_id?: ImfUuid | null;
|
|
371
|
+
/**
|
|
372
|
+
* CPL content title if applicable
|
|
373
|
+
*/
|
|
374
|
+
cpl_title?: string | null;
|
|
375
|
+
/**
|
|
376
|
+
* File path if applicable
|
|
377
|
+
*/
|
|
378
|
+
file?: string | null;
|
|
379
|
+
/**
|
|
380
|
+
* Line number in XML file
|
|
381
|
+
*/
|
|
382
|
+
line?: number | null;
|
|
383
|
+
/**
|
|
384
|
+
* XPath or field path
|
|
385
|
+
*/
|
|
386
|
+
path?: string | null;
|
|
387
|
+
/**
|
|
388
|
+
* Resource UUID if applicable
|
|
389
|
+
*/
|
|
390
|
+
resource_id?: string | null;
|
|
391
|
+
/**
|
|
392
|
+
* Segment index (0-based)
|
|
393
|
+
*/
|
|
394
|
+
segment?: number | null;
|
|
395
|
+
/**
|
|
396
|
+
* Sequence UUID if applicable
|
|
397
|
+
*/
|
|
398
|
+
sequence_id?: string | null;
|
|
399
|
+
/**
|
|
400
|
+
* Timecode if applicable
|
|
401
|
+
*/
|
|
402
|
+
timecode?: string | null;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* High-level IMF package representation.
|
|
406
|
+
*
|
|
407
|
+
* This is the full parsed package — all CPLs, PKLs, AssetMap, SCMs, and cross-references. Serializable to JSON for WASM/NAPI consumers.
|
|
408
|
+
*/
|
|
409
|
+
export interface Imferno {
|
|
410
|
+
assetMap: AssetMap;
|
|
411
|
+
/**
|
|
412
|
+
* Asset UUID to file path mapping
|
|
413
|
+
*/
|
|
414
|
+
assetPaths: {
|
|
415
|
+
[k: string]: string | undefined;
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* Parsed CPL files mapped by UUID
|
|
419
|
+
*/
|
|
420
|
+
compositionPlaylists: {
|
|
421
|
+
[k: string]: CompositionPlaylist | undefined;
|
|
422
|
+
};
|
|
423
|
+
/**
|
|
424
|
+
* Parsed Output Profile Lists mapped by UUID
|
|
425
|
+
*/
|
|
426
|
+
outputProfileLists: {
|
|
427
|
+
[k: string]: OutputProfileList | undefined;
|
|
428
|
+
};
|
|
429
|
+
/**
|
|
430
|
+
* Parsed Packing Lists mapped by UUID
|
|
431
|
+
*/
|
|
432
|
+
packingLists: {
|
|
433
|
+
[k: string]: PackingList | undefined;
|
|
434
|
+
};
|
|
435
|
+
/**
|
|
436
|
+
* Package root directory
|
|
437
|
+
*/
|
|
438
|
+
rootPath: string;
|
|
439
|
+
/**
|
|
440
|
+
* Parsed Sidecar Composition Maps mapped by UUID (ST 2067-9:2018)
|
|
441
|
+
*/
|
|
442
|
+
sidecarCompositionMaps: {
|
|
443
|
+
[k: string]: SidecarCompositionMap | undefined;
|
|
444
|
+
};
|
|
445
|
+
volumeIndex: VolumeIndex;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* ASSETMAP.xml — maps UUIDs to physical file paths (ST 429-9 §6).
|
|
449
|
+
*/
|
|
450
|
+
export interface AssetMap {
|
|
451
|
+
annotationText?: string | null;
|
|
452
|
+
assetList: AssetList;
|
|
453
|
+
creator?: string | null;
|
|
454
|
+
id: ImfUuid;
|
|
455
|
+
/**
|
|
456
|
+
* ISO 8601 issue date (e.g. `"2016-10-06T08:35:02-00:00"`).
|
|
457
|
+
*/
|
|
458
|
+
issueDate: string;
|
|
459
|
+
issuer?: string | null;
|
|
460
|
+
volumeCount: number;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* The `<AssetList>` element in ASSETMAP.xml.
|
|
464
|
+
*/
|
|
465
|
+
export interface AssetList {
|
|
466
|
+
assets: Asset[];
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* A single asset entry in ASSETMAP.xml.
|
|
470
|
+
*/
|
|
471
|
+
export interface Asset {
|
|
472
|
+
chunkList: ChunkList;
|
|
473
|
+
id: ImfUuid;
|
|
474
|
+
/**
|
|
475
|
+
* Present and `true` when this entry refers to the Packing List file.
|
|
476
|
+
*/
|
|
477
|
+
packingList?: boolean | null;
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* A list of file chunks for a single asset.
|
|
481
|
+
*/
|
|
482
|
+
export interface ChunkList {
|
|
483
|
+
chunks: Chunk[];
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* A single file path entry in a ChunkList.
|
|
487
|
+
*/
|
|
488
|
+
export interface Chunk {
|
|
489
|
+
/**
|
|
490
|
+
* File path relative to the IMP root directory.
|
|
491
|
+
*/
|
|
492
|
+
path: string;
|
|
493
|
+
volumeIndex: number;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Root CPL structure — defines a complete IMF composition.
|
|
497
|
+
*
|
|
498
|
+
* # Spec-required vs `Option<T>` policy (FIX-7 audit)
|
|
499
|
+
*
|
|
500
|
+
* 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.
|
|
501
|
+
*
|
|
502
|
+
* Field-by-field map against ST 2067-3 §6 / §7 (2013 / 2016 — the 2020 edition reuses the 2016 schema verbatim):
|
|
503
|
+
*
|
|
504
|
+
* | 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 |
|
|
505
|
+
*
|
|
506
|
+
* 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.
|
|
507
|
+
*/
|
|
508
|
+
export interface CompositionPlaylist {
|
|
509
|
+
annotation?: LanguageString | null;
|
|
510
|
+
compositionTimecode?: CompositionTimecode | null;
|
|
511
|
+
contentKind?: ContentKindElement;
|
|
512
|
+
contentOriginator?: LanguageString | null;
|
|
513
|
+
contentTitle: LanguageString;
|
|
514
|
+
contentVersionList?: ContentVersionList | null;
|
|
515
|
+
creator?: LanguageString | null;
|
|
516
|
+
editRate?: EditRate | null;
|
|
517
|
+
essenceDescriptorList?: EssenceDescriptorList | null;
|
|
518
|
+
extensionProperties?: ExtensionProperties | null;
|
|
519
|
+
id: ImfUuid;
|
|
520
|
+
issueDate: string;
|
|
521
|
+
issuer?: LanguageString | null;
|
|
522
|
+
localeList?: LocaleList | null;
|
|
523
|
+
segmentList: SegmentList;
|
|
524
|
+
totalRunningTime?: string | null;
|
|
525
|
+
}
|
|
526
|
+
export interface CompositionTimecode {
|
|
527
|
+
timecodeDropFrame?: boolean | null;
|
|
528
|
+
timecodeRate?: number | null;
|
|
529
|
+
timecodeStartAddress?: string | null;
|
|
530
|
+
}
|
|
531
|
+
export interface ContentVersionList {
|
|
532
|
+
contentVersions: ContentVersion[];
|
|
533
|
+
}
|
|
534
|
+
export interface ContentVersion {
|
|
535
|
+
id: string;
|
|
536
|
+
labelText?: LanguageString | null;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* A rational frame/sample rate as specified in SMPTE ST 2067-3 §6.
|
|
540
|
+
*
|
|
541
|
+
* 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`.
|
|
542
|
+
*/
|
|
543
|
+
export interface EditRate {
|
|
544
|
+
denominator: number;
|
|
545
|
+
numerator: number;
|
|
546
|
+
}
|
|
547
|
+
export interface EssenceDescriptorList {
|
|
548
|
+
essenceDescriptors: EssenceDescriptor[];
|
|
549
|
+
}
|
|
550
|
+
export interface EssenceDescriptor {
|
|
551
|
+
cdciDescriptor?: CDCIDescriptor | null;
|
|
552
|
+
dcTimedTextDescriptor?: DCTimedTextDescriptor | null;
|
|
553
|
+
iabEssenceDescriptor?: IABEssenceDescriptor | null;
|
|
554
|
+
id: ImfUuid;
|
|
555
|
+
isxdDataEssenceDescriptor?: ISXDDataEssenceDescriptor | null;
|
|
556
|
+
rgbaDescriptor?: RGBADescriptor | null;
|
|
557
|
+
wavePCMDescriptor?: WAVEPCMDescriptor | null;
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* CDCI video descriptor (YCbCr content)
|
|
561
|
+
*/
|
|
562
|
+
export interface CDCIDescriptor {
|
|
563
|
+
ActiveHeight?: number | null;
|
|
564
|
+
ActiveWidth?: number | null;
|
|
565
|
+
/**
|
|
566
|
+
* Table 12: AlphaSampleDepth — shall not be present
|
|
567
|
+
*/
|
|
568
|
+
AlphaSampleDepth?: number | null;
|
|
569
|
+
/**
|
|
570
|
+
* Table 8: AlphaTransparency — shall not be present
|
|
571
|
+
*/
|
|
572
|
+
AlphaTransparency?: string | null;
|
|
573
|
+
/**
|
|
574
|
+
* CDCI Descriptor: Black Ref Level (Table 13)
|
|
575
|
+
*/
|
|
576
|
+
BlackRefLevel?: number | null;
|
|
577
|
+
CodingEquations?: CodingEquations | null;
|
|
578
|
+
ColorPrimaries?: ColorPrimaries | null;
|
|
579
|
+
/**
|
|
580
|
+
* CDCI Descriptor: Color Range (Table 13)
|
|
581
|
+
*/
|
|
582
|
+
ColorRange?: number | null;
|
|
583
|
+
/**
|
|
584
|
+
* CDCI Descriptor: Color Siting (Table 12) Shall be 0 (CoSiting) but some encoders write a label string (e.g. "CoSiting").
|
|
585
|
+
*/
|
|
586
|
+
ColorSiting?: number | null;
|
|
587
|
+
ComponentDepth?: number | null;
|
|
588
|
+
/**
|
|
589
|
+
* Generic Picture Essence Descriptor: DisplayF2Offset
|
|
590
|
+
*/
|
|
591
|
+
DisplayF2Offset?: number | null;
|
|
592
|
+
DisplayHeight?: number | null;
|
|
593
|
+
DisplayWidth?: number | null;
|
|
594
|
+
/**
|
|
595
|
+
* Table 8: FieldDominance — shall be present if interlaced, shall not be present if progressive
|
|
596
|
+
*/
|
|
597
|
+
FieldDominance?: number | null;
|
|
598
|
+
/**
|
|
599
|
+
* Generic Picture Essence Descriptor: Frame Layout "FullFrame" (00h, progressive) or "SeparateFields" (01h, interlaced)
|
|
600
|
+
*/
|
|
601
|
+
FrameLayout?: string | null;
|
|
602
|
+
/**
|
|
603
|
+
* CDCI Descriptor: Horizontal Subsampling (Table 12) 1 = 4:4:4, 2 = 4:2:2
|
|
604
|
+
*/
|
|
605
|
+
HorizontalSubsampling?: number | null;
|
|
606
|
+
/**
|
|
607
|
+
* Table 8: ImageAlignmentOffset — shall not be present
|
|
608
|
+
*/
|
|
609
|
+
ImageAlignmentOffset?: number | null;
|
|
610
|
+
ImageAspectRatio?: string | null;
|
|
611
|
+
/**
|
|
612
|
+
* Table 8: ImageEndOffset — shall not be present
|
|
613
|
+
*/
|
|
614
|
+
ImageEndOffset?: number | null;
|
|
615
|
+
/**
|
|
616
|
+
* Table 8: ImageStartOffset — shall not be present
|
|
617
|
+
*/
|
|
618
|
+
ImageStartOffset?: number | null;
|
|
619
|
+
InstanceUID?: string | null;
|
|
620
|
+
LinkedTrackID?: number | null;
|
|
621
|
+
/**
|
|
622
|
+
* Table 12: PaddingBits — shall not be present
|
|
623
|
+
*/
|
|
624
|
+
PaddingBits?: number | null;
|
|
625
|
+
PictureCompression?: VideoCodec | null;
|
|
626
|
+
/**
|
|
627
|
+
* Table 12: ReversedByteOrder — shall not be present
|
|
628
|
+
*/
|
|
629
|
+
ReversedByteOrder?: string | null;
|
|
630
|
+
SampleRate?: EditRate | null;
|
|
631
|
+
/**
|
|
632
|
+
* Table 8: SampledHeight — shall not be present or shall be equal to StoredHeight
|
|
633
|
+
*/
|
|
634
|
+
SampledHeight?: number | null;
|
|
635
|
+
/**
|
|
636
|
+
* Table 8: SampledWidth — shall not be present or shall be equal to StoredWidth
|
|
637
|
+
*/
|
|
638
|
+
SampledWidth?: number | null;
|
|
639
|
+
/**
|
|
640
|
+
* Table 8: SampledXOffset — shall not be present or shall be 0
|
|
641
|
+
*/
|
|
642
|
+
SampledXOffset?: number | null;
|
|
643
|
+
/**
|
|
644
|
+
* Table 8: SampledYOffset — shall not be present or shall be 0
|
|
645
|
+
*/
|
|
646
|
+
SampledYOffset?: number | null;
|
|
647
|
+
/**
|
|
648
|
+
* Table 8: StoredF2Offset — shall not be present
|
|
649
|
+
*/
|
|
650
|
+
StoredF2Offset?: number | null;
|
|
651
|
+
StoredHeight?: number | null;
|
|
652
|
+
StoredWidth?: number | null;
|
|
653
|
+
SubDescriptors?: VideoSubDescriptors | null;
|
|
654
|
+
TransferCharacteristic?: TransferCharacteristic | null;
|
|
655
|
+
/**
|
|
656
|
+
* CDCI Descriptor: Vertical Subsampling (Table 12) Shall be 1
|
|
657
|
+
*/
|
|
658
|
+
VerticalSubsampling?: number | null;
|
|
659
|
+
/**
|
|
660
|
+
* CDCI Descriptor: White Ref Level (Table 13)
|
|
661
|
+
*/
|
|
662
|
+
WhiteRefLevel?: number | null;
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* SubDescriptors for video (RGBA/CDCI) descriptors
|
|
666
|
+
*/
|
|
667
|
+
export interface VideoSubDescriptors {
|
|
668
|
+
/**
|
|
669
|
+
* JPEG 2000 Picture Sub Descriptor — Table 14 constraints
|
|
670
|
+
*/
|
|
671
|
+
JPEG2000SubDescriptor?: JPEG2000SubDescriptor | null;
|
|
672
|
+
/**
|
|
673
|
+
* Presence indicates Dolby Vision HDR
|
|
674
|
+
*/
|
|
675
|
+
PHDRMetadataTrackSubDescriptor?: PHDRMetadataTrackSubDescriptor | null;
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* JPEG 2000 Picture Sub Descriptor (ST 422 / ST 2067-21 Table 14)
|
|
679
|
+
*/
|
|
680
|
+
export interface JPEG2000SubDescriptor {
|
|
681
|
+
/**
|
|
682
|
+
* Table 14: Coding Style — shall be present
|
|
683
|
+
*/
|
|
684
|
+
CodingStyleDefault?: string | null;
|
|
685
|
+
/**
|
|
686
|
+
* Number of components (Csiz)
|
|
687
|
+
*/
|
|
688
|
+
Csiz?: number | null;
|
|
689
|
+
InstanceID?: string | null;
|
|
690
|
+
/**
|
|
691
|
+
* Table 14: J2CLayout — shall be present (§6.5.2)
|
|
692
|
+
*/
|
|
693
|
+
J2CLayout?: J2CLayout | null;
|
|
694
|
+
/**
|
|
695
|
+
* Table 14: J2KExtendedCapabilities — shall be present if ISO/IEC 15444-15 coding
|
|
696
|
+
*/
|
|
697
|
+
J2KExtendedCapabilities?: J2KExtendedCapabilities | null;
|
|
698
|
+
/**
|
|
699
|
+
* Picture component sizing information
|
|
700
|
+
*/
|
|
701
|
+
PictureComponentSizing?: PictureComponentSizing | null;
|
|
702
|
+
/**
|
|
703
|
+
* Quantization Default
|
|
704
|
+
*/
|
|
705
|
+
QuantizationDefault?: string | null;
|
|
706
|
+
/**
|
|
707
|
+
* Decoder capabilities (Rsiz)
|
|
708
|
+
*/
|
|
709
|
+
Rsiz?: number | null;
|
|
710
|
+
/**
|
|
711
|
+
* Image X offset (XOsiz)
|
|
712
|
+
*/
|
|
713
|
+
XOsiz?: number | null;
|
|
714
|
+
/**
|
|
715
|
+
* Tile X offset (XTOsiz)
|
|
716
|
+
*/
|
|
717
|
+
XTOsiz?: number | null;
|
|
718
|
+
/**
|
|
719
|
+
* Tile width (XTsiz)
|
|
720
|
+
*/
|
|
721
|
+
XTsiz?: number | null;
|
|
722
|
+
/**
|
|
723
|
+
* Image width (Xsiz)
|
|
724
|
+
*/
|
|
725
|
+
Xsiz?: number | null;
|
|
726
|
+
/**
|
|
727
|
+
* Image Y offset (YOsiz)
|
|
728
|
+
*/
|
|
729
|
+
YOsiz?: number | null;
|
|
730
|
+
/**
|
|
731
|
+
* Tile Y offset (YTOsiz)
|
|
732
|
+
*/
|
|
733
|
+
YTOsiz?: number | null;
|
|
734
|
+
/**
|
|
735
|
+
* Tile height (YTsiz)
|
|
736
|
+
*/
|
|
737
|
+
YTsiz?: number | null;
|
|
738
|
+
/**
|
|
739
|
+
* Image height (Ysiz)
|
|
740
|
+
*/
|
|
741
|
+
Ysiz?: number | null;
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* J2CLayout — pixel component layout for JPEG 2000 (§6.5.2)
|
|
745
|
+
*/
|
|
746
|
+
export interface J2CLayout {
|
|
747
|
+
RGBAComponent?: RGBALayoutComponent[];
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* RGBA component entry within J2CLayout or PixelLayout
|
|
751
|
+
*/
|
|
752
|
+
export interface RGBALayoutComponent {
|
|
753
|
+
/**
|
|
754
|
+
* Absent in intentionally malformed corpus files (e.g. RGBAError1). Default to empty string so the parser succeeds; the validator flags missing codes.
|
|
755
|
+
*/
|
|
756
|
+
Code?: string;
|
|
757
|
+
ComponentSize?: number;
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* J2K Extended Capabilities (ISO/IEC 15444-15)
|
|
761
|
+
*/
|
|
762
|
+
export interface J2KExtendedCapabilities {
|
|
763
|
+
/**
|
|
764
|
+
* Codestream capabilities (Ccap^i), one UInt16 per Pcap bit set, in increasing order of i (ISO/IEC 15444-1 CAP marker).
|
|
765
|
+
*/
|
|
766
|
+
Ccapi?: J2KCcapi | null;
|
|
767
|
+
/**
|
|
768
|
+
* Profile capabilities (Pcap)
|
|
769
|
+
*/
|
|
770
|
+
Pcap?: number | null;
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* `Ccapi` array of `J2KExtendedCapabilities`.
|
|
774
|
+
*/
|
|
775
|
+
export interface J2KCcapi {
|
|
776
|
+
UInt16?: number[];
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* Picture component sizing information
|
|
780
|
+
*/
|
|
781
|
+
export interface PictureComponentSizing {
|
|
782
|
+
J2KComponentSizing?: J2KComponentSizing[];
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* Individual J2K component sizing
|
|
786
|
+
*/
|
|
787
|
+
export interface J2KComponentSizing {
|
|
788
|
+
/**
|
|
789
|
+
* Component bit depth minus 1
|
|
790
|
+
*/
|
|
791
|
+
Ssiz?: number | null;
|
|
792
|
+
/**
|
|
793
|
+
* Horizontal separation of sample
|
|
794
|
+
*/
|
|
795
|
+
XRSiz?: number | null;
|
|
796
|
+
/**
|
|
797
|
+
* Vertical separation of sample
|
|
798
|
+
*/
|
|
799
|
+
YRSiz?: number | null;
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* PHDR (Dolby Vision) metadata track sub-descriptor
|
|
803
|
+
*/
|
|
804
|
+
export interface PHDRMetadataTrackSubDescriptor {
|
|
805
|
+
InstanceID?: string | null;
|
|
806
|
+
PHDRMetadataTrackSubDescriptor_DataDefinition?: string | null;
|
|
807
|
+
PHDRMetadataTrackSubDescriptor_SimplePayloadSID?: number | null;
|
|
808
|
+
PHDRMetadataTrackSubDescriptor_SourceTrackID?: number | null;
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* DC Timed Text descriptor (subtitles/captions)
|
|
812
|
+
*/
|
|
813
|
+
export interface DCTimedTextDescriptor {
|
|
814
|
+
InstanceID?: string | null;
|
|
815
|
+
LinkedTrackID?: number | null;
|
|
816
|
+
NamespaceURI?: string | null;
|
|
817
|
+
/**
|
|
818
|
+
* Comma-separated RFC 5646 language tags for this timed text track
|
|
819
|
+
*/
|
|
820
|
+
RFC5646LanguageTagList?: LanguageTag[];
|
|
821
|
+
SampleRate?: EditRate | null;
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* IAB (Immersive Audio Bitstream) essence descriptor — Dolby Atmos
|
|
825
|
+
*/
|
|
826
|
+
export interface IABEssenceDescriptor {
|
|
827
|
+
AudioSampleRate?: EditRate | null;
|
|
828
|
+
ChannelCount?: number | null;
|
|
829
|
+
/**
|
|
830
|
+
* ST 2067-201 §5.9: Codec item shall NOT be present.
|
|
831
|
+
*/
|
|
832
|
+
Codec?: string | null;
|
|
833
|
+
/**
|
|
834
|
+
* ST 2067-201 §5.3: ContainerFormat shall be the IAB essence container UL.
|
|
835
|
+
*/
|
|
836
|
+
ContainerFormat?: string | null;
|
|
837
|
+
/**
|
|
838
|
+
* ST 2067-201 §5.9: ElectrospatialFormulation shall NOT be present.
|
|
839
|
+
*/
|
|
840
|
+
ElectrospatialFormulation?: number | null;
|
|
841
|
+
InstanceID?: string | null;
|
|
842
|
+
LinkedTrackID?: number | null;
|
|
843
|
+
/**
|
|
844
|
+
* ST 2067-201 §5.9: QuantizationBits shall be 24.
|
|
845
|
+
*/
|
|
846
|
+
QuantizationBits?: number | null;
|
|
847
|
+
SampleRate?: EditRate | null;
|
|
848
|
+
SoundCompression?: string | null;
|
|
849
|
+
SubDescriptors?: IABSubDescriptors | null;
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* SubDescriptors for IAB essence
|
|
853
|
+
*/
|
|
854
|
+
export interface IABSubDescriptors {
|
|
855
|
+
/**
|
|
856
|
+
* 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.
|
|
857
|
+
*/
|
|
858
|
+
IABChannelSubDescriptor?: IABChannelSubDescriptor[];
|
|
859
|
+
IABSoundfieldLabelSubDescriptor?: IABSoundfieldLabelSubDescriptor | null;
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* Presence-only stub for ST 2067-201:2026 Annex E `IABChannelSubDescriptor`.
|
|
863
|
+
*
|
|
864
|
+
* 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.
|
|
865
|
+
*/
|
|
866
|
+
export interface IABChannelSubDescriptor {
|
|
867
|
+
/**
|
|
868
|
+
* Annex E §E.2 — IAB Bed MetaID of the associated BedDefinition.
|
|
869
|
+
*/
|
|
870
|
+
IABBedMetaID?: number | null;
|
|
871
|
+
/**
|
|
872
|
+
* Annex E §E.2 — Channel ID within the bed.
|
|
873
|
+
*/
|
|
874
|
+
IABChannelID?: number | null;
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* IAB soundfield label sub-descriptor — contains language for Atmos tracks
|
|
878
|
+
*/
|
|
879
|
+
export interface IABSoundfieldLabelSubDescriptor {
|
|
880
|
+
InstanceID?: string | null;
|
|
881
|
+
/**
|
|
882
|
+
* ST 2067-201 §5.9: MCALabelDictionaryID shall be `urn:smpte:ul:060e2b34.0401010d.03020221.00000000`.
|
|
883
|
+
*/
|
|
884
|
+
MCALabelDictionaryID?: string | null;
|
|
885
|
+
MCATagName?: string | null;
|
|
886
|
+
MCATagSymbol?: McaTagSymbol | null;
|
|
887
|
+
RFC5646SpokenLanguage?: LanguageTag | null;
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
890
|
+
* ISXD (Immersive Sound XML Data) essence descriptor — Dolby Atmos sidecar format
|
|
891
|
+
*/
|
|
892
|
+
export interface ISXDDataEssenceDescriptor {
|
|
893
|
+
DataEssenceCoding?: string | null;
|
|
894
|
+
InstanceID?: string | null;
|
|
895
|
+
LinkedTrackID?: number | null;
|
|
896
|
+
NamespaceURI?: string | null;
|
|
897
|
+
SampleRate?: EditRate | null;
|
|
898
|
+
SubDescriptors?: IsxdSubDescriptors | null;
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* SubDescriptors for ISXD essence descriptor
|
|
902
|
+
*/
|
|
903
|
+
export interface IsxdSubDescriptors {
|
|
904
|
+
/**
|
|
905
|
+
* ST 2067-202: ContainerConstraintsSubDescriptor shall be present.
|
|
906
|
+
*/
|
|
907
|
+
ContainerConstraintsSubDescriptor?: ContainerConstraintsSubDescriptor | null;
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* ContainerConstraintsSubDescriptor — presence required by ST 2067-202 §5
|
|
911
|
+
*/
|
|
912
|
+
export interface ContainerConstraintsSubDescriptor {
|
|
913
|
+
InstanceID?: string | null;
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* RGBA video descriptor (JPEG 2000 RGB content)
|
|
917
|
+
*/
|
|
918
|
+
export interface RGBADescriptor {
|
|
919
|
+
/**
|
|
920
|
+
* Table 10: AlphaMaxRef — shall not be present
|
|
921
|
+
*/
|
|
922
|
+
AlphaMaxRef?: number | null;
|
|
923
|
+
/**
|
|
924
|
+
* Table 10: AlphaMinRef — shall not be present
|
|
925
|
+
*/
|
|
926
|
+
AlphaMinRef?: number | null;
|
|
927
|
+
/**
|
|
928
|
+
* Table 8: AlphaTransparency — shall not be present
|
|
929
|
+
*/
|
|
930
|
+
AlphaTransparency?: string | null;
|
|
931
|
+
CodingEquations?: CodingEquations | null;
|
|
932
|
+
ColorPrimaries?: ColorPrimaries | null;
|
|
933
|
+
/**
|
|
934
|
+
* RGBA Descriptor: Component Max Ref (Table 10/11)
|
|
935
|
+
*/
|
|
936
|
+
ComponentMaxRef?: number | null;
|
|
937
|
+
/**
|
|
938
|
+
* RGBA Descriptor: Component Min Ref (Table 10/11)
|
|
939
|
+
*/
|
|
940
|
+
ComponentMinRef?: number | null;
|
|
941
|
+
/**
|
|
942
|
+
* Generic Picture Essence Descriptor: DisplayF2Offset
|
|
943
|
+
*/
|
|
944
|
+
DisplayF2Offset?: number | null;
|
|
945
|
+
DisplayHeight?: number | null;
|
|
946
|
+
DisplayWidth?: number | null;
|
|
947
|
+
/**
|
|
948
|
+
* Table 8: FieldDominance — shall be present if interlaced, shall not be present if progressive
|
|
949
|
+
*/
|
|
950
|
+
FieldDominance?: number | null;
|
|
951
|
+
/**
|
|
952
|
+
* Generic Picture Essence Descriptor: Frame Layout "FullFrame" (00h, progressive) or "SeparateFields" (01h, interlaced)
|
|
953
|
+
*/
|
|
954
|
+
FrameLayout?: string | null;
|
|
955
|
+
/**
|
|
956
|
+
* Table 8: ImageAlignmentOffset — shall not be present
|
|
957
|
+
*/
|
|
958
|
+
ImageAlignmentOffset?: number | null;
|
|
959
|
+
ImageAspectRatio?: string | null;
|
|
960
|
+
/**
|
|
961
|
+
* Table 8: ImageEndOffset — shall not be present
|
|
962
|
+
*/
|
|
963
|
+
ImageEndOffset?: number | null;
|
|
964
|
+
/**
|
|
965
|
+
* Table 8: ImageStartOffset — shall not be present
|
|
966
|
+
*/
|
|
967
|
+
ImageStartOffset?: number | null;
|
|
968
|
+
InstanceID?: string | null;
|
|
969
|
+
LinkedTrackID?: number | null;
|
|
970
|
+
/**
|
|
971
|
+
* Table 10: Palette — shall not be present
|
|
972
|
+
*/
|
|
973
|
+
Palette?: string | null;
|
|
974
|
+
/**
|
|
975
|
+
* Table 10: PaletteLayout — shall not be present
|
|
976
|
+
*/
|
|
977
|
+
PaletteLayout?: string | null;
|
|
978
|
+
PictureCompression?: VideoCodec | null;
|
|
979
|
+
SampleRate?: EditRate | null;
|
|
980
|
+
/**
|
|
981
|
+
* Table 8: SampledHeight — shall not be present or shall be equal to StoredHeight
|
|
982
|
+
*/
|
|
983
|
+
SampledHeight?: number | null;
|
|
984
|
+
/**
|
|
985
|
+
* Table 8: SampledWidth — shall not be present or shall be equal to StoredWidth
|
|
986
|
+
*/
|
|
987
|
+
SampledWidth?: number | null;
|
|
988
|
+
/**
|
|
989
|
+
* Table 8: SampledXOffset — shall not be present or shall be 0
|
|
990
|
+
*/
|
|
991
|
+
SampledXOffset?: number | null;
|
|
992
|
+
/**
|
|
993
|
+
* Table 8: SampledYOffset — shall not be present or shall be 0
|
|
994
|
+
*/
|
|
995
|
+
SampledYOffset?: number | null;
|
|
996
|
+
/**
|
|
997
|
+
* RGBA Descriptor: Scanning Direction (Table 10) Shall be "ScanningDirection_LeftToRightTopToBottom" (00h)
|
|
998
|
+
*/
|
|
999
|
+
ScanningDirection?: string | null;
|
|
1000
|
+
/**
|
|
1001
|
+
* Table 8: StoredF2Offset — shall not be present
|
|
1002
|
+
*/
|
|
1003
|
+
StoredF2Offset?: number | null;
|
|
1004
|
+
StoredHeight?: number | null;
|
|
1005
|
+
StoredWidth?: number | null;
|
|
1006
|
+
SubDescriptors?: VideoSubDescriptors | null;
|
|
1007
|
+
TransferCharacteristic?: TransferCharacteristic | null;
|
|
1008
|
+
}
|
|
1009
|
+
/**
|
|
1010
|
+
* WAVE PCM audio descriptor
|
|
1011
|
+
*/
|
|
1012
|
+
export interface WAVEPCMDescriptor {
|
|
1013
|
+
AudioSampleRate?: EditRate | null;
|
|
1014
|
+
ChannelCount?: number | null;
|
|
1015
|
+
InstanceID?: string | null;
|
|
1016
|
+
LinkedTrackID?: number | null;
|
|
1017
|
+
QuantizationBits?: number | null;
|
|
1018
|
+
SampleRate?: EditRate | null;
|
|
1019
|
+
SubDescriptors?: AudioSubDescriptors | null;
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* SubDescriptors for audio (WAVEPCMDescriptor)
|
|
1023
|
+
*/
|
|
1024
|
+
export interface AudioSubDescriptors {
|
|
1025
|
+
SoundfieldGroupLabelSubDescriptor?: SoundfieldGroupLabelSubDescriptor | null;
|
|
1026
|
+
}
|
|
1027
|
+
/**
|
|
1028
|
+
* Soundfield group label sub-descriptor — contains language and audio content kind
|
|
1029
|
+
*/
|
|
1030
|
+
export interface SoundfieldGroupLabelSubDescriptor {
|
|
1031
|
+
MCAAudioContentKind?: string | null;
|
|
1032
|
+
MCATagName?: string | null;
|
|
1033
|
+
MCATagSymbol?: McaTagSymbol | null;
|
|
1034
|
+
/**
|
|
1035
|
+
* RFC 5646 language tag — field name varies between vendors
|
|
1036
|
+
*/
|
|
1037
|
+
RFC5646SpokenLanguage?: LanguageTag | null;
|
|
1038
|
+
}
|
|
1039
|
+
export interface ExtensionProperties {
|
|
1040
|
+
applicationIdentification?: string | null;
|
|
1041
|
+
maxCLL?: number | null;
|
|
1042
|
+
maxFALL?: number | null;
|
|
1043
|
+
}
|
|
1044
|
+
/**
|
|
1045
|
+
* LocaleList - Content locale information
|
|
1046
|
+
*/
|
|
1047
|
+
export interface LocaleList {
|
|
1048
|
+
locales?: Locale[];
|
|
1049
|
+
}
|
|
1050
|
+
export interface Locale {
|
|
1051
|
+
contentMaturityRatingList?: ContentMaturityRatingList | null;
|
|
1052
|
+
languageList?: LanguageList | null;
|
|
1053
|
+
regionList?: RegionList | null;
|
|
1054
|
+
}
|
|
1055
|
+
export interface ContentMaturityRatingList {
|
|
1056
|
+
contentMaturityRatings: ContentMaturityRating[];
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* A single content maturity rating entry per ST 2067-3 / ST 2067-21 §5.1.3.
|
|
1060
|
+
*/
|
|
1061
|
+
export interface ContentMaturityRating {
|
|
1062
|
+
agency: string;
|
|
1063
|
+
audience?: AudienceElement | null;
|
|
1064
|
+
rating?: string | null;
|
|
1065
|
+
}
|
|
1066
|
+
/**
|
|
1067
|
+
* The `<Audience>` element carries an optional `scope` attribute.
|
|
1068
|
+
*/
|
|
1069
|
+
export interface AudienceElement {
|
|
1070
|
+
$text?: string | null;
|
|
1071
|
+
"@scope"?: string | null;
|
|
1072
|
+
}
|
|
1073
|
+
export interface LanguageList {
|
|
1074
|
+
languages: LanguageTag[];
|
|
1075
|
+
}
|
|
1076
|
+
export interface RegionList {
|
|
1077
|
+
regions: string[];
|
|
1078
|
+
}
|
|
1079
|
+
export interface SegmentList {
|
|
1080
|
+
segments?: Segment[];
|
|
1081
|
+
}
|
|
1082
|
+
export interface Segment {
|
|
1083
|
+
id: ImfUuid;
|
|
1084
|
+
sequenceList: SequenceList;
|
|
1085
|
+
}
|
|
1086
|
+
export interface SequenceList {
|
|
1087
|
+
forcedNarrativeSequences?: ForcedNarrativeSequence[];
|
|
1088
|
+
hearingImpairedCaptionsSequences?: HearingImpairedCaptionsSequence[];
|
|
1089
|
+
iabSequences?: IABSequence[];
|
|
1090
|
+
isxdSequences?: ISXDSequence[];
|
|
1091
|
+
mainAudioSequences?: MainAudioSequence[];
|
|
1092
|
+
mainImageSequences?: MainImageSequence[];
|
|
1093
|
+
markerSequences?: MarkerSequence[];
|
|
1094
|
+
subtitlesSequences?: SubtitlesSequence[];
|
|
1095
|
+
}
|
|
1096
|
+
export interface ForcedNarrativeSequence {
|
|
1097
|
+
id: ImfUuid;
|
|
1098
|
+
resourceList: ResourceList;
|
|
1099
|
+
trackId: ImfUuid;
|
|
1100
|
+
}
|
|
1101
|
+
export interface ResourceList {
|
|
1102
|
+
resources?: Resource[];
|
|
1103
|
+
}
|
|
1104
|
+
export interface Resource {
|
|
1105
|
+
annotation?: LanguageString | null;
|
|
1106
|
+
editRate?: EditRate | null;
|
|
1107
|
+
entryPoint?: number | null;
|
|
1108
|
+
hash?: string | null;
|
|
1109
|
+
id: ImfUuid;
|
|
1110
|
+
intrinsicDuration: number;
|
|
1111
|
+
keyId?: ImfUuid | null;
|
|
1112
|
+
markers?: MarkerInfo[];
|
|
1113
|
+
repeatCount?: number | null;
|
|
1114
|
+
sourceDuration?: number | null;
|
|
1115
|
+
sourceEncoding?: ImfUuid | null;
|
|
1116
|
+
trackFileId?: ImfUuid | null;
|
|
1117
|
+
}
|
|
1118
|
+
export interface MarkerInfo {
|
|
1119
|
+
annotation?: string | null;
|
|
1120
|
+
label: MarkerLabelElement;
|
|
1121
|
+
offset: number;
|
|
1122
|
+
}
|
|
1123
|
+
export interface HearingImpairedCaptionsSequence {
|
|
1124
|
+
id: ImfUuid;
|
|
1125
|
+
resourceList: ResourceList;
|
|
1126
|
+
trackId: ImfUuid;
|
|
1127
|
+
}
|
|
1128
|
+
export interface IABSequence {
|
|
1129
|
+
id: ImfUuid;
|
|
1130
|
+
resourceList: ResourceList;
|
|
1131
|
+
trackId: ImfUuid;
|
|
1132
|
+
}
|
|
1133
|
+
export interface ISXDSequence {
|
|
1134
|
+
id: ImfUuid;
|
|
1135
|
+
resourceList: ResourceList;
|
|
1136
|
+
trackId: ImfUuid;
|
|
1137
|
+
}
|
|
1138
|
+
export interface MainAudioSequence {
|
|
1139
|
+
id: ImfUuid;
|
|
1140
|
+
resourceList: ResourceList;
|
|
1141
|
+
trackId: ImfUuid;
|
|
1142
|
+
}
|
|
1143
|
+
export interface MainImageSequence {
|
|
1144
|
+
id: ImfUuid;
|
|
1145
|
+
resourceList: ResourceList;
|
|
1146
|
+
trackId: ImfUuid;
|
|
1147
|
+
}
|
|
1148
|
+
export interface MarkerSequence {
|
|
1149
|
+
id: ImfUuid;
|
|
1150
|
+
resourceList: ResourceList;
|
|
1151
|
+
trackId: ImfUuid;
|
|
1152
|
+
}
|
|
1153
|
+
export interface SubtitlesSequence {
|
|
1154
|
+
id: ImfUuid;
|
|
1155
|
+
resourceList: ResourceList;
|
|
1156
|
+
trackId: ImfUuid;
|
|
1157
|
+
}
|
|
1158
|
+
/**
|
|
1159
|
+
* OPL XML — Output Profile List (SMPTE ST 2067-100).
|
|
1160
|
+
*
|
|
1161
|
+
* Defines output processing instructions for a composition: image scaling, cropping, pixel encoding, and audio routing/mixing macros.
|
|
1162
|
+
*
|
|
1163
|
+
* `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.
|
|
1164
|
+
*/
|
|
1165
|
+
export interface OutputProfileList {
|
|
1166
|
+
annotation?: string | null;
|
|
1167
|
+
compositionPlaylistId: ImfUuid;
|
|
1168
|
+
creator?: string | null;
|
|
1169
|
+
id: ImfUuid;
|
|
1170
|
+
/**
|
|
1171
|
+
* ISO 8601 issue date.
|
|
1172
|
+
*/
|
|
1173
|
+
issueDate: string;
|
|
1174
|
+
issuer?: string | null;
|
|
1175
|
+
/**
|
|
1176
|
+
* Each `<Macro xsi:type="...">` entry from the `<MacroList>`. Empty when the OPL has no macros (or has `<MacroList/>`).
|
|
1177
|
+
*/
|
|
1178
|
+
macros?: OplMacro[];
|
|
1179
|
+
}
|
|
1180
|
+
/**
|
|
1181
|
+
* A single macro entry from an OPL `<MacroList>`.
|
|
1182
|
+
*
|
|
1183
|
+
* 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.
|
|
1184
|
+
*/
|
|
1185
|
+
export interface OplMacro {
|
|
1186
|
+
/**
|
|
1187
|
+
* `MacroType.Annotation` (optional, §6.5.2).
|
|
1188
|
+
*/
|
|
1189
|
+
annotation?: string | null;
|
|
1190
|
+
/**
|
|
1191
|
+
* 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.
|
|
1192
|
+
*/
|
|
1193
|
+
extraFields: [string, string][];
|
|
1194
|
+
/**
|
|
1195
|
+
* `MacroType.Name` per ST 2067-100 §6.5.1; required by the XSD.
|
|
1196
|
+
*/
|
|
1197
|
+
name: string;
|
|
1198
|
+
/**
|
|
1199
|
+
* 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).
|
|
1200
|
+
*/
|
|
1201
|
+
xsiType?: string | null;
|
|
1202
|
+
}
|
|
1203
|
+
/**
|
|
1204
|
+
* PKL XML — Packing List (SMPTE ST 2067-2 §9).
|
|
1205
|
+
*
|
|
1206
|
+
* Assets carry SHA-1 (default) or SHA-256 checksums. The algorithm is determined by the optional `<HashAlgorithm>` element on each asset.
|
|
1207
|
+
*/
|
|
1208
|
+
export interface PackingList {
|
|
1209
|
+
annotationText?: string | null;
|
|
1210
|
+
assetList: PklAssetList;
|
|
1211
|
+
creator?: string | null;
|
|
1212
|
+
/**
|
|
1213
|
+
* Optional group identifier for partial deliveries (SMPTE ST 2067-2 §9).
|
|
1214
|
+
*/
|
|
1215
|
+
groupId?: ImfUuid | null;
|
|
1216
|
+
id: ImfUuid;
|
|
1217
|
+
/**
|
|
1218
|
+
* ISO 8601 issue date.
|
|
1219
|
+
*/
|
|
1220
|
+
issueDate: string;
|
|
1221
|
+
issuer?: string | null;
|
|
1222
|
+
}
|
|
1223
|
+
/**
|
|
1224
|
+
* The `<AssetList>` element in a PKL.
|
|
1225
|
+
*/
|
|
1226
|
+
export interface PklAssetList {
|
|
1227
|
+
assets: PklAsset[];
|
|
1228
|
+
}
|
|
1229
|
+
/**
|
|
1230
|
+
* A single asset entry in a PKL.
|
|
1231
|
+
*/
|
|
1232
|
+
export interface PklAsset {
|
|
1233
|
+
annotationText?: string | null;
|
|
1234
|
+
hash: AssetHash;
|
|
1235
|
+
id: ImfUuid;
|
|
1236
|
+
mimeType: MimeType;
|
|
1237
|
+
originalFileName?: string | null;
|
|
1238
|
+
/**
|
|
1239
|
+
* File size in bytes.
|
|
1240
|
+
*/
|
|
1241
|
+
size: number;
|
|
1242
|
+
}
|
|
1243
|
+
/**
|
|
1244
|
+
* A decoded asset hash from a Packing List, per SMPTE ST 2067-2 §9.
|
|
1245
|
+
*
|
|
1246
|
+
* PKL files carry base64-encoded SHA-1 or SHA-256 digests for each tracked asset.
|
|
1247
|
+
*/
|
|
1248
|
+
export interface AssetHash {
|
|
1249
|
+
algorithm: HashAlgorithm;
|
|
1250
|
+
bytes: number[];
|
|
1251
|
+
}
|
|
1252
|
+
/**
|
|
1253
|
+
* A parsed Sidecar Composition Map document (ST 2067-9:2018).
|
|
1254
|
+
*
|
|
1255
|
+
* 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.
|
|
1256
|
+
*/
|
|
1257
|
+
export interface SidecarCompositionMap {
|
|
1258
|
+
annotation?: string | null;
|
|
1259
|
+
/**
|
|
1260
|
+
* True if a `<Signature>` element was present (§7.2.5).
|
|
1261
|
+
*/
|
|
1262
|
+
hasSignature: boolean;
|
|
1263
|
+
/**
|
|
1264
|
+
* True if a `<Signer>` element was present (§7.2.4).
|
|
1265
|
+
*/
|
|
1266
|
+
hasSigner: boolean;
|
|
1267
|
+
id: ImfUuid;
|
|
1268
|
+
issueDate: string;
|
|
1269
|
+
issuer?: string | null;
|
|
1270
|
+
/**
|
|
1271
|
+
* Sidecar asset associations.
|
|
1272
|
+
*/
|
|
1273
|
+
sidecarAssets: SidecarAsset[];
|
|
1274
|
+
}
|
|
1275
|
+
/**
|
|
1276
|
+
* A single sidecar asset association within an SCM document.
|
|
1277
|
+
*/
|
|
1278
|
+
export interface SidecarAsset {
|
|
1279
|
+
/**
|
|
1280
|
+
* CPLs this sidecar asset is associated with (§7.3.1.1: one or more).
|
|
1281
|
+
*/
|
|
1282
|
+
cplIds: ImfUuid[];
|
|
1283
|
+
id: ImfUuid;
|
|
1284
|
+
}
|
|
1285
|
+
/**
|
|
1286
|
+
* VOLINDEX document (SMPTE ST 2067-9 §5 / ST 429-9:2014).
|
|
1287
|
+
*
|
|
1288
|
+
* In practice this is always `<Index>1</Index>` for single-volume IMF packages. The spec allows multi-volume packages but they are rarely used.
|
|
1289
|
+
*/
|
|
1290
|
+
export interface VolumeIndex {
|
|
1291
|
+
/**
|
|
1292
|
+
* The volume count. Almost always `1`.
|
|
1293
|
+
*/
|
|
1294
|
+
index: number;
|
|
1295
|
+
}
|
|
1296
|
+
/**
|
|
1297
|
+
* ESLint-style per-rule severity overrides.
|
|
1298
|
+
*
|
|
1299
|
+
* 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"`.
|
|
1300
|
+
*
|
|
1301
|
+
* Values are the desired `RuleSeverity`, or `RuleSeverity::Off` to suppress the rule entirely.
|
|
1302
|
+
*
|
|
1303
|
+
* An empty map (the default) is a no-op.
|
|
1304
|
+
*/
|
|
1305
|
+
export interface RulesConfig {
|
|
1306
|
+
[k: string]: RuleSeverity | undefined;
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* Result of parsing and validating an IMF package.
|
|
1310
|
+
*
|
|
1311
|
+
* This is the primary return type — contains the full parsed package and all validation findings.
|
|
1312
|
+
*/
|
|
1313
|
+
export interface ValidationResult {
|
|
1314
|
+
package: Imferno;
|
|
1315
|
+
validation: ValidationReport;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
/** Core constraints (ST 2067-2) edition to validate against. `"auto"` detects it from the CPL. */
|
|
1319
|
+
export type CoreSpec = "auto" | "v2013" | "v2016" | "v2020";
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* App #2E (ST 2067-21) edition to validate against. `"auto"` uses the CPL's
|
|
1323
|
+
* ApplicationIdentification; `"none"` skips application-profile validation.
|
|
1324
|
+
*/
|
|
1325
|
+
export type App2eSpec = "auto" | "none" | "v2014" | "v2016" | "v2020" | "v2023" | "v2026";
|
|
1326
|
+
|
|
1327
|
+
/** Options accepted by every validating entry point. */
|
|
1328
|
+
export interface ValidateOptions {
|
|
1329
|
+
/** Core constraints edition. Default: `"auto"`. */
|
|
1330
|
+
coreSpec?: CoreSpec;
|
|
1331
|
+
/** App #2E edition. Default: `"auto"`. */
|
|
1332
|
+
app2eSpec?: App2eSpec;
|
|
1333
|
+
/** ESLint-style per-rule severity overrides, keyed by code, rule suffix, glob or `source:<kind>`. */
|
|
1334
|
+
rules?: RulesConfig;
|
|
1335
|
+
/** Collapse repeated identical findings into one issue with `additional_instances`. Default: `false`. */
|
|
1336
|
+
aggregateRepeats?: boolean;
|
|
1337
|
+
}
|