@veltdev/sdk-staging 4.3.0-beta.1 → 4.3.0-beta.10

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.
@@ -1,3 +1,4 @@
1
+ import { RecorderFileFormat } from "../../utils/enums";
1
2
  export declare class Attachment {
2
3
  /**
3
4
  * Unique identifier for the comment pin annotation.
@@ -20,7 +21,7 @@ export declare class Attachment {
20
21
  /**
21
22
  * File type
22
23
  */
23
- type?: string;
24
+ type?: RecorderFileFormat;
24
25
  /**
25
26
  * Download url of a file
26
27
  */
@@ -180,4 +180,7 @@ export interface FetchCommentAnnotationsRequest {
180
180
  locationId?: string;
181
181
  documentIds?: string[];
182
182
  folderId?: string;
183
+ resolvedBy?: string;
184
+ userIds?: string[];
185
+ mentionedUserIds?: string[];
183
186
  }
@@ -3,24 +3,24 @@ import { BaseMetadata } from "./base-metadata.data.model";
3
3
  import { CommentAnnotation } from "./comment-annotation.data.model";
4
4
  import { ResolverConfig, ResolverResponse } from "./resolver.data.model";
5
5
  export interface CommentAnnotationDataProvider {
6
- get: (request: GetCommentRequest) => Promise<ResolverResponse<Record<string, PartialCommentAnnotation>>>;
7
- save: (request: SaveCommentRequest) => Promise<ResolverResponse<undefined>>;
8
- delete: (request: DeleteCommentRequest) => Promise<ResolverResponse<undefined>>;
6
+ get: (request: GetCommentResolverRequest) => Promise<ResolverResponse<Record<string, PartialCommentAnnotation>>>;
7
+ save: (request: SaveCommentResolverRequest) => Promise<ResolverResponse<undefined>>;
8
+ delete: (request: DeleteCommentResolverRequest) => Promise<ResolverResponse<undefined>>;
9
9
  config?: ResolverConfig;
10
10
  }
11
- export interface GetCommentRequest {
11
+ export interface GetCommentResolverRequest {
12
12
  organizationId: string;
13
13
  commentAnnotationIds?: string[];
14
14
  documentIds?: string[];
15
15
  folderId?: string;
16
16
  allDocuments?: boolean;
17
17
  }
18
- export interface DeleteCommentRequest {
18
+ export interface DeleteCommentResolverRequest {
19
19
  commentAnnotationId: string;
20
20
  metadata?: BaseMetadata;
21
21
  event?: ResolverActions;
22
22
  }
23
- export interface SaveCommentRequest {
23
+ export interface SaveCommentResolverRequest {
24
24
  commentAnnotation: {
25
25
  [key: string]: PartialCommentAnnotation;
26
26
  };
@@ -11,6 +11,8 @@ declare class FilterTypeConfig {
11
11
  export declare class CommentSidebarFilterConfig {
12
12
  location?: FilterTypeConfig;
13
13
  people?: FilterTypeConfig;
14
+ assigned?: FilterTypeConfig;
15
+ tagged?: FilterTypeConfig;
14
16
  priority?: FilterTypeConfig;
15
17
  status?: FilterTypeConfig;
16
18
  category?: FilterTypeConfig;
@@ -0,0 +1,9 @@
1
+ import { UserGroup } from "./organization-groups.data.model";
2
+ import { User } from "./user.data.model";
3
+ export interface GetContactListResponse {
4
+ organizationUsers?: User[];
5
+ folderUsers?: User[];
6
+ documentUsers?: User[];
7
+ userGroups?: UserGroup[];
8
+ updatedContactList?: User[];
9
+ }
@@ -1,5 +1,15 @@
1
1
  import { CoreEventTypes } from "../../utils/enums";
2
2
  import { VeltButtonClickEvent } from "./button.data.model";
3
+ import { User } from "./user.data.model";
3
4
  export type CoreEventTypesMap = {
4
5
  [CoreEventTypes.VELT_BUTTON_CLICK]: VeltButtonClickEvent;
6
+ [CoreEventTypes.USER_UPDATE]: UserUpdateEvent;
7
+ [CoreEventTypes.DOCUMENT_INIT]: DocumentInitEvent;
8
+ [CoreEventTypes.ERROR]: ErrorEvent;
9
+ };
10
+ export type UserUpdateEvent = User | null;
11
+ export type DocumentInitEvent = boolean | undefined;
12
+ export type ErrorEvent = {
13
+ code: string;
14
+ message?: string;
5
15
  };
@@ -1,3 +1,4 @@
1
+ import { HuddleType } from "../../utils/enums";
1
2
  import { User } from "./user.data.model";
2
3
  export declare class Attendee extends User {
3
4
  state?: {
@@ -12,7 +13,7 @@ export declare class Attendee extends User {
12
13
  screenSharing?: boolean;
13
14
  };
14
15
  streamMetadata?: any;
15
- initialHuddleType?: 'audio' | 'video' | 'presentation';
16
+ initialHuddleType?: HuddleType;
16
17
  huddleOnCursorMode?: boolean;
17
18
  }
18
19
  export declare class Message {
@@ -1,3 +1,4 @@
1
+ import { SingleEditorState, SingleEditorStatus } from "../../utils/enums";
1
2
  import { User } from "./user.data.model";
2
3
  export declare class LiveStateData {
3
4
  /**
@@ -24,7 +25,7 @@ export declare class SingleEditorLiveStateData {
24
25
  requestEditorAccess?: {
25
26
  user: User;
26
27
  requestedAt: any;
27
- status: 'pending' | 'accepted' | 'rejected' | 'cancelled';
28
+ status: SingleEditorStatus;
28
29
  editorAccessTimeout: number;
29
30
  tabId?: string | null;
30
31
  } | null;
@@ -56,7 +57,7 @@ export declare class EditorAccessTimer {
56
57
  /**
57
58
  * The time when the editor access was requested.
58
59
  */
59
- state: 'idle' | 'inProgress' | 'completed';
60
+ state: SingleEditorState;
60
61
  /**
61
62
  * Duration left for the editor access timer to be completed.
62
63
  */
@@ -1,4 +1,4 @@
1
- import { AreaStatus, ArrowStatus, CommentStatus, HuddleActionTypes, TagStatus, UserActionTypes } from "../../utils/enums";
1
+ import { AreaStatus, ArrowStatus, CommentStatus, HuddleActionTypes, NotificationSource, TagStatus, UserActionTypes } from "../../utils/enums";
2
2
  import { DocumentMetadata } from "./document-metadata.model";
3
3
  import { DocumentUser } from "./document-user.data.model";
4
4
  import { Location } from "./location.model";
@@ -19,7 +19,7 @@ export declare class NotificationRawData {
19
19
  /**
20
20
  * Source of a notification
21
21
  */
22
- notificationSource?: 'area' | 'arrow' | 'comment' | 'tag' | 'huddle' | 'userInvite' | 'user' | 'recorder' | 'huddleInvite' | 'userFeedback' | 'userContactUs' | 'userReportBug' | 'documentViews' | 'custom';
22
+ notificationSource?: NotificationSource;
23
23
  /**
24
24
  * Type of notification like 'Added', 'Updated' etc.
25
25
  */
@@ -1,3 +1,4 @@
1
+ import { User } from "./user.data.model";
1
2
  export declare class OrganizationUserGroup {
2
3
  metadata: {
3
4
  groupId: string;
@@ -8,3 +9,8 @@ export declare class OrganizationUserGroup {
8
9
  [userIdHash: string]: boolean;
9
10
  };
10
11
  }
12
+ export declare class UserGroup {
13
+ groupId: string;
14
+ groupName: string;
15
+ users?: User[];
16
+ }
@@ -3,24 +3,24 @@ import { ReactionAnnotation } from "./reaction-annotation.data.model";
3
3
  import { ResolverResponse, ResolverConfig } from "./resolver.data.model";
4
4
  import { ResolverActions } from "../../utils/enums";
5
5
  export interface ReactionAnnotationDataProvider {
6
- get: (request: GetReactionRequest) => Promise<ResolverResponse<Record<string, PartialReactionAnnotation>>>;
7
- save: (request: SaveReactionRequest) => Promise<ResolverResponse<undefined>>;
8
- delete: (request: DeleteReactionRequest) => Promise<ResolverResponse<undefined>>;
6
+ get: (request: GetReactionResolverRequest) => Promise<ResolverResponse<Record<string, PartialReactionAnnotation>>>;
7
+ save: (request: SaveReactionResolverRequest) => Promise<ResolverResponse<undefined>>;
8
+ delete: (request: DeleteReactionResolverRequest) => Promise<ResolverResponse<undefined>>;
9
9
  config?: ResolverConfig;
10
10
  }
11
- export interface GetReactionRequest {
11
+ export interface GetReactionResolverRequest {
12
12
  organizationId: string;
13
13
  reactionAnnotationIds?: string[];
14
14
  documentIds?: string[];
15
15
  folderId?: string;
16
16
  allDocuments?: boolean;
17
17
  }
18
- export interface DeleteReactionRequest {
18
+ export interface DeleteReactionResolverRequest {
19
19
  reactionAnnotationId: string;
20
20
  metadata?: BaseMetadata;
21
21
  event?: ResolverActions;
22
22
  }
23
- export interface SaveReactionRequest {
23
+ export interface SaveReactionResolverRequest {
24
24
  reactionAnnotation: {
25
25
  [key: string]: PartialReactionAnnotation;
26
26
  };
@@ -1,3 +1,4 @@
1
+ import { RecorderFileFormat, RecorderLayoutMode, RecorderType } from "../../utils/enums";
1
2
  import { Attachment } from "./attachment.model";
2
3
  import { BaseMetadata } from "./base-metadata.data.model";
3
4
  import { CursorPosition } from "./cursor-position.data.model";
@@ -92,8 +93,8 @@ export declare class RecorderAnnotation {
92
93
  */
93
94
  location?: Location | null;
94
95
  type?: string;
95
- recordingType: string;
96
- mode: 'floating' | 'thread';
96
+ recordingType: RecorderType;
97
+ mode: RecorderLayoutMode;
97
98
  approved?: boolean;
98
99
  /**
99
100
  * Attachment object of recorded media
@@ -142,6 +143,12 @@ export declare class RecorderAnnotation {
142
143
  recordingEditVersions?: {
143
144
  [key: number]: RecorderAnnotationEditVersion;
144
145
  };
146
+ /**
147
+ * URLs for individual uploaded chunks
148
+ */
149
+ chunkUrls?: {
150
+ [key: number]: string;
151
+ };
145
152
  }
146
153
  export interface RecorderAnnotationEditVersion {
147
154
  from?: User;
@@ -186,7 +193,7 @@ declare class RecorderDataAsset {
186
193
  * The format/extension of the file
187
194
  * @example 'mp3', 'mp4', 'webm'
188
195
  */
189
- fileFormat?: 'mp3' | 'mp4' | 'webm' | string;
196
+ fileFormat?: RecorderFileFormat;
190
197
  thumbnailUrl?: string;
191
198
  }
192
199
  export declare class RecorderData {
@@ -199,4 +206,11 @@ export interface RecorderRequestQuery {
199
206
  export interface GetRecordingDataResponse {
200
207
  data: Record<string, RecorderData> | null;
201
208
  }
209
+ export interface GetRecordingsResponse {
210
+ data: Record<string, RecorderAnnotationData> | null;
211
+ }
212
+ export declare class RecorderAnnotationData extends RecorderAnnotation {
213
+ transcriptionData: RecorderDataTranscription;
214
+ assets: RecorderDataAsset[];
215
+ }
202
216
  export {};
@@ -1,8 +1,17 @@
1
+ import { RecordedData } from "../../models/data/recorder.model";
2
+ import { RecorderAnnotation, RecorderData } from "../../models/data/recorder-annotation.data.model";
1
3
  import { RecorderEventTypes } from "../../utils/enums";
2
- import { RecorderData } from "./recorder-annotation.data.model";
3
4
  export interface TranscriptionDoneEvent {
4
5
  data: Record<string, RecorderData> | null;
5
6
  }
7
+ export interface RecordingDoneEvent {
8
+ data: Record<string, RecordedData> | null;
9
+ }
10
+ export interface RecordingDeleteEvent {
11
+ data: Record<string, RecorderAnnotation> | null;
12
+ }
6
13
  export type RecorderEventTypesMap = {
7
14
  [RecorderEventTypes.TRANSCRIPTION_DONE]: TranscriptionDoneEvent;
15
+ [RecorderEventTypes.RECORDING_DONE]: RecordingDoneEvent;
16
+ [RecorderEventTypes.DELETE_RECORDING]: RecordingDeleteEvent;
8
17
  };
@@ -1,4 +1,5 @@
1
1
  import { Observable } from "rxjs";
2
+ import { RecorderType } from "../../utils/enums";
2
3
  export declare class RecorderConfig {
3
4
  type: {
4
5
  audio?: boolean;
@@ -26,7 +27,7 @@ export declare class RecorderInitData {
26
27
  /**
27
28
  * Type of media recorder, possible values are 'audio', 'video' and 'screen'
28
29
  */
29
- type: 'audio' | 'video' | 'screen';
30
+ type: RecorderType;
30
31
  /**
31
32
  * Observable of recorded raw data.
32
33
  */
@@ -44,7 +45,7 @@ export declare class RecordedRawData {
44
45
  /**
45
46
  * Type of recorded data, possible values are 'audio' and 'video'
46
47
  */
47
- type: 'audio' | 'video' | 'screen';
48
+ type: RecorderType;
48
49
  /**
49
50
  * Base64 encoded string of thumbnail image of one frame of recorded video
50
51
  */
@@ -56,6 +57,12 @@ export declare class RecordedRawData {
56
57
  duration?: number;
57
58
  display?: string;
58
59
  } | null;
60
+ /**
61
+ * Array of URLs for individual uploaded chunks
62
+ */
63
+ chunkUrls?: {
64
+ [key: number]: string;
65
+ };
59
66
  }
60
67
  export declare class RecordedData {
61
68
  /**
@@ -78,5 +85,11 @@ export declare class RecordedData {
78
85
  * URL of the hosted website to open video in new tab
79
86
  */
80
87
  videoPlayerUrl?: string;
88
+ /**
89
+ * URLs for individual uploaded chunks
90
+ */
91
+ chunkUrls?: {
92
+ [key: number]: string;
93
+ };
81
94
  getThumbnailTag: (url?: string) => string;
82
95
  }
@@ -1,7 +1,9 @@
1
1
  // @ts-nocheck
2
2
  import { Observable } from "rxjs";
3
- import { SelectedUserContact } from "../data/user-contact.data.model";
4
3
  import { ContactListScopeForOrganizationUsers } from "../../utils/enums";
4
+ import { GetContactListResponse } from "../data/contact-utils.data.model";
5
+ import { SelectedUserContact } from "../data/user-contact.data.model";
6
+
5
7
  export declare class ContactElement {
6
8
  /**
7
9
  * Get if user is part of global contact or not.
@@ -45,6 +47,11 @@ export declare class ContactElement {
45
47
  * @param config {merge: boolean}
46
48
  */
47
49
  public updateContactList: (userContacts: UserContact[], config?: { merge: boolean }) => void;
50
+
51
+ /**
52
+ * Get contact list.
53
+ */
54
+ public getContactList: () => Observable<GetContactListResponse | null>;
48
55
  constructor();
49
56
  /**
50
57
  * Get if user is part of global contact or not.
@@ -88,4 +95,9 @@ export declare class ContactElement {
88
95
  * @param config {merge: boolean}
89
96
  */
90
97
  private _updateContactList;
98
+
99
+ /**
100
+ * Get contact list.
101
+ */
102
+ private _getContactList;
91
103
  }
@@ -1,12 +1,15 @@
1
1
  // @ts-nocheck
2
2
  import { Observable } from "rxjs";
3
- import { RecorderData, RecorderRequestQuery, GetRecordingDataResponse } from "../data/recorder-annotation.data.model";
3
+ import { RecorderData, RecorderRequestQuery, GetRecordingDataResponse, GetRecordingsResponse } from "../data/recorder-annotation.data.model";
4
4
  import { RecorderEventTypesMap } from "../data/recorder-events.data.model";
5
5
 
6
6
  export declare class RecorderElement {
7
7
 
8
8
  initRecording: (type: string, panelId?: string) => any;
9
9
 
10
+ /**
11
+ * @deprecated Use on('recordingDone') method instead
12
+ */
10
13
  onRecordedData: () => Observable<any>;
11
14
 
12
15
  /**
@@ -55,10 +58,18 @@ export declare class RecorderElement {
55
58
  */
56
59
  disableVideoEditor: () => void;
57
60
 
61
+ /**
62
+ * To get recordings
63
+ */
64
+ getRecordings: (query?: RecorderRequestQuery) => Observable<GetRecordingsResponse>;
65
+
58
66
  constructor();
59
67
 
60
68
  private _initRecording;
61
69
 
70
+ /**
71
+ * @deprecated Use on('recordingDone') method instead
72
+ */
62
73
  private _onRecordedData;
63
74
 
64
75
  /**
@@ -106,4 +117,9 @@ export declare class RecorderElement {
106
117
  * To disable video editor
107
118
  */
108
119
  private _disableVideoEditor;
120
+
121
+ /**
122
+ * To get recordings
123
+ */
124
+ private _getRecordings;
109
125
  }
@@ -55,9 +55,14 @@ export declare const CommentEventTypes: {
55
55
  };
56
56
  export declare const RecorderEventTypes: {
57
57
  readonly TRANSCRIPTION_DONE: "transcriptionDone";
58
+ readonly RECORDING_DONE: "recordingDone";
59
+ readonly DELETE_RECORDING: "deleteRecording";
58
60
  };
59
61
  export declare const CoreEventTypes: {
60
62
  readonly VELT_BUTTON_CLICK: "veltButtonClick";
63
+ readonly USER_UPDATE: "userUpdate";
64
+ readonly DOCUMENT_INIT: "documentInit";
65
+ readonly ERROR: "error";
61
66
  };
62
67
  export type CommentEventType = typeof CommentEventTypes[keyof typeof CommentEventTypes];
63
68
  export type RecorderEventType = typeof RecorderEventTypes[keyof typeof RecorderEventTypes];
@@ -174,5 +179,44 @@ export declare enum ContactListScopeForOrganizationUsers {
174
179
  ALL = "all",
175
180
  ORGANIZATION = "organization",
176
181
  ORGANIZATION_USER_GROUP = "organizationUserGroup",
177
- DOCUMENT = "document"
178
- }
182
+ DOCUMENT = "document",
183
+ FOLDER = "folder"
184
+ }
185
+ export type RecorderMode = 'audio' | 'video' | 'screen' | 'all' | string;
186
+ export type RecorderType = 'audio' | 'video' | 'screen';
187
+ export type RecorderFileFormat = 'mp3' | 'mp4' | 'webm';
188
+ export type RecorderLayoutMode = 'floating' | 'thread';
189
+ export type SupportedMimeType = 'audio' | 'video';
190
+ export type FirebaseRegion = 'usCentral1' | 'asiaSouthEast1' | 'europeWest1';
191
+ export type VideoEventType = 'play' | 'pause' | 'ratechange' | 'seeked' | 'timeupdate' | 'volumechange';
192
+ export type RewriterType = 'copywriter' | 'generic';
193
+ export type RecorderStatusType = 'started' | 'paused' | 'resumed' | 'stopped' | 'error' | null;
194
+ export type HuddleType = 'audio' | 'video' | 'presentation';
195
+ export type NotificationTabId = 'for-you' | 'all' | 'document' | 'people';
196
+ export type NotificationTabType = 'forYou' | 'all' | 'documents' | 'people';
197
+ export type NotificationSource = 'area' | 'arrow' | 'comment' | 'tag' | 'huddle' | 'userInvite' | 'user' | 'recorder' | 'huddleInvite' | 'userFeedback' | 'userContactUs' | 'userReportBug' | 'documentViews' | 'custom';
198
+ export type SingleEditorStatus = 'pending' | 'accepted' | 'rejected' | 'cancelled';
199
+ export type SingleEditorState = 'idle' | 'inProgress' | 'completed';
200
+ export type AudioWaveformVariant = 'expanded' | 'minified' | 'player' | 'preview' | 'preview-mini' | 'editor';
201
+ export type ActionButtonType = 'button' | 'button-toggle' | 'multi-select' | 'single-select';
202
+ export type DropdownPosition = 'left' | 'right' | 'center';
203
+ export type DevicePermissionType = 'audio' | 'video';
204
+ export type TranscriptionMode = 'floating' | 'embed' | 'summaryMode';
205
+ export type ComposerPosition = 'top' | 'bottom';
206
+ export type SortBy = 'lastUpdated' | 'createdAt';
207
+ export type SortOrder = 'asc' | 'desc';
208
+ export type MinimapPosition = 'left' | 'right';
209
+ export type FilterOptionLayout = 'dropdown' | 'checkbox';
210
+ export type FilterPanelPosition = 'menu' | 'bottomSheet';
211
+ export type OverlayOriginY = 'top' | 'center' | 'bottom';
212
+ export type OverlayOriginX = 'start' | 'center' | 'end';
213
+ export type SubtitlesMode = 'floating' | 'embed';
214
+ export type RecorderVariant = 'default' | 'embed';
215
+ export type ReactionPinType = 'timeline' | 'comment';
216
+ export type SidebarPosition = 'left' | 'right';
217
+ export type SidebarSortingCriteria = 'date' | 'unread' | null;
218
+ export type SidebarFilterCriteria = 'all' | 'read' | 'unread' | 'resolved';
219
+ export type SidebarFilterSearchType = 'people' | 'assigned' | 'tagged' | 'pages' | 'statuses' | 'priorities' | 'categories' | 'versions';
220
+ export type InlineSortingCriteria = 'createdFirst' | 'createdLast' | 'updatedFirst' | 'updatedLast';
221
+ export type NotificationPanelMode = 'popover' | 'sidebar';
222
+ export type SidebarActionButtonType = 'default' | 'toggle';
package/models.d.ts CHANGED
@@ -9,7 +9,9 @@ export * from './app/models/data/comment-annotation.data.model';
9
9
  export * from './app/models/data/comment-events.data.model';
10
10
  export * from './app/models/data/comment.data.model';
11
11
  export * from './app/models/data/comment-actions.data.model';
12
+ export * from './app/models/data/comment-resolver.data.model';
12
13
  export * from './app/models/data/comment-utils.data.model';
14
+ export * from './app/models/data/contact-utils.data.model';
13
15
  export * from './app/models/data/config.data.model';
14
16
  export * from './app/models/data/core-events.data.model';
15
17
  export * from './app/models/data/cursor-position.data.model';
@@ -61,6 +63,7 @@ export * from './app/models/data/comment-sidebar-config.model';
61
63
  export * from './app/models/data/views.data.model';
62
64
  export * from './app/models/data/autocomplete.data.model';
63
65
  export * from './app/models/data/reaction-annotation.data.model';
66
+ export * from './app/models/data/reaction-resolver.data.model';
64
67
  export * from './app/models/data/reaction.data.model';
65
68
  export * from './app/models/data/organization-groups.data.model';
66
69
  export * from './app/models/data/organization-metadata.model';
@@ -68,3 +71,4 @@ export * from './app/models/data/user-organization.data.model';
68
71
  export * from './app/models/data/event-metadata.data.model';
69
72
  export * from './app/models/data/user-resolver.data.model';
70
73
  export * from './app/models/data/provider.data.model';
74
+ export * from './app/models/data/resolver.data.model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk-staging",
3
- "version": "4.3.0-beta.1",
3
+ "version": "4.3.0-beta.10",
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": [