@hocuspocus/extension-webhook
Advanced tools
Comparing version 1.0.0-alpha.65 to 1.0.0-alpha.66
@@ -1,2 +0,2 @@ | ||
import { Extension, onChangePayload, onLoadDocumentPayload, storePayload } from '@hocuspocus/server'; | ||
import { Extension, onChangePayload, onLoadDocumentPayload, storePayload, fetchPayload } from '@hocuspocus/server'; | ||
export interface DatabaseConfiguration { | ||
@@ -7,5 +7,3 @@ /** | ||
*/ | ||
fetch: ({ documentName }: { | ||
documentName: string; | ||
}) => Promise<Uint8Array | null>; | ||
fetch: (data: fetchPayload) => Promise<Uint8Array | null>; | ||
/** | ||
@@ -28,3 +26,3 @@ * Pass a function to store updates in your database. | ||
*/ | ||
onLoadDocument({ document, documentName }: onLoadDocumentPayload): Promise<any>; | ||
onLoadDocument(data: onLoadDocumentPayload): Promise<any>; | ||
/** | ||
@@ -31,0 +29,0 @@ * Store new updates in the database. |
@@ -51,3 +51,3 @@ /// <reference types="node" /> | ||
'onCreateDocument' | 'onLoadDocument' | 'afterLoadDocument' | 'onChange' | 'onStoreDocument' | 'afterStoreDocument' | 'onAwarenessUpdate' | 'onRequest' | 'onDisconnect' | 'onDestroy'; | ||
export declare type HookPayload = onConfigurePayload | onListenPayload | onUpgradePayload | onConnectPayload | connectedPayload | onAuthenticatePayload | onLoadDocumentPayload | onLoadDocumentPayload | onLoadDocumentPayload | onChangePayload | onStoreDocumentPayload | afterStoreDocumentPayload | onAwarenessUpdatePayload | onRequestPayload | onDisconnectPayload | onDestroyPayload; | ||
export declare type HookPayload = onConfigurePayload | onListenPayload | onUpgradePayload | onConnectPayload | connectedPayload | onAuthenticatePayload | onLoadDocumentPayload | onChangePayload | onStoreDocumentPayload | afterStoreDocumentPayload | onAwarenessUpdatePayload | onRequestPayload | onDisconnectPayload | onDestroyPayload; | ||
export interface Configuration extends Extension { | ||
@@ -183,2 +183,12 @@ /** | ||
}[]; | ||
export interface fetchPayload { | ||
context: any; | ||
document: Document; | ||
documentName: string; | ||
instance: Hocuspocus; | ||
requestHeaders: IncomingHttpHeaders; | ||
requestParameters: URLSearchParams; | ||
socketId: string; | ||
connection: ConnectionConfiguration; | ||
} | ||
export interface storePayload extends onStoreDocumentPayload { | ||
@@ -185,0 +195,0 @@ state: Buffer; |
{ | ||
"name": "@hocuspocus/extension-webhook", | ||
"version": "1.0.0-alpha.65", | ||
"version": "1.0.0-alpha.66", | ||
"description": "hocuspocus webhook extension", | ||
@@ -32,3 +32,3 @@ "homepage": "https://hocuspocus.dev", | ||
"dependencies": { | ||
"@hocuspocus/server": "^1.0.0-alpha.101", | ||
"@hocuspocus/server": "^1.0.0-alpha.102", | ||
"@hocuspocus/transformer": "^1.0.0-alpha.23", | ||
@@ -38,3 +38,3 @@ "axios": "^0.26.1", | ||
}, | ||
"gitHead": "b0a04ffe8d56cfa6b269a2c8ad7f64c92b108de0" | ||
"gitHead": "450e12c89b027bc62683f151330a98074cd8e8fb" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89855
117
2000