@wppconnect-team/wppconnect 1.14.0 → 1.14.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/CHANGELOG.md
CHANGED
|
@@ -31,10 +31,18 @@ export declare class SenderLayer extends ListenerLayer {
|
|
|
31
31
|
* client.sendText('<number>@c.us', 'A simple message');
|
|
32
32
|
*
|
|
33
33
|
* // With buttons
|
|
34
|
-
* client.sendText('<number>@c.us', '
|
|
34
|
+
* client.sendText('<number>@c.us', 'WPPConnect message with buttons', {
|
|
35
35
|
* useTemplateButtons: true, // False for legacy
|
|
36
36
|
* buttons: [
|
|
37
37
|
* {
|
|
38
|
+
* url: 'https://wppconnect-team.github.io/',
|
|
39
|
+
* text: 'WPPConnect Site'
|
|
40
|
+
* },
|
|
41
|
+
* {
|
|
42
|
+
* phoneNumber: '+55 11 22334455',
|
|
43
|
+
* text: 'Call me'
|
|
44
|
+
* },
|
|
45
|
+
* {
|
|
38
46
|
* id: 'your custom id 1',
|
|
39
47
|
* text: 'Some text'
|
|
40
48
|
* },
|
|
@@ -157,6 +165,38 @@ export declare class SenderLayer extends ListenerLayer {
|
|
|
157
165
|
sendFileFromBase64(chatId: string, base64: string, filename: string, caption?: string): Promise<any>;
|
|
158
166
|
/**
|
|
159
167
|
* Sends file from path or base64
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```javascript
|
|
171
|
+
* // Simple message
|
|
172
|
+
* client.sendFile('<number>@c.us', 'data:text/plain;base64,V1BQQ29ubmVjdA==');
|
|
173
|
+
*
|
|
174
|
+
* // With buttons
|
|
175
|
+
* client.sendFile('<number>@c.us', 'data:text/plain;base64,V1BQQ29ubmVjdA==', {
|
|
176
|
+
* useTemplateButtons: true, // False for legacy
|
|
177
|
+
* buttons: [
|
|
178
|
+
* {
|
|
179
|
+
* url: 'https://wppconnect-team.github.io/',
|
|
180
|
+
* text: 'WPPConnect Site'
|
|
181
|
+
* },
|
|
182
|
+
* {
|
|
183
|
+
* phoneNumber: '+55 11 22334455',
|
|
184
|
+
* text: 'Call me'
|
|
185
|
+
* },
|
|
186
|
+
* {
|
|
187
|
+
* id: 'your custom id 1',
|
|
188
|
+
* text: 'Some text'
|
|
189
|
+
* },
|
|
190
|
+
* {
|
|
191
|
+
* id: 'another id 2',
|
|
192
|
+
* text: 'Another text'
|
|
193
|
+
* }
|
|
194
|
+
* ],
|
|
195
|
+
* title: 'Title text' // Optional
|
|
196
|
+
* footer: 'Footer text' // Optional
|
|
197
|
+
* });
|
|
198
|
+
* ```
|
|
199
|
+
*
|
|
160
200
|
* @category Chat
|
|
161
201
|
* @param to Chat id
|
|
162
202
|
* @param pathOrBase64 File path
|
|
@@ -156,10 +156,18 @@ var SenderLayer = /** @class */ (function (_super) {
|
|
|
156
156
|
* client.sendText('<number>@c.us', 'A simple message');
|
|
157
157
|
*
|
|
158
158
|
* // With buttons
|
|
159
|
-
* client.sendText('<number>@c.us', '
|
|
159
|
+
* client.sendText('<number>@c.us', 'WPPConnect message with buttons', {
|
|
160
160
|
* useTemplateButtons: true, // False for legacy
|
|
161
161
|
* buttons: [
|
|
162
162
|
* {
|
|
163
|
+
* url: 'https://wppconnect-team.github.io/',
|
|
164
|
+
* text: 'WPPConnect Site'
|
|
165
|
+
* },
|
|
166
|
+
* {
|
|
167
|
+
* phoneNumber: '+55 11 22334455',
|
|
168
|
+
* text: 'Call me'
|
|
169
|
+
* },
|
|
170
|
+
* {
|
|
163
171
|
* id: 'your custom id 1',
|
|
164
172
|
* text: 'Some text'
|
|
165
173
|
* },
|
|
@@ -176,7 +176,7 @@ function create(sessionOrOption, catchQR, statusFind, options, browserSessionTok
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
if (!mergedOptions.browserWS) {
|
|
179
|
-
logger.
|
|
179
|
+
logger.info("Using browser folder '".concat(mergedOptions.puppeteerOptions.userDataDir, "'"), {
|
|
180
180
|
session: session,
|
|
181
181
|
type: 'browser',
|
|
182
182
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wppconnect-team/wppconnect",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.1",
|
|
4
4
|
"description": "WPPConnect is an open source project developed by the JavaScript community with the aim of exporting functions from WhatsApp Web to the node, which can be used to support the creation of any interaction, such as customer service, media sending, intelligence recognition based on phrases artificial and many other things, use your imagination... 😀🤔💭",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|