declare type Opaque = T & { __opaqueId__: K; }; export declare type DraftId = Opaque; export declare type PublishedId = Opaque; export declare const DRAFTS_FOLDER = "drafts"; export declare function isDraft(document: any): boolean; export declare function isDraftId(id: string): id is DraftId; export declare function getIdPair(id: string): { draftId: DraftId; publishedId: PublishedId; }; export declare function isPublishedId(id: any): id is PublishedId; export declare function getDraftId(id: string): DraftId; export declare function getPublishedId(id: string): PublishedId; export declare function createDraftFrom(document: any): any; export declare function newDraftFrom(document: any): any; export declare function createPublishedFrom(document: any): any; /** * Takes a list of documents and collates draft/published pairs into single entries * {id: , draft?: , published?: } * Note: because Map is ordered by insertion key the resulting array will be ordered by whichever * version appeared first */ export interface CollatedHit { id: string; type: string; draft?: T; published?: T; } export declare function collate(documents: T[]): CollatedHit[]; export declare function removeDupes(documents: any): { _id: string; _type: string; }[]; export {}; //# sourceMappingURL=draftUtils.d.ts.map