@in.pulse-crm/sdk 2.9.1 → 2.9.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.
|
@@ -18,7 +18,7 @@ export default class WhatsappClient extends ApiClient {
|
|
|
18
18
|
getContactsWithCustomer(): Promise<WppContactWithCustomer[]>;
|
|
19
19
|
getContacts(): Promise<WppContact[]>;
|
|
20
20
|
createContact(name: string, phone: string, customerId?: number): Promise<WppContact>;
|
|
21
|
-
updateContact(contactId: number, name: string): Promise<WppContact>;
|
|
21
|
+
updateContact(contactId: number, name: string, customerId: number | null): Promise<WppContact>;
|
|
22
22
|
deleteContact(contactId: number): Promise<void>;
|
|
23
23
|
getSectors(): Promise<{
|
|
24
24
|
id: number;
|
package/dist/whatsapp.client.js
CHANGED
|
@@ -94,9 +94,9 @@ class WhatsappClient extends api_client_1.default {
|
|
|
94
94
|
const { data: res } = await this.ax.post(url, body);
|
|
95
95
|
return res.data;
|
|
96
96
|
}
|
|
97
|
-
async updateContact(contactId, name) {
|
|
97
|
+
async updateContact(contactId, name, customerId) {
|
|
98
98
|
const url = `/api/whatsapp/contacts/${contactId}`;
|
|
99
|
-
const body = { name };
|
|
99
|
+
const body = { name, customerId };
|
|
100
100
|
const { data: res } = await this.ax.put(url, body);
|
|
101
101
|
return res.data;
|
|
102
102
|
}
|
package/package.json
CHANGED
package/src/whatsapp.client.ts
CHANGED
|
@@ -170,9 +170,9 @@ export default class WhatsappClient extends ApiClient {
|
|
|
170
170
|
return res.data;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
public async updateContact(contactId: number, name: string) {
|
|
173
|
+
public async updateContact(contactId: number, name: string, customerId: number | null) {
|
|
174
174
|
const url = `/api/whatsapp/contacts/${contactId}`;
|
|
175
|
-
const body = { name };
|
|
175
|
+
const body = { name, customerId };
|
|
176
176
|
|
|
177
177
|
const { data: res } = await this.ax.put<DataResponse<WppContact>>(
|
|
178
178
|
url,
|