@in.pulse-crm/sdk 2.3.1 → 2.3.2

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.
@@ -7,6 +7,7 @@ export declare enum SocketEventType {
7
7
  WppMessage = "wpp_message",
8
8
  WppMessageStatus = "wpp_message_status",
9
9
  WppMessageReaction = "wpp_message_reaction",
10
+ WppContactMessagesRead = "wpp_contact_messages_read",
10
11
  WwebjsQr = "wwebjs_qr",
11
12
  WwebjsAuth = "wwebjs_auth",
12
13
  ReportStatus = "report_status"
@@ -18,6 +19,7 @@ export interface EmitSocketEventFn {
18
19
  (type: SocketEventType.WppChatFinished, room: SocketServerRoom, data: WppChatFinishedEventData): Promise<MessageResponse>;
19
20
  (type: SocketEventType.WppMessage, room: SocketServerChatRoom, data: WppMessageEventData): Promise<MessageResponse>;
20
21
  (type: SocketEventType.WppMessageStatus, room: SocketServerChatRoom, data: WppMessageStatusEventData): Promise<MessageResponse>;
22
+ (type: SocketEventType.WppContactMessagesRead, room: SocketServerChatRoom, data: WppContactMessagesReadEventData): Promise<MessageResponse>;
21
23
  (type: SocketEventType.WppMessageReaction, room: SocketServerChatRoom, data: WppMessageReactionEventData): Promise<MessageResponse>;
22
24
  (type: SocketEventType.ReportStatus, room: SocketServerReportsRoom, data: ReportStatusEventData): Promise<MessageResponse>;
23
25
  }
@@ -28,6 +30,7 @@ export interface ListenSocketEventFn {
28
30
  (type: SocketEventType.WppChatFinished, callback: (data: WppChatFinishedEventData) => void): void;
29
31
  (type: SocketEventType.WppMessage, callback: (data: WppMessageEventData) => void): void;
30
32
  (type: SocketEventType.WppMessageStatus, callback: (data: WppMessageStatusEventData) => void): void;
33
+ (type: SocketEventType.WppContactMessagesRead, callback: (data: WppContactMessagesReadEventData) => void): void;
31
34
  (type: SocketEventType.WppMessageReaction, callback: (data: WppMessageReactionEventData) => void): void;
32
35
  (type: SocketEventType.ReportStatus, callback: (data: ReportStatusEventData) => void): void;
33
36
  }
@@ -49,6 +52,9 @@ export interface WppChatStartedEventData {
49
52
  export interface WppChatFinishedEventData {
50
53
  chatId: number;
51
54
  }
55
+ export interface WppContactMessagesReadEventData {
56
+ contactId: number;
57
+ }
52
58
  export interface WppMessageEventData {
53
59
  message: WppMessage;
54
60
  }
@@ -8,6 +8,7 @@ var SocketEventType;
8
8
  SocketEventType["WppMessage"] = "wpp_message";
9
9
  SocketEventType["WppMessageStatus"] = "wpp_message_status";
10
10
  SocketEventType["WppMessageReaction"] = "wpp_message_reaction";
11
+ SocketEventType["WppContactMessagesRead"] = "wpp_contact_messages_read";
11
12
  SocketEventType["WwebjsQr"] = "wwebjs_qr";
12
13
  SocketEventType["WwebjsAuth"] = "wwebjs_auth";
13
14
  SocketEventType["ReportStatus"] = "report_status";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@in.pulse-crm/sdk",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
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",
@@ -13,6 +13,7 @@ export enum SocketEventType {
13
13
  WppMessage = "wpp_message",
14
14
  WppMessageStatus = "wpp_message_status",
15
15
  WppMessageReaction = "wpp_message_reaction",
16
+ WppContactMessagesRead = "wpp_contact_messages_read",
16
17
  WwebjsQr = "wwebjs_qr",
17
18
  WwebjsAuth = "wwebjs_auth",
18
19
  ReportStatus = "report_status",
@@ -49,6 +50,11 @@ export interface EmitSocketEventFn {
49
50
  room: SocketServerChatRoom,
50
51
  data: WppMessageStatusEventData,
51
52
  ): Promise<MessageResponse>;
53
+ (
54
+ type: SocketEventType.WppContactMessagesRead,
55
+ room: SocketServerChatRoom,
56
+ data: WppContactMessagesReadEventData,
57
+ ): Promise<MessageResponse>;
52
58
  (
53
59
  type: SocketEventType.WppMessageReaction,
54
60
  room: SocketServerChatRoom,
@@ -86,6 +92,10 @@ export interface ListenSocketEventFn {
86
92
  type: SocketEventType.WppMessageStatus,
87
93
  callback: (data: WppMessageStatusEventData) => void,
88
94
  ): void;
95
+ (
96
+ type: SocketEventType.WppContactMessagesRead,
97
+ callback: (data: WppContactMessagesReadEventData) => void,
98
+ ): void;
89
99
  (
90
100
  type: SocketEventType.WppMessageReaction,
91
101
  callback: (data: WppMessageReactionEventData) => void,
@@ -118,6 +128,9 @@ export interface WppChatStartedEventData {
118
128
  export interface WppChatFinishedEventData {
119
129
  chatId: number;
120
130
  }
131
+ export interface WppContactMessagesReadEventData {
132
+ contactId: number;
133
+ }
121
134
  export interface WppMessageEventData {
122
135
  message: WppMessage;
123
136
  }