@veltdev/sdk-staging 4.0.0-beta.1 → 4.0.0-beta.100

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.
@@ -26,6 +26,10 @@ import { DocumentMetadata } from "../models/data/document-metadata.model";
26
26
  import { ReactionElement } from "../models/element/reaction-element.model";
27
27
  import { VeltEventMetadata } from "../models/data/event-metadata.data.model";
28
28
  import { CoreEventTypesMap } from "../models/data/core-events.data.model";
29
+ import { Document, SetDocumentsRequestOptions, FetchDocumentsRequest, FetchFoldersRequest } from "../models/data/document.data.model";
30
+ import { FetchDocumentsResponse, FetchFoldersResponse } from "../models/data/document-events.data.model";
31
+ import { UserDataProvider } from "../models/data/user-resolver.data.model";
32
+
29
33
  export declare class Snippyly {
30
34
  constructor();
31
35
  initConfig: (apiKey: string, config?: Config) => void;
@@ -46,33 +50,44 @@ export declare class Snippyly {
46
50
  /**
47
51
  * Tell us the unique ID of the current document/resource on which you want to enable collaboration.
48
52
  * @param id unique document ID
53
+ * @deprecated This method is deprecated and will be removed in next release. Use `setDocuments` method instead.
49
54
  */
50
55
  setDocumentId: (id: string) => void;
56
+ /**
57
+ * To set multiple documents
58
+ */
59
+ setDocuments: (documents: Document[], options?: SetDocumentsRequestOptions) => void;
51
60
  /**
52
61
  * To unset the document id
62
+ * @deprecated This method is deprecated and will be removed in next release. Use `unsetDocuments` method instead.
53
63
  */
54
64
  unsetDocumentId: () => void;
55
65
  /**
56
- * Get Document ID
66
+ * To unset the documents
57
67
  */
58
- getDocumentId: () => string;
68
+ unsetDocuments: () => void;
59
69
  /**
60
- * Tell us the custom params of the current document/resource to identify sub document inside a document.
61
- * @param params Document Params
62
- * @deprecated This method is depercated and will be removed in next release. Use `setLocation` method instead.
70
+ * To fetch documents
63
71
  */
64
- setDocumentParams: (params: Location) => void;
72
+ fetchDocuments: (options?: FetchDocumentsRequest) => Promise<FetchDocumentsResponse>;
73
+ /**
74
+ * To fetch folders
75
+ */
76
+ fetchFolders: (options?: FetchFoldersRequest) => Promise<FetchFoldersResponse>;
77
+ /**
78
+ * To set the user data provider.
79
+ */
80
+ setUserDataProvider: (userDataProvider: UserDataProvider) => void;
81
+ /**
82
+ * Get Document ID
83
+ */
84
+ getDocumentId: () => string;
65
85
  /**
66
86
  * Tell us the custom params of the current document/resource to identify sub document inside a document.
67
87
  * @param params Location
68
88
  * @param appendLocation Append location to existing location
69
89
  */
70
90
  setLocation: (params: Location, appendLocation?: boolean) => void;
71
- /**
72
- * To remove document params from a User
73
- * @deprecated This method is depercated and will be removed in next release. Use `removeLocation` method instead.
74
- */
75
- removeDocumentParams: () => void;
76
91
  /**
77
92
  * To remove location from a User
78
93
  * @param location Location
@@ -178,12 +193,6 @@ export declare class Snippyly {
178
193
  * @param features List of features
179
194
  */
180
195
  disableFeatures: (features: Array<FeatureType>) => void;
181
- /**
182
- * Add location to show comments, tags, recorders etc. for provided location also.
183
- * @param location Location object
184
- * @deprecated This method is deprecated and will be removed in next release. Use `setLocation` method with `appendLocation: true` instead.
185
- */
186
- addLocation: (location: any) => any;
187
196
  /**
188
197
  * To set the dark mode of Velt components.
189
198
  * @param value {boolean} true/false
@@ -211,17 +220,6 @@ export declare class Snippyly {
211
220
  */
212
221
  getVeltInitState: () => Observable<boolean | undefined>;
213
222
 
214
- /**
215
- * To invite list of users to the document.
216
- * @param documentUsers List of document users
217
- */
218
- inviteUsers: (documentUsers: Array<DocumentUser>) => void;
219
-
220
- /**
221
- * To remove snippyly specific content from provided html content.
222
- */
223
- removeSnippylyContent: (htmlContent: string) => string;
224
-
225
223
  /**
226
224
  * To remove velt specific content from provided html content.
227
225
  */
@@ -262,6 +260,7 @@ export declare class Snippyly {
262
260
 
263
261
  /**
264
262
  * To get document metadata.
263
+ * @deprecated This method is deprecated and will be removed in next release.
265
264
  */
266
265
  getDocumentMetadata: () => Observable<DocumentMetadata | null>;
267
266
 
@@ -0,0 +1,51 @@
1
+ import { AnnotationProperty } from "./annotation-property.data.model";
2
+ import { CursorPosition } from "./cursor-position.data.model";
3
+ import { Location } from "./location.model";
4
+ import { PageInfo } from "./page-info.model";
5
+ import { TargetElement } from "./target-element.data.model";
6
+ import { User } from "./user.data.model";
7
+ export declare class ArrowAnnotation {
8
+ /**
9
+ * Unique identifier for the arrow pin annotation.
10
+ *
11
+ * Auto generated.
12
+ */
13
+ annotationId: string;
14
+ /**
15
+ * The user who created this arrow pin annotation.
16
+ *
17
+ */
18
+ from: User;
19
+ /**
20
+ * Color used for the arrow pin annotation.
21
+ *
22
+ */
23
+ color?: string;
24
+ /**
25
+ * Timestamp when the arrow annotation was last updated.
26
+ *
27
+ * Auto generated.
28
+ */
29
+ lastUpdated?: any;
30
+ /**
31
+ * Target element of attached annotation.
32
+ */
33
+ targetElement?: TargetElement | null;
34
+ position?: CursorPosition | null;
35
+ /**
36
+ * Unique location id generated from provided location
37
+ */
38
+ locationId?: number | null;
39
+ /**
40
+ * Set location to identify user on sub document
41
+ */
42
+ location?: Location | null;
43
+ type?: string;
44
+ props: AnnotationProperty;
45
+ /**
46
+ * To maintain index of current annotation in available list of annotations
47
+ * It will start from 1, so no need to add 1 in that.
48
+ */
49
+ annotationIndex?: number;
50
+ pageInfo?: PageInfo;
51
+ }
@@ -4,4 +4,6 @@ export declare class BaseMetadata {
4
4
  clientDocumentId?: string;
5
5
  organizationId?: string;
6
6
  clientOrganizationId?: string;
7
+ folderId?: string;
8
+ veltFolderId?: string;
7
9
  }
@@ -9,8 +9,10 @@ import { User } from "./user.data.model";
9
9
  export interface RequestOptions {
10
10
  organizationId?: string;
11
11
  documentId?: string;
12
+ folderId?: string;
12
13
  filters?: any;
13
14
  documentIds?: string[];
15
+ allDocuments?: boolean;
14
16
  }
15
17
  export interface UpdatePriorityRequest {
16
18
  annotationId: string;
@@ -59,11 +61,13 @@ export interface DeleteCommentAnnotationRequest {
59
61
  annotationId: string;
60
62
  options?: RequestOptions;
61
63
  }
62
- export interface GetCommentAnnotationRequest {
63
- options?: RequestOptions;
64
- }
65
- export interface GetCommentAnnotationsCountRequest {
66
- options?: RequestOptions;
64
+ export interface CommentRequestQuery {
65
+ documentIds?: string[];
66
+ locationIds?: string[];
67
+ statusIds?: string[];
68
+ folderId?: string;
69
+ allDocuments?: boolean;
70
+ locationId?: string;
67
71
  }
68
72
  export interface SubscribeCommentAnnotationRequest {
69
73
  annotationId: string;
@@ -162,3 +166,18 @@ export interface ToggleReactionRequest {
162
166
  };
163
167
  options?: RequestOptions;
164
168
  }
169
+ export interface FetchCommentAnnotationsRequest {
170
+ createdAfter?: number;
171
+ createdBefore?: number;
172
+ updatedAfter?: number;
173
+ updatedBefore?: number;
174
+ statusIds?: string[];
175
+ order?: 'asc' | 'desc';
176
+ pageToken?: string;
177
+ allDocuments?: boolean;
178
+ pageSize?: number;
179
+ organizationId?: string;
180
+ locationId?: string;
181
+ documentIds?: string[];
182
+ folderId?: string;
183
+ }
@@ -126,18 +126,18 @@ export interface DeleteCommentAnnotationEvent {
126
126
  commentAnnotation: CommentAnnotation;
127
127
  metadata: VeltEventMetadata;
128
128
  }
129
- export interface GetCommentAnnotationEvent {
130
- commentAnnotations: CommentAnnotation[];
131
- metadata: VeltEventMetadata;
129
+ export interface GetCommentAnnotationsResponse {
130
+ data: Record<string, CommentAnnotation[]> | null;
132
131
  }
133
- export interface GetCommentAnnotationResponse {
134
- [documentId: string]: CommentAnnotation[];
132
+ export interface FetchCommentAnnotationsResponse extends GetCommentAnnotationsResponse {
133
+ nextPageToken: string;
135
134
  }
136
135
  export interface GetCommentAnnotationsCountResponse {
137
- [documentId: string]: {
138
- total: number;
139
- unread: number;
140
- };
136
+ data: Record<string, CommentAnnotationsCount> | null;
137
+ }
138
+ export interface CommentAnnotationsCount {
139
+ unread: number;
140
+ total: number;
141
141
  }
142
142
  export interface SubscribeCommentAnnotationEvent {
143
143
  annotationId: string;
@@ -12,6 +12,7 @@ export declare class CommentSidebarFilterConfig {
12
12
  location?: FilterTypeConfig;
13
13
  people?: FilterTypeConfig;
14
14
  priority?: FilterTypeConfig;
15
+ status?: FilterTypeConfig;
15
16
  category?: FilterTypeConfig;
16
17
  commentType?: FilterTypeConfig;
17
18
  version?: FilterTypeConfig;
@@ -52,6 +52,7 @@ export declare class Config {
52
52
  }
53
53
  export interface ExtendedFirebaseOptions extends FirebaseOptions {
54
54
  storeDbId: string;
55
+ region?: string;
55
56
  }
56
57
  export interface AdvancedQueries {
57
58
  advancedQueriesEnabled: boolean;
@@ -0,0 +1,10 @@
1
+ import { DocumentMetadata } from "./document-metadata.model";
2
+ import { FolderMetadata } from "./folder-metadata.model";
3
+ export interface FetchDocumentsResponse {
4
+ data: Record<string, DocumentMetadata[]> | null;
5
+ nextPageToken: string;
6
+ }
7
+ export interface FetchFoldersResponse {
8
+ data: Record<string, FolderMetadata[]> | null;
9
+ nextPageToken: string;
10
+ }
@@ -6,6 +6,14 @@ export declare class DocumentMetadata {
6
6
  * Unique document id generated from client document id
7
7
  */
8
8
  documentId?: string;
9
+ /**
10
+ * Folders
11
+ */
12
+ folderId?: string;
13
+ /**
14
+ * Velt folder id
15
+ */
16
+ veltFolderId?: string;
9
17
  /**
10
18
  * API key
11
19
  */
@@ -0,0 +1,27 @@
1
+ import { DocumentMetadata } from "./document-metadata.model";
2
+ export interface Document {
3
+ id: string;
4
+ metadata?: DocumentMetadata;
5
+ }
6
+ export interface SetDocumentsRequestOptions {
7
+ organizationId?: string;
8
+ folderId?: string;
9
+ allDocuments?: boolean;
10
+ locationId?: string;
11
+ }
12
+ export interface FetchDocumentsRequest {
13
+ organizationId?: string;
14
+ documentIds?: string[];
15
+ folderId?: string;
16
+ allDocuments?: boolean;
17
+ }
18
+ export interface FetchFoldersRequest {
19
+ organizationId?: string;
20
+ folderId?: string;
21
+ }
22
+ export interface FolderConfig {
23
+ folderId?: string;
24
+ allDocuments?: boolean;
25
+ locationId?: string;
26
+ veltFolderId?: string;
27
+ }
@@ -2,7 +2,7 @@ import { DocumentMetadata } from "./document-metadata.model";
2
2
  import { Location } from "./location.model";
3
3
  import { OrganizationMetadata } from "./organization-metadata.model";
4
4
  export interface VeltEventMetadata {
5
- organizationMetadata?: OrganizationMetadata | null;
6
- documentMetadata?: DocumentMetadata | null;
7
- location?: Location | null;
5
+ organization?: OrganizationMetadata | null;
6
+ documents?: DocumentMetadata[];
7
+ locations?: Location[];
8
8
  }
@@ -0,0 +1,40 @@
1
+ export declare class FolderMetadata {
2
+ folderId?: string;
3
+ /**
4
+ * Velt folder id
5
+ */
6
+ veltFolderId?: string;
7
+ /**
8
+ * Parent folder id
9
+ */
10
+ parentFolderId?: string;
11
+ /**
12
+ * Velt parent folder id
13
+ */
14
+ veltParentFolderId?: string;
15
+ /**
16
+ * Created at
17
+ */
18
+ createdAt?: number;
19
+ /**
20
+ * Last updated
21
+ */
22
+ lastUpdated?: number;
23
+ /**
24
+ * API key
25
+ */
26
+ apiKey?: string;
27
+ /**
28
+ * Organization id
29
+ */
30
+ organizationId?: string;
31
+ /**
32
+ * Client organization id
33
+ */
34
+ clientOrganizationId?: string;
35
+ /**
36
+ * Folder name
37
+ */
38
+ folderName?: string;
39
+ [key: string]: any;
40
+ }
@@ -0,0 +1,61 @@
1
+ import { BaseMetadata } from "./base-metadata.data.model";
2
+ import { CommentAnnotation, GhostComment, InlineCommentSectionConfig } from "./comment-annotation.data.model";
3
+ import { CursorPosition } from "./cursor-position.data.model";
4
+ import { Location } from "./location.model";
5
+ import { TargetElement } from "./target-element.data.model";
6
+ import { TargetTextRange } from "./target-text-range.data.model";
7
+ import { User } from "./user.data.model";
8
+ export declare class MultiThreadCommentAnnotation {
9
+ /**
10
+ * The id of the annotation.
11
+ */
12
+ annotationId: string;
13
+ /**
14
+ * The id of the area annotation.
15
+ */
16
+ areaAnnotationId?: string;
17
+ /**
18
+ * The target element of the annotation.
19
+ */
20
+ targetElement?: TargetElement | null;
21
+ /**
22
+ * The id of the target element.
23
+ */
24
+ targetElementId?: string | null;
25
+ /**
26
+ * Selected text range of comment annotation
27
+ */
28
+ targetTextRange?: TargetTextRange | null;
29
+ /**
30
+ * The id of the target inline comment element.
31
+ */
32
+ targetInlineCommentElementId?: string;
33
+ /**
34
+ * The inline comment section config.
35
+ */
36
+ inlineCommentSectionConfig?: InlineCommentSectionConfig;
37
+ commentAnnotations?: {
38
+ [commentAnnotationId: string]: boolean;
39
+ };
40
+ commentAnnotationsMap?: {
41
+ [commentAnnotationId: string]: CommentAnnotation;
42
+ };
43
+ /**
44
+ * Unique location id generated from provided location
45
+ */
46
+ locationId?: number | null;
47
+ /**
48
+ * Set location to identify user on sub document
49
+ */
50
+ location?: Location | null;
51
+ position?: CursorPosition | null;
52
+ ghostComment?: GhostComment | null;
53
+ from: User;
54
+ type: string;
55
+ isDraft?: boolean;
56
+ sourceId?: string;
57
+ metadata?: MultiThreadMetadata;
58
+ }
59
+ export declare class MultiThreadMetadata extends BaseMetadata {
60
+ [key: string]: any;
61
+ }
@@ -88,6 +88,11 @@ export declare class NotificationRawData {
88
88
  [key: string]: any;
89
89
  };
90
90
  displayBodyMessage?: string;
91
+ displayBodyMessageTemplate?: string;
92
+ displayBodyMessageTemplateData?: {
93
+ users?: User[];
94
+ [key: string]: any;
95
+ };
91
96
  customData?: any;
92
97
  notifyUsers?: {
93
98
  [email: string]: boolean;
@@ -127,6 +132,17 @@ export declare class Notification {
127
132
  * Notification body message
128
133
  */
129
134
  displayBodyMessage?: string;
135
+ /**
136
+ * Display body message template
137
+ */
138
+ displayBodyMessageTemplate?: string;
139
+ /**
140
+ * Display body message template data
141
+ */
142
+ displayBodyMessageTemplateData?: {
143
+ users?: User[];
144
+ [key: string]: any;
145
+ };
130
146
  /**
131
147
  * Display message template
132
148
  */
@@ -164,4 +164,10 @@ export declare class RecorderData {
164
164
  assets: RecorderDataAsset[];
165
165
  transcription: RecorderDataTranscription;
166
166
  }
167
+ export interface RecorderRequestQuery {
168
+ recorderIds: string[];
169
+ }
170
+ export interface GetRecordingDataResponse {
171
+ data: Record<string, RecorderData> | null;
172
+ }
167
173
  export {};
@@ -0,0 +1,16 @@
1
+ import { RecorderEventTypes } from "../../utils/enums";
2
+ export interface TranscriptionDoneEvent {
3
+ transcription: string;
4
+ id?: string;
5
+ tag?: string;
6
+ type?: string;
7
+ thumbnailUrl?: string;
8
+ thumbnailWithPlayIconUrl?: string;
9
+ videoUrl?: string;
10
+ audioUrl?: string;
11
+ videoPlayerUrl?: string;
12
+ getThumbnailTag?: (url?: string) => string;
13
+ }
14
+ export type RecorderEventTypesMap = {
15
+ [RecorderEventTypes.TRANSCRIPTION_DONE]: TranscriptionDoneEvent;
16
+ };
@@ -0,0 +1,5 @@
1
+ import { User } from "./user.data.model";
2
+ export interface UserDataProvider {
3
+ getUsers(userIds: string[]): Promise<Record<string, User>>;
4
+ resolveTimeout?: number;
5
+ }