@veltdev/sdk-staging 5.0.2-beta.27 → 5.0.2-beta.29

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.
@@ -0,0 +1,27 @@
1
+ import { BaseMetadata } from './base-metadata.data.model';
2
+ import { ActivityChanges } from './activity.data.model';
3
+ import { ResolverConfig, ResolverResponse } from './resolver.data.model';
4
+ export interface PartialActivityRecord {
5
+ id: string;
6
+ metadata?: BaseMetadata;
7
+ changes?: ActivityChanges;
8
+ entityData?: unknown;
9
+ entityTargetData?: unknown;
10
+ displayMessageTemplateData?: Record<string, unknown>;
11
+ [key: string]: any;
12
+ }
13
+ export interface ActivityAnnotationDataProvider {
14
+ get?: (request: GetActivityResolverRequest) => Promise<ResolverResponse<Record<string, PartialActivityRecord>>>;
15
+ save?: (request: SaveActivityResolverRequest) => Promise<ResolverResponse<undefined>>;
16
+ config?: ResolverConfig;
17
+ }
18
+ export interface GetActivityResolverRequest {
19
+ activityIds?: string[];
20
+ documentIds?: string[];
21
+ organizationId?: string;
22
+ }
23
+ export interface SaveActivityResolverRequest {
24
+ activity: Record<string, PartialActivityRecord>;
25
+ event?: string;
26
+ metadata?: BaseMetadata;
27
+ }
@@ -115,6 +115,8 @@ export declare class ActivityRecord<TEntity = unknown, TTarget = unknown> {
115
115
  actionIcon?: string;
116
116
  /** If true, this activity cannot be updated or deleted via REST API */
117
117
  immutable?: boolean;
118
+ /** If true, this activity was stripped by the activity resolver (for UI loading states) */
119
+ isActivityResolverUsed?: boolean;
118
120
  }
119
121
  /**
120
122
  * Configuration for subscribing to activities.
@@ -9,6 +9,7 @@ export type CoreEventTypesMap = {
9
9
  [CoreEventTypes.REACTION_RESOLVER]: ReactionResolverEvent;
10
10
  [CoreEventTypes.RECORDER_RESOLVER]: RecorderResolverEvent;
11
11
  [CoreEventTypes.NOTIFICATION_RESOLVER]: NotificationResolverEvent;
12
+ [CoreEventTypes.ACTIVITY_RESOLVER]: ActivityResolverEvent;
12
13
  [CoreEventTypes.VELT_BUTTON_CLICK]: VeltButtonClickEvent;
13
14
  [CoreEventTypes.USER_UPDATE]: UserUpdateEvent;
14
15
  [CoreEventTypes.DOCUMENT_INIT]: DocumentInitEvent;
@@ -198,6 +199,26 @@ export type NotificationResolverEventType = {
198
199
  NOTIFICATION_DELETE_ERROR: 'notificationDeleteError';
199
200
  };
200
201
  export type NotificationResolverEvent = BaseResolverEvent<NotificationResolverEventType, NotificationResolverSource, NotificationResolverModuleName>;
202
+ export declare enum ActivityResolverSource {
203
+ RESOLVE_ACTIVITIES = "resolveActivities",
204
+ SAVE_ACTIVITY = "saveActivity",
205
+ FORMAT_RESPONSE = "formatResponse"
206
+ }
207
+ export declare enum ActivityResolverModuleName {
208
+ GET_ACTIVITIES = "getActivities"
209
+ }
210
+ export type ActivityResolverEventType = {
211
+ ACTIVITY_RESOLUTION_REQUEST_FORMED: 'activityResolutionRequestFormed';
212
+ ACTIVITY_RESOLUTION_REQUEST_TRIGGERED: 'activityResolutionRequestTriggered';
213
+ ACTIVITY_RESOLUTION_RESULT: 'activityResolutionResult';
214
+ ACTIVITY_RESOLUTION_ERROR: 'activityResolutionError';
215
+ ACTIVITY_RESOLUTION_RESULT_FROM_CACHE: 'activityResolutionResultFromCache';
216
+ ACTIVITY_SAVE_REQUEST_FORMED: 'activitySaveRequestFormed';
217
+ ACTIVITY_SAVE_REQUEST_TRIGGERED: 'activitySaveRequestTriggered';
218
+ ACTIVITY_SAVE_RESULT: 'activitySaveResult';
219
+ ACTIVITY_SAVE_ERROR: 'activitySaveError';
220
+ };
221
+ export type ActivityResolverEvent = BaseResolverEvent<ActivityResolverEventType, ActivityResolverSource, ActivityResolverModuleName>;
201
222
  export type ErrorEvent = {
202
223
  event?: string;
203
224
  sourceMethod?: string;
@@ -1,3 +1,4 @@
1
+ import { ActivityAnnotationDataProvider } from "./activity-resolver.data.model";
1
2
  import { CommentAnnotationDataProvider } from "./comment-resolver.data.model";
2
3
  import { AttachmentDataProvider } from "./attachment-resolver.data.model";
3
4
  import { NotificationDataProvider } from "./notification-resolver.data.model";
@@ -12,4 +13,5 @@ export interface VeltDataProvider {
12
13
  anonymousUser?: AnonymousUserDataProvider;
13
14
  recorder?: RecorderAnnotationDataProvider;
14
15
  notification?: NotificationDataProvider;
16
+ activity?: ActivityAnnotationDataProvider;
15
17
  }
@@ -33,6 +33,7 @@ export interface GetUserPermissionsResponse {
33
33
  folders?: {
34
34
  [folderId: string]: {
35
35
  accessRole?: UserPermissionAccessRole;
36
+ accessType?: string;
36
37
  expiresAt?: number;
37
38
  error?: string;
38
39
  errorCode?: UserPermissionAccessRoleResult;
@@ -49,6 +50,7 @@ export interface GetUserPermissionsResponse {
49
50
  documents?: {
50
51
  [documentId: string]: {
51
52
  accessRole?: UserPermissionAccessRole;
53
+ accessType?: string;
52
54
  expiresAt?: number;
53
55
  error?: string;
54
56
  errorCode?: UserPermissionAccessRoleResult;
@@ -12,6 +12,8 @@ export declare class User {
12
12
  * Default: Random avatar name.
13
13
  */
14
14
  name?: string;
15
+ email_lowercase?: string;
16
+ name_lowercase?: string;
15
17
  clientUserName?: string;
16
18
  /**
17
19
  * Your user's display picture URL.
@@ -288,6 +288,34 @@ export declare class Constants {
288
288
  VELT_AUTOCOMPLETE_CHIP_TOOLTIP_NAME: string;
289
289
  VELT_AUTOCOMPLETE_CHIP_TOOLTIP_DESCRIPTION: string;
290
290
  VELT_AUTOCOMPLETE_CONTEXT_WRAPPER: string;
291
+ VELT_ACTIVITY_LOG: string;
292
+ VELT_ACTIVITY_LOG_HEADER: string;
293
+ VELT_ACTIVITY_LOG_HEADER_TITLE: string;
294
+ VELT_ACTIVITY_LOG_HEADER_CLOSE_BUTTON: string;
295
+ VELT_ACTIVITY_LOG_HEADER_FILTER: string;
296
+ VELT_ACTIVITY_LOG_HEADER_FILTER_TRIGGER: string;
297
+ VELT_ACTIVITY_LOG_HEADER_FILTER_TRIGGER_LABEL: string;
298
+ VELT_ACTIVITY_LOG_HEADER_FILTER_TRIGGER_ICON: string;
299
+ VELT_ACTIVITY_LOG_HEADER_FILTER_CONTENT: string;
300
+ VELT_ACTIVITY_LOG_HEADER_FILTER_CONTENT_ITEM: string;
301
+ VELT_ACTIVITY_LOG_HEADER_FILTER_CONTENT_ITEM_LABEL: string;
302
+ VELT_ACTIVITY_LOG_HEADER_FILTER_CONTENT_ITEM_ICON: string;
303
+ VELT_ACTIVITY_LOG_LOADING: string;
304
+ VELT_ACTIVITY_LOG_LIST: string;
305
+ VELT_ACTIVITY_LOG_LIST_DATE_GROUP: string;
306
+ VELT_ACTIVITY_LOG_LIST_DATE_GROUP_LABEL: string;
307
+ VELT_ACTIVITY_LOG_LIST_ITEM: string;
308
+ VELT_ACTIVITY_LOG_LIST_ITEM_ICON: string;
309
+ VELT_ACTIVITY_LOG_LIST_ITEM_AVATAR: string;
310
+ VELT_ACTIVITY_LOG_LIST_ITEM_CONTENT: string;
311
+ VELT_ACTIVITY_LOG_LIST_ITEM_CONTENT_USER: string;
312
+ VELT_ACTIVITY_LOG_LIST_ITEM_CONTENT_ACTION: string;
313
+ VELT_ACTIVITY_LOG_LIST_ITEM_CONTENT_TARGET: string;
314
+ VELT_ACTIVITY_LOG_LIST_ITEM_CONTENT_DETAIL: string;
315
+ VELT_ACTIVITY_LOG_LIST_ITEM_TIME: string;
316
+ VELT_ACTIVITY_LOG_LIST_SHOW_MORE: string;
317
+ VELT_ACTIVITY_LOG_EMPTY: string;
318
+ VELT_ACTIVITY_LOG_CONTEXT_WRAPPER: string;
291
319
  VELT_COMMENT_DIALOG_VISIBILITY_BANNER: string;
292
320
  VELT_COMMENT_DIALOG_VISIBILITY_BANNER_ICON: string;
293
321
  VELT_COMMENT_DIALOG_VISIBILITY_BANNER_TEXT: string;
@@ -28,7 +28,8 @@ export declare enum ResolverActions {
28
28
  ATTACHMENT_DELETE = "attachment.delete",
29
29
  RECORDER_ANNOTATION_ADD = "recorder_annotation.add",
30
30
  RECORDER_ANNOTATION_UPDATE = "recorder_annotation.update",
31
- RECORDER_ANNOTATION_DELETE = "recorder_annotation.delete"
31
+ RECORDER_ANNOTATION_DELETE = "recorder_annotation.delete",
32
+ ACTIVITY_SAVE = "activity.save"
32
33
  }
33
34
  export declare const CommentEventTypes: {
34
35
  readonly ADD_COMMENT_ANNOTATION: "addCommentAnnotation";
@@ -92,6 +93,7 @@ export declare const CoreEventTypes: {
92
93
  readonly REACTION_RESOLVER: "reactionResolver";
93
94
  readonly RECORDER_RESOLVER: "recorderResolver";
94
95
  readonly NOTIFICATION_RESOLVER: "notificationResolver";
96
+ readonly ACTIVITY_RESOLVER: "activityResolver";
95
97
  readonly VELT_BUTTON_CLICK: "veltButtonClick";
96
98
  readonly USER_UPDATE: "userUpdate";
97
99
  readonly INIT_UPDATE: "initUpdate";
package/models.d.ts CHANGED
@@ -75,6 +75,7 @@ export * from './app/models/data/reaction-annotation.data.model';
75
75
  export * from './app/models/data/reaction-resolver.data.model';
76
76
  export * from './app/models/data/recorder-resolver.data.model';
77
77
  export * from './app/models/data/attachment-resolver.data.model';
78
+ export * from './app/models/data/activity-resolver.data.model';
78
79
  export * from './app/models/data/reaction.data.model';
79
80
  export * from './app/models/data/organization-groups.data.model';
80
81
  export * from './app/models/data/organization-metadata.model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk-staging",
3
- "version": "5.0.2-beta.27",
3
+ "version": "5.0.2-beta.29",
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": [