@veltdev/types-dev 4.2.2-beta.3 → 4.2.2-beta.30

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,10 +1,12 @@
1
+ import { ResolverActions } from "../../utils/enums";
1
2
  import { BaseMetadata } from "./base-metadata.data.model";
2
3
  import { CommentAnnotation } from "./comment-annotation.data.model";
4
+ import { ResolverConfig, ResolverResponse } from "./resolver.data.model";
3
5
  export interface CommentAnnotationDataProvider {
4
- get: (request: GetCommentRequest) => Promise<Record<string, PartialCommentAnnotation>>;
5
- save: (request: SaveCommentRequest) => Promise<void>;
6
- delete: (request: DeleteCommentRequest) => Promise<void>;
7
- resolveTimeout?: number;
6
+ get: (request: GetCommentRequest) => Promise<ResolverResponse<Record<string, PartialCommentAnnotation>>>;
7
+ save: (request: SaveCommentRequest) => Promise<ResolverResponse<undefined>>;
8
+ delete: (request: DeleteCommentRequest) => Promise<ResolverResponse<undefined>>;
9
+ config?: ResolverConfig;
8
10
  }
9
11
  export interface GetCommentRequest {
10
12
  organizationId: string;
@@ -16,11 +18,14 @@ export interface GetCommentRequest {
16
18
  export interface DeleteCommentRequest {
17
19
  commentAnnotationId: string;
18
20
  metadata?: BaseMetadata;
21
+ event?: ResolverActions;
19
22
  }
20
23
  export interface SaveCommentRequest {
21
24
  commentAnnotation: {
22
25
  [key: string]: PartialCommentAnnotation;
23
26
  };
27
+ event?: ResolverActions;
28
+ commentId?: string;
24
29
  }
25
30
  export interface PartialComment {
26
31
  commentId: string | number;
@@ -32,6 +37,7 @@ export interface PartialCommentAnnotationResult {
32
37
  [annotationId: string]: PartialCommentAnnotation;
33
38
  } | null;
34
39
  originalData: CommentAnnotation | null;
40
+ eventType?: ResolverActions;
35
41
  }
36
42
  export interface PartialCommentAnnotation {
37
43
  annotationId: string;
@@ -6,6 +6,7 @@ export declare class MediaPreviewConfig {
6
6
  video?: {
7
7
  enabled?: boolean;
8
8
  deviceId?: string;
9
+ track?: MediaStreamTrack;
9
10
  };
10
11
  screen?: {
11
12
  enabled?: boolean;
@@ -1,6 +1,8 @@
1
1
  import { CommentAnnotationDataProvider } from "./comment-resolver.data.model";
2
+ import { ReactionAnnotationDataProvider } from "./reaction-resolver.data.model";
2
3
  import { UserDataProvider } from "./user-resolver.data.model";
3
4
  export interface VeltDataProvider {
4
5
  comment?: CommentAnnotationDataProvider;
5
6
  user?: UserDataProvider;
7
+ reaction?: ReactionAnnotationDataProvider;
6
8
  }
@@ -49,6 +49,7 @@ export declare class ReactionAnnotation {
49
49
  pageInfo?: PageInfo;
50
50
  from?: User;
51
51
  icon?: string;
52
+ isReactionResolverUsed?: boolean;
52
53
  iconUrl?: string;
53
54
  iconEmoji?: string;
54
55
  metadata?: ReactionMetadata;
@@ -0,0 +1,39 @@
1
+ import { BaseMetadata } from "./base-metadata.data.model";
2
+ import { ReactionAnnotation } from "./reaction-annotation.data.model";
3
+ import { ResolverResponse, ResolverConfig } from "./resolver.data.model";
4
+ import { ResolverActions } from "../../utils/enums";
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>>;
9
+ config?: ResolverConfig;
10
+ }
11
+ export interface GetReactionRequest {
12
+ organizationId: string;
13
+ reactionAnnotationIds?: string[];
14
+ documentIds?: string[];
15
+ folderId?: string;
16
+ allDocuments?: boolean;
17
+ }
18
+ export interface DeleteReactionRequest {
19
+ reactionAnnotationId: string;
20
+ metadata?: BaseMetadata;
21
+ event?: ResolverActions;
22
+ }
23
+ export interface SaveReactionRequest {
24
+ reactionAnnotation: {
25
+ [key: string]: PartialReactionAnnotation;
26
+ };
27
+ event?: ResolverActions;
28
+ }
29
+ export interface PartialReactionAnnotationResult {
30
+ strippedData: {
31
+ [annotationId: string]: PartialReactionAnnotation;
32
+ } | null;
33
+ originalData: ReactionAnnotation | null;
34
+ }
35
+ export interface PartialReactionAnnotation {
36
+ annotationId: string;
37
+ metadata?: BaseMetadata;
38
+ icon?: string;
39
+ }
@@ -142,6 +142,16 @@ export declare class RecorderAnnotation {
142
142
  recordingEditVersions?: {
143
143
  [key: number]: RecorderAnnotationEditVersion;
144
144
  };
145
+ /**
146
+ * Folder ID where chunks are stored in storage
147
+ */
148
+ recordingFolderId?: string;
149
+ /**
150
+ * URLs for individual uploaded chunks
151
+ */
152
+ chunkUrls?: {
153
+ [key: number]: string;
154
+ };
145
155
  }
146
156
  export interface RecorderAnnotationEditVersion {
147
157
  from?: User;
@@ -56,6 +56,16 @@ export declare class RecordedRawData {
56
56
  duration?: number;
57
57
  display?: string;
58
58
  } | null;
59
+ /**
60
+ * Array of URLs for individual uploaded chunks
61
+ */
62
+ chunkUrls?: {
63
+ [key: number]: string;
64
+ };
65
+ /**
66
+ * Folder ID where chunks are stored in storage
67
+ */
68
+ recordingFolderId?: string;
59
69
  }
60
70
  export declare class RecordedData {
61
71
  /**
@@ -78,5 +88,15 @@ export declare class RecordedData {
78
88
  * URL of the hosted website to open video in new tab
79
89
  */
80
90
  videoPlayerUrl?: string;
91
+ /**
92
+ * Folder ID where chunks are stored in storage
93
+ */
94
+ recordingFolderId?: string;
95
+ /**
96
+ * URLs for individual uploaded chunks
97
+ */
98
+ chunkUrls?: {
99
+ [key: number]: string;
100
+ };
81
101
  getThumbnailTag: (url?: string) => string;
82
102
  }
@@ -0,0 +1,21 @@
1
+ export interface ResolverConfig {
2
+ resolveTimeout?: number;
3
+ saveRetryConfig?: RetryConfig;
4
+ deleteRetryConfig?: RetryConfig;
5
+ }
6
+ export interface ResolverResponse<T> {
7
+ data?: T;
8
+ success: boolean;
9
+ message?: string;
10
+ timestamp?: number;
11
+ statusCode: number;
12
+ }
13
+ export interface RetryConfig {
14
+ retryCount?: number;
15
+ retryDelay?: number;
16
+ revertOnFailure?: boolean;
17
+ }
18
+ export interface ResolverResponseConfig {
19
+ revertOnFailure?: boolean;
20
+ isSuccess?: boolean;
21
+ }
@@ -1,5 +1,5 @@
1
1
  import { User } from "./user.data.model";
2
2
  export interface UserDataProvider {
3
- getUsers(userIds: string[]): Promise<Record<string, User>>;
3
+ get(userIds: string[]): Promise<Record<string, User>>;
4
4
  resolveTimeout?: number;
5
5
  }
@@ -317,6 +317,7 @@ export declare class Constants {
317
317
  VELT_COMMENT_DIALOG_PORTAL_INTERNAL: string;
318
318
  ANNOTATION_ID: string;
319
319
  MULTI_THREAD_ANNOTATION_ID: string;
320
+ SLATE_EDITOR: string;
320
321
  };
321
322
  static INJECTION_STYLE_PROPS: {
322
323
  /**
@@ -16,6 +16,15 @@ export declare enum CommentStatus {
16
16
  SUBSCRIBED = "subscribed",
17
17
  UNSUBSCRIBED = "unsubscribed"
18
18
  }
19
+ export declare enum ResolverActions {
20
+ COMMENT_ANNOTATION_ADD = "comment_annotation.add",
21
+ COMMENT_ANNOTATION_DELETE = "comment_annotation.delete",
22
+ COMMENT_ADD = "comment.add",
23
+ COMMENT_DELETE = "comment.delete",
24
+ COMMENT_UPDATE = "comment.update",
25
+ REACTION_ADD = "reaction.add",
26
+ REACTION_DELETE = "reaction.delete"
27
+ }
19
28
  export declare const CommentEventTypes: {
20
29
  readonly ADD_COMMENT_ANNOTATION: "addCommentAnnotation";
21
30
  readonly DELETE_COMMENT_ANNOTATION: "deleteCommentAnnotation";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/types-dev",
3
- "version": "4.2.2-beta.3",
3
+ "version": "4.2.2-beta.30",
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": [