@in.pulse-crm/sdk 2.6.5 → 2.6.6
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ApiClient from "./api-client";
|
|
2
2
|
import { RequestFilters } from "./types";
|
|
3
|
-
import { CreateScheduleDTO,
|
|
3
|
+
import { CreateScheduleDTO, SendMessageData, WppChatsAndMessages, WppChatWithDetailsAndMessages, WppContact, WppContactWithCustomer, WppMessage, WppSchedule, WppWallet } from "./types/whatsapp.types";
|
|
4
4
|
export default class WhatsappClient extends ApiClient {
|
|
5
5
|
getChatsBySession(messages?: boolean, contact?: boolean, token?: string | null): Promise<WppChatsAndMessages>;
|
|
6
6
|
getChatById(id: number): Promise<WppChatWithDetailsAndMessages>;
|
|
@@ -24,7 +24,7 @@ export default class WhatsappClient extends ApiClient {
|
|
|
24
24
|
name: string;
|
|
25
25
|
}[]>;
|
|
26
26
|
setAuth(token: string): void;
|
|
27
|
-
getChatsMonitor(): Promise<
|
|
27
|
+
getChatsMonitor(): Promise<WppChatsAndMessages>;
|
|
28
28
|
transferAttendance(id: number, userId: number): Promise<void>;
|
|
29
29
|
/**
|
|
30
30
|
* Obtém os detalhes de um agendamento.
|
package/package.json
CHANGED
package/src/internal.client.ts
CHANGED
|
@@ -13,8 +13,6 @@ type GetChatsResponse = DataResponse<{
|
|
|
13
13
|
chats: (InternalChat & { participants: InternalChatMember[] })[];
|
|
14
14
|
messages: InternalMessage[];
|
|
15
15
|
}>;
|
|
16
|
-
type GetMonitorInternalChatsResponse = DataResponse<[]>;
|
|
17
|
-
|
|
18
16
|
export default class InternalChatClient extends ApiClient {
|
|
19
17
|
public async createInternalChat(
|
|
20
18
|
participants: number[],
|
|
@@ -94,13 +92,11 @@ export default class InternalChatClient extends ApiClient {
|
|
|
94
92
|
}
|
|
95
93
|
public async getInternalChatsMonitor() {
|
|
96
94
|
const url = `/api/internal/monitor/chats`;
|
|
97
|
-
|
|
98
95
|
const { data: res } =
|
|
99
96
|
await this.httpClient.get<GetChatsResponse>(url);
|
|
100
97
|
|
|
101
98
|
return res.data;
|
|
102
99
|
}
|
|
103
|
-
|
|
104
100
|
public setAuth(token: string) {
|
|
105
101
|
this.httpClient.defaults.headers.common["Authorization"] =
|
|
106
102
|
`Bearer ${token}`;
|
package/src/whatsapp.client.ts
CHANGED
|
@@ -194,7 +194,7 @@ export default class WhatsappClient extends ApiClient {
|
|
|
194
194
|
const url = `/api/whatsapp/session/monitor`;
|
|
195
195
|
|
|
196
196
|
const { data: res } =
|
|
197
|
-
await this.httpClient.get<
|
|
197
|
+
await this.httpClient.get<GetChatsResponse>(url);
|
|
198
198
|
|
|
199
199
|
return res.data;
|
|
200
200
|
}
|