@in.pulse-crm/sdk 2.6.1 → 2.6.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.
@@ -14,5 +14,6 @@ export default class InternalChatClient extends ApiClient {
14
14
  name: string;
15
15
  participants: number[];
16
16
  }): Promise<InternalGroup>;
17
+ markChatMessagesAsRead(chatId: number): Promise<void>;
17
18
  setAuth(token: string): void;
18
19
  }
@@ -49,6 +49,10 @@ class InternalChatClient extends api_client_1.default {
49
49
  });
50
50
  return res.data;
51
51
  }
52
+ async markChatMessagesAsRead(chatId) {
53
+ const url = `/api/internal/chat/${chatId}/mark-as-read`;
54
+ await this.httpClient.patch(url);
55
+ }
52
56
  setAuth(token) {
53
57
  this.httpClient.defaults.headers.common["Authorization"] =
54
58
  `Bearer ${token}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@in.pulse-crm/sdk",
3
- "version": "2.6.1",
3
+ "version": "2.6.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",
@@ -89,6 +89,11 @@ export default class InternalChatClient extends ApiClient {
89
89
  return res.data;
90
90
  }
91
91
 
92
+ public async markChatMessagesAsRead(chatId: number) {
93
+ const url = `/api/internal/chat/${chatId}/mark-as-read`;
94
+ await this.httpClient.patch(url);
95
+ }
96
+
92
97
  public setAuth(token: string) {
93
98
  this.httpClient.defaults.headers.common["Authorization"] =
94
99
  `Bearer ${token}`;