@hocuspocus/extension-webhook 2.9.1-rc.0 → 2.10.0
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/provider/src/HocuspocusProvider.d.ts +1 -1
- package/dist/packages/provider/src/HocuspocusProviderWebsocket.d.ts +1 -1
- package/dist/packages/provider/src/TiptapCollabProvider.d.ts +16 -1
- package/dist/packages/provider/src/types.d.ts +15 -0
- package/dist/playground/frontend/vite.config.d.ts +1 -1
- package/package.json +4 -4
|
@@ -121,7 +121,7 @@ export declare class HocuspocusProvider extends EventEmitter {
|
|
|
121
121
|
set synced(state: boolean);
|
|
122
122
|
receiveStateless(payload: string): void;
|
|
123
123
|
get isAuthenticationRequired(): boolean;
|
|
124
|
-
connect(): Promise<
|
|
124
|
+
connect(): Promise<any>;
|
|
125
125
|
disconnect(): void;
|
|
126
126
|
onOpen(event: Event): Promise<void>;
|
|
127
127
|
getToken(): Promise<string | null>;
|
|
@@ -102,7 +102,7 @@ export declare class HocuspocusProviderWebsocket extends EventEmitter {
|
|
|
102
102
|
receivedOnStatusPayload?: onStatusParameters | undefined;
|
|
103
103
|
onOpen(event: Event): Promise<void>;
|
|
104
104
|
onStatus(data: onStatusParameters): Promise<void>;
|
|
105
|
-
attach(provider: HocuspocusProvider):
|
|
105
|
+
attach(provider: HocuspocusProvider): Promise<any> | undefined;
|
|
106
106
|
detach(provider: HocuspocusProvider): void;
|
|
107
107
|
setConfiguration(configuration?: Partial<HocuspocusProviderWebsocketConfiguration>): void;
|
|
108
108
|
cancelWebsocketRetry?: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AbstractType, YArrayEvent } from 'yjs';
|
|
2
2
|
import { HocuspocusProvider, HocuspocusProviderConfiguration } from './HocuspocusProvider.js';
|
|
3
3
|
import { TiptapCollabProviderWebsocket } from './TiptapCollabProviderWebsocket.js';
|
|
4
|
-
import type { THistoryVersion } from './types.js';
|
|
4
|
+
import type { TCollabComment, TCollabThread, THistoryVersion } from './types.js';
|
|
5
5
|
export type TiptapCollabProviderConfiguration = Required<Pick<HocuspocusProviderConfiguration, 'name'>> & Partial<HocuspocusProviderConfiguration> & (Required<Pick<AdditionalTiptapCollabProviderConfiguration, 'websocketProvider'>> | Required<Pick<AdditionalTiptapCollabProviderConfiguration, 'appId'>> | Required<Pick<AdditionalTiptapCollabProviderConfiguration, 'baseUrl'>>);
|
|
6
6
|
export interface AdditionalTiptapCollabProviderConfiguration {
|
|
7
7
|
/**
|
|
@@ -40,4 +40,19 @@ export declare class TiptapCollabProvider extends HocuspocusProvider {
|
|
|
40
40
|
isAutoVersioning(): boolean;
|
|
41
41
|
enableAutoVersioning(): 1;
|
|
42
42
|
disableAutoVersioning(): 0;
|
|
43
|
+
private getYThreads;
|
|
44
|
+
getThreads<Data, CommentData>(): TCollabThread<Data, CommentData>[];
|
|
45
|
+
private getThreadIndex;
|
|
46
|
+
getThread<Data, CommentData>(id: string): TCollabThread<Data, CommentData> | null;
|
|
47
|
+
private getYThread;
|
|
48
|
+
createThread(data: Omit<TCollabThread, '_id' | 'createdAt' | 'updatedAt' | 'comments'>): TCollabThread | null;
|
|
49
|
+
updateThread(id: TCollabThread['id'], data: Partial<Pick<TCollabThread, 'data' | 'resolvedAt'>>): TCollabThread | null;
|
|
50
|
+
deleteThread(id: TCollabThread['id']): void;
|
|
51
|
+
getThreadComments(threadId: TCollabThread['id']): TCollabComment[] | null;
|
|
52
|
+
getThreadComment(threadId: TCollabThread['id'], commentId: TCollabComment['id']): TCollabComment | null;
|
|
53
|
+
addComment(threadId: TCollabThread['id'], data: Omit<TCollabComment, 'id' | 'updatedAt' | 'createdAt'>): TCollabThread | null;
|
|
54
|
+
updateComment(threadId: TCollabThread['id'], commentId: TCollabComment['id'], data: Partial<Pick<TCollabComment, 'data' | 'content'>>): TCollabThread | null;
|
|
55
|
+
deleteComment(threadId: TCollabThread['id'], commentId: TCollabComment['id']): TCollabThread | null;
|
|
56
|
+
watchThreads(callback: () => void): void;
|
|
57
|
+
unwatchThreads(callback: () => void): void;
|
|
43
58
|
}
|
|
@@ -84,6 +84,21 @@ export type StatesArray = {
|
|
|
84
84
|
clientId: number;
|
|
85
85
|
[key: string | number]: any;
|
|
86
86
|
}[];
|
|
87
|
+
export type TCollabThread<Data = any, CommentData = any> = {
|
|
88
|
+
id: string;
|
|
89
|
+
createdAt: number;
|
|
90
|
+
updatedAt: number;
|
|
91
|
+
resolvedAt?: string;
|
|
92
|
+
comments: TCollabComment<CommentData>[];
|
|
93
|
+
data: Data;
|
|
94
|
+
};
|
|
95
|
+
export type TCollabComment<Data = any> = {
|
|
96
|
+
id: string;
|
|
97
|
+
createdAt: number;
|
|
98
|
+
updatedAt: number;
|
|
99
|
+
data: Data;
|
|
100
|
+
content: any;
|
|
101
|
+
};
|
|
87
102
|
export type THistoryVersion = {
|
|
88
103
|
name?: string;
|
|
89
104
|
version: number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vite").
|
|
1
|
+
declare const _default: import("vite").UserConfig;
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hocuspocus/extension-webhook",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
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.10.0",
|
|
34
|
+
"@hocuspocus/server": "^2.10.0",
|
|
35
|
+
"@hocuspocus/transformer": "^2.10.0",
|
|
36
36
|
"axios": "^1.6.2"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|