@contentauth/c2pa-types 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ © Copyright 2025 Adobe. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/index.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this file in
6
+ * accordance with the terms of the Adobe license agreement accompanying
7
+ * it.
8
+ */
9
+
10
+ import type { Reader } from './types/ManifestStore.js';
11
+
12
+ // Renames the auto-generated "Reader" type to the more appropriate "ManifestStore"
13
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface, @typescript-eslint/no-empty-object-type
14
+ export interface ManifestStore extends Reader {}
15
+
16
+ export type { Manifest } from './types/ManifestStore.js';
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@contentauth/c2pa-types",
3
+ "description": "Typescript types generated from c2pa-rs",
4
+ "type": "module",
5
+ "version": "0.2.0",
6
+ "types": "index.d.ts",
7
+ "files": [
8
+ "index.d.ts",
9
+ "types/**/*"
10
+ ],
11
+ "dependencies": {
12
+ "json-schema-to-typescript": "^15.0.4",
13
+ "rimraf": "^6.0.1"
14
+ },
15
+ "scripts": {
16
+ "test": "echo \"No tests to run\" && exit 0",
17
+ "build": "pnpm clean && json2ts -i schemas/ -o types/",
18
+ "clean": "rimraf types"
19
+ }
20
+ }
@@ -0,0 +1,707 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * Assertions in C2PA can be stored in several formats
10
+ */
11
+ export type ManifestAssertionKind = "Cbor" | "Json" | "Binary" | "Uri";
12
+ export type UriOrResource = ResourceRef | HashedUri;
13
+ export type DateT = string;
14
+ /**
15
+ * The type of shape for the range.
16
+ */
17
+ export type ShapeType = "rectangle" | "circle" | "polygon";
18
+ /**
19
+ * The type of unit for the range.
20
+ */
21
+ export type UnitType = "pixel" | "percent";
22
+ /**
23
+ * The type of time.
24
+ */
25
+ export type TimeType = "npt";
26
+ /**
27
+ * The type of range for the region of interest.
28
+ */
29
+ export type RangeType = "spatial" | "temporal" | "frame" | "textual" | "identified";
30
+ /**
31
+ * A role describing the region.
32
+ */
33
+ export type Role =
34
+ | "c2pa.areaOfInterest"
35
+ | "c2pa.cropped"
36
+ | "c2pa.edited"
37
+ | "c2pa.placed"
38
+ | "c2pa.redacted"
39
+ | "c2pa.subjectArea"
40
+ | "c2pa.deleted"
41
+ | "c2pa.styled"
42
+ | "c2pa.watermarked";
43
+ /**
44
+ * The relationship of the ingredient to the current asset.
45
+ */
46
+ export type Relationship = "parentOf" | "componentOf" | "inputTo";
47
+ /**
48
+ * Describes the digital signature algorithms allowed by the C2PA spec.
49
+ *
50
+ * Per [§13.2, “Digital Signatures”]:
51
+ *
52
+ * > All digital signatures applied as per the technical requirements of this > specification shall be generated using one of the digital signature > algorithms and key types listed as described in this section.
53
+ *
54
+ * [§13.2, “Digital Signatures”]: https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_digital_signatures
55
+ */
56
+ export type SigningAlg = "Es256" | "Es384" | "Es512" | "Ps256" | "Ps384" | "Ps512" | "Ed25519";
57
+ /**
58
+ * Indicates if the manifest store is valid and trusted.
59
+ *
60
+ * The Trusted state implies the manifest store is valid and the active signature is trusted.
61
+ */
62
+ export type ValidationState = "Invalid" | "Valid" | "Trusted";
63
+
64
+ /**
65
+ * Use a Reader to read and validate a manifest store.
66
+ */
67
+ export interface Reader {
68
+ /**
69
+ * A label for the active (most recent) manifest in the store
70
+ */
71
+ active_manifest?: string | null;
72
+ /**
73
+ * A HashMap of Manifests
74
+ */
75
+ manifests: {
76
+ [k: string]: Manifest;
77
+ };
78
+ /**
79
+ * ValidationStatus generated when loading the ManifestStore from an asset
80
+ */
81
+ validation_results?: ValidationResults | null;
82
+ /**
83
+ * The validation state of the manifest store
84
+ */
85
+ validation_state?: ValidationState | null;
86
+ /**
87
+ * ValidationStatus generated when loading the ManifestStore from an asset
88
+ */
89
+ validation_status?: ValidationStatus[] | null;
90
+ [k: string]: unknown;
91
+ }
92
+ /**
93
+ * A Manifest represents all the information in a c2pa manifest
94
+ */
95
+ export interface Manifest {
96
+ /**
97
+ * A list of assertions
98
+ */
99
+ assertions?: ManifestAssertion[];
100
+ /**
101
+ * A User Agent formatted string identifying the software/hardware/system produced this claim Spaces are not allowed in names, versions can be specified with product/1.0 syntax.
102
+ */
103
+ claim_generator?: string | null;
104
+ /**
105
+ * A list of claim generator info data identifying the software/hardware/system produced this claim.
106
+ */
107
+ claim_generator_info?: ClaimGeneratorInfo[] | null;
108
+ /**
109
+ * A List of verified credentials
110
+ */
111
+ credentials?: unknown[] | null;
112
+ /**
113
+ * The format of the source file as a MIME type.
114
+ */
115
+ format?: string | null;
116
+ /**
117
+ * A List of ingredients
118
+ */
119
+ ingredients?: Ingredient[];
120
+ /**
121
+ * Instance ID from `xmpMM:InstanceID` in XMP metadata.
122
+ */
123
+ instance_id?: string;
124
+ label?: string | null;
125
+ /**
126
+ * A list of user metadata for this claim.
127
+ */
128
+ metadata?: AssertionMetadata[] | null;
129
+ /**
130
+ * A list of redactions - URIs to a redacted assertions
131
+ */
132
+ redactions?: string[] | null;
133
+ /**
134
+ * container for binary assets (like thumbnails)
135
+ */
136
+ resources?: ResourceStore;
137
+ /**
138
+ * Signature data (only used for reporting)
139
+ */
140
+ signature_info?: SignatureInfo | null;
141
+ thumbnail?: ResourceRef | null;
142
+ /**
143
+ * A human-readable title, generally source filename.
144
+ */
145
+ title?: string | null;
146
+ /**
147
+ * Optional prefix added to the generated Manifest label. This is typically an internet domain name for the vendor (i.e. `adobe`).
148
+ */
149
+ vendor?: string | null;
150
+ [k: string]: unknown;
151
+ }
152
+ /**
153
+ * A labeled container for an Assertion value in a Manifest
154
+ */
155
+ export interface ManifestAssertion {
156
+ data: unknown;
157
+ /**
158
+ * There can be more than one assertion for any label
159
+ */
160
+ instance?: number | null;
161
+ /**
162
+ * The [ManifestAssertionKind] for this assertion (as stored in c2pa content)
163
+ */
164
+ kind?: ManifestAssertionKind | null;
165
+ /**
166
+ * An assertion label in reverse domain format
167
+ */
168
+ label: string;
169
+ [k: string]: unknown;
170
+ }
171
+ /**
172
+ * Description of the claim generator, or the software used in generating the claim.
173
+ *
174
+ * This structure is also used for actions softwareAgent
175
+ */
176
+ export interface ClaimGeneratorInfo {
177
+ /**
178
+ * hashed URI to the icon (either embedded or remote)
179
+ */
180
+ icon?: UriOrResource | null;
181
+ /**
182
+ * A human readable string naming the claim_generator
183
+ */
184
+ name: string;
185
+ /**
186
+ * A human readable string of the OS the claim generator is running on
187
+ */
188
+ operating_system?: string | null;
189
+ /**
190
+ * A human readable string of the product's version
191
+ */
192
+ version?: string | null;
193
+ [k: string]: unknown;
194
+ }
195
+ /**
196
+ * A reference to a resource to be used in JSON serialization.
197
+ *
198
+ * The underlying data can be read as a stream via [`Reader::resource_to_stream`][crate::Reader::resource_to_stream].
199
+ */
200
+ export interface ResourceRef {
201
+ /**
202
+ * The algorithm used to hash the resource (if applicable).
203
+ */
204
+ alg?: string | null;
205
+ /**
206
+ * More detailed data types as defined in the C2PA spec.
207
+ */
208
+ data_types?: AssetType[] | null;
209
+ /**
210
+ * The mime type of the referenced resource.
211
+ */
212
+ format: string;
213
+ /**
214
+ * The hash of the resource (if applicable).
215
+ */
216
+ hash?: string | null;
217
+ /**
218
+ * A URI that identifies the resource as referenced from the manifest.
219
+ *
220
+ * This may be a JUMBF URI, a file path, a URL or any other string. Relative JUMBF URIs will be resolved with the manifest label. Relative file paths will be resolved with the base path if provided.
221
+ */
222
+ identifier: string;
223
+ [k: string]: unknown;
224
+ }
225
+ export interface AssetType {
226
+ type: string;
227
+ version?: string | null;
228
+ [k: string]: unknown;
229
+ }
230
+ /**
231
+ * A `HashedUri` provides a reference to content available within the same manifest store.
232
+ *
233
+ * This is described in [§8.3, URI References], of the C2PA Technical Specification.
234
+ *
235
+ * [§8.3, URI References]: https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_uri_references
236
+ */
237
+ export interface HashedUri {
238
+ /**
239
+ * A string identifying the cryptographic hash algorithm used to compute the hash
240
+ */
241
+ alg?: string | null;
242
+ /**
243
+ * Byte string containing the hash value
244
+ */
245
+ hash: number[];
246
+ /**
247
+ * JUMBF URI reference
248
+ */
249
+ url: string;
250
+ [k: string]: unknown;
251
+ }
252
+ /**
253
+ * An `Ingredient` is any external asset that has been used in the creation of an asset.
254
+ */
255
+ export interface Ingredient {
256
+ /**
257
+ * The active manifest label (if one exists).
258
+ *
259
+ * If this ingredient has a [`ManifestStore`], this will hold the label of the active [`Manifest`].
260
+ *
261
+ * [`Manifest`]: crate::Manifest [`ManifestStore`]: crate::ManifestStore
262
+ */
263
+ active_manifest?: string | null;
264
+ /**
265
+ * A reference to the actual data of the ingredient.
266
+ */
267
+ data?: ResourceRef | null;
268
+ /**
269
+ * Additional information about the data's type to the ingredient V2 structure.
270
+ */
271
+ data_types?: AssetType[] | null;
272
+ /**
273
+ * Additional description of the ingredient.
274
+ */
275
+ description?: string | null;
276
+ /**
277
+ * Document ID from `xmpMM:DocumentID` in XMP metadata.
278
+ */
279
+ document_id?: string | null;
280
+ /**
281
+ * The format of the source file as a MIME type.
282
+ */
283
+ format?: string | null;
284
+ /**
285
+ * An optional hash of the asset to prevent duplicates.
286
+ */
287
+ hash?: string | null;
288
+ /**
289
+ * URI to an informational page about the ingredient or its data.
290
+ */
291
+ informational_URI?: string | null;
292
+ /**
293
+ * Instance ID from `xmpMM:InstanceID` in XMP metadata.
294
+ */
295
+ instance_id?: string | null;
296
+ /**
297
+ * The ingredient's label as assigned in the manifest.
298
+ */
299
+ label?: string | null;
300
+ /**
301
+ * A [`ManifestStore`] from the source asset extracted as a binary C2PA blob.
302
+ *
303
+ * [`ManifestStore`]: crate::ManifestStore
304
+ */
305
+ manifest_data?: ResourceRef | null;
306
+ /**
307
+ * Any additional [`Metadata`] as defined in the C2PA spec.
308
+ *
309
+ * [`Metadata`]: crate::Metadata
310
+ */
311
+ metadata?: AssertionMetadata | null;
312
+ ocsp_responses?: ResourceRef[] | null;
313
+ /**
314
+ * URI from `dcterms:provenance` in XMP metadata.
315
+ */
316
+ provenance?: string | null;
317
+ /**
318
+ * Set to `ParentOf` if this is the parent ingredient.
319
+ *
320
+ * There can only be one parent ingredient in the ingredients.
321
+ */
322
+ relationship?: Relationship & string;
323
+ resources?: ResourceStore;
324
+ /**
325
+ * A thumbnail image capturing the visual state at the time of import.
326
+ *
327
+ * A tuple of thumbnail MIME format (for example `image/jpeg`) and binary bits of the image.
328
+ */
329
+ thumbnail?: ResourceRef | null;
330
+ /**
331
+ * A human-readable title, generally source filename.
332
+ */
333
+ title?: string | null;
334
+ /**
335
+ * Validation results (Ingredient.V3)
336
+ */
337
+ validation_results?: ValidationResults | null;
338
+ /**
339
+ * Validation status (Ingredient v1 & v2)
340
+ */
341
+ validation_status?: ValidationStatus[] | null;
342
+ [k: string]: unknown;
343
+ }
344
+ /**
345
+ * The AssertionMetadata structure can be used as part of other assertions or on its own to reference others
346
+ */
347
+ export interface AssertionMetadata {
348
+ dataSource?: DataSource | null;
349
+ dateTime?: DateT | null;
350
+ localizations?:
351
+ | {
352
+ [k: string]: {
353
+ [k: string]: string;
354
+ };
355
+ }[]
356
+ | null;
357
+ reference?: HashedUri | null;
358
+ regionOfInterest?: RegionOfInterest | null;
359
+ reviewRatings?: ReviewRating[] | null;
360
+ [k: string]: unknown;
361
+ }
362
+ /**
363
+ * A description of the source for assertion data
364
+ */
365
+ export interface DataSource {
366
+ /**
367
+ * A list of [`Actor`]s associated with this source.
368
+ */
369
+ actors?: Actor[] | null;
370
+ /**
371
+ * A human-readable string giving details about the source of the assertion data.
372
+ */
373
+ details?: string | null;
374
+ /**
375
+ * A value from among the enumerated list indicating the source of the assertion.
376
+ */
377
+ type: string;
378
+ [k: string]: unknown;
379
+ }
380
+ /**
381
+ * Identifies a person responsible for an action.
382
+ */
383
+ export interface Actor {
384
+ /**
385
+ * List of references to W3C Verifiable Credentials.
386
+ */
387
+ credentials?: HashedUri[] | null;
388
+ /**
389
+ * An identifier for a human actor, used when the "type" is `humanEntry.identified`.
390
+ */
391
+ identifier?: string | null;
392
+ [k: string]: unknown;
393
+ }
394
+ /**
395
+ * A region of interest within an asset describing the change.
396
+ *
397
+ * This struct can be used from [`Action::changes`][crate::assertions::Action::changes], [`AssertionMetadata::region_of_interest`][crate::assertions::AssertionMetadata::region_of_interest], or [`SoftBindingScope::region`][crate::assertions::soft_binding::SoftBindingScope::region].
398
+ */
399
+ export interface RegionOfInterest {
400
+ /**
401
+ * A free-text string.
402
+ */
403
+ description?: string | null;
404
+ /**
405
+ * A free-text string representing a machine-readable, unique to this assertion, identifier for the region.
406
+ */
407
+ identifier?: string | null;
408
+ /**
409
+ * Additional information about the asset.
410
+ */
411
+ metadata?: AssertionMetadata | null;
412
+ /**
413
+ * A free-text string representing a human-readable name for the region which might be used in a user interface.
414
+ */
415
+ name?: string | null;
416
+ /**
417
+ * A range describing the region of interest for the specific asset.
418
+ */
419
+ region: Range[];
420
+ /**
421
+ * A value from our controlled vocabulary or an entity-specific value (e.g., com.litware.coolArea) that represents the role of a region among other regions.
422
+ */
423
+ role?: Role | null;
424
+ /**
425
+ * A value from a controlled vocabulary such as <https://cv.iptc.org/newscodes/imageregiontype/> or an entity-specific value (e.g., com.litware.newType) that represents the type of thing(s) depicted by a region.
426
+ *
427
+ * Note this field serializes/deserializes into the name `type`.
428
+ */
429
+ type?: string | null;
430
+ [k: string]: unknown;
431
+ }
432
+ /**
433
+ * A spatial, temporal, frame, or textual range describing the region of interest.
434
+ */
435
+ export interface Range {
436
+ /**
437
+ * A frame range.
438
+ */
439
+ frame?: Frame | null;
440
+ /**
441
+ * A item identifier.
442
+ */
443
+ item?: Item | null;
444
+ /**
445
+ * A spatial range.
446
+ */
447
+ shape?: Shape | null;
448
+ /**
449
+ * A textual range.
450
+ */
451
+ text?: Text | null;
452
+ /**
453
+ * A temporal range.
454
+ */
455
+ time?: Time | null;
456
+ /**
457
+ * The type of range of interest.
458
+ */
459
+ type: RangeType;
460
+ [k: string]: unknown;
461
+ }
462
+ /**
463
+ * A frame range representing starting and ending frames or pages.
464
+ *
465
+ * If both `start` and `end` are missing, the frame will span the entire asset.
466
+ */
467
+ export interface Frame {
468
+ /**
469
+ * The end of the frame inclusive or the end of the asset if not present.
470
+ */
471
+ end?: number | null;
472
+ /**
473
+ * The start of the frame or the end of the asset if not present.
474
+ *
475
+ * The first frame/page starts at 0.
476
+ */
477
+ start?: number | null;
478
+ [k: string]: unknown;
479
+ }
480
+ /**
481
+ * Description of the boundaries of an identified range.
482
+ */
483
+ export interface Item {
484
+ /**
485
+ * The container-specific term used to identify items, such as "track_id" for MP4 or "item_ID" for HEIF.
486
+ */
487
+ identifier: string;
488
+ /**
489
+ * The value of the identifier, e.g. a value of "2" for an identifier of "track_id" would imply track 2 of the asset.
490
+ */
491
+ value: string;
492
+ [k: string]: unknown;
493
+ }
494
+ /**
495
+ * A spatial range representing rectangle, circle, or a polygon.
496
+ */
497
+ export interface Shape {
498
+ /**
499
+ * The height of a rectnagle.
500
+ *
501
+ * This field can be ignored for circles and polygons.
502
+ */
503
+ height?: number | null;
504
+ /**
505
+ * If the range is inside the shape.
506
+ *
507
+ * The default value is true.
508
+ */
509
+ inside?: boolean | null;
510
+ /**
511
+ * THe origin of the coordinate in the shape.
512
+ */
513
+ origin: Coordinate;
514
+ /**
515
+ * The type of shape.
516
+ */
517
+ type: ShapeType;
518
+ /**
519
+ * The type of unit for the shape range.
520
+ */
521
+ unit: UnitType;
522
+ /**
523
+ * The vertices of the polygon.
524
+ *
525
+ * This field can be ignored for rectangles and circles.
526
+ */
527
+ vertices?: Coordinate[] | null;
528
+ /**
529
+ * The width for rectangles or diameter for circles.
530
+ *
531
+ * This field can be ignored for polygons.
532
+ */
533
+ width?: number | null;
534
+ [k: string]: unknown;
535
+ }
536
+ /**
537
+ * An x, y coordinate used for specifying vertices in polygons.
538
+ */
539
+ export interface Coordinate {
540
+ /**
541
+ * The coordinate along the x-axis.
542
+ */
543
+ x: number;
544
+ /**
545
+ * The coordinate along the y-axis.
546
+ */
547
+ y: number;
548
+ [k: string]: unknown;
549
+ }
550
+ /**
551
+ * A textual range representing multiple (possibly discontinuous) ranges of text.
552
+ */
553
+ export interface Text {
554
+ /**
555
+ * The ranges of text to select.
556
+ */
557
+ selectors: TextSelectorRange[];
558
+ [k: string]: unknown;
559
+ }
560
+ /**
561
+ * One or two [`TextSelector`][TextSelector] identifiying the range to select.
562
+ */
563
+ export interface TextSelectorRange {
564
+ /**
565
+ * The end of the text range.
566
+ */
567
+ end?: TextSelector | null;
568
+ /**
569
+ * The start (or entire) text range.
570
+ */
571
+ selector: TextSelector;
572
+ [k: string]: unknown;
573
+ }
574
+ /**
575
+ * Selects a range of text via a fragment identifier.
576
+ *
577
+ * This is modeled after the W3C Web Annotation selector model.
578
+ */
579
+ export interface TextSelector {
580
+ /**
581
+ * The end character offset or the end of the fragment if not present.
582
+ */
583
+ end?: number | null;
584
+ /**
585
+ * Fragment identifier as per RFC3023 (XML) or ISO 32000-2 (PDF), Annex O.
586
+ */
587
+ fragment: string;
588
+ /**
589
+ * The start character offset or the start of the fragment if not present.
590
+ */
591
+ start?: number | null;
592
+ [k: string]: unknown;
593
+ }
594
+ /**
595
+ * A temporal range representing a starting time to an ending time.
596
+ */
597
+ export interface Time {
598
+ /**
599
+ * The end time or the end of the asset if not present.
600
+ */
601
+ end?: string | null;
602
+ /**
603
+ * The start time or the start of the asset if not present.
604
+ */
605
+ start?: string | null;
606
+ /**
607
+ * The type of time.
608
+ */
609
+ type?: TimeType & string;
610
+ [k: string]: unknown;
611
+ }
612
+ /**
613
+ * A rating on an Assertion.
614
+ *
615
+ * See <https://c2pa.org/specifications/specifications/2.2/specs/C2PA_Specification.html#_review_ratings>.
616
+ */
617
+ export interface ReviewRating {
618
+ code?: string | null;
619
+ explanation: string;
620
+ value: number;
621
+ [k: string]: unknown;
622
+ }
623
+ /**
624
+ * Resource store to contain binary objects referenced from JSON serializable structures
625
+ */
626
+ export interface ResourceStore {
627
+ label?: string | null;
628
+ resources: {
629
+ [k: string]: number[];
630
+ };
631
+ [k: string]: unknown;
632
+ }
633
+ /**
634
+ * A map of validation results for a manifest store.
635
+ *
636
+ * The map contains the validation results for the active manifest and any ingredient deltas. It is normal for there to be many
637
+ */
638
+ export interface ValidationResults {
639
+ activeManifest?: StatusCodes | null;
640
+ ingredientDeltas?: IngredientDeltaValidationResult[] | null;
641
+ [k: string]: unknown;
642
+ }
643
+ /**
644
+ * Contains a set of success, informational, and failure validation status codes.
645
+ */
646
+ export interface StatusCodes {
647
+ failure: ValidationStatus[];
648
+ informational: ValidationStatus[];
649
+ success: ValidationStatus[];
650
+ [k: string]: unknown;
651
+ }
652
+ /**
653
+ * A `ValidationStatus` struct describes the validation status of a specific part of a manifest.
654
+ *
655
+ * See <https://c2pa.org/specifications/specifications/2.2/specs/C2PA_Specification.html#_existing_manifests>.
656
+ */
657
+ export interface ValidationStatus {
658
+ code: string;
659
+ explanation?: string | null;
660
+ success?: boolean | null;
661
+ url?: string | null;
662
+ [k: string]: unknown;
663
+ }
664
+ /**
665
+ * Represents any changes or deltas between the current and previous validation results for an ingredient's manifest.
666
+ */
667
+ export interface IngredientDeltaValidationResult {
668
+ /**
669
+ * JUMBF URI reference to the ingredient assertion
670
+ */
671
+ ingredientAssertionURI: string;
672
+ /**
673
+ * Validation results for the ingredient's active manifest
674
+ */
675
+ validationDeltas: StatusCodes;
676
+ [k: string]: unknown;
677
+ }
678
+ /**
679
+ * Holds information about a signature
680
+ */
681
+ export interface SignatureInfo {
682
+ /**
683
+ * Human-readable issuing authority for this signature.
684
+ */
685
+ alg?: SigningAlg | null;
686
+ /**
687
+ * The serial number of the certificate.
688
+ */
689
+ cert_serial_number?: string | null;
690
+ /**
691
+ * Human-readable for common name of this certificate.
692
+ */
693
+ common_name?: string | null;
694
+ /**
695
+ * Human-readable issuing authority for this signature.
696
+ */
697
+ issuer?: string | null;
698
+ /**
699
+ * Revocation status of the certificate.
700
+ */
701
+ revocation_status?: boolean | null;
702
+ /**
703
+ * The time the signature was created.
704
+ */
705
+ time?: string | null;
706
+ [k: string]: unknown;
707
+ }