@veltdev/types-dev 4.5.8-beta.2 → 4.5.8-beta.20

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.
@@ -25,7 +25,7 @@ import { UserContact } from "../models/data/user-contact.data.model";
25
25
  import { DocumentMetadata } from "../models/data/document-metadata.model";
26
26
  import { ReactionElement } from "../models/element/reaction-element.model";
27
27
  import { CrdtElement } from "../models/element/crdt-element.model";
28
- import { VeltEventMetadata } from "../models/data/event-metadata.data.model";
28
+ import { VeltEventMetadata, VeltDebugInfo } from "../models/data/event-metadata.data.model";
29
29
  import { CoreEventTypesMap } from "../models/data/core-events.data.model";
30
30
  import { Document, SetDocumentsRequestOptions, FetchDocumentsRequest, FetchFoldersRequest, UpdateDocumentsRequest, UpdateLocationsRequest } from "../models/data/document.data.model";
31
31
  import { FetchDocumentsResponse, FetchFoldersResponse } from "../models/data/document-events.data.model";
@@ -243,6 +243,15 @@ export declare class Snippyly {
243
243
  * Get the metadata of the current resource.
244
244
  */
245
245
  getMetadata: () => Promise<VeltEventMetadata | null>;
246
+ /**
247
+ * To fetch debug info.
248
+ */
249
+ fetchDebugInfo: () => Promise<VeltDebugInfo | null>;
250
+ /**
251
+ * To subscribe to debug info.
252
+ */
253
+ getDebugInfo: () => Observable<VeltDebugInfo | null>;
254
+
246
255
  /**
247
256
  * To signout a user
248
257
  */
@@ -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;
@@ -1,9 +1,29 @@
1
1
  import { DocumentMetadata } from "./document-metadata.model";
2
+ import { FolderMetadata } from "./folder-metadata.model";
2
3
  import { Location } from "./location.model";
3
4
  import { OrganizationMetadata } from "./organization-metadata.model";
5
+ import { User } from "./user.data.model";
4
6
  export interface VeltEventMetadata {
5
7
  organization?: OrganizationMetadata | null;
6
8
  documents?: DocumentMetadata[];
7
9
  locations?: Location[];
8
10
  folderId?: string;
9
11
  }
12
+ export interface VeltDebugInfo {
13
+ veltVersion?: string;
14
+ apiKey?: string;
15
+ serverMap?: {
16
+ organization?: OrganizationMetadata;
17
+ documents?: DocumentMetadata[];
18
+ locations?: Location[];
19
+ folder?: FolderMetadata;
20
+ user?: User;
21
+ };
22
+ clientMap?: {
23
+ organization?: OrganizationMetadata;
24
+ documents?: DocumentMetadata[];
25
+ locations?: Location[];
26
+ folder?: FolderMetadata;
27
+ user?: User;
28
+ };
29
+ }
@@ -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
+ }
@@ -11,6 +11,7 @@ export declare class UserIAM {
11
11
  * The user's contact details
12
12
  */
13
13
  user: UserContact;
14
+ accessFields?: string[];
14
15
  documentIds?: string[];
15
16
  viewerDocumentIds?: string[];
16
17
  folderIds?: string[];
@@ -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;
@@ -562,7 +562,7 @@ export declare class CommentElement {
562
562
  * To select comment by annotation id
563
563
  * @param annotationId Comment annotation id
564
564
  */
565
- public selectCommentByAnnotationId: (annotationId: string) => void;
565
+ public selectCommentByAnnotationId: (annotationId?: string) => void;
566
566
 
567
567
  /**
568
568
  * To enable showing recording summary in comments
@@ -1259,6 +1259,16 @@ export declare class CommentElement {
1259
1259
  */
1260
1260
  public markAsUnread: (annotationId: string) => Promise<void>;
1261
1261
 
1262
+ /**
1263
+ * To enable screenshot
1264
+ */
1265
+ public enableScreenshot: () => void;
1266
+
1267
+ /**
1268
+ * To disable screenshot
1269
+ */
1270
+ public disableScreenshot: () => void;
1271
+
1262
1272
  constructor();
1263
1273
  /**
1264
1274
  * Subscribe to comments on the current document.
@@ -2496,4 +2506,14 @@ export declare class CommentElement {
2496
2506
  * To mark comment annotation as unread
2497
2507
  */
2498
2508
  private _markAsUnread;
2509
+
2510
+ /**
2511
+ * To enable screenshot
2512
+ */
2513
+ private _enableScreenshot;
2514
+
2515
+ /**
2516
+ * To disable screenshot
2517
+ */
2518
+ private _disableScreenshot;
2499
2519
  }
@@ -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/types-dev",
3
- "version": "4.5.8-beta.2",
3
+ "version": "4.5.8-beta.20",
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": [