@in.pulse-crm/sdk 2.0.5 → 2.0.7

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.
@@ -48,4 +48,5 @@ export default class SocketClient {
48
48
  */
49
49
  off: UnlistenSocketEventFn;
50
50
  joinRoom: JoinRoomFn;
51
+ leaveRoom: JoinRoomFn;
51
52
  }
@@ -73,5 +73,8 @@ class SocketClient {
73
73
  joinRoom = (room) => {
74
74
  this.ws.emit("join-room", room);
75
75
  };
76
+ leaveRoom = (room) => {
77
+ this.ws.emit("leave-room", room);
78
+ };
76
79
  }
77
80
  exports.default = SocketClient;
@@ -14,7 +14,7 @@ export interface PaginatedResponse<T> {
14
14
  data: Array<T>;
15
15
  page: {
16
16
  current: number;
17
- next: boolean;
17
+ total: number;
18
18
  };
19
19
  }
20
20
  export interface QueryResponse<T> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@in.pulse-crm/sdk",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "SDKs for abstraction of api consumption of in.pulse-crm application",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -84,4 +84,8 @@ export default class SocketClient {
84
84
  public joinRoom: JoinRoomFn = (room) => {
85
85
  this.ws.emit("join-room", room);
86
86
  };
87
+
88
+ public leaveRoom: JoinRoomFn = (room) => {
89
+ this.ws.emit("leave-room", room);
90
+ };
87
91
  }
@@ -1,6 +1,6 @@
1
1
  export interface DataResponse<T> {
2
- message: string;
3
- data: T;
2
+ message: string;
3
+ data: T;
4
4
  }
5
5
 
6
6
  export interface MessageResponse {
@@ -8,19 +8,19 @@ export interface MessageResponse {
8
8
  }
9
9
 
10
10
  export interface ErrorResponse {
11
- message: string;
12
- cause?: any;
11
+ message: string;
12
+ cause?: any;
13
13
  }
14
14
 
15
15
  export interface PaginatedResponse<T> {
16
- message: string;
17
- data: Array<T>;
18
- page: {
19
- current: number;
20
- next: boolean;
21
- }
16
+ message: string;
17
+ data: Array<T>;
18
+ page: {
19
+ current: number;
20
+ total: number;
21
+ };
22
22
  }
23
23
 
24
24
  export interface QueryResponse<T> {
25
- result: T;
26
- }
25
+ result: T;
26
+ }