@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,
|
|
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;
|
package/dist/whatsapp.client.js
CHANGED
|
@@ -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,
|
|
64
|
+
async finishChatById(id, resultId, scheduleDate) {
|
|
65
65
|
const url = `/api/whatsapp/chats/${id}/finish`;
|
|
66
|
-
const body = { resultId,
|
|
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
package/src/whatsapp.client.ts
CHANGED
|
@@ -122,10 +122,10 @@ export default class WhatsappClient extends ApiClient {
|
|
|
122
122
|
public async finishChatById(
|
|
123
123
|
id: number,
|
|
124
124
|
resultId: number,
|
|
125
|
-
|
|
125
|
+
scheduleDate?: Date | null,
|
|
126
126
|
) {
|
|
127
127
|
const url = `/api/whatsapp/chats/${id}/finish`;
|
|
128
|
-
const body = { resultId,
|
|
128
|
+
const body = { resultId, scheduleDate };
|
|
129
129
|
await this.ax.post<MessageResponse>(url, body);
|
|
130
130
|
}
|
|
131
131
|
|