@builderbot/provider-meta 1.3.15 → 1.4.1
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/dist/index.cjs +14394 -1745
- package/dist/interface/meta.d.ts +2 -0
- package/dist/interface/meta.d.ts.map +1 -1
- package/dist/meta/core.d.ts.map +1 -1
- package/dist/meta/provider.d.ts +327 -4
- package/dist/meta/provider.d.ts.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/processIncomingMsg.d.ts +1 -1
- package/dist/utils/processIncomingMsg.d.ts.map +1 -1
- package/package.json +13 -13
package/dist/interface/meta.d.ts
CHANGED
|
@@ -28,5 +28,7 @@ export interface MetaInterface {
|
|
|
28
28
|
sendFile: (to: string, mediaInput: string | null, caption: string, context: string | null) => Promise<any>;
|
|
29
29
|
sendAudio: (to: string, fileOpus: string, context: string | null) => void;
|
|
30
30
|
markAsRead: (wa_id: string) => Promise<any>;
|
|
31
|
+
sendPresenceUpdate: (messageId: string) => Promise<any>;
|
|
32
|
+
typing: (messageId: string, ms?: number) => Promise<void>;
|
|
31
33
|
}
|
|
32
34
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../src/interface/meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEjF,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAE1G,MAAM,WAAW,aAAa;IAC1B,eAAe,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAA;IAChD,gBAAgB,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACzD,QAAQ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;IACI,WAAW,EAAE,KAAK,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/meta/core.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AAItC,OAAO,KAAK,EAAE,OAAO,EAAsD,MAAM,SAAS,CAAA;AAE1F;;;GAGG;AACH,qBAAa,cAAe,SAAQ,YAAY;IAC5C,KAAK,EAAE,KAAK,CAAA;IAEZ;;;OAGG;gBACS,MAAM,EAAE,KAAK;IAKzB;;;OAGG;IACI,SAAS,EAAE,KAAK,CAAC,UAAU,CAEjC;IAED;;;;;;OAMG;IACI,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO;IAI9E,OAAO,CAAC,aAAa;IAwBrB;;;OAGG;IACI,WAAW,EAAE,KAAK,CAAC,UAAU,CAqBnC;IAED;;;OAGG;IACI,WAAW,EAAE,KAAK,CAAC,UAAU,CAqEnC;IAED;;;;OAIG;IACI,cAAc,GAAI,SAAS,OAAO,KAAG,OAAO,CAAC,IAAI,CAAC,CASxD;CACJ"}
|
package/dist/meta/provider.d.ts
CHANGED
|
@@ -20,45 +20,368 @@ declare class MetaProvider extends ProviderClass<MetaInterface> implements MetaI
|
|
|
20
20
|
*/
|
|
21
21
|
protected afterHttpServerInit(): Promise<void>;
|
|
22
22
|
protected initVendor(): Promise<any>;
|
|
23
|
+
/**
|
|
24
|
+
* Fix phone number prefixes for specific countries (Argentina, Mexico)
|
|
25
|
+
* @param phoneNumber - Phone number to fix
|
|
26
|
+
* @returns Fixed phone number with correct prefix
|
|
27
|
+
*/
|
|
23
28
|
protected fixPrefixMetaNumber: (phoneNumber: string) => string;
|
|
24
29
|
/**
|
|
25
|
-
*
|
|
26
|
-
* @param ctx
|
|
27
|
-
* @param options
|
|
28
|
-
* @returns
|
|
30
|
+
* Save a file from a message context to the local filesystem
|
|
31
|
+
* @param ctx - Message context containing the file URL
|
|
32
|
+
* @param options - Save options including the destination path
|
|
33
|
+
* @returns Promise with the absolute path of the saved file, or 'ERROR' if failed
|
|
34
|
+
* @example
|
|
35
|
+
* const filePath = await provider.saveFile(ctx, { path: '/tmp/downloads' })
|
|
29
36
|
*/
|
|
30
37
|
saveFile: (ctx: Partial<Message & BotContext>, options?: SaveFileOptions) => Promise<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Get file buffer from a message context without saving to disk
|
|
40
|
+
* @param ctx - Message context containing the file URL
|
|
41
|
+
* @param options - Optional save options (unused but kept for API consistency)
|
|
42
|
+
* @returns Promise with the file buffer, or empty buffer if failed
|
|
43
|
+
* @example
|
|
44
|
+
* const buffer = await provider.saveBuffer(ctx)
|
|
45
|
+
*/
|
|
31
46
|
saveBuffer: (ctx: Partial<Message & BotContext>, options?: SaveFileOptions) => Promise<Buffer>;
|
|
47
|
+
/**
|
|
48
|
+
* Get the list of event handlers for the provider bus
|
|
49
|
+
* @returns Array of event handlers for auth_failure, notice, ready, message, and host events
|
|
50
|
+
*/
|
|
32
51
|
busEvents: () => {
|
|
33
52
|
event: string;
|
|
34
53
|
func: (payload: any) => void;
|
|
35
54
|
}[];
|
|
55
|
+
/**
|
|
56
|
+
* Send an image message by uploading a local file
|
|
57
|
+
* @param to - Recipient phone number
|
|
58
|
+
* @param mediaInput - Local path to the image file
|
|
59
|
+
* @param caption - Optional caption for the image
|
|
60
|
+
* @param context - Optional message ID to reply to
|
|
61
|
+
* @returns Promise with the API response
|
|
62
|
+
* @throws Error if mediaInput is null
|
|
63
|
+
* @example
|
|
64
|
+
* await provider.sendImage('1234567890', '/path/to/image.jpg', 'Check this out!')
|
|
65
|
+
*/
|
|
36
66
|
sendImage: (to: string, mediaInput: any, caption: string, context?: any) => Promise<any>;
|
|
67
|
+
/**
|
|
68
|
+
* Send an image message using a URL
|
|
69
|
+
* @param to - Recipient phone number
|
|
70
|
+
* @param url - Public URL of the image
|
|
71
|
+
* @param caption - Optional caption for the image
|
|
72
|
+
* @param context - Optional message ID to reply to
|
|
73
|
+
* @returns Promise with the API response
|
|
74
|
+
* @example
|
|
75
|
+
* await provider.sendImageUrl('1234567890', 'https://example.com/image.jpg', 'Nice photo!')
|
|
76
|
+
*/
|
|
37
77
|
sendImageUrl: (to: string, url: string, caption?: string, context?: any) => Promise<any>;
|
|
78
|
+
/**
|
|
79
|
+
* Send a video message by uploading a local file
|
|
80
|
+
* @param to - Recipient phone number
|
|
81
|
+
* @param pathVideo - Local path to the video file
|
|
82
|
+
* @param caption - Optional caption for the video
|
|
83
|
+
* @param context - Optional message ID to reply to
|
|
84
|
+
* @returns Promise with the API response
|
|
85
|
+
* @throws Error if pathVideo is null
|
|
86
|
+
* @example
|
|
87
|
+
* await provider.sendVideo('1234567890', '/path/to/video.mp4', 'Watch this!')
|
|
88
|
+
*/
|
|
38
89
|
sendVideo: (to: string, pathVideo: any, caption: string, context?: any) => Promise<any>;
|
|
90
|
+
/**
|
|
91
|
+
* Send a video message using a URL
|
|
92
|
+
* @param to - Recipient phone number
|
|
93
|
+
* @param url - Public URL of the video
|
|
94
|
+
* @param caption - Optional caption for the video
|
|
95
|
+
* @param context - Optional message ID to reply to
|
|
96
|
+
* @returns Promise with the API response
|
|
97
|
+
* @example
|
|
98
|
+
* await provider.sendVideoUrl('1234567890', 'https://example.com/video.mp4', 'Check this video!')
|
|
99
|
+
*/
|
|
39
100
|
sendVideoUrl: (to: string, url: string, caption?: string, context?: any) => Promise<any>;
|
|
101
|
+
/**
|
|
102
|
+
* Send media message (auto-detects type: image, video, audio, or document)
|
|
103
|
+
* @param to - Recipient phone number
|
|
104
|
+
* @param text - Caption or text for the media
|
|
105
|
+
* @param mediaInput - URL or path to the media file
|
|
106
|
+
* @param context - Optional message ID to reply to
|
|
107
|
+
* @returns Promise with the API response
|
|
108
|
+
* @example
|
|
109
|
+
* // Automatically detects and sends as appropriate type
|
|
110
|
+
* await provider.sendMedia('1234567890', 'Here is the file', 'https://example.com/file.pdf')
|
|
111
|
+
*/
|
|
40
112
|
sendMedia: (to: string, text: string, mediaInput: string, context?: any) => Promise<any>;
|
|
113
|
+
/**
|
|
114
|
+
* Send an interactive list message
|
|
115
|
+
* @param to - Recipient phone number
|
|
116
|
+
* @param list - List configuration object with header, body, footer, and action sections
|
|
117
|
+
* @returns Promise with the API response
|
|
118
|
+
* @example
|
|
119
|
+
* await provider.sendList('1234567890', {
|
|
120
|
+
* header: { type: 'text', text: 'Menu' },
|
|
121
|
+
* body: { text: 'Select an option' },
|
|
122
|
+
* footer: { text: 'Powered by Bot' },
|
|
123
|
+
* action: { button: 'View', sections: [...] }
|
|
124
|
+
* })
|
|
125
|
+
*/
|
|
41
126
|
sendList: (to: string, list: MetaList) => Promise<any>;
|
|
127
|
+
/**
|
|
128
|
+
* Send a complete interactive list message with all components
|
|
129
|
+
* @param to - Recipient phone number
|
|
130
|
+
* @param header - Header text for the list
|
|
131
|
+
* @param text - Body text for the list
|
|
132
|
+
* @param footer - Footer text for the list
|
|
133
|
+
* @param button - Button text to open the list
|
|
134
|
+
* @param list - Array of sections with rows
|
|
135
|
+
* @returns Promise with the API response
|
|
136
|
+
* @example
|
|
137
|
+
* await provider.sendListComplete('1234567890', 'Menu', 'Choose an option', 'Footer', 'View Options', [
|
|
138
|
+
* { title: 'Section 1', rows: [{ id: '1', title: 'Option 1', description: 'Description' }] }
|
|
139
|
+
* ])
|
|
140
|
+
*/
|
|
42
141
|
sendListComplete: (to: string, header: string, text: string, footer: string, button: string, list: Record<string, any>) => Promise<any>;
|
|
142
|
+
/**
|
|
143
|
+
* Send an interactive message with reply buttons
|
|
144
|
+
* @param to - Recipient phone number
|
|
145
|
+
* @param buttons - Array of button objects (max 3 buttons, 20 chars each)
|
|
146
|
+
* @param text - Body text for the message
|
|
147
|
+
* @returns Promise with the API response
|
|
148
|
+
* @example
|
|
149
|
+
* await provider.sendButtons('1234567890', [
|
|
150
|
+
* { body: 'Yes' },
|
|
151
|
+
* { body: 'No' },
|
|
152
|
+
* { body: 'Maybe' }
|
|
153
|
+
* ], 'Do you agree?')
|
|
154
|
+
*/
|
|
43
155
|
sendButtons: (to: string, buttons: Button[], text: string) => Promise<any>;
|
|
156
|
+
/**
|
|
157
|
+
* Send a call-to-action URL button
|
|
158
|
+
* @param to - Recipient phone number
|
|
159
|
+
* @param button - Button object with body text and URL
|
|
160
|
+
* @param text - Body text for the message
|
|
161
|
+
* @returns Promise with the API response
|
|
162
|
+
* @example
|
|
163
|
+
* await provider.sendButtonUrl('1234567890', { body: 'Visit Site', url: 'https://example.com' }, 'Click below')
|
|
164
|
+
*/
|
|
44
165
|
sendButtonUrl: (to: string, button: Button & {
|
|
45
166
|
url: string;
|
|
46
167
|
}, text: string) => Promise<any>;
|
|
168
|
+
/**
|
|
169
|
+
* Send an interactive message with media header and reply buttons
|
|
170
|
+
* @param to - Recipient phone number
|
|
171
|
+
* @param media_type - Type of media: 'image' or 'video'
|
|
172
|
+
* @param buttons - Array of button objects (max 3 buttons)
|
|
173
|
+
* @param text - Body text for the message
|
|
174
|
+
* @param url - Public URL of the media file
|
|
175
|
+
* @returns Promise with the API response
|
|
176
|
+
* @example
|
|
177
|
+
* await provider.sendButtonsMedia('1234567890', 'image', [{ body: 'Buy' }], 'Product info', 'https://example.com/product.jpg')
|
|
178
|
+
*/
|
|
47
179
|
sendButtonsMedia: (to: string, media_type: string, buttons: any[], text: string, url: string) => Promise<any>;
|
|
180
|
+
/**
|
|
181
|
+
* Send a pre-approved template message
|
|
182
|
+
* @param to - Recipient phone number
|
|
183
|
+
* @param template - Template name as registered in Meta Business
|
|
184
|
+
* @param languageCode - Language code (e.g., 'en_US', 'es_MX')
|
|
185
|
+
* @param components - Optional array of template components (header, body, buttons)
|
|
186
|
+
* @returns Promise with the API response
|
|
187
|
+
* @example
|
|
188
|
+
* await provider.sendTemplate('1234567890', 'hello_world', 'en_US', [
|
|
189
|
+
* { type: 'body', parameters: [{ type: 'text', text: 'John' }] }
|
|
190
|
+
* ])
|
|
191
|
+
*/
|
|
48
192
|
sendTemplate: (to: string, template: string, languageCode: string, components?: any[]) => Promise<any>;
|
|
193
|
+
/**
|
|
194
|
+
* Send a WhatsApp Flow message
|
|
195
|
+
* @param to - Recipient phone number
|
|
196
|
+
* @param headerText - Header text for the flow message
|
|
197
|
+
* @param bodyText - Body text for the flow message
|
|
198
|
+
* @param footerText - Footer text for the flow message
|
|
199
|
+
* @param flowMessageVer - Flow message version (default: '3')
|
|
200
|
+
* @param flowAction - Flow action type (default: 'navigate')
|
|
201
|
+
* @param flowID - Flow ID from Meta Business
|
|
202
|
+
* @param flowToken - Flow token for authentication
|
|
203
|
+
* @param flowCta - Call-to-action button text
|
|
204
|
+
* @param isDraftFlow - Whether the flow is in draft mode
|
|
205
|
+
* @param screenName - Initial screen name to display
|
|
206
|
+
* @param data - Custom data to pass to the flow
|
|
207
|
+
* @returns Promise with the API response
|
|
208
|
+
* @example
|
|
209
|
+
* await provider.sendFlow('1234567890', 'Survey', 'Complete our survey', 'Thanks!', '3', 'navigate', 'flow123', 'token', 'Start', false, 'WELCOME', {})
|
|
210
|
+
*/
|
|
49
211
|
sendFlow: (to: string, headerText: string, bodyText: string, footerText: string, flowMessageVer: string, flowAction: string, flowID: string, flowToken: string, flowCta: string, isDraftFlow: boolean, screenName: string, data: Record<string, any>) => Promise<any>;
|
|
212
|
+
/**
|
|
213
|
+
* Send contact cards to a recipient
|
|
214
|
+
* @param to - Recipient phone number
|
|
215
|
+
* @param contacts - Array of parsed contact objects
|
|
216
|
+
* @returns Promise with the API response
|
|
217
|
+
* @example
|
|
218
|
+
* await provider.sendContacts('1234567890', [{
|
|
219
|
+
* name: { formatted_name: 'John Doe', first_name: 'John' },
|
|
220
|
+
* phones: [{ phone: '+1234567890', type: 'MOBILE' }]
|
|
221
|
+
* }])
|
|
222
|
+
*/
|
|
50
223
|
sendContacts: (to: string, contacts?: ParsedContact[]) => Promise<any>;
|
|
224
|
+
/**
|
|
225
|
+
* Send a product catalog message
|
|
226
|
+
* @param to - Recipient phone number
|
|
227
|
+
* @param text - Body text for the catalog message
|
|
228
|
+
* @param itemCatalogId - Product retailer ID to show as thumbnail
|
|
229
|
+
* @returns Promise with the API response
|
|
230
|
+
* @example
|
|
231
|
+
* await provider.sendCatalog('1234567890', 'Check out our products!', 'product123')
|
|
232
|
+
*/
|
|
51
233
|
sendCatalog: (to: string, text: string, itemCatalogId: string) => Promise<any>;
|
|
234
|
+
/**
|
|
235
|
+
* Send a message with automatic type detection (text, buttons, or media)
|
|
236
|
+
* @param to - Recipient phone number
|
|
237
|
+
* @param message - Message text content
|
|
238
|
+
* @param options - Optional send options (buttons, media)
|
|
239
|
+
* @param context - Optional message ID to reply to
|
|
240
|
+
* @returns Promise with the API response
|
|
241
|
+
* @example
|
|
242
|
+
* // Send text
|
|
243
|
+
* await provider.sendMessage('1234567890', 'Hello!')
|
|
244
|
+
*
|
|
245
|
+
* // Send with buttons
|
|
246
|
+
* await provider.sendMessage('1234567890', 'Choose:', { buttons: [{ body: 'Option 1' }] })
|
|
247
|
+
*
|
|
248
|
+
* // Send with media
|
|
249
|
+
* await provider.sendMessage('1234567890', 'Check this:', { media: 'https://example.com/image.jpg' })
|
|
250
|
+
*/
|
|
52
251
|
sendMessage: (to: string, message: string, options?: SendOptions, context?: string) => Promise<any>;
|
|
252
|
+
/**
|
|
253
|
+
* Send a document/file message by uploading a local file
|
|
254
|
+
* @param to - Recipient phone number
|
|
255
|
+
* @param mediaInput - Local path to the file
|
|
256
|
+
* @param caption - Optional caption for the document
|
|
257
|
+
* @param context - Optional message ID to reply to
|
|
258
|
+
* @returns Promise with the API response
|
|
259
|
+
* @throws Error if mediaInput is null
|
|
260
|
+
* @example
|
|
261
|
+
* await provider.sendFile('1234567890', '/path/to/document.pdf', 'Here is the report')
|
|
262
|
+
*/
|
|
53
263
|
sendFile: (to: string, mediaInput: any, caption: string, context?: any) => Promise<any>;
|
|
264
|
+
/**
|
|
265
|
+
* Send an audio message by uploading a local file
|
|
266
|
+
* @param to - Recipient phone number
|
|
267
|
+
* @param pathVideo - Local path to the audio file (supports mp3, m4a, aac, amr, ogg with opus codec)
|
|
268
|
+
* @param context - Optional message ID to reply to
|
|
269
|
+
* @returns Promise with the API response
|
|
270
|
+
* @throws Error if pathVideo is null
|
|
271
|
+
* @example
|
|
272
|
+
* await provider.sendAudio('1234567890', '/path/to/audio.mp3')
|
|
273
|
+
*/
|
|
54
274
|
sendAudio: (to: string, pathVideo?: any, context?: any) => Promise<any>;
|
|
275
|
+
/**
|
|
276
|
+
* Send a reaction emoji to a specific message
|
|
277
|
+
* @param to - Recipient phone number
|
|
278
|
+
* @param react - Reaction object with message_id and emoji
|
|
279
|
+
* @returns Promise with the API response
|
|
280
|
+
* @example
|
|
281
|
+
* await provider.sendReaction('1234567890', { message_id: 'wamid.xxx', emoji: '👍' })
|
|
282
|
+
*/
|
|
55
283
|
sendReaction: (to: string, react: Reaction) => Promise<any>;
|
|
284
|
+
/**
|
|
285
|
+
* Request location from user (deprecated, use sendLocationRequest instead)
|
|
286
|
+
* @param to - Recipient phone number
|
|
287
|
+
* @param bodyText - Text prompting user to share location
|
|
288
|
+
* @returns Promise with the API response
|
|
289
|
+
* @deprecated Use sendLocationRequest instead
|
|
290
|
+
*/
|
|
56
291
|
requestLocation: (to: any, bodyText: any) => Promise<any>;
|
|
292
|
+
/**
|
|
293
|
+
* Send a location message with coordinates
|
|
294
|
+
* @param to - Recipient phone number
|
|
295
|
+
* @param localization - Location object with coordinates, name, and address
|
|
296
|
+
* @returns Promise with the API response
|
|
297
|
+
* @example
|
|
298
|
+
* await provider.sendLocation('1234567890', {
|
|
299
|
+
* lat_number: '40.7128',
|
|
300
|
+
* long_number: '-74.0060',
|
|
301
|
+
* name: 'New York City',
|
|
302
|
+
* address: 'Manhattan, NY'
|
|
303
|
+
* })
|
|
304
|
+
*/
|
|
57
305
|
sendLocation: (to: string, localization: Localization) => Promise<any>;
|
|
306
|
+
/**
|
|
307
|
+
* Send a location request message prompting user to share their location
|
|
308
|
+
* @param to - Recipient phone number
|
|
309
|
+
* @param bodyText - Text prompting user to share location
|
|
310
|
+
* @returns Promise with the API response
|
|
311
|
+
* @example
|
|
312
|
+
* await provider.sendLocationRequest('1234567890', 'Please share your location for delivery')
|
|
313
|
+
*/
|
|
58
314
|
sendLocationRequest: (to: string, bodyText: string) => Promise<any>;
|
|
315
|
+
/**
|
|
316
|
+
* Send a plain text message
|
|
317
|
+
* @param to - Recipient phone number
|
|
318
|
+
* @param message - Text message content
|
|
319
|
+
* @param context - Optional message ID to reply to
|
|
320
|
+
* @param preview_url - Whether to show URL previews in the message
|
|
321
|
+
* @returns Promise with the API response
|
|
322
|
+
* @example
|
|
323
|
+
* await provider.sendText('1234567890', 'Hello, how can I help you?')
|
|
324
|
+
*
|
|
325
|
+
* // With URL preview
|
|
326
|
+
* await provider.sendText('1234567890', 'Check https://example.com', null, true)
|
|
327
|
+
*/
|
|
59
328
|
sendText: (to: string, message: string, context?: any, preview_url?: boolean) => Promise<any>;
|
|
329
|
+
/**
|
|
330
|
+
* Mark a message as read (shows blue checkmarks)
|
|
331
|
+
* @param wa_id - WhatsApp message ID to mark as read
|
|
332
|
+
* @returns Promise with the API response
|
|
333
|
+
* @example
|
|
334
|
+
* await provider.markAsRead('wamid.HBgLMTIzNDU2Nzg5MA==')
|
|
335
|
+
*/
|
|
60
336
|
markAsRead: (wa_id: string) => Promise<any>;
|
|
337
|
+
/**
|
|
338
|
+
* Send presence update to simulate typing indicator using Meta Cloud API format.
|
|
339
|
+
* Requires the message_id of the incoming message that triggered this response.
|
|
340
|
+
* The typing indicator lasts up to 25 seconds or until a message is sent.
|
|
341
|
+
* @param messageId - The wamid of the incoming message (from the user)
|
|
342
|
+
* @returns Promise with the API response
|
|
343
|
+
* @example
|
|
344
|
+
* await provider.sendPresenceUpdate('wamid.HBgLMTIzNDU2Nzg5MA==')
|
|
345
|
+
*/
|
|
346
|
+
sendPresenceUpdate: (messageId: string) => Promise<any>;
|
|
347
|
+
/**
|
|
348
|
+
* Show a typing indicator to the recipient.
|
|
349
|
+
* Requires the message_id of the incoming message that triggered this response.
|
|
350
|
+
* @param messageId - The wamid of the incoming message (from the user)
|
|
351
|
+
* @param ms - Optional duration in milliseconds to wait (typing indicator disappears automatically after 25s or when a message is sent)
|
|
352
|
+
* @example
|
|
353
|
+
* // Show typing indicator
|
|
354
|
+
* await provider.typing('wamid.HBgLMTIzNDU2Nzg5MA==')
|
|
355
|
+
*
|
|
356
|
+
* // Show typing indicator and wait 3 seconds before continuing
|
|
357
|
+
* await provider.typing('wamid.HBgLMTIzNDU2Nzg5MA==', 3000)
|
|
358
|
+
*/
|
|
359
|
+
typing: (messageId: string, ms?: number) => Promise<void>;
|
|
360
|
+
/**
|
|
361
|
+
* Queue a message to be sent via the Meta API (rate-limited)
|
|
362
|
+
* @param body - Message body conforming to Meta API specification
|
|
363
|
+
* @returns Promise with the API response
|
|
364
|
+
* @example
|
|
365
|
+
* await provider.sendMessageMeta({
|
|
366
|
+
* messaging_product: 'whatsapp',
|
|
367
|
+
* to: '1234567890',
|
|
368
|
+
* type: 'text',
|
|
369
|
+
* text: { body: 'Hello' }
|
|
370
|
+
* })
|
|
371
|
+
*/
|
|
61
372
|
sendMessageMeta: (body: TextMessageBody) => Promise<any>;
|
|
373
|
+
/**
|
|
374
|
+
* Send a message directly to the Meta Graph API (bypasses queue)
|
|
375
|
+
* @param body - Message body conforming to Meta API specification
|
|
376
|
+
* @returns Promise with the API response or error
|
|
377
|
+
* @example
|
|
378
|
+
* const response = await provider.sendMessageToApi({
|
|
379
|
+
* messaging_product: 'whatsapp',
|
|
380
|
+
* to: '1234567890',
|
|
381
|
+
* type: 'text',
|
|
382
|
+
* text: { body: 'Hello' }
|
|
383
|
+
* })
|
|
384
|
+
*/
|
|
62
385
|
sendMessageToApi: (body: TextMessageBody) => Promise<any>;
|
|
63
386
|
}
|
|
64
387
|
export { MetaProvider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/meta/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAS,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kDAAkD,CAAA;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAQjF,OAAO,KAAK,MAAM,eAAe,CAAA;AAMjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EACR,oBAAoB,EACpB,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,eAAe,EACf,eAAe,EAClB,MAAM,SAAS,CAAA;AAIhB,cAAM,YAAa,SAAQ,aAAa,CAAC,aAAa,CAAE,YAAW,aAAa;IACrE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAA;IACnB,KAAK,EAAE,KAAK,CAAc;IAE1B,gBAAgB,EAAE,oBAAoB,CAQ5C;IACM,SAAS;;;MAGf;gBAEW,IAAI,EAAE,oBAAoB;IAUtC,SAAS,CAAC,oBAAoB,IAAI,IAAI;IAWtC;;;OAGG;cAEa,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IA0CpD,SAAS,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC;IAcpC,SAAS,CAAC,mBAAmB,GAAI,aAAa,MAAM,YAOnD;
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/meta/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAS,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kDAAkD,CAAA;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,E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K,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC,CAK7D;IAED;;;;;;;;;;;OAWG;IACH,eAAe,GAAI,MAAM,eAAe,KAAG,OAAO,CAAC,GAAG,CAAC,CAOtD;IAED;;;;;;;;;;;OAWG;IACH,gBAAgB,GAAU,MAAM,eAAe,KAAG,OAAO,CAAC,GAAG,CAAC,CAc7D;CACJ;AACD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export declare class File {
|
|
|
3
3
|
mime_type?: string;
|
|
4
4
|
sha256?: string;
|
|
5
5
|
id?: string;
|
|
6
|
+
url?: string;
|
|
6
7
|
voice?: boolean;
|
|
7
8
|
animated?: boolean;
|
|
8
9
|
filename?: string;
|
|
@@ -88,6 +89,7 @@ export interface Message {
|
|
|
88
89
|
order?: Order;
|
|
89
90
|
id?: string;
|
|
90
91
|
caption?: string;
|
|
92
|
+
fromMe?: boolean;
|
|
91
93
|
}
|
|
92
94
|
export interface ParamsIncomingMessage {
|
|
93
95
|
messageId?: string;
|
|
@@ -99,6 +101,7 @@ export interface ParamsIncomingMessage {
|
|
|
99
101
|
version: string;
|
|
100
102
|
message: any;
|
|
101
103
|
fileData?: File | null;
|
|
104
|
+
fromMe?: boolean;
|
|
102
105
|
}
|
|
103
106
|
export type TextGenericParams = {
|
|
104
107
|
messaging_product: 'whatsapp';
|
|
@@ -141,6 +144,9 @@ export interface TextMessageBody {
|
|
|
141
144
|
template?: TemplateMessage;
|
|
142
145
|
status?: string;
|
|
143
146
|
message_id?: string;
|
|
147
|
+
typing_indicator?: {
|
|
148
|
+
type: string;
|
|
149
|
+
};
|
|
144
150
|
}
|
|
145
151
|
export interface Reaction {
|
|
146
152
|
message_id: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gB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import type { Message, ParamsIncomingMessage as ParamsIncomingMessage } from '../types';
|
|
2
|
-
export declare const processIncomingMessage: ({ messageId, messageTimestamp, pushName, message, to, jwtToken, version, numberId, fileData }: ParamsIncomingMessage) => Promise<Message>;
|
|
2
|
+
export declare const processIncomingMessage: ({ messageId, messageTimestamp, pushName, message, to, jwtToken, version, numberId, fileData, fromMe, }: ParamsIncomingMessage) => Promise<Message>;
|
|
3
3
|
//# sourceMappingURL=processIncomingMsg.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processIncomingMsg.d.ts","sourceRoot":"","sources":["../../src/utils/processIncomingMsg.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,IAAI,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAEvF,eAAO,MAAM,sBAAsB,GAAU
|
|
1
|
+
{"version":3,"file":"processIncomingMsg.d.ts","sourceRoot":"","sources":["../../src/utils/processIncomingMsg.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,IAAI,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAEvF,eAAO,MAAM,sBAAsB,GAAU,wGAW1C,qBAAqB,KAAG,OAAO,CAAC,OAAO,CA4KzC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builderbot/provider-meta",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "vicente1992 <vic_ortiz20@hotmail.es>",
|
|
6
6
|
"homepage": "https://github.com/vicente1992/bot-whatsapp#readme",
|
|
@@ -30,36 +30,36 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"axios": "^1.13.2",
|
|
33
|
-
"body-parser": "^
|
|
33
|
+
"body-parser": "^2.2.1",
|
|
34
34
|
"file-type": "^19.0.0",
|
|
35
35
|
"form-data": "^4.0.5",
|
|
36
|
-
"mime-types": "^
|
|
36
|
+
"mime-types": "^3.0.2",
|
|
37
37
|
"polka": "^0.5.2",
|
|
38
38
|
"queue-promise": "^2.2.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@builderbot/bot": "1.
|
|
42
|
-
"@jest/globals": "^
|
|
43
|
-
"@rollup/plugin-commonjs": "^
|
|
41
|
+
"@builderbot/bot": "^1.4.1",
|
|
42
|
+
"@jest/globals": "^30.2.0",
|
|
43
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
44
44
|
"@rollup/plugin-json": "^6.1.0",
|
|
45
|
-
"@rollup/plugin-node-resolve": "^
|
|
45
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
46
46
|
"@rollup/plugin-terser": "^0.4.4",
|
|
47
47
|
"@types/cors": "^2.8.17",
|
|
48
|
-
"@types/jest": "^
|
|
49
|
-
"@types/node": "^
|
|
48
|
+
"@types/jest": "^30.0.0",
|
|
49
|
+
"@types/node": "^24.10.2",
|
|
50
50
|
"@types/polka": "^0.5.7",
|
|
51
51
|
"@types/sinon": "^17.0.3",
|
|
52
52
|
"cors": "^2.8.5",
|
|
53
|
-
"jest": "^
|
|
53
|
+
"jest": "^30.2.0",
|
|
54
54
|
"kleur": "^4.1.5",
|
|
55
55
|
"proxyquire": "^2.1.3",
|
|
56
|
-
"rimraf": "^
|
|
56
|
+
"rimraf": "^6.1.2",
|
|
57
57
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
58
58
|
"sinon": "^17.0.1",
|
|
59
59
|
"supertest": "^6.3.4",
|
|
60
|
-
"ts-jest": "^29.4.
|
|
60
|
+
"ts-jest": "^29.4.6",
|
|
61
61
|
"tslib": "^2.6.2",
|
|
62
62
|
"tsm": "^2.3.0"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "f0a2e91d3f47339090483865d6c23a5875284b96"
|
|
65
65
|
}
|