UNPKG

@anoki/fse-common

Version:

Common types for FSE

22 lines (21 loc) 744 B
import { WithMongooseProps } from './with-mongoose-props'; import { GetValues, PageTypes } from '../constants'; export type ParentEntityTypes = 'Page' | 'Section'; export type SavedEntityTypes = 'Page' | 'Section' | 'Element'; export type StatusTypes = 'Pending' | 'Published'; export type SavedChanges<TData> = WithMongooseProps<{ parentId: string; parentEntityType: ParentEntityTypes; entityId: string; pageType: PageTypes; entityType: SavedEntityTypes; changedFields: TData; status: StatusTypes; entityBackup: TData; }>; export declare const SavedChangesStatusEnum: { PENDING: string; PUBLISHED: string; ERROR: string; }; export type SavedChangesStatus = GetValues<typeof SavedChangesStatusEnum>;