@veltdev/sdk-staging 5.0.2-beta.27 → 5.0.2-beta.28
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/models/data/activity-resolver.data.model.d.ts +27 -0
- package/app/models/data/activity.data.model.d.ts +2 -0
- package/app/models/data/core-events.data.model.d.ts +21 -0
- package/app/models/data/provider.data.model.d.ts +2 -0
- package/app/models/data/user-resolver.data.model.d.ts +2 -0
- package/app/models/data/user.data.model.d.ts +2 -0
- package/app/utils/enums.d.ts +3 -1
- package/models.d.ts +1 -0
- package/package.json +1 -1
- package/velt.js +76 -76
|
@@ -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;
|
package/app/utils/enums.d.ts
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "5.0.2-beta.28",
|
|
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": [
|