@veltdev/types-dev 3.0.228 → 3.0.230
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 +5 -0
- package/app/models/data/comment-actions.data.model.d.ts +62 -48
- package/app/models/data/comment-events.data.model.d.ts +144 -66
- package/app/models/data/event-metadata.data.model.d.ts +8 -0
- package/app/models/element/comment-element.model.d.ts +60 -26
- package/app/utils/constants.d.ts +1 -1
- package/app/utils/enums.d.ts +4 -3
- package/models.d.ts +1 -0
- package/package.json +1 -1
|
@@ -24,6 +24,7 @@ import { FeatureType } from "../utils/enums";
|
|
|
24
24
|
import { UserContact } from "../models/data/user-contact.data.model";
|
|
25
25
|
import { DocumentMetadata } from "../models/data/document-metadata.model";
|
|
26
26
|
import { ReactionElement } from "../models/element/reaction-element.model";
|
|
27
|
+
import { VeltEventMetadata } from "../models/data/event-metadata.data.model";
|
|
27
28
|
export declare class Snippyly {
|
|
28
29
|
constructor();
|
|
29
30
|
initConfig: (apiKey: string, config?: Config) => void;
|
|
@@ -162,6 +163,10 @@ export declare class Snippyly {
|
|
|
162
163
|
* Get the Area Object.
|
|
163
164
|
*/
|
|
164
165
|
getReactionElement: () => ReactionElement;
|
|
166
|
+
/**
|
|
167
|
+
* Get the metadata of the current resource.
|
|
168
|
+
*/
|
|
169
|
+
getMetadata: () => Promise<VeltEventMetadata | null>;
|
|
165
170
|
/**
|
|
166
171
|
* To signout a user
|
|
167
172
|
*/
|
|
@@ -4,139 +4,153 @@ import { CommentAnnotation } from "./comment-annotation.data.model";
|
|
|
4
4
|
import { Comment } from "./comment.data.model";
|
|
5
5
|
import { CustomPriority, CustomStatus } from "./custom-filter.data.model";
|
|
6
6
|
import { ReactionItem } from "./reaction-annotation.data.model";
|
|
7
|
+
import { UserContact } from "./user-contact.data.model";
|
|
7
8
|
import { User } from "./user.data.model";
|
|
8
|
-
export
|
|
9
|
+
export interface RequestOptions {
|
|
9
10
|
organizationId?: string;
|
|
10
11
|
documentId?: string;
|
|
11
12
|
}
|
|
12
|
-
export
|
|
13
|
+
export interface UpdatePriorityRequest {
|
|
13
14
|
annotationId: string;
|
|
14
15
|
priority?: CustomPriority;
|
|
15
|
-
options?:
|
|
16
|
+
options?: RequestOptions;
|
|
16
17
|
}
|
|
17
|
-
export
|
|
18
|
+
export interface UpdateStatusRequest {
|
|
18
19
|
annotationId: string;
|
|
19
20
|
status: CustomStatus;
|
|
20
|
-
options?:
|
|
21
|
+
options?: RequestOptions;
|
|
21
22
|
}
|
|
22
|
-
export
|
|
23
|
+
export interface UpdateAccessRequest {
|
|
23
24
|
annotationId: string;
|
|
24
25
|
accessMode: CommentAccessMode;
|
|
25
|
-
options?:
|
|
26
|
+
options?: RequestOptions;
|
|
26
27
|
}
|
|
27
|
-
export
|
|
28
|
+
export interface ResolveCommentAnnotationRequest {
|
|
28
29
|
annotationId: string;
|
|
29
|
-
options?:
|
|
30
|
+
options?: RequestOptions;
|
|
30
31
|
}
|
|
31
|
-
export
|
|
32
|
+
export interface GetLinkRequest {
|
|
32
33
|
annotationId: string;
|
|
33
|
-
options?:
|
|
34
|
+
options?: RequestOptions;
|
|
34
35
|
}
|
|
35
|
-
export
|
|
36
|
+
export interface CopyLinkRequest {
|
|
36
37
|
annotationId: string;
|
|
37
|
-
options?:
|
|
38
|
+
options?: RequestOptions;
|
|
38
39
|
}
|
|
39
|
-
export
|
|
40
|
+
export interface AddCommentAnnotationRequest {
|
|
40
41
|
annotation: CommentAnnotation;
|
|
41
|
-
options?:
|
|
42
|
+
options?: RequestOptions;
|
|
42
43
|
}
|
|
43
|
-
export
|
|
44
|
+
export interface ApproveCommentAnnotationRequest {
|
|
44
45
|
annotationId: string;
|
|
45
|
-
options?:
|
|
46
|
+
options?: RequestOptions;
|
|
46
47
|
}
|
|
47
|
-
export
|
|
48
|
+
export interface AcceptCommentAnnotationRequest {
|
|
48
49
|
annotationId: string;
|
|
49
|
-
options?:
|
|
50
|
+
options?: RequestOptions;
|
|
50
51
|
}
|
|
51
|
-
export
|
|
52
|
+
export interface RejectCommentAnnotationRequest {
|
|
52
53
|
annotationId: string;
|
|
53
|
-
options?:
|
|
54
|
+
options?: RequestOptions;
|
|
54
55
|
}
|
|
55
|
-
export
|
|
56
|
+
export interface DeleteCommentAnnotationRequest {
|
|
56
57
|
annotationId: string;
|
|
57
|
-
options?:
|
|
58
|
+
options?: RequestOptions;
|
|
58
59
|
}
|
|
59
|
-
export
|
|
60
|
+
export interface SubscribeCommentAnnotationRequest {
|
|
61
|
+
annotationId: string;
|
|
62
|
+
options?: RequestOptions;
|
|
63
|
+
}
|
|
64
|
+
export interface UnsubscribeCommentAnnotationRequest {
|
|
65
|
+
annotationId: string;
|
|
66
|
+
options?: RequestOptions;
|
|
67
|
+
}
|
|
68
|
+
export interface AssignUserRequest {
|
|
69
|
+
annotationId: string;
|
|
70
|
+
assignedTo: UserContact;
|
|
71
|
+
options?: RequestOptions;
|
|
72
|
+
}
|
|
73
|
+
export interface AddCommentRequest {
|
|
60
74
|
annotationId: string;
|
|
61
75
|
comment: Comment;
|
|
62
76
|
assignedTo?: User;
|
|
63
|
-
options?:
|
|
77
|
+
options?: RequestOptions;
|
|
64
78
|
}
|
|
65
|
-
export
|
|
79
|
+
export interface UpdateCommentRequest {
|
|
66
80
|
annotationId: string;
|
|
67
81
|
comment: Comment;
|
|
68
82
|
skipDeleteThreadConfirmation?: boolean;
|
|
69
83
|
merge?: boolean;
|
|
70
|
-
options?:
|
|
84
|
+
options?: RequestOptions;
|
|
71
85
|
}
|
|
72
|
-
export
|
|
86
|
+
export interface DeleteCommentRequest {
|
|
73
87
|
annotationId: string;
|
|
74
88
|
commentId: number;
|
|
75
89
|
skipDeleteThreadConfirmation?: boolean;
|
|
76
|
-
options?:
|
|
90
|
+
options?: RequestOptions;
|
|
77
91
|
}
|
|
78
|
-
export
|
|
92
|
+
export interface GetCommentRequest {
|
|
79
93
|
annotationId: string;
|
|
80
|
-
options?:
|
|
94
|
+
options?: RequestOptions;
|
|
81
95
|
}
|
|
82
|
-
export
|
|
96
|
+
export interface AddAttachmentRequest {
|
|
83
97
|
annotationId: string;
|
|
84
98
|
files: File[];
|
|
85
|
-
options?:
|
|
99
|
+
options?: RequestOptions;
|
|
86
100
|
}
|
|
87
|
-
export
|
|
101
|
+
export interface AddAttachmentResponse {
|
|
88
102
|
valid: boolean;
|
|
89
103
|
file?: File;
|
|
90
104
|
maxAllowedSize: number;
|
|
91
105
|
error?: string;
|
|
92
106
|
attachment?: Attachment;
|
|
93
107
|
}
|
|
94
|
-
export
|
|
108
|
+
export interface DeleteAttachmentRequest {
|
|
95
109
|
annotationId: string;
|
|
96
110
|
commentId: number;
|
|
97
111
|
attachmentId: number;
|
|
98
|
-
options?:
|
|
112
|
+
options?: RequestOptions;
|
|
99
113
|
}
|
|
100
|
-
export
|
|
114
|
+
export interface GetAttachmentRequest {
|
|
101
115
|
annotationId: string;
|
|
102
116
|
commentId: number;
|
|
103
|
-
options?:
|
|
117
|
+
options?: RequestOptions;
|
|
104
118
|
}
|
|
105
|
-
export
|
|
119
|
+
export interface GetRecordingRequest {
|
|
106
120
|
annotationId: string;
|
|
107
121
|
commentId: number;
|
|
108
|
-
options?:
|
|
122
|
+
options?: RequestOptions;
|
|
109
123
|
}
|
|
110
|
-
export
|
|
124
|
+
export interface DeleteRecordingRequest {
|
|
111
125
|
annotationId: string;
|
|
112
126
|
commentId: number;
|
|
113
127
|
recorderId: string;
|
|
114
|
-
options?:
|
|
128
|
+
options?: RequestOptions;
|
|
115
129
|
}
|
|
116
|
-
export
|
|
130
|
+
export interface AddReactionRequest {
|
|
117
131
|
annotationId: string;
|
|
118
132
|
commentId: number;
|
|
119
133
|
reaction: {
|
|
120
134
|
reactionId: string;
|
|
121
135
|
customReaction?: ReactionItem;
|
|
122
136
|
};
|
|
123
|
-
options?:
|
|
137
|
+
options?: RequestOptions;
|
|
124
138
|
}
|
|
125
|
-
export
|
|
139
|
+
export interface DeleteReactionRequest {
|
|
126
140
|
annotationId: string;
|
|
127
141
|
commentId: number;
|
|
128
142
|
reaction: {
|
|
129
143
|
reactionId: string;
|
|
130
144
|
customReaction?: ReactionItem;
|
|
131
145
|
};
|
|
132
|
-
options?:
|
|
146
|
+
options?: RequestOptions;
|
|
133
147
|
}
|
|
134
|
-
export
|
|
148
|
+
export interface ToggleReactionRequest {
|
|
135
149
|
annotationId: string;
|
|
136
150
|
commentId: number;
|
|
137
151
|
reaction: {
|
|
138
152
|
reactionId: string;
|
|
139
153
|
customReaction?: ReactionItem;
|
|
140
154
|
};
|
|
141
|
-
options?:
|
|
155
|
+
options?: RequestOptions;
|
|
142
156
|
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { CommentAccessMode, CommentStatus } from "../../utils/enums";
|
|
1
|
+
import { CommentAccessMode, CommentEventTypes, CommentStatus } from "../../utils/enums";
|
|
2
2
|
import { Attachment } from "./attachment.model";
|
|
3
3
|
import { AddAttachmentResponse } from "./comment-actions.data.model";
|
|
4
4
|
import { CommentAnnotation, UpdateContextConfig } from "./comment-annotation.data.model";
|
|
5
5
|
import { Comment } from "./comment.data.model";
|
|
6
6
|
import { CustomPriority, CustomStatus } from "./custom-filter.data.model";
|
|
7
|
-
import {
|
|
7
|
+
import { VeltEventMetadata } from "./event-metadata.data.model";
|
|
8
8
|
import { Location } from "./location.model";
|
|
9
|
-
import { OrganizationMetadata } from "./organization-metadata.model";
|
|
10
9
|
import { ReactionAnnotation } from "./reaction-annotation.data.model";
|
|
11
10
|
import { RecordedData } from "./recorder.model";
|
|
11
|
+
import { UserContact } from "./user-contact.data.model";
|
|
12
12
|
import { User } from "./user.data.model";
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Use `AddCommentAnnotationEvent` instead
|
|
15
|
+
*/
|
|
13
16
|
export interface CommentAddEventData {
|
|
14
17
|
annotation: CommentAnnotation;
|
|
15
18
|
location?: Location;
|
|
@@ -21,6 +24,9 @@ export interface CommentAddEventData {
|
|
|
21
24
|
xpath: string;
|
|
22
25
|
};
|
|
23
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use respective events instead
|
|
29
|
+
*/
|
|
24
30
|
export interface CommentEvent {
|
|
25
31
|
annotation?: CommentAnnotation | null;
|
|
26
32
|
element?: HTMLElement;
|
|
@@ -29,8 +35,14 @@ export interface CommentEvent {
|
|
|
29
35
|
targetCommentId?: number;
|
|
30
36
|
updateContext?: (context: any, config?: UpdateContextConfig) => void;
|
|
31
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Use respective events instead
|
|
40
|
+
*/
|
|
32
41
|
export interface CommentUpdateEventData extends CommentEvent {
|
|
33
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Use `AcceptCommentAnnotationEvent` and `RejectCommentAnnotationEvent` instead
|
|
45
|
+
*/
|
|
34
46
|
export interface CommentSuggestionEventData {
|
|
35
47
|
annotationId: string;
|
|
36
48
|
actionUser?: User;
|
|
@@ -39,83 +51,139 @@ export interface CommentSuggestionEventData {
|
|
|
39
51
|
replaceContentText?: string;
|
|
40
52
|
annotation?: any;
|
|
41
53
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
54
|
+
type UpdateContext = (context: any, config?: UpdateContextConfig) => void;
|
|
55
|
+
export type CommentEventTypesMap = {
|
|
56
|
+
[CommentEventTypes.ADD_COMMENT_ANNOTATION]: AddCommentAnnotationEvent;
|
|
57
|
+
[CommentEventTypes.APPROVE_COMMENT_ANNOTATION]: ApproveCommentAnnotationEvent;
|
|
58
|
+
[CommentEventTypes.ACCEPT_COMMENT_ANNOTATION]: AcceptCommentAnnotationEvent;
|
|
59
|
+
[CommentEventTypes.REJECT_COMMENT_ANNOTATION]: RejectCommentAnnotationEvent;
|
|
60
|
+
[CommentEventTypes.SUBSCRIBE_COMMENT_ANNOTATION]: SubscribeCommentAnnotationEvent;
|
|
61
|
+
[CommentEventTypes.UNSUBSCRIBE_COMMENT_ANNOTATION]: UnsubscribeCommentAnnotationEvent;
|
|
62
|
+
[CommentEventTypes.DELETE_COMMENT_ANNOTATION]: DeleteCommentAnnotationEvent;
|
|
63
|
+
[CommentEventTypes.ASSIGN_USER]: AssignUserEvent;
|
|
64
|
+
[CommentEventTypes.UPDATE_PRIORITY]: UpdatePriorityEvent;
|
|
65
|
+
[CommentEventTypes.UPDATE_STATUS]: UpdateStatusEvent;
|
|
66
|
+
[CommentEventTypes.UPDATE_ACCESS]: UpdateAccessEvent;
|
|
67
|
+
[CommentEventTypes.RESOLVE_COMMENT]: ResolveCommentEvent;
|
|
68
|
+
[CommentEventTypes.ADD_COMMENT]: AddCommentEvent;
|
|
69
|
+
[CommentEventTypes.UPDATE_COMMENT]: UpdateCommentEvent;
|
|
70
|
+
[CommentEventTypes.DELETE_COMMENT]: DeleteCommentEvent;
|
|
71
|
+
[CommentEventTypes.ADD_ATTACHMENT]: AddAttachmentEvent;
|
|
72
|
+
[CommentEventTypes.DELETE_ATTACHMENT]: DeleteAttachmentEvent;
|
|
73
|
+
[CommentEventTypes.DELETE_RECORDING]: DeleteRecordingEvent;
|
|
74
|
+
[CommentEventTypes.COPY_LINK]: CopyLinkEvent;
|
|
75
|
+
[CommentEventTypes.ADD_REACTION]: AddReactionEvent;
|
|
76
|
+
[CommentEventTypes.DELETE_REACTION]: DeleteReactionEvent;
|
|
77
|
+
[CommentEventTypes.TOGGLE_REACTION]: ToggleReactionEvent;
|
|
78
|
+
};
|
|
47
79
|
export interface AddAttachmentEvent {
|
|
48
|
-
annotationId
|
|
49
|
-
commentAnnotation
|
|
80
|
+
annotationId: string;
|
|
81
|
+
commentAnnotation: CommentAnnotation;
|
|
50
82
|
attachments: AddAttachmentResponse[];
|
|
51
|
-
metadata:
|
|
83
|
+
metadata: VeltEventMetadata;
|
|
52
84
|
}
|
|
53
85
|
export interface DeleteAttachmentEvent {
|
|
54
|
-
annotationId
|
|
55
|
-
commentId
|
|
56
|
-
commentAnnotation
|
|
86
|
+
annotationId: string;
|
|
87
|
+
commentId: number;
|
|
88
|
+
commentAnnotation: CommentAnnotation;
|
|
57
89
|
attachment: Attachment;
|
|
58
|
-
metadata:
|
|
90
|
+
metadata: VeltEventMetadata;
|
|
59
91
|
}
|
|
60
92
|
export interface AddCommentAnnotationEvent {
|
|
61
|
-
annotationId
|
|
62
|
-
commentAnnotation
|
|
63
|
-
metadata:
|
|
93
|
+
annotationId: string;
|
|
94
|
+
commentAnnotation: CommentAnnotation;
|
|
95
|
+
metadata: VeltEventMetadata;
|
|
96
|
+
addContext: (context: any) => void;
|
|
97
|
+
elementRef?: {
|
|
98
|
+
xpath: string;
|
|
99
|
+
};
|
|
64
100
|
}
|
|
65
101
|
export interface ApproveCommentAnnotationEvent {
|
|
66
|
-
annotationId
|
|
67
|
-
commentAnnotation
|
|
68
|
-
metadata:
|
|
102
|
+
annotationId: string;
|
|
103
|
+
commentAnnotation: CommentAnnotation;
|
|
104
|
+
metadata: VeltEventMetadata;
|
|
105
|
+
updateContext: UpdateContext;
|
|
69
106
|
}
|
|
70
107
|
export interface AcceptCommentAnnotationEvent {
|
|
71
|
-
annotationId
|
|
72
|
-
commentAnnotation
|
|
73
|
-
metadata:
|
|
108
|
+
annotationId: string;
|
|
109
|
+
commentAnnotation: CommentAnnotation;
|
|
110
|
+
metadata: VeltEventMetadata;
|
|
111
|
+
actionUser: User;
|
|
112
|
+
replaceContentHtml?: string;
|
|
113
|
+
replaceContentText?: string;
|
|
114
|
+
updateContext: UpdateContext;
|
|
74
115
|
}
|
|
75
116
|
export interface RejectCommentAnnotationEvent {
|
|
76
|
-
annotationId
|
|
77
|
-
commentAnnotation
|
|
78
|
-
metadata:
|
|
117
|
+
annotationId: string;
|
|
118
|
+
commentAnnotation: CommentAnnotation;
|
|
119
|
+
metadata: VeltEventMetadata;
|
|
120
|
+
actionUser: User;
|
|
121
|
+
replaceContentHtml?: string;
|
|
122
|
+
replaceContentText?: string;
|
|
123
|
+
updateContext: UpdateContext;
|
|
79
124
|
}
|
|
80
125
|
export interface DeleteCommentAnnotationEvent {
|
|
81
|
-
annotationId
|
|
82
|
-
commentAnnotation
|
|
83
|
-
metadata:
|
|
126
|
+
annotationId: string;
|
|
127
|
+
commentAnnotation: CommentAnnotation;
|
|
128
|
+
metadata: VeltEventMetadata;
|
|
129
|
+
}
|
|
130
|
+
export interface SubscribeCommentAnnotationEvent {
|
|
131
|
+
annotationId: string;
|
|
132
|
+
commentAnnotation: CommentAnnotation;
|
|
133
|
+
metadata: VeltEventMetadata;
|
|
134
|
+
updateContext: UpdateContext;
|
|
135
|
+
}
|
|
136
|
+
export interface UnsubscribeCommentAnnotationEvent {
|
|
137
|
+
annotationId: string;
|
|
138
|
+
commentAnnotation: CommentAnnotation;
|
|
139
|
+
metadata: VeltEventMetadata;
|
|
140
|
+
updateContext: UpdateContext;
|
|
141
|
+
}
|
|
142
|
+
export interface AssignUserEvent {
|
|
143
|
+
annotationId: string;
|
|
144
|
+
assignedTo: UserContact;
|
|
145
|
+
commentAnnotation: CommentAnnotation;
|
|
146
|
+
metadata?: any;
|
|
147
|
+
updateContext: UpdateContext;
|
|
84
148
|
}
|
|
85
149
|
export interface AddCommentEvent {
|
|
86
|
-
annotationId
|
|
87
|
-
commentAnnotation
|
|
88
|
-
commentId
|
|
150
|
+
annotationId: string;
|
|
151
|
+
commentAnnotation: CommentAnnotation;
|
|
152
|
+
commentId: number;
|
|
89
153
|
comment: Comment;
|
|
90
|
-
metadata:
|
|
154
|
+
metadata: VeltEventMetadata;
|
|
155
|
+
updateContext: UpdateContext;
|
|
91
156
|
}
|
|
92
157
|
export interface UpdateCommentEvent {
|
|
93
|
-
annotationId
|
|
94
|
-
commentAnnotation
|
|
95
|
-
commentId
|
|
158
|
+
annotationId: string;
|
|
159
|
+
commentAnnotation: CommentAnnotation;
|
|
160
|
+
commentId: number;
|
|
96
161
|
comment: Comment;
|
|
97
|
-
metadata:
|
|
162
|
+
metadata: VeltEventMetadata;
|
|
163
|
+
updateContext: UpdateContext;
|
|
98
164
|
}
|
|
99
165
|
export interface DeleteCommentEvent {
|
|
100
|
-
annotationId
|
|
101
|
-
commentAnnotation
|
|
102
|
-
commentId
|
|
166
|
+
annotationId: string;
|
|
167
|
+
commentAnnotation: CommentAnnotation;
|
|
168
|
+
commentId: number;
|
|
103
169
|
comment: Comment;
|
|
104
|
-
metadata:
|
|
170
|
+
metadata: VeltEventMetadata;
|
|
171
|
+
updateContext: UpdateContext;
|
|
105
172
|
}
|
|
106
173
|
export interface DeleteRecordingEvent {
|
|
107
|
-
annotationId
|
|
108
|
-
commentAnnotation
|
|
109
|
-
commentId
|
|
174
|
+
annotationId: string;
|
|
175
|
+
commentAnnotation: CommentAnnotation;
|
|
176
|
+
commentId: number;
|
|
110
177
|
recording: RecordedData;
|
|
111
|
-
metadata:
|
|
178
|
+
metadata: VeltEventMetadata;
|
|
112
179
|
}
|
|
113
180
|
export interface ReactionEvent {
|
|
114
|
-
annotationId
|
|
115
|
-
commentAnnotation
|
|
116
|
-
commentId
|
|
181
|
+
annotationId: string;
|
|
182
|
+
commentAnnotation: CommentAnnotation;
|
|
183
|
+
commentId: number;
|
|
117
184
|
reaction: ReactionAnnotation;
|
|
118
|
-
metadata:
|
|
185
|
+
metadata: VeltEventMetadata;
|
|
186
|
+
updateContext: UpdateContext;
|
|
119
187
|
}
|
|
120
188
|
export interface AddReactionEvent extends ReactionEvent {
|
|
121
189
|
}
|
|
@@ -124,35 +192,45 @@ export interface DeleteReactionEvent extends ReactionEvent {
|
|
|
124
192
|
export interface ToggleReactionEvent extends ReactionEvent {
|
|
125
193
|
}
|
|
126
194
|
export interface UpdateStatusEvent {
|
|
127
|
-
annotationId
|
|
128
|
-
commentAnnotation
|
|
195
|
+
annotationId: string;
|
|
196
|
+
commentAnnotation: CommentAnnotation;
|
|
129
197
|
newStatus: CustomStatus;
|
|
130
198
|
oldStatus: CustomStatus;
|
|
131
|
-
metadata:
|
|
199
|
+
metadata: VeltEventMetadata;
|
|
200
|
+
updateContext: UpdateContext;
|
|
132
201
|
}
|
|
133
202
|
export interface UpdatePriorityEvent {
|
|
134
|
-
annotationId
|
|
135
|
-
commentAnnotation
|
|
203
|
+
annotationId: string;
|
|
204
|
+
commentAnnotation: CommentAnnotation;
|
|
136
205
|
newPriority?: CustomPriority;
|
|
137
206
|
oldPriority?: CustomPriority;
|
|
138
|
-
metadata:
|
|
207
|
+
metadata: VeltEventMetadata;
|
|
208
|
+
updateContext: UpdateContext;
|
|
139
209
|
}
|
|
140
210
|
export interface UpdateAccessEvent {
|
|
141
|
-
annotationId
|
|
142
|
-
commentAnnotation
|
|
211
|
+
annotationId: string;
|
|
212
|
+
commentAnnotation: CommentAnnotation;
|
|
143
213
|
newAccessMode?: CommentAccessMode;
|
|
144
214
|
oldAccessMode?: CommentAccessMode;
|
|
145
|
-
metadata:
|
|
215
|
+
metadata: VeltEventMetadata;
|
|
216
|
+
updateContext: UpdateContext;
|
|
146
217
|
}
|
|
147
|
-
export interface
|
|
148
|
-
annotationId
|
|
149
|
-
commentAnnotation
|
|
218
|
+
export interface ResolveCommentEvent {
|
|
219
|
+
annotationId: string;
|
|
220
|
+
commentAnnotation: CommentAnnotation;
|
|
221
|
+
metadata: VeltEventMetadata;
|
|
222
|
+
updateContext: UpdateContext;
|
|
223
|
+
}
|
|
224
|
+
export interface GetLinkResponse {
|
|
225
|
+
annotationId: string;
|
|
226
|
+
commentAnnotation: CommentAnnotation;
|
|
150
227
|
link: string | null;
|
|
151
|
-
metadata:
|
|
228
|
+
metadata: VeltEventMetadata;
|
|
152
229
|
}
|
|
153
230
|
export interface CopyLinkEvent {
|
|
154
|
-
annotationId
|
|
155
|
-
commentAnnotation
|
|
231
|
+
annotationId: string;
|
|
232
|
+
commentAnnotation: CommentAnnotation;
|
|
156
233
|
link: string;
|
|
157
|
-
metadata:
|
|
234
|
+
metadata: VeltEventMetadata;
|
|
158
235
|
}
|
|
236
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DocumentMetadata } from "./document-metadata.model";
|
|
2
|
+
import { Location } from "./location.model";
|
|
3
|
+
import { OrganizationMetadata } from "./organization-metadata.model";
|
|
4
|
+
export interface VeltEventMetadata {
|
|
5
|
+
organizationMetadata?: OrganizationMetadata | null;
|
|
6
|
+
documentMetadata?: DocumentMetadata | null;
|
|
7
|
+
location?: Location | null;
|
|
8
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
3
|
import { CommentAnnotation, CommentOnElementConfig, CommentSelectionChangeData, ManualCommentAnnotationConfig, UpdateContextConfig } from "../data/comment-annotation.data.model";
|
|
4
|
-
import { AcceptCommentAnnotationEvent, AddCommentAnnotationEvent, AddCommentEvent, AddReactionEvent, ApproveCommentAnnotationEvent, CommentAddEventData, CommentUpdateEventData, CopyLinkEvent, DeleteAttachmentEvent, DeleteCommentAnnotationEvent, DeleteCommentEvent, DeleteReactionEvent, DeleteRecordingEvent, GetLinkEvent, RejectCommentAnnotationEvent, ToggleReactionEvent, UpdateAccessEvent, UpdateCommentEvent, UpdatePriorityEvent, UpdateStatusEvent } from "../data/comment-events.data.model";
|
|
4
|
+
import { AcceptCommentAnnotationEvent, AddCommentAnnotationEvent, AddCommentEvent, AddReactionEvent, ApproveCommentAnnotationEvent, CommentAddEventData, CommentEventTypesMap, CommentUpdateEventData, CopyLinkEvent, DeleteAttachmentEvent, DeleteCommentAnnotationEvent, DeleteCommentEvent, DeleteReactionEvent, DeleteRecordingEvent, GetLinkEvent, RejectCommentAnnotationEvent, ToggleReactionEvent, UpdateAccessEvent, UpdateCommentEvent, UpdatePriorityEvent, UpdateStatusEvent } from "../data/comment-events.data.model";
|
|
5
5
|
import { CustomCategory, CustomPriority, CustomStatus } from "../data/custom-filter.data.model";
|
|
6
6
|
import { CustomAnnotationDropdownData } from "../data/custom-chip-dropdown.data.model";
|
|
7
7
|
import { AutocompleteData } from "../data/autocomplete.data.model";
|
|
8
8
|
import { CommentSidebarCustomActionEventData, CommentSidebarData, CommentSidebarDataOptions } from "../data/comment-sidebar-config.model";
|
|
9
9
|
export { ReactionMap } from '../data/reaction-annotation.data.model';
|
|
10
|
-
import {
|
|
10
|
+
import { AcceptCommentAnnotationRequest, AddAttachmentRequest, AddAttachmentResponse, AddCommentAnnotationRequest, AddCommentRequest, AddReactionRequest, ApproveCommentAnnotationRequest, AssignUserRequest, AssignUserEvent, CopyLinkRequest, DeleteAttachmentRequest, DeleteCommentAnnotationRequest, DeleteCommentRequest, DeleteReactionRequest, DeleteRecordingRequest, GetAttachmentRequest, GetCommentRequest, GetLinkRequest, GetRecordingRequest, RejectCommentAnnotationRequest, ResolveCommentAnnotationRequest, SubscribeCommentAnnotationRequest, UnsubscribeCommentAnnotationRequest, ToggleReactionRequest, UpdateAccessRequest, UpdateCommentRequest, UpdatePriorityRequest, UpdateStatusRequest } from "../data/comment-actions.data.model";
|
|
11
11
|
export declare class CommentElement {
|
|
12
12
|
/**
|
|
13
13
|
* Subscribe to comments on the current document.
|
|
@@ -394,11 +394,15 @@ export declare class CommentElement {
|
|
|
394
394
|
|
|
395
395
|
/**
|
|
396
396
|
* To get documentId, location and set context data when comment is added.
|
|
397
|
+
*
|
|
398
|
+
* @deprecated Use `AddCommentAnnotationEvent` instead
|
|
397
399
|
*/
|
|
398
400
|
public onCommentAdd: () => Observable<CommentAddEventData>;
|
|
399
401
|
|
|
400
402
|
/**
|
|
401
403
|
* To get data when comment is updated.
|
|
404
|
+
*
|
|
405
|
+
* @deprecated Use action specific events instead
|
|
402
406
|
*/
|
|
403
407
|
public onCommentUpdate: () => Observable<CommentUpdateEventData>;
|
|
404
408
|
|
|
@@ -916,122 +920,137 @@ export declare class CommentElement {
|
|
|
916
920
|
/**
|
|
917
921
|
* To add comment annotation
|
|
918
922
|
*/
|
|
919
|
-
public addCommentAnnotation: (config:
|
|
923
|
+
public addCommentAnnotation: (config: AddCommentAnnotationRequest) => Promise<AddCommentAnnotationEvent | null>;
|
|
920
924
|
|
|
921
925
|
/**
|
|
922
926
|
* To approve comment annotation
|
|
923
927
|
*/
|
|
924
|
-
public approveCommentAnnotation: (config:
|
|
928
|
+
public approveCommentAnnotation: (config: ApproveCommentAnnotationRequest) => Promise<ApproveCommentAnnotationEvent | null>;
|
|
925
929
|
|
|
926
930
|
/**
|
|
927
931
|
* To accept comment annotation
|
|
928
932
|
*/
|
|
929
|
-
public acceptCommentAnnotation: (config:
|
|
933
|
+
public acceptCommentAnnotation: (config: AcceptCommentAnnotationRequest) => Promise<AcceptCommentAnnotationEvent | null>;
|
|
930
934
|
|
|
931
935
|
/**
|
|
932
936
|
* To reject comment annotation
|
|
933
937
|
*/
|
|
934
|
-
public rejectCommentAnnotation: (config:
|
|
938
|
+
public rejectCommentAnnotation: (config: RejectCommentAnnotationRequest) => Promise<RejectCommentAnnotationEvent | null>;
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* To subscribe comment annotation
|
|
942
|
+
*/
|
|
943
|
+
public subscribeCommentAnnotation: (config: SubscribeCommentAnnotationRequest) => Promise<SubscribeCommentAnnotationEvent | null>;
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* To unsubscribe comment annotation
|
|
947
|
+
*/
|
|
948
|
+
public unsubscribeCommentAnnotation: (config: UnsubscribeCommentAnnotationRequest) => Promise<UnsubscribeCommentAnnotationEvent | null>;
|
|
935
949
|
|
|
936
950
|
/**
|
|
937
951
|
* To delete comment annotation
|
|
938
952
|
*/
|
|
939
|
-
public deleteCommentAnnotation: (config:
|
|
953
|
+
public deleteCommentAnnotation: (config: DeleteCommentAnnotationRequest) => Promise<DeleteCommentAnnotationEvent | null>;
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* To assign user to comment annotation
|
|
957
|
+
*/
|
|
958
|
+
public assignUser: (config: AssignUserRequest) => Promise<AssignUserEvent | null>;
|
|
940
959
|
|
|
941
960
|
/**
|
|
942
961
|
* To update priority
|
|
943
962
|
*/
|
|
944
|
-
public updatePriority: (config:
|
|
963
|
+
public updatePriority: (config: UpdatePriorityRequest) => Promise<UpdatePriorityEvent | null>;
|
|
945
964
|
|
|
946
965
|
/**
|
|
947
966
|
* To update status
|
|
948
967
|
*/
|
|
949
|
-
public updateStatus: (config:
|
|
968
|
+
public updateStatus: (config: UpdateStatusRequest) => Promise<UpdateStatusEvent | null>;
|
|
950
969
|
|
|
951
970
|
/**
|
|
952
971
|
* To update access
|
|
953
972
|
*/
|
|
954
|
-
public updateAccess: (config:
|
|
973
|
+
public updateAccess: (config: UpdateAccessRequest) => Promise<UpdateAccessEvent | null>;
|
|
955
974
|
|
|
956
975
|
/**
|
|
957
976
|
* To resolve comment annotation
|
|
958
977
|
*/
|
|
959
|
-
public resolveCommentAnnotation: (config:
|
|
978
|
+
public resolveCommentAnnotation: (config: ResolveCommentAnnotationRequest) => Promise<any>;
|
|
960
979
|
|
|
961
980
|
/**
|
|
962
981
|
* To get link
|
|
963
982
|
*/
|
|
964
|
-
public getLink: (config:
|
|
983
|
+
public getLink: (config: GetLinkRequest) => Promise<GetLinkEvent | null>;
|
|
965
984
|
|
|
966
985
|
/**
|
|
967
986
|
* To copy link
|
|
968
987
|
*/
|
|
969
|
-
public copyLink: (config:
|
|
988
|
+
public copyLink: (config: CopyLinkRequest) => Promise<CopyLinkEvent | null>;
|
|
970
989
|
|
|
971
990
|
/**
|
|
972
991
|
* To add comment
|
|
973
992
|
*/
|
|
974
|
-
public addComment: (config:
|
|
993
|
+
public addComment: (config: AddCommentRequest) => Promise<AddCommentEvent | null>;
|
|
975
994
|
|
|
976
995
|
/**
|
|
977
996
|
* To update comment
|
|
978
997
|
*/
|
|
979
|
-
public updateComment: (config:
|
|
998
|
+
public updateComment: (config: UpdateCommentRequest) => Promise<UpdateCommentEvent | null>;
|
|
980
999
|
|
|
981
1000
|
/**
|
|
982
1001
|
* To delete comment
|
|
983
1002
|
*/
|
|
984
|
-
public deleteComment: (config:
|
|
1003
|
+
public deleteComment: (config: DeleteCommentRequest) => Promise<DeleteCommentEvent | null>;
|
|
985
1004
|
|
|
986
1005
|
/**
|
|
987
1006
|
* To get comment
|
|
988
1007
|
*/
|
|
989
|
-
public getComment: (config:
|
|
1008
|
+
public getComment: (config: GetCommentRequest) => Promise<Comment[]>;
|
|
990
1009
|
|
|
991
1010
|
/**
|
|
992
1011
|
* To add attachment
|
|
993
1012
|
*/
|
|
994
|
-
public addAttachment: (config:
|
|
1013
|
+
public addAttachment: (config: AddAttachmentRequest) => Promise<AddAttachmentResponse[]>;
|
|
995
1014
|
|
|
996
1015
|
/**
|
|
997
1016
|
* To get attachment
|
|
998
1017
|
*/
|
|
999
|
-
public getAttachment: (config:
|
|
1018
|
+
public getAttachment: (config: GetAttachmentRequest) => Promise<Attachment[]>;
|
|
1000
1019
|
|
|
1001
1020
|
/**
|
|
1002
1021
|
* To delete attachment
|
|
1003
1022
|
*/
|
|
1004
|
-
public deleteAttachment: (config:
|
|
1023
|
+
public deleteAttachment: (config: DeleteAttachmentRequest) => Promise<DeleteAttachmentEvent | null>;
|
|
1005
1024
|
|
|
1006
1025
|
/**
|
|
1007
1026
|
* To get recording
|
|
1008
1027
|
*/
|
|
1009
|
-
public getRecording: (config:
|
|
1028
|
+
public getRecording: (config: GetRecordingRequest) => Promise<RecordedData[]>;
|
|
1010
1029
|
|
|
1011
1030
|
/**
|
|
1012
1031
|
* To delete recording
|
|
1013
1032
|
*/
|
|
1014
|
-
public deleteRecording: (config:
|
|
1033
|
+
public deleteRecording: (config: DeleteRecordingRequest) => Promise<DeleteRecordingEvent | null>;
|
|
1015
1034
|
|
|
1016
1035
|
/**
|
|
1017
1036
|
* To add reaction
|
|
1018
1037
|
*/
|
|
1019
|
-
public addReaction: (config:
|
|
1038
|
+
public addReaction: (config: AddReactionRequest) => Promise<AddReactionEvent | null>;
|
|
1020
1039
|
|
|
1021
1040
|
/**
|
|
1022
1041
|
* To delete reaction
|
|
1023
1042
|
*/
|
|
1024
|
-
public deleteReaction: (config:
|
|
1043
|
+
public deleteReaction: (config: DeleteReactionRequest) => Promise<DeleteReactionEvent | null>;
|
|
1025
1044
|
|
|
1026
1045
|
/**
|
|
1027
1046
|
* To toggle reaction
|
|
1028
1047
|
*/
|
|
1029
|
-
public toggleReaction: (config:
|
|
1048
|
+
public toggleReaction: (config: ToggleReactionRequest) => Promise<ToggleReactionEvent | null>;
|
|
1030
1049
|
|
|
1031
1050
|
/**
|
|
1032
1051
|
* Subscribe to comment actions
|
|
1033
1052
|
*/
|
|
1034
|
-
public on: (action:
|
|
1053
|
+
public on: <T extends keyof CommentEventTypesMap>(action: T) => Observable<CommentEventTypesMap[T]>;
|
|
1035
1054
|
constructor();
|
|
1036
1055
|
/**
|
|
1037
1056
|
* Subscribe to comments on the current document.
|
|
@@ -1952,11 +1971,26 @@ export declare class CommentElement {
|
|
|
1952
1971
|
*/
|
|
1953
1972
|
private _rejectCommentAnnotation;
|
|
1954
1973
|
|
|
1974
|
+
/**
|
|
1975
|
+
* To subscribe to comment annotation
|
|
1976
|
+
*/
|
|
1977
|
+
private _subscribeCommentAnnotation;
|
|
1978
|
+
|
|
1979
|
+
/**
|
|
1980
|
+
* To unsubscribe to comment annotation
|
|
1981
|
+
*/
|
|
1982
|
+
private _unsubscribeCommentAnnotation;
|
|
1983
|
+
|
|
1955
1984
|
/**
|
|
1956
1985
|
* To delete comment annotation
|
|
1957
1986
|
*/
|
|
1958
1987
|
private _deleteCommentAnnotation;
|
|
1959
1988
|
|
|
1989
|
+
/**
|
|
1990
|
+
* To assign user to comment annotation
|
|
1991
|
+
*/
|
|
1992
|
+
private _assignUser;
|
|
1993
|
+
|
|
1960
1994
|
/**
|
|
1961
1995
|
* To update priority
|
|
1962
1996
|
*/
|
package/app/utils/constants.d.ts
CHANGED
|
@@ -373,7 +373,7 @@ export declare class Constants {
|
|
|
373
373
|
static VELT_BASE_REM_UNIT: string;
|
|
374
374
|
static VELT_VIEWPORT_WIDTH: string;
|
|
375
375
|
static VELT_VIEWPORT_HEIGHT: string;
|
|
376
|
-
static
|
|
376
|
+
static VELT_SELECTION_COLOR: string;
|
|
377
377
|
static VELT_MIN_ARROW_LENGTH: number;
|
|
378
378
|
static VELT_ARROW_VIEWPORT_PADDING: number;
|
|
379
379
|
static LIVE_STATE_REQUEST_EDITOR_ACCESS_WAIT_TIME: number;
|
package/app/utils/enums.d.ts
CHANGED
|
@@ -16,13 +16,15 @@ export declare enum CommentStatus {
|
|
|
16
16
|
SUBSCRIBED = "subscribed",
|
|
17
17
|
UNSUBSCRIBED = "unsubscribed"
|
|
18
18
|
}
|
|
19
|
-
export declare enum
|
|
19
|
+
export declare enum CommentEventTypes {
|
|
20
20
|
ADD_COMMENT_ANNOTATION = "addCommentAnnotation",
|
|
21
|
-
UPDATE_COMMENT_ANNOTATION = "updateCommentAnnotation",
|
|
22
21
|
DELETE_COMMENT_ANNOTATION = "deleteCommentAnnotation",
|
|
23
22
|
APPROVE_COMMENT_ANNOTATION = "approveCommentAnnotation",
|
|
24
23
|
ACCEPT_COMMENT_ANNOTATION = "acceptCommentAnnotation",
|
|
25
24
|
REJECT_COMMENT_ANNOTATION = "rejectCommentAnnotation",
|
|
25
|
+
SUBSCRIBE_COMMENT_ANNOTATION = "subscribeCommentAnnotation",
|
|
26
|
+
UNSUBSCRIBE_COMMENT_ANNOTATION = "unsubscribeCommentAnnotation",
|
|
27
|
+
ASSIGN_USER = "assignUser",
|
|
26
28
|
UPDATE_STATUS = "updateStatus",
|
|
27
29
|
UPDATE_PRIORITY = "updatePriority",
|
|
28
30
|
UPDATE_ACCESS = "updateAccess",
|
|
@@ -33,7 +35,6 @@ export declare enum CommentActionTypes {
|
|
|
33
35
|
ADD_ATTACHMENT = "addAttachment",
|
|
34
36
|
DELETE_ATTACHMENT = "deleteAttachment",
|
|
35
37
|
DELETE_RECORDING = "deleteRecording",
|
|
36
|
-
GET_LINK = "getLink",
|
|
37
38
|
COPY_LINK = "copyLink",
|
|
38
39
|
ADD_REACTION = "addReaction",
|
|
39
40
|
DELETE_REACTION = "deleteReaction",
|
package/models.d.ts
CHANGED
|
@@ -56,3 +56,4 @@ export * from './app/models/data/reaction.data.model';
|
|
|
56
56
|
export * from './app/models/data/organization-groups.data.model';
|
|
57
57
|
export * from './app/models/data/organization-metadata.model';
|
|
58
58
|
export * from './app/models/data/user-organization.data.model';
|
|
59
|
+
export * from './app/models/data/event-metadata.data.model';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltdev/types-dev",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.230",
|
|
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": [
|