@hocuspocus/extension-webhook 2.6.1 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/packages/extension-database/src/Database.d.ts +1 -1
- package/dist/packages/provider/src/HocuspocusProvider.d.ts +0 -1
- package/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts +4 -0
- package/dist/packages/provider/src/IncomingMessage.d.ts +1 -0
- package/dist/packages/server/src/DirectConnection.d.ts +1 -1
- package/dist/packages/server/src/Document.d.ts +2 -0
- package/dist/packages/server/src/Hocuspocus.d.ts +1 -1
- package/dist/packages/server/src/types.d.ts +1 -0
- package/package.json +4 -4
|
@@ -8,7 +8,7 @@ export interface DatabaseConfiguration {
|
|
|
8
8
|
/**
|
|
9
9
|
* Pass a function to store updates in your database.
|
|
10
10
|
*/
|
|
11
|
-
store: (data: storePayload) => void
|
|
11
|
+
store: (data: storePayload) => Promise<void>;
|
|
12
12
|
}
|
|
13
13
|
export declare class Database implements Extension {
|
|
14
14
|
/**
|
|
@@ -91,7 +91,6 @@ export declare class HocuspocusProvider extends EventEmitter {
|
|
|
91
91
|
boundBroadcastChannelSubscriber: (data: ArrayBuffer) => void;
|
|
92
92
|
boundPageUnload: () => void;
|
|
93
93
|
boundOnOpen: (event: Event) => Promise<void>;
|
|
94
|
-
boundOnMessage: (event: MessageEvent) => void;
|
|
95
94
|
boundOnClose: (event: CloseEvent) => void;
|
|
96
95
|
boundOnStatus: ({ status }: onStatusParameters) => void;
|
|
97
96
|
forwardConnect: (e: any) => this;
|
|
@@ -77,6 +77,10 @@ export interface CompleteHocuspocusProviderWebsocketConfiguration {
|
|
|
77
77
|
* Don’t output any warnings.
|
|
78
78
|
*/
|
|
79
79
|
quiet: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Map of attached providers keyed by documentName.
|
|
82
|
+
*/
|
|
83
|
+
providerMap: Map<string, HocuspocusProvider>;
|
|
80
84
|
}
|
|
81
85
|
export declare class HocuspocusProviderWebsocket extends EventEmitter {
|
|
82
86
|
private messageQueue;
|
|
@@ -10,5 +10,5 @@ export declare class DirectConnection implements DirectConnectionInterface {
|
|
|
10
10
|
*/
|
|
11
11
|
constructor(document: Document, instance: Hocuspocus, context?: any);
|
|
12
12
|
transact(transaction: (document: Document) => void, transactionOrigin?: any): Promise<void>;
|
|
13
|
-
disconnect(): void
|
|
13
|
+
disconnect(): Promise<void>;
|
|
14
14
|
}
|
|
@@ -19,6 +19,7 @@ export declare class Document extends Doc {
|
|
|
19
19
|
mux: mutex;
|
|
20
20
|
logger: Debugger;
|
|
21
21
|
isLoading: boolean;
|
|
22
|
+
isDestroyed: boolean;
|
|
22
23
|
/**
|
|
23
24
|
* Constructor.
|
|
24
25
|
*/
|
|
@@ -87,5 +88,6 @@ export declare class Document extends Doc {
|
|
|
87
88
|
* Broadcast stateless message to all connections
|
|
88
89
|
*/
|
|
89
90
|
broadcastStateless(payload: string): void;
|
|
91
|
+
destroy(): void;
|
|
90
92
|
}
|
|
91
93
|
export default Document;
|
|
@@ -82,7 +82,7 @@ export declare class Hocuspocus {
|
|
|
82
82
|
* Create a new document by the given request
|
|
83
83
|
*/
|
|
84
84
|
createDocument(documentName: string, request: Partial<Pick<IncomingMessage, 'headers' | 'url'>>, socketId: string, connection: ConnectionConfiguration, context?: any): Promise<Document>;
|
|
85
|
-
storeDocumentHooks(document: Document, hookPayload: onStoreDocumentPayload): void
|
|
85
|
+
storeDocumentHooks(document: Document, hookPayload: onStoreDocumentPayload): Promise<void>;
|
|
86
86
|
/**
|
|
87
87
|
* Run the given hook on all configured extensions.
|
|
88
88
|
* Runs the given callback after each hook.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hocuspocus/extension-webhook",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "hocuspocus webhook extension",
|
|
5
5
|
"homepage": "https://hocuspocus.dev",
|
|
6
6
|
"keywords": [
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@hocuspocus/common": "^2.
|
|
34
|
-
"@hocuspocus/server": "^2.
|
|
35
|
-
"@hocuspocus/transformer": "^2.
|
|
33
|
+
"@hocuspocus/common": "^2.7.1",
|
|
34
|
+
"@hocuspocus/server": "^2.7.1",
|
|
35
|
+
"@hocuspocus/transformer": "^2.7.1",
|
|
36
36
|
"axios": "^1.2.2"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|