@imferno/schema 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imferno/schema",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "description": "JSON Schema definitions for SMPTE ST 2067 IMF types — validates imferno export output",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -18,10 +18,105 @@
18
18
  "$ref": "#/definitions/PackageSummary"
19
19
  },
20
20
  "validation": {
21
- "$ref": "#/definitions/ValidationSummary"
21
+ "$ref": "#/definitions/ValidationReport"
22
22
  }
23
23
  },
24
24
  "definitions": {
25
+ "Category": {
26
+ "description": "Category of validation issue",
27
+ "oneOf": [
28
+ {
29
+ "description": "XML structure and syntax issues",
30
+ "type": "string",
31
+ "enum": [
32
+ "Structure"
33
+ ]
34
+ },
35
+ {
36
+ "description": "SMPTE schema compliance",
37
+ "type": "string",
38
+ "enum": [
39
+ "Schema"
40
+ ]
41
+ },
42
+ {
43
+ "description": "UUID and reference resolution",
44
+ "type": "string",
45
+ "enum": [
46
+ "Reference"
47
+ ]
48
+ },
49
+ {
50
+ "description": "Asset file availability and integrity",
51
+ "type": "string",
52
+ "enum": [
53
+ "Asset"
54
+ ]
55
+ },
56
+ {
57
+ "description": "Timing, frame rate, and duration issues",
58
+ "type": "string",
59
+ "enum": [
60
+ "Timing"
61
+ ]
62
+ },
63
+ {
64
+ "description": "Encoding and codec issues",
65
+ "type": "string",
66
+ "enum": [
67
+ "Encoding"
68
+ ]
69
+ },
70
+ {
71
+ "description": "Audio configuration issues",
72
+ "type": "string",
73
+ "enum": [
74
+ "Audio"
75
+ ]
76
+ },
77
+ {
78
+ "description": "Video configuration issues",
79
+ "type": "string",
80
+ "enum": [
81
+ "Video"
82
+ ]
83
+ },
84
+ {
85
+ "description": "Subtitle and caption issues",
86
+ "type": "string",
87
+ "enum": [
88
+ "Subtitle"
89
+ ]
90
+ },
91
+ {
92
+ "description": "Metadata and labeling issues",
93
+ "type": "string",
94
+ "enum": [
95
+ "Metadata"
96
+ ]
97
+ },
98
+ {
99
+ "description": "Security and DRM issues",
100
+ "type": "string",
101
+ "enum": [
102
+ "Security"
103
+ ]
104
+ },
105
+ {
106
+ "description": "Studio-specific requirements",
107
+ "type": "object",
108
+ "required": [
109
+ "StudioSpecific"
110
+ ],
111
+ "properties": {
112
+ "StudioSpecific": {
113
+ "type": "string"
114
+ }
115
+ },
116
+ "additionalProperties": false
117
+ }
118
+ ]
119
+ },
25
120
  "CplMarker": {
26
121
  "type": "object",
27
122
  "required": [
@@ -52,6 +147,7 @@
52
147
  "isSupplemental",
53
148
  "markers",
54
149
  "segmentCount",
150
+ "sequences",
55
151
  "title",
56
152
  "unresolvedAncestorAssetIds"
57
153
  ],
@@ -63,6 +159,13 @@
63
159
  "null"
64
160
  ]
65
161
  },
162
+ "editRate": {
163
+ "description": "CPL-level edit rate, e.g. \"24000/1001\"",
164
+ "type": [
165
+ "string",
166
+ "null"
167
+ ]
168
+ },
66
169
  "id": {
67
170
  "type": "string"
68
171
  },
@@ -82,6 +185,13 @@
82
185
  "format": "uint",
83
186
  "minimum": 0.0
84
187
  },
188
+ "sequences": {
189
+ "description": "Virtual tracks (sequences) merged across all segments",
190
+ "type": "array",
191
+ "items": {
192
+ "$ref": "#/definitions/CplSequence"
193
+ }
194
+ },
85
195
  "timecodeStart": {
86
196
  "description": "Timecode start address, e.g. \"01:00:00:00\"",
87
197
  "type": [
@@ -101,6 +211,151 @@
101
211
  }
102
212
  }
103
213
  },
214
+ "CplResource": {
215
+ "type": "object",
216
+ "required": [
217
+ "id",
218
+ "intrinsicDuration"
219
+ ],
220
+ "properties": {
221
+ "editRate": {
222
+ "description": "Edit rate as \"N/D\" string, e.g. \"24000/1001\"",
223
+ "type": [
224
+ "string",
225
+ "null"
226
+ ]
227
+ },
228
+ "entryPoint": {
229
+ "type": [
230
+ "integer",
231
+ "null"
232
+ ],
233
+ "format": "uint64",
234
+ "minimum": 0.0
235
+ },
236
+ "id": {
237
+ "type": "string"
238
+ },
239
+ "intrinsicDuration": {
240
+ "type": "integer",
241
+ "format": "uint64",
242
+ "minimum": 0.0
243
+ },
244
+ "sourceDuration": {
245
+ "type": [
246
+ "integer",
247
+ "null"
248
+ ],
249
+ "format": "uint64",
250
+ "minimum": 0.0
251
+ },
252
+ "sourceEncoding": {
253
+ "type": [
254
+ "string",
255
+ "null"
256
+ ]
257
+ },
258
+ "trackFileId": {
259
+ "type": [
260
+ "string",
261
+ "null"
262
+ ]
263
+ }
264
+ }
265
+ },
266
+ "CplSequence": {
267
+ "type": "object",
268
+ "required": [
269
+ "id",
270
+ "resources",
271
+ "trackId",
272
+ "type"
273
+ ],
274
+ "properties": {
275
+ "id": {
276
+ "type": "string"
277
+ },
278
+ "resources": {
279
+ "type": "array",
280
+ "items": {
281
+ "$ref": "#/definitions/CplResource"
282
+ }
283
+ },
284
+ "trackId": {
285
+ "type": "string"
286
+ },
287
+ "type": {
288
+ "description": "Sequence type: \"MainImage\", \"MainAudio\", \"Subtitles\", etc.",
289
+ "type": "string"
290
+ }
291
+ }
292
+ },
293
+ "Location": {
294
+ "description": "Location where the issue was found",
295
+ "type": "object",
296
+ "properties": {
297
+ "cpl_id": {
298
+ "description": "CPL UUID if applicable",
299
+ "type": [
300
+ "string",
301
+ "null"
302
+ ]
303
+ },
304
+ "file": {
305
+ "description": "File path if applicable",
306
+ "type": [
307
+ "string",
308
+ "null"
309
+ ]
310
+ },
311
+ "line": {
312
+ "description": "Line number in XML file",
313
+ "type": [
314
+ "integer",
315
+ "null"
316
+ ],
317
+ "format": "uint",
318
+ "minimum": 0.0
319
+ },
320
+ "path": {
321
+ "description": "XPath or field path",
322
+ "type": [
323
+ "string",
324
+ "null"
325
+ ]
326
+ },
327
+ "resource_id": {
328
+ "description": "Resource UUID if applicable",
329
+ "type": [
330
+ "string",
331
+ "null"
332
+ ]
333
+ },
334
+ "segment": {
335
+ "description": "Segment index (0-based)",
336
+ "type": [
337
+ "integer",
338
+ "null"
339
+ ],
340
+ "format": "uint",
341
+ "minimum": 0.0
342
+ },
343
+ "sequence_id": {
344
+ "description": "Sequence UUID if applicable",
345
+ "type": [
346
+ "string",
347
+ "null"
348
+ ]
349
+ },
350
+ "timecode": {
351
+ "description": "Timecode if applicable",
352
+ "type": [
353
+ "string",
354
+ "null"
355
+ ]
356
+ }
357
+ }
358
+ },
104
359
  "PackageSummary": {
105
360
  "type": "object",
106
361
  "required": [
@@ -109,6 +364,9 @@
109
364
  "cplCount",
110
365
  "issueDate",
111
366
  "pklCount",
367
+ "scmCount",
368
+ "sidecarCount",
369
+ "unreferencedAssets",
112
370
  "volumeIndex"
113
371
  ],
114
372
  "properties": {
@@ -145,6 +403,22 @@
145
403
  "format": "uint",
146
404
  "minimum": 0.0
147
405
  },
406
+ "scmCount": {
407
+ "type": "integer",
408
+ "format": "uint",
409
+ "minimum": 0.0
410
+ },
411
+ "sidecarCount": {
412
+ "type": "integer",
413
+ "format": "uint",
414
+ "minimum": 0.0
415
+ },
416
+ "unreferencedAssets": {
417
+ "type": "array",
418
+ "items": {
419
+ "$ref": "#/definitions/UnreferencedAsset"
420
+ }
421
+ },
148
422
  "volumeIndex": {
149
423
  "type": "integer",
150
424
  "format": "uint32",
@@ -152,36 +426,201 @@
152
426
  }
153
427
  }
154
428
  },
155
- "ValidationIssueEntry": {
429
+ "Severity": {
430
+ "description": "Severity level of validation issues",
431
+ "oneOf": [
432
+ {
433
+ "description": "Informational - Best practice suggestions",
434
+ "type": "string",
435
+ "enum": [
436
+ "Info"
437
+ ]
438
+ },
439
+ {
440
+ "description": "Warning - Should fix but not critical",
441
+ "type": "string",
442
+ "enum": [
443
+ "Warning"
444
+ ]
445
+ },
446
+ {
447
+ "description": "Error - Must fix for compliance",
448
+ "type": "string",
449
+ "enum": [
450
+ "Error"
451
+ ]
452
+ },
453
+ {
454
+ "description": "Critical - Prevents package from being usable",
455
+ "type": "string",
456
+ "enum": [
457
+ "Critical"
458
+ ]
459
+ }
460
+ ]
461
+ },
462
+ "UnreferencedAsset": {
463
+ "type": "object",
464
+ "required": [
465
+ "id",
466
+ "path"
467
+ ],
468
+ "properties": {
469
+ "id": {
470
+ "type": "string"
471
+ },
472
+ "path": {
473
+ "type": "string"
474
+ }
475
+ }
476
+ },
477
+ "ValidationIssue": {
478
+ "description": "A single validation issue",
156
479
  "type": "object",
157
480
  "required": [
481
+ "category",
482
+ "code",
483
+ "context",
484
+ "location",
158
485
  "message",
159
486
  "severity"
160
487
  ],
161
488
  "properties": {
489
+ "category": {
490
+ "description": "Category of issue",
491
+ "allOf": [
492
+ {
493
+ "$ref": "#/definitions/Category"
494
+ }
495
+ ]
496
+ },
497
+ "code": {
498
+ "description": "Error code (e.g., \"SMPTE-429-7-2006-4.3.2\")",
499
+ "type": "string"
500
+ },
501
+ "context": {
502
+ "description": "Additional context",
503
+ "type": "object",
504
+ "additionalProperties": {
505
+ "type": "string"
506
+ }
507
+ },
508
+ "location": {
509
+ "description": "Location where issue was found",
510
+ "allOf": [
511
+ {
512
+ "$ref": "#/definitions/Location"
513
+ }
514
+ ]
515
+ },
162
516
  "message": {
517
+ "description": "Human-readable message",
163
518
  "type": "string"
164
519
  },
165
520
  "severity": {
166
- "type": "string"
521
+ "description": "Severity level",
522
+ "allOf": [
523
+ {
524
+ "$ref": "#/definitions/Severity"
525
+ }
526
+ ]
527
+ },
528
+ "suggestion": {
529
+ "description": "Suggestion for how to fix",
530
+ "type": [
531
+ "string",
532
+ "null"
533
+ ]
167
534
  }
168
535
  }
169
536
  },
170
- "ValidationSummary": {
537
+ "ValidationProfile": {
538
+ "description": "Validation profile determining strictness",
539
+ "oneOf": [
540
+ {
541
+ "description": "Minimal validation - just check if playable",
542
+ "type": "string",
543
+ "enum": [
544
+ "Minimal"
545
+ ]
546
+ },
547
+ {
548
+ "description": "Standard SMPTE compliance",
549
+ "type": "string",
550
+ "enum": [
551
+ "SMPTE"
552
+ ]
553
+ },
554
+ {
555
+ "description": "Custom profile with specific rules",
556
+ "type": "string",
557
+ "enum": [
558
+ "Custom"
559
+ ]
560
+ }
561
+ ]
562
+ },
563
+ "ValidationReport": {
564
+ "description": "Comprehensive validation report",
171
565
  "type": "object",
172
566
  "required": [
173
- "issues",
174
- "valid"
567
+ "critical",
568
+ "errors",
569
+ "info",
570
+ "is_compliant",
571
+ "is_playable",
572
+ "profile",
573
+ "timestamp",
574
+ "warnings"
175
575
  ],
176
576
  "properties": {
177
- "issues": {
577
+ "critical": {
578
+ "description": "Critical issues that prevent usage",
579
+ "type": "array",
580
+ "items": {
581
+ "$ref": "#/definitions/ValidationIssue"
582
+ }
583
+ },
584
+ "errors": {
585
+ "description": "Errors that must be fixed for compliance",
586
+ "type": "array",
587
+ "items": {
588
+ "$ref": "#/definitions/ValidationIssue"
589
+ }
590
+ },
591
+ "info": {
592
+ "description": "Informational issues",
178
593
  "type": "array",
179
594
  "items": {
180
- "$ref": "#/definitions/ValidationIssueEntry"
595
+ "$ref": "#/definitions/ValidationIssue"
181
596
  }
182
597
  },
183
- "valid": {
598
+ "is_compliant": {
599
+ "description": "Whether the package is compliant with base SMPTE standards",
184
600
  "type": "boolean"
601
+ },
602
+ "is_playable": {
603
+ "description": "Whether the package is playable despite issues",
604
+ "type": "boolean"
605
+ },
606
+ "profile": {
607
+ "description": "Validation profile used",
608
+ "allOf": [
609
+ {
610
+ "$ref": "#/definitions/ValidationProfile"
611
+ }
612
+ ]
613
+ },
614
+ "timestamp": {
615
+ "description": "Timestamp of validation",
616
+ "type": "string"
617
+ },
618
+ "warnings": {
619
+ "description": "Warnings that should be addressed",
620
+ "type": "array",
621
+ "items": {
622
+ "$ref": "#/definitions/ValidationIssue"
623
+ }
185
624
  }
186
625
  }
187
626
  }