@contentauth/c2pa-types 0.4.1 → 0.4.2
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 +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/types/Action.d.ts +511 -0
- package/dist/types/Action.d.ts.map +1 -0
- package/dist/types/Builder.d.ts +716 -0
- package/dist/types/Builder.d.ts.map +1 -0
- package/dist/types/Ingredient.d.ts +544 -0
- package/dist/types/Ingredient.d.ts.map +1 -0
- package/dist/types/ManifestDefinition.d.ts +652 -0
- package/dist/types/ManifestDefinition.d.ts.map +1 -0
- package/dist/types/ManifestStore.d.ts +740 -0
- package/dist/types/ManifestStore.d.ts.map +1 -0
- package/package.json +13 -9
- package/index.d.ts +0 -63
- package/types/Action.d.ts +0 -551
- package/types/Builder.d.ts +0 -771
- package/types/Ingredient.d.ts +0 -559
- package/types/ManifestDefinition.d.ts +0 -667
- package/types/ManifestStore.d.ts +0 -749
package/types/Ingredient.d.ts
DELETED
|
@@ -1,559 +0,0 @@
|
|
|
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
|
-
* A role describing the region.
|
|
11
|
-
*/
|
|
12
|
-
export type Role =
|
|
13
|
-
| "c2pa.areaOfInterest"
|
|
14
|
-
| "c2pa.cropped"
|
|
15
|
-
| "c2pa.edited"
|
|
16
|
-
| "c2pa.placed"
|
|
17
|
-
| "c2pa.redacted"
|
|
18
|
-
| "c2pa.subjectArea"
|
|
19
|
-
| "c2pa.deleted"
|
|
20
|
-
| "c2pa.styled"
|
|
21
|
-
| "c2pa.watermarked";
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* An `Ingredient` is any external asset that has been used in the creation of an asset.
|
|
25
|
-
*/
|
|
26
|
-
export interface Ingredient {
|
|
27
|
-
/**
|
|
28
|
-
* A human-readable title, generally source filename.
|
|
29
|
-
*/
|
|
30
|
-
title?: string | null;
|
|
31
|
-
/**
|
|
32
|
-
* The format of the source file as a MIME type.
|
|
33
|
-
*/
|
|
34
|
-
format?: string | null;
|
|
35
|
-
/**
|
|
36
|
-
* Document ID from `xmpMM:DocumentID` in XMP metadata.
|
|
37
|
-
*/
|
|
38
|
-
document_id?: string | null;
|
|
39
|
-
/**
|
|
40
|
-
* Instance ID from `xmpMM:InstanceID` in XMP metadata.
|
|
41
|
-
*/
|
|
42
|
-
instance_id?: string | null;
|
|
43
|
-
/**
|
|
44
|
-
* URI from `dcterms:provenance` in XMP metadata.
|
|
45
|
-
*/
|
|
46
|
-
provenance?: string | null;
|
|
47
|
-
/**
|
|
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.
|
|
51
|
-
*/
|
|
52
|
-
thumbnail?: ResourceRef | null;
|
|
53
|
-
/**
|
|
54
|
-
* An optional hash of the asset to prevent duplicates.
|
|
55
|
-
*/
|
|
56
|
-
hash?: string | null;
|
|
57
|
-
/**
|
|
58
|
-
* Set to `ParentOf` if this is the parent ingredient.
|
|
59
|
-
*
|
|
60
|
-
* There can only be one parent ingredient in the ingredients.
|
|
61
|
-
*/
|
|
62
|
-
relationship?: "parentOf" | "componentOf" | "inputTo";
|
|
63
|
-
/**
|
|
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
|
|
71
|
-
*/
|
|
72
|
-
active_manifest?: string | null;
|
|
73
|
-
/**
|
|
74
|
-
* Validation status (Ingredient v1 & v2)
|
|
75
|
-
*/
|
|
76
|
-
validation_status?: ValidationStatus[] | null;
|
|
77
|
-
/**
|
|
78
|
-
* Validation results (Ingredient.V3)
|
|
79
|
-
*/
|
|
80
|
-
validation_results?: ValidationResults | null;
|
|
81
|
-
/**
|
|
82
|
-
* A reference to the actual data of the ingredient.
|
|
83
|
-
*/
|
|
84
|
-
data?: ResourceRef | null;
|
|
85
|
-
/**
|
|
86
|
-
* Additional description of the ingredient.
|
|
87
|
-
*/
|
|
88
|
-
description?: string | null;
|
|
89
|
-
/**
|
|
90
|
-
* URI to an informational page about the ingredient or its data.
|
|
91
|
-
*/
|
|
92
|
-
informational_URI?: string | null;
|
|
93
|
-
/**
|
|
94
|
-
* Any additional [`Metadata`] as defined in the C2PA spec.
|
|
95
|
-
*
|
|
96
|
-
* [`Metadata`]: crate::Metadata
|
|
97
|
-
*/
|
|
98
|
-
metadata?: AssertionMetadata | null;
|
|
99
|
-
/**
|
|
100
|
-
* Additional information about the data's type to the ingredient V2 structure.
|
|
101
|
-
*/
|
|
102
|
-
data_types?: AssetType[] | null;
|
|
103
|
-
/**
|
|
104
|
-
* A [`ManifestStore`] from the source asset extracted as a binary C2PA blob.
|
|
105
|
-
*
|
|
106
|
-
* [`ManifestStore`]: crate::ManifestStore
|
|
107
|
-
*/
|
|
108
|
-
manifest_data?: ResourceRef | null;
|
|
109
|
-
/**
|
|
110
|
-
* The ingredient's label as assigned in the manifest.
|
|
111
|
-
*/
|
|
112
|
-
label?: string | null;
|
|
113
|
-
ocsp_responses?: ResourceRef[] | null;
|
|
114
|
-
[k: string]: unknown;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* A reference to a resource to be used in JSON serialization.
|
|
118
|
-
*
|
|
119
|
-
* The underlying data can be read as a stream via [`Reader::resource_to_stream`][crate::Reader::resource_to_stream].
|
|
120
|
-
*/
|
|
121
|
-
export interface ResourceRef {
|
|
122
|
-
/**
|
|
123
|
-
* The mime type of the referenced resource.
|
|
124
|
-
*/
|
|
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;
|
|
134
|
-
/**
|
|
135
|
-
* More detailed data types as defined in the C2PA spec.
|
|
136
|
-
*/
|
|
137
|
-
data_types?: AssetType[] | null;
|
|
138
|
-
/**
|
|
139
|
-
* The algorithm used to hash the resource (if applicable).
|
|
140
|
-
*/
|
|
141
|
-
alg?: string | null;
|
|
142
|
-
/**
|
|
143
|
-
* The hash of the resource (if applicable).
|
|
144
|
-
*/
|
|
145
|
-
hash?: string | null;
|
|
146
|
-
[k: string]: unknown;
|
|
147
|
-
}
|
|
148
|
-
export interface AssetType {
|
|
149
|
-
type: string;
|
|
150
|
-
version?: string | null;
|
|
151
|
-
[k: string]: unknown;
|
|
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
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* The AssertionMetadata structure can be used as part of other assertions or on its own to reference others
|
|
228
|
-
*/
|
|
229
|
-
export interface AssertionMetadata {
|
|
230
|
-
reviewRatings?: ReviewRating[] | null;
|
|
231
|
-
dateTime?: DateT | null;
|
|
232
|
-
reference?: HashedUri | null;
|
|
233
|
-
dataSource?: DataSource | null;
|
|
234
|
-
localizations?:
|
|
235
|
-
| {
|
|
236
|
-
[k: string]: {
|
|
237
|
-
[k: string]: string;
|
|
238
|
-
};
|
|
239
|
-
}[]
|
|
240
|
-
| null;
|
|
241
|
-
regionOfInterest?: RegionOfInterest | null;
|
|
242
|
-
[k: string]: unknown;
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* A rating on an Assertion.
|
|
246
|
-
*
|
|
247
|
-
* See <https://c2pa.org/specifications/specifications/2.2/specs/C2PA_Specification.html#_review_ratings>.
|
|
248
|
-
*/
|
|
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 {
|
|
265
|
-
/**
|
|
266
|
-
* JUMBF URI reference
|
|
267
|
-
*/
|
|
268
|
-
url: string;
|
|
269
|
-
/**
|
|
270
|
-
* A string identifying the cryptographic hash algorithm used to compute
|
|
271
|
-
* the hash
|
|
272
|
-
*/
|
|
273
|
-
alg?: string | null;
|
|
274
|
-
/**
|
|
275
|
-
* Byte string containing the hash value
|
|
276
|
-
*/
|
|
277
|
-
hash: number[];
|
|
278
|
-
[k: string]: unknown;
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* A description of the source for assertion data
|
|
282
|
-
*/
|
|
283
|
-
export interface DataSource {
|
|
284
|
-
/**
|
|
285
|
-
* A value from among the enumerated list indicating the source of the assertion.
|
|
286
|
-
*/
|
|
287
|
-
type: string;
|
|
288
|
-
/**
|
|
289
|
-
* A human-readable string giving details about the source of the assertion data.
|
|
290
|
-
*/
|
|
291
|
-
details?: string | null;
|
|
292
|
-
/**
|
|
293
|
-
* A list of [`Actor`]s associated with this source.
|
|
294
|
-
*/
|
|
295
|
-
actors?: Actor[] | null;
|
|
296
|
-
[k: string]: unknown;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Identifies a person responsible for an action.
|
|
300
|
-
*/
|
|
301
|
-
export interface Actor {
|
|
302
|
-
/**
|
|
303
|
-
* An identifier for a human actor, used when the "type" is `humanEntry.identified`.
|
|
304
|
-
*/
|
|
305
|
-
identifier?: string | null;
|
|
306
|
-
/**
|
|
307
|
-
* List of references to W3C Verifiable Credentials.
|
|
308
|
-
*/
|
|
309
|
-
credentials?: HashedUri[] | null;
|
|
310
|
-
[k: string]: unknown;
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* A region of interest within an asset describing the change.
|
|
314
|
-
*
|
|
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].
|
|
318
|
-
*/
|
|
319
|
-
export interface RegionOfInterest {
|
|
320
|
-
/**
|
|
321
|
-
* A range describing the region of interest for the specific asset.
|
|
322
|
-
*/
|
|
323
|
-
region: Range[];
|
|
324
|
-
/**
|
|
325
|
-
* A free-text string representing a human-readable name for the region which might be used in a user interface.
|
|
326
|
-
*/
|
|
327
|
-
name?: string | null;
|
|
328
|
-
/**
|
|
329
|
-
* A free-text string representing a machine-readable, unique to this assertion, identifier for the region.
|
|
330
|
-
*/
|
|
331
|
-
identifier?: string | null;
|
|
332
|
-
/**
|
|
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`.
|
|
337
|
-
*/
|
|
338
|
-
type?: string | null;
|
|
339
|
-
/**
|
|
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.
|
|
342
|
-
*/
|
|
343
|
-
role?: Role | null;
|
|
344
|
-
/**
|
|
345
|
-
* A free-text string.
|
|
346
|
-
*/
|
|
347
|
-
description?: string | null;
|
|
348
|
-
/**
|
|
349
|
-
* Additional information about the asset.
|
|
350
|
-
*/
|
|
351
|
-
metadata?: AssertionMetadata | null;
|
|
352
|
-
[k: string]: unknown;
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* A spatial, temporal, frame, or textual range describing the region of interest.
|
|
356
|
-
*/
|
|
357
|
-
export interface Range {
|
|
358
|
-
/**
|
|
359
|
-
* The type of range of interest.
|
|
360
|
-
*/
|
|
361
|
-
type: "spatial" | "temporal" | "frame" | "textual" | "identified";
|
|
362
|
-
/**
|
|
363
|
-
* A spatial range.
|
|
364
|
-
*/
|
|
365
|
-
shape?: Shape | null;
|
|
366
|
-
/**
|
|
367
|
-
* A temporal range.
|
|
368
|
-
*/
|
|
369
|
-
time?: Time | null;
|
|
370
|
-
/**
|
|
371
|
-
* A frame range.
|
|
372
|
-
*/
|
|
373
|
-
frame?: Frame | null;
|
|
374
|
-
/**
|
|
375
|
-
* A textual range.
|
|
376
|
-
*/
|
|
377
|
-
text?: Text | null;
|
|
378
|
-
/**
|
|
379
|
-
* A item identifier.
|
|
380
|
-
*/
|
|
381
|
-
item?: Item | null;
|
|
382
|
-
[k: string]: unknown;
|
|
383
|
-
}
|
|
384
|
-
/**
|
|
385
|
-
* A spatial range representing rectangle, circle, or a polygon.
|
|
386
|
-
*/
|
|
387
|
-
export interface Shape {
|
|
388
|
-
/**
|
|
389
|
-
* The type of shape.
|
|
390
|
-
*/
|
|
391
|
-
type: "rectangle" | "circle" | "polygon";
|
|
392
|
-
/**
|
|
393
|
-
* The type of unit for the shape range.
|
|
394
|
-
*/
|
|
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;
|
|
403
|
-
/**
|
|
404
|
-
* The height of a rectnagle.
|
|
405
|
-
*
|
|
406
|
-
* This field can be ignored for circles and polygons.
|
|
407
|
-
*/
|
|
408
|
-
height?: number | null;
|
|
409
|
-
/**
|
|
410
|
-
* If the range is inside the shape.
|
|
411
|
-
*
|
|
412
|
-
* The default value is true.
|
|
413
|
-
*/
|
|
414
|
-
inside?: boolean | null;
|
|
415
|
-
/**
|
|
416
|
-
* The vertices of the polygon.
|
|
417
|
-
*
|
|
418
|
-
* This field can be ignored for rectangles and circles.
|
|
419
|
-
*/
|
|
420
|
-
vertices?: Coordinate1[] | null;
|
|
421
|
-
[k: string]: unknown;
|
|
422
|
-
}
|
|
423
|
-
/**
|
|
424
|
-
* THe origin of the coordinate in the shape.
|
|
425
|
-
*/
|
|
426
|
-
export interface Coordinate {
|
|
427
|
-
/**
|
|
428
|
-
* The coordinate along the x-axis.
|
|
429
|
-
*/
|
|
430
|
-
x: number;
|
|
431
|
-
/**
|
|
432
|
-
* The coordinate along the y-axis.
|
|
433
|
-
*/
|
|
434
|
-
y: number;
|
|
435
|
-
[k: string]: unknown;
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* An x, y coordinate used for specifying vertices in polygons.
|
|
439
|
-
*/
|
|
440
|
-
export interface Coordinate1 {
|
|
441
|
-
/**
|
|
442
|
-
* The coordinate along the x-axis.
|
|
443
|
-
*/
|
|
444
|
-
x: number;
|
|
445
|
-
/**
|
|
446
|
-
* The coordinate along the y-axis.
|
|
447
|
-
*/
|
|
448
|
-
y: number;
|
|
449
|
-
[k: string]: unknown;
|
|
450
|
-
}
|
|
451
|
-
/**
|
|
452
|
-
* A temporal range representing a starting time to an ending time.
|
|
453
|
-
*/
|
|
454
|
-
export interface Time {
|
|
455
|
-
/**
|
|
456
|
-
* The type of time.
|
|
457
|
-
*/
|
|
458
|
-
type?: "npt";
|
|
459
|
-
/**
|
|
460
|
-
* The start time or the start of the asset if not present.
|
|
461
|
-
*/
|
|
462
|
-
start?: string | null;
|
|
463
|
-
/**
|
|
464
|
-
* The end time or the end of the asset if not present.
|
|
465
|
-
*/
|
|
466
|
-
end?: string | null;
|
|
467
|
-
[k: string]: unknown;
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* A frame range representing starting and ending frames or pages.
|
|
471
|
-
*
|
|
472
|
-
* If both `start` and `end` are missing, the frame will span the entire asset.
|
|
473
|
-
*/
|
|
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;
|
|
485
|
-
[k: string]: unknown;
|
|
486
|
-
}
|
|
487
|
-
/**
|
|
488
|
-
* A textual range representing multiple (possibly discontinuous) ranges of text.
|
|
489
|
-
*/
|
|
490
|
-
export interface Text {
|
|
491
|
-
/**
|
|
492
|
-
* The ranges of text to select.
|
|
493
|
-
*/
|
|
494
|
-
selectors: TextSelectorRange[];
|
|
495
|
-
[k: string]: unknown;
|
|
496
|
-
}
|
|
497
|
-
/**
|
|
498
|
-
* One or two [`TextSelector`][TextSelector] identifiying the range to select.
|
|
499
|
-
*/
|
|
500
|
-
export interface TextSelectorRange {
|
|
501
|
-
selector: TextSelector;
|
|
502
|
-
/**
|
|
503
|
-
* The end of the text range.
|
|
504
|
-
*/
|
|
505
|
-
end?: TextSelector1 | null;
|
|
506
|
-
[k: string]: unknown;
|
|
507
|
-
}
|
|
508
|
-
/**
|
|
509
|
-
* The start (or entire) text range.
|
|
510
|
-
*/
|
|
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;
|
|
524
|
-
[k: string]: unknown;
|
|
525
|
-
}
|
|
526
|
-
/**
|
|
527
|
-
* Selects a range of text via a fragment identifier.
|
|
528
|
-
*
|
|
529
|
-
* This is modeled after the W3C Web Annotation selector model.
|
|
530
|
-
*/
|
|
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;
|
|
544
|
-
[k: string]: unknown;
|
|
545
|
-
}
|
|
546
|
-
/**
|
|
547
|
-
* Description of the boundaries of an identified range.
|
|
548
|
-
*/
|
|
549
|
-
export interface Item {
|
|
550
|
-
/**
|
|
551
|
-
* The container-specific term used to identify items, such as "track_id" for MP4 or "item_ID" for HEIF.
|
|
552
|
-
*/
|
|
553
|
-
identifier: string;
|
|
554
|
-
/**
|
|
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.
|
|
556
|
-
*/
|
|
557
|
-
value: string;
|
|
558
|
-
[k: string]: unknown;
|
|
559
|
-
}
|