@veltdev/sdk 5.0.2-beta.8 → 5.0.2-beta.9

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.
@@ -121,6 +121,8 @@ export interface CommentRequestQuery {
121
121
  batchedPerDocument?: boolean;
122
122
  /** Debounce time in ms for batchedPerDocument mode (default: 5000). */
123
123
  debounceMs?: number;
124
+ /** Filter annotations by agent fields. Matches annotations where `agent.agentFields` array contains any of the provided values. */
125
+ agentFields?: string[];
124
126
  }
125
127
  export interface SubscribeCommentAnnotationRequest {
126
128
  annotationId: string;
@@ -8,6 +8,7 @@ export type CoreEventTypesMap = {
8
8
  [CoreEventTypes.ATTACHMENT_RESOLVER]: AttachmentResolverEvent;
9
9
  [CoreEventTypes.REACTION_RESOLVER]: ReactionResolverEvent;
10
10
  [CoreEventTypes.RECORDER_RESOLVER]: RecorderResolverEvent;
11
+ [CoreEventTypes.NOTIFICATION_RESOLVER]: NotificationResolverEvent;
11
12
  [CoreEventTypes.VELT_BUTTON_CLICK]: VeltButtonClickEvent;
12
13
  [CoreEventTypes.USER_UPDATE]: UserUpdateEvent;
13
14
  [CoreEventTypes.DOCUMENT_INIT]: DocumentInitEvent;
@@ -177,6 +178,26 @@ export type RecorderResolverEventType = {
177
178
  RECORDER_DELETE_RESULT: 'recorderDeleteResult';
178
179
  RECORDER_DELETE_ERROR: 'recorderDeleteError';
179
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>;
180
201
  export type ErrorEvent = {
181
202
  event?: string;
182
203
  sourceMethod?: string;
@@ -0,0 +1,39 @@
1
+ import { ResolverEndpointConfig, ResolverResponse, RetryConfig } from "./resolver.data.model";
2
+ import { User } from "./user.data.model";
3
+ export interface NotificationDataProvider {
4
+ get?: (request: GetNotificationResolverRequest) => Promise<ResolverResponse<Record<string, PartialNotification>>>;
5
+ delete?: (request: DeleteNotificationResolverRequest) => Promise<ResolverResponse<undefined>>;
6
+ config?: NotificationResolverConfig;
7
+ }
8
+ export interface NotificationResolverConfig {
9
+ resolveTimeout?: number;
10
+ getRetryConfig?: RetryConfig;
11
+ deleteRetryConfig?: RetryConfig;
12
+ getConfig?: ResolverEndpointConfig;
13
+ deleteConfig?: ResolverEndpointConfig;
14
+ }
15
+ export interface GetNotificationResolverRequest {
16
+ organizationId: string;
17
+ notificationIds: string[];
18
+ }
19
+ export interface DeleteNotificationResolverRequest {
20
+ notificationId: string;
21
+ organizationId: string;
22
+ }
23
+ export interface PartialNotification {
24
+ notificationId: string;
25
+ displayHeadlineMessageTemplate?: string;
26
+ displayHeadlineMessageTemplateData?: {
27
+ actionUser?: User;
28
+ recipientUser?: User;
29
+ actionMessage?: string;
30
+ [key: string]: any;
31
+ };
32
+ displayBodyMessage?: string;
33
+ displayBodyMessageTemplate?: string;
34
+ displayBodyMessageTemplateData?: {
35
+ [key: string]: any;
36
+ };
37
+ notificationSourceData?: any;
38
+ [key: string]: any;
39
+ }
@@ -137,6 +137,10 @@ 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;
140
144
  /**
141
145
  * Display body message template
142
146
  */
@@ -1,5 +1,6 @@
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";
3
4
  import { ReactionAnnotationDataProvider } from "./reaction-resolver.data.model";
4
5
  import { RecorderAnnotationDataProvider } from "./recorder-resolver.data.model";
5
6
  import { AnonymousUserDataProvider, UserDataProvider } from "./user-resolver.data.model";
@@ -10,4 +11,5 @@ export interface VeltDataProvider {
10
11
  attachment?: AttachmentDataProvider;
11
12
  anonymousUser?: AnonymousUserDataProvider;
12
13
  recorder?: RecorderAnnotationDataProvider;
14
+ notification?: NotificationDataProvider;
13
15
  }
@@ -208,6 +208,33 @@ export declare class Constants {
208
208
  VELT_TEXT_HIGHLIGHT: string;
209
209
  VELT_COMMENT_TEXT_PORTAL: string;
210
210
  VELT_COMMENTS_SIDEBAR: string;
211
+ VELT_COMMENTS_SIDEBAR_V2: string;
212
+ VELT_COMMENT_SIDEBAR_SKELETON_V2: string;
213
+ VELT_COMMENT_SIDEBAR_PANEL_V2: string;
214
+ VELT_COMMENT_SIDEBAR_LIST_V2: string;
215
+ VELT_COMMENT_SIDEBAR_LIST_ITEM_V2: string;
216
+ VELT_COMMENT_SIDEBAR_FILTER_DROPDOWN_CONTENT_LIST_V2: string;
217
+ VELT_COMMENT_SIDEBAR_FILTER_DROPDOWN_CONTENT_LIST_CATEGORY_V2: string;
218
+ VELT_COMMENT_SIDEBAR_FILTER_DROPDOWN_CONTENT_LIST_CATEGORY_CONTENT_V2: string;
219
+ VELT_COMMENT_SIDEBAR_FILTER_DROPDOWN_CONTENT_LIST_ITEM_V2: string;
220
+ VELT_COMMENT_SIDEBAR_FILTER_DROPDOWN_CONTENT_LIST_ITEM_INDICATOR_V2: string;
221
+ VELT_COMMENT_SIDEBAR_FILTER_DROPDOWN_CONTENT_LIST_ITEM_LABEL_V2: string;
222
+ VELT_COMMENT_SIDEBAR_MINIMAL_ACTIONS_DROPDOWN_V2: string;
223
+ VELT_COMMENT_SIDEBAR_MINIMAL_ACTIONS_DROPDOWN_TRIGGER_V2: string;
224
+ VELT_COMMENT_SIDEBAR_MINIMAL_ACTIONS_DROPDOWN_CONTENT_V2: string;
225
+ VELT_COMMENT_SIDEBAR_MINIMAL_ACTIONS_DROPDOWN_CONTENT_MARK_ALL_READ_V2: string;
226
+ VELT_COMMENT_SIDEBAR_MINIMAL_ACTIONS_DROPDOWN_CONTENT_MARK_ALL_RESOLVED_V2: string;
227
+ VELT_COMMENT_SIDEBAR_FILTER_DROPDOWN_V2: string;
228
+ VELT_COMMENT_SIDEBAR_FILTER_DROPDOWN_TRIGGER_V2: string;
229
+ VELT_COMMENT_SIDEBAR_FILTER_DROPDOWN_CONTENT_V2: string;
230
+ VELT_COMMENT_SIDEBAR_HEADER_V2: string;
231
+ VELT_COMMENT_SIDEBAR_CLOSE_BUTTON_V2: string;
232
+ VELT_COMMENT_SIDEBAR_EMPTY_PLACEHOLDER_V2: string;
233
+ VELT_COMMENT_SIDEBAR_RESET_FILTER_BUTTON_V2: string;
234
+ VELT_COMMENT_SIDEBAR_PAGE_MODE_COMPOSER_V2: string;
235
+ VELT_COMMENT_SIDEBAR_FOCUSED_THREAD_V2: string;
236
+ VELT_COMMENT_SIDEBAR_FOCUSED_THREAD_BACK_BUTTON_V2: string;
237
+ VELT_COMMENT_SIDEBAR_FOCUSED_THREAD_DIALOG_CONTAINER_V2: string;
211
238
  VELT_COMMENT_BUBBLE: string;
212
239
  VELT_COMMENT_THREAD: string;
213
240
  VELT_COMMENT_PIN: string;
@@ -91,6 +91,7 @@ export declare const CoreEventTypes: {
91
91
  readonly ATTACHMENT_RESOLVER: "attachmentResolver";
92
92
  readonly REACTION_RESOLVER: "reactionResolver";
93
93
  readonly RECORDER_RESOLVER: "recorderResolver";
94
+ readonly NOTIFICATION_RESOLVER: "notificationResolver";
94
95
  readonly VELT_BUTTON_CLICK: "veltButtonClick";
95
96
  readonly USER_UPDATE: "userUpdate";
96
97
  readonly INIT_UPDATE: "initUpdate";
package/models.d.ts CHANGED
@@ -38,6 +38,7 @@ export * from './app/models/data/location.model';
38
38
  export * from './app/models/data/media-preview-config.data.model';
39
39
  export * from './app/models/data/multi-thread.data.model';
40
40
  export * from './app/models/data/notification.model';
41
+ export * from './app/models/data/notification-resolver.data.model';
41
42
  export * from './app/models/data/notifications-events.data.model';
42
43
  export * from './app/models/data/page-info.model';
43
44
  export * from './app/models/data/permission.data.model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk",
3
- "version": "5.0.2-beta.8",
3
+ "version": "5.0.2-beta.9",
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": [