@in.pulse-crm/sdk 2.3.2 → 2.3.3

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.
@@ -5,6 +5,6 @@ export default class WhatsappClient extends ApiClient {
5
5
  getChatById(id: number): Promise<WppChatWithDetailsAndMessages>;
6
6
  getMessageById(id: string): Promise<WppMessage>;
7
7
  getUserWallets(instance: string, userId: number): Promise<WppWallet[]>;
8
- markChatAsRead(chatId: number): Promise<WppMessage[]>;
8
+ markContactMessagesAsRead(contactId: number): Promise<WppMessage[]>;
9
9
  setAuth(token: string): void;
10
10
  }
@@ -26,9 +26,9 @@ class WhatsappClient extends api_client_1.default {
26
26
  const { data: res } = await this.httpClient.get(`/api/wallets?instance=${instance}&userId=${userId}`);
27
27
  return res.data;
28
28
  }
29
- async markChatAsRead(chatId) {
29
+ async markContactMessagesAsRead(contactId) {
30
30
  const url = "/api/whatsapp/messages/mark-as-read";
31
- const body = { chatId };
31
+ const body = { contactId };
32
32
  const { data: res } = await this.httpClient.post(url, body);
33
33
  return res.data;
34
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@in.pulse-crm/sdk",
3
- "version": "2.3.2",
3
+ "version": "2.3.3",
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",
@@ -53,9 +53,9 @@ export default class WhatsappClient extends ApiClient {
53
53
  return res.data;
54
54
  }
55
55
 
56
- public async markChatAsRead(chatId: number) {
56
+ public async markContactMessagesAsRead(contactId: number) {
57
57
  const url = "/api/whatsapp/messages/mark-as-read";
58
- const body = { chatId };
58
+ const body = { contactId };
59
59
  const { data: res } =
60
60
  await this.httpClient.post<MarkChatAsReadResponse>(url, body);
61
61