@vidispine/vdt-js 23.3.0-pre.4 → 23.3.0-pre.5
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 +59 -0
- package/dist/index.js +513 -440
- package/dist/index.umd.cjs +3 -3
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import type { AudioComponentType } from '@vidispine/types';
|
|
8
8
|
import type { BinaryComponentType } from '@vidispine/types';
|
|
9
|
+
import type { CollectionType } from '@vidispine/types';
|
|
9
10
|
import type { ContainerComponentType } from '@vidispine/types';
|
|
10
11
|
import type { FacetType } from '@vidispine/types';
|
|
11
12
|
import type { FileType } from '@vidispine/types';
|
|
@@ -19,6 +20,7 @@ import type { MetadataValueType } from '@vidispine/types';
|
|
|
19
20
|
import { RationalType } from '@vidispine/types';
|
|
20
21
|
import type { SearchFacetType } from '@vidispine/types';
|
|
21
22
|
import type { SearchResultEntryTimespanType } from '@vidispine/types';
|
|
23
|
+
import type { SearchResultType } from '@vidispine/types';
|
|
22
24
|
import type { ShapeType } from '@vidispine/types';
|
|
23
25
|
import type { SimpleMetadataType } from '@vidispine/types';
|
|
24
26
|
import type { TimeBaseType } from '@vidispine/types';
|
|
@@ -79,6 +81,8 @@ export declare const createTimeCode: (timeCode: TimeCodeInput | string | number,
|
|
|
79
81
|
|
|
80
82
|
export declare type CreateTimeCodeOptions = TimeCodeInputOptions | FormatTimeCodeSmpteOptions | FormatTimeCodeSecondsOptions | FormatTimeCodeTextOptions;
|
|
81
83
|
|
|
84
|
+
export declare const defaultOptions: ParseSearchResultEventsOptions;
|
|
85
|
+
|
|
82
86
|
/**
|
|
83
87
|
* Const object with document types
|
|
84
88
|
*
|
|
@@ -628,6 +632,29 @@ export declare type ParsedMetadataType<TOptions> = (TOptions extends {
|
|
|
628
632
|
includeMetadataAttributes?: true | string[];
|
|
629
633
|
} ? ParsedMetadataAttributes : {});
|
|
630
634
|
|
|
635
|
+
export declare type ParsedSearchResultEntryTimespanType = {
|
|
636
|
+
entityType?: 'Item' | 'Collection';
|
|
637
|
+
entityId?: string;
|
|
638
|
+
group?: MetadataGroupValueType;
|
|
639
|
+
start?: string;
|
|
640
|
+
end?: string;
|
|
641
|
+
thumbnail?: string;
|
|
642
|
+
startSeconds?: number;
|
|
643
|
+
endSeconds?: number;
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
export declare type ParsedSearchResultEntryType = {
|
|
647
|
+
entityType: 'Item' | 'Collection';
|
|
648
|
+
entityId: string;
|
|
649
|
+
events?: ParsedSearchResultEntryTimespanType[];
|
|
650
|
+
itemType?: ItemType;
|
|
651
|
+
collectionType?: CollectionType;
|
|
652
|
+
};
|
|
653
|
+
|
|
654
|
+
export declare type ParsedSearchResultEvents<TOptions> = TOptions extends {
|
|
655
|
+
flatEvents?: true;
|
|
656
|
+
} ? ParsedSearchResultEntryTimespanType[] : ParsedSearchResultEntryType[];
|
|
657
|
+
|
|
631
658
|
export declare type ParsedShapeType = {
|
|
632
659
|
uri?: string;
|
|
633
660
|
tag?: string;
|
|
@@ -938,6 +965,38 @@ export declare interface ParseMetadataTypeOptions extends ParseTimespanListOptio
|
|
|
938
965
|
*/
|
|
939
966
|
export declare const parseNowDate: (value?: string) => Date;
|
|
940
967
|
|
|
968
|
+
/**
|
|
969
|
+
* Parse metadata-group search result to event representations
|
|
970
|
+
*
|
|
971
|
+
* For more info see:
|
|
972
|
+
* - https://apidoc.vidispine.com/latest/ref/search.html#search-collection-and-item-by-metadata-group
|
|
973
|
+
* - https://apidoc.vidispine.com/latest/item/search.html#find-item-and-collections-by-their-metadata-groups
|
|
974
|
+
*
|
|
975
|
+
* @param searchResult
|
|
976
|
+
* @param options
|
|
977
|
+
* @returns
|
|
978
|
+
*/
|
|
979
|
+
export declare const parseSearchResultEvents: <TOptions extends ParseSearchResultEventsOptions = ParseSearchResultEventsOptions>(searchResult?: SearchResultType, options?: TOptions) => ParsedSearchResultEvents<TOptions>;
|
|
980
|
+
|
|
981
|
+
export declare type ParseSearchResultEventsOptions = {
|
|
982
|
+
/**
|
|
983
|
+
* Append matching group with metadata
|
|
984
|
+
*/
|
|
985
|
+
includeGroupMetadata?: boolean;
|
|
986
|
+
/**
|
|
987
|
+
* Return flat array with all matching events, not grouped by entity
|
|
988
|
+
*/
|
|
989
|
+
flatEvents?: boolean;
|
|
990
|
+
/**
|
|
991
|
+
* Include itemType/collectionType of the event
|
|
992
|
+
*/
|
|
993
|
+
includeEntityType?: boolean;
|
|
994
|
+
/**
|
|
995
|
+
* Find and return nearest thumbnail (Item only)
|
|
996
|
+
*/
|
|
997
|
+
includeNearestThumbnail?: boolean;
|
|
998
|
+
};
|
|
999
|
+
|
|
941
1000
|
/**
|
|
942
1001
|
* Parses the technical information of a ShapeType and its various components.
|
|
943
1002
|
*
|