@contentauth/c2pa-types 0.3.1 → 0.4.1
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/index.d.ts +2 -6
- package/package.json +2 -2
- package/types/Action.d.ts +551 -0
- package/types/Builder.d.ts +406 -324
- package/types/Ingredient.d.ts +293 -259
- package/types/ManifestDefinition.d.ts +353 -303
- package/types/ManifestStore.d.ts +369 -327
package/index.d.ts
CHANGED
|
@@ -30,16 +30,12 @@ export type {
|
|
|
30
30
|
ManifestAssertion,
|
|
31
31
|
ManifestAssertionKind,
|
|
32
32
|
Range,
|
|
33
|
-
RangeType,
|
|
34
33
|
Reader,
|
|
35
34
|
RegionOfInterest,
|
|
36
|
-
Relationship,
|
|
37
35
|
ResourceRef,
|
|
38
|
-
ResourceStore,
|
|
39
36
|
ReviewRating,
|
|
40
37
|
Role,
|
|
41
38
|
Shape,
|
|
42
|
-
ShapeType,
|
|
43
39
|
SignatureInfo,
|
|
44
40
|
SigningAlg,
|
|
45
41
|
StatusCodes,
|
|
@@ -47,8 +43,6 @@ export type {
|
|
|
47
43
|
TextSelector,
|
|
48
44
|
TextSelectorRange,
|
|
49
45
|
Time,
|
|
50
|
-
TimeType,
|
|
51
|
-
UnitType,
|
|
52
46
|
UriOrResource,
|
|
53
47
|
ValidationResults,
|
|
54
48
|
ValidationState,
|
|
@@ -65,3 +59,5 @@ export type {
|
|
|
65
59
|
BuilderIntent,
|
|
66
60
|
DigitalSourceType,
|
|
67
61
|
} from './types/Builder.js';
|
|
62
|
+
|
|
63
|
+
export type { Action } from './types/Action.js';
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@contentauth/c2pa-types",
|
|
3
3
|
"description": "Typescript types generated from c2pa-rs",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.4.1",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"rimraf": "^6.0.1"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
-
"test": "
|
|
16
|
+
"test": "tsc",
|
|
17
17
|
"build": "pnpm clean && json2ts -i schemas/ -o types/",
|
|
18
18
|
"clean": "rimraf types"
|
|
19
19
|
}
|
|
@@ -0,0 +1,551 @@
|
|
|
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
|
+
export type DateT = string;
|
|
9
|
+
/**
|
|
10
|
+
* We use this to allow SourceAgent to be either a string or a ClaimGeneratorInfo
|
|
11
|
+
*/
|
|
12
|
+
export type SoftwareAgent = string | ClaimGeneratorInfo;
|
|
13
|
+
export type UriOrResource = ResourceRef | HashedUri;
|
|
14
|
+
/**
|
|
15
|
+
* A role describing the region.
|
|
16
|
+
*/
|
|
17
|
+
export type Role =
|
|
18
|
+
| "c2pa.areaOfInterest"
|
|
19
|
+
| "c2pa.cropped"
|
|
20
|
+
| "c2pa.edited"
|
|
21
|
+
| "c2pa.placed"
|
|
22
|
+
| "c2pa.redacted"
|
|
23
|
+
| "c2pa.subjectArea"
|
|
24
|
+
| "c2pa.deleted"
|
|
25
|
+
| "c2pa.styled"
|
|
26
|
+
| "c2pa.watermarked";
|
|
27
|
+
/**
|
|
28
|
+
* Description of the source of an asset.
|
|
29
|
+
*
|
|
30
|
+
* The full list of possible digital source types are found below:
|
|
31
|
+
* <https://spec.c2pa.org/specifications/specifications/2.2/specs/C2PA_Specification.html#_digital_source_type>
|
|
32
|
+
* <https://cv.iptc.org/newscodes/digitalsourcetype>
|
|
33
|
+
*/
|
|
34
|
+
export type DigitalSourceType =
|
|
35
|
+
| "http://c2pa.org/digitalsourcetype/empty"
|
|
36
|
+
| "http://c2pa.org/digitalsourcetype/trainedAlgorithmicData"
|
|
37
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture"
|
|
38
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/computationalCapture"
|
|
39
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/negativeFilm"
|
|
40
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/positiveFilm"
|
|
41
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/print"
|
|
42
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/minorHumanEdits"
|
|
43
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/humanEdits"
|
|
44
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/compositeWithTrainedAlgorithmicMedia"
|
|
45
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/algorithmicallyEnhanced"
|
|
46
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/softwareImage"
|
|
47
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/digitalArt"
|
|
48
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/digitalCreation"
|
|
49
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/dataDrivenMedia"
|
|
50
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/trainedAlgorithmicMedia"
|
|
51
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/algorithmicMedia"
|
|
52
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/screenCapture"
|
|
53
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/virtualRecording"
|
|
54
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/composite"
|
|
55
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/compositeCapture"
|
|
56
|
+
| "http://cv.iptc.org/newscodes/digitalsourcetype/compositeSynthetic"
|
|
57
|
+
| string;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Defines a single action taken on an asset.
|
|
61
|
+
*
|
|
62
|
+
* An [`Action`] describes what took place on the asset, when it took place,
|
|
63
|
+
* along with possible other information such as what software performed
|
|
64
|
+
* the action.
|
|
65
|
+
*
|
|
66
|
+
* See <https://c2pa.org/specifications/specifications/2.2/specs/C2PA_Specification.html#_actions>.
|
|
67
|
+
*/
|
|
68
|
+
export interface Action {
|
|
69
|
+
/**
|
|
70
|
+
* The label associated with this action. See ([`c2pa_action`]).
|
|
71
|
+
*/
|
|
72
|
+
action: string;
|
|
73
|
+
/**
|
|
74
|
+
* Timestamp of when the action occurred.
|
|
75
|
+
*/
|
|
76
|
+
when?: DateT | null;
|
|
77
|
+
/**
|
|
78
|
+
* The software agent that performed the action.
|
|
79
|
+
*/
|
|
80
|
+
softwareAgent?: SoftwareAgent | null;
|
|
81
|
+
/**
|
|
82
|
+
* 0-based index into the softwareAgents array
|
|
83
|
+
*/
|
|
84
|
+
softwareAgentIndex?: number | null;
|
|
85
|
+
/**
|
|
86
|
+
* A semicolon-delimited list of the parts of the resource that were changed since the previous event history.
|
|
87
|
+
*/
|
|
88
|
+
changed?: string | null;
|
|
89
|
+
/**
|
|
90
|
+
* A list of the regions of interest of the resource that were changed.
|
|
91
|
+
*
|
|
92
|
+
* If not present, presumed to be undefined.
|
|
93
|
+
* When tracking changes and the scope of the changed components is unknown,
|
|
94
|
+
* it should be assumed that anything might have changed.
|
|
95
|
+
*/
|
|
96
|
+
changes?: RegionOfInterest[] | null;
|
|
97
|
+
/**
|
|
98
|
+
* @deprecated
|
|
99
|
+
* This is NOT the instanceID in the spec
|
|
100
|
+
* It is now deprecated but was previously used to map the action to an ingredient
|
|
101
|
+
*/
|
|
102
|
+
instance_id?: string | null;
|
|
103
|
+
/**
|
|
104
|
+
* Additional parameters of the action. These vary by the type of action.
|
|
105
|
+
*/
|
|
106
|
+
parameters?: ActionParameters | null;
|
|
107
|
+
/**
|
|
108
|
+
* An array of the creators that undertook this action.
|
|
109
|
+
*/
|
|
110
|
+
actors?: Actor[] | null;
|
|
111
|
+
/**
|
|
112
|
+
* One of the defined URI values at `<https://cv.iptc.org/newscodes/digitalsourcetype/>`
|
|
113
|
+
*/
|
|
114
|
+
digitalSourceType?: DigitalSourceType | null;
|
|
115
|
+
/**
|
|
116
|
+
* List of related actions.
|
|
117
|
+
*/
|
|
118
|
+
related?: Action[] | null;
|
|
119
|
+
reason?: string | null;
|
|
120
|
+
description?: string | null;
|
|
121
|
+
[k: string]: unknown;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Description of the claim generator, or the software used in generating the claim.
|
|
125
|
+
*
|
|
126
|
+
* This structure is also used for actions softwareAgent
|
|
127
|
+
*/
|
|
128
|
+
export interface ClaimGeneratorInfo {
|
|
129
|
+
/**
|
|
130
|
+
* A human readable string naming the claim_generator
|
|
131
|
+
*/
|
|
132
|
+
name: string;
|
|
133
|
+
/**
|
|
134
|
+
* A human readable string of the product's version
|
|
135
|
+
*/
|
|
136
|
+
version?: string | null;
|
|
137
|
+
/**
|
|
138
|
+
* hashed URI to the icon (either embedded or remote)
|
|
139
|
+
*/
|
|
140
|
+
icon?: UriOrResource | null;
|
|
141
|
+
/**
|
|
142
|
+
* A human readable string of the OS the claim generator is running on
|
|
143
|
+
*/
|
|
144
|
+
operating_system?: string | null;
|
|
145
|
+
[k: string]: unknown;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* A reference to a resource to be used in JSON serialization.
|
|
149
|
+
*
|
|
150
|
+
* The underlying data can be read as a stream via [`Reader::resource_to_stream`][crate::Reader::resource_to_stream].
|
|
151
|
+
*/
|
|
152
|
+
export interface ResourceRef {
|
|
153
|
+
/**
|
|
154
|
+
* The mime type of the referenced resource.
|
|
155
|
+
*/
|
|
156
|
+
format: string;
|
|
157
|
+
/**
|
|
158
|
+
* A URI that identifies the resource as referenced from the manifest.
|
|
159
|
+
*
|
|
160
|
+
* This may be a JUMBF URI, a file path, a URL or any other string.
|
|
161
|
+
* Relative JUMBF URIs will be resolved with the manifest label.
|
|
162
|
+
* Relative file paths will be resolved with the base path if provided.
|
|
163
|
+
*/
|
|
164
|
+
identifier: string;
|
|
165
|
+
/**
|
|
166
|
+
* More detailed data types as defined in the C2PA spec.
|
|
167
|
+
*/
|
|
168
|
+
data_types?: AssetType[] | null;
|
|
169
|
+
/**
|
|
170
|
+
* The algorithm used to hash the resource (if applicable).
|
|
171
|
+
*/
|
|
172
|
+
alg?: string | null;
|
|
173
|
+
/**
|
|
174
|
+
* The hash of the resource (if applicable).
|
|
175
|
+
*/
|
|
176
|
+
hash?: string | null;
|
|
177
|
+
[k: string]: unknown;
|
|
178
|
+
}
|
|
179
|
+
export interface AssetType {
|
|
180
|
+
type: string;
|
|
181
|
+
version?: string | null;
|
|
182
|
+
[k: string]: unknown;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* A `HashedUri` provides a reference to content available within the same
|
|
186
|
+
* manifest store.
|
|
187
|
+
*
|
|
188
|
+
* This is described in [§8.3, URI References], of the C2PA Technical
|
|
189
|
+
* Specification.
|
|
190
|
+
*
|
|
191
|
+
* [§8.3, URI References]: https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_uri_references
|
|
192
|
+
*/
|
|
193
|
+
export interface HashedUri {
|
|
194
|
+
/**
|
|
195
|
+
* JUMBF URI reference
|
|
196
|
+
*/
|
|
197
|
+
url: string;
|
|
198
|
+
/**
|
|
199
|
+
* A string identifying the cryptographic hash algorithm used to compute
|
|
200
|
+
* the hash
|
|
201
|
+
*/
|
|
202
|
+
alg?: string | null;
|
|
203
|
+
/**
|
|
204
|
+
* Byte string containing the hash value
|
|
205
|
+
*/
|
|
206
|
+
hash: number[];
|
|
207
|
+
[k: string]: unknown;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* A region of interest within an asset describing the change.
|
|
211
|
+
*
|
|
212
|
+
* This struct can be used from [`Action::changes`][crate::assertions::Action::changes],
|
|
213
|
+
* [`AssertionMetadata::region_of_interest`][crate::assertions::AssertionMetadata::region_of_interest], or
|
|
214
|
+
* [`SoftBindingScope::region`][crate::assertions::soft_binding::SoftBindingScope::region].
|
|
215
|
+
*/
|
|
216
|
+
export interface RegionOfInterest {
|
|
217
|
+
/**
|
|
218
|
+
* A range describing the region of interest for the specific asset.
|
|
219
|
+
*/
|
|
220
|
+
region: Range[];
|
|
221
|
+
/**
|
|
222
|
+
* A free-text string representing a human-readable name for the region which might be used in a user interface.
|
|
223
|
+
*/
|
|
224
|
+
name?: string | null;
|
|
225
|
+
/**
|
|
226
|
+
* A free-text string representing a machine-readable, unique to this assertion, identifier for the region.
|
|
227
|
+
*/
|
|
228
|
+
identifier?: string | null;
|
|
229
|
+
/**
|
|
230
|
+
* A value from a controlled vocabulary such as <https://cv.iptc.org/newscodes/imageregiontype/> or an entity-specific
|
|
231
|
+
* value (e.g., com.litware.newType) that represents the type of thing(s) depicted by a region.
|
|
232
|
+
*
|
|
233
|
+
* Note this field serializes/deserializes into the name `type`.
|
|
234
|
+
*/
|
|
235
|
+
type?: string | null;
|
|
236
|
+
/**
|
|
237
|
+
* A value from our controlled vocabulary or an entity-specific value (e.g., com.litware.coolArea) that represents
|
|
238
|
+
* the role of a region among other regions.
|
|
239
|
+
*/
|
|
240
|
+
role?: Role | null;
|
|
241
|
+
/**
|
|
242
|
+
* A free-text string.
|
|
243
|
+
*/
|
|
244
|
+
description?: string | null;
|
|
245
|
+
/**
|
|
246
|
+
* Additional information about the asset.
|
|
247
|
+
*/
|
|
248
|
+
metadata?: AssertionMetadata | null;
|
|
249
|
+
[k: string]: unknown;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* A spatial, temporal, frame, or textual range describing the region of interest.
|
|
253
|
+
*/
|
|
254
|
+
export interface Range {
|
|
255
|
+
/**
|
|
256
|
+
* The type of range of interest.
|
|
257
|
+
*/
|
|
258
|
+
type: "spatial" | "temporal" | "frame" | "textual" | "identified";
|
|
259
|
+
/**
|
|
260
|
+
* A spatial range.
|
|
261
|
+
*/
|
|
262
|
+
shape?: Shape | null;
|
|
263
|
+
/**
|
|
264
|
+
* A temporal range.
|
|
265
|
+
*/
|
|
266
|
+
time?: Time | null;
|
|
267
|
+
/**
|
|
268
|
+
* A frame range.
|
|
269
|
+
*/
|
|
270
|
+
frame?: Frame | null;
|
|
271
|
+
/**
|
|
272
|
+
* A textual range.
|
|
273
|
+
*/
|
|
274
|
+
text?: Text | null;
|
|
275
|
+
/**
|
|
276
|
+
* A item identifier.
|
|
277
|
+
*/
|
|
278
|
+
item?: Item | null;
|
|
279
|
+
[k: string]: unknown;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* A spatial range representing rectangle, circle, or a polygon.
|
|
283
|
+
*/
|
|
284
|
+
export interface Shape {
|
|
285
|
+
/**
|
|
286
|
+
* The type of shape.
|
|
287
|
+
*/
|
|
288
|
+
type: "rectangle" | "circle" | "polygon";
|
|
289
|
+
/**
|
|
290
|
+
* The type of unit for the shape range.
|
|
291
|
+
*/
|
|
292
|
+
unit: "pixel" | "percent";
|
|
293
|
+
origin: Coordinate;
|
|
294
|
+
/**
|
|
295
|
+
* The width for rectangles or diameter for circles.
|
|
296
|
+
*
|
|
297
|
+
* This field can be ignored for polygons.
|
|
298
|
+
*/
|
|
299
|
+
width?: number | null;
|
|
300
|
+
/**
|
|
301
|
+
* The height of a rectnagle.
|
|
302
|
+
*
|
|
303
|
+
* This field can be ignored for circles and polygons.
|
|
304
|
+
*/
|
|
305
|
+
height?: number | null;
|
|
306
|
+
/**
|
|
307
|
+
* If the range is inside the shape.
|
|
308
|
+
*
|
|
309
|
+
* The default value is true.
|
|
310
|
+
*/
|
|
311
|
+
inside?: boolean | null;
|
|
312
|
+
/**
|
|
313
|
+
* The vertices of the polygon.
|
|
314
|
+
*
|
|
315
|
+
* This field can be ignored for rectangles and circles.
|
|
316
|
+
*/
|
|
317
|
+
vertices?: Coordinate1[] | null;
|
|
318
|
+
[k: string]: unknown;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* THe origin of the coordinate in the shape.
|
|
322
|
+
*/
|
|
323
|
+
export interface Coordinate {
|
|
324
|
+
/**
|
|
325
|
+
* The coordinate along the x-axis.
|
|
326
|
+
*/
|
|
327
|
+
x: number;
|
|
328
|
+
/**
|
|
329
|
+
* The coordinate along the y-axis.
|
|
330
|
+
*/
|
|
331
|
+
y: number;
|
|
332
|
+
[k: string]: unknown;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* An x, y coordinate used for specifying vertices in polygons.
|
|
336
|
+
*/
|
|
337
|
+
export interface Coordinate1 {
|
|
338
|
+
/**
|
|
339
|
+
* The coordinate along the x-axis.
|
|
340
|
+
*/
|
|
341
|
+
x: number;
|
|
342
|
+
/**
|
|
343
|
+
* The coordinate along the y-axis.
|
|
344
|
+
*/
|
|
345
|
+
y: number;
|
|
346
|
+
[k: string]: unknown;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* A temporal range representing a starting time to an ending time.
|
|
350
|
+
*/
|
|
351
|
+
export interface Time {
|
|
352
|
+
/**
|
|
353
|
+
* The type of time.
|
|
354
|
+
*/
|
|
355
|
+
type?: "npt";
|
|
356
|
+
/**
|
|
357
|
+
* The start time or the start of the asset if not present.
|
|
358
|
+
*/
|
|
359
|
+
start?: string | null;
|
|
360
|
+
/**
|
|
361
|
+
* The end time or the end of the asset if not present.
|
|
362
|
+
*/
|
|
363
|
+
end?: string | null;
|
|
364
|
+
[k: string]: unknown;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* A frame range representing starting and ending frames or pages.
|
|
368
|
+
*
|
|
369
|
+
* If both `start` and `end` are missing, the frame will span the entire asset.
|
|
370
|
+
*/
|
|
371
|
+
export interface Frame {
|
|
372
|
+
/**
|
|
373
|
+
* The start of the frame or the end of the asset if not present.
|
|
374
|
+
*
|
|
375
|
+
* The first frame/page starts at 0.
|
|
376
|
+
*/
|
|
377
|
+
start?: number | null;
|
|
378
|
+
/**
|
|
379
|
+
* The end of the frame inclusive or the end of the asset if not present.
|
|
380
|
+
*/
|
|
381
|
+
end?: number | null;
|
|
382
|
+
[k: string]: unknown;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* A textual range representing multiple (possibly discontinuous) ranges of text.
|
|
386
|
+
*/
|
|
387
|
+
export interface Text {
|
|
388
|
+
/**
|
|
389
|
+
* The ranges of text to select.
|
|
390
|
+
*/
|
|
391
|
+
selectors: TextSelectorRange[];
|
|
392
|
+
[k: string]: unknown;
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* One or two [`TextSelector`][TextSelector] identifiying the range to select.
|
|
396
|
+
*/
|
|
397
|
+
export interface TextSelectorRange {
|
|
398
|
+
selector: TextSelector;
|
|
399
|
+
/**
|
|
400
|
+
* The end of the text range.
|
|
401
|
+
*/
|
|
402
|
+
end?: TextSelector1 | null;
|
|
403
|
+
[k: string]: unknown;
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* The start (or entire) text range.
|
|
407
|
+
*/
|
|
408
|
+
export interface TextSelector {
|
|
409
|
+
/**
|
|
410
|
+
* Fragment identifier as per RFC3023 (XML) or ISO 32000-2 (PDF), Annex O.
|
|
411
|
+
*/
|
|
412
|
+
fragment: string;
|
|
413
|
+
/**
|
|
414
|
+
* The start character offset or the start of the fragment if not present.
|
|
415
|
+
*/
|
|
416
|
+
start?: number | null;
|
|
417
|
+
/**
|
|
418
|
+
* The end character offset or the end of the fragment if not present.
|
|
419
|
+
*/
|
|
420
|
+
end?: number | null;
|
|
421
|
+
[k: string]: unknown;
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Selects a range of text via a fragment identifier.
|
|
425
|
+
*
|
|
426
|
+
* This is modeled after the W3C Web Annotation selector model.
|
|
427
|
+
*/
|
|
428
|
+
export interface TextSelector1 {
|
|
429
|
+
/**
|
|
430
|
+
* Fragment identifier as per RFC3023 (XML) or ISO 32000-2 (PDF), Annex O.
|
|
431
|
+
*/
|
|
432
|
+
fragment: string;
|
|
433
|
+
/**
|
|
434
|
+
* The start character offset or the start of the fragment if not present.
|
|
435
|
+
*/
|
|
436
|
+
start?: number | null;
|
|
437
|
+
/**
|
|
438
|
+
* The end character offset or the end of the fragment if not present.
|
|
439
|
+
*/
|
|
440
|
+
end?: number | null;
|
|
441
|
+
[k: string]: unknown;
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Description of the boundaries of an identified range.
|
|
445
|
+
*/
|
|
446
|
+
export interface Item {
|
|
447
|
+
/**
|
|
448
|
+
* The container-specific term used to identify items, such as "track_id" for MP4 or "item_ID" for HEIF.
|
|
449
|
+
*/
|
|
450
|
+
identifier: string;
|
|
451
|
+
/**
|
|
452
|
+
* The value of the identifier, e.g. a value of "2" for an identifier of "track_id" would imply track 2 of the asset.
|
|
453
|
+
*/
|
|
454
|
+
value: string;
|
|
455
|
+
[k: string]: unknown;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* The AssertionMetadata structure can be used as part of other assertions or on its own to reference others
|
|
459
|
+
*/
|
|
460
|
+
export interface AssertionMetadata {
|
|
461
|
+
reviewRatings?: ReviewRating[] | null;
|
|
462
|
+
dateTime?: DateT | null;
|
|
463
|
+
reference?: HashedUri | null;
|
|
464
|
+
dataSource?: DataSource | null;
|
|
465
|
+
localizations?:
|
|
466
|
+
| {
|
|
467
|
+
[k: string]: {
|
|
468
|
+
[k: string]: string;
|
|
469
|
+
};
|
|
470
|
+
}[]
|
|
471
|
+
| null;
|
|
472
|
+
regionOfInterest?: RegionOfInterest | null;
|
|
473
|
+
[k: string]: unknown;
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* A rating on an Assertion.
|
|
477
|
+
*
|
|
478
|
+
* See <https://c2pa.org/specifications/specifications/2.2/specs/C2PA_Specification.html#_review_ratings>.
|
|
479
|
+
*/
|
|
480
|
+
export interface ReviewRating {
|
|
481
|
+
explanation: string;
|
|
482
|
+
code?: string | null;
|
|
483
|
+
value: number;
|
|
484
|
+
[k: string]: unknown;
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* A description of the source for assertion data
|
|
488
|
+
*/
|
|
489
|
+
export interface DataSource {
|
|
490
|
+
/**
|
|
491
|
+
* A value from among the enumerated list indicating the source of the assertion.
|
|
492
|
+
*/
|
|
493
|
+
type: string;
|
|
494
|
+
/**
|
|
495
|
+
* A human-readable string giving details about the source of the assertion data.
|
|
496
|
+
*/
|
|
497
|
+
details?: string | null;
|
|
498
|
+
/**
|
|
499
|
+
* A list of [`Actor`]s associated with this source.
|
|
500
|
+
*/
|
|
501
|
+
actors?: Actor[] | null;
|
|
502
|
+
[k: string]: unknown;
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Identifies a person responsible for an action.
|
|
506
|
+
*/
|
|
507
|
+
export interface Actor {
|
|
508
|
+
/**
|
|
509
|
+
* An identifier for a human actor, used when the "type" is `humanEntry.identified`.
|
|
510
|
+
*/
|
|
511
|
+
identifier?: string | null;
|
|
512
|
+
/**
|
|
513
|
+
* List of references to W3C Verifiable Credentials.
|
|
514
|
+
*/
|
|
515
|
+
credentials?: HashedUri[] | null;
|
|
516
|
+
[k: string]: unknown;
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Additional parameters of the action.
|
|
520
|
+
*/
|
|
521
|
+
export interface ActionParameters {
|
|
522
|
+
/**
|
|
523
|
+
* A hashed-uri to the ingredient assertion that this action acts on.
|
|
524
|
+
*/
|
|
525
|
+
ingredient?: HashedUri | null;
|
|
526
|
+
/**
|
|
527
|
+
* Additional description of the action.
|
|
528
|
+
*/
|
|
529
|
+
description?: string | null;
|
|
530
|
+
/**
|
|
531
|
+
* A JUMBF URI to the redacted assertion, required when the action is `c2pa.redacted`.
|
|
532
|
+
*/
|
|
533
|
+
redacted?: string | null;
|
|
534
|
+
/**
|
|
535
|
+
* A list of hashed JUMBF URI(s) to the ingredient (v2 or v3) assertion(s) that this action acts on.
|
|
536
|
+
*/
|
|
537
|
+
ingredients?: HashedUri[] | null;
|
|
538
|
+
/**
|
|
539
|
+
* BCP-47 code of the source language of a `c2pa.translated` action.
|
|
540
|
+
*/
|
|
541
|
+
sourceLanguage?: string | null;
|
|
542
|
+
/**
|
|
543
|
+
* BCP-47 code of the target language of a `c2pa.translated` action.
|
|
544
|
+
*/
|
|
545
|
+
targetLanguage?: string | null;
|
|
546
|
+
/**
|
|
547
|
+
* Was this action performed multiple times.
|
|
548
|
+
*/
|
|
549
|
+
multipleInstances?: boolean | null;
|
|
550
|
+
[k: string]: unknown;
|
|
551
|
+
}
|