@veltdev/types-dev 4.5.7-beta.4 → 4.5.8-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.
@@ -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
+ }
@@ -17,7 +17,6 @@ export interface ResolverResponse<T> {
17
17
  message?: string;
18
18
  timestamp?: number;
19
19
  statusCode: number;
20
- signature?: string;
21
20
  }
22
21
  export interface RetryConfig {
23
22
  retryCount?: number;
@@ -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
+ }
@@ -1,4 +1,3 @@
1
- import { ResolverResponse } from "./resolver.data.model";
2
1
  import { UserContact } from "./user-contact.data.model";
3
2
  import { UserPermissionAccessRole } from "./user-resolver.data.model";
4
3
  export declare class User {
@@ -107,34 +106,57 @@ export interface AuthRetryConfig {
107
106
  }
108
107
  export interface Context {
109
108
  access: {
110
- [key: string]: Array<string | number> | null;
109
+ [key: string]: string | number;
111
110
  };
112
111
  accessFields?: Array<string>;
113
112
  }
114
113
  export interface VeltAuthProvider {
115
114
  user: User;
116
115
  options?: Options;
117
- context?: Context;
118
116
  retryConfig?: AuthRetryConfig;
119
117
  generateToken?: () => Promise<string>;
120
118
  }
119
+ export declare enum RevokeAccessOnType {
120
+ DOCUMENT_UNSET = "document_unset",
121
+ USER_LOGOUT = "user_logout"
122
+ }
123
+ export declare enum PermissionSource {
124
+ SET_DOCUMENTS = "setDocuments",
125
+ IDENTIFY = "identify",
126
+ GET_NOTIFICATIONS = "getNotifications",
127
+ SET_NOTIFICATIONS = "setNotifications"
128
+ }
129
+ export interface RevokeAccessOn {
130
+ type: RevokeAccessOnType;
131
+ revokeOrganizationAccess?: boolean;
132
+ }
121
133
  export interface VeltPermissionProvider {
122
- onResourceAccessRequired: (requests: Array<PermissionQuery>) => Promise<ResolverResponse<PermissionResult[]>>;
123
134
  retryConfig?: AuthRetryConfig;
135
+ isContextEnabled?: boolean;
136
+ revokeAccessOn?: RevokeAccessOn[];
124
137
  forceRefresh?: boolean;
125
138
  }
139
+ export declare enum PermissionResourceType {
140
+ FOLDER = "folder",
141
+ DOCUMENT = "document",
142
+ ORGANIZATION = "organization",
143
+ CONTEXT = "context"
144
+ }
126
145
  export interface PermissionQuery {
127
146
  userId: string;
128
147
  resource: {
129
148
  id: string;
130
- type: 'folder' | 'document' | 'organization';
131
- source: 'setDocuments' | 'identify' | 'getNotifications' | 'setNotifications';
149
+ type: PermissionResourceType;
150
+ source: PermissionSource;
151
+ organizationId: string;
152
+ context?: Context;
132
153
  };
133
154
  }
134
155
  export interface PermissionResult {
135
156
  userId: string;
136
157
  resourceId: string;
137
- type: 'folder' | 'document' | 'organization';
158
+ organizationId: string;
159
+ type: PermissionResourceType;
138
160
  accessRole?: UserPermissionAccessRole;
139
161
  expiresAt?: number;
140
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.7-beta.4",
3
+ "version": "4.5.8-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": [