@veltdev/types-dev 4.5.9-beta.9 → 4.6.0-beta.1

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.
@@ -34,7 +34,7 @@ import { VeltDataProvider } from "../models/data/provider.data.model";
34
34
  import { VeltEncryptionProvider } from "../models/data/encryption-provider.data.model";
35
35
  import { VeltResetButtonStateConfig } from "../models/data/button.data.model";
36
36
  import { SetLocationsRequestOptions } from "../models/data/location.model";
37
- import { HeartbeatConfig, Heartbeat } from "../models/data/heartbeat.data.model";
37
+ import { HeartbeatConfig, Heartbeat, GetHeartbeatResponse } from "../models/data/heartbeat.data.model";
38
38
 
39
39
  export declare class Snippyly {
40
40
  constructor();
@@ -288,7 +288,7 @@ export declare class Snippyly {
288
288
  /**
289
289
  * To get heartbeat.
290
290
  */
291
- getHeartbeat: (heartbeatConfig?: HeartbeatConfig) => Observable<Heartbeat[] | null>;
291
+ getHeartbeat: (heartbeatConfig?: HeartbeatConfig) => Observable<GetHeartbeatResponse>;
292
292
 
293
293
  /**
294
294
  * To get user role in provided document.
@@ -1,7 +1,8 @@
1
1
  import { CoreEventTypes } from "../../utils/enums";
2
2
  import { VeltButtonClickEvent } from "./button.data.model";
3
- import { User } from "./user.data.model";
3
+ import { PermissionSource, User } from "./user.data.model";
4
4
  export type CoreEventTypesMap = {
5
+ [CoreEventTypes.PERMISSION_PROVIDER]: PermissionProviderEvent;
5
6
  [CoreEventTypes.VELT_BUTTON_CLICK]: VeltButtonClickEvent;
6
7
  [CoreEventTypes.USER_UPDATE]: UserUpdateEvent;
7
8
  [CoreEventTypes.DOCUMENT_INIT]: DocumentInitEvent;
@@ -10,12 +11,47 @@ export type CoreEventTypesMap = {
10
11
  };
11
12
  export type UserUpdateEvent = User | null;
12
13
  export type DocumentInitEvent = boolean | undefined;
14
+ export type PermissionProviderEvent = {
15
+ event: PermissionProviderEventType;
16
+ methodName?: PermissionSource;
17
+ source?: 'internal' | 'external';
18
+ timestamp?: number;
19
+ uniqueId?: string;
20
+ payload?: any;
21
+ };
22
+ export type PermissionProviderEventType = {
23
+ RESOURCE_ACCESS_REQUEST_FORMED: 'resourceAccessRequestFormed';
24
+ RESOURCE_ACCESS_REQUEST_TRIGGERED: 'resourceAccessRequestTriggered';
25
+ RESOURCE_ACCESS_RESULT: 'resourceAccessResult';
26
+ RESOURCE_ACCESS_ERROR: 'resourceAccessError';
27
+ RESOURCE_ACCESS_RESULT_FROM_CACHE: 'resourceAccessResultFromCache';
28
+ };
13
29
  export type ErrorEvent = {
30
+ event?: string;
31
+ sourceMethod?: string;
32
+ documentIds?: string[];
33
+ userId?: string;
34
+ timestamp?: number;
14
35
  error?: string;
15
- code: string;
36
+ code?: string;
16
37
  message?: string;
17
38
  source?: string;
18
39
  };
40
+ export declare enum InitUpdateMethodNames {
41
+ SET_DOCUMENTS = "setDocuments",
42
+ SET_ROOT_DOCUMENT = "setRootDocument",
43
+ SET_DOCUMENT_ID = "setDocumentId",
44
+ UNSET_DOCUMENT_ID = "unsetDocumentId",
45
+ UNSET_DOCUMENTS = "unsetDocuments",
46
+ SET_LOCATION = "setLocation",
47
+ SET_LOCATIONS = "setLocations",
48
+ SET_ROOT_LOCATION = "setRootLocation",
49
+ ADD_LOCATION = "addLocation",
50
+ REMOVE_LOCATION = "removeLocation",
51
+ REMOVE_LOCATIONS = "removeLocations",
52
+ UNSET_LOCATION_IDS = "unsetLocationIds",
53
+ REMOVE_LOCATIONS_SUCCESS = "removeLocationsSuccess"
54
+ }
19
55
  export type InitUpdateEvent = {
20
56
  event: string;
21
57
  methodName?: string;
@@ -11,3 +11,6 @@ export interface Heartbeat {
11
11
  export interface HeartbeatConfig {
12
12
  userId?: string;
13
13
  }
14
+ export interface GetHeartbeatResponse {
15
+ data: Heartbeat[] | null;
16
+ }
@@ -124,7 +124,9 @@ export declare enum PermissionSource {
124
124
  SET_DOCUMENTS = "setDocuments",
125
125
  IDENTIFY = "identify",
126
126
  GET_NOTIFICATIONS = "getNotifications",
127
- SET_NOTIFICATIONS = "setNotifications"
127
+ SET_NOTIFICATIONS = "setNotifications",
128
+ REVOKE_ACCESS_ON_USER_LOGOUT = "revokeAccessOnUserLogout",
129
+ REVOKE_ACCESS_ON_DOCUMENT_UNSET = "revokeAccessOnDocumentUnset"
128
130
  }
129
131
  export interface RevokeAccessOn {
130
132
  type: RevokeAccessOnType;
@@ -370,6 +370,7 @@ export declare class Constants {
370
370
  SNIPPYLY_DEFAULT_MEDIA_SOURCE_OPTIONS: string;
371
371
  SNIPPYLY_QUEUED_COMMENT: string;
372
372
  VELT_USER: string;
373
+ VELT_IDENTIFY_USER: string;
373
374
  VELT_USER_FORCE_RE_LOGGED_IN: string;
374
375
  VELT_VERSION: string;
375
376
  VELT_ADVANCED_QUERIES: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/types-dev",
3
- "version": "4.5.9-beta.9",
3
+ "version": "4.6.0-beta.1",
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": [