@hocuspocus/extension-database
Advanced tools
Comparing version 2.15.1 to 2.15.2
@@ -150,3 +150,3 @@ import type { AbstractType, YArrayEvent } from 'yjs'; | ||
*/ | ||
deleteComment(threadId: TCollabThread['id'], commentId: TCollabComment['id'], options: DeleteCommentOptions): TCollabThread | null | undefined; | ||
deleteComment(threadId: TCollabThread['id'], commentId: TCollabComment['id'], options?: DeleteCommentOptions): TCollabThread | null | undefined; | ||
/** | ||
@@ -153,0 +153,0 @@ * Start watching threads for changes |
@@ -53,6 +53,7 @@ /// <reference types="node" /> | ||
onDisconnect?(data: onDisconnectPayload): Promise<any>; | ||
beforeUnloadDocument?(data: beforeUnloadDocumentPayload): Promise<any>; | ||
afterUnloadDocument?(data: afterUnloadDocumentPayload): Promise<any>; | ||
onDestroy?(data: onDestroyPayload): Promise<any>; | ||
} | ||
export type HookName = 'onConfigure' | 'onListen' | 'onUpgrade' | 'onConnect' | 'connected' | 'onAuthenticate' | 'onCreateDocument' | 'onLoadDocument' | 'afterLoadDocument' | 'beforeHandleMessage' | 'beforeBroadcastStateless' | 'onStateless' | 'onChange' | 'onStoreDocument' | 'afterStoreDocument' | 'onAwarenessUpdate' | 'onRequest' | 'onDisconnect' | 'afterUnloadDocument' | 'onDestroy'; | ||
export type HookName = 'onConfigure' | 'onListen' | 'onUpgrade' | 'onConnect' | 'connected' | 'onAuthenticate' | 'onCreateDocument' | 'onLoadDocument' | 'afterLoadDocument' | 'beforeHandleMessage' | 'beforeBroadcastStateless' | 'onStateless' | 'onChange' | 'onStoreDocument' | 'afterStoreDocument' | 'onAwarenessUpdate' | 'onRequest' | 'onDisconnect' | 'beforeUnloadDocument' | 'afterUnloadDocument' | 'onDestroy'; | ||
export type HookPayloadByName = { | ||
@@ -78,2 +79,3 @@ onConfigure: onConfigurePayload; | ||
afterUnloadDocument: afterUnloadDocumentPayload; | ||
beforeUnloadDocument: beforeUnloadDocumentPayload; | ||
onDestroy: onDestroyPayload; | ||
@@ -315,2 +317,6 @@ }; | ||
} | ||
export interface beforeUnloadDocumentPayload { | ||
instance: Hocuspocus; | ||
documentName: string; | ||
} | ||
export interface DirectConnection { | ||
@@ -317,0 +323,0 @@ transact(transaction: (document: Document) => void): Promise<void>; |
{ | ||
"name": "@hocuspocus/extension-database", | ||
"description": "a generic Hocuspocus persistence driver for the database", | ||
"version": "2.15.1", | ||
"version": "2.15.2", | ||
"homepage": "https://hocuspocus.dev", | ||
@@ -30,3 +30,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@hocuspocus/server": "^2.15.1" | ||
"@hocuspocus/server": "^2.15.2" | ||
}, | ||
@@ -33,0 +33,0 @@ "peerDependencies": { |
85028
2203
Updated@hocuspocus/server@^2.15.2