@in.pulse-crm/sdk 2.11.2 → 2.11.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.
|
@@ -15,7 +15,7 @@ export default class WhatsappClient extends ApiClient {
|
|
|
15
15
|
markContactMessagesAsRead(contactId: number): Promise<WppMessage[]>;
|
|
16
16
|
sendMessage(to: string, data: SendMessageData): Promise<WppMessage>;
|
|
17
17
|
editMessage(messageId: string, newText: string, isInternal?: boolean): Promise<void>;
|
|
18
|
-
finishChatById(id: number, resultId: number): Promise<void>;
|
|
18
|
+
finishChatById(id: number, resultId: number, triggerSatisfactionBot?: boolean): Promise<void>;
|
|
19
19
|
startChatByContactId(contactId: number, template?: any): Promise<void>;
|
|
20
20
|
getResults(): Promise<{
|
|
21
21
|
id: number;
|
package/dist/whatsapp.client.js
CHANGED
|
@@ -60,9 +60,9 @@ class WhatsappClient extends api_client_1.default {
|
|
|
60
60
|
const body = { newText };
|
|
61
61
|
await this.ax.put(url, body);
|
|
62
62
|
}
|
|
63
|
-
async finishChatById(id, resultId) {
|
|
63
|
+
async finishChatById(id, resultId, triggerSatisfactionBot = false) {
|
|
64
64
|
const url = `/api/whatsapp/chats/${id}/finish`;
|
|
65
|
-
const body = { resultId };
|
|
65
|
+
const body = { resultId, triggerSatisfactionBot };
|
|
66
66
|
await this.ax.post(url, body);
|
|
67
67
|
}
|
|
68
68
|
async startChatByContactId(contactId, template) {
|
package/package.json
CHANGED
package/src/whatsapp.client.ts
CHANGED
|
@@ -112,9 +112,9 @@ export default class WhatsappClient extends ApiClient {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
|
|
115
|
-
public async finishChatById(id: number, resultId: number) {
|
|
115
|
+
public async finishChatById(id: number, resultId: number, triggerSatisfactionBot = false) {
|
|
116
116
|
const url = `/api/whatsapp/chats/${id}/finish`;
|
|
117
|
-
const body = { resultId };
|
|
117
|
+
const body = { resultId, triggerSatisfactionBot };
|
|
118
118
|
await this.ax.post<MessageResponse>(url, body);
|
|
119
119
|
}
|
|
120
120
|
|