import { WithMongooseProps } from './with-mongoose-props' import { WithTenantProps } from './with-tenant-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 = WithMongooseProps< WithTenantProps<{ parentId: string parentEntityType: ParentEntityTypes entityId: string pageType: PageTypes entityType: SavedEntityTypes changedFields: TData status: StatusTypes entityBackup: TData }> > export const SavedChangesStatusEnum = { PENDING: 'Pending', PUBLISHED: 'Published', ERROR: 'Error', } export type SavedChangesStatus = GetValues