@veltdev/sdk 4.1.1 → 4.2.0-beta.2

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.
@@ -29,6 +29,7 @@ import { CoreEventTypesMap } from "../models/data/core-events.data.model";
29
29
  import { Document, SetDocumentsRequestOptions, FetchDocumentsRequest, FetchFoldersRequest } from "../models/data/document.data.model";
30
30
  import { FetchDocumentsResponse, FetchFoldersResponse } from "../models/data/document-events.data.model";
31
31
  import { UserDataProvider } from "../models/data/user-resolver.data.model";
32
+ import { IVeltDataProvider } from "../models/data/provider.data.model";
32
33
 
33
34
  export declare class Snippyly {
34
35
  constructor();
@@ -78,6 +79,10 @@ export declare class Snippyly {
78
79
  * To set the user data provider.
79
80
  */
80
81
  setUserDataProvider: (userDataProvider: UserDataProvider) => void;
82
+ /**
83
+ * To set the data provider.
84
+ */
85
+ setDataProviders: (dataProvider: IVeltDataProvider) => void;
81
86
  /**
82
87
  * Get Document ID
83
88
  */
@@ -0,0 +1,41 @@
1
+ import { BaseMetadata } from "./base-metadata.data.model";
2
+ import { CommentAnnotation } from "./comment-annotation.data.model";
3
+ export interface CommentAnnotationDataProvider {
4
+ get: (request: CommentAnnotationRequest) => Promise<Record<string, IStrippedCommentAnnotation>>;
5
+ save: (request: ISaveAnnotationRequest) => Promise<IStrippedCommentAnnotation>;
6
+ delete: ({ commentAnnotationId, metadata }: {
7
+ commentAnnotationId: string | number;
8
+ metadata?: BaseMetadata;
9
+ }) => Promise<void>;
10
+ resolveTimeout?: number;
11
+ }
12
+ export interface CommentAnnotationRequest {
13
+ organizationId: string;
14
+ commentAnnotationIds?: string[];
15
+ documentIds?: string[];
16
+ folderId?: string;
17
+ allDocuments?: boolean;
18
+ }
19
+ export interface ISaveAnnotationRequest {
20
+ commentAnnotation: {
21
+ [key: string]: IStrippedCommentAnnotation;
22
+ };
23
+ }
24
+ export interface StrippedComment {
25
+ commentId: string | number;
26
+ commentHtml?: string;
27
+ commentText?: string;
28
+ }
29
+ export interface StrippedCommentAnnotationResult {
30
+ strippedData: {
31
+ [annotationId: string]: IStrippedCommentAnnotation;
32
+ } | null;
33
+ originalData: CommentAnnotation | null;
34
+ }
35
+ export interface IStrippedCommentAnnotation {
36
+ annotationId: string;
37
+ metadata?: any;
38
+ comments: {
39
+ [commentId: string]: StrippedComment;
40
+ };
41
+ }
@@ -19,7 +19,12 @@ export declare class Comment {
19
19
  * Comment Text.
20
20
  *
21
21
  */
22
- commentText: string;
22
+ commentText?: string;
23
+ /**
24
+ * To check if comment text is available.
25
+ */
26
+ isCommentTextAvailable?: boolean;
27
+ isCommentResolverUsed?: boolean;
23
28
  /**
24
29
  * Same comment text in HTML.
25
30
  *
@@ -133,7 +133,11 @@ export declare class Notification {
133
133
  */
134
134
  displayBodyMessage?: string;
135
135
  /**
136
- * Display body message template
136
+ * Is comment text available
137
+ */
138
+ isCommentResolverUsed?: boolean;
139
+ /**
140
+ * Display body message template
137
141
  */
138
142
  displayBodyMessageTemplate?: string;
139
143
  /**
@@ -0,0 +1,6 @@
1
+ import { CommentAnnotationDataProvider } from "./comment-resolver.data.model";
2
+ import { UserDataProvider } from "./user-resolver.data.model";
3
+ export interface IVeltDataProvider {
4
+ comment?: CommentAnnotationDataProvider;
5
+ user?: UserDataProvider;
6
+ }
@@ -131,6 +131,35 @@ export declare class RecorderAnnotation {
131
131
  */
132
132
  displayName?: string;
133
133
  metadata?: RecorderMetadata;
134
+ /**
135
+ * Current version of the recording edit
136
+ */
137
+ latestVersion?: number;
138
+ /**
139
+ * History of all editing versions of this recording
140
+ * Maps version number to version data
141
+ */
142
+ recordingEditVersions?: {
143
+ [key: number]: RecorderAnnotationEditVersion;
144
+ };
145
+ }
146
+ export interface RecorderAnnotationEditVersion {
147
+ from?: User;
148
+ createdAt?: Date;
149
+ attachment?: Attachment | null;
150
+ attachments?: Attachment[];
151
+ recordedTime?: {
152
+ duration?: number;
153
+ display?: string;
154
+ } | null;
155
+ transcription?: Transcription;
156
+ waveformData?: number[];
157
+ displayName?: string;
158
+ boundedTrimRanges?: RecorderBoundedTrimRange[];
159
+ }
160
+ export interface RecorderBoundedTrimRange {
161
+ start: number;
162
+ end: number;
134
163
  }
135
164
  export declare class RecorderMetadata extends BaseMetadata {
136
165
  [key: string]: any;
@@ -45,6 +45,16 @@ export declare class RecorderElement {
45
45
  */
46
46
  getRecordingData: (query: RecorderRequestQuery) => Promise<GetRecordingDataResponse>;
47
47
 
48
+ /**
49
+ * To enable video editor
50
+ */
51
+ enableVideoEditor: () => void;
52
+
53
+ /**
54
+ * To disable video editor
55
+ */
56
+ disableVideoEditor: () => void;
57
+
48
58
  constructor();
49
59
 
50
60
  private _initRecording;
@@ -86,4 +96,14 @@ export declare class RecorderElement {
86
96
  * To get recording data by recorder ids
87
97
  */
88
98
  private _getRecordingData;
89
- }
99
+
100
+ /**
101
+ * To enable video editor
102
+ */
103
+ private _enableVideoEditor;
104
+
105
+ /**
106
+ * To disable video editor
107
+ */
108
+ private _disableVideoEditor;
109
+ }
package/models.d.ts CHANGED
@@ -67,3 +67,4 @@ export * from './app/models/data/organization-metadata.model';
67
67
  export * from './app/models/data/user-organization.data.model';
68
68
  export * from './app/models/data/event-metadata.data.model';
69
69
  export * from './app/models/data/user-resolver.data.model';
70
+ export * from './app/models/data/provider.data.model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk",
3
- "version": "4.1.1",
3
+ "version": "4.2.0-beta.2",
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": [