import { Extension, onChangePayload, onLoadDocumentPayload, storePayload } from '@hocuspocus/server'; export interface DatabaseConfiguration { /** * Pass a Promise to retrieve updates from your database. The Promise should resolve to * an array of items with Y.js-compatible binary data. */ fetch: ({ documentName }: { documentName: string; }) => Promise; /** * Pass a function to store updates in your database. */ store: (data: storePayload) => void; } export declare class Database implements Extension { /** * Default configuration */ configuration: DatabaseConfiguration; /** * Constructor */ constructor(configuration: Partial); /** * Get stored data from the database. */ onLoadDocument({ document, documentName }: onLoadDocumentPayload): Promise; /** * Store new updates in the database. */ onStoreDocument(data: onChangePayload): Promise; }