@veltdev/sdk 4.0.0-beta.10 → 4.0.0-beta.12

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.
@@ -27,6 +27,7 @@ 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
29
  import { Document, SetDocumentsRequestOptions } from "../models/data/document.data.model";
30
+ import { UserDataProvider } from "../models/data/user-resolver.data.model";
30
31
  export declare class Snippyly {
31
32
  constructor();
32
33
  initConfig: (apiKey: string, config?: Config) => void;
@@ -57,6 +58,10 @@ export declare class Snippyly {
57
58
  * To unset the document id
58
59
  */
59
60
  unsetDocumentId: () => void;
61
+ /**
62
+ * To set the user data provider.
63
+ */
64
+ setUserDataProvider: (userDataProvider: UserDataProvider) => void;
60
65
  /**
61
66
  * Get Document ID
62
67
  */
@@ -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
+ }
@@ -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,5 @@
1
+ import { User } from "./user.data.model";
2
+ export interface UserDataProvider {
3
+ getUsers(userIds: string[]): Promise<Record<string, User>>;
4
+ resolveTimeout?: number;
5
+ }
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
2
  import { Observable } from "rxjs";
3
- import { RecorderData } from "../data/recorder-annotation.data.model";
3
+ import { RecorderData, RecorderRequestQuery, GetRecordingDataResponse } from "../data/recorder-annotation.data.model";
4
4
  import { RecorderEventTypesMap } from "../data/recorder-events.data.model";
5
5
 
6
6
  export declare class RecorderElement {
@@ -39,6 +39,11 @@ export declare class RecorderElement {
39
39
  */
40
40
  public on: <T extends keyof RecorderEventTypesMap>(action: T) => Observable<RecorderEventTypesMap[T]>;
41
41
 
42
+ /**
43
+ * To get recording data by recorder ids
44
+ */
45
+ getRecordingData: (query: RecorderRequestQuery) => Promise<GetRecordingDataResponse>;
46
+
42
47
  constructor();
43
48
 
44
49
  private _initRecording;
@@ -74,4 +79,9 @@ export declare class RecorderElement {
74
79
  * Subscribe to recorder actions
75
80
  */
76
81
  private _on;
82
+
83
+ /**
84
+ * To get recording data by recorder ids
85
+ */
86
+ private _getRecordingData;
77
87
  }
@@ -242,6 +242,7 @@ export declare class Constants {
242
242
  VELT_COMMENT_DIALOG_BODY_THREAD_CARD: string;
243
243
  VELT_COMMENT_DIALOG_PRIVATE_BANNER: string;
244
244
  VELT_COMMENT_COMPOSER: string;
245
+ VELT_SKELETON_LOADER: string;
245
246
  VELT_SHADOW_DOM_INTERNAL: string;
246
247
  };
247
248
  static ATTRIBUTES: {
package/models.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './app/utils/enums';
2
2
  export * from './app/models/data/attachment.model';
3
3
  export * from './app/models/data/area-annotation.data.model';
4
+ export * from './app/models/data/arrow-annotation.data.model';
4
5
  export * from './app/models/data/base-metadata.data.model';
5
6
  export * from './app/models/data/button.data.model';
6
7
  export * from './app/models/data/chatgpt.data.model';
@@ -28,6 +29,7 @@ export * from './app/models/data/localstorage.data.model';
28
29
  export * from './app/models/data/location-metadata.model';
29
30
  export * from './app/models/data/location.model';
30
31
  export * from './app/models/data/media-preview-config.data.model';
32
+ export * from './app/models/data/multi-thread.data.model';
31
33
  export * from './app/models/data/notification.model';
32
34
  export * from './app/models/data/page-info.model';
33
35
  export * from './app/models/data/permission.data.model';
@@ -63,3 +65,4 @@ export * from './app/models/data/organization-groups.data.model';
63
65
  export * from './app/models/data/organization-metadata.model';
64
66
  export * from './app/models/data/user-organization.data.model';
65
67
  export * from './app/models/data/event-metadata.data.model';
68
+ export * from './app/models/data/user-resolver.data.model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk",
3
- "version": "4.0.0-beta.10",
3
+ "version": "4.0.0-beta.12",
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": [