@gymspace/evolution 1.0.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.
- package/README.md +1273 -0
- package/dist/index.d.mts +1790 -0
- package/dist/index.d.ts +1790 -0
- package/dist/index.js +1091 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1077 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +63 -0
- package/src/api/errors.ts +220 -0
- package/src/api/routes.ts +76 -0
- package/src/api/service.ts +141 -0
- package/src/index.ts +89 -0
- package/src/modules/chats/index.ts +253 -0
- package/src/modules/chats/schemas/archive.ts +15 -0
- package/src/modules/chats/schemas/check.ts +20 -0
- package/src/modules/chats/schemas/delete-message.ts +16 -0
- package/src/modules/chats/schemas/fetch-profile-picture.ts +13 -0
- package/src/modules/chats/schemas/find-all.ts +49 -0
- package/src/modules/chats/schemas/find-contacts.ts +17 -0
- package/src/modules/chats/schemas/find-messages.ts +55 -0
- package/src/modules/chats/schemas/find-status-message.ts +11 -0
- package/src/modules/chats/schemas/get-base64-from-media-message.ts +20 -0
- package/src/modules/chats/schemas/index.ts +33 -0
- package/src/modules/chats/schemas/mark-as-read.ts +20 -0
- package/src/modules/chats/schemas/mark-as-unread.ts +17 -0
- package/src/modules/chats/schemas/presence.ts +41 -0
- package/src/modules/chats/schemas/update-message.ts +16 -0
- package/src/modules/groups/index.ts +246 -0
- package/src/modules/groups/schemas/accept-invite-code.ts +14 -0
- package/src/modules/groups/schemas/common.ts +89 -0
- package/src/modules/groups/schemas/create.ts +15 -0
- package/src/modules/groups/schemas/fetch-invite-code.ts +13 -0
- package/src/modules/groups/schemas/find-all.ts +26 -0
- package/src/modules/groups/schemas/find-by-invite-code.ts +39 -0
- package/src/modules/groups/schemas/find-by-jid.ts +14 -0
- package/src/modules/groups/schemas/find-members.ts +16 -0
- package/src/modules/groups/schemas/index.ts +24 -0
- package/src/modules/groups/schemas/leave.ts +14 -0
- package/src/modules/groups/schemas/revoke-invite-code.ts +14 -0
- package/src/modules/groups/schemas/send-group-invite.ts +15 -0
- package/src/modules/groups/schemas/toggle-ephemeral.ts +15 -0
- package/src/modules/groups/schemas/update-description.ts +15 -0
- package/src/modules/groups/schemas/update-members.ts +18 -0
- package/src/modules/groups/schemas/update-picture.ts +15 -0
- package/src/modules/groups/schemas/update-setting.ts +16 -0
- package/src/modules/groups/schemas/update-subject.ts +15 -0
- package/src/modules/index.ts +7 -0
- package/src/modules/instance/index.ts +126 -0
- package/src/modules/instance/schemas/connect.ts +14 -0
- package/src/modules/instance/schemas/connection-state.ts +16 -0
- package/src/modules/instance/schemas/create.ts +99 -0
- package/src/modules/instance/schemas/delete.ts +21 -0
- package/src/modules/instance/schemas/fetch-all.ts +57 -0
- package/src/modules/instance/schemas/index.ts +8 -0
- package/src/modules/instance/schemas/logout.ts +22 -0
- package/src/modules/instance/schemas/restart.ts +13 -0
- package/src/modules/instance/schemas/set-presence.ts +20 -0
- package/src/modules/messages/index.ts +246 -0
- package/src/modules/messages/schemas/audio.ts +12 -0
- package/src/modules/messages/schemas/base.ts +11 -0
- package/src/modules/messages/schemas/contact.ts +70 -0
- package/src/modules/messages/schemas/document.ts +12 -0
- package/src/modules/messages/schemas/image.ts +12 -0
- package/src/modules/messages/schemas/index.ts +31 -0
- package/src/modules/messages/schemas/list.ts +36 -0
- package/src/modules/messages/schemas/location.ts +76 -0
- package/src/modules/messages/schemas/media.ts +51 -0
- package/src/modules/messages/schemas/poll.ts +87 -0
- package/src/modules/messages/schemas/reaction.ts +21 -0
- package/src/modules/messages/schemas/status.ts +18 -0
- package/src/modules/messages/schemas/sticker.ts +77 -0
- package/src/modules/messages/schemas/template.ts +39 -0
- package/src/modules/messages/schemas/text.ts +88 -0
- package/src/modules/messages/schemas/video.ts +12 -0
- package/src/modules/messages/schemas/voice.ts +94 -0
- package/src/modules/profile/index.ts +110 -0
- package/src/modules/profile/schemas/fetch-business-profile.ts +29 -0
- package/src/modules/profile/schemas/fetch-privacy-settings.ts +11 -0
- package/src/modules/profile/schemas/fetch-profile.ts +23 -0
- package/src/modules/profile/schemas/index.ts +8 -0
- package/src/modules/profile/schemas/remove-picture.ts +4 -0
- package/src/modules/profile/schemas/update-name.ts +11 -0
- package/src/modules/profile/schemas/update-picture.ts +11 -0
- package/src/modules/profile/schemas/update-privacy-settings.ts +18 -0
- package/src/modules/profile/schemas/update-status.ts +11 -0
- package/src/modules/settings/index.ts +28 -0
- package/src/modules/settings/schemas/find.ts +11 -0
- package/src/modules/settings/schemas/index.ts +2 -0
- package/src/modules/settings/schemas/set.ts +18 -0
- package/src/modules/webhook/index.ts +28 -0
- package/src/modules/webhook/schemas/find.ts +7 -0
- package/src/modules/webhook/schemas/index.ts +2 -0
- package/src/modules/webhook/schemas/set.ts +16 -0
- package/src/schemas/client.ts +23 -0
- package/src/schemas/common.ts +44 -0
- package/src/types/api.ts +17 -0
- package/src/types/events.ts +53 -0
- package/src/types/messages.ts +5 -0
- package/src/types/tags.ts +14 -0
- package/src/types/webhooks.ts +255 -0
- package/src/utils/phone-numer-from-jid.ts +9 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1790 @@
|
|
|
1
|
+
import * as libphonenumber_js from 'libphonenumber-js';
|
|
2
|
+
|
|
3
|
+
declare enum MessageUpdateStatus {
|
|
4
|
+
DELIVERY_ACK = "DELIVERY_ACK",
|
|
5
|
+
READ = "READ",
|
|
6
|
+
SERVER_ACK = "SERVER_ACK"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare enum ConnectionState {
|
|
10
|
+
OPEN = "open",
|
|
11
|
+
CONNECTING = "connecting",
|
|
12
|
+
CLOSED = "close",
|
|
13
|
+
REFUSED = "refused"
|
|
14
|
+
}
|
|
15
|
+
declare enum MessageType {
|
|
16
|
+
CONVERSATION = "conversation",
|
|
17
|
+
TEXT = "textMessage",
|
|
18
|
+
EPHEMERAL = "ephemeralMessage",
|
|
19
|
+
AUDIO = "audioMessage",
|
|
20
|
+
IMAGE = "imageMessage",
|
|
21
|
+
VIDEO = "videoMessage",
|
|
22
|
+
DOCUMENT = "documentMessage",
|
|
23
|
+
STICKER = "stickerMessage",
|
|
24
|
+
CONTACT = "contactMessage",
|
|
25
|
+
LOCATION = "locationMessage",
|
|
26
|
+
REACTION = "reactionMessage",
|
|
27
|
+
BUTTONS = "buttonsMessage"
|
|
28
|
+
}
|
|
29
|
+
interface DeviceListMetadata {
|
|
30
|
+
senderKeyHash: string;
|
|
31
|
+
senderTimestamp: string;
|
|
32
|
+
recipientKeyHash: string;
|
|
33
|
+
recipientTimestamp: string;
|
|
34
|
+
}
|
|
35
|
+
interface MessageContextInfo {
|
|
36
|
+
deviceListMetadata?: DeviceListMetadata | Record<string, unknown>;
|
|
37
|
+
deviceListMetadataVersion: number;
|
|
38
|
+
messageSecret: string;
|
|
39
|
+
}
|
|
40
|
+
interface DisappearingMode {
|
|
41
|
+
initiator: string;
|
|
42
|
+
trigger: string;
|
|
43
|
+
initiatedByMe: boolean;
|
|
44
|
+
}
|
|
45
|
+
interface ContextInfo {
|
|
46
|
+
expiration?: number;
|
|
47
|
+
ephemeralSettingTimestamp?: string;
|
|
48
|
+
disappearingMode?: DisappearingMode;
|
|
49
|
+
stanzaId?: string;
|
|
50
|
+
participant?: string;
|
|
51
|
+
quotedMessage?: {
|
|
52
|
+
conversation?: string;
|
|
53
|
+
};
|
|
54
|
+
statusSourceType?: string;
|
|
55
|
+
forwardingScore?: number;
|
|
56
|
+
isForwarded?: boolean;
|
|
57
|
+
pairedMediaType?: string;
|
|
58
|
+
}
|
|
59
|
+
interface ImageMessage {
|
|
60
|
+
url: string;
|
|
61
|
+
mimetype: string;
|
|
62
|
+
fileSha256: string;
|
|
63
|
+
fileLength: string;
|
|
64
|
+
height: number;
|
|
65
|
+
width: number;
|
|
66
|
+
mediaKey: string;
|
|
67
|
+
fileEncSha256: string;
|
|
68
|
+
directPath: string;
|
|
69
|
+
mediaKeyTimestamp: string;
|
|
70
|
+
jpegThumbnail: string;
|
|
71
|
+
contextInfo?: ContextInfo;
|
|
72
|
+
firstScanSidecar: string;
|
|
73
|
+
firstScanLength: number;
|
|
74
|
+
scansSidecar: string;
|
|
75
|
+
scanLengths: number[];
|
|
76
|
+
midQualityFileSha256: string;
|
|
77
|
+
imageSourceType: string;
|
|
78
|
+
}
|
|
79
|
+
interface AudioMessage {
|
|
80
|
+
url: string;
|
|
81
|
+
mimetype: string;
|
|
82
|
+
fileSha256: string;
|
|
83
|
+
fileLength: string;
|
|
84
|
+
seconds: number;
|
|
85
|
+
ptt: boolean;
|
|
86
|
+
mediaKey: string;
|
|
87
|
+
fileEncSha256: string;
|
|
88
|
+
directPath: string;
|
|
89
|
+
mediaKeyTimestamp: string;
|
|
90
|
+
waveform: string;
|
|
91
|
+
}
|
|
92
|
+
interface StickerMessage {
|
|
93
|
+
url: string;
|
|
94
|
+
width: number;
|
|
95
|
+
height: number;
|
|
96
|
+
isAvatar: boolean;
|
|
97
|
+
isLottie: boolean;
|
|
98
|
+
mediaKey: string;
|
|
99
|
+
mimetype: string;
|
|
100
|
+
directPath: string;
|
|
101
|
+
fileLength: string;
|
|
102
|
+
fileSha256: string;
|
|
103
|
+
isAnimated: boolean;
|
|
104
|
+
isAiSticker: boolean;
|
|
105
|
+
fileEncSha256: string;
|
|
106
|
+
stickerSentTs: string;
|
|
107
|
+
mediaKeyTimestamp: string;
|
|
108
|
+
}
|
|
109
|
+
interface VideoMessage {
|
|
110
|
+
url: string;
|
|
111
|
+
mimetype: string;
|
|
112
|
+
fileSha256: string;
|
|
113
|
+
fileLength: string;
|
|
114
|
+
seconds: number;
|
|
115
|
+
mediaKey: string;
|
|
116
|
+
height: number;
|
|
117
|
+
width: number;
|
|
118
|
+
fileEncSha256: string;
|
|
119
|
+
directPath: string;
|
|
120
|
+
mediaKeyTimestamp: string;
|
|
121
|
+
jpegThumbnail: string;
|
|
122
|
+
contextInfo?: ContextInfo;
|
|
123
|
+
streamingSidecar: string;
|
|
124
|
+
externalShareFullVideoDurationInSeconds: number;
|
|
125
|
+
}
|
|
126
|
+
interface ReactionMessage {
|
|
127
|
+
key: {
|
|
128
|
+
remoteJid: string;
|
|
129
|
+
fromMe: boolean;
|
|
130
|
+
id: string;
|
|
131
|
+
};
|
|
132
|
+
text: string;
|
|
133
|
+
senderTimestampMs: string;
|
|
134
|
+
}
|
|
135
|
+
interface DocumentMessage {
|
|
136
|
+
url: string;
|
|
137
|
+
mimetype: string;
|
|
138
|
+
fileSha256: string;
|
|
139
|
+
fileLength: string;
|
|
140
|
+
pageCount: number;
|
|
141
|
+
mediaKey: string;
|
|
142
|
+
fileName: string;
|
|
143
|
+
fileEncSha256: string;
|
|
144
|
+
directPath: string;
|
|
145
|
+
mediaKeyTimestamp: string;
|
|
146
|
+
contextInfo: ContextInfo;
|
|
147
|
+
caption: string;
|
|
148
|
+
}
|
|
149
|
+
interface ContactMessage {
|
|
150
|
+
displayName: string;
|
|
151
|
+
vcard: string;
|
|
152
|
+
}
|
|
153
|
+
interface ExtendedTextMessage {
|
|
154
|
+
text: string;
|
|
155
|
+
contextInfo?: ContextInfo;
|
|
156
|
+
}
|
|
157
|
+
type MessageContent = {
|
|
158
|
+
messageContextInfo?: MessageContextInfo;
|
|
159
|
+
conversation?: string;
|
|
160
|
+
extendedTextMessage?: ExtendedTextMessage;
|
|
161
|
+
imageMessage?: ImageMessage;
|
|
162
|
+
audioMessage?: AudioMessage;
|
|
163
|
+
stickerMessage?: StickerMessage;
|
|
164
|
+
ephemeralMessage?: EphemeralMessage;
|
|
165
|
+
videoMessage?: VideoMessage;
|
|
166
|
+
documentMessage?: DocumentMessage;
|
|
167
|
+
contactMessage?: ContactMessage;
|
|
168
|
+
locationMessage?: any;
|
|
169
|
+
reactionMessage?: ReactionMessage;
|
|
170
|
+
buttonsMessage?: any;
|
|
171
|
+
};
|
|
172
|
+
interface MessageUpdate {
|
|
173
|
+
status: MessageUpdateStatus;
|
|
174
|
+
}
|
|
175
|
+
interface ConnectionUpdatePayload {
|
|
176
|
+
instance: string;
|
|
177
|
+
wuid?: string;
|
|
178
|
+
profileName?: string;
|
|
179
|
+
profilePictureUrl?: string | null;
|
|
180
|
+
state: ConnectionState;
|
|
181
|
+
statusReason: number;
|
|
182
|
+
}
|
|
183
|
+
interface ContactPayload {
|
|
184
|
+
remoteJid: string;
|
|
185
|
+
pushName: string;
|
|
186
|
+
profilePicUrl: string | null;
|
|
187
|
+
instanceId: string;
|
|
188
|
+
}
|
|
189
|
+
interface EphemeralMessage {
|
|
190
|
+
message: MessageContent;
|
|
191
|
+
}
|
|
192
|
+
interface MessagePayload {
|
|
193
|
+
key: {
|
|
194
|
+
remoteJid: string;
|
|
195
|
+
fromMe: boolean;
|
|
196
|
+
id: string;
|
|
197
|
+
senderLid?: string;
|
|
198
|
+
};
|
|
199
|
+
pushName?: string;
|
|
200
|
+
message?: MessageContent;
|
|
201
|
+
messageType?: MessageType;
|
|
202
|
+
messageTimestamp?: number;
|
|
203
|
+
status?: string;
|
|
204
|
+
participant?: string;
|
|
205
|
+
contextInfo?: ContextInfo;
|
|
206
|
+
instanceId?: string;
|
|
207
|
+
source?: string;
|
|
208
|
+
}
|
|
209
|
+
interface WebhookData {
|
|
210
|
+
event: string;
|
|
211
|
+
instance: string;
|
|
212
|
+
data: MessagePayload | ContactPayload | ContactPayload[] | ConnectionUpdatePayload;
|
|
213
|
+
sender: string;
|
|
214
|
+
date?: number;
|
|
215
|
+
instanceName?: string;
|
|
216
|
+
destination?: string;
|
|
217
|
+
date_time?: string;
|
|
218
|
+
server_url?: string;
|
|
219
|
+
apikey?: string;
|
|
220
|
+
}
|
|
221
|
+
interface Instance {
|
|
222
|
+
instanceName: string;
|
|
223
|
+
status: string;
|
|
224
|
+
qrcode?: string;
|
|
225
|
+
}
|
|
226
|
+
interface Message$2 {
|
|
227
|
+
key: {
|
|
228
|
+
remoteJid: string;
|
|
229
|
+
fromMe: boolean;
|
|
230
|
+
id: string;
|
|
231
|
+
};
|
|
232
|
+
message: Record<string, unknown>;
|
|
233
|
+
messageTimestamp: number;
|
|
234
|
+
pushName?: string;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Configuration options for the Evolution API client
|
|
239
|
+
*/
|
|
240
|
+
interface ClientOptions {
|
|
241
|
+
/**
|
|
242
|
+
* Your server URL
|
|
243
|
+
*/
|
|
244
|
+
serverUrl: string;
|
|
245
|
+
/**
|
|
246
|
+
* Your instance token or global API key
|
|
247
|
+
*/
|
|
248
|
+
token: string;
|
|
249
|
+
/**
|
|
250
|
+
* Your instance name
|
|
251
|
+
*/
|
|
252
|
+
instance?: string;
|
|
253
|
+
/**
|
|
254
|
+
* Custom headers to include in requests
|
|
255
|
+
*/
|
|
256
|
+
headers?: Record<string, string>;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
interface APIRequestInit {
|
|
260
|
+
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
261
|
+
params?: any;
|
|
262
|
+
body?: any;
|
|
263
|
+
headers?: Record<string, string>;
|
|
264
|
+
isInstanceUrl?: boolean;
|
|
265
|
+
instance?: string;
|
|
266
|
+
}
|
|
267
|
+
interface MethodOptions {
|
|
268
|
+
/**
|
|
269
|
+
* Instance name to use for this request (overrides default instance)
|
|
270
|
+
*/
|
|
271
|
+
instance?: string;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
declare class ApiService {
|
|
275
|
+
private options;
|
|
276
|
+
constructor(options: ClientOptions);
|
|
277
|
+
setInstance(instance: string): void;
|
|
278
|
+
request<T = unknown>(path: string, options?: APIRequestInit): Promise<T>;
|
|
279
|
+
private makeInit;
|
|
280
|
+
get<T = unknown>(path: string, options?: Omit<APIRequestInit, "method">): Promise<T>;
|
|
281
|
+
post<T = unknown>(path: string, options?: Omit<APIRequestInit, "method">): Promise<T>;
|
|
282
|
+
put<T = unknown>(path: string, options?: Omit<APIRequestInit, "method">): Promise<T>;
|
|
283
|
+
patch<T = unknown>(path: string, options?: Omit<APIRequestInit, "method">): Promise<T>;
|
|
284
|
+
delete<T = unknown>(path: string, options?: Omit<APIRequestInit, "method">): Promise<T>;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
type Jid = `${string}@s.whatsapp.net` | string;
|
|
288
|
+
declare const Jid: (jid: string) => Jid;
|
|
289
|
+
type GroupJid = `${string}@g.us` | string;
|
|
290
|
+
declare const GroupJid: (jid: string) => GroupJid;
|
|
291
|
+
type GroupInviteCode = string & {
|
|
292
|
+
__tag: "GroupInviteCode";
|
|
293
|
+
};
|
|
294
|
+
declare const GroupInviteCode: (code: string) => GroupInviteCode;
|
|
295
|
+
type MessageId = string & {
|
|
296
|
+
__tag: "MessageId";
|
|
297
|
+
};
|
|
298
|
+
declare const MessageId: (id: string) => MessageId;
|
|
299
|
+
type ChatId = string & {
|
|
300
|
+
__tag: "ChatId";
|
|
301
|
+
};
|
|
302
|
+
declare const ChatId: (id: string) => ChatId;
|
|
303
|
+
|
|
304
|
+
interface ArchiveRequest {
|
|
305
|
+
number: ChatId;
|
|
306
|
+
archive: boolean;
|
|
307
|
+
}
|
|
308
|
+
interface ArchiveResponse {
|
|
309
|
+
status: string;
|
|
310
|
+
message: string;
|
|
311
|
+
}
|
|
312
|
+
type ArchiveOptions = ArchiveRequest;
|
|
313
|
+
|
|
314
|
+
interface CheckResponseItem {
|
|
315
|
+
exists: boolean;
|
|
316
|
+
jid: Jid;
|
|
317
|
+
number: string;
|
|
318
|
+
}
|
|
319
|
+
type CheckOptions = string | string[];
|
|
320
|
+
type CheckResponse = CheckResponseItem[];
|
|
321
|
+
|
|
322
|
+
interface DeleteMessageRequest {
|
|
323
|
+
number: ChatId;
|
|
324
|
+
messageId: MessageId;
|
|
325
|
+
owner: boolean;
|
|
326
|
+
}
|
|
327
|
+
interface DeleteMessageResponse {
|
|
328
|
+
status: string;
|
|
329
|
+
message: string;
|
|
330
|
+
}
|
|
331
|
+
type DeleteMessageOptions = DeleteMessageRequest;
|
|
332
|
+
|
|
333
|
+
interface FetchProfilePictureRequest {
|
|
334
|
+
number: ChatId;
|
|
335
|
+
}
|
|
336
|
+
interface FetchProfilePictureResponse {
|
|
337
|
+
profilePictureUrl: string;
|
|
338
|
+
}
|
|
339
|
+
type FetchProfilePictureOptions = FetchProfilePictureRequest;
|
|
340
|
+
|
|
341
|
+
interface FindAllChatsResponseItem {
|
|
342
|
+
id: ChatId;
|
|
343
|
+
jid: GroupJid | Jid;
|
|
344
|
+
phoneNumber: string;
|
|
345
|
+
name?: string;
|
|
346
|
+
labels?: string[];
|
|
347
|
+
createdAt: Date;
|
|
348
|
+
updatedAt: Date;
|
|
349
|
+
pushName?: string;
|
|
350
|
+
pictureUrl?: string;
|
|
351
|
+
}
|
|
352
|
+
type FindAllChatsResponse = FindAllChatsResponseItem[];
|
|
353
|
+
|
|
354
|
+
interface FindContactsRequest {
|
|
355
|
+
number: ChatId;
|
|
356
|
+
}
|
|
357
|
+
interface Contact$1 {
|
|
358
|
+
id: ChatId;
|
|
359
|
+
name: string;
|
|
360
|
+
pushname: string;
|
|
361
|
+
}
|
|
362
|
+
type FindContactsResponse = Contact$1[];
|
|
363
|
+
type FindContactsOptions = FindContactsRequest;
|
|
364
|
+
|
|
365
|
+
interface FindMessagesRequest {
|
|
366
|
+
where: {
|
|
367
|
+
key: {
|
|
368
|
+
id?: string;
|
|
369
|
+
fromMe?: boolean;
|
|
370
|
+
remoteJid?: string;
|
|
371
|
+
participants?: string;
|
|
372
|
+
messageTimestamp?: {
|
|
373
|
+
lte: string;
|
|
374
|
+
gte: string;
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
page?: number;
|
|
379
|
+
offset?: number;
|
|
380
|
+
}
|
|
381
|
+
interface ResponseMessage {
|
|
382
|
+
id: string;
|
|
383
|
+
key: {
|
|
384
|
+
id: string;
|
|
385
|
+
fromMe: boolean;
|
|
386
|
+
remoteJid: Jid;
|
|
387
|
+
senderLid?: string;
|
|
388
|
+
};
|
|
389
|
+
pushName?: string;
|
|
390
|
+
messageType: string;
|
|
391
|
+
message: MessageContent;
|
|
392
|
+
messageTimestamp: number;
|
|
393
|
+
instanceId: string;
|
|
394
|
+
source: string;
|
|
395
|
+
contextInfo?: ContextInfo | null;
|
|
396
|
+
MessageUpdate: MessageUpdate[];
|
|
397
|
+
}
|
|
398
|
+
interface FindMessagesResponse {
|
|
399
|
+
messages: {
|
|
400
|
+
total: number;
|
|
401
|
+
pages: number;
|
|
402
|
+
currentPage: number;
|
|
403
|
+
records: ResponseMessage[];
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
type FindMessagesOptions = FindMessagesRequest;
|
|
407
|
+
|
|
408
|
+
interface FindStatusMessageRequest {
|
|
409
|
+
number: ChatId;
|
|
410
|
+
}
|
|
411
|
+
type FindStatusMessageResponse = any[];
|
|
412
|
+
type FindStatusMessageOptions = FindStatusMessageRequest;
|
|
413
|
+
|
|
414
|
+
interface GetBase64FromMediaMessageRequest {
|
|
415
|
+
message: {
|
|
416
|
+
key: {
|
|
417
|
+
id: string;
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
convertToMp4?: boolean;
|
|
421
|
+
}
|
|
422
|
+
interface GetBase64FromMediaMessageResponse {
|
|
423
|
+
mediaType: string;
|
|
424
|
+
fileName: string;
|
|
425
|
+
size: {
|
|
426
|
+
fileLength: string;
|
|
427
|
+
};
|
|
428
|
+
mimetype: string;
|
|
429
|
+
base64: string;
|
|
430
|
+
buffer: string | null;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
interface Message$1 {
|
|
434
|
+
remoteJid: string;
|
|
435
|
+
fromMe: boolean;
|
|
436
|
+
id: string;
|
|
437
|
+
}
|
|
438
|
+
interface MarkAsReadRequest {
|
|
439
|
+
readMessages: Message$1[];
|
|
440
|
+
}
|
|
441
|
+
interface MarkAsReadResponse {
|
|
442
|
+
message: string;
|
|
443
|
+
read: "success" | "error";
|
|
444
|
+
}
|
|
445
|
+
type MarkAsReadOptions = MarkAsReadRequest;
|
|
446
|
+
|
|
447
|
+
interface Message {
|
|
448
|
+
remoteJid: string;
|
|
449
|
+
fromMe: boolean;
|
|
450
|
+
id: string;
|
|
451
|
+
}
|
|
452
|
+
interface MarkAsUnreadRequest {
|
|
453
|
+
lastMessage: Message[];
|
|
454
|
+
chat: ChatId;
|
|
455
|
+
}
|
|
456
|
+
interface MarkAsUnreadResponse {
|
|
457
|
+
message: string;
|
|
458
|
+
unread: "success" | "error";
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Options for presence configuration
|
|
463
|
+
*/
|
|
464
|
+
interface PresenceOptions {
|
|
465
|
+
/**
|
|
466
|
+
* Delay of the presence in milliseconds
|
|
467
|
+
*/
|
|
468
|
+
delay: number;
|
|
469
|
+
/**
|
|
470
|
+
* Presence state
|
|
471
|
+
* - `composing`: typing a message
|
|
472
|
+
* - `recording`: recording an audio
|
|
473
|
+
*/
|
|
474
|
+
presence: "composing" | "recording";
|
|
475
|
+
/**
|
|
476
|
+
* Chat number or JID to receive the presence
|
|
477
|
+
*/
|
|
478
|
+
number: string;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Input parameters for the presence method (excluding number)
|
|
482
|
+
*/
|
|
483
|
+
interface PresenceParams {
|
|
484
|
+
/**
|
|
485
|
+
* Delay of the presence in milliseconds
|
|
486
|
+
*/
|
|
487
|
+
delay: number;
|
|
488
|
+
/**
|
|
489
|
+
* Presence state
|
|
490
|
+
* - `composing`: typing a message
|
|
491
|
+
* - `recording`: recording an audio
|
|
492
|
+
*/
|
|
493
|
+
presence: "composing" | "recording";
|
|
494
|
+
/**
|
|
495
|
+
* Whether to wait until the presence is finished (duration)
|
|
496
|
+
* @deprecated This parameter is not used by the Evolution API
|
|
497
|
+
*/
|
|
498
|
+
waitUntilFinish?: boolean;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
interface UpdateMessageRequest {
|
|
502
|
+
number: ChatId;
|
|
503
|
+
messageId: MessageId;
|
|
504
|
+
message: string;
|
|
505
|
+
}
|
|
506
|
+
interface UpdateMessageResponse {
|
|
507
|
+
status: string;
|
|
508
|
+
message: string;
|
|
509
|
+
}
|
|
510
|
+
type UpdateMessageOptions = UpdateMessageRequest;
|
|
511
|
+
|
|
512
|
+
declare class ChatsModule {
|
|
513
|
+
private readonly api;
|
|
514
|
+
constructor(api: ApiService);
|
|
515
|
+
/**
|
|
516
|
+
* Checks if phone numbers are registered on WhatsApp
|
|
517
|
+
* @param numbers - Array of phone numbers to check
|
|
518
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
519
|
+
*/
|
|
520
|
+
check(numbers: CheckOptions, methodOptions?: MethodOptions): Promise<CheckResponse>;
|
|
521
|
+
/**
|
|
522
|
+
* Gets all chats
|
|
523
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
524
|
+
*/
|
|
525
|
+
findAll(methodOptions?: MethodOptions): Promise<FindAllChatsResponse>;
|
|
526
|
+
/**
|
|
527
|
+
* Updates presence status
|
|
528
|
+
* @param params - Presence parameters
|
|
529
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
530
|
+
*/
|
|
531
|
+
updatePresence(options: PresenceOptions, methodOptions?: MethodOptions): Promise<void>;
|
|
532
|
+
/**
|
|
533
|
+
* Marks messages as read
|
|
534
|
+
* @param options - Mark as read options
|
|
535
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
536
|
+
*/
|
|
537
|
+
markAsRead(options: MarkAsReadRequest, methodOptions?: MethodOptions): Promise<MarkAsReadResponse>;
|
|
538
|
+
/**
|
|
539
|
+
* Marks messages as unread
|
|
540
|
+
* @param options - Mark as unread options
|
|
541
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
542
|
+
*/
|
|
543
|
+
markAsUnread(options: MarkAsUnreadRequest, methodOptions?: MethodOptions): Promise<MarkAsUnreadResponse>;
|
|
544
|
+
/**
|
|
545
|
+
* Archives a chat
|
|
546
|
+
* @param options - Archive options
|
|
547
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
548
|
+
*/
|
|
549
|
+
archive(options: ArchiveRequest, methodOptions?: MethodOptions): Promise<ArchiveResponse>;
|
|
550
|
+
/**
|
|
551
|
+
* Deletes a message
|
|
552
|
+
* @param options - Delete message options
|
|
553
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
554
|
+
*/
|
|
555
|
+
deleteMessage(options: DeleteMessageRequest, methodOptions?: MethodOptions): Promise<DeleteMessageResponse>;
|
|
556
|
+
/**
|
|
557
|
+
* Fetches profile picture
|
|
558
|
+
* @param options - Fetch profile picture options
|
|
559
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
560
|
+
*/
|
|
561
|
+
fetchProfilePicture(options: FetchProfilePictureRequest, methodOptions?: MethodOptions): Promise<FetchProfilePictureResponse>;
|
|
562
|
+
/**
|
|
563
|
+
* Finds contacts
|
|
564
|
+
* @param options - Find contacts options
|
|
565
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
566
|
+
*/
|
|
567
|
+
findContacts(options: FindContactsRequest, methodOptions?: MethodOptions): Promise<FindContactsResponse>;
|
|
568
|
+
/**
|
|
569
|
+
* Finds messages
|
|
570
|
+
* @param options - Find messages options
|
|
571
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
572
|
+
*/
|
|
573
|
+
findMessages(options: FindMessagesRequest, methodOptions?: MethodOptions): Promise<FindMessagesResponse>;
|
|
574
|
+
/**
|
|
575
|
+
* Finds status messages
|
|
576
|
+
* @param options - Find status message options
|
|
577
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
578
|
+
*/
|
|
579
|
+
findStatusMessage(options: FindStatusMessageRequest, methodOptions?: MethodOptions): Promise<FindStatusMessageResponse>;
|
|
580
|
+
/**
|
|
581
|
+
* Updates a message
|
|
582
|
+
* @param options - Update message options
|
|
583
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
584
|
+
*/
|
|
585
|
+
updateMessage(options: UpdateMessageRequest, methodOptions?: MethodOptions): Promise<UpdateMessageResponse>;
|
|
586
|
+
/**
|
|
587
|
+
* Gets base64 representation of media from a message
|
|
588
|
+
* @param options - Get base64 from media message options
|
|
589
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
590
|
+
*/
|
|
591
|
+
getBase64FromMediaMessage(options: GetBase64FromMediaMessageRequest, methodOptions?: MethodOptions): Promise<GetBase64FromMediaMessageResponse>;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
interface AcceptInviteCodeRequest {
|
|
595
|
+
inviteCode: GroupInviteCode;
|
|
596
|
+
}
|
|
597
|
+
interface AcceptInviteCodeResponse {
|
|
598
|
+
status: string;
|
|
599
|
+
gid: string;
|
|
600
|
+
}
|
|
601
|
+
type AcceptInviteCodeOptions = AcceptInviteCodeRequest;
|
|
602
|
+
|
|
603
|
+
interface CreateGroupRequest {
|
|
604
|
+
subject: string;
|
|
605
|
+
participants: ChatId[];
|
|
606
|
+
}
|
|
607
|
+
interface CreateGroupResponse {
|
|
608
|
+
status: string;
|
|
609
|
+
gid: GroupJid;
|
|
610
|
+
}
|
|
611
|
+
type CreateGroupOptions = CreateGroupRequest;
|
|
612
|
+
|
|
613
|
+
interface FetchInviteCodeRequest {
|
|
614
|
+
groupJid: GroupJid;
|
|
615
|
+
}
|
|
616
|
+
interface FetchInviteCodeResponse {
|
|
617
|
+
code: string;
|
|
618
|
+
}
|
|
619
|
+
type FetchInviteCodeOptions = FetchInviteCodeRequest;
|
|
620
|
+
|
|
621
|
+
interface GroupResponse {
|
|
622
|
+
jid: GroupJid;
|
|
623
|
+
name: string;
|
|
624
|
+
pictureUrl?: string;
|
|
625
|
+
size: number;
|
|
626
|
+
subject: {
|
|
627
|
+
owner: Jid;
|
|
628
|
+
time: Date;
|
|
629
|
+
};
|
|
630
|
+
owner: {
|
|
631
|
+
jid: Jid;
|
|
632
|
+
phoneNumber: string;
|
|
633
|
+
};
|
|
634
|
+
createdAt: Date;
|
|
635
|
+
restrict: boolean;
|
|
636
|
+
announce: boolean;
|
|
637
|
+
}
|
|
638
|
+
interface ParticipantResponse {
|
|
639
|
+
id: string;
|
|
640
|
+
role: "admin" | "superadmin" | "member";
|
|
641
|
+
}
|
|
642
|
+
interface GroupWithParticipantsResponse extends GroupResponse {
|
|
643
|
+
participants: ParticipantResponse[];
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
type FindAllGroupsResponse = GroupResponse[];
|
|
647
|
+
type FindAllGroupsWithParticipantsResponse = GroupWithParticipantsResponse[];
|
|
648
|
+
|
|
649
|
+
interface FindGroupByInviteCodeResponse extends GroupWithParticipantsResponse {
|
|
650
|
+
isCommunity: boolean;
|
|
651
|
+
isCommunityAnnounce: boolean;
|
|
652
|
+
joinApprovalMode: boolean;
|
|
653
|
+
memberAddMode: boolean;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
type FindGroupByJidResponse = GroupWithParticipantsResponse;
|
|
657
|
+
|
|
658
|
+
interface FindMembersRequest {
|
|
659
|
+
groupJid: GroupJid;
|
|
660
|
+
}
|
|
661
|
+
interface Member {
|
|
662
|
+
id: Jid;
|
|
663
|
+
admin: string | null;
|
|
664
|
+
}
|
|
665
|
+
type FindMembersResponse = Member[];
|
|
666
|
+
type FindMembersOptions = FindMembersRequest;
|
|
667
|
+
|
|
668
|
+
interface LeaveRequest {
|
|
669
|
+
groupJid: GroupJid;
|
|
670
|
+
}
|
|
671
|
+
interface LeaveResponse {
|
|
672
|
+
status: string;
|
|
673
|
+
message: string;
|
|
674
|
+
}
|
|
675
|
+
type LeaveOptions = LeaveRequest;
|
|
676
|
+
|
|
677
|
+
interface RevokeInviteCodeRequest {
|
|
678
|
+
groupJid: GroupJid;
|
|
679
|
+
}
|
|
680
|
+
interface RevokeInviteCodeResponse {
|
|
681
|
+
status: string;
|
|
682
|
+
code: string;
|
|
683
|
+
}
|
|
684
|
+
type RevokeInviteCodeOptions = RevokeInviteCodeRequest;
|
|
685
|
+
|
|
686
|
+
interface SendGroupInviteRequest {
|
|
687
|
+
groupJid: GroupJid;
|
|
688
|
+
participantJid: Jid;
|
|
689
|
+
}
|
|
690
|
+
interface SendGroupInviteResponse {
|
|
691
|
+
status: string;
|
|
692
|
+
message: string;
|
|
693
|
+
}
|
|
694
|
+
type SendGroupInviteOptions = SendGroupInviteRequest;
|
|
695
|
+
|
|
696
|
+
interface ToggleEphemeralRequest {
|
|
697
|
+
groupJid: GroupJid;
|
|
698
|
+
duration: number;
|
|
699
|
+
}
|
|
700
|
+
interface ToggleEphemeralResponse {
|
|
701
|
+
status: string;
|
|
702
|
+
message: string;
|
|
703
|
+
}
|
|
704
|
+
type ToggleEphemeralOptions = ToggleEphemeralRequest;
|
|
705
|
+
|
|
706
|
+
interface UpdateDescriptionRequest {
|
|
707
|
+
groupJid: GroupJid;
|
|
708
|
+
description: string;
|
|
709
|
+
}
|
|
710
|
+
interface UpdateDescriptionResponse {
|
|
711
|
+
status: string;
|
|
712
|
+
message: string;
|
|
713
|
+
}
|
|
714
|
+
type UpdateDescriptionOptions = UpdateDescriptionRequest;
|
|
715
|
+
|
|
716
|
+
interface UpdateMembersRequest {
|
|
717
|
+
groupJid: GroupJid;
|
|
718
|
+
participants: Jid[];
|
|
719
|
+
action: "add" | "remove" | "promote" | "demote";
|
|
720
|
+
}
|
|
721
|
+
interface Participant {
|
|
722
|
+
id: Jid;
|
|
723
|
+
status: string;
|
|
724
|
+
}
|
|
725
|
+
type UpdateMembersResponse = Participant[];
|
|
726
|
+
type UpdateMembersOptions = UpdateMembersRequest;
|
|
727
|
+
|
|
728
|
+
interface UpdatePictureRequest$1 {
|
|
729
|
+
groupJid: GroupJid;
|
|
730
|
+
url: string;
|
|
731
|
+
}
|
|
732
|
+
interface UpdatePictureResponse$1 {
|
|
733
|
+
status: string;
|
|
734
|
+
message: string;
|
|
735
|
+
}
|
|
736
|
+
type UpdatePictureOptions$1 = UpdatePictureRequest$1;
|
|
737
|
+
|
|
738
|
+
interface UpdateSettingRequest {
|
|
739
|
+
groupJid: GroupJid;
|
|
740
|
+
setting: "announcement" | "locked";
|
|
741
|
+
value: boolean;
|
|
742
|
+
}
|
|
743
|
+
interface UpdateSettingResponse {
|
|
744
|
+
status: string;
|
|
745
|
+
message: string;
|
|
746
|
+
}
|
|
747
|
+
type UpdateSettingOptions = UpdateSettingRequest;
|
|
748
|
+
|
|
749
|
+
interface UpdateSubjectRequest {
|
|
750
|
+
groupJid: GroupJid;
|
|
751
|
+
subject: string;
|
|
752
|
+
}
|
|
753
|
+
interface UpdateSubjectResponse {
|
|
754
|
+
status: string;
|
|
755
|
+
message: string;
|
|
756
|
+
}
|
|
757
|
+
type UpdateSubjectOptions = UpdateSubjectRequest;
|
|
758
|
+
|
|
759
|
+
declare class GroupsModule {
|
|
760
|
+
private readonly api;
|
|
761
|
+
constructor(api: ApiService);
|
|
762
|
+
/**
|
|
763
|
+
* Gets all groups
|
|
764
|
+
* @param getParticipants - Whether to get participants
|
|
765
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
766
|
+
*/
|
|
767
|
+
findAll(getParticipants: false, methodOptions?: MethodOptions): Promise<FindAllGroupsResponse>;
|
|
768
|
+
findAll(getParticipants: true, methodOptions?: MethodOptions): Promise<FindAllGroupsWithParticipantsResponse>;
|
|
769
|
+
/**
|
|
770
|
+
* Gets a group by invite code
|
|
771
|
+
* @param inviteCode - The group invite code (not the URL)
|
|
772
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
773
|
+
*/
|
|
774
|
+
findByInviteCode(inviteCode: string | GroupInviteCode, methodOptions?: MethodOptions): Promise<FindGroupByInviteCodeResponse>;
|
|
775
|
+
/**
|
|
776
|
+
* Gets a group by JID
|
|
777
|
+
* @param groupJid - The group JID terminated with \@g.us
|
|
778
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
779
|
+
*/
|
|
780
|
+
findByJid(groupJid: string | GroupJid, methodOptions?: MethodOptions): Promise<FindGroupByJidResponse>;
|
|
781
|
+
create(options: CreateGroupRequest, methodOptions?: MethodOptions): Promise<CreateGroupResponse>;
|
|
782
|
+
updatePicture(options: UpdatePictureRequest$1, methodOptions?: MethodOptions): Promise<UpdatePictureResponse$1>;
|
|
783
|
+
updateSubject(options: UpdateSubjectRequest, methodOptions?: MethodOptions): Promise<UpdateSubjectResponse>;
|
|
784
|
+
updateDescription(options: UpdateDescriptionRequest, methodOptions?: MethodOptions): Promise<UpdateDescriptionResponse>;
|
|
785
|
+
fetchInviteCode(options: FetchInviteCodeRequest, methodOptions?: MethodOptions): Promise<FetchInviteCodeResponse>;
|
|
786
|
+
acceptInviteCode(options: AcceptInviteCodeRequest, methodOptions?: MethodOptions): Promise<AcceptInviteCodeResponse>;
|
|
787
|
+
revokeInviteCode(options: RevokeInviteCodeRequest, methodOptions?: MethodOptions): Promise<RevokeInviteCodeResponse>;
|
|
788
|
+
sendGroupInvite(options: SendGroupInviteRequest, methodOptions?: MethodOptions): Promise<SendGroupInviteResponse>;
|
|
789
|
+
findMembers(options: FindMembersRequest, methodOptions?: MethodOptions): Promise<FindMembersResponse>;
|
|
790
|
+
updateMembers(options: UpdateMembersRequest, methodOptions?: MethodOptions): Promise<UpdateMembersResponse>;
|
|
791
|
+
updateSetting(options: UpdateSettingRequest, methodOptions?: MethodOptions): Promise<UpdateSettingResponse>;
|
|
792
|
+
toggleEphemeral(options: ToggleEphemeralRequest, methodOptions?: MethodOptions): Promise<ToggleEphemeralResponse>;
|
|
793
|
+
leave(options: LeaveRequest, methodOptions?: MethodOptions): Promise<LeaveResponse>;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
interface ConnectRequest {
|
|
797
|
+
instanceName: string;
|
|
798
|
+
}
|
|
799
|
+
interface ConnectResponse {
|
|
800
|
+
pairingCode: string | null;
|
|
801
|
+
code: string;
|
|
802
|
+
base64: string;
|
|
803
|
+
count: number;
|
|
804
|
+
}
|
|
805
|
+
type ConnectOptions = ConnectRequest;
|
|
806
|
+
|
|
807
|
+
interface ConnectionStateRequest {
|
|
808
|
+
instanceName: string;
|
|
809
|
+
}
|
|
810
|
+
interface ConnectionStateResponse {
|
|
811
|
+
instance: {
|
|
812
|
+
instanceName: string;
|
|
813
|
+
state: ConnectionState;
|
|
814
|
+
};
|
|
815
|
+
}
|
|
816
|
+
type ConnectionStateOptions = ConnectionStateRequest;
|
|
817
|
+
|
|
818
|
+
interface WebhookConfig {
|
|
819
|
+
url?: string;
|
|
820
|
+
byEvents?: boolean;
|
|
821
|
+
base64?: boolean;
|
|
822
|
+
headers?: Record<string, string>;
|
|
823
|
+
events?: string[];
|
|
824
|
+
}
|
|
825
|
+
interface RabbitMQConfig {
|
|
826
|
+
enabled?: boolean;
|
|
827
|
+
events?: string[];
|
|
828
|
+
}
|
|
829
|
+
interface SQSConfig {
|
|
830
|
+
enabled?: boolean;
|
|
831
|
+
events?: string[];
|
|
832
|
+
}
|
|
833
|
+
interface CreateInstanceRequest {
|
|
834
|
+
instanceName: string;
|
|
835
|
+
token?: string;
|
|
836
|
+
qrcode?: boolean;
|
|
837
|
+
number?: string;
|
|
838
|
+
integration?: string;
|
|
839
|
+
rejectCall?: boolean;
|
|
840
|
+
msgCall?: string;
|
|
841
|
+
groupsIgnore?: boolean;
|
|
842
|
+
alwaysOnline?: boolean;
|
|
843
|
+
readMessages?: boolean;
|
|
844
|
+
readStatus?: boolean;
|
|
845
|
+
syncFullHistory?: boolean;
|
|
846
|
+
proxyHost?: string;
|
|
847
|
+
proxyPort?: string;
|
|
848
|
+
proxyProtocol?: "http" | "https";
|
|
849
|
+
proxyUsername?: string;
|
|
850
|
+
proxyPassword?: string;
|
|
851
|
+
webhook?: WebhookConfig;
|
|
852
|
+
rabbitmq?: RabbitMQConfig;
|
|
853
|
+
sqs?: SQSConfig;
|
|
854
|
+
chatwootAccountId?: number;
|
|
855
|
+
chatwootToken?: string;
|
|
856
|
+
chatwootUrl?: string;
|
|
857
|
+
chatwootSignMsg?: boolean;
|
|
858
|
+
chatwootReopenConversation?: boolean;
|
|
859
|
+
chatwootConversationPending?: boolean;
|
|
860
|
+
chatwootImportContacts?: boolean;
|
|
861
|
+
chatwootNameInbox?: string;
|
|
862
|
+
chatwootMergeBrazilContacts?: boolean;
|
|
863
|
+
chatwootImportMessages?: boolean;
|
|
864
|
+
chatwootDaysLimitImportMessages?: number;
|
|
865
|
+
chatwootOrganization?: string;
|
|
866
|
+
chatwootLogo?: string;
|
|
867
|
+
}
|
|
868
|
+
interface InstanceInfo {
|
|
869
|
+
instanceName: string;
|
|
870
|
+
instanceId: string;
|
|
871
|
+
webhook_wa_business?: string | null;
|
|
872
|
+
access_token_wa_business?: string;
|
|
873
|
+
status: string;
|
|
874
|
+
}
|
|
875
|
+
interface InstanceSettings {
|
|
876
|
+
rejectCall?: boolean;
|
|
877
|
+
msgCall?: string;
|
|
878
|
+
groupsIgnore?: boolean;
|
|
879
|
+
alwaysOnline?: boolean;
|
|
880
|
+
readMessages?: boolean;
|
|
881
|
+
readStatus?: boolean;
|
|
882
|
+
syncFullHistory?: boolean;
|
|
883
|
+
}
|
|
884
|
+
interface QRCodeInfo {
|
|
885
|
+
code: string;
|
|
886
|
+
base64: string;
|
|
887
|
+
}
|
|
888
|
+
interface CreateInstanceResponse {
|
|
889
|
+
instance: InstanceInfo;
|
|
890
|
+
hash: string;
|
|
891
|
+
settings?: InstanceSettings;
|
|
892
|
+
qrcode?: QRCodeInfo;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
interface DeleteRequest {
|
|
896
|
+
instanceName: string;
|
|
897
|
+
}
|
|
898
|
+
interface DeleteInstanceInfo {
|
|
899
|
+
instanceName: string;
|
|
900
|
+
status: string;
|
|
901
|
+
}
|
|
902
|
+
interface DeleteResponse {
|
|
903
|
+
status: "SUCCESS" | "ERROR";
|
|
904
|
+
error: boolean;
|
|
905
|
+
response: {
|
|
906
|
+
message: string;
|
|
907
|
+
};
|
|
908
|
+
}
|
|
909
|
+
type DeleteOptions = DeleteRequest;
|
|
910
|
+
|
|
911
|
+
interface Setting {
|
|
912
|
+
id: string;
|
|
913
|
+
rejectCall: boolean;
|
|
914
|
+
msgCall: string;
|
|
915
|
+
groupsIgnore: boolean;
|
|
916
|
+
alwaysOnline: boolean;
|
|
917
|
+
readMessages: boolean;
|
|
918
|
+
readStatus: boolean;
|
|
919
|
+
syncFullHistory: boolean;
|
|
920
|
+
wavoipToken: string;
|
|
921
|
+
createdAt: string;
|
|
922
|
+
updatedAt: string;
|
|
923
|
+
instanceId: string;
|
|
924
|
+
}
|
|
925
|
+
interface Count {
|
|
926
|
+
Message: number;
|
|
927
|
+
Contact: number;
|
|
928
|
+
Chat: number;
|
|
929
|
+
}
|
|
930
|
+
interface InstanceDetails {
|
|
931
|
+
id: string;
|
|
932
|
+
name: string;
|
|
933
|
+
connectionStatus: ConnectionState;
|
|
934
|
+
ownerJid: Jid;
|
|
935
|
+
profileName: string;
|
|
936
|
+
profilePicUrl: string | null;
|
|
937
|
+
profileStatus?: string;
|
|
938
|
+
integration: string;
|
|
939
|
+
number: string | null;
|
|
940
|
+
businessId: string | null;
|
|
941
|
+
token: string;
|
|
942
|
+
clientName: string;
|
|
943
|
+
disconnectionReasonCode: string | number | null;
|
|
944
|
+
disconnectionObject: unknown | null;
|
|
945
|
+
disconnectionAt: string | null;
|
|
946
|
+
createdAt: string;
|
|
947
|
+
updatedAt: string;
|
|
948
|
+
Chatwoot: unknown | null;
|
|
949
|
+
Proxy: unknown | null;
|
|
950
|
+
Rabbitmq: unknown | null;
|
|
951
|
+
Nats: unknown | null;
|
|
952
|
+
Sqs: unknown | null;
|
|
953
|
+
Websocket: unknown | null;
|
|
954
|
+
Setting: Setting | null;
|
|
955
|
+
_count: Count;
|
|
956
|
+
}
|
|
957
|
+
type FetchAllResponse = InstanceDetails[];
|
|
958
|
+
interface FetchAllRequest {
|
|
959
|
+
instanceName?: string;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
interface LogoutRequest {
|
|
963
|
+
instanceName: string;
|
|
964
|
+
}
|
|
965
|
+
interface LogoutInstanceInfo {
|
|
966
|
+
instanceName: string;
|
|
967
|
+
status: string;
|
|
968
|
+
}
|
|
969
|
+
interface LogoutResponse {
|
|
970
|
+
status: "SUCCESS" | "ERROR";
|
|
971
|
+
error: boolean;
|
|
972
|
+
response: {
|
|
973
|
+
message: string;
|
|
974
|
+
};
|
|
975
|
+
instance: LogoutInstanceInfo;
|
|
976
|
+
}
|
|
977
|
+
type LogoutOptions = LogoutRequest;
|
|
978
|
+
|
|
979
|
+
interface RestartRequest {
|
|
980
|
+
instanceName: string;
|
|
981
|
+
}
|
|
982
|
+
interface RestartResponse {
|
|
983
|
+
success: boolean;
|
|
984
|
+
message: string;
|
|
985
|
+
}
|
|
986
|
+
type RestartOptions = RestartRequest;
|
|
987
|
+
|
|
988
|
+
interface SetPresenceRequest {
|
|
989
|
+
instanceName?: string;
|
|
990
|
+
presence: "unavailable" | "available";
|
|
991
|
+
}
|
|
992
|
+
interface SetPresenceData {
|
|
993
|
+
instance: string;
|
|
994
|
+
presence: string;
|
|
995
|
+
}
|
|
996
|
+
interface SetPresenceResponse {
|
|
997
|
+
error: boolean;
|
|
998
|
+
message: string;
|
|
999
|
+
data: SetPresenceData;
|
|
1000
|
+
}
|
|
1001
|
+
type SetPresenceOptions = SetPresenceRequest;
|
|
1002
|
+
|
|
1003
|
+
declare class InstanceModule {
|
|
1004
|
+
private readonly api;
|
|
1005
|
+
constructor(api: ApiService);
|
|
1006
|
+
create(options: CreateInstanceRequest): Promise<CreateInstanceResponse>;
|
|
1007
|
+
connect(options: ConnectRequest, methodOptions?: MethodOptions): Promise<ConnectResponse>;
|
|
1008
|
+
connectionState(options: ConnectionStateRequest, methodOptions?: MethodOptions): Promise<ConnectionStateResponse>;
|
|
1009
|
+
logout(options: LogoutRequest, methodOptions?: MethodOptions): Promise<LogoutResponse>;
|
|
1010
|
+
delete(options: DeleteRequest): Promise<DeleteResponse>;
|
|
1011
|
+
restart(options: RestartRequest, methodOptions?: MethodOptions): Promise<RestartResponse>;
|
|
1012
|
+
fetchAll(options?: FetchAllRequest): Promise<FetchAllResponse>;
|
|
1013
|
+
setPresence(options: SetPresenceRequest, methodOptions?: MethodOptions): Promise<SetPresenceResponse>;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
type Media = string;
|
|
1017
|
+
declare const validatePhoneNumber: (value: string) => boolean;
|
|
1018
|
+
|
|
1019
|
+
interface BaseMessageOptions {
|
|
1020
|
+
/**
|
|
1021
|
+
* Number (with country code) or JID to receive the message
|
|
1022
|
+
*/
|
|
1023
|
+
number: string;
|
|
1024
|
+
/**
|
|
1025
|
+
* Time in milliseconds before sending message
|
|
1026
|
+
*/
|
|
1027
|
+
delay?: number;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
interface MediaMessageOptions extends BaseMessageOptions {
|
|
1031
|
+
mediatype: "audio" | "image" | "video" | "document";
|
|
1032
|
+
mimetype?: string;
|
|
1033
|
+
caption?: string;
|
|
1034
|
+
media: Media;
|
|
1035
|
+
fileName?: string;
|
|
1036
|
+
linkPreview?: boolean;
|
|
1037
|
+
mentionsEveryOne?: boolean;
|
|
1038
|
+
mentioned?: string[];
|
|
1039
|
+
quoted?: {
|
|
1040
|
+
key: {
|
|
1041
|
+
id: string;
|
|
1042
|
+
};
|
|
1043
|
+
message: {
|
|
1044
|
+
conversation: string;
|
|
1045
|
+
};
|
|
1046
|
+
};
|
|
1047
|
+
}
|
|
1048
|
+
interface MediaMessageResponse {
|
|
1049
|
+
key: {
|
|
1050
|
+
remoteJid: string;
|
|
1051
|
+
fromMe: boolean;
|
|
1052
|
+
id: string;
|
|
1053
|
+
};
|
|
1054
|
+
message: {
|
|
1055
|
+
[T in "audioMessage" | "imageMessage" | "videoMessage" | "documentMessage"]: {
|
|
1056
|
+
url: string;
|
|
1057
|
+
mimetype: string;
|
|
1058
|
+
fileSha256: string;
|
|
1059
|
+
fileLength: string;
|
|
1060
|
+
seconds: number;
|
|
1061
|
+
ptt: boolean;
|
|
1062
|
+
mediaKey: string;
|
|
1063
|
+
fileEncSha256: string;
|
|
1064
|
+
directPath: string;
|
|
1065
|
+
mediaKeyTimestamp: string;
|
|
1066
|
+
};
|
|
1067
|
+
};
|
|
1068
|
+
messageTimestamp: string;
|
|
1069
|
+
status: "PENDING" | "SUCCESS" | "FAILED";
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
interface AudioMessageOptions extends MediaMessageOptions {
|
|
1073
|
+
}
|
|
1074
|
+
interface AudioMessageResponse extends MediaMessageResponse {
|
|
1075
|
+
message: MediaMessageResponse["message"] & {
|
|
1076
|
+
audioMessage: MediaMessageResponse["message"]["audioMessage"];
|
|
1077
|
+
};
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
interface ContactMessageResponse {
|
|
1081
|
+
key: {
|
|
1082
|
+
remoteJid: string;
|
|
1083
|
+
fromMe?: boolean;
|
|
1084
|
+
id: string;
|
|
1085
|
+
};
|
|
1086
|
+
message: {
|
|
1087
|
+
contactMessage?: {
|
|
1088
|
+
displayName: string;
|
|
1089
|
+
vcard: string;
|
|
1090
|
+
contextInfo?: Record<string, unknown>;
|
|
1091
|
+
};
|
|
1092
|
+
contactsArrayMessage?: {
|
|
1093
|
+
contacts: {
|
|
1094
|
+
displayName: string;
|
|
1095
|
+
vcard: string;
|
|
1096
|
+
}[];
|
|
1097
|
+
};
|
|
1098
|
+
};
|
|
1099
|
+
messageTimestamp: string | number | Date;
|
|
1100
|
+
status?: string;
|
|
1101
|
+
}
|
|
1102
|
+
interface Contact {
|
|
1103
|
+
/**
|
|
1104
|
+
* Contact display name
|
|
1105
|
+
*/
|
|
1106
|
+
fullName?: string;
|
|
1107
|
+
/**
|
|
1108
|
+
* Contact phone number
|
|
1109
|
+
*/
|
|
1110
|
+
phoneNumber: string;
|
|
1111
|
+
/**
|
|
1112
|
+
* Contact organization
|
|
1113
|
+
*/
|
|
1114
|
+
organization?: string;
|
|
1115
|
+
/**
|
|
1116
|
+
* Contact email
|
|
1117
|
+
*/
|
|
1118
|
+
email?: string;
|
|
1119
|
+
/**
|
|
1120
|
+
* Contact website url
|
|
1121
|
+
*/
|
|
1122
|
+
url?: string;
|
|
1123
|
+
}
|
|
1124
|
+
type ContactMessageContact = Omit<Contact, "fullName"> & {
|
|
1125
|
+
/**
|
|
1126
|
+
* Contact display name
|
|
1127
|
+
*/
|
|
1128
|
+
fullName?: string;
|
|
1129
|
+
/**
|
|
1130
|
+
* WhatsApp user id (JID or WUID)
|
|
1131
|
+
*/
|
|
1132
|
+
wuid: string;
|
|
1133
|
+
};
|
|
1134
|
+
interface ContactMessageOptions extends BaseMessageOptions {
|
|
1135
|
+
/**
|
|
1136
|
+
* Contact list
|
|
1137
|
+
*/
|
|
1138
|
+
contact: [ContactMessageContact, ...ContactMessageContact[]];
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
interface DocumentMessageOptions extends MediaMessageOptions {
|
|
1142
|
+
}
|
|
1143
|
+
interface DocumentMessageResponse extends MediaMessageResponse {
|
|
1144
|
+
message: MediaMessageResponse["message"] & {
|
|
1145
|
+
documentMessage: MediaMessageResponse["message"]["documentMessage"];
|
|
1146
|
+
};
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
interface ImageMessageOptions extends MediaMessageOptions {
|
|
1150
|
+
}
|
|
1151
|
+
interface ImageMessageResponse extends MediaMessageResponse {
|
|
1152
|
+
message: MediaMessageResponse["message"] & {
|
|
1153
|
+
imageMessage: MediaMessageResponse["message"]["imageMessage"];
|
|
1154
|
+
};
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
interface Row {
|
|
1158
|
+
title: string;
|
|
1159
|
+
description?: string;
|
|
1160
|
+
rowId: string;
|
|
1161
|
+
}
|
|
1162
|
+
interface Section {
|
|
1163
|
+
title: string;
|
|
1164
|
+
rows: Row[];
|
|
1165
|
+
}
|
|
1166
|
+
interface ListMessageOptions {
|
|
1167
|
+
number: ChatId;
|
|
1168
|
+
buttonText: string;
|
|
1169
|
+
text: string;
|
|
1170
|
+
title?: string;
|
|
1171
|
+
footer?: string;
|
|
1172
|
+
sections: Section[];
|
|
1173
|
+
options?: {
|
|
1174
|
+
delay?: number;
|
|
1175
|
+
messageId?: MessageId;
|
|
1176
|
+
};
|
|
1177
|
+
}
|
|
1178
|
+
interface ListMessageResponse {
|
|
1179
|
+
key: {
|
|
1180
|
+
remoteJid: ChatId;
|
|
1181
|
+
fromMe: boolean;
|
|
1182
|
+
id: MessageId;
|
|
1183
|
+
};
|
|
1184
|
+
messageTimestamp: string;
|
|
1185
|
+
status: string;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
interface LocationMessageOptions extends BaseMessageOptions {
|
|
1189
|
+
/**
|
|
1190
|
+
* Location name
|
|
1191
|
+
*/
|
|
1192
|
+
name: string;
|
|
1193
|
+
/**
|
|
1194
|
+
* Location address
|
|
1195
|
+
*/
|
|
1196
|
+
address: string;
|
|
1197
|
+
/**
|
|
1198
|
+
* Location latitude
|
|
1199
|
+
*/
|
|
1200
|
+
latitude: number;
|
|
1201
|
+
/**
|
|
1202
|
+
* Location longitude
|
|
1203
|
+
*/
|
|
1204
|
+
longitude: number;
|
|
1205
|
+
}
|
|
1206
|
+
interface LocationMessageResponse {
|
|
1207
|
+
receiver: {
|
|
1208
|
+
phoneNumber: string;
|
|
1209
|
+
jid: Jid;
|
|
1210
|
+
};
|
|
1211
|
+
location: {
|
|
1212
|
+
latitude: number;
|
|
1213
|
+
longitude: number;
|
|
1214
|
+
name: string;
|
|
1215
|
+
address: string;
|
|
1216
|
+
};
|
|
1217
|
+
id: MessageId;
|
|
1218
|
+
timestamp: Date;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
interface ReactionMessageOptions {
|
|
1222
|
+
key: {
|
|
1223
|
+
remoteJid: ChatId;
|
|
1224
|
+
fromMe: boolean;
|
|
1225
|
+
id: MessageId;
|
|
1226
|
+
};
|
|
1227
|
+
reaction: string;
|
|
1228
|
+
}
|
|
1229
|
+
interface ReactionMessageResponse {
|
|
1230
|
+
key: {
|
|
1231
|
+
remoteJid: ChatId;
|
|
1232
|
+
fromMe: boolean;
|
|
1233
|
+
id: MessageId;
|
|
1234
|
+
};
|
|
1235
|
+
messageTimestamp: string;
|
|
1236
|
+
status: string;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
interface StatusMessageOptions {
|
|
1240
|
+
message: string;
|
|
1241
|
+
options?: {
|
|
1242
|
+
backgroundColor?: string;
|
|
1243
|
+
font?: number;
|
|
1244
|
+
};
|
|
1245
|
+
}
|
|
1246
|
+
interface StatusMessageResponse {
|
|
1247
|
+
key: {
|
|
1248
|
+
remoteJid: string;
|
|
1249
|
+
fromMe: boolean;
|
|
1250
|
+
id: string;
|
|
1251
|
+
};
|
|
1252
|
+
messageTimestamp: string;
|
|
1253
|
+
status: string;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
interface StickerMessageOptions extends BaseMessageOptions {
|
|
1257
|
+
/**
|
|
1258
|
+
* Image URL or file in base64
|
|
1259
|
+
*/
|
|
1260
|
+
sticker: Media;
|
|
1261
|
+
}
|
|
1262
|
+
interface StickerMessageResponse {
|
|
1263
|
+
receiver: {
|
|
1264
|
+
phoneNumber: string;
|
|
1265
|
+
jid: Jid;
|
|
1266
|
+
};
|
|
1267
|
+
media: {
|
|
1268
|
+
url: string;
|
|
1269
|
+
mimetype?: string;
|
|
1270
|
+
length: number;
|
|
1271
|
+
sha256: string;
|
|
1272
|
+
encryptedSha256: string;
|
|
1273
|
+
directPath: string;
|
|
1274
|
+
key: string;
|
|
1275
|
+
keyTimestamp: Date;
|
|
1276
|
+
};
|
|
1277
|
+
id: MessageId;
|
|
1278
|
+
timestamp: Date;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
interface ComponentParameter {
|
|
1282
|
+
type: "text" | "image" | "document" | "video";
|
|
1283
|
+
text?: string;
|
|
1284
|
+
image?: {
|
|
1285
|
+
link: string;
|
|
1286
|
+
};
|
|
1287
|
+
document?: {
|
|
1288
|
+
link: string;
|
|
1289
|
+
};
|
|
1290
|
+
video?: {
|
|
1291
|
+
link: string;
|
|
1292
|
+
};
|
|
1293
|
+
}
|
|
1294
|
+
interface Component {
|
|
1295
|
+
type: "body" | "header" | "button";
|
|
1296
|
+
sub_type?: "text" | "url" | "quick_reply";
|
|
1297
|
+
parameters: ComponentParameter[];
|
|
1298
|
+
}
|
|
1299
|
+
interface TemplateMessageOptions {
|
|
1300
|
+
number: ChatId;
|
|
1301
|
+
name: string;
|
|
1302
|
+
language: {
|
|
1303
|
+
code: string;
|
|
1304
|
+
};
|
|
1305
|
+
components: Component[];
|
|
1306
|
+
options?: {
|
|
1307
|
+
delay?: number;
|
|
1308
|
+
messageId?: MessageId;
|
|
1309
|
+
};
|
|
1310
|
+
}
|
|
1311
|
+
interface TemplateMessageResponse {
|
|
1312
|
+
key: {
|
|
1313
|
+
remoteJid: ChatId;
|
|
1314
|
+
fromMe: boolean;
|
|
1315
|
+
id: MessageId;
|
|
1316
|
+
};
|
|
1317
|
+
messageTimestamp: string;
|
|
1318
|
+
status: string;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
interface TextMessageOptions extends BaseMessageOptions {
|
|
1322
|
+
/**
|
|
1323
|
+
* Message text content
|
|
1324
|
+
*/
|
|
1325
|
+
text: string;
|
|
1326
|
+
/**
|
|
1327
|
+
* Whether link preview should be shown
|
|
1328
|
+
*/
|
|
1329
|
+
linkPreview?: boolean;
|
|
1330
|
+
}
|
|
1331
|
+
interface TextMessageResponse {
|
|
1332
|
+
key: {
|
|
1333
|
+
remoteJid: string;
|
|
1334
|
+
fromMe: boolean;
|
|
1335
|
+
id: string;
|
|
1336
|
+
};
|
|
1337
|
+
pushName: string;
|
|
1338
|
+
status: string;
|
|
1339
|
+
message: {
|
|
1340
|
+
conversation: string;
|
|
1341
|
+
};
|
|
1342
|
+
contextInfo: null;
|
|
1343
|
+
messageType: string;
|
|
1344
|
+
messageTimestamp: number;
|
|
1345
|
+
instanceId: string;
|
|
1346
|
+
source: string;
|
|
1347
|
+
receiver: {
|
|
1348
|
+
phoneNumber: string;
|
|
1349
|
+
jid: Jid;
|
|
1350
|
+
};
|
|
1351
|
+
messageId: MessageId;
|
|
1352
|
+
timestamp: Date;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
interface VideoMessageOptions extends MediaMessageOptions {
|
|
1356
|
+
}
|
|
1357
|
+
interface VideoMessageResponse extends MediaMessageResponse {
|
|
1358
|
+
message: MediaMessageResponse["message"] & {
|
|
1359
|
+
videoMessage: MediaMessageResponse["message"]["videoMessage"];
|
|
1360
|
+
};
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
interface VoiceMessageOptions extends BaseMessageOptions {
|
|
1364
|
+
/**
|
|
1365
|
+
* Audio URL or file in base64
|
|
1366
|
+
*/
|
|
1367
|
+
audio: Media;
|
|
1368
|
+
/**
|
|
1369
|
+
* Encode audio into WhatsApp default format (allows audio to be sped up)
|
|
1370
|
+
* @default true
|
|
1371
|
+
*/
|
|
1372
|
+
encoding?: boolean;
|
|
1373
|
+
}
|
|
1374
|
+
interface VoiceMessageResponse {
|
|
1375
|
+
receiver: {
|
|
1376
|
+
phoneNumber: string;
|
|
1377
|
+
jid: Jid;
|
|
1378
|
+
};
|
|
1379
|
+
media: {
|
|
1380
|
+
url: string;
|
|
1381
|
+
mimetype: string;
|
|
1382
|
+
length: number;
|
|
1383
|
+
durationInSeconds: number;
|
|
1384
|
+
sha256: string;
|
|
1385
|
+
encryptedSha256: string;
|
|
1386
|
+
directPath: string;
|
|
1387
|
+
/**
|
|
1388
|
+
* Indicates whether the audio message is a push-to-talk (PTT) message
|
|
1389
|
+
*/
|
|
1390
|
+
isPtt?: boolean;
|
|
1391
|
+
key: string;
|
|
1392
|
+
keyTimestamp: Date;
|
|
1393
|
+
waveform?: string | null;
|
|
1394
|
+
};
|
|
1395
|
+
messageId: MessageId;
|
|
1396
|
+
timestamp: Date;
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
declare class MessagesModule {
|
|
1400
|
+
private readonly api;
|
|
1401
|
+
constructor(api: ApiService);
|
|
1402
|
+
/**
|
|
1403
|
+
* Sends a text message
|
|
1404
|
+
* @param options - Text message options
|
|
1405
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
1406
|
+
*/
|
|
1407
|
+
sendText(options: TextMessageOptions, methodOptions?: MethodOptions): Promise<TextMessageResponse>;
|
|
1408
|
+
/**
|
|
1409
|
+
* Sends an image
|
|
1410
|
+
* @param options - Image message options
|
|
1411
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
1412
|
+
*/
|
|
1413
|
+
sendImage(options: ImageMessageOptions, methodOptions?: MethodOptions): Promise<ImageMessageResponse>;
|
|
1414
|
+
/**
|
|
1415
|
+
* Sends a video
|
|
1416
|
+
* @param options - Video message options
|
|
1417
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
1418
|
+
*/
|
|
1419
|
+
sendVideo(options: VideoMessageOptions, methodOptions?: MethodOptions): Promise<VideoMessageResponse>;
|
|
1420
|
+
/**
|
|
1421
|
+
* Sends a document
|
|
1422
|
+
* @param options - Document message options
|
|
1423
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
1424
|
+
*/
|
|
1425
|
+
sendDocument(options: DocumentMessageOptions, methodOptions?: MethodOptions): Promise<DocumentMessageResponse>;
|
|
1426
|
+
/**
|
|
1427
|
+
* Sends an audio
|
|
1428
|
+
* @param options - Audio message options
|
|
1429
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
1430
|
+
*/
|
|
1431
|
+
sendAudio(options: AudioMessageOptions, methodOptions?: MethodOptions): Promise<AudioMessageResponse>;
|
|
1432
|
+
/**
|
|
1433
|
+
* Sends a voice message
|
|
1434
|
+
* @param options - Voice message options
|
|
1435
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
1436
|
+
*/
|
|
1437
|
+
sendVoice(options: VoiceMessageOptions, methodOptions?: MethodOptions): Promise<VoiceMessageResponse>;
|
|
1438
|
+
/**
|
|
1439
|
+
* Sends a sticker
|
|
1440
|
+
* @param options - Sticker message options
|
|
1441
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
1442
|
+
*/
|
|
1443
|
+
sendSticker(options: StickerMessageOptions, methodOptions?: MethodOptions): Promise<StickerMessageResponse>;
|
|
1444
|
+
/**
|
|
1445
|
+
* Sends a location
|
|
1446
|
+
* @param options - Location message options
|
|
1447
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
1448
|
+
*/
|
|
1449
|
+
sendLocation(options: LocationMessageOptions, methodOptions?: MethodOptions): Promise<LocationMessageResponse>;
|
|
1450
|
+
/**
|
|
1451
|
+
* Sends a contact
|
|
1452
|
+
* @param options - Contact message options
|
|
1453
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
1454
|
+
*/
|
|
1455
|
+
sendContact(options: ContactMessageOptions, methodOptions?: MethodOptions): Promise<ContactMessageResponse>;
|
|
1456
|
+
/**
|
|
1457
|
+
* Sends a reaction
|
|
1458
|
+
* @param options - Reaction message options
|
|
1459
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
1460
|
+
*/
|
|
1461
|
+
sendReaction(options: ReactionMessageOptions, methodOptions?: MethodOptions): Promise<ReactionMessageResponse>;
|
|
1462
|
+
/**
|
|
1463
|
+
* Sends a template
|
|
1464
|
+
* @param options - Template message options
|
|
1465
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
1466
|
+
*/
|
|
1467
|
+
sendTemplate(options: TemplateMessageOptions, methodOptions?: MethodOptions): Promise<TemplateMessageResponse>;
|
|
1468
|
+
/**
|
|
1469
|
+
* Sends a status
|
|
1470
|
+
* @param options - Status message options
|
|
1471
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
1472
|
+
*/
|
|
1473
|
+
sendStatus(options: StatusMessageOptions, methodOptions?: MethodOptions): Promise<StatusMessageResponse>;
|
|
1474
|
+
/**
|
|
1475
|
+
* Sends a list
|
|
1476
|
+
* @param options - List message options
|
|
1477
|
+
* @param methodOptions - Method-specific options (instance override)
|
|
1478
|
+
*/
|
|
1479
|
+
sendList(options: ListMessageOptions, methodOptions?: MethodOptions): Promise<ListMessageResponse>;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
interface FetchBusinessProfileRequest {
|
|
1483
|
+
number: string;
|
|
1484
|
+
}
|
|
1485
|
+
interface BusinessHoursConfig {
|
|
1486
|
+
day_of_week: "sun" | "mon" | "tue" | "wed" | "thu" | "fri" | "sat";
|
|
1487
|
+
mode: "open_24h" | "specific_hours" | "closed";
|
|
1488
|
+
open_time?: string;
|
|
1489
|
+
close_time?: string;
|
|
1490
|
+
}
|
|
1491
|
+
interface BusinessHours {
|
|
1492
|
+
timezone: string;
|
|
1493
|
+
business_config: BusinessHoursConfig[];
|
|
1494
|
+
}
|
|
1495
|
+
interface FetchBusinessProfileResponse {
|
|
1496
|
+
isBusiness: boolean;
|
|
1497
|
+
wid: string;
|
|
1498
|
+
description: string;
|
|
1499
|
+
website: string[];
|
|
1500
|
+
category: string;
|
|
1501
|
+
business_hours: BusinessHours;
|
|
1502
|
+
}
|
|
1503
|
+
type FetchBusinessProfileOptions = FetchBusinessProfileRequest;
|
|
1504
|
+
|
|
1505
|
+
type PrivacySetting = "all" | "contacts" | "contact_blacklist" | "none";
|
|
1506
|
+
interface FetchPrivacySettingsResponse {
|
|
1507
|
+
online: PrivacySetting;
|
|
1508
|
+
profile: PrivacySetting;
|
|
1509
|
+
status: PrivacySetting;
|
|
1510
|
+
readreceipts: PrivacySetting;
|
|
1511
|
+
last: PrivacySetting;
|
|
1512
|
+
groupadd: PrivacySetting;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
interface FetchProfileRequest {
|
|
1516
|
+
number: string;
|
|
1517
|
+
}
|
|
1518
|
+
interface ProfileStatus {
|
|
1519
|
+
status: string;
|
|
1520
|
+
setAt: string;
|
|
1521
|
+
}
|
|
1522
|
+
interface FetchProfileResponse {
|
|
1523
|
+
wuid: string;
|
|
1524
|
+
name: string | null;
|
|
1525
|
+
numberExists: boolean;
|
|
1526
|
+
picture?: string;
|
|
1527
|
+
status?: ProfileStatus;
|
|
1528
|
+
isBusiness: boolean;
|
|
1529
|
+
description?: string;
|
|
1530
|
+
}
|
|
1531
|
+
type FetchProfileOptions = FetchProfileRequest;
|
|
1532
|
+
|
|
1533
|
+
interface RemovePictureResponse {
|
|
1534
|
+
status: string;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
interface UpdateNameRequest {
|
|
1538
|
+
name: string;
|
|
1539
|
+
}
|
|
1540
|
+
interface UpdateNameResponse {
|
|
1541
|
+
update: "success" | "error";
|
|
1542
|
+
}
|
|
1543
|
+
type UpdateNameOptions = UpdateNameRequest;
|
|
1544
|
+
|
|
1545
|
+
interface UpdatePictureRequest {
|
|
1546
|
+
picture: string;
|
|
1547
|
+
}
|
|
1548
|
+
interface UpdatePictureResponse {
|
|
1549
|
+
update: "success" | "error";
|
|
1550
|
+
}
|
|
1551
|
+
type UpdatePictureOptions = UpdatePictureRequest;
|
|
1552
|
+
|
|
1553
|
+
interface UpdatePrivacySettingsRequest {
|
|
1554
|
+
online?: PrivacySetting;
|
|
1555
|
+
profile?: PrivacySetting;
|
|
1556
|
+
status?: PrivacySetting;
|
|
1557
|
+
readreceipts?: PrivacySetting;
|
|
1558
|
+
last?: PrivacySetting;
|
|
1559
|
+
groupadd?: PrivacySetting;
|
|
1560
|
+
}
|
|
1561
|
+
interface UpdatePrivacySettingsResponse {
|
|
1562
|
+
status: string;
|
|
1563
|
+
}
|
|
1564
|
+
type UpdatePrivacySettingsOptions = UpdatePrivacySettingsRequest;
|
|
1565
|
+
|
|
1566
|
+
interface UpdateStatusRequest {
|
|
1567
|
+
status: string;
|
|
1568
|
+
}
|
|
1569
|
+
interface UpdateStatusResponse {
|
|
1570
|
+
status: string;
|
|
1571
|
+
}
|
|
1572
|
+
type UpdateStatusOptions = UpdateStatusRequest;
|
|
1573
|
+
|
|
1574
|
+
declare class ProfileModule {
|
|
1575
|
+
private readonly api;
|
|
1576
|
+
constructor(api: ApiService);
|
|
1577
|
+
fetchBusinessProfile(options: FetchBusinessProfileRequest, methodOptions?: MethodOptions): Promise<FetchBusinessProfileResponse>;
|
|
1578
|
+
fetchProfile(options: FetchProfileRequest, methodOptions?: MethodOptions): Promise<FetchProfileResponse>;
|
|
1579
|
+
updateName(options: UpdateNameRequest, methodOptions?: MethodOptions): Promise<UpdateNameResponse>;
|
|
1580
|
+
updateStatus(options: UpdateStatusRequest, methodOptions?: MethodOptions): Promise<UpdateStatusResponse>;
|
|
1581
|
+
updatePicture(options: UpdatePictureRequest, methodOptions?: MethodOptions): Promise<UpdatePictureResponse>;
|
|
1582
|
+
removePicture(methodOptions?: MethodOptions): Promise<RemovePictureResponse>;
|
|
1583
|
+
fetchPrivacySettings(methodOptions?: MethodOptions): Promise<FetchPrivacySettingsResponse>;
|
|
1584
|
+
updatePrivacySettings(options: UpdatePrivacySettingsRequest, methodOptions?: MethodOptions): Promise<UpdatePrivacySettingsResponse>;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
interface FindResponse$1 {
|
|
1588
|
+
rejectCall: boolean;
|
|
1589
|
+
msgCall: string;
|
|
1590
|
+
groupsIgnore: boolean;
|
|
1591
|
+
alwaysOnline: boolean;
|
|
1592
|
+
readMessages: boolean;
|
|
1593
|
+
readStatus: boolean;
|
|
1594
|
+
syncFullHistory: boolean;
|
|
1595
|
+
wavoipToken: string;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
interface SetRequest$1 {
|
|
1599
|
+
rejectCall?: boolean;
|
|
1600
|
+
msgCall?: string;
|
|
1601
|
+
groupsIgnore: boolean;
|
|
1602
|
+
alwaysOnline: boolean;
|
|
1603
|
+
readMessages: boolean;
|
|
1604
|
+
readStatus: boolean;
|
|
1605
|
+
syncFullHistory: boolean;
|
|
1606
|
+
wavoipToken?: string;
|
|
1607
|
+
}
|
|
1608
|
+
interface SetResponse$1 {
|
|
1609
|
+
message: string;
|
|
1610
|
+
}
|
|
1611
|
+
type SetOptions$1 = SetRequest$1;
|
|
1612
|
+
|
|
1613
|
+
declare class SettingsModule {
|
|
1614
|
+
private readonly api;
|
|
1615
|
+
constructor(api: ApiService);
|
|
1616
|
+
set(options: SetRequest$1, methodOptions?: MethodOptions): Promise<SetResponse$1>;
|
|
1617
|
+
find(methodOptions?: MethodOptions): Promise<FindResponse$1>;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
interface FindResponse {
|
|
1621
|
+
webhook: string;
|
|
1622
|
+
enabled: boolean;
|
|
1623
|
+
webhook_by_events: boolean;
|
|
1624
|
+
events: string[];
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
declare enum WebhookEvent {
|
|
1628
|
+
APPLICATION_STARTUP = "application.startup",
|
|
1629
|
+
QRCODE_UPDATED = "qrcode.updated",
|
|
1630
|
+
CONNECTION_UPDATE = "connection.update",
|
|
1631
|
+
MESSAGES_SET = "messages.set",
|
|
1632
|
+
MESSAGES_UPSERT = "messages.upsert",
|
|
1633
|
+
MESSAGES_UPDATE = "messages.update",
|
|
1634
|
+
MESSAGES_DELETE = "messages.delete",
|
|
1635
|
+
SEND_MESSAGE = "send.message",
|
|
1636
|
+
CONTACTS_SET = "contacts.set",
|
|
1637
|
+
CONTACTS_UPSERT = "contacts.upsert",
|
|
1638
|
+
CONTACTS_UPDATE = "contacts.update",
|
|
1639
|
+
PRESENCE_UPDATE = "presence.update",
|
|
1640
|
+
CHATS_SET = "chats.set",
|
|
1641
|
+
CHATS_UPDATE = "chats.update",
|
|
1642
|
+
CHATS_UPSERT = "chats.upsert",
|
|
1643
|
+
CHATS_DELETE = "chats.delete",
|
|
1644
|
+
GROUPS_UPSERT = "groups.upsert",
|
|
1645
|
+
GROUPS_UPDATE = "groups.update",
|
|
1646
|
+
GROUP_PARTICIPANTS_UPDATE = "group.participants.update",
|
|
1647
|
+
NEW_TOKEN = "new.jwt"
|
|
1648
|
+
}
|
|
1649
|
+
declare enum WebhookEventSetup {
|
|
1650
|
+
APPLICATION_STARTUP = "APPLICATION_STARTUP",
|
|
1651
|
+
QRCODE_UPDATED = "QRCODE_UPDATED",
|
|
1652
|
+
CONNECTION_UPDATE = "CONNECTION_UPDATE",
|
|
1653
|
+
MESSAGES_SET = "MESSAGES_SET",
|
|
1654
|
+
MESSAGES_UPSERT = "MESSAGES_UPSERT",
|
|
1655
|
+
MESSAGES_UPDATE = "MESSAGES_UPDATE",
|
|
1656
|
+
MESSAGES_DELETE = "MESSAGES_DELETE",
|
|
1657
|
+
SEND_MESSAGE = "SEND_MESSAGE",
|
|
1658
|
+
CONTACTS_SET = "CONTACTS_SET",
|
|
1659
|
+
CONTACTS_UPSERT = "CONTACTS_UPSERT",
|
|
1660
|
+
CONTACTS_UPDATE = "CONTACTS_UPDATE",
|
|
1661
|
+
PRESENCE_UPDATE = "PRESENCE_UPDATE",
|
|
1662
|
+
CHATS_SET = "CHATS_SET",
|
|
1663
|
+
CHATS_UPDATE = "CHATS_UPDATE",
|
|
1664
|
+
CHATS_UPSERT = "CHATS_UPSERT",
|
|
1665
|
+
CHATS_DELETE = "CHATS_DELETE",
|
|
1666
|
+
GROUPS_UPSERT = "GROUPS_UPSERT",
|
|
1667
|
+
GROUPS_UPDATE = "GROUPS_UPDATE",
|
|
1668
|
+
GROUP_PARTICIPANTS_UPDATE = "GROUP_PARTICIPANTS_UPDATE",
|
|
1669
|
+
NEW_TOKEN = "NEW_TOKEN",
|
|
1670
|
+
MESSAGES_EDITED = "MESSAGES_EDITED",
|
|
1671
|
+
LABELS_EDIT = "LABELS_EDIT",
|
|
1672
|
+
LABELS_ASSOCIATION = "LABELS_ASSOCIATION",
|
|
1673
|
+
CALL = "CALL",
|
|
1674
|
+
TYPEBOT_START = "TYPEBOT_START",
|
|
1675
|
+
TYPEBOT_CHANGE_STATUS = "TYPEBOT_CHANGE_STATUS",
|
|
1676
|
+
ERRORS = "ERRORS",
|
|
1677
|
+
ERRORS_WEBHOOK = "ERRORS_WEBHOOK"
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
interface SetRequest {
|
|
1681
|
+
enabled: boolean;
|
|
1682
|
+
url: string;
|
|
1683
|
+
webhookByEvents: boolean;
|
|
1684
|
+
webhookBase64: boolean;
|
|
1685
|
+
events: WebhookEventSetup[];
|
|
1686
|
+
}
|
|
1687
|
+
interface SetResponse {
|
|
1688
|
+
message: string;
|
|
1689
|
+
}
|
|
1690
|
+
type SetOptions = SetRequest;
|
|
1691
|
+
|
|
1692
|
+
declare class WebhookModule {
|
|
1693
|
+
private readonly api;
|
|
1694
|
+
constructor(api: ApiService);
|
|
1695
|
+
set(options: SetRequest, methodOptions?: MethodOptions): Promise<SetResponse>;
|
|
1696
|
+
find(methodOptions?: MethodOptions): Promise<FindResponse>;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
declare class EvolutionApiError extends Error {
|
|
1700
|
+
readonly statusCode?: number;
|
|
1701
|
+
readonly details?: unknown;
|
|
1702
|
+
constructor(message: string, cause?: unknown, statusCode?: number);
|
|
1703
|
+
/**
|
|
1704
|
+
* Returns a user-friendly string representation of the error
|
|
1705
|
+
*/
|
|
1706
|
+
toString(): string;
|
|
1707
|
+
/**
|
|
1708
|
+
* Returns a JSON representation suitable for logging
|
|
1709
|
+
*/
|
|
1710
|
+
toJSON(): object;
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
/**
|
|
1714
|
+
* Get phone number from JID
|
|
1715
|
+
* @param jid - JID (remote JID)
|
|
1716
|
+
*/
|
|
1717
|
+
declare function phoneNumberFromJid(jid: string): libphonenumber_js.E164Number;
|
|
1718
|
+
|
|
1719
|
+
interface PollMessageOptions extends BaseMessageOptions {
|
|
1720
|
+
/**
|
|
1721
|
+
* Name of the poll
|
|
1722
|
+
*/
|
|
1723
|
+
name: string;
|
|
1724
|
+
/**
|
|
1725
|
+
* Whether multiple options can be selected
|
|
1726
|
+
* @default false
|
|
1727
|
+
*/
|
|
1728
|
+
multiple?: boolean;
|
|
1729
|
+
/**
|
|
1730
|
+
* Poll options
|
|
1731
|
+
*/
|
|
1732
|
+
options: string[];
|
|
1733
|
+
}
|
|
1734
|
+
interface PollMessageResponse {
|
|
1735
|
+
receiver: {
|
|
1736
|
+
phoneNumber: string;
|
|
1737
|
+
jid: Jid;
|
|
1738
|
+
};
|
|
1739
|
+
poll: {
|
|
1740
|
+
name: string;
|
|
1741
|
+
options: string[];
|
|
1742
|
+
multiple: boolean;
|
|
1743
|
+
};
|
|
1744
|
+
id: MessageId;
|
|
1745
|
+
timestamp: Date;
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
declare class EvolutionClient {
|
|
1749
|
+
options: ClientOptions;
|
|
1750
|
+
/**
|
|
1751
|
+
* API service for directly interacting with the Evolution API (no specific typings)
|
|
1752
|
+
*/
|
|
1753
|
+
readonly api: ApiService;
|
|
1754
|
+
/**
|
|
1755
|
+
* Find and manage chats, send presences and check numbers
|
|
1756
|
+
*/
|
|
1757
|
+
readonly chats: ChatsModule;
|
|
1758
|
+
/**
|
|
1759
|
+
* Find and manage groups
|
|
1760
|
+
*/
|
|
1761
|
+
readonly groups: GroupsModule;
|
|
1762
|
+
/**
|
|
1763
|
+
* Send messages
|
|
1764
|
+
*/
|
|
1765
|
+
readonly messages: MessagesModule;
|
|
1766
|
+
/**
|
|
1767
|
+
* Create and manage instances
|
|
1768
|
+
*/
|
|
1769
|
+
readonly instances: InstanceModule;
|
|
1770
|
+
/**
|
|
1771
|
+
* Manage profile settings
|
|
1772
|
+
*/
|
|
1773
|
+
readonly profile: ProfileModule;
|
|
1774
|
+
/**
|
|
1775
|
+
* Manage webhooks
|
|
1776
|
+
*/
|
|
1777
|
+
readonly webhook: WebhookModule;
|
|
1778
|
+
/**
|
|
1779
|
+
* Manage settings
|
|
1780
|
+
*/
|
|
1781
|
+
readonly settings: SettingsModule;
|
|
1782
|
+
/**
|
|
1783
|
+
* Evolution Client - API client for interacting with the Evolution API
|
|
1784
|
+
* @param options - Client options
|
|
1785
|
+
*/
|
|
1786
|
+
constructor(options: ClientOptions);
|
|
1787
|
+
setInstance(instance: string): void;
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
export { type APIRequestInit, type AcceptInviteCodeOptions, type AcceptInviteCodeResponse, type ArchiveOptions, type ArchiveResponse, type AudioMessage, type AudioMessageOptions, type AudioMessageResponse, type BaseMessageOptions, type BusinessHours, type BusinessHoursConfig, ChatId, type CheckOptions, type CheckResponse, type ClientOptions, type ConnectOptions, type ConnectRequest, type ConnectResponse, ConnectionState, type ConnectionStateOptions, type ConnectionStateRequest, type ConnectionStateResponse, type ConnectionUpdatePayload, type ContactMessage, type ContactMessageContact, type ContactMessageOptions, type ContactMessageResponse, type ContactPayload, type ContextInfo, type Count, type CreateGroupOptions, type CreateGroupResponse, type CreateInstanceRequest, type CreateInstanceResponse, type DeleteInstanceInfo, type DeleteMessageOptions, type DeleteMessageResponse, type DeleteOptions, type DeleteRequest, type DeleteResponse, type DeviceListMetadata, type DisappearingMode, type DocumentMessage, type DocumentMessageOptions, type DocumentMessageResponse, type EphemeralMessage, EvolutionApiError, EvolutionClient, type ExtendedTextMessage, type FetchAllRequest, type FetchAllResponse, type FetchBusinessProfileOptions, type FetchBusinessProfileRequest, type FetchBusinessProfileResponse, type FetchInviteCodeOptions, type FetchInviteCodeResponse, type FetchPrivacySettingsResponse, type FetchProfileOptions, type FetchProfilePictureOptions, type FetchProfilePictureResponse, type FetchProfileRequest, type FetchProfileResponse, type FindAllChatsResponse, type FindAllGroupsResponse, type FindAllGroupsWithParticipantsResponse, type FindContactsOptions, type FindContactsResponse, type FindGroupByInviteCodeResponse, type FindGroupByJidResponse, type FindMembersOptions, type FindMembersResponse, type FindMessagesOptions, type FindMessagesResponse, type FindResponse$1 as FindSettingsResponse, type FindStatusMessageOptions, type FindStatusMessageResponse, type FindResponse as FindWebhookResponse, type GetBase64FromMediaMessageRequest, type GetBase64FromMediaMessageResponse, GroupJid, type GroupResponse, type GroupWithParticipantsResponse, type ImageMessage, type ImageMessageOptions, type ImageMessageResponse, type Instance, type InstanceDetails, type InstanceInfo, type InstanceSettings, Jid, type LeaveOptions, type LeaveResponse, type ListMessageOptions, type ListMessageResponse, type LocationMessageOptions, type LocationMessageResponse, type LogoutInstanceInfo, type LogoutOptions, type LogoutRequest, type LogoutResponse, type MarkAsReadOptions, type MarkAsReadResponse, type Message$2 as Message, type MessageContent, type MessageContextInfo, MessageId, type MessagePayload, MessageType, type MessageUpdate, MessageUpdateStatus, type MethodOptions, type ParticipantResponse, type PollMessageOptions, type PollMessageResponse, type PresenceOptions, type PresenceParams, type PrivacySetting, type ProfileStatus, type QRCodeInfo, type RabbitMQConfig, type ReactionMessage, type ReactionMessageOptions, type ReactionMessageResponse, type RemovePictureResponse, type RestartOptions, type RestartRequest, type RestartResponse, type RevokeInviteCodeOptions, type RevokeInviteCodeResponse, type SQSConfig, type SendGroupInviteOptions, type SendGroupInviteResponse, type SetPresenceData, type SetPresenceOptions, type SetPresenceRequest, type SetPresenceResponse, type SetOptions$1 as SetSettingsOptions, type SetResponse$1 as SetSettingsResponse, type SetOptions as SetWebhookOptions, type SetResponse as SetWebhookResponse, type Setting, type StatusMessageOptions, type StatusMessageResponse, type StickerMessage, type StickerMessageOptions, type StickerMessageResponse, type TemplateMessageOptions, type TemplateMessageResponse, type TextMessageOptions, type TextMessageResponse, type ToggleEphemeralOptions, type ToggleEphemeralResponse, type UpdateDescriptionOptions, type UpdateDescriptionResponse, type UpdatePictureOptions$1 as UpdateGroupPictureOptions, type UpdatePictureResponse$1 as UpdateGroupPictureResponse, type UpdateMembersOptions, type UpdateMembersResponse, type UpdateMessageOptions, type UpdateMessageResponse, type UpdateNameOptions, type UpdateNameRequest, type UpdateNameResponse, type UpdatePrivacySettingsOptions, type UpdatePrivacySettingsRequest, type UpdatePrivacySettingsResponse, type UpdatePictureOptions as UpdateProfilePictureOptions, type UpdatePictureResponse as UpdateProfilePictureResponse, type UpdateSettingOptions, type UpdateSettingResponse, type UpdateStatusOptions, type UpdateStatusRequest, type UpdateStatusResponse, type UpdateSubjectOptions, type UpdateSubjectResponse, type VideoMessage, type VideoMessageOptions, type VideoMessageResponse, type VoiceMessageOptions, type VoiceMessageResponse, type WebhookConfig, type WebhookData, WebhookEvent, WebhookEventSetup, phoneNumberFromJid, validatePhoneNumber };
|