@vidispine/vdt-js 22.4.0 → 23.1.0-pre.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/dist/index.d.ts +91 -20
- package/dist/index.es.js +264 -2363
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +285 -2382
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare const parseKeyValuePairTypes: (keyValuePairTypes: KeyValuePairType[]) =>
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Const object with VidiCore role names
|
|
17
17
|
*
|
|
18
18
|
* @category Auth
|
|
19
19
|
*/
|
|
@@ -127,7 +127,8 @@ declare const ROLE_NAMES: {
|
|
|
127
127
|
readonly USER: "_user";
|
|
128
128
|
readonly VXA: "_vxa";
|
|
129
129
|
readonly VXA_READ: "_vxa_read";
|
|
130
|
-
};
|
|
130
|
+
};
|
|
131
|
+
type RoleNameTypes = keyof typeof ROLE_NAMES;
|
|
131
132
|
|
|
132
133
|
type InputValueTypes = string | boolean | number | Date;
|
|
133
134
|
/** Possible input values for the field value */
|
|
@@ -445,17 +446,19 @@ type MetadataTypeToWebVttOptions = {
|
|
|
445
446
|
declare const metadataTypeToWebVtt: (metadataType: MetadataType, options?: MetadataTypeToWebVttOptions) => string;
|
|
446
447
|
|
|
447
448
|
/**
|
|
448
|
-
* Array with all available
|
|
449
|
+
* Array with all available VidiCore system/default field group names
|
|
449
450
|
*
|
|
450
451
|
* @category Metadata
|
|
451
452
|
*/
|
|
452
|
-
declare const
|
|
453
|
+
declare const SYSTEM_FIELDGROUPS: readonly ["stl_subtitle", "stl_tti", "stl_gsi", "mrk_marker", "pho_validation", "pho_resource", "pho_error", "facedetect_rect", "facedetect_face", "originalTrackFilename", "stl_gsiHeader"];
|
|
454
|
+
|
|
453
455
|
/**
|
|
454
|
-
* Array with all available
|
|
456
|
+
* Array with all available VidiCore system/default field names (including transient)
|
|
455
457
|
*
|
|
456
458
|
* @category Metadata
|
|
457
459
|
*/
|
|
458
|
-
declare const
|
|
460
|
+
declare const SYSTEM_FIELDS: readonly ["title", "user", "shapeTag", "representativeThumbnail", "representativeThumbnailNoAuth", "representativeItems", "itemId", "collectionId", "mediaType", "mimeType", "created", "startTimeCode", "startSeconds", "fieldValidationError", "schemaValidationError", "originalFilename", "originalUri", "originalAudioCodec", "originalVideoCodec", "originalHeight", "originalWidth", "originalFormat", "durationSeconds", "durationTimeCode", "solr-index", "__user", "__collection", "__collection_size", "__ancestor_collection", "__ancestor_collection_size", "__shape", "__shape_size", "__shape_last_added", "__placeholder_shape_size", "__version", "__version_count", "__storage", "__storage_size", "__shapetag_{tag}_hash_{hash}", "__storage_{tag}", "__storage_{tag}_size", "__storagegroup", "__storagegroup_size", "__sequence", "__sequence_size", "__metadata_last_modified", "__external_id", "__deletion_lock_id", "__deletion_lock_expiry", "__child_collection", "__child_collection_size", "__parent_collection", "__parent_collection_size", "__items_size", "stl_text", "stl_justification", "stl_xrelative", "stl_yrelative", "stl_vertical", "stl_verticalbase", "stl_horizontalbase", "stl_sizerelative", "stl_color", "stl_outline", "stl_outlinecolor", "stl_outlinesize", "stl_font", "stl_service", "stl_tti", "stl_gsi", "cct", "tcd", "tcf", "oet", "cd", "mnc", "cpn", "dfc", "tcp", "tcs", "tet", "tnb", "tnd", "en", "co", "tng", "rd", "mnr", "dsc", "opt", "lc", "tpt", "tn", "slr", "tns", "rn", "pub", "dsn", "ecd", "mrk_zerolength", "mrk_text", "mrk_color", "pho_resource_name", "pho_error_level", "pho_error_code", "pho_error_description", "facedetect_rect_width", "facedetect_rect_height", "facedetect_rect_y", "facedetect_rect_x", "facedetect_pid", "facedetect_rect", "trackId", "eidr_actor", "eidr_alternateId", "eidr_countryOfOrigin", "eidr_director", "eidr_id", "eidr_referentType", "eidr_releaseDate", "eidr_resourceName", "eidr_status", "eidr_sync", "ttml_div", "ttml_root", "vxa_collection_id", "vxaId", "vxaLocalPath", "tco", "cs", "ebn", "tf", "cf", "sgn", "tci", "jc", "vp", "sn"];
|
|
461
|
+
|
|
459
462
|
/**
|
|
460
463
|
* Array with all available metadata field value attributes
|
|
461
464
|
*
|
|
@@ -464,17 +467,18 @@ declare const FIELD_ATTRIBUTE_KEYS: (keyof MetadataFieldValueType)[];
|
|
|
464
467
|
declare const FIELD_VALUE_ATTRIBUTE_KEYS: (keyof MetadataValueType)[];
|
|
465
468
|
|
|
466
469
|
/**
|
|
467
|
-
* Array with all available
|
|
470
|
+
* Array with all available metadata field attributes
|
|
468
471
|
*
|
|
469
472
|
* @category Metadata
|
|
470
473
|
*/
|
|
471
|
-
declare const
|
|
474
|
+
declare const FIELD_ATTRIBUTE_KEYS: (keyof MetadataFieldValueType)[];
|
|
475
|
+
|
|
472
476
|
/**
|
|
473
|
-
* Array with all available
|
|
477
|
+
* Array with all available metadata group attributes
|
|
474
478
|
*
|
|
475
479
|
* @category Metadata
|
|
476
480
|
*/
|
|
477
|
-
declare const
|
|
481
|
+
declare const GROUP_ATTRIBUTE_KEYS: (keyof MetadataGroupValueType)[];
|
|
478
482
|
|
|
479
483
|
type CreateFacetTypeFieldList = string[];
|
|
480
484
|
type CreateFacetTypeOptions = {
|
|
@@ -550,6 +554,19 @@ type ParseHighlightTimespanListOptions = {
|
|
|
550
554
|
*/
|
|
551
555
|
declare const parseHighlightTimespanList: (highlightTimespanList?: SearchResultEntryTimespanType[], options?: ParseHighlightTimespanListOptions) => ParsedHighlightTimespan | ParsedHighlightTimespan[];
|
|
552
556
|
|
|
557
|
+
/**
|
|
558
|
+
* Parse Vidicore "NOW" constants to a date object
|
|
559
|
+
*
|
|
560
|
+
* Format: `NOW[+/-][number][HOUR/DAY/MONTH/YEAR(s)]` (e.g. "NOW-2HOURS")
|
|
561
|
+
*
|
|
562
|
+
* @remarks
|
|
563
|
+
* Returns an approximate date since it's created client side
|
|
564
|
+
*
|
|
565
|
+
* @param value A "NOW" constant
|
|
566
|
+
* @returns A date from the NOW constant
|
|
567
|
+
*
|
|
568
|
+
* @category Search
|
|
569
|
+
*/
|
|
553
570
|
declare const parseNowDate: (value?: string) => Date;
|
|
554
571
|
|
|
555
572
|
type ParsedBaseMediaInfoType = {
|
|
@@ -572,6 +589,7 @@ type ParsedAudioComponentType = {
|
|
|
572
589
|
audioSamplerateSamples?: number;
|
|
573
590
|
audioBitDepth?: string;
|
|
574
591
|
audioBitrate?: string;
|
|
592
|
+
audioBitrateKbps?: number;
|
|
575
593
|
audioBitRateMode?: string;
|
|
576
594
|
audioChannels?: number;
|
|
577
595
|
audioMetadata?: {
|
|
@@ -615,6 +633,9 @@ type ParsedFileType = {
|
|
|
615
633
|
/**
|
|
616
634
|
* Parses a VidiCore file object
|
|
617
635
|
*
|
|
636
|
+
* @remarks
|
|
637
|
+
* File sizes are parsed with JEDEC standard (base 2)
|
|
638
|
+
*
|
|
618
639
|
* @param fileType VidiCore file object
|
|
619
640
|
* @returns A parsed file object
|
|
620
641
|
*
|
|
@@ -679,6 +700,7 @@ declare class TimeBase {
|
|
|
679
700
|
*
|
|
680
701
|
* @remarks
|
|
681
702
|
* Default format: denominator(:numerator if > 1)
|
|
703
|
+
*
|
|
682
704
|
* `constant` has precedence over `fraction` if both are true (e.g. NTSC > 30000:1001)
|
|
683
705
|
*
|
|
684
706
|
* @param options For how to display it as text
|
|
@@ -698,6 +720,7 @@ declare class TimeBase {
|
|
|
698
720
|
* - `number` gives that amount of decimal places
|
|
699
721
|
*
|
|
700
722
|
* Default format: rate with two decimals if needed (i.e. decimals are > 0)
|
|
723
|
+
*
|
|
701
724
|
* Option precedence (when all true): `constant` > `rounded` > `fixed`
|
|
702
725
|
*
|
|
703
726
|
* @param options For how to display it as rate
|
|
@@ -822,6 +845,7 @@ declare class TimeCode {
|
|
|
822
845
|
*
|
|
823
846
|
* @remarks
|
|
824
847
|
* Default format: samples@denominator(:numerator if > 1)
|
|
848
|
+
*
|
|
825
849
|
* `constant` has precedence over `fraction` if both are true
|
|
826
850
|
*
|
|
827
851
|
* @param options Options for how to format text
|
|
@@ -917,7 +941,9 @@ type FormatTimeCodeSecondsOptions = {
|
|
|
917
941
|
} & TimeCodeInputOptions;
|
|
918
942
|
/**
|
|
919
943
|
* Format seconds to TimeCode object
|
|
920
|
-
*
|
|
944
|
+
*
|
|
945
|
+
* @remarks
|
|
946
|
+
* Input time base is always considered as 1:1 since it expects seconds as input
|
|
921
947
|
*
|
|
922
948
|
* Note: Max 15 digits accuracy (double precision float64), e.g.
|
|
923
949
|
* - 10^6 seconds can have 10^9 decimals (nanosecond) precision
|
|
@@ -1000,6 +1026,7 @@ type ParsedVideoComponentType = {
|
|
|
1000
1026
|
videoCodec?: string;
|
|
1001
1027
|
smpte?: string;
|
|
1002
1028
|
videoBitrate?: string;
|
|
1029
|
+
videoBitrateMbps?: number;
|
|
1003
1030
|
fieldOrder?: string;
|
|
1004
1031
|
colorSpace?: string;
|
|
1005
1032
|
chromaSubsampling?: string;
|
|
@@ -1040,13 +1067,32 @@ type ParsedShapeType = {
|
|
|
1040
1067
|
*/
|
|
1041
1068
|
declare const parseShapeType: (shapeType?: ShapeType) => ParsedShapeType;
|
|
1042
1069
|
|
|
1070
|
+
/**
|
|
1071
|
+
* Const object with document types
|
|
1072
|
+
*
|
|
1073
|
+
* @category Shape
|
|
1074
|
+
*/
|
|
1043
1075
|
declare const DOCUMENT_TYPES: {
|
|
1044
1076
|
readonly PDF: "PDF";
|
|
1045
1077
|
readonly TEXT: "TEXT";
|
|
1046
1078
|
readonly MSWORD: "MSWORD";
|
|
1047
1079
|
readonly JSON: "JSON";
|
|
1048
1080
|
readonly XML: "XML";
|
|
1049
|
-
};
|
|
1081
|
+
};
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* Const object with media types
|
|
1085
|
+
*
|
|
1086
|
+
* @category Shape
|
|
1087
|
+
*/
|
|
1088
|
+
declare const SHAPE_MEDIA_TYPES: {
|
|
1089
|
+
readonly IMAGE: "IMAGE";
|
|
1090
|
+
readonly AUDIO: "AUDIO";
|
|
1091
|
+
readonly VIDEO: "VIDEO";
|
|
1092
|
+
readonly DOCUMENT: "DOCUMENT";
|
|
1093
|
+
readonly BINARY: "BINARY";
|
|
1094
|
+
};
|
|
1095
|
+
|
|
1050
1096
|
type DocumentType = keyof typeof DOCUMENT_TYPES;
|
|
1051
1097
|
/**
|
|
1052
1098
|
* Return a const for the document type of a shape (looks at mimeType)
|
|
@@ -1085,13 +1131,6 @@ type FilterShapeSourceOption = {
|
|
|
1085
1131
|
*/
|
|
1086
1132
|
declare const filterShapeSource: (itemType: ItemType, options: FilterShapeSourceOption) => FilteredShapeListObject[];
|
|
1087
1133
|
|
|
1088
|
-
declare const SHAPE_MEDIA_TYPES: {
|
|
1089
|
-
readonly IMAGE: "IMAGE";
|
|
1090
|
-
readonly AUDIO: "AUDIO";
|
|
1091
|
-
readonly VIDEO: "VIDEO";
|
|
1092
|
-
readonly DOCUMENT: "DOCUMENT";
|
|
1093
|
-
readonly BINARY: "BINARY";
|
|
1094
|
-
};
|
|
1095
1134
|
type ShapeMediaType = keyof typeof SHAPE_MEDIA_TYPES;
|
|
1096
1135
|
/**
|
|
1097
1136
|
* Returns a const for which media type a shape has
|
|
@@ -1103,6 +1142,38 @@ type ShapeMediaType = keyof typeof SHAPE_MEDIA_TYPES;
|
|
|
1103
1142
|
*/
|
|
1104
1143
|
declare const getShapeMediaType: (shape: ShapeType) => ShapeMediaType;
|
|
1105
1144
|
|
|
1145
|
+
/**
|
|
1146
|
+
* Const object with all file states in VidiCore
|
|
1147
|
+
* (see https://apidoc.vidispine.com/latest/storage/storage.html#file-states for more info)
|
|
1148
|
+
*
|
|
1149
|
+
* @category File
|
|
1150
|
+
*/
|
|
1151
|
+
declare const FILE_STATES: {
|
|
1152
|
+
/** Just created, not used. */
|
|
1153
|
+
readonly NONE: "NONE";
|
|
1154
|
+
/** Discovered or created, not yet marked as finished. */
|
|
1155
|
+
readonly OPEN: "OPEN";
|
|
1156
|
+
/** File does no longer grow. */
|
|
1157
|
+
readonly CLOSED: "CLOSED";
|
|
1158
|
+
/** The current state is not known. */
|
|
1159
|
+
readonly UNKNOWN: "UNKNOWN";
|
|
1160
|
+
/** File is missing from the file system/storage. */
|
|
1161
|
+
readonly MISSING: "MISSING";
|
|
1162
|
+
/** File has been missing for a longer period. Candidate for restoration from archive. */
|
|
1163
|
+
readonly LOST: "LOST";
|
|
1164
|
+
/** File will appear on file system/storage, transfer subsystem or transcoder will create it. */
|
|
1165
|
+
readonly TO_APPEAR: "TO_APPEAR";
|
|
1166
|
+
/** The file is no longer in use, and will be deleted at the next clean-up sweep. */
|
|
1167
|
+
readonly TO_BE_DELETED: "TO_BE_DELETED";
|
|
1168
|
+
/** File is in use by transfer subsystem or transcoder. */
|
|
1169
|
+
readonly BEING_READ: "BEING_READ";
|
|
1170
|
+
/** File is archived. */
|
|
1171
|
+
readonly ARCHIVED: "ARCHIVED";
|
|
1172
|
+
/** File will be synchronized by multi-site agent. */
|
|
1173
|
+
readonly AWAITING_SYNC: "AWAITING_SYNC";
|
|
1174
|
+
};
|
|
1175
|
+
type FileStateTypes = keyof typeof FILE_STATES;
|
|
1176
|
+
|
|
1106
1177
|
/**
|
|
1107
1178
|
* Find the thumbnail uri in a VidiCore item object that's nearest a timeCode
|
|
1108
1179
|
*
|
|
@@ -1175,4 +1246,4 @@ type ParsedTranscodePreset = {
|
|
|
1175
1246
|
*/
|
|
1176
1247
|
declare const parseTranscodePreset: (transcodePresetType: TranscodePresetType) => ParsedTranscodePreset;
|
|
1177
1248
|
|
|
1178
|
-
export { CreateFacetTypeFieldList, CreateFacetTypeOptions, CreateMetadataTypeInput, CreateTimeCodeOptions, DocumentType, FIELD_ATTRIBUTE_KEYS, FIELD_VALUE_ATTRIBUTE_KEYS, FilterShapeSourceOption, FilteredShapeListObject, FormatTimeCodeSecondsOptions, FormatTimeCodeSmpteOptions, FormatTimeCodeTextOptions, GROUP_ATTRIBUTE_KEYS, InputField, InputFieldObject, InputFieldValue, InputGroup, InputGroupsOrFields, InputTimespan, InputValue, InputValueObject, InputValueTypes, MetadataTypeToWebVttOptions, ParseFieldListOptions, ParseFieldOptions, ParseGroupListOptions, ParseGroupOptions, ParseHighlightTimespanListOptions, ParseHighlightTimespanOptions, ParseMetadataTypeOptions, ParseTimespanListOptions, ParseTimespanOptions, ParseValueListOptions, ParseValueOptions, ParsedAudioComponentType, ParsedAudioMediaInfoType, ParsedBaseMediaInfoType, ParsedBinaryComponentType, ParsedBinaryMediaInfoType, ParsedContainerComponentType, ParsedFacetType, ParsedFacetTypeCount, ParsedField, ParsedFieldAttributes, ParsedFieldList, ParsedFieldObject, ParsedFileType, ParsedGroup, ParsedGroupAttributes, ParsedGroupList, ParsedHighlightTimespan, ParsedMediaConvertTranscodePreset, ParsedMetadataAttributes, ParsedMetadataType, ParsedShapeType, ParsedTimespan, ParsedTimespanAttributes, ParsedTimespanList, ParsedTranscodePreset, ParsedValue, ParsedValueAttributes, ParsedValueList, ParsedVideoComponentType, ParsedVideoMediaInfoType, ROLE_NAMES, SYSTEM_FIELDGROUPS, SYSTEM_FIELDS, ShapeMediaType, TimeBase, TimeBaseInput, TimeCode, TimeCodeInput, TimeCodeInputOptions, createFacetType, createMetadataType, createTimeBase, createTimeCode, filterShapeSource, findNearestThumbnail, formatTimeBaseText, formatTimeBaseType, formatTimeCodeSeconds, formatTimeCodeSmpte, formatTimeCodeText, formatTimeCodeType, getShapeDocumentType, getShapeMediaType, metadataTypeToWebVtt, parseAudioComponent, parseBinaryComponent, parseContainerComponent, parseFacetType, parseFieldList, parseFileType, parseGroupList, parseHighlightTimespan, parseHighlightTimespanList, parseKeyValuePairTypes as parseKeyValuePairType, parseMediaConvertPreset, parseMetadataType, parseNowDate, parseShapeType, parseSimpleMetadataType, parseTimespan, parseTimespanList, parseTranscodePreset, parseVideoComponent };
|
|
1249
|
+
export { CreateFacetTypeFieldList, CreateFacetTypeOptions, CreateMetadataTypeInput, CreateTimeCodeOptions, DOCUMENT_TYPES, DocumentType, FIELD_ATTRIBUTE_KEYS, FIELD_VALUE_ATTRIBUTE_KEYS, FILE_STATES, FileStateTypes, FilterShapeSourceOption, FilteredShapeListObject, FormatTimeCodeSecondsOptions, FormatTimeCodeSmpteOptions, FormatTimeCodeTextOptions, GROUP_ATTRIBUTE_KEYS, InputField, InputFieldObject, InputFieldValue, InputGroup, InputGroupsOrFields, InputTimespan, InputValue, InputValueObject, InputValueTypes, MetadataTypeToWebVttOptions, ParseFieldListOptions, ParseFieldOptions, ParseGroupListOptions, ParseGroupOptions, ParseHighlightTimespanListOptions, ParseHighlightTimespanOptions, ParseMetadataTypeOptions, ParseTimespanListOptions, ParseTimespanOptions, ParseValueListOptions, ParseValueOptions, ParsedAudioComponentType, ParsedAudioMediaInfoType, ParsedBaseMediaInfoType, ParsedBinaryComponentType, ParsedBinaryMediaInfoType, ParsedContainerComponentType, ParsedFacetType, ParsedFacetTypeCount, ParsedField, ParsedFieldAttributes, ParsedFieldList, ParsedFieldObject, ParsedFileType, ParsedGroup, ParsedGroupAttributes, ParsedGroupList, ParsedHighlightTimespan, ParsedMediaConvertTranscodePreset, ParsedMetadataAttributes, ParsedMetadataType, ParsedShapeType, ParsedTimespan, ParsedTimespanAttributes, ParsedTimespanList, ParsedTranscodePreset, ParsedValue, ParsedValueAttributes, ParsedValueList, ParsedVideoComponentType, ParsedVideoMediaInfoType, ROLE_NAMES, RoleNameTypes, SHAPE_MEDIA_TYPES, SYSTEM_FIELDGROUPS, SYSTEM_FIELDS, ShapeMediaType, TimeBase, TimeBaseInput, TimeCode, TimeCodeInput, TimeCodeInputOptions, createFacetType, createMetadataType, createTimeBase, createTimeCode, filterShapeSource, findNearestThumbnail, formatTimeBaseText, formatTimeBaseType, formatTimeCodeSeconds, formatTimeCodeSmpte, formatTimeCodeText, formatTimeCodeType, getShapeDocumentType, getShapeMediaType, metadataTypeToWebVtt, parseAudioComponent, parseBinaryComponent, parseContainerComponent, parseFacetType, parseFieldList, parseFileType, parseGroupList, parseHighlightTimespan, parseHighlightTimespanList, parseKeyValuePairTypes as parseKeyValuePairType, parseMediaConvertPreset, parseMetadataType, parseNowDate, parseShapeType, parseSimpleMetadataType, parseTimespan, parseTimespanList, parseTranscodePreset, parseVideoComponent };
|