{"version":3,"sources":["../../src/versions/types.ts"],"sourcesContent":["export type Autosave = {\n /**\n * Define an `interval` in milliseconds to automatically save progress while documents are edited.\n * Document updates are \"debounced\" at this interval.\n *\n * @default 800\n */\n interval?: number\n /**\n * When set to `true`, the \"Save as draft\" button will be displayed even while autosave is enabled.\n * By default, this button is hidden to avoid redundancy with autosave behavior.\n *\n * @default false\n */\n showSaveDraftButton?: boolean\n}\n\nexport type SchedulePublish = {\n /**\n * Define a date format to use for the time picker.\n *\n * @example 'hh:mm' will give a 24 hour clock\n *\n * @default 'h:mm aa' which is a 12 hour clock\n */\n timeFormat?: string\n /**\n * Intervals for the time picker.\n *\n * @default 5\n */\n timeIntervals?: number\n}\n\nexport type IncomingDrafts = {\n /**\n * Enable autosave to automatically save progress while documents are edited.\n * To enable, set to true or pass an object with options.\n */\n autosave?: Autosave | boolean\n /**\n * Localizes the status field.\n *\n * Only effective if the experimental `experimental.localizeStatus` is enabled.\n *\n * @experimental\n * @default false\n */\n localizeStatus?: boolean\n /**\n * Allow for editors to schedule publish / unpublish events in the future.\n */\n schedulePublish?: boolean | SchedulePublish\n /**\n * Set validate to true to validate draft documents when saved.\n *\n * @default false\n */\n validate?: boolean\n}\n\nexport type SanitizedDrafts = {\n /**\n * Enable autosave to automatically save progress while documents are edited.\n * To enable, set to true or pass an object with options.\n */\n autosave: Autosave | false\n /**\n * Localizes the status field.\n *\n * Only effective if the experimental `experimental.localizeStatus` is enabled.\n *\n * @experimental\n * @default false\n */\n localizeStatus?: boolean\n /**\n * Allow for editors to schedule publish / unpublish events in the future.\n */\n schedulePublish: boolean | SchedulePublish\n /**\n * Set validate to true to validate draft documents when saved.\n *\n * @default false\n */\n validate: boolean\n}\n\nexport type IncomingCollectionVersions = {\n /**\n * Enable Drafts mode for this collection.\n * To enable, set to true or pass an object with draft options.\n */\n drafts?: boolean | IncomingDrafts\n /**\n * Use this setting to control how many versions to keep on a document by document basis.\n * Must be an integer. Use 0 to save all versions.\n *\n * @default 100\n */\n maxPerDoc?: number\n}\n\nexport interface SanitizedCollectionVersions extends Omit {\n /**\n * Enable Drafts mode for this collection.\n * To enable, set to true or pass an object with draft options.\n */\n drafts: false | SanitizedDrafts\n /**\n * Use this setting to control how many versions to keep on a document by document basis.\n * Must be an integer. Use 0 to save all versions.\n *\n * @default 100\n */\n maxPerDoc: number\n}\n\nexport type IncomingGlobalVersions = {\n drafts?: boolean | IncomingDrafts\n /**\n * Use this setting to control how many versions to keep on a global by global basis.\n * Must be an integer.\n */\n max?: number\n}\n\nexport type SanitizedGlobalVersions = {\n /**\n * Enable Drafts mode for this global. To enable, set to true or pass an object with draft options\n */\n drafts: false | SanitizedDrafts\n /**\n * Use this setting to control how many versions to keep on a global by global basis.\n * Must be an integer.\n */\n max: number\n}\n\nexport type TypeWithVersion = {\n createdAt: string\n id: string\n latest?: boolean\n parent: number | string\n publishedLocale?: string\n snapshot?: boolean\n updatedAt: string\n version: T\n}\n"],"names":[],"mappings":"AA2IA,WASC"}