@veltdev/sdk-dev 5.0.2-beta.29 → 5.0.2-beta.3
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/app/client/snippyly.model.d.ts +1 -10
- package/app/models/data/attachment-resolver.data.model.d.ts +2 -2
- package/app/models/data/attachment.model.d.ts +0 -1
- package/app/models/data/autocomplete.data.model.d.ts +3 -3
- package/app/models/data/base-metadata.data.model.d.ts +0 -3
- package/app/models/data/comment-actions.data.model.d.ts +0 -4
- package/app/models/data/comment-annotation.data.model.d.ts +3 -11
- package/app/models/data/comment-events.data.model.d.ts +4 -17
- package/app/models/data/comment-resolver.data.model.d.ts +3 -3
- package/app/models/data/config.data.model.d.ts +0 -5
- package/app/models/data/core-events.data.model.d.ts +1 -53
- package/app/models/data/crdt.data.model.d.ts +0 -51
- package/app/models/data/live-state-events.data.model.d.ts +0 -6
- package/app/models/data/notification.model.d.ts +0 -4
- package/app/models/data/provider.data.model.d.ts +1 -6
- package/app/models/data/reaction-resolver.data.model.d.ts +3 -3
- package/app/models/data/recorder-annotation.data.model.d.ts +0 -11
- package/app/models/data/resolver.data.model.d.ts +0 -1
- package/app/models/data/user-resolver.data.model.d.ts +1 -15
- package/app/models/element/comment-element.model.d.ts +0 -20
- package/app/models/element/crdt-element.model.d.ts +1 -88
- package/app/utils/constants.d.ts +0 -31
- package/app/utils/enums.d.ts +4 -23
- package/models.d.ts +0 -3
- package/package.json +1 -1
- package/types.d.ts +0 -1
- package/velt.js +116 -116
- package/app/models/data/activity.data.model.d.ts +0 -177
- package/app/models/data/notification-resolver.data.model.d.ts +0 -38
- package/app/models/data/recorder-resolver.data.model.d.ts +0 -58
- package/app/models/element/activity-element.model.d.ts +0 -33
|
@@ -5,7 +5,6 @@ import { DocumentUser } from "../models/data/document-user.data.model";
|
|
|
5
5
|
import { Location } from "../models/data/location.model";
|
|
6
6
|
import { User, UserOptions, VeltAuthProvider, VeltPermissionProvider } from "../models/data/user.data.model";
|
|
7
7
|
import { CustomCss } from "../models/data/custom-css.data.model";
|
|
8
|
-
import { ActivityElement } from "../models/element/activity-element.model";
|
|
9
8
|
import { AreaElement } from "../models/element/area-element.model";
|
|
10
9
|
import { ArrowElement } from "../models/element/arrow-element.model";
|
|
11
10
|
import { CommentElement } from "../models/element/comment-element.model";
|
|
@@ -30,7 +29,7 @@ import { VeltEventMetadata, VeltDebugInfo } from "../models/data/event-metadata.
|
|
|
30
29
|
import { CoreEventTypesMap } from "../models/data/core-events.data.model";
|
|
31
30
|
import { Document, SetDocumentsRequestOptions, FetchDocumentsRequest, FetchFoldersRequest, UpdateDocumentsRequest, UpdateLocationsRequest } from "../models/data/document.data.model";
|
|
32
31
|
import { FetchDocumentsResponse, FetchFoldersResponse } from "../models/data/document-events.data.model";
|
|
33
|
-
import {
|
|
32
|
+
import { UserDataProvider, GetUserPermissionsRequest, GetUserPermissionsResponse } from "../models/data/user-resolver.data.model";
|
|
34
33
|
import { VeltDataProvider } from "../models/data/provider.data.model";
|
|
35
34
|
import { VeltEncryptionProvider } from "../models/data/encryption-provider.data.model";
|
|
36
35
|
import { VeltResetButtonStateConfig } from "../models/data/button.data.model";
|
|
@@ -98,10 +97,6 @@ export declare class Snippyly {
|
|
|
98
97
|
* To set the user data provider.
|
|
99
98
|
*/
|
|
100
99
|
setUserDataProvider: (userDataProvider: UserDataProvider) => void;
|
|
101
|
-
/**
|
|
102
|
-
* To set the anonymous user data provider.
|
|
103
|
-
*/
|
|
104
|
-
setAnonymousUserDataProvider: (resolver: AnonymousUserDataProvider, config?: { ha?: boolean }) => void;
|
|
105
100
|
/**
|
|
106
101
|
* To set the data provider.
|
|
107
102
|
*/
|
|
@@ -233,10 +228,6 @@ export declare class Snippyly {
|
|
|
233
228
|
* Get the Autocomplete Object.
|
|
234
229
|
*/
|
|
235
230
|
getAutocompleteElement: () => AutocompleteElement;
|
|
236
|
-
/**
|
|
237
|
-
* Get the Activity Element Object.
|
|
238
|
-
*/
|
|
239
|
-
getActivityElement: () => ActivityElement;
|
|
240
231
|
/**
|
|
241
232
|
* Get the Area Object.
|
|
242
233
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ResolverActions } from "../../utils/enums";
|
|
2
2
|
import { ResolverConfig, ResolverResponse } from "./resolver.data.model";
|
|
3
3
|
export interface AttachmentDataProvider {
|
|
4
|
-
save
|
|
5
|
-
delete
|
|
4
|
+
save: (request: SaveAttachmentResolverRequest) => Promise<ResolverResponse<SaveAttachmentResolverData>>;
|
|
5
|
+
delete: (request: DeleteAttachmentResolverRequest) => Promise<ResolverResponse<undefined>>;
|
|
6
6
|
config?: ResolverConfig;
|
|
7
7
|
}
|
|
8
8
|
export interface DeleteAttachmentResolverRequest {
|
|
@@ -22,17 +22,17 @@ export declare class AutocompleteItem {
|
|
|
22
22
|
groupId?: string;
|
|
23
23
|
}
|
|
24
24
|
export declare class AutocompleteReplaceData {
|
|
25
|
-
text
|
|
25
|
+
text: string;
|
|
26
26
|
custom: AutocompleteItem;
|
|
27
27
|
}
|
|
28
28
|
export declare class AutocompleteGroupReplaceData {
|
|
29
|
-
text
|
|
29
|
+
text: string;
|
|
30
30
|
groupId: string;
|
|
31
31
|
clientGroupId: string;
|
|
32
32
|
group?: OrganizationUserGroup;
|
|
33
33
|
}
|
|
34
34
|
export declare class AutocompleteUserContactReplaceData {
|
|
35
|
-
text
|
|
35
|
+
text: string;
|
|
36
36
|
userId: string;
|
|
37
37
|
contact?: UserContact;
|
|
38
38
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DocumentMetadata } from './document-metadata.model';
|
|
2
1
|
export declare class BaseMetadata {
|
|
3
2
|
apiKey?: string;
|
|
4
3
|
documentId?: string;
|
|
@@ -7,6 +6,4 @@ export declare class BaseMetadata {
|
|
|
7
6
|
clientOrganizationId?: string;
|
|
8
7
|
folderId?: string;
|
|
9
8
|
veltFolderId?: string;
|
|
10
|
-
documentMetadata?: DocumentMetadata;
|
|
11
|
-
sdkVersion?: string | null;
|
|
12
9
|
}
|
|
@@ -125,8 +125,6 @@ export interface CommentRequestQuery {
|
|
|
125
125
|
batchedPerDocument?: boolean;
|
|
126
126
|
/** Debounce time in ms for batchedPerDocument mode (default: 5000). */
|
|
127
127
|
debounceMs?: number;
|
|
128
|
-
/** Filter annotations by agent fields. Matches annotations where `agent.agentFields` array contains any of the provided values. */
|
|
129
|
-
agentFields?: string[];
|
|
130
128
|
}
|
|
131
129
|
export interface SubscribeCommentAnnotationRequest {
|
|
132
130
|
annotationId: string;
|
|
@@ -147,8 +145,6 @@ export interface AddCommentRequest {
|
|
|
147
145
|
assignedTo?: User;
|
|
148
146
|
assigned?: boolean;
|
|
149
147
|
options?: RequestOptions;
|
|
150
|
-
/** Optional visibility configuration for the comment */
|
|
151
|
-
visibility?: CommentVisibilityConfig;
|
|
152
148
|
}
|
|
153
149
|
export interface UpdateCommentRequest {
|
|
154
150
|
annotationId: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { CommentAccessMode
|
|
1
|
+
import { CommentAccessMode } from "../../utils/enums";
|
|
2
2
|
import { BaseMetadata } from "./base-metadata.data.model";
|
|
3
|
-
import { CommentVisibilityType } from "./comment-actions.data.model";
|
|
4
3
|
import { Comment } from "./comment.data.model";
|
|
5
4
|
import { CursorPosition } from "./cursor-position.data.model";
|
|
6
5
|
import { CustomAnnotationDropdownItem } from "./custom-chip-dropdown.data.model";
|
|
@@ -11,11 +10,6 @@ import { TargetElement } from "./target-element.data.model";
|
|
|
11
10
|
import { TargetTextRange } from "./target-text-range.data.model";
|
|
12
11
|
import { User } from "./user.data.model";
|
|
13
12
|
import { CommentAnnotationViews } from "./views.data.model";
|
|
14
|
-
export interface CommentAnnotationVisibilityConfig {
|
|
15
|
-
type: CommentVisibilityType;
|
|
16
|
-
organizationId?: string;
|
|
17
|
-
userIds?: string[];
|
|
18
|
-
}
|
|
19
13
|
export declare class CommentAnnotation {
|
|
20
14
|
/**
|
|
21
15
|
* Unique identifier for the comment pin annotation.
|
|
@@ -29,7 +23,6 @@ export declare class CommentAnnotation {
|
|
|
29
23
|
* Auto generated.
|
|
30
24
|
*/
|
|
31
25
|
annotationNumber?: number;
|
|
32
|
-
visibilityConfig?: CommentAnnotationVisibilityConfig;
|
|
33
26
|
/**
|
|
34
27
|
* This is the list of all comments part of this annotation.
|
|
35
28
|
*
|
|
@@ -239,10 +232,9 @@ export declare class CommentSelectionChangeData {
|
|
|
239
232
|
selected: boolean;
|
|
240
233
|
annotation: CommentAnnotation;
|
|
241
234
|
}
|
|
242
|
-
export declare class
|
|
235
|
+
export declare class LocationClickedData {
|
|
243
236
|
annotationId: string;
|
|
244
|
-
|
|
245
|
-
users?: any[];
|
|
237
|
+
location: 'public' | 'private';
|
|
246
238
|
}
|
|
247
239
|
export declare class InlineCommentSectionConfig {
|
|
248
240
|
id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssignToType, CommentAccessMode, CommentEventTypes, CommentStatus
|
|
1
|
+
import { AssignToType, CommentAccessMode, CommentEventTypes, CommentStatus } from "../../utils/enums";
|
|
2
2
|
import { Attachment } from "./attachment.model";
|
|
3
3
|
import { VeltButtonClickEvent } from "./button.data.model";
|
|
4
4
|
import { AddAttachmentResponse } from "./comment-actions.data.model";
|
|
@@ -85,13 +85,10 @@ export type CommentEventTypesMap = {
|
|
|
85
85
|
[CommentEventTypes.COMMENT_PIN_CLICKED]: CommentPinClickedEvent;
|
|
86
86
|
[CommentEventTypes.COMMENT_BUBBLE_CLICKED]: CommentBubbleClickedEvent;
|
|
87
87
|
[CommentEventTypes.COMMENT_TOOL_CLICK]: CommentToolClickEvent;
|
|
88
|
-
[CommentEventTypes.COMMENT_TOOL_CLICKED]: CommentToolClickedEvent;
|
|
89
88
|
[CommentEventTypes.SIDEBAR_BUTTON_CLICK]: SidebarButtonClickEvent;
|
|
90
|
-
[CommentEventTypes.SIDEBAR_BUTTON_CLICKED]: SidebarButtonClickedEvent;
|
|
91
89
|
[CommentEventTypes.ATTACHMENT_DOWNLOAD_CLICKED]: AttachmentDownloadClickedEvent;
|
|
92
90
|
[CommentEventTypes.COMMENT_SAVED]: CommentSavedEvent;
|
|
93
|
-
[CommentEventTypes.
|
|
94
|
-
[CommentEventTypes.VISIBILITY_OPTION_CLICKED]: VisibilityOptionClickedEvent;
|
|
91
|
+
[CommentEventTypes.LOCATION_CLICKED]: LocationClickedEvent;
|
|
95
92
|
};
|
|
96
93
|
export interface AddAttachmentEvent {
|
|
97
94
|
annotationId: string;
|
|
@@ -191,11 +188,6 @@ export interface CommentSavedEvent {
|
|
|
191
188
|
commentAnnotation: CommentAnnotation;
|
|
192
189
|
metadata: VeltEventMetadata;
|
|
193
190
|
}
|
|
194
|
-
export interface CommentSaveTriggeredEvent {
|
|
195
|
-
annotationId: string;
|
|
196
|
-
commentAnnotation: CommentAnnotation;
|
|
197
|
-
metadata: VeltEventMetadata;
|
|
198
|
-
}
|
|
199
191
|
export interface UpdateCommentEvent {
|
|
200
192
|
annotationId: string;
|
|
201
193
|
commentAnnotation: CommentAnnotation;
|
|
@@ -322,23 +314,18 @@ export interface CommentToolClickEvent {
|
|
|
322
314
|
targetElementId?: string | null;
|
|
323
315
|
metadata?: VeltEventMetadata;
|
|
324
316
|
}
|
|
325
|
-
export interface CommentToolClickedEvent extends CommentToolClickEvent {
|
|
326
|
-
}
|
|
327
317
|
export interface SidebarButtonClickEvent {
|
|
328
318
|
metadata?: VeltEventMetadata;
|
|
329
319
|
}
|
|
330
|
-
export interface SidebarButtonClickedEvent extends SidebarButtonClickEvent {
|
|
331
|
-
}
|
|
332
320
|
export interface AttachmentDownloadClickedEvent {
|
|
333
321
|
annotationId: string;
|
|
334
322
|
commentAnnotation: CommentAnnotation;
|
|
335
323
|
attachment: Attachment;
|
|
336
324
|
metadata?: VeltEventMetadata;
|
|
337
325
|
}
|
|
338
|
-
export interface
|
|
326
|
+
export interface LocationClickedEvent {
|
|
339
327
|
annotationId: string;
|
|
340
328
|
commentAnnotation: CommentAnnotation;
|
|
341
|
-
|
|
342
|
-
users?: any[];
|
|
329
|
+
location: 'public' | 'private';
|
|
343
330
|
metadata?: VeltEventMetadata;
|
|
344
331
|
}
|
|
@@ -4,9 +4,9 @@ import { BaseMetadata } from "./base-metadata.data.model";
|
|
|
4
4
|
import { CommentAnnotation } from "./comment-annotation.data.model";
|
|
5
5
|
import { ResolverConfig, ResolverResponse } from "./resolver.data.model";
|
|
6
6
|
export interface CommentAnnotationDataProvider {
|
|
7
|
-
get
|
|
8
|
-
save
|
|
9
|
-
delete
|
|
7
|
+
get: (request: GetCommentResolverRequest) => Promise<ResolverResponse<Record<string, PartialCommentAnnotation>>>;
|
|
8
|
+
save: (request: SaveCommentResolverRequest) => Promise<ResolverResponse<undefined>>;
|
|
9
|
+
delete: (request: DeleteCommentResolverRequest) => Promise<ResolverResponse<undefined>>;
|
|
10
10
|
config?: ResolverConfig;
|
|
11
11
|
}
|
|
12
12
|
export interface GetCommentResolverRequest {
|
|
@@ -7,8 +7,6 @@ export type CoreEventTypesMap = {
|
|
|
7
7
|
[CoreEventTypes.COMMENT_RESOLVER]: CommentResolverEvent;
|
|
8
8
|
[CoreEventTypes.ATTACHMENT_RESOLVER]: AttachmentResolverEvent;
|
|
9
9
|
[CoreEventTypes.REACTION_RESOLVER]: ReactionResolverEvent;
|
|
10
|
-
[CoreEventTypes.RECORDER_RESOLVER]: RecorderResolverEvent;
|
|
11
|
-
[CoreEventTypes.NOTIFICATION_RESOLVER]: NotificationResolverEvent;
|
|
12
10
|
[CoreEventTypes.VELT_BUTTON_CLICK]: VeltButtonClickEvent;
|
|
13
11
|
[CoreEventTypes.USER_UPDATE]: UserUpdateEvent;
|
|
14
12
|
[CoreEventTypes.DOCUMENT_INIT]: DocumentInitEvent;
|
|
@@ -25,8 +23,7 @@ export declare enum UserResolverSource {
|
|
|
25
23
|
SET_SINGLE_EDITOR_MODE_LIVE_STATE_DATA_FOR_DIFFERENT_USER_PRESENT_ON_TAB = "setSingleEditorModeLiveStateDataForDifferentUserPresentOnTab",
|
|
26
24
|
RESOLVE_AND_MERGE_SINGLE_EDITOR_LIVE_STATE_DATA_WITH_USER = "resolveAndMergeSingleEditorLiveStateDataWithUser",
|
|
27
25
|
GET_SINGLE_EDITOR_MODE_DATA = "getSingleEditorModeData",
|
|
28
|
-
RESOLVE_USERS_FROM_HUDDLE_MESSAGES = "resolveUsersFromHuddleMessages"
|
|
29
|
-
RESOLVE_USER_IDS_BY_EMAIL = "resolveUserIdsByEmail"
|
|
26
|
+
RESOLVE_USERS_FROM_HUDDLE_MESSAGES = "resolveUsersFromHuddleMessages"
|
|
30
27
|
}
|
|
31
28
|
export declare enum UserResolverModuleName {
|
|
32
29
|
IDENTIFY = "identify/authProvider",
|
|
@@ -149,55 +146,6 @@ export type ReactionResolverEventType = {
|
|
|
149
146
|
REACTION_DELETE_RESULT: 'reactionDeleteResult';
|
|
150
147
|
REACTION_DELETE_ERROR: 'reactionDeleteError';
|
|
151
148
|
};
|
|
152
|
-
export declare enum RecorderResolverSource {
|
|
153
|
-
RESOLVE_RECORDER_ANNOTATIONS = "resolveRecorderAnnotations",
|
|
154
|
-
SAVE_RECORDER_ANNOTATION = "saveRecorderAnnotation",
|
|
155
|
-
DELETE_RECORDER_ANNOTATION = "deleteRecorderAnnotation",
|
|
156
|
-
FORMAT_RESPONSE = "formatResponse",
|
|
157
|
-
INIT_DOCUMENTS = "initDocuments",
|
|
158
|
-
SET_DATA = "setData",
|
|
159
|
-
UPDATE_DATA = "updateData",
|
|
160
|
-
DELETE_DATA = "deleteData"
|
|
161
|
-
}
|
|
162
|
-
export declare enum RecorderResolverModuleName {
|
|
163
|
-
GET_RECORDER_ANNOTATIONS = "getRecorderAnnotations"
|
|
164
|
-
}
|
|
165
|
-
export type RecorderResolverEvent = BaseResolverEvent<RecorderResolverEventType, RecorderResolverSource, RecorderResolverModuleName>;
|
|
166
|
-
export type RecorderResolverEventType = {
|
|
167
|
-
RECORDER_RESOLUTION_REQUEST_FORMED: 'recorderResolutionRequestFormed';
|
|
168
|
-
RECORDER_RESOLUTION_REQUEST_TRIGGERED: 'recorderResolutionRequestTriggered';
|
|
169
|
-
RECORDER_RESOLUTION_RESULT: 'recorderResolutionResult';
|
|
170
|
-
RECORDER_RESOLUTION_ERROR: 'recorderResolutionError';
|
|
171
|
-
RECORDER_RESOLUTION_RESULT_FROM_CACHE: 'recorderResolutionResultFromCache';
|
|
172
|
-
RECORDER_SAVE_REQUEST_FORMED: 'recorderSaveRequestFormed';
|
|
173
|
-
RECORDER_SAVE_REQUEST_TRIGGERED: 'recorderSaveRequestTriggered';
|
|
174
|
-
RECORDER_SAVE_RESULT: 'recorderSaveResult';
|
|
175
|
-
RECORDER_SAVE_ERROR: 'recorderSaveError';
|
|
176
|
-
RECORDER_DELETE_REQUEST_FORMED: 'recorderDeleteRequestFormed';
|
|
177
|
-
RECORDER_DELETE_REQUEST_TRIGGERED: 'recorderDeleteRequestTriggered';
|
|
178
|
-
RECORDER_DELETE_RESULT: 'recorderDeleteResult';
|
|
179
|
-
RECORDER_DELETE_ERROR: 'recorderDeleteError';
|
|
180
|
-
};
|
|
181
|
-
export declare enum NotificationResolverSource {
|
|
182
|
-
RESOLVE_NOTIFICATIONS = "resolveNotifications",
|
|
183
|
-
DELETE_NOTIFICATION = "deleteNotification",
|
|
184
|
-
DELETE_DATA = "deleteData",
|
|
185
|
-
FORMAT_RESPONSE = "formatResponse"
|
|
186
|
-
}
|
|
187
|
-
export declare enum NotificationResolverModuleName {
|
|
188
|
-
GET_NOTIFICATIONS = "getNotifications"
|
|
189
|
-
}
|
|
190
|
-
export type NotificationResolverEventType = {
|
|
191
|
-
NOTIFICATION_RESOLUTION_REQUEST_FORMED: 'notificationResolutionRequestFormed';
|
|
192
|
-
NOTIFICATION_RESOLUTION_REQUEST_TRIGGERED: 'notificationResolutionRequestTriggered';
|
|
193
|
-
NOTIFICATION_RESOLUTION_RESULT: 'notificationResolutionResult';
|
|
194
|
-
NOTIFICATION_RESOLUTION_ERROR: 'notificationResolutionError';
|
|
195
|
-
NOTIFICATION_DELETE_REQUEST_FORMED: 'notificationDeleteRequestFormed';
|
|
196
|
-
NOTIFICATION_DELETE_REQUEST_TRIGGERED: 'notificationDeleteRequestTriggered';
|
|
197
|
-
NOTIFICATION_DELETE_RESULT: 'notificationDeleteResult';
|
|
198
|
-
NOTIFICATION_DELETE_ERROR: 'notificationDeleteError';
|
|
199
|
-
};
|
|
200
|
-
export type NotificationResolverEvent = BaseResolverEvent<NotificationResolverEventType, NotificationResolverSource, NotificationResolverModuleName>;
|
|
201
149
|
export type ErrorEvent = {
|
|
202
150
|
event?: string;
|
|
203
151
|
sourceMethod?: string;
|
|
@@ -58,54 +58,3 @@ export interface CrdtDeleteVersionQuery {
|
|
|
58
58
|
id: string;
|
|
59
59
|
versionId: string;
|
|
60
60
|
}
|
|
61
|
-
export interface CrdtPushMessageQuery {
|
|
62
|
-
id: string;
|
|
63
|
-
data: number[];
|
|
64
|
-
yjsClientId: number;
|
|
65
|
-
messageType?: 'sync' | 'awareness';
|
|
66
|
-
/** User-facing value for event emission only (not stored in database) */
|
|
67
|
-
eventData?: unknown;
|
|
68
|
-
/** Yjs data type: 'text' | 'map' | 'array' | 'xml' | 'xmltext' */
|
|
69
|
-
type?: string;
|
|
70
|
-
/** Content key used in Y.Doc shared types */
|
|
71
|
-
contentKey?: string;
|
|
72
|
-
/** Editor/library source: 'tiptap', 'plate', 'codemirror', etc. */
|
|
73
|
-
source?: string;
|
|
74
|
-
}
|
|
75
|
-
export interface CrdtOnMessageQuery {
|
|
76
|
-
id: string;
|
|
77
|
-
callback: (message: CrdtMessageData) => void;
|
|
78
|
-
afterTs?: number;
|
|
79
|
-
}
|
|
80
|
-
export interface CrdtMessageData {
|
|
81
|
-
data: number[];
|
|
82
|
-
yjsClientId: number;
|
|
83
|
-
timestamp: number;
|
|
84
|
-
}
|
|
85
|
-
export interface CrdtSnapshotData {
|
|
86
|
-
state?: Uint8Array | number[];
|
|
87
|
-
vector?: Uint8Array | number[];
|
|
88
|
-
timestamp?: number;
|
|
89
|
-
}
|
|
90
|
-
export interface CrdtGetSnapshotQuery {
|
|
91
|
-
id: string;
|
|
92
|
-
}
|
|
93
|
-
export interface CrdtSaveSnapshotQuery {
|
|
94
|
-
id: string;
|
|
95
|
-
state: Uint8Array | number[];
|
|
96
|
-
vector: Uint8Array | number[];
|
|
97
|
-
/** Yjs data type: 'text' | 'map' | 'array' | 'xml' | 'xmltext' */
|
|
98
|
-
type?: string;
|
|
99
|
-
/** Content key used in Y.Doc shared types */
|
|
100
|
-
contentKey?: string;
|
|
101
|
-
/** Editor/library source: 'tiptap', 'plate', 'codemirror', etc. */
|
|
102
|
-
source?: string;
|
|
103
|
-
}
|
|
104
|
-
export interface CrdtGetMessagesQuery {
|
|
105
|
-
id: string;
|
|
106
|
-
afterTs?: number;
|
|
107
|
-
}
|
|
108
|
-
export interface CrdtPruneMessagesQuery {
|
|
109
|
-
id: string;
|
|
110
|
-
beforeTs: number;
|
|
111
|
-
}
|
|
@@ -5,18 +5,12 @@ export interface AccessRequestEvent {
|
|
|
5
5
|
editor?: User;
|
|
6
6
|
timestamp?: number;
|
|
7
7
|
status?: string;
|
|
8
|
-
totalUsers?: number;
|
|
9
|
-
presenceSnippylyUserIds?: string[];
|
|
10
|
-
presenceClientUserIds?: string[];
|
|
11
8
|
}
|
|
12
9
|
export interface SEMEvent {
|
|
13
10
|
viewer?: User;
|
|
14
11
|
editor?: User;
|
|
15
12
|
timestamp?: number;
|
|
16
13
|
role?: string;
|
|
17
|
-
totalUsers?: number;
|
|
18
|
-
presenceSnippylyUserIds?: string[];
|
|
19
|
-
presenceClientUserIds?: string[];
|
|
20
14
|
}
|
|
21
15
|
export type LiveStateEventTypesMap = {
|
|
22
16
|
[LiveStateSyncEventTypes.ACCESS_REQUESTED]: AccessRequestEvent;
|
|
@@ -137,10 +137,6 @@ export declare class Notification {
|
|
|
137
137
|
* Is comment text available
|
|
138
138
|
*/
|
|
139
139
|
isCommentResolverUsed?: boolean;
|
|
140
|
-
/**
|
|
141
|
-
* Is notification resolver used
|
|
142
|
-
*/
|
|
143
|
-
isNotificationResolverUsed?: boolean;
|
|
144
140
|
/**
|
|
145
141
|
* Display body message template
|
|
146
142
|
*/
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { CommentAnnotationDataProvider } from "./comment-resolver.data.model";
|
|
2
2
|
import { AttachmentDataProvider } from "./attachment-resolver.data.model";
|
|
3
|
-
import { NotificationDataProvider } from "./notification-resolver.data.model";
|
|
4
3
|
import { ReactionAnnotationDataProvider } from "./reaction-resolver.data.model";
|
|
5
|
-
import {
|
|
6
|
-
import { AnonymousUserDataProvider, UserDataProvider } from "./user-resolver.data.model";
|
|
4
|
+
import { UserDataProvider } from "./user-resolver.data.model";
|
|
7
5
|
export interface VeltDataProvider {
|
|
8
6
|
comment?: CommentAnnotationDataProvider;
|
|
9
7
|
user?: UserDataProvider;
|
|
10
8
|
reaction?: ReactionAnnotationDataProvider;
|
|
11
9
|
attachment?: AttachmentDataProvider;
|
|
12
|
-
anonymousUser?: AnonymousUserDataProvider;
|
|
13
|
-
recorder?: RecorderAnnotationDataProvider;
|
|
14
|
-
notification?: NotificationDataProvider;
|
|
15
10
|
}
|
|
@@ -4,9 +4,9 @@ import { PartialUser } from "./comment-resolver.data.model";
|
|
|
4
4
|
import { ReactionAnnotation } from "./reaction-annotation.data.model";
|
|
5
5
|
import { ResolverConfig, ResolverResponse } from "./resolver.data.model";
|
|
6
6
|
export interface ReactionAnnotationDataProvider {
|
|
7
|
-
get
|
|
8
|
-
save
|
|
9
|
-
delete
|
|
7
|
+
get: (request: GetReactionResolverRequest) => Promise<ResolverResponse<Record<string, PartialReactionAnnotation>>>;
|
|
8
|
+
save: (request: SaveReactionResolverRequest) => Promise<ResolverResponse<undefined>>;
|
|
9
|
+
delete: (request: DeleteReactionResolverRequest) => Promise<ResolverResponse<undefined>>;
|
|
10
10
|
config?: ResolverConfig;
|
|
11
11
|
}
|
|
12
12
|
export interface GetReactionResolverRequest {
|
|
@@ -150,17 +150,6 @@ export declare class RecorderAnnotation {
|
|
|
150
150
|
chunkUrls?: {
|
|
151
151
|
[key: number]: string;
|
|
152
152
|
};
|
|
153
|
-
/**
|
|
154
|
-
* Whether the recorder resolver is used for this annotation.
|
|
155
|
-
* Used by UI components to show loading states while resolver data is being fetched.
|
|
156
|
-
*/
|
|
157
|
-
isRecorderResolverUsed?: boolean;
|
|
158
|
-
/**
|
|
159
|
-
* Whether the real recording URL is available.
|
|
160
|
-
* Set to false when the annotation is first saved (URL is still a local blob),
|
|
161
|
-
* and true once the actual URL from storage is available after the async upload completes.
|
|
162
|
-
*/
|
|
163
|
-
isUrlAvailable?: boolean;
|
|
164
153
|
}
|
|
165
154
|
export interface RecorderAnnotationEditVersion {
|
|
166
155
|
from?: User;
|
|
@@ -9,7 +9,6 @@ export interface ResolverConfig {
|
|
|
9
9
|
getRetryConfig?: RetryConfig;
|
|
10
10
|
resolveUsersConfig?: ResolveUsersConfig;
|
|
11
11
|
fieldsToRemove?: string[];
|
|
12
|
-
additionalFields?: string[];
|
|
13
12
|
getConfig?: ResolverEndpointConfig;
|
|
14
13
|
saveConfig?: ResolverEndpointConfig;
|
|
15
14
|
deleteConfig?: ResolverEndpointConfig;
|
|
@@ -1,24 +1,10 @@
|
|
|
1
|
-
import { ResolverConfig
|
|
1
|
+
import { ResolverConfig } from "./resolver.data.model";
|
|
2
2
|
import { User } from "./user.data.model";
|
|
3
3
|
export interface UserDataProvider {
|
|
4
4
|
get(userIds: string[]): Promise<Record<string, User>>;
|
|
5
5
|
config?: ResolverConfig;
|
|
6
6
|
resolveTimeout?: number;
|
|
7
7
|
}
|
|
8
|
-
export interface AnonymousUserDataProvider {
|
|
9
|
-
resolveUserIdsByEmail(request: ResolveUserIdsByEmailRequest): Promise<ResolverResponse<Record<string, string>>>;
|
|
10
|
-
config?: AnonymousUserDataProviderConfig;
|
|
11
|
-
}
|
|
12
|
-
export interface AnonymousUserDataProviderConfig {
|
|
13
|
-
resolveTimeout?: number;
|
|
14
|
-
getRetryConfig?: RetryConfig;
|
|
15
|
-
}
|
|
16
|
-
export interface ResolveUserIdsByEmailRequest {
|
|
17
|
-
organizationId: string;
|
|
18
|
-
documentId?: string;
|
|
19
|
-
folderId?: string;
|
|
20
|
-
emails: string[];
|
|
21
|
-
}
|
|
22
8
|
export interface GetUserResolverRequest {
|
|
23
9
|
organizationId: string;
|
|
24
10
|
userIds: string[];
|
|
@@ -290,16 +290,6 @@ export declare class CommentElement {
|
|
|
290
290
|
*/
|
|
291
291
|
public disableStatus: () => any;
|
|
292
292
|
|
|
293
|
-
/**
|
|
294
|
-
* To enable visibility options on comments
|
|
295
|
-
*/
|
|
296
|
-
public enableVisibilityOptions: () => any;
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* To disable visibility options on comments
|
|
300
|
-
*/
|
|
301
|
-
public disableVisibilityOptions: () => any;
|
|
302
|
-
|
|
303
293
|
/**
|
|
304
294
|
* To enable feature to show resolve button
|
|
305
295
|
*/
|
|
@@ -1630,16 +1620,6 @@ export declare class CommentElement {
|
|
|
1630
1620
|
*/
|
|
1631
1621
|
private _disableStatus;
|
|
1632
1622
|
|
|
1633
|
-
/**
|
|
1634
|
-
* To enable visibility options on comments
|
|
1635
|
-
*/
|
|
1636
|
-
private _enableVisibilityOptions;
|
|
1637
|
-
|
|
1638
|
-
/**
|
|
1639
|
-
* To disable visibility options on comments
|
|
1640
|
-
*/
|
|
1641
|
-
private _disableVisibilityOptions;
|
|
1642
|
-
|
|
1643
1623
|
/**
|
|
1644
1624
|
* To enable feature to show resolve button
|
|
1645
1625
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { CrdtGetDataQuery,
|
|
2
|
+
import { CrdtGetDataQuery, CrdtGetVersionQuery, CrdtOnDataChangeQuery, CrdtOnPresenceChangeQuery, CrdtOnRegisteredUserChangeQuery, CrdtOnStateChangeQuery, CrdtRegisterSyncUserQuery, CrdtSetPresenceQuery, CrdtSaveVersionQuery, CrdtUpdateDataQuery, CrdtUpdateStateQuery } from "../data/crdt.data.model";
|
|
3
3
|
import { CrdtEventTypesMap } from "../data/crdt-events.data.model";
|
|
4
4
|
|
|
5
5
|
export declare class CrdtElement {
|
|
@@ -80,12 +80,6 @@ export declare class CrdtElement {
|
|
|
80
80
|
*/
|
|
81
81
|
getVersion: (getVersionQuery: CrdtGetVersionQuery) => Promise<any>;
|
|
82
82
|
|
|
83
|
-
/**
|
|
84
|
-
* Get all versions of a specific CRDT document
|
|
85
|
-
* @param id Document ID
|
|
86
|
-
*/
|
|
87
|
-
getVersions: (getVersionsQuery: CrdtGetVersionsQuery) => Promise<any>;
|
|
88
|
-
|
|
89
83
|
/**
|
|
90
84
|
* Enable webhook
|
|
91
85
|
*/
|
|
@@ -102,51 +96,6 @@ export declare class CrdtElement {
|
|
|
102
96
|
*/
|
|
103
97
|
setWebhookDebounceTime: (time: number) => void;
|
|
104
98
|
|
|
105
|
-
/**
|
|
106
|
-
* Push a lib0-encoded message to the unified message stream.
|
|
107
|
-
* Uses Firebase push() for chronologically-ordered keys.
|
|
108
|
-
* Carries both sync (type 0) and awareness (type 1) messages.
|
|
109
|
-
* @param pushMessageQuery - contains id, data (encoded bytes), yjsClientId (Y.Doc client ID), optional messageType and eventData
|
|
110
|
-
*/
|
|
111
|
-
pushMessage: (pushMessageQuery: CrdtPushMessageQuery) => Promise<void>;
|
|
112
|
-
/**
|
|
113
|
-
* Subscribe to the unified message stream for real-time sync.
|
|
114
|
-
* Emits each new message individually as it arrives (streaming pattern).
|
|
115
|
-
* Returns an unsubscribe function.
|
|
116
|
-
* @param onMessageQuery - contains id, callback, and optional afterTs for filtering
|
|
117
|
-
*/
|
|
118
|
-
onMessage: (onMessageQuery: CrdtOnMessageQuery) => () => void;
|
|
119
|
-
/**
|
|
120
|
-
* Fetch all messages after a given timestamp (one-time read).
|
|
121
|
-
* Used for message replay during initial load (y-redis pattern).
|
|
122
|
-
* @param getMessagesQuery - contains id and optional afterTs
|
|
123
|
-
*/
|
|
124
|
-
getMessages: (getMessagesQuery: CrdtGetMessagesQuery) => Promise<CrdtMessageData[]>;
|
|
125
|
-
/**
|
|
126
|
-
* Get the latest full-state snapshot for a document.
|
|
127
|
-
* Used as the baseline for message replay during initial load.
|
|
128
|
-
* @param getSnapshotQuery - contains id
|
|
129
|
-
*/
|
|
130
|
-
getSnapshot: (getSnapshotQuery: CrdtGetSnapshotQuery) => Promise<CrdtSnapshotData | null>;
|
|
131
|
-
/**
|
|
132
|
-
* Save a full-state snapshot (state + vector) for fast initial load.
|
|
133
|
-
* Called periodically to create checkpoints, enabling message pruning.
|
|
134
|
-
* @param saveSnapshotQuery - contains id, state (Y.Doc update), and vector (state vector)
|
|
135
|
-
*/
|
|
136
|
-
saveSnapshot: (saveSnapshotQuery: CrdtSaveSnapshotQuery) => Promise<void>;
|
|
137
|
-
/**
|
|
138
|
-
* Remove messages older than the given timestamp from the message stream.
|
|
139
|
-
* Called after saving a snapshot to keep the message stream bounded.
|
|
140
|
-
* @param pruneMessagesQuery - contains id and beforeTs
|
|
141
|
-
*/
|
|
142
|
-
pruneMessages: (pruneMessagesQuery: CrdtPruneMessagesQuery) => Promise<void>;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* To set activity debounce time for batching CRDT edits (Default value is 10 minutes)
|
|
146
|
-
* @param time debounce time in milliseconds (minimum: 10 seconds)
|
|
147
|
-
*/
|
|
148
|
-
setActivityDebounceTime: (time: number) => void;
|
|
149
|
-
|
|
150
99
|
/**
|
|
151
100
|
* Subscribe to crdt actions
|
|
152
101
|
* @param action Action to subscribe to
|
|
@@ -239,36 +188,6 @@ export declare class CrdtElement {
|
|
|
239
188
|
*/
|
|
240
189
|
private _getVersions;
|
|
241
190
|
|
|
242
|
-
/**
|
|
243
|
-
* Push a message to the unified message stream
|
|
244
|
-
*/
|
|
245
|
-
private _pushMessage;
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Subscribe to the unified message stream
|
|
249
|
-
*/
|
|
250
|
-
private _onMessage;
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Fetch all messages after a given timestamp
|
|
254
|
-
*/
|
|
255
|
-
private _getMessages;
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Get the latest snapshot for a document
|
|
259
|
-
*/
|
|
260
|
-
private _getSnapshot;
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Save a full-state snapshot
|
|
264
|
-
*/
|
|
265
|
-
private _saveSnapshot;
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Remove messages older than a given timestamp
|
|
269
|
-
*/
|
|
270
|
-
private _pruneMessages;
|
|
271
|
-
|
|
272
191
|
/**
|
|
273
192
|
* Enable webhook
|
|
274
193
|
*/
|
|
@@ -285,12 +204,6 @@ export declare class CrdtElement {
|
|
|
285
204
|
*/
|
|
286
205
|
private _setWebhookDebounceTime;
|
|
287
206
|
|
|
288
|
-
/**
|
|
289
|
-
* Set activity debounce time for batching CRDT edits
|
|
290
|
-
* @param time debounce time in milliseconds (minimum: 10 seconds)
|
|
291
|
-
*/
|
|
292
|
-
private _setActivityDebounceTime;
|
|
293
|
-
|
|
294
207
|
/**
|
|
295
208
|
* Subscribe to crdt actions
|
|
296
209
|
* @param action Action to subscribe to
|