@in.pulse-crm/sdk 2.5.0 → 2.5.1

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.
@@ -9,7 +9,10 @@ export default class InternalChatClient extends ApiClient {
9
9
  messages: InternalMessage[];
10
10
  }>;
11
11
  sendMessageToChat(data: InternalSendMessageData): Promise<void>;
12
- updateGroupMembers(groupId: number, add: number[], remove: number[]): Promise<any>;
12
+ updateGroupMembers(groupId: number, { name, participants }: {
13
+ name: string;
14
+ participants: number[];
15
+ }): Promise<any>;
13
16
  startChatByContactId(contactId: number): Promise<{
14
17
  chat: InternalChat & {
15
18
  messages: InternalMessage[];
@@ -37,8 +37,8 @@ class InternalChatClient extends api_client_1.default {
37
37
  },
38
38
  });
39
39
  }
40
- async updateGroupMembers(groupId, add, remove) {
41
- const { data: res } = await this.httpClient.put(`/api/internal/chats/group/${groupId}/members`, { add, remove });
40
+ async updateGroupMembers(groupId, { name, participants }) {
41
+ const { data: res } = await this.httpClient.put(`/api/internal/chats/group/${groupId}/members`, { name, participants });
42
42
  return res.data;
43
43
  }
44
44
  async startChatByContactId(contactId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@in.pulse-crm/sdk",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
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",
@@ -68,12 +68,11 @@ export default class InternalChatClient extends ApiClient {
68
68
 
69
69
  public async updateGroupMembers(
70
70
  groupId: number,
71
- add: number[],
72
- remove: number[],
71
+ { name, participants }: { name: string; participants: number[] },
73
72
  ) {
74
73
  const { data: res } = await this.httpClient.put<DataResponse<any>>(
75
74
  `/api/internal/chats/group/${groupId}/members`,
76
- { add, remove },
75
+ { name, participants },
77
76
  );
78
77
  return res.data;
79
78
  }