@veltdev/sdk 4.5.8-beta.3 → 4.5.8-beta.5

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,16 +1,21 @@
1
1
  import { DocumentMetadata } from "./document-metadata.model";
2
- import { Context } from "./user.data.model";
3
2
  export interface Document {
4
3
  id: string;
5
4
  metadata?: DocumentMetadata;
6
5
  }
6
+ export interface SetDocumentsContext {
7
+ access: {
8
+ [key: string]: Array<string | number>;
9
+ };
10
+ accessFields?: Array<string>;
11
+ }
7
12
  export interface SetDocumentsRequestOptions {
8
13
  organizationId?: string;
9
14
  folderId?: string;
10
15
  allDocuments?: boolean;
11
16
  locationId?: string;
12
17
  rootDocumentId?: string;
13
- context?: Context;
18
+ context?: SetDocumentsContext;
14
19
  }
15
20
  export interface UpdateDocumentsRequest<T = unknown> {
16
21
  organizationId?: string;
@@ -0,0 +1,10 @@
1
+ import { AreaAnnotation } from "./area-annotation.data.model";
2
+ import { CommentAnnotation } from "./comment-annotation.data.model";
3
+ export interface ScreenshotData {
4
+ source?: string;
5
+ sourceData?: {
6
+ commentAnnotation?: CommentAnnotation;
7
+ areaAnnotation?: AreaAnnotation;
8
+ };
9
+ eventType: string;
10
+ }
@@ -106,14 +106,13 @@ export interface AuthRetryConfig {
106
106
  }
107
107
  export interface Context {
108
108
  access: {
109
- [key: string]: Array<string | number> | null;
109
+ [key: string]: string | number;
110
110
  };
111
111
  accessFields?: Array<string>;
112
112
  }
113
113
  export interface VeltAuthProvider {
114
114
  user: User;
115
115
  options?: Options;
116
- context?: Context;
117
116
  retryConfig?: AuthRetryConfig;
118
117
  generateToken?: () => Promise<string>;
119
118
  }
@@ -133,24 +132,31 @@ export interface RevokeAccessOn {
133
132
  }
134
133
  export interface VeltPermissionProvider {
135
134
  retryConfig?: AuthRetryConfig;
136
- isProviderEnabled?: boolean;
135
+ isContextEnabled?: boolean;
137
136
  revokeAccessOn?: RevokeAccessOn[];
138
137
  forceRefresh?: boolean;
139
138
  }
139
+ export declare enum PermissionResourceType {
140
+ FOLDER = "folder",
141
+ DOCUMENT = "document",
142
+ ORGANIZATION = "organization",
143
+ CONTEXT = "context"
144
+ }
140
145
  export interface PermissionQuery {
141
146
  userId: string;
142
147
  resource: {
143
148
  id: string;
144
- type: 'folder' | 'document' | 'organization';
149
+ type: PermissionResourceType;
145
150
  source: PermissionSource;
146
151
  organizationId: string;
152
+ context?: Context;
147
153
  };
148
154
  }
149
155
  export interface PermissionResult {
150
156
  userId: string;
151
157
  resourceId: string;
152
158
  organizationId: string;
153
- type: 'folder' | 'document' | 'organization';
159
+ type: PermissionResourceType;
154
160
  accessRole?: UserPermissionAccessRole;
155
161
  expiresAt?: number;
156
162
  hasAccess: boolean;
@@ -1254,6 +1254,16 @@ export declare class CommentElement {
1254
1254
  */
1255
1255
  public markAsUnread: (annotationId: string) => Promise<void>;
1256
1256
 
1257
+ /**
1258
+ * To enable screenshot
1259
+ */
1260
+ public enableScreenshot: () => void;
1261
+
1262
+ /**
1263
+ * To disable screenshot
1264
+ */
1265
+ public disableScreenshot: () => void;
1266
+
1257
1267
  constructor();
1258
1268
  /**
1259
1269
  * Subscribe to comments on the current document.
@@ -2486,4 +2496,14 @@ export declare class CommentElement {
2486
2496
  * To mark comment annotation as unread
2487
2497
  */
2488
2498
  private _markAsUnread;
2499
+
2500
+ /**
2501
+ * To enable screenshot
2502
+ */
2503
+ private _enableScreenshot;
2504
+
2505
+ /**
2506
+ * To disable screenshot
2507
+ */
2508
+ private _disableScreenshot;
2489
2509
  }
@@ -9,6 +9,8 @@ export declare class Constants {
9
9
  static NO_ORGANIZATION_ID: string;
10
10
  static DEFAULT_QUERY_HASH: string;
11
11
  static LISTENER_BATCH_SIZE: number;
12
+ static LISTENER_CONTEXT_BATCH_SIZE: number;
13
+ static DEFAULT_VELT_CONTEXT: string;
12
14
  static FIREBASE_PARTIAL_PATH_ORGANIZATIONS: string;
13
15
  static FIREBASE_PARTIAL_PATH_FOLDERS: string;
14
16
  static FIREBASE_PARTIAL_PATH_DOCS: string;
package/models.d.ts CHANGED
@@ -48,6 +48,7 @@ export * from './app/models/data/recorder-annotation.data.model';
48
48
  export * from './app/models/data/recorder-events.data.model';
49
49
  export * from './app/models/data/rewriter-annotation.data.model';
50
50
  export * from './app/models/data/screen-size.data.model';
51
+ export * from './app/models/data/screenshot.data.model';
51
52
  export * from './app/models/data/selection.model';
52
53
  export * from './app/models/data/sync-video-player.data.model';
53
54
  export * from './app/models/data/tag-annotation.data.model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk",
3
- "version": "4.5.8-beta.3",
3
+ "version": "4.5.8-beta.5",
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": [