@veltdev/types-dev 4.3.1-beta.3 → 4.4.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.
@@ -0,0 +1,48 @@
1
+ import { ResolverActions } from "../../utils/enums";
2
+ import { ResolverConfig, ResolverResponse } from "./resolver.data.model";
3
+ export interface AttachmentDataProvider {
4
+ save: (request: SaveAttachmentResolverRequest) => Promise<ResolverResponse<SaveAttachmentResolverData>>;
5
+ delete: (request: DeleteAttachmentResolverRequest) => Promise<ResolverResponse<undefined>>;
6
+ config?: ResolverConfig;
7
+ }
8
+ export interface DeleteAttachmentResolverRequest {
9
+ attachmentId: number;
10
+ metadata?: AttachmentResolverMetadata;
11
+ event?: ResolverActions;
12
+ }
13
+ export interface SaveAttachmentResolverRequest {
14
+ attachment: Attachment;
15
+ event?: ResolverActions;
16
+ }
17
+ export interface PartialAttachment {
18
+ url: string;
19
+ name: string;
20
+ attachmentId: number;
21
+ }
22
+ export interface Attachment {
23
+ attachmentId: number;
24
+ /**
25
+ * File to be uploaded
26
+ */
27
+ file: File;
28
+ /**
29
+ * File name
30
+ */
31
+ name?: string;
32
+ /**
33
+ * Metadata of an attachment
34
+ */
35
+ metadata?: AttachmentResolverMetadata;
36
+ }
37
+ export interface AttachmentResolverMetadata {
38
+ organizationId: string;
39
+ documentId: string;
40
+ folderId: string;
41
+ commentId: string | number;
42
+ attachmentId: number;
43
+ commentAnnotationId: string;
44
+ apiKey: string;
45
+ }
46
+ export interface SaveAttachmentResolverData {
47
+ url: string;
48
+ }
@@ -6,6 +6,10 @@ export declare class Attachment {
6
6
  * Auto generated.
7
7
  */
8
8
  attachmentId: number;
9
+ /**
10
+ * To check if attachment resolver is used
11
+ */
12
+ isAttachmentResolverUsed?: boolean;
9
13
  /**
10
14
  * File name
11
15
  */
@@ -40,3 +44,9 @@ export declare class Attachment {
40
44
  */
41
45
  mimeType?: any;
42
46
  }
47
+ export interface UploadFileOptions {
48
+ path: string;
49
+ file: File;
50
+ useAttachmentResolver?: boolean;
51
+ metadata?: any;
52
+ }
@@ -1,4 +1,5 @@
1
1
  import { ResolverActions } from "../../utils/enums";
2
+ import { PartialAttachment } from "./attachment-resolver.data.model";
2
3
  import { BaseMetadata } from "./base-metadata.data.model";
3
4
  import { CommentAnnotation } from "./comment-annotation.data.model";
4
5
  import { ResolverConfig, ResolverResponse } from "./resolver.data.model";
@@ -31,6 +32,9 @@ export interface PartialComment {
31
32
  commentId: string | number;
32
33
  commentHtml?: string;
33
34
  commentText?: string;
35
+ attachments?: {
36
+ [attachmentId: number]: PartialAttachment;
37
+ };
34
38
  }
35
39
  export interface PartialCommentAnnotationResult {
36
40
  strippedData: {
@@ -1,8 +1,10 @@
1
1
  import { CommentAnnotationDataProvider } from "./comment-resolver.data.model";
2
+ import { AttachmentDataProvider } from "./attachment-resolver.data.model";
2
3
  import { ReactionAnnotationDataProvider } from "./reaction-resolver.data.model";
3
4
  import { UserDataProvider } from "./user-resolver.data.model";
4
5
  export interface VeltDataProvider {
5
6
  comment?: CommentAnnotationDataProvider;
6
7
  user?: UserDataProvider;
7
8
  reaction?: ReactionAnnotationDataProvider;
9
+ attachment?: AttachmentDataProvider;
8
10
  }
@@ -198,6 +198,7 @@ declare class RecorderDataAsset {
198
198
  }
199
199
  export declare class RecorderData {
200
200
  recorderId: string;
201
+ from?: User | null;
201
202
  metadata?: RecorderMetadata;
202
203
  assets: RecorderDataAsset[];
203
204
  transcription: RecorderDataTranscription;
@@ -67,7 +67,7 @@ export declare class RecorderElement {
67
67
  /**
68
68
  * To fetch recordings
69
69
  */
70
- fetchRecordings: (query: RecorderRequestQuery) => Promise<GetRecordingsResponse[]>;
70
+ fetchRecordings: (query?: RecorderRequestQuery) => Promise<GetRecordingsResponse[]>;
71
71
 
72
72
  constructor();
73
73
 
@@ -23,7 +23,9 @@ export declare enum ResolverActions {
23
23
  COMMENT_DELETE = "comment.delete",
24
24
  COMMENT_UPDATE = "comment.update",
25
25
  REACTION_ADD = "reaction.add",
26
- REACTION_DELETE = "reaction.delete"
26
+ REACTION_DELETE = "reaction.delete",
27
+ ATTACHMENT_ADD = "attachment.add",
28
+ ATTACHMENT_DELETE = "attachment.delete"
27
29
  }
28
30
  export declare const CommentEventTypes: {
29
31
  readonly ADD_COMMENT_ANNOTATION: "addCommentAnnotation";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/types-dev",
3
- "version": "4.3.1-beta.3",
3
+ "version": "4.4.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": [