/** * This Source Code is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright (c) Infonomic Company Limited */ import type { IDocumentCommands } from '../../@types/index.js'; import type { DocumentLifecycleContext } from './context.js'; type AdapterVersionWrite = Parameters[0]; type LifecycleOwnedWriteKeys = 'collectionId' | 'collectionVersion' | 'collectionConfig' | 'createdBy'; type InitialDocumentVersionWrite = Omit; type ExistingDocumentVersionWrite = Omit & { documentId: string; }; /** * Persist the first version of a logical document with lifecycle-owned * registration and actor metadata. Authentication, hooks, normalization, * counters, path derivation, ordering, and rich-text work stay in the caller * so their sequencing remains explicit. */ export declare function persistInitialDocumentVersion(ctx: DocumentLifecycleContext, write: InitialDocumentVersionWrite): ReturnType; /** * Persist a new version of an existing logical document and suspend any armed * publication schedule atomically. All operation-specific preparation and * hook sequencing remains in the caller. */ export declare function persistExistingDocumentVersion(ctx: DocumentLifecycleContext, write: ExistingDocumentVersionWrite): ReturnType; export {};