@in.pulse-crm/sdk 2.13.1 → 2.14.0

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.
@@ -15,7 +15,7 @@ export default class WhatsappClient extends ApiClient {
15
15
  markContactMessagesAsRead(contactId: number): Promise<WppMessage[]>;
16
16
  sendMessage(clientId: string, to: string, data: SendMessageData): Promise<WppMessage>;
17
17
  editMessage(clientId: string, messageId: string, newText: string, isInternal?: boolean): Promise<void>;
18
- finishChatById(id: number, resultId: number, triggerSatisfactionBot?: boolean): Promise<void>;
18
+ finishChatById(id: number, resultId: number, scheduleDate?: Date | null): Promise<void>;
19
19
  startChatByContactId(contactId: number, template?: any): Promise<void>;
20
20
  getResults(): Promise<{
21
21
  id: number;
@@ -61,9 +61,9 @@ class WhatsappClient extends api_client_1.default {
61
61
  const body = { newText };
62
62
  await this.ax.put(url, body);
63
63
  }
64
- async finishChatById(id, resultId, triggerSatisfactionBot = false) {
64
+ async finishChatById(id, resultId, scheduleDate) {
65
65
  const url = `/api/whatsapp/chats/${id}/finish`;
66
- const body = { resultId, triggerSatisfactionBot };
66
+ const body = { resultId, scheduleDate };
67
67
  await this.ax.post(url, body);
68
68
  }
69
69
  async startChatByContactId(contactId, template) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@in.pulse-crm/sdk",
3
- "version": "2.13.1",
3
+ "version": "2.14.0",
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",
@@ -122,10 +122,10 @@ export default class WhatsappClient extends ApiClient {
122
122
  public async finishChatById(
123
123
  id: number,
124
124
  resultId: number,
125
- triggerSatisfactionBot = false,
125
+ scheduleDate?: Date | null,
126
126
  ) {
127
127
  const url = `/api/whatsapp/chats/${id}/finish`;
128
- const body = { resultId, triggerSatisfactionBot };
128
+ const body = { resultId, scheduleDate };
129
129
  await this.ax.post<MessageResponse>(url, body);
130
130
  }
131
131