@contentauth/c2pa-types 0.3.0 → 0.4.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/index.d.ts +54 -4
- package/package.json +1 -1
- 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/types/Ingredient.d.ts
CHANGED
|
@@ -6,22 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
export type DateT = string;
|
|
9
|
-
/**
|
|
10
|
-
* The type of shape for the range.
|
|
11
|
-
*/
|
|
12
|
-
export type ShapeType = "rectangle" | "circle" | "polygon";
|
|
13
|
-
/**
|
|
14
|
-
* The type of unit for the range.
|
|
15
|
-
*/
|
|
16
|
-
export type UnitType = "pixel" | "percent";
|
|
17
|
-
/**
|
|
18
|
-
* The type of time.
|
|
19
|
-
*/
|
|
20
|
-
export type TimeType = "npt";
|
|
21
|
-
/**
|
|
22
|
-
* The type of range for the region of interest.
|
|
23
|
-
*/
|
|
24
|
-
export type RangeType = "spatial" | "temporal" | "frame" | "textual" | "identified";
|
|
25
9
|
/**
|
|
26
10
|
* A role describing the region.
|
|
27
11
|
*/
|
|
@@ -35,101 +19,98 @@ export type Role =
|
|
|
35
19
|
| "c2pa.deleted"
|
|
36
20
|
| "c2pa.styled"
|
|
37
21
|
| "c2pa.watermarked";
|
|
38
|
-
/**
|
|
39
|
-
* The relationship of the ingredient to the current asset.
|
|
40
|
-
*/
|
|
41
|
-
export type Relationship = "parentOf" | "componentOf" | "inputTo";
|
|
42
22
|
|
|
43
23
|
/**
|
|
44
24
|
* An `Ingredient` is any external asset that has been used in the creation of an asset.
|
|
45
25
|
*/
|
|
46
26
|
export interface Ingredient {
|
|
47
27
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* If this ingredient has a [`ManifestStore`], this will hold the label of the active [`Manifest`].
|
|
51
|
-
*
|
|
52
|
-
* [`Manifest`]: crate::Manifest [`ManifestStore`]: crate::ManifestStore
|
|
28
|
+
* A human-readable title, generally source filename.
|
|
53
29
|
*/
|
|
54
|
-
|
|
30
|
+
title?: string | null;
|
|
55
31
|
/**
|
|
56
|
-
*
|
|
32
|
+
* The format of the source file as a MIME type.
|
|
57
33
|
*/
|
|
58
|
-
|
|
34
|
+
format?: string | null;
|
|
59
35
|
/**
|
|
60
|
-
*
|
|
36
|
+
* Document ID from `xmpMM:DocumentID` in XMP metadata.
|
|
61
37
|
*/
|
|
62
|
-
|
|
38
|
+
document_id?: string | null;
|
|
63
39
|
/**
|
|
64
|
-
*
|
|
40
|
+
* Instance ID from `xmpMM:InstanceID` in XMP metadata.
|
|
65
41
|
*/
|
|
66
|
-
|
|
42
|
+
instance_id?: string | null;
|
|
67
43
|
/**
|
|
68
|
-
*
|
|
44
|
+
* URI from `dcterms:provenance` in XMP metadata.
|
|
69
45
|
*/
|
|
70
|
-
|
|
46
|
+
provenance?: string | null;
|
|
71
47
|
/**
|
|
72
|
-
*
|
|
48
|
+
* A thumbnail image capturing the visual state at the time of import.
|
|
49
|
+
*
|
|
50
|
+
* A tuple of thumbnail MIME format (for example `image/jpeg`) and binary bits of the image.
|
|
73
51
|
*/
|
|
74
|
-
|
|
52
|
+
thumbnail?: ResourceRef | null;
|
|
75
53
|
/**
|
|
76
54
|
* An optional hash of the asset to prevent duplicates.
|
|
77
55
|
*/
|
|
78
56
|
hash?: string | null;
|
|
79
57
|
/**
|
|
80
|
-
*
|
|
58
|
+
* Set to `ParentOf` if this is the parent ingredient.
|
|
59
|
+
*
|
|
60
|
+
* There can only be one parent ingredient in the ingredients.
|
|
81
61
|
*/
|
|
82
|
-
|
|
62
|
+
relationship?: "parentOf" | "componentOf" | "inputTo";
|
|
83
63
|
/**
|
|
84
|
-
*
|
|
64
|
+
* The active manifest label (if one exists).
|
|
65
|
+
*
|
|
66
|
+
* If this ingredient has a [`ManifestStore`],
|
|
67
|
+
* this will hold the label of the active [`Manifest`].
|
|
68
|
+
*
|
|
69
|
+
* [`Manifest`]: crate::Manifest
|
|
70
|
+
* [`ManifestStore`]: crate::ManifestStore
|
|
85
71
|
*/
|
|
86
|
-
|
|
72
|
+
active_manifest?: string | null;
|
|
87
73
|
/**
|
|
88
|
-
*
|
|
74
|
+
* Validation status (Ingredient v1 & v2)
|
|
89
75
|
*/
|
|
90
|
-
|
|
76
|
+
validation_status?: ValidationStatus[] | null;
|
|
91
77
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* [`ManifestStore`]: crate::ManifestStore
|
|
78
|
+
* Validation results (Ingredient.V3)
|
|
95
79
|
*/
|
|
96
|
-
|
|
80
|
+
validation_results?: ValidationResults | null;
|
|
97
81
|
/**
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* [`Metadata`]: crate::Metadata
|
|
82
|
+
* A reference to the actual data of the ingredient.
|
|
101
83
|
*/
|
|
102
|
-
|
|
103
|
-
ocsp_responses?: ResourceRef[] | null;
|
|
84
|
+
data?: ResourceRef | null;
|
|
104
85
|
/**
|
|
105
|
-
*
|
|
86
|
+
* Additional description of the ingredient.
|
|
106
87
|
*/
|
|
107
|
-
|
|
88
|
+
description?: string | null;
|
|
108
89
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* There can only be one parent ingredient in the ingredients.
|
|
90
|
+
* URI to an informational page about the ingredient or its data.
|
|
112
91
|
*/
|
|
113
|
-
|
|
114
|
-
resources?: ResourceStore;
|
|
92
|
+
informational_URI?: string | null;
|
|
115
93
|
/**
|
|
116
|
-
*
|
|
94
|
+
* Any additional [`Metadata`] as defined in the C2PA spec.
|
|
117
95
|
*
|
|
118
|
-
*
|
|
96
|
+
* [`Metadata`]: crate::Metadata
|
|
119
97
|
*/
|
|
120
|
-
|
|
98
|
+
metadata?: AssertionMetadata | null;
|
|
121
99
|
/**
|
|
122
|
-
*
|
|
100
|
+
* Additional information about the data's type to the ingredient V2 structure.
|
|
123
101
|
*/
|
|
124
|
-
|
|
102
|
+
data_types?: AssetType[] | null;
|
|
125
103
|
/**
|
|
126
|
-
*
|
|
104
|
+
* A [`ManifestStore`] from the source asset extracted as a binary C2PA blob.
|
|
105
|
+
*
|
|
106
|
+
* [`ManifestStore`]: crate::ManifestStore
|
|
127
107
|
*/
|
|
128
|
-
|
|
108
|
+
manifest_data?: ResourceRef | null;
|
|
129
109
|
/**
|
|
130
|
-
*
|
|
110
|
+
* The ingredient's label as assigned in the manifest.
|
|
131
111
|
*/
|
|
132
|
-
|
|
112
|
+
label?: string | null;
|
|
113
|
+
ocsp_responses?: ResourceRef[] | null;
|
|
133
114
|
[k: string]: unknown;
|
|
134
115
|
}
|
|
135
116
|
/**
|
|
@@ -139,27 +120,29 @@ export interface Ingredient {
|
|
|
139
120
|
*/
|
|
140
121
|
export interface ResourceRef {
|
|
141
122
|
/**
|
|
142
|
-
* The
|
|
123
|
+
* The mime type of the referenced resource.
|
|
143
124
|
*/
|
|
144
|
-
|
|
125
|
+
format: string;
|
|
126
|
+
/**
|
|
127
|
+
* A URI that identifies the resource as referenced from the manifest.
|
|
128
|
+
*
|
|
129
|
+
* This may be a JUMBF URI, a file path, a URL or any other string.
|
|
130
|
+
* Relative JUMBF URIs will be resolved with the manifest label.
|
|
131
|
+
* Relative file paths will be resolved with the base path if provided.
|
|
132
|
+
*/
|
|
133
|
+
identifier: string;
|
|
145
134
|
/**
|
|
146
135
|
* More detailed data types as defined in the C2PA spec.
|
|
147
136
|
*/
|
|
148
137
|
data_types?: AssetType[] | null;
|
|
149
138
|
/**
|
|
150
|
-
* The
|
|
139
|
+
* The algorithm used to hash the resource (if applicable).
|
|
151
140
|
*/
|
|
152
|
-
|
|
141
|
+
alg?: string | null;
|
|
153
142
|
/**
|
|
154
143
|
* The hash of the resource (if applicable).
|
|
155
144
|
*/
|
|
156
145
|
hash?: string | null;
|
|
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. Relative JUMBF URIs will be resolved with the manifest label. Relative file paths will be resolved with the base path if provided.
|
|
161
|
-
*/
|
|
162
|
-
identifier: string;
|
|
163
146
|
[k: string]: unknown;
|
|
164
147
|
}
|
|
165
148
|
export interface AssetType {
|
|
@@ -167,12 +150,87 @@ export interface AssetType {
|
|
|
167
150
|
version?: string | null;
|
|
168
151
|
[k: string]: unknown;
|
|
169
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* A `ValidationStatus` struct describes the validation status of a
|
|
155
|
+
* specific part of a manifest.
|
|
156
|
+
*
|
|
157
|
+
* See <https://c2pa.org/specifications/specifications/2.2/specs/C2PA_Specification.html#_existing_manifests>.
|
|
158
|
+
*/
|
|
159
|
+
export interface ValidationStatus {
|
|
160
|
+
code: string;
|
|
161
|
+
url?: string | null;
|
|
162
|
+
explanation?: string | null;
|
|
163
|
+
success?: boolean | null;
|
|
164
|
+
[k: string]: unknown;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* A map of validation results for a manifest store.
|
|
168
|
+
*
|
|
169
|
+
* The map contains the validation results for the active manifest and any ingredient deltas.
|
|
170
|
+
* It is normal for there to be many
|
|
171
|
+
*/
|
|
172
|
+
export interface ValidationResults {
|
|
173
|
+
/**
|
|
174
|
+
* Validation status codes for the ingredient's active manifest. Present if ingredient is a C2PA
|
|
175
|
+
* asset. Not present if the ingredient is not a C2PA asset.
|
|
176
|
+
*/
|
|
177
|
+
activeManifest?: StatusCodes | null;
|
|
178
|
+
/**
|
|
179
|
+
* List of any changes/deltas between the current and previous validation results for each ingredient's
|
|
180
|
+
* manifest. Present if the the ingredient is a C2PA asset.
|
|
181
|
+
*/
|
|
182
|
+
ingredientDeltas?: IngredientDeltaValidationResult[] | null;
|
|
183
|
+
[k: string]: unknown;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Contains a set of success, informational, and failure validation status codes.
|
|
187
|
+
*/
|
|
188
|
+
export interface StatusCodes {
|
|
189
|
+
/**
|
|
190
|
+
* An array of validation success codes. May be empty.
|
|
191
|
+
*/
|
|
192
|
+
success: ValidationStatus[];
|
|
193
|
+
/**
|
|
194
|
+
* An array of validation informational codes. May be empty.
|
|
195
|
+
*/
|
|
196
|
+
informational: ValidationStatus[];
|
|
197
|
+
failure: ValidationStatus[];
|
|
198
|
+
[k: string]: unknown;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Represents any changes or deltas between the current and previous validation results for an ingredient's manifest.
|
|
202
|
+
*/
|
|
203
|
+
export interface IngredientDeltaValidationResult {
|
|
204
|
+
/**
|
|
205
|
+
* JUMBF URI reference to the ingredient assertion
|
|
206
|
+
*/
|
|
207
|
+
ingredientAssertionURI: string;
|
|
208
|
+
validationDeltas: StatusCodes1;
|
|
209
|
+
[k: string]: unknown;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Contains a set of success, informational, and failure validation status codes.
|
|
213
|
+
*/
|
|
214
|
+
export interface StatusCodes1 {
|
|
215
|
+
/**
|
|
216
|
+
* An array of validation success codes. May be empty.
|
|
217
|
+
*/
|
|
218
|
+
success: ValidationStatus[];
|
|
219
|
+
/**
|
|
220
|
+
* An array of validation informational codes. May be empty.
|
|
221
|
+
*/
|
|
222
|
+
informational: ValidationStatus[];
|
|
223
|
+
failure: ValidationStatus[];
|
|
224
|
+
[k: string]: unknown;
|
|
225
|
+
}
|
|
170
226
|
/**
|
|
171
227
|
* The AssertionMetadata structure can be used as part of other assertions or on its own to reference others
|
|
172
228
|
*/
|
|
173
229
|
export interface AssertionMetadata {
|
|
174
|
-
|
|
230
|
+
reviewRatings?: ReviewRating[] | null;
|
|
175
231
|
dateTime?: DateT | null;
|
|
232
|
+
reference?: HashedUri | null;
|
|
233
|
+
dataSource?: DataSource | null;
|
|
176
234
|
localizations?:
|
|
177
235
|
| {
|
|
178
236
|
[k: string]: {
|
|
@@ -180,101 +238,117 @@ export interface AssertionMetadata {
|
|
|
180
238
|
};
|
|
181
239
|
}[]
|
|
182
240
|
| null;
|
|
183
|
-
reference?: HashedUri | null;
|
|
184
241
|
regionOfInterest?: RegionOfInterest | null;
|
|
185
|
-
reviewRatings?: ReviewRating[] | null;
|
|
186
242
|
[k: string]: unknown;
|
|
187
243
|
}
|
|
188
244
|
/**
|
|
189
|
-
* A
|
|
245
|
+
* A rating on an Assertion.
|
|
246
|
+
*
|
|
247
|
+
* See <https://c2pa.org/specifications/specifications/2.2/specs/C2PA_Specification.html#_review_ratings>.
|
|
190
248
|
*/
|
|
191
|
-
export interface
|
|
249
|
+
export interface ReviewRating {
|
|
250
|
+
explanation: string;
|
|
251
|
+
code?: string | null;
|
|
252
|
+
value: number;
|
|
253
|
+
[k: string]: unknown;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* A `HashedUri` provides a reference to content available within the same
|
|
257
|
+
* manifest store.
|
|
258
|
+
*
|
|
259
|
+
* This is described in [§8.3, URI References], of the C2PA Technical
|
|
260
|
+
* Specification.
|
|
261
|
+
*
|
|
262
|
+
* [§8.3, URI References]: https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_uri_references
|
|
263
|
+
*/
|
|
264
|
+
export interface HashedUri {
|
|
192
265
|
/**
|
|
193
|
-
*
|
|
266
|
+
* JUMBF URI reference
|
|
194
267
|
*/
|
|
195
|
-
|
|
268
|
+
url: string;
|
|
196
269
|
/**
|
|
197
|
-
* A
|
|
270
|
+
* A string identifying the cryptographic hash algorithm used to compute
|
|
271
|
+
* the hash
|
|
198
272
|
*/
|
|
199
|
-
|
|
273
|
+
alg?: string | null;
|
|
200
274
|
/**
|
|
201
|
-
*
|
|
275
|
+
* Byte string containing the hash value
|
|
202
276
|
*/
|
|
203
|
-
|
|
277
|
+
hash: number[];
|
|
204
278
|
[k: string]: unknown;
|
|
205
279
|
}
|
|
206
280
|
/**
|
|
207
|
-
*
|
|
281
|
+
* A description of the source for assertion data
|
|
208
282
|
*/
|
|
209
|
-
export interface
|
|
283
|
+
export interface DataSource {
|
|
210
284
|
/**
|
|
211
|
-
*
|
|
285
|
+
* A value from among the enumerated list indicating the source of the assertion.
|
|
212
286
|
*/
|
|
213
|
-
|
|
287
|
+
type: string;
|
|
214
288
|
/**
|
|
215
|
-
*
|
|
289
|
+
* A human-readable string giving details about the source of the assertion data.
|
|
216
290
|
*/
|
|
217
|
-
|
|
291
|
+
details?: string | null;
|
|
292
|
+
/**
|
|
293
|
+
* A list of [`Actor`]s associated with this source.
|
|
294
|
+
*/
|
|
295
|
+
actors?: Actor[] | null;
|
|
218
296
|
[k: string]: unknown;
|
|
219
297
|
}
|
|
220
298
|
/**
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
* This is described in [§8.3, URI References], of the C2PA Technical Specification.
|
|
224
|
-
*
|
|
225
|
-
* [§8.3, URI References]: https://c2pa.org/specifications/specifications/2.1/specs/C2PA_Specification.html#_uri_references
|
|
299
|
+
* Identifies a person responsible for an action.
|
|
226
300
|
*/
|
|
227
|
-
export interface
|
|
228
|
-
/**
|
|
229
|
-
* A string identifying the cryptographic hash algorithm used to compute the hash
|
|
230
|
-
*/
|
|
231
|
-
alg?: string | null;
|
|
301
|
+
export interface Actor {
|
|
232
302
|
/**
|
|
233
|
-
*
|
|
303
|
+
* An identifier for a human actor, used when the "type" is `humanEntry.identified`.
|
|
234
304
|
*/
|
|
235
|
-
|
|
305
|
+
identifier?: string | null;
|
|
236
306
|
/**
|
|
237
|
-
*
|
|
307
|
+
* List of references to W3C Verifiable Credentials.
|
|
238
308
|
*/
|
|
239
|
-
|
|
309
|
+
credentials?: HashedUri[] | null;
|
|
240
310
|
[k: string]: unknown;
|
|
241
311
|
}
|
|
242
312
|
/**
|
|
243
313
|
* A region of interest within an asset describing the change.
|
|
244
314
|
*
|
|
245
|
-
* This struct can be used from [`Action::changes`][crate::assertions::Action::changes],
|
|
315
|
+
* This struct can be used from [`Action::changes`][crate::assertions::Action::changes],
|
|
316
|
+
* [`AssertionMetadata::region_of_interest`][crate::assertions::AssertionMetadata::region_of_interest], or
|
|
317
|
+
* [`SoftBindingScope::region`][crate::assertions::soft_binding::SoftBindingScope::region].
|
|
246
318
|
*/
|
|
247
319
|
export interface RegionOfInterest {
|
|
248
320
|
/**
|
|
249
|
-
* A
|
|
321
|
+
* A range describing the region of interest for the specific asset.
|
|
250
322
|
*/
|
|
251
|
-
|
|
323
|
+
region: Range[];
|
|
252
324
|
/**
|
|
253
|
-
* A free-text string representing a
|
|
325
|
+
* A free-text string representing a human-readable name for the region which might be used in a user interface.
|
|
254
326
|
*/
|
|
255
|
-
|
|
327
|
+
name?: string | null;
|
|
256
328
|
/**
|
|
257
|
-
*
|
|
329
|
+
* A free-text string representing a machine-readable, unique to this assertion, identifier for the region.
|
|
258
330
|
*/
|
|
259
|
-
|
|
331
|
+
identifier?: string | null;
|
|
260
332
|
/**
|
|
261
|
-
* A
|
|
333
|
+
* A value from a controlled vocabulary such as <https://cv.iptc.org/newscodes/imageregiontype/> or an entity-specific
|
|
334
|
+
* value (e.g., com.litware.newType) that represents the type of thing(s) depicted by a region.
|
|
335
|
+
*
|
|
336
|
+
* Note this field serializes/deserializes into the name `type`.
|
|
262
337
|
*/
|
|
263
|
-
|
|
338
|
+
type?: string | null;
|
|
264
339
|
/**
|
|
265
|
-
* A
|
|
340
|
+
* A value from our controlled vocabulary or an entity-specific value (e.g., com.litware.coolArea) that represents
|
|
341
|
+
* the role of a region among other regions.
|
|
266
342
|
*/
|
|
267
|
-
|
|
343
|
+
role?: Role | null;
|
|
268
344
|
/**
|
|
269
|
-
* A
|
|
345
|
+
* A free-text string.
|
|
270
346
|
*/
|
|
271
|
-
|
|
347
|
+
description?: string | null;
|
|
272
348
|
/**
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
* Note this field serializes/deserializes into the name `type`.
|
|
349
|
+
* Additional information about the asset.
|
|
276
350
|
*/
|
|
277
|
-
|
|
351
|
+
metadata?: AssertionMetadata | null;
|
|
278
352
|
[k: string]: unknown;
|
|
279
353
|
}
|
|
280
354
|
/**
|
|
@@ -282,67 +356,50 @@ export interface RegionOfInterest {
|
|
|
282
356
|
*/
|
|
283
357
|
export interface Range {
|
|
284
358
|
/**
|
|
285
|
-
*
|
|
286
|
-
*/
|
|
287
|
-
frame?: Frame | null;
|
|
288
|
-
/**
|
|
289
|
-
* A item identifier.
|
|
359
|
+
* The type of range of interest.
|
|
290
360
|
*/
|
|
291
|
-
|
|
361
|
+
type: "spatial" | "temporal" | "frame" | "textual" | "identified";
|
|
292
362
|
/**
|
|
293
363
|
* A spatial range.
|
|
294
364
|
*/
|
|
295
365
|
shape?: Shape | null;
|
|
296
|
-
/**
|
|
297
|
-
* A textual range.
|
|
298
|
-
*/
|
|
299
|
-
text?: Text | null;
|
|
300
366
|
/**
|
|
301
367
|
* A temporal range.
|
|
302
368
|
*/
|
|
303
369
|
time?: Time | null;
|
|
304
370
|
/**
|
|
305
|
-
*
|
|
371
|
+
* A frame range.
|
|
306
372
|
*/
|
|
307
|
-
|
|
308
|
-
[k: string]: unknown;
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* A frame range representing starting and ending frames or pages.
|
|
312
|
-
*
|
|
313
|
-
* If both `start` and `end` are missing, the frame will span the entire asset.
|
|
314
|
-
*/
|
|
315
|
-
export interface Frame {
|
|
373
|
+
frame?: Frame | null;
|
|
316
374
|
/**
|
|
317
|
-
*
|
|
375
|
+
* A textual range.
|
|
318
376
|
*/
|
|
319
|
-
|
|
377
|
+
text?: Text | null;
|
|
320
378
|
/**
|
|
321
|
-
*
|
|
322
|
-
*
|
|
323
|
-
* The first frame/page starts at 0.
|
|
379
|
+
* A item identifier.
|
|
324
380
|
*/
|
|
325
|
-
|
|
381
|
+
item?: Item | null;
|
|
326
382
|
[k: string]: unknown;
|
|
327
383
|
}
|
|
328
384
|
/**
|
|
329
|
-
*
|
|
385
|
+
* A spatial range representing rectangle, circle, or a polygon.
|
|
330
386
|
*/
|
|
331
|
-
export interface
|
|
387
|
+
export interface Shape {
|
|
332
388
|
/**
|
|
333
|
-
* The
|
|
389
|
+
* The type of shape.
|
|
334
390
|
*/
|
|
335
|
-
|
|
391
|
+
type: "rectangle" | "circle" | "polygon";
|
|
336
392
|
/**
|
|
337
|
-
* The
|
|
393
|
+
* The type of unit for the shape range.
|
|
338
394
|
*/
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
395
|
+
unit: "pixel" | "percent";
|
|
396
|
+
origin: Coordinate;
|
|
397
|
+
/**
|
|
398
|
+
* The width for rectangles or diameter for circles.
|
|
399
|
+
*
|
|
400
|
+
* This field can be ignored for polygons.
|
|
401
|
+
*/
|
|
402
|
+
width?: number | null;
|
|
346
403
|
/**
|
|
347
404
|
* The height of a rectnagle.
|
|
348
405
|
*
|
|
@@ -355,34 +412,16 @@ export interface Shape {
|
|
|
355
412
|
* The default value is true.
|
|
356
413
|
*/
|
|
357
414
|
inside?: boolean | null;
|
|
358
|
-
/**
|
|
359
|
-
* THe origin of the coordinate in the shape.
|
|
360
|
-
*/
|
|
361
|
-
origin: Coordinate;
|
|
362
|
-
/**
|
|
363
|
-
* The type of shape.
|
|
364
|
-
*/
|
|
365
|
-
type: ShapeType;
|
|
366
|
-
/**
|
|
367
|
-
* The type of unit for the shape range.
|
|
368
|
-
*/
|
|
369
|
-
unit: UnitType;
|
|
370
415
|
/**
|
|
371
416
|
* The vertices of the polygon.
|
|
372
417
|
*
|
|
373
418
|
* This field can be ignored for rectangles and circles.
|
|
374
419
|
*/
|
|
375
|
-
vertices?:
|
|
376
|
-
/**
|
|
377
|
-
* The width for rectangles or diameter for circles.
|
|
378
|
-
*
|
|
379
|
-
* This field can be ignored for polygons.
|
|
380
|
-
*/
|
|
381
|
-
width?: number | null;
|
|
420
|
+
vertices?: Coordinate1[] | null;
|
|
382
421
|
[k: string]: unknown;
|
|
383
422
|
}
|
|
384
423
|
/**
|
|
385
|
-
*
|
|
424
|
+
* THe origin of the coordinate in the shape.
|
|
386
425
|
*/
|
|
387
426
|
export interface Coordinate {
|
|
388
427
|
/**
|
|
@@ -396,47 +435,17 @@ export interface Coordinate {
|
|
|
396
435
|
[k: string]: unknown;
|
|
397
436
|
}
|
|
398
437
|
/**
|
|
399
|
-
*
|
|
400
|
-
*/
|
|
401
|
-
export interface Text {
|
|
402
|
-
/**
|
|
403
|
-
* The ranges of text to select.
|
|
404
|
-
*/
|
|
405
|
-
selectors: TextSelectorRange[];
|
|
406
|
-
[k: string]: unknown;
|
|
407
|
-
}
|
|
408
|
-
/**
|
|
409
|
-
* One or two [`TextSelector`][TextSelector] identifiying the range to select.
|
|
410
|
-
*/
|
|
411
|
-
export interface TextSelectorRange {
|
|
412
|
-
/**
|
|
413
|
-
* The end of the text range.
|
|
414
|
-
*/
|
|
415
|
-
end?: TextSelector | null;
|
|
416
|
-
/**
|
|
417
|
-
* The start (or entire) text range.
|
|
418
|
-
*/
|
|
419
|
-
selector: TextSelector;
|
|
420
|
-
[k: string]: unknown;
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
* Selects a range of text via a fragment identifier.
|
|
424
|
-
*
|
|
425
|
-
* This is modeled after the W3C Web Annotation selector model.
|
|
438
|
+
* An x, y coordinate used for specifying vertices in polygons.
|
|
426
439
|
*/
|
|
427
|
-
export interface
|
|
428
|
-
/**
|
|
429
|
-
* The end character offset or the end of the fragment if not present.
|
|
430
|
-
*/
|
|
431
|
-
end?: number | null;
|
|
440
|
+
export interface Coordinate1 {
|
|
432
441
|
/**
|
|
433
|
-
*
|
|
442
|
+
* The coordinate along the x-axis.
|
|
434
443
|
*/
|
|
435
|
-
|
|
444
|
+
x: number;
|
|
436
445
|
/**
|
|
437
|
-
* The
|
|
446
|
+
* The coordinate along the y-axis.
|
|
438
447
|
*/
|
|
439
|
-
|
|
448
|
+
y: number;
|
|
440
449
|
[k: string]: unknown;
|
|
441
450
|
}
|
|
442
451
|
/**
|
|
@@ -444,82 +453,107 @@ export interface TextSelector {
|
|
|
444
453
|
*/
|
|
445
454
|
export interface Time {
|
|
446
455
|
/**
|
|
447
|
-
* The
|
|
456
|
+
* The type of time.
|
|
448
457
|
*/
|
|
449
|
-
|
|
458
|
+
type?: "npt";
|
|
450
459
|
/**
|
|
451
460
|
* The start time or the start of the asset if not present.
|
|
452
461
|
*/
|
|
453
462
|
start?: string | null;
|
|
454
463
|
/**
|
|
455
|
-
* The
|
|
464
|
+
* The end time or the end of the asset if not present.
|
|
456
465
|
*/
|
|
457
|
-
|
|
466
|
+
end?: string | null;
|
|
458
467
|
[k: string]: unknown;
|
|
459
468
|
}
|
|
460
469
|
/**
|
|
461
|
-
* A
|
|
470
|
+
* A frame range representing starting and ending frames or pages.
|
|
462
471
|
*
|
|
463
|
-
*
|
|
472
|
+
* If both `start` and `end` are missing, the frame will span the entire asset.
|
|
464
473
|
*/
|
|
465
|
-
export interface
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
474
|
+
export interface Frame {
|
|
475
|
+
/**
|
|
476
|
+
* The start of the frame or the end of the asset if not present.
|
|
477
|
+
*
|
|
478
|
+
* The first frame/page starts at 0.
|
|
479
|
+
*/
|
|
480
|
+
start?: number | null;
|
|
481
|
+
/**
|
|
482
|
+
* The end of the frame inclusive or the end of the asset if not present.
|
|
483
|
+
*/
|
|
484
|
+
end?: number | null;
|
|
469
485
|
[k: string]: unknown;
|
|
470
486
|
}
|
|
471
487
|
/**
|
|
472
|
-
*
|
|
488
|
+
* A textual range representing multiple (possibly discontinuous) ranges of text.
|
|
473
489
|
*/
|
|
474
|
-
export interface
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
490
|
+
export interface Text {
|
|
491
|
+
/**
|
|
492
|
+
* The ranges of text to select.
|
|
493
|
+
*/
|
|
494
|
+
selectors: TextSelectorRange[];
|
|
479
495
|
[k: string]: unknown;
|
|
480
496
|
}
|
|
481
497
|
/**
|
|
482
|
-
*
|
|
483
|
-
*
|
|
484
|
-
* The map contains the validation results for the active manifest and any ingredient deltas. It is normal for there to be many
|
|
498
|
+
* One or two [`TextSelector`][TextSelector] identifiying the range to select.
|
|
485
499
|
*/
|
|
486
|
-
export interface
|
|
487
|
-
|
|
488
|
-
|
|
500
|
+
export interface TextSelectorRange {
|
|
501
|
+
selector: TextSelector;
|
|
502
|
+
/**
|
|
503
|
+
* The end of the text range.
|
|
504
|
+
*/
|
|
505
|
+
end?: TextSelector1 | null;
|
|
489
506
|
[k: string]: unknown;
|
|
490
507
|
}
|
|
491
508
|
/**
|
|
492
|
-
*
|
|
509
|
+
* The start (or entire) text range.
|
|
493
510
|
*/
|
|
494
|
-
export interface
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
511
|
+
export interface TextSelector {
|
|
512
|
+
/**
|
|
513
|
+
* Fragment identifier as per RFC3023 (XML) or ISO 32000-2 (PDF), Annex O.
|
|
514
|
+
*/
|
|
515
|
+
fragment: string;
|
|
516
|
+
/**
|
|
517
|
+
* The start character offset or the start of the fragment if not present.
|
|
518
|
+
*/
|
|
519
|
+
start?: number | null;
|
|
520
|
+
/**
|
|
521
|
+
* The end character offset or the end of the fragment if not present.
|
|
522
|
+
*/
|
|
523
|
+
end?: number | null;
|
|
498
524
|
[k: string]: unknown;
|
|
499
525
|
}
|
|
500
526
|
/**
|
|
501
|
-
*
|
|
527
|
+
* Selects a range of text via a fragment identifier.
|
|
502
528
|
*
|
|
503
|
-
*
|
|
529
|
+
* This is modeled after the W3C Web Annotation selector model.
|
|
504
530
|
*/
|
|
505
|
-
export interface
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
531
|
+
export interface TextSelector1 {
|
|
532
|
+
/**
|
|
533
|
+
* Fragment identifier as per RFC3023 (XML) or ISO 32000-2 (PDF), Annex O.
|
|
534
|
+
*/
|
|
535
|
+
fragment: string;
|
|
536
|
+
/**
|
|
537
|
+
* The start character offset or the start of the fragment if not present.
|
|
538
|
+
*/
|
|
539
|
+
start?: number | null;
|
|
540
|
+
/**
|
|
541
|
+
* The end character offset or the end of the fragment if not present.
|
|
542
|
+
*/
|
|
543
|
+
end?: number | null;
|
|
510
544
|
[k: string]: unknown;
|
|
511
545
|
}
|
|
512
546
|
/**
|
|
513
|
-
*
|
|
547
|
+
* Description of the boundaries of an identified range.
|
|
514
548
|
*/
|
|
515
|
-
export interface
|
|
549
|
+
export interface Item {
|
|
516
550
|
/**
|
|
517
|
-
*
|
|
551
|
+
* The container-specific term used to identify items, such as "track_id" for MP4 or "item_ID" for HEIF.
|
|
518
552
|
*/
|
|
519
|
-
|
|
553
|
+
identifier: string;
|
|
520
554
|
/**
|
|
521
|
-
*
|
|
555
|
+
* The value of the identifier, e.g. a value of "2" for an identifier of "track_id" would imply track 2 of the asset.
|
|
522
556
|
*/
|
|
523
|
-
|
|
557
|
+
value: string;
|
|
524
558
|
[k: string]: unknown;
|
|
525
559
|
}
|