@veltdev/sdk-staging 5.0.2-beta.2 → 5.0.2-beta.20
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 +10 -1
- package/app/models/data/activity.data.model.d.ts +177 -0
- package/app/models/data/autocomplete.data.model.d.ts +3 -3
- package/app/models/data/base-metadata.data.model.d.ts +3 -0
- package/app/models/data/comment-actions.data.model.d.ts +2 -0
- package/app/models/data/comment-annotation.data.model.d.ts +11 -3
- package/app/models/data/comment-events.data.model.d.ts +17 -4
- package/app/models/data/config.data.model.d.ts +5 -0
- package/app/models/data/core-events.data.model.d.ts +2 -1
- package/app/models/data/live-state-events.data.model.d.ts +6 -0
- package/app/models/data/provider.data.model.d.ts +2 -1
- package/app/models/data/user-resolver.data.model.d.ts +15 -1
- package/app/models/element/activity-element.model.d.ts +33 -0
- package/app/models/element/comment-element.model.d.ts +20 -0
- package/app/models/element/crdt-element.model.d.ts +11 -0
- package/app/utils/constants.d.ts +31 -0
- package/app/utils/enums.d.ts +17 -3
- package/models.d.ts +1 -0
- package/package.json +1 -1
- package/types.d.ts +1 -0
- package/velt.js +113 -113
|
@@ -5,6 +5,7 @@ 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";
|
|
8
9
|
import { AreaElement } from "../models/element/area-element.model";
|
|
9
10
|
import { ArrowElement } from "../models/element/arrow-element.model";
|
|
10
11
|
import { CommentElement } from "../models/element/comment-element.model";
|
|
@@ -29,7 +30,7 @@ import { VeltEventMetadata, VeltDebugInfo } from "../models/data/event-metadata.
|
|
|
29
30
|
import { CoreEventTypesMap } from "../models/data/core-events.data.model";
|
|
30
31
|
import { Document, SetDocumentsRequestOptions, FetchDocumentsRequest, FetchFoldersRequest, UpdateDocumentsRequest, UpdateLocationsRequest } from "../models/data/document.data.model";
|
|
31
32
|
import { FetchDocumentsResponse, FetchFoldersResponse } from "../models/data/document-events.data.model";
|
|
32
|
-
import { UserDataProvider, GetUserPermissionsRequest, GetUserPermissionsResponse } from "../models/data/user-resolver.data.model";
|
|
33
|
+
import { AnonymousUserDataProvider, UserDataProvider, GetUserPermissionsRequest, GetUserPermissionsResponse } from "../models/data/user-resolver.data.model";
|
|
33
34
|
import { VeltDataProvider } from "../models/data/provider.data.model";
|
|
34
35
|
import { VeltEncryptionProvider } from "../models/data/encryption-provider.data.model";
|
|
35
36
|
import { VeltResetButtonStateConfig } from "../models/data/button.data.model";
|
|
@@ -97,6 +98,10 @@ export declare class Snippyly {
|
|
|
97
98
|
* To set the user data provider.
|
|
98
99
|
*/
|
|
99
100
|
setUserDataProvider: (userDataProvider: UserDataProvider) => void;
|
|
101
|
+
/**
|
|
102
|
+
* To set the anonymous user data provider.
|
|
103
|
+
*/
|
|
104
|
+
setAnonymousUserDataProvider: (resolver: AnonymousUserDataProvider, config?: { ha?: boolean }) => void;
|
|
100
105
|
/**
|
|
101
106
|
* To set the data provider.
|
|
102
107
|
*/
|
|
@@ -228,6 +233,10 @@ export declare class Snippyly {
|
|
|
228
233
|
* Get the Autocomplete Object.
|
|
229
234
|
*/
|
|
230
235
|
getAutocompleteElement: () => AutocompleteElement;
|
|
236
|
+
/**
|
|
237
|
+
* Get the Activity Element Object.
|
|
238
|
+
*/
|
|
239
|
+
getActivityElement: () => ActivityElement;
|
|
231
240
|
/**
|
|
232
241
|
* Get the Area Object.
|
|
233
242
|
*/
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { BaseMetadata } from './base-metadata.data.model';
|
|
3
|
+
import { User } from './user.data.model';
|
|
4
|
+
/**
|
|
5
|
+
* Feature types that can generate activities.
|
|
6
|
+
*/
|
|
7
|
+
export type ActivityFeatureType = 'comment' | 'reaction' | 'recorder' | 'crdt' | 'custom';
|
|
8
|
+
/**
|
|
9
|
+
* Comment action type constants following the `entity_type.action` naming pattern.
|
|
10
|
+
* Annotation-level actions use `comment_annotation.*`, comment-level use `comment.*`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const CommentActivityActionTypes: {
|
|
13
|
+
readonly ANNOTATION_ADD: "comment_annotation.add";
|
|
14
|
+
readonly ANNOTATION_DELETE: "comment_annotation.delete";
|
|
15
|
+
readonly COMMENT_ADD: "comment.add";
|
|
16
|
+
readonly COMMENT_UPDATE: "comment.update";
|
|
17
|
+
readonly COMMENT_DELETE: "comment.delete";
|
|
18
|
+
readonly STATUS_CHANGE: "comment_annotation.status_change";
|
|
19
|
+
readonly PRIORITY_CHANGE: "comment_annotation.priority_change";
|
|
20
|
+
readonly ASSIGN: "comment_annotation.assign";
|
|
21
|
+
readonly ACCESS_MODE_CHANGE: "comment_annotation.access_mode_change";
|
|
22
|
+
readonly CUSTOM_LIST_CHANGE: "comment_annotation.custom_list_change";
|
|
23
|
+
readonly APPROVE: "comment_annotation.approve";
|
|
24
|
+
readonly ACCEPT: "comment.accept";
|
|
25
|
+
readonly REJECT: "comment.reject";
|
|
26
|
+
readonly REACTION_ADD: "comment.reaction_add";
|
|
27
|
+
readonly REACTION_DELETE: "comment.reaction_delete";
|
|
28
|
+
readonly SUBSCRIBE: "comment_annotation.subscribe";
|
|
29
|
+
readonly UNSUBSCRIBE: "comment_annotation.unsubscribe";
|
|
30
|
+
};
|
|
31
|
+
export type CommentActivityActionType = typeof CommentActivityActionTypes[keyof typeof CommentActivityActionTypes];
|
|
32
|
+
/**
|
|
33
|
+
* Recorder action type constants following the `recording.*` naming pattern.
|
|
34
|
+
*/
|
|
35
|
+
export declare const RecorderActivityActionTypes: {
|
|
36
|
+
readonly RECORDING_ADD: "recording.add";
|
|
37
|
+
readonly RECORDING_DELETE: "recording.delete";
|
|
38
|
+
};
|
|
39
|
+
export type RecorderActivityActionType = typeof RecorderActivityActionTypes[keyof typeof RecorderActivityActionTypes];
|
|
40
|
+
/**
|
|
41
|
+
* Reaction action type constants following the `reaction.*` naming pattern.
|
|
42
|
+
*/
|
|
43
|
+
export declare const ReactionActivityActionTypes: {
|
|
44
|
+
readonly REACTION_ADD: "reaction.add";
|
|
45
|
+
readonly REACTION_DELETE: "reaction.delete";
|
|
46
|
+
};
|
|
47
|
+
export type ReactionActivityActionType = typeof ReactionActivityActionTypes[keyof typeof ReactionActivityActionTypes];
|
|
48
|
+
/**
|
|
49
|
+
* CRDT action type constants following the `crdt.*` naming pattern.
|
|
50
|
+
*/
|
|
51
|
+
export declare const CrdtActivityActionTypes: {
|
|
52
|
+
readonly EDITOR_EDIT: "crdt.editor_edit";
|
|
53
|
+
};
|
|
54
|
+
export type CrdtActivityActionType = typeof CrdtActivityActionTypes[keyof typeof CrdtActivityActionTypes];
|
|
55
|
+
/**
|
|
56
|
+
* Represents a single from/to change pair.
|
|
57
|
+
* `from` is always present (null for 'added' events) for uniform structure.
|
|
58
|
+
*/
|
|
59
|
+
export interface ActivityChange<T = unknown> {
|
|
60
|
+
from?: T | null;
|
|
61
|
+
to?: T | null;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Dynamic change tracking. Keys are domain-specific (e.g., 'status', 'commentText', 'assignedTo').
|
|
65
|
+
* No fixed keys — activities span multiple features.
|
|
66
|
+
*/
|
|
67
|
+
export interface ActivityChanges {
|
|
68
|
+
[key: string]: ActivityChange | undefined;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Metadata for activity records. Extends BaseMetadata with denormalized IDs
|
|
72
|
+
* for efficient querying at the organization level.
|
|
73
|
+
*/
|
|
74
|
+
export declare class ActivityMetadata extends BaseMetadata {
|
|
75
|
+
[key: string]: any;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Core activity record representing a single activity event.
|
|
79
|
+
*
|
|
80
|
+
* @typeParam TEntity - Type of the parent entity snapshot (e.g., CommentAnnotation)
|
|
81
|
+
* @typeParam TTarget - Type of the sub-entity snapshot (e.g., Comment)
|
|
82
|
+
*/
|
|
83
|
+
export declare class ActivityRecord<TEntity = unknown, TTarget = unknown> {
|
|
84
|
+
/** Auto-generated unique ID */
|
|
85
|
+
id: string;
|
|
86
|
+
/** Feature that generated this activity */
|
|
87
|
+
featureType: ActivityFeatureType;
|
|
88
|
+
/** Action that occurred, following `entity_type.action` pattern */
|
|
89
|
+
actionType: string;
|
|
90
|
+
/** Event type that occurred */
|
|
91
|
+
eventType?: string;
|
|
92
|
+
/** User who performed the action */
|
|
93
|
+
actionUser: User;
|
|
94
|
+
/** Server timestamp (set by backend) */
|
|
95
|
+
timestamp: number;
|
|
96
|
+
/** Denormalized IDs for querying */
|
|
97
|
+
metadata: ActivityMetadata;
|
|
98
|
+
/** ID of the parent entity (annotationId, recordingId, etc.) */
|
|
99
|
+
targetEntityId: string;
|
|
100
|
+
/** ID of the sub-entity acted on (commentId within annotation, null for entity-level actions) */
|
|
101
|
+
targetSubEntityId?: string | null;
|
|
102
|
+
/** Linear-style from/to change pairs */
|
|
103
|
+
changes?: ActivityChanges;
|
|
104
|
+
/** Full parent entity snapshot at time of action */
|
|
105
|
+
entityData?: TEntity;
|
|
106
|
+
/** Sub-entity snapshot (or user-provided data for custom activities) */
|
|
107
|
+
entityTargetData?: TTarget;
|
|
108
|
+
/** Display message template — ONLY for custom activities */
|
|
109
|
+
displayMessageTemplate?: string;
|
|
110
|
+
/** Template variable values — ONLY for custom activities */
|
|
111
|
+
displayMessageTemplateData?: Record<string, unknown>;
|
|
112
|
+
/** Computed display message (generated client-side, never stored in Firestore) */
|
|
113
|
+
displayMessage?: string;
|
|
114
|
+
/** Icon URL or identifier for display */
|
|
115
|
+
actionIcon?: string;
|
|
116
|
+
/** If true, this activity cannot be updated or deleted via REST API */
|
|
117
|
+
immutable?: boolean;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Configuration for subscribing to activities.
|
|
121
|
+
* Behavior is determined by the props passed:
|
|
122
|
+
* - No config → org-wide
|
|
123
|
+
* - documentIds → specific documents
|
|
124
|
+
* - currentDocumentOnly → current document only
|
|
125
|
+
*/
|
|
126
|
+
export interface ActivitySubscribeConfig {
|
|
127
|
+
/** Subscribe to activities for a specific organization (defaults to current org) */
|
|
128
|
+
organizationId?: string;
|
|
129
|
+
/** Subscribe to activities for specific document IDs */
|
|
130
|
+
documentIds?: string[];
|
|
131
|
+
/** Subscribe to activities for the current document only (auto-switches on setDocument) */
|
|
132
|
+
currentDocumentOnly?: boolean;
|
|
133
|
+
/** Only fetch activities from the last N days (default: 30) */
|
|
134
|
+
maxDays?: number;
|
|
135
|
+
/** Allowlist: only include activities with these feature types */
|
|
136
|
+
featureTypes?: ActivityFeatureType[];
|
|
137
|
+
/** Disallowlist: exclude activities with these feature types (ignored if featureTypes is set) */
|
|
138
|
+
excludeFeatureTypes?: ActivityFeatureType[];
|
|
139
|
+
/** Allowlist: only include activities with these action types */
|
|
140
|
+
actionTypes?: string[];
|
|
141
|
+
/** Disallowlist: exclude activities with these action types (ignored if actionTypes is set) */
|
|
142
|
+
excludeActionTypes?: string[];
|
|
143
|
+
/** Allowlist: only include activities by these user IDs */
|
|
144
|
+
userIds?: string[];
|
|
145
|
+
/** Disallowlist: exclude activities by these user IDs (ignored if userIds is set) */
|
|
146
|
+
excludeUserIds?: string[];
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Represents an active activity subscription.
|
|
150
|
+
* Returned by `activityService.subscribe()`.
|
|
151
|
+
*/
|
|
152
|
+
export interface ActivitySubscription {
|
|
153
|
+
/** Observable stream of activities for this subscription's scope. null = not yet loaded. */
|
|
154
|
+
getActivities$(): Observable<ActivityRecord[] | null>;
|
|
155
|
+
/** Unsubscribe and clean up this subscription */
|
|
156
|
+
unsubscribe(): void;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Data required to create an activity.
|
|
160
|
+
* Used for all activity types: comment, reaction, recorder, custom, etc.
|
|
161
|
+
*/
|
|
162
|
+
export interface CreateActivityData<TEntity = unknown, TTarget = unknown> {
|
|
163
|
+
featureType: ActivityFeatureType;
|
|
164
|
+
actionType: string;
|
|
165
|
+
eventType?: string;
|
|
166
|
+
targetEntityId: string;
|
|
167
|
+
targetSubEntityId?: string | null;
|
|
168
|
+
changes?: ActivityChanges;
|
|
169
|
+
entityData?: TEntity;
|
|
170
|
+
entityTargetData?: TTarget;
|
|
171
|
+
/** Icon URL or identifier — typically used for custom activities */
|
|
172
|
+
actionIcon?: string;
|
|
173
|
+
/** Display message template — only for custom activities */
|
|
174
|
+
displayMessageTemplate?: string;
|
|
175
|
+
/** Template variable values — only for custom activities */
|
|
176
|
+
displayMessageTemplateData?: Record<string, unknown>;
|
|
177
|
+
}
|
|
@@ -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,3 +1,4 @@
|
|
|
1
|
+
import { DocumentMetadata } from './document-metadata.model';
|
|
1
2
|
export declare class BaseMetadata {
|
|
2
3
|
apiKey?: string;
|
|
3
4
|
documentId?: string;
|
|
@@ -6,4 +7,6 @@ export declare class BaseMetadata {
|
|
|
6
7
|
clientOrganizationId?: string;
|
|
7
8
|
folderId?: string;
|
|
8
9
|
veltFolderId?: string;
|
|
10
|
+
documentMetadata?: DocumentMetadata;
|
|
11
|
+
sdkVersion?: string | null;
|
|
9
12
|
}
|
|
@@ -141,6 +141,8 @@ export interface AddCommentRequest {
|
|
|
141
141
|
assignedTo?: User;
|
|
142
142
|
assigned?: boolean;
|
|
143
143
|
options?: RequestOptions;
|
|
144
|
+
/** Optional visibility configuration for the comment */
|
|
145
|
+
visibility?: CommentVisibilityConfig;
|
|
144
146
|
}
|
|
145
147
|
export interface UpdateCommentRequest {
|
|
146
148
|
annotationId: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { CommentAccessMode } from "../../utils/enums";
|
|
1
|
+
import { CommentAccessMode, CommentVisibilityOptionType } from "../../utils/enums";
|
|
2
2
|
import { BaseMetadata } from "./base-metadata.data.model";
|
|
3
|
+
import { CommentVisibilityType } from "./comment-actions.data.model";
|
|
3
4
|
import { Comment } from "./comment.data.model";
|
|
4
5
|
import { CursorPosition } from "./cursor-position.data.model";
|
|
5
6
|
import { CustomAnnotationDropdownItem } from "./custom-chip-dropdown.data.model";
|
|
@@ -10,6 +11,11 @@ import { TargetElement } from "./target-element.data.model";
|
|
|
10
11
|
import { TargetTextRange } from "./target-text-range.data.model";
|
|
11
12
|
import { User } from "./user.data.model";
|
|
12
13
|
import { CommentAnnotationViews } from "./views.data.model";
|
|
14
|
+
export interface CommentAnnotationVisibilityConfig {
|
|
15
|
+
type: CommentVisibilityType;
|
|
16
|
+
organizationId?: string;
|
|
17
|
+
userIds?: string[];
|
|
18
|
+
}
|
|
13
19
|
export declare class CommentAnnotation {
|
|
14
20
|
/**
|
|
15
21
|
* Unique identifier for the comment pin annotation.
|
|
@@ -23,6 +29,7 @@ export declare class CommentAnnotation {
|
|
|
23
29
|
* Auto generated.
|
|
24
30
|
*/
|
|
25
31
|
annotationNumber?: number;
|
|
32
|
+
visibilityConfig?: CommentAnnotationVisibilityConfig;
|
|
26
33
|
/**
|
|
27
34
|
* This is the list of all comments part of this annotation.
|
|
28
35
|
*
|
|
@@ -232,9 +239,10 @@ export declare class CommentSelectionChangeData {
|
|
|
232
239
|
selected: boolean;
|
|
233
240
|
annotation: CommentAnnotation;
|
|
234
241
|
}
|
|
235
|
-
export declare class
|
|
242
|
+
export declare class VisibilityOptionClickedData {
|
|
236
243
|
annotationId: string;
|
|
237
|
-
|
|
244
|
+
visibility: CommentVisibilityOptionType;
|
|
245
|
+
users?: any[];
|
|
238
246
|
}
|
|
239
247
|
export declare class InlineCommentSectionConfig {
|
|
240
248
|
id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssignToType, CommentAccessMode, CommentEventTypes, CommentStatus } from "../../utils/enums";
|
|
1
|
+
import { AssignToType, CommentAccessMode, CommentEventTypes, CommentStatus, CommentVisibilityOptionType } 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,10 +85,13 @@ 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;
|
|
88
89
|
[CommentEventTypes.SIDEBAR_BUTTON_CLICK]: SidebarButtonClickEvent;
|
|
90
|
+
[CommentEventTypes.SIDEBAR_BUTTON_CLICKED]: SidebarButtonClickedEvent;
|
|
89
91
|
[CommentEventTypes.ATTACHMENT_DOWNLOAD_CLICKED]: AttachmentDownloadClickedEvent;
|
|
90
92
|
[CommentEventTypes.COMMENT_SAVED]: CommentSavedEvent;
|
|
91
|
-
[CommentEventTypes.
|
|
93
|
+
[CommentEventTypes.COMMENT_SAVE_TRIGGERED]: CommentSaveTriggeredEvent;
|
|
94
|
+
[CommentEventTypes.VISIBILITY_OPTION_CLICKED]: VisibilityOptionClickedEvent;
|
|
92
95
|
};
|
|
93
96
|
export interface AddAttachmentEvent {
|
|
94
97
|
annotationId: string;
|
|
@@ -183,6 +186,11 @@ export interface CommentSavedEvent {
|
|
|
183
186
|
commentAnnotation: CommentAnnotation;
|
|
184
187
|
metadata: VeltEventMetadata;
|
|
185
188
|
}
|
|
189
|
+
export interface CommentSaveTriggeredEvent {
|
|
190
|
+
annotationId: string;
|
|
191
|
+
commentAnnotation: CommentAnnotation;
|
|
192
|
+
metadata: VeltEventMetadata;
|
|
193
|
+
}
|
|
186
194
|
export interface UpdateCommentEvent {
|
|
187
195
|
annotationId: string;
|
|
188
196
|
commentAnnotation: CommentAnnotation;
|
|
@@ -309,18 +317,23 @@ export interface CommentToolClickEvent {
|
|
|
309
317
|
targetElementId?: string | null;
|
|
310
318
|
metadata?: VeltEventMetadata;
|
|
311
319
|
}
|
|
320
|
+
export interface CommentToolClickedEvent extends CommentToolClickEvent {
|
|
321
|
+
}
|
|
312
322
|
export interface SidebarButtonClickEvent {
|
|
313
323
|
metadata?: VeltEventMetadata;
|
|
314
324
|
}
|
|
325
|
+
export interface SidebarButtonClickedEvent extends SidebarButtonClickEvent {
|
|
326
|
+
}
|
|
315
327
|
export interface AttachmentDownloadClickedEvent {
|
|
316
328
|
annotationId: string;
|
|
317
329
|
commentAnnotation: CommentAnnotation;
|
|
318
330
|
attachment: Attachment;
|
|
319
331
|
metadata?: VeltEventMetadata;
|
|
320
332
|
}
|
|
321
|
-
export interface
|
|
333
|
+
export interface VisibilityOptionClickedEvent {
|
|
322
334
|
annotationId: string;
|
|
323
335
|
commentAnnotation: CommentAnnotation;
|
|
324
|
-
|
|
336
|
+
visibility: CommentVisibilityOptionType;
|
|
337
|
+
users?: any[];
|
|
325
338
|
metadata?: VeltEventMetadata;
|
|
326
339
|
}
|
|
@@ -23,7 +23,8 @@ export declare enum UserResolverSource {
|
|
|
23
23
|
SET_SINGLE_EDITOR_MODE_LIVE_STATE_DATA_FOR_DIFFERENT_USER_PRESENT_ON_TAB = "setSingleEditorModeLiveStateDataForDifferentUserPresentOnTab",
|
|
24
24
|
RESOLVE_AND_MERGE_SINGLE_EDITOR_LIVE_STATE_DATA_WITH_USER = "resolveAndMergeSingleEditorLiveStateDataWithUser",
|
|
25
25
|
GET_SINGLE_EDITOR_MODE_DATA = "getSingleEditorModeData",
|
|
26
|
-
RESOLVE_USERS_FROM_HUDDLE_MESSAGES = "resolveUsersFromHuddleMessages"
|
|
26
|
+
RESOLVE_USERS_FROM_HUDDLE_MESSAGES = "resolveUsersFromHuddleMessages",
|
|
27
|
+
RESOLVE_USER_IDS_BY_EMAIL = "resolveUserIdsByEmail"
|
|
27
28
|
}
|
|
28
29
|
export declare enum UserResolverModuleName {
|
|
29
30
|
IDENTIFY = "identify/authProvider",
|
|
@@ -5,12 +5,18 @@ export interface AccessRequestEvent {
|
|
|
5
5
|
editor?: User;
|
|
6
6
|
timestamp?: number;
|
|
7
7
|
status?: string;
|
|
8
|
+
totalUsers?: number;
|
|
9
|
+
presenceSnippylyUserIds?: string[];
|
|
10
|
+
presenceClientUserIds?: string[];
|
|
8
11
|
}
|
|
9
12
|
export interface SEMEvent {
|
|
10
13
|
viewer?: User;
|
|
11
14
|
editor?: User;
|
|
12
15
|
timestamp?: number;
|
|
13
16
|
role?: string;
|
|
17
|
+
totalUsers?: number;
|
|
18
|
+
presenceSnippylyUserIds?: string[];
|
|
19
|
+
presenceClientUserIds?: string[];
|
|
14
20
|
}
|
|
15
21
|
export type LiveStateEventTypesMap = {
|
|
16
22
|
[LiveStateSyncEventTypes.ACCESS_REQUESTED]: AccessRequestEvent;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { CommentAnnotationDataProvider } from "./comment-resolver.data.model";
|
|
2
2
|
import { AttachmentDataProvider } from "./attachment-resolver.data.model";
|
|
3
3
|
import { ReactionAnnotationDataProvider } from "./reaction-resolver.data.model";
|
|
4
|
-
import { UserDataProvider } from "./user-resolver.data.model";
|
|
4
|
+
import { AnonymousUserDataProvider, UserDataProvider } from "./user-resolver.data.model";
|
|
5
5
|
export interface VeltDataProvider {
|
|
6
6
|
comment?: CommentAnnotationDataProvider;
|
|
7
7
|
user?: UserDataProvider;
|
|
8
8
|
reaction?: ReactionAnnotationDataProvider;
|
|
9
9
|
attachment?: AttachmentDataProvider;
|
|
10
|
+
anonymousUser?: AnonymousUserDataProvider;
|
|
10
11
|
}
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
import { ResolverConfig } from "./resolver.data.model";
|
|
1
|
+
import { ResolverConfig, ResolverResponse, RetryConfig } 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
|
+
}
|
|
8
22
|
export interface GetUserResolverRequest {
|
|
9
23
|
organizationId: string;
|
|
10
24
|
userIds: string[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { ActivityRecord, ActivitySubscribeConfig, CreateActivityData } from "../data/activity.data.model";
|
|
4
|
+
|
|
5
|
+
export declare class ActivityElement {
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Subscribe to activities with optional filtering configuration.
|
|
9
|
+
* Returns an Observable that, when unsubscribed, automatically cleans up the internal subscription.
|
|
10
|
+
* @param config Optional configuration to filter activities by scope, feature types, action types, etc.
|
|
11
|
+
* @returns Observable<ActivityRecord[] | null>
|
|
12
|
+
*/
|
|
13
|
+
getAllActivities: (config?: ActivitySubscribeConfig) => Observable<ActivityRecord[] | null>;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Create a new activity record.
|
|
17
|
+
* @param data The activity data including feature type, action type, target entity, etc.
|
|
18
|
+
* @returns Promise<void>
|
|
19
|
+
*/
|
|
20
|
+
createActivity: (data: CreateActivityData) => Promise<void>;
|
|
21
|
+
|
|
22
|
+
constructor();
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Subscribe to activities with optional filtering configuration.
|
|
26
|
+
*/
|
|
27
|
+
private _getAllActivities;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Create a new activity record.
|
|
31
|
+
*/
|
|
32
|
+
private _createActivity;
|
|
33
|
+
}
|
|
@@ -290,6 +290,16 @@ 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
|
+
|
|
293
303
|
/**
|
|
294
304
|
* To enable feature to show resolve button
|
|
295
305
|
*/
|
|
@@ -1615,6 +1625,16 @@ export declare class CommentElement {
|
|
|
1615
1625
|
*/
|
|
1616
1626
|
private _disableStatus;
|
|
1617
1627
|
|
|
1628
|
+
/**
|
|
1629
|
+
* To enable visibility options on comments
|
|
1630
|
+
*/
|
|
1631
|
+
private _enableVisibilityOptions;
|
|
1632
|
+
|
|
1633
|
+
/**
|
|
1634
|
+
* To disable visibility options on comments
|
|
1635
|
+
*/
|
|
1636
|
+
private _disableVisibilityOptions;
|
|
1637
|
+
|
|
1618
1638
|
/**
|
|
1619
1639
|
* To enable feature to show resolve button
|
|
1620
1640
|
*/
|
|
@@ -95,6 +95,11 @@ export declare class CrdtElement {
|
|
|
95
95
|
* @param time debounce time in milliseconds
|
|
96
96
|
*/
|
|
97
97
|
setWebhookDebounceTime: (time: number) => void;
|
|
98
|
+
/**
|
|
99
|
+
* To set activity debounce time for batching CRDT edits (Default value is 10 minutes)
|
|
100
|
+
* @param time debounce time in milliseconds (minimum: 10 seconds)
|
|
101
|
+
*/
|
|
102
|
+
setActivityDebounceTime: (time: number) => void;
|
|
98
103
|
|
|
99
104
|
/**
|
|
100
105
|
* Subscribe to crdt actions
|
|
@@ -204,6 +209,12 @@ export declare class CrdtElement {
|
|
|
204
209
|
*/
|
|
205
210
|
private _setWebhookDebounceTime;
|
|
206
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Set activity debounce time for batching CRDT edits
|
|
214
|
+
* @param time debounce time in milliseconds (minimum: 10 seconds)
|
|
215
|
+
*/
|
|
216
|
+
private _setActivityDebounceTime;
|
|
217
|
+
|
|
207
218
|
/**
|
|
208
219
|
* Subscribe to crdt actions
|
|
209
220
|
* @param action Action to subscribe to
|
package/app/utils/constants.d.ts
CHANGED
|
@@ -57,6 +57,8 @@ export declare class Constants {
|
|
|
57
57
|
static FIREBASE_PARTIAL_PATH_NOTIFICATIONS: string;
|
|
58
58
|
static FIREBASE_PARTIAL_PATH_ORGANIZATION_NOTIFICATIONS: string;
|
|
59
59
|
static FIREBASE_PARTIAL_PATH_LAST_NOTIFICATION_TIMESTAMP: string;
|
|
60
|
+
static FIREBASE_PARTIAL_PATH_ACTIVITIES: string;
|
|
61
|
+
static FIREBASE_PARTIAL_PATH_LAST_ACTIVITY_TIMESTAMP: string;
|
|
60
62
|
static FIREBASE_PARTIAL_PATH_HEARTBEAT: string;
|
|
61
63
|
static FIREBASE_PARTIAL_PATH_HEARTBEAT_BY_DOCUMENT: string;
|
|
62
64
|
static FIREBASE_PARTIAL_PATH_USERS: string;
|
|
@@ -244,7 +246,36 @@ export declare class Constants {
|
|
|
244
246
|
VELT_NOTIFICATIONS_HISTORY_PANEL: string;
|
|
245
247
|
VELT_WIREFRAME: string;
|
|
246
248
|
VELT_AUTOCOMPLETE: string;
|
|
249
|
+
VELT_AUTOCOMPLETE_PANEL: string;
|
|
250
|
+
VELT_AUTOCOMPLETE_OPTION: string;
|
|
251
|
+
VELT_AUTOCOMPLETE_OPTION_ICON: string;
|
|
252
|
+
VELT_AUTOCOMPLETE_OPTION_NAME: string;
|
|
253
|
+
VELT_AUTOCOMPLETE_OPTION_DESCRIPTION: string;
|
|
254
|
+
VELT_AUTOCOMPLETE_OPTION_ERROR_ICON: string;
|
|
255
|
+
VELT_AUTOCOMPLETE_GROUP_OPTION: string;
|
|
256
|
+
VELT_AUTOCOMPLETE_TOOL: string;
|
|
257
|
+
VELT_AUTOCOMPLETE_EMPTY: string;
|
|
247
258
|
VELT_AUTOCOMPLETE_CHIP: string;
|
|
259
|
+
VELT_AUTOCOMPLETE_CHIP_TOOLTIP: string;
|
|
260
|
+
VELT_AUTOCOMPLETE_CHIP_TOOLTIP_ICON: string;
|
|
261
|
+
VELT_AUTOCOMPLETE_CHIP_TOOLTIP_NAME: string;
|
|
262
|
+
VELT_AUTOCOMPLETE_CHIP_TOOLTIP_DESCRIPTION: string;
|
|
263
|
+
VELT_AUTOCOMPLETE_CONTEXT_WRAPPER: string;
|
|
264
|
+
VELT_COMMENT_DIALOG_VISIBILITY_BANNER: string;
|
|
265
|
+
VELT_COMMENT_DIALOG_VISIBILITY_BANNER_ICON: string;
|
|
266
|
+
VELT_COMMENT_DIALOG_VISIBILITY_BANNER_TEXT: string;
|
|
267
|
+
VELT_COMMENT_DIALOG_VISIBILITY_BANNER_DROPDOWN: string;
|
|
268
|
+
VELT_COMMENT_DIALOG_VISIBILITY_BANNER_DROPDOWN_TRIGGER: string;
|
|
269
|
+
VELT_COMMENT_DIALOG_VISIBILITY_BANNER_DROPDOWN_TRIGGER_LABEL: string;
|
|
270
|
+
VELT_COMMENT_DIALOG_VISIBILITY_BANNER_DROPDOWN_TRIGGER_AVATAR_LIST: string;
|
|
271
|
+
VELT_COMMENT_DIALOG_VISIBILITY_BANNER_DROPDOWN_TRIGGER_AVATAR_LIST_ITEM: string;
|
|
272
|
+
VELT_COMMENT_DIALOG_VISIBILITY_BANNER_DROPDOWN_TRIGGER_AVATAR_LIST_REMAINING_COUNT: string;
|
|
273
|
+
VELT_COMMENT_DIALOG_VISIBILITY_BANNER_DROPDOWN_TRIGGER_ICON: string;
|
|
274
|
+
VELT_COMMENT_DIALOG_VISIBILITY_BANNER_DROPDOWN_CONTENT: string;
|
|
275
|
+
VELT_COMMENT_DIALOG_VISIBILITY_BANNER_DROPDOWN_CONTENT_ITEM: string;
|
|
276
|
+
VELT_COMMENT_DIALOG_VISIBILITY_BANNER_DROPDOWN_CONTENT_ITEM_ICON: string;
|
|
277
|
+
VELT_COMMENT_DIALOG_VISIBILITY_BANNER_DROPDOWN_CONTENT_ITEM_LABEL: string;
|
|
278
|
+
VELT_COMMENT_DIALOG_VISIBILITY_BANNER_DROPDOWN_CONTENT_USER_PICKER: string;
|
|
248
279
|
VELT_COMMENT_COMPOSER: string;
|
|
249
280
|
VELT_SKELETON_LOADER: string;
|
|
250
281
|
VELT_SHADOW_DOM_INTERNAL: string;
|
package/app/utils/enums.d.ts
CHANGED
|
@@ -60,10 +60,13 @@ export declare const CommentEventTypes: {
|
|
|
60
60
|
readonly COMMENT_PIN_CLICKED: "commentPinClicked";
|
|
61
61
|
readonly COMMENT_BUBBLE_CLICKED: "commentBubbleClicked";
|
|
62
62
|
readonly COMMENT_TOOL_CLICK: "commentToolClick";
|
|
63
|
+
readonly COMMENT_TOOL_CLICKED: "commentToolClicked";
|
|
63
64
|
readonly SIDEBAR_BUTTON_CLICK: "sidebarButtonClick";
|
|
65
|
+
readonly SIDEBAR_BUTTON_CLICKED: "sidebarButtonClicked";
|
|
64
66
|
readonly ATTACHMENT_DOWNLOAD_CLICKED: "attachmentDownloadClicked";
|
|
65
67
|
readonly COMMENT_SAVED: "commentSaved";
|
|
66
|
-
readonly
|
|
68
|
+
readonly COMMENT_SAVE_TRIGGERED: "commentSaveTriggered";
|
|
69
|
+
readonly VISIBILITY_OPTION_CLICKED: "visibilityOptionClicked";
|
|
67
70
|
};
|
|
68
71
|
export declare const RecorderEventTypes: {
|
|
69
72
|
readonly TRANSCRIPTION_DONE: "transcriptionDone";
|
|
@@ -169,7 +172,8 @@ export declare enum Features {
|
|
|
169
172
|
REWRITER = "rewriter",
|
|
170
173
|
LIVE_SELECTION = "liveSelection",
|
|
171
174
|
NOTIFICATION = "notification",
|
|
172
|
-
REACTION = "reaction"
|
|
175
|
+
REACTION = "reaction",
|
|
176
|
+
ACTIVITY = "activity"
|
|
173
177
|
}
|
|
174
178
|
export declare enum AnalyticsFeatures {
|
|
175
179
|
AREA = "area",
|
|
@@ -191,7 +195,7 @@ export declare enum AnalyticsFeatures {
|
|
|
191
195
|
INLINE_COMMENT = "inlineComment",
|
|
192
196
|
COMMENT_SIDEBAR = "commentSidebar"
|
|
193
197
|
}
|
|
194
|
-
export type FeatureType = 'area' | 'arrow' | 'audioHuddle' | 'comment' | 'cursor' | 'huddle' | 'liveStateSync' | 'presence' | 'recorder' | 'rewriter' | 'tag' | 'liveSelection' | 'notification' | 'reaction' | 'multiThread';
|
|
198
|
+
export type FeatureType = 'area' | 'arrow' | 'audioHuddle' | 'comment' | 'cursor' | 'huddle' | 'liveStateSync' | 'presence' | 'recorder' | 'rewriter' | 'tag' | 'liveSelection' | 'notification' | 'reaction' | 'multiThread' | 'activity';
|
|
195
199
|
export type AssignToType = 'dropdown' | 'checkbox';
|
|
196
200
|
export declare enum DeviceType {
|
|
197
201
|
DESKTOP = "Desktop",
|
|
@@ -310,3 +314,13 @@ export type NotificationSettingsItemType = 'ALL' | 'MINE' | 'NONE' | string;
|
|
|
310
314
|
* Type for notification settings layout
|
|
311
315
|
*/
|
|
312
316
|
export type NotificationSettingsLayout = 'accordion' | 'dropdown';
|
|
317
|
+
/**
|
|
318
|
+
* Enum for comment visibility options in the visibility banner dropdown
|
|
319
|
+
*/
|
|
320
|
+
export declare enum CommentVisibilityOption {
|
|
321
|
+
RESTRICTED_SELF = "restrictedSelf",
|
|
322
|
+
RESTRICTED_SELECTED_PEOPLE = "restrictedSelectedPeople",
|
|
323
|
+
ORGANIZATION_PRIVATE = "organizationPrivate",
|
|
324
|
+
PUBLIC = "public"
|
|
325
|
+
}
|
|
326
|
+
export type CommentVisibilityOptionType = `${CommentVisibilityOption}`;
|
package/models.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './app/utils/enums';
|
|
2
2
|
export * from './app/models/data/anchor-record.data.model';
|
|
3
3
|
export * from './app/models/data/attachment.model';
|
|
4
|
+
export * from './app/models/data/activity.data.model';
|
|
4
5
|
export * from './app/models/data/area-annotation.data.model';
|
|
5
6
|
export * from './app/models/data/arrow-annotation.data.model';
|
|
6
7
|
export * from './app/models/data/base-metadata.data.model';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/sdk-staging",
|
|
3
|
-
"version": "5.0.2-beta.
|
|
3
|
+
"version": "5.0.2-beta.20",
|
|
4
4
|
"description": "Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.",
|
|
5
5
|
"homepage": "https://velt.dev",
|
|
6
6
|
"keywords": [
|
package/types.d.ts
CHANGED
|
@@ -17,4 +17,5 @@ export * from './app/models/element/notification-element.model';
|
|
|
17
17
|
export * from './app/models/element/autocomplete-element.model';
|
|
18
18
|
export * from './app/models/element/reaction-element.model';
|
|
19
19
|
export * from './app/models/element/crdt-element.model';
|
|
20
|
+
export * from './app/models/element/activity-element.model';
|
|
20
21
|
export * from './models';
|