@veltdev/sdk 4.5.0-beta.8 → 4.5.0-beta.9

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,5 @@
1
+ export interface PresenceRequestQuery {
2
+ documentId?: string;
3
+ organizationId?: string;
4
+ statuses?: string[];
5
+ }
@@ -3,18 +3,14 @@ import { PresenceUser } from "./presence-user.data.model";
3
3
  export interface PresenceMultipleUsersOnlineEvent {
4
4
  users: PresenceUser[];
5
5
  }
6
- export interface PresenceUserOnlineEvent {
7
- user: PresenceUser;
8
- }
9
- export interface PresenceUserOfflineEvent {
10
- user: PresenceUser;
11
- }
12
- export interface PresenceUserAwayEvent {
6
+ export interface PresenceUserStateChangeEvent {
13
7
  user: PresenceUser;
8
+ state: string;
14
9
  }
15
10
  export type PresenceEventTypesMap = {
16
11
  [PresenceEventTypes.MULTIPLE_USERS_ONLINE]: PresenceMultipleUsersOnlineEvent;
17
- [PresenceEventTypes.USER_ONLINE]: PresenceUserOnlineEvent;
18
- [PresenceEventTypes.USER_OFFLINE]: PresenceUserOfflineEvent;
19
- [PresenceEventTypes.USER_AWAY]: PresenceUserAwayEvent;
12
+ [PresenceEventTypes.USER_STATE_CHANGE]: PresenceUserStateChangeEvent;
20
13
  };
14
+ export interface GetPresenceDataResponse {
15
+ data: PresenceUser[] | null;
16
+ }
@@ -1,7 +1,9 @@
1
1
  // @ts-nocheck
2
2
  import { Observable } from "rxjs";
3
3
  import { PresenceUser } from "../data/presence-user.data.model";
4
- import { PresenceEventTypesMap } from "../data/presence-events.data.model";
4
+ import { GetPresenceDataResponse, PresenceEventTypesMap } from "../data/presence-events.data.model";
5
+ import { PresenceRequestQuery } from "../data/presence-actions.data.model";
6
+
5
7
  export declare class PresenceElement {
6
8
 
7
9
  /**
@@ -38,6 +40,11 @@ export declare class PresenceElement {
38
40
  */
39
41
  disableSelf: () => void;
40
42
 
43
+ /**
44
+ * To get the presence data
45
+ */
46
+ getData: (query?: PresenceRequestQuery) => Observable<GetPresenceDataResponse>;
47
+
41
48
  /**
42
49
  * Subscribe to presence events
43
50
  */
@@ -77,6 +84,11 @@ export declare class PresenceElement {
77
84
  */
78
85
  private _disableSelf;
79
86
 
87
+ /**
88
+ * To get the presence data
89
+ */
90
+ private _getData;
91
+
80
92
  /**
81
93
  * Subscribe to presence events
82
94
  */
@@ -80,9 +80,7 @@ export declare const LiveStateSyncEventTypes: {
80
80
  };
81
81
  export declare const PresenceEventTypes: {
82
82
  readonly MULTIPLE_USERS_ONLINE: "multipleUsersOnline";
83
- readonly USER_ONLINE: "userOnline";
84
- readonly USER_OFFLINE: "userOffline";
85
- readonly USER_AWAY: "userAway";
83
+ readonly USER_STATE_CHANGE: "userStateChange";
86
84
  };
87
85
  export type CommentEventType = typeof CommentEventTypes[keyof typeof CommentEventTypes];
88
86
  export type RecorderEventType = typeof RecorderEventTypes[keyof typeof RecorderEventTypes];
package/models.d.ts CHANGED
@@ -38,6 +38,7 @@ export * from './app/models/data/notification.model';
38
38
  export * from './app/models/data/page-info.model';
39
39
  export * from './app/models/data/permission.data.model';
40
40
  export * from './app/models/data/presence-user.data.model';
41
+ export * from './app/models/data/presence-actions.data.model';
41
42
  export * from './app/models/data/presence-events.data.model';
42
43
  export * from './app/models/data/recorder.model';
43
44
  export * from './app/models/data/recorder-annotation.data.model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk",
3
- "version": "4.5.0-beta.8",
3
+ "version": "4.5.0-beta.9",
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": [