@hocuspocus/extension-webhook 1.0.0-alpha.65 → 1.0.0-alpha.66
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.
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { Extension, onChangePayload, onLoadDocumentPayload, storePayload } from '@hocuspocus/server';
|
|
1
|
+
import { Extension, onChangePayload, onLoadDocumentPayload, storePayload, fetchPayload } from '@hocuspocus/server';
|
|
2
2
|
export interface DatabaseConfiguration {
|
|
3
3
|
/**
|
|
4
4
|
* Pass a Promise to retrieve updates from your database. The Promise should resolve to
|
|
5
5
|
* an array of items with Y.js-compatible binary data.
|
|
6
6
|
*/
|
|
7
|
-
fetch: (
|
|
8
|
-
documentName: string;
|
|
9
|
-
}) => Promise<Uint8Array | null>;
|
|
7
|
+
fetch: (data: fetchPayload) => Promise<Uint8Array | null>;
|
|
10
8
|
/**
|
|
11
9
|
* Pass a function to store updates in your database.
|
|
12
10
|
*/
|
|
@@ -24,7 +22,7 @@ export declare class Database implements Extension {
|
|
|
24
22
|
/**
|
|
25
23
|
* Get stored data from the database.
|
|
26
24
|
*/
|
|
27
|
-
onLoadDocument(
|
|
25
|
+
onLoadDocument(data: onLoadDocumentPayload): Promise<any>;
|
|
28
26
|
/**
|
|
29
27
|
* Store new updates in the database.
|
|
30
28
|
*/
|
|
@@ -48,7 +48,7 @@ export declare type HookName = 'onConfigure' | 'onListen' | 'onUpgrade' | 'onCon
|
|
|
48
48
|
* @deprecated onCreateDocument is deprecated, use onLoadDocument instead
|
|
49
49
|
*/
|
|
50
50
|
'onCreateDocument' | 'onLoadDocument' | 'afterLoadDocument' | 'onChange' | 'onStoreDocument' | 'afterStoreDocument' | 'onAwarenessUpdate' | 'onRequest' | 'onDisconnect' | 'onDestroy';
|
|
51
|
-
export declare type HookPayload = onConfigurePayload | onListenPayload | onUpgradePayload | onConnectPayload | connectedPayload | onAuthenticatePayload | onLoadDocumentPayload |
|
|
51
|
+
export declare type HookPayload = onConfigurePayload | onListenPayload | onUpgradePayload | onConnectPayload | connectedPayload | onAuthenticatePayload | onLoadDocumentPayload | onChangePayload | onStoreDocumentPayload | afterStoreDocumentPayload | onAwarenessUpdatePayload | onRequestPayload | onDisconnectPayload | onDestroyPayload;
|
|
52
52
|
export interface Configuration extends Extension {
|
|
53
53
|
/**
|
|
54
54
|
* A name for the instance, used for logging.
|
|
@@ -179,6 +179,16 @@ export declare type StatesArray = {
|
|
|
179
179
|
clientId: number;
|
|
180
180
|
[key: string | number]: any;
|
|
181
181
|
}[];
|
|
182
|
+
export interface fetchPayload {
|
|
183
|
+
context: any;
|
|
184
|
+
document: Document;
|
|
185
|
+
documentName: string;
|
|
186
|
+
instance: Hocuspocus;
|
|
187
|
+
requestHeaders: IncomingHttpHeaders;
|
|
188
|
+
requestParameters: URLSearchParams;
|
|
189
|
+
socketId: string;
|
|
190
|
+
connection: ConnectionConfiguration;
|
|
191
|
+
}
|
|
182
192
|
export interface storePayload extends onStoreDocumentPayload {
|
|
183
193
|
state: Buffer;
|
|
184
194
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hocuspocus/extension-webhook",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.66",
|
|
4
4
|
"description": "hocuspocus webhook extension",
|
|
5
5
|
"homepage": "https://hocuspocus.dev",
|
|
6
6
|
"keywords": [
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@hocuspocus/server": "^1.0.0-alpha.
|
|
32
|
+
"@hocuspocus/server": "^1.0.0-alpha.102",
|
|
33
33
|
"@hocuspocus/transformer": "^1.0.0-alpha.23",
|
|
34
34
|
"axios": "^0.26.1",
|
|
35
35
|
"yjs": "^13.5.29"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "450e12c89b027bc62683f151330a98074cd8e8fb"
|
|
38
38
|
}
|