Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
41 lines
1.4 KiB
Plaintext
41 lines
1.4 KiB
Plaintext
import type { CollectionConfig } from '../collections/config/types.js';
|
|
import type { GlobalConfig } from '../globals/config/types.js';
|
|
import type { Autosave, SanitizedDrafts } from '../versions/types.js';
|
|
type EntityConfig = Pick<CollectionConfig | GlobalConfig, 'versions'>;
|
|
/**
|
|
* Check if an entity has drafts enabled
|
|
*/
|
|
export declare const hasDraftsEnabled: (config: EntityConfig) => boolean;
|
|
/**
|
|
* Check if an entity has localized status enabled
|
|
*/
|
|
export declare const hasLocalizeStatusEnabled: (config: EntityConfig) => boolean;
|
|
/**
|
|
* Check if an entity has autosave enabled
|
|
*/
|
|
export declare const hasAutosaveEnabled: (config: EntityConfig) => config is {
|
|
versions: {
|
|
drafts: {
|
|
autosave: Autosave | false;
|
|
};
|
|
};
|
|
} & EntityConfig;
|
|
/**
|
|
* Check if an entity has validate drafts enabled
|
|
*/
|
|
export declare const hasDraftValidationEnabled: (config: EntityConfig) => boolean;
|
|
export declare const hasScheduledPublishEnabled: (config: EntityConfig) => config is {
|
|
versions: {
|
|
drafts: {
|
|
schedulePublish: SanitizedDrafts["schedulePublish"];
|
|
};
|
|
};
|
|
} & EntityConfig;
|
|
/**
|
|
* Get the maximum number of versions to keep for an entity
|
|
* Returns maxPerDoc for collections or max for globals
|
|
*/
|
|
export declare const getVersionsMax: (config: EntityConfig) => number;
|
|
export declare const getAutosaveInterval: (config: EntityConfig) => number;
|
|
export {};
|
|
//# sourceMappingURL=getVersionsConfig.d.ts.map |