2021-02-06 08:03:10 +01:00
|
|
|
declare type Collection = {
|
|
|
|
id: string,
|
|
|
|
items: Array<?string>,
|
|
|
|
name: string,
|
|
|
|
type: string,
|
|
|
|
updatedAt: number,
|
|
|
|
totalItems?: number,
|
2021-06-04 16:08:43 +02:00
|
|
|
sourceId?: string, // if copied, claimId of original collection
|
2021-02-06 08:03:10 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
declare type CollectionState = {
|
|
|
|
unpublished: CollectionGroup,
|
|
|
|
resolved: CollectionGroup,
|
|
|
|
pending: CollectionGroup,
|
|
|
|
edited: CollectionGroup,
|
|
|
|
builtin: CollectionGroup,
|
|
|
|
saved: Array<string>,
|
|
|
|
isResolvingCollectionById: { [string]: boolean },
|
|
|
|
error?: string | null,
|
|
|
|
};
|
|
|
|
|
|
|
|
declare type CollectionGroup = {
|
|
|
|
[string]: Collection,
|
|
|
|
}
|
|
|
|
|
|
|
|
declare type CollectionEditParams = {
|
|
|
|
claims?: Array<Claim>,
|
|
|
|
remove?: boolean,
|
|
|
|
claimIds?: Array<string>,
|
|
|
|
replace?: boolean,
|
|
|
|
order?: { from: number, to: number },
|
|
|
|
type?: string,
|
2021-03-22 18:14:13 +01:00
|
|
|
name?: string,
|
2021-02-06 08:03:10 +01:00
|
|
|
}
|