@wppconnect-team/wppconnect 1.19.2 → 1.21.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/CHANGELOG.md +44 -172
- package/README.md +7 -3
- package/dist/api/layers/catalog.layer.d.ts +24 -0
- package/dist/api/layers/catalog.layer.js +42 -0
- package/dist/api/layers/group.layer.d.ts +7 -4
- package/dist/api/layers/listener.layer.d.ts +14 -1
- package/dist/api/layers/listener.layer.js +26 -0
- package/dist/api/layers/retriever.layer.d.ts +44 -1
- package/dist/api/layers/retriever.layer.js +30 -0
- package/dist/config/create-config.js +1 -1
- package/dist/lib/wapi/wapi.js +1 -1
- package/package.json +26 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,384 +1,256 @@
|
|
|
1
|
-
|
|
1
|
+
# 1.21.0 (2023-02-03)
|
|
2
2
|
|
|
3
|
+
### Bug Fixes
|
|
3
4
|
|
|
5
|
+
- **deps:** update dependency @wppconnect/wa-js to ^2.19.0 ([#1531](https://github.com/wppconnect-team/wppconnect/issues/1531)) ([09626d0](https://github.com/wppconnect-team/wppconnect/commit/09626d0b4921609633b77a1fcc2a67e9882a9dc4))
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
# 1.20.0 (2022-12-15)
|
|
6
8
|
|
|
9
|
+
### Features
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* Fixed onMessage method (fix [#1351](https://github.com/wppconnect-team/wppconnect/issues/1351)) ([e8549a1](https://github.com/wppconnect-team/wppconnect/commit/e8549a10cf7b3ed5a04209bdd7d58b9a3c073f32))
|
|
11
|
+
- Added getVotes and getReactions functions ([49bb58f](https://github.com/wppconnect-team/wppconnect/commit/49bb58f9c0db9271a36cea4d650857f2ddbde74a))
|
|
11
12
|
|
|
13
|
+
## 1.19.2 (2022-12-11)
|
|
12
14
|
|
|
15
|
+
## 1.19.1 (2022-11-18)
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
### Bug Fixes
|
|
15
18
|
|
|
19
|
+
- Fixed onMessage method (fix [#1351](https://github.com/wppconnect-team/wppconnect/issues/1351)) ([e8549a1](https://github.com/wppconnect-team/wppconnect/commit/e8549a10cf7b3ed5a04209bdd7d58b9a3c073f32))
|
|
16
20
|
|
|
21
|
+
# 1.19.0 (2022-11-02)
|
|
17
22
|
|
|
18
23
|
## 1.18.1 (2022-10-20)
|
|
19
24
|
|
|
20
|
-
|
|
21
25
|
### Bug Fixes
|
|
22
26
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
- Fixed "Checking phone is connected" without autoClose ([ad63fb5](https://github.com/wppconnect-team/wppconnect/commit/ad63fb56a2255a67bcb16227fa6a61210f8633d1))
|
|
26
28
|
|
|
27
29
|
# 1.18.0 (2022-10-18)
|
|
28
30
|
|
|
29
|
-
|
|
30
31
|
### Features
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
- Improved QRCode re-scan (fix [#1189](https://github.com/wppconnect-team/wppconnect/issues/1189)) ([8ec5264](https://github.com/wppconnect-team/wppconnect/commit/8ec5264e55e01c15efd3e3c273c54e34cad166c9))
|
|
35
34
|
|
|
36
35
|
## 1.17.1 (2022-10-10)
|
|
37
36
|
|
|
38
|
-
|
|
39
37
|
### Bug Fixes
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
- **deps:** update dependency @wppconnect/wa-js to ^2.13.1 ([#1364](https://github.com/wppconnect-team/wppconnect/issues/1364)) ([ff92035](https://github.com/wppconnect-team/wppconnect/commit/ff92035cb05abc21a8e241d8c7d3d5be4614edfb))
|
|
44
40
|
|
|
45
41
|
# 1.17.0 (2022-09-17)
|
|
46
42
|
|
|
47
|
-
|
|
48
43
|
### Bug Fixes
|
|
49
44
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
- **deps:** update dependency @wppconnect/wa-version to ^1.1.154 ([#1334](https://github.com/wppconnect-team/wppconnect/issues/1334)) ([daa94ef](https://github.com/wppconnect-team/wppconnect/commit/daa94ef808660bd5acb143ceb8c9bff9a3a25a18))
|
|
53
46
|
|
|
54
47
|
## 1.16.1 (2022-08-09)
|
|
55
48
|
|
|
56
|
-
|
|
57
|
-
|
|
58
49
|
# 1.16.0 (2022-08-05)
|
|
59
50
|
|
|
60
|
-
|
|
61
51
|
### Bug Fixes
|
|
62
52
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
53
|
+
- **deps:** update dependency @wppconnect/wa-js to ^2.10.0 ([dc8133a](https://github.com/wppconnect-team/wppconnect/commit/dc8133a2896c011830c874c94c780acd9368a25a))
|
|
66
54
|
|
|
67
55
|
# 1.15.0 (2022-07-20)
|
|
68
56
|
|
|
69
|
-
|
|
70
|
-
|
|
71
57
|
## 1.14.5 (2022-07-11)
|
|
72
58
|
|
|
73
|
-
|
|
74
|
-
|
|
75
59
|
## 1.14.4 (2022-06-20)
|
|
76
60
|
|
|
77
|
-
|
|
78
|
-
|
|
79
61
|
## 1.14.3 (2022-06-17)
|
|
80
62
|
|
|
81
|
-
|
|
82
63
|
### Bug Fixes
|
|
83
64
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
65
|
+
- **deps:** update dependency @wppconnect/wa-js to ^2.7.2 ([#1181](https://github.com/wppconnect-team/wppconnect/issues/1181)) ([5208e62](https://github.com/wppconnect-team/wppconnect/commit/5208e621cf79ca5d80cca5ecf3c7b9068ca44e91))
|
|
87
66
|
|
|
88
67
|
## 1.14.2 (2022-06-11)
|
|
89
68
|
|
|
90
|
-
|
|
91
69
|
### Bug Fixes
|
|
92
70
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
71
|
+
- Added filename for sendFile when is using path or URL (fix [#1168](https://github.com/wppconnect-team/wppconnect/issues/1168)) ([5534fad](https://github.com/wppconnect-team/wppconnect/commit/5534fad0e056563cc3ce6b7699ea06f5eaff6da8))
|
|
96
72
|
|
|
97
73
|
## 1.14.1 (2022-06-08)
|
|
98
74
|
|
|
99
|
-
|
|
100
|
-
|
|
101
75
|
# 1.14.0 (2022-06-08)
|
|
102
76
|
|
|
103
|
-
|
|
104
77
|
### Bug Fixes
|
|
105
78
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
79
|
+
- **deps:** update dependency @wppconnect/wa-js to ^2.6.0 ([27d5a52](https://github.com/wppconnect-team/wppconnect/commit/27d5a523c1dfa1a22c8be08cd7ff6d03af1fc0b1))
|
|
109
80
|
|
|
110
81
|
## 1.13.3 (2022-06-01)
|
|
111
82
|
|
|
112
|
-
|
|
113
83
|
### Bug Fixes
|
|
114
84
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
85
|
+
- Clear all token data when disconnected (fix [#1147](https://github.com/wppconnect-team/wppconnect/issues/1147)) ([4abcfed](https://github.com/wppconnect-team/wppconnect/commit/4abcfed97778ddb619df65fec0b1c3d0dc4debac))
|
|
118
86
|
|
|
119
87
|
## 1.13.2 (2022-05-28)
|
|
120
88
|
|
|
121
|
-
|
|
122
89
|
### Bug Fixes
|
|
123
90
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
91
|
+
- Migrate archiveChat and pinChat methods to WA-JS ([cee7e1c](https://github.com/wppconnect-team/wppconnect/commit/cee7e1ced23409d66365e42a35602265e0c09536))
|
|
127
92
|
|
|
128
93
|
## 1.13.1 (2022-05-10)
|
|
129
94
|
|
|
130
|
-
|
|
131
|
-
|
|
132
95
|
# 1.13.0 (2022-04-25)
|
|
133
96
|
|
|
134
|
-
|
|
135
97
|
### Features
|
|
136
98
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
99
|
+
- Improved chat state to keep alive and online ([ba82005](https://github.com/wppconnect-team/wppconnect/commit/ba82005f11b8ecc8dacee08304b7d3a66bbea6b0))
|
|
140
100
|
|
|
141
101
|
## 1.12.8 (2022-03-13)
|
|
142
102
|
|
|
143
|
-
|
|
144
103
|
### Bug Fixes
|
|
145
104
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
105
|
+
- Fixed stuck state after logout ([bb9695a](https://github.com/wppconnect-team/wppconnect/commit/bb9695a61404a062daf1d0995ad2bb10af7c5006))
|
|
149
106
|
|
|
150
107
|
## 1.12.7 (2022-03-03)
|
|
151
108
|
|
|
152
|
-
|
|
153
109
|
### Bug Fixes
|
|
154
110
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
111
|
+
- Fixed onParticipantsChanged and onPresenceChanged function (fix [#864](https://github.com/wppconnect-team/wppconnect/issues/864), fix [#911](https://github.com/wppconnect-team/wppconnect/issues/911)) ([aff7f6c](https://github.com/wppconnect-team/wppconnect/commit/aff7f6cd34c22c086789ca4871c3113d8d8b2bb8))
|
|
158
112
|
|
|
159
113
|
## 1.12.6 (2022-02-22)
|
|
160
114
|
|
|
161
|
-
|
|
162
115
|
### Bug Fixes
|
|
163
116
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
117
|
+
- Fixed getGroupMembersIds and getGroupMembers for large chats (fix [#892](https://github.com/wppconnect-team/wppconnect/issues/892)) ([9cc34a5](https://github.com/wppconnect-team/wppconnect/commit/9cc34a5fddef52b01feba6194fff31aa19b388f0))
|
|
167
118
|
|
|
168
119
|
## 1.12.5 (2022-02-06)
|
|
169
120
|
|
|
170
|
-
|
|
171
|
-
|
|
172
121
|
## 1.12.4 (2022-01-22)
|
|
173
122
|
|
|
174
|
-
|
|
175
123
|
### Bug Fixes
|
|
176
124
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
125
|
+
- Fixed getMessageById where the message is from status (fix [#823](https://github.com/wppconnect-team/wppconnect/issues/823)) ([ed57b97](https://github.com/wppconnect-team/wppconnect/commit/ed57b9700efd72f3de7c0c8d658d24b41f4da5d9))
|
|
180
126
|
|
|
181
127
|
## 1.12.3 (2022-01-21)
|
|
182
128
|
|
|
183
|
-
|
|
184
129
|
### Bug Fixes
|
|
185
130
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
131
|
+
- Updated @wppconnect/wa-js to v1.1.9 ([5074de1](https://github.com/wppconnect-team/wppconnect/commit/5074de182f401b8f8e6b382aa513ca2cc65ef488))
|
|
189
132
|
|
|
190
133
|
## 1.12.2 (2022-01-15)
|
|
191
134
|
|
|
192
|
-
|
|
193
|
-
|
|
194
135
|
## 1.12.1 (2022-01-14)
|
|
195
136
|
|
|
196
|
-
|
|
197
|
-
|
|
198
137
|
# 1.12.0 (2022-01-08)
|
|
199
138
|
|
|
200
|
-
|
|
201
139
|
### Bug Fixes
|
|
202
140
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
141
|
+
- Fixed downloadMedia (fix [#463](https://github.com/wppconnect-team/wppconnect/issues/463)) ([ea9ba75](https://github.com/wppconnect-team/wppconnect/commit/ea9ba75ec3e24103a7ccf55b0df43ffc8d46271b))
|
|
206
142
|
|
|
207
143
|
## 1.11.1 (2021-12-09)
|
|
208
144
|
|
|
209
|
-
|
|
210
145
|
### Bug Fixes
|
|
211
146
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
147
|
+
- Fixed getNumberProfile function (fix [#717](https://github.com/wppconnect-team/wppconnect/issues/717)) ([89a0720](https://github.com/wppconnect-team/wppconnect/commit/89a072066991213d301739b0788d19f05a9b0912))
|
|
215
148
|
|
|
216
149
|
# 1.11.0 (2021-12-09)
|
|
217
150
|
|
|
218
|
-
|
|
219
151
|
### Bug Fixes
|
|
220
152
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
153
|
+
- Fixed initialization of onPresenceChanged (fix [#704](https://github.com/wppconnect-team/wppconnect/issues/704)) ([0470ea8](https://github.com/wppconnect-team/wppconnect/commit/0470ea8a0fd15727f91e18c913b96f3c1e1f79a9))
|
|
224
154
|
|
|
225
155
|
## 1.10.3 (2021-11-18)
|
|
226
156
|
|
|
227
|
-
|
|
228
|
-
|
|
229
157
|
## 1.10.2 (2021-11-15)
|
|
230
158
|
|
|
231
|
-
|
|
232
159
|
### Bug Fixes
|
|
233
160
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
161
|
+
- Fixed call of createWid function (fix [#647](https://github.com/wppconnect-team/wppconnect/issues/647)) ([c381000](https://github.com/wppconnect-team/wppconnect/commit/c3810003a4f145f9c3ec54f49cde97ddbe01a164))
|
|
237
162
|
|
|
238
163
|
## 1.10.1 (2021-11-11)
|
|
239
164
|
|
|
240
|
-
|
|
241
165
|
### Features
|
|
242
166
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
167
|
+
- Updated to latest version of WhatsApp ([f6d01a3](https://github.com/wppconnect-team/wppconnect/commit/f6d01a390db9577f46fee0072637ece981e54780))
|
|
246
168
|
|
|
247
169
|
# 1.10.0 (2021-11-06)
|
|
248
170
|
|
|
249
|
-
|
|
250
|
-
|
|
251
171
|
## 1.9.4 (2021-10-21)
|
|
252
172
|
|
|
253
|
-
|
|
254
|
-
|
|
255
173
|
## 1.9.3 (2021-10-21)
|
|
256
174
|
|
|
257
|
-
|
|
258
175
|
### Bug Fixes
|
|
259
176
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
177
|
+
- Fixed close method ([#579](https://github.com/wppconnect-team/wppconnect/issues/579)) ([ef42485](https://github.com/wppconnect-team/wppconnect/commit/ef42485505e9920b5b7826674949ed9d5e36d4e1))
|
|
263
178
|
|
|
264
179
|
## 1.9.2 (2021-10-12)
|
|
265
180
|
|
|
266
|
-
|
|
267
181
|
### Features
|
|
268
182
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
183
|
+
- Added onRevokedMessage (close [#434](https://github.com/wppconnect-team/wppconnect/issues/434)) ([b5df5bb](https://github.com/wppconnect-team/wppconnect/commit/b5df5bbcc3418204744057cf45089c3bb2228c57))
|
|
272
184
|
|
|
273
185
|
## 1.9.1 (2021-10-02)
|
|
274
186
|
|
|
275
|
-
|
|
276
187
|
### Features
|
|
277
188
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
189
|
+
- Added option to use setProfilePic using base64 (close [#505](https://github.com/wppconnect-team/wppconnect/issues/505)) ([87f1841](https://github.com/wppconnect-team/wppconnect/commit/87f184128c2b458f128ff26ac9ea081537b4c2a4))
|
|
281
190
|
|
|
282
191
|
# 1.9.0 (2021-10-02)
|
|
283
192
|
|
|
284
|
-
|
|
285
|
-
|
|
286
193
|
## 1.8.14 (2021-09-19)
|
|
287
194
|
|
|
288
|
-
|
|
289
195
|
### Bug Fixes
|
|
290
196
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
197
|
+
- Allow to define chat type in sendMessageOptions (close [#504](https://github.com/wppconnect-team/wppconnect/issues/504)) ([bf76179](https://github.com/wppconnect-team/wppconnect/commit/bf761794559c02a5f7a2d842e68fd6562b68b0cb))
|
|
294
198
|
|
|
295
199
|
## 1.8.13 (2021-08-19)
|
|
296
200
|
|
|
297
|
-
|
|
298
201
|
### Bug Fixes
|
|
299
202
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
203
|
+
- Fixed file mime-type detection (fix [#409](https://github.com/wppconnect-team/wppconnect/issues/409)) ([1609e34](https://github.com/wppconnect-team/wppconnect/commit/1609e34e89b02eaba57cd2c0ef17e94393e89916))
|
|
303
204
|
|
|
304
205
|
## 1.8.12 (2021-08-05)
|
|
305
206
|
|
|
306
|
-
|
|
307
|
-
|
|
308
207
|
## 1.8.11 (2021-08-04)
|
|
309
208
|
|
|
310
|
-
|
|
311
209
|
### Features
|
|
312
210
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
211
|
+
- Added setOnlinePresence function to define your presence ([627d1a5](https://github.com/wppconnect-team/wppconnect/commit/627d1a5f3a76ea4813420a4fc25784362497da39))
|
|
316
212
|
|
|
317
213
|
## 1.8.10 (2021-07-31)
|
|
318
214
|
|
|
319
|
-
|
|
320
215
|
### Bug Fixes
|
|
321
216
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
217
|
+
- Corrigido erro "null to object" ao enviar mensagem (fix [#378](https://github.com/wppconnect-team/wppconnect/issues/378)) ([ec103b9](https://github.com/wppconnect-team/wppconnect/commit/ec103b9cae33b993f95cacdb2a1d35fd3e4ecacc))
|
|
325
218
|
|
|
326
219
|
## 1.8.9 (2021-07-27)
|
|
327
220
|
|
|
328
|
-
|
|
329
221
|
### Bug Fixes
|
|
330
222
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
223
|
+
- Corrigido a função de fixar conversas (pinChat) (fix [#338](https://github.com/wppconnect-team/wppconnect/issues/338)) ([f6bf1f3](https://github.com/wppconnect-team/wppconnect/commit/f6bf1f3f1598719d38eeb9d84bf3a9c0d87de18d))
|
|
334
224
|
|
|
335
225
|
## 1.8.8 (2021-07-27)
|
|
336
226
|
|
|
337
|
-
|
|
338
227
|
### Bug Fixes
|
|
339
228
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
229
|
+
- Corrigido problema de ES Module (fix [#362](https://github.com/wppconnect-team/wppconnect/issues/362)) ([dcdefc4](https://github.com/wppconnect-team/wppconnect/commit/dcdefc4e7e0dbeb5cd3678ee0b7e7f92e8210dba))
|
|
343
230
|
|
|
344
231
|
## 1.8.7 (2021-07-26)
|
|
345
232
|
|
|
346
|
-
|
|
347
|
-
|
|
348
233
|
## 1.8.6 (2021-07-23)
|
|
349
234
|
|
|
350
|
-
|
|
351
|
-
|
|
352
235
|
## [1.8.5](https://github.com/wppconnect-team/wppconnect/compare/v1.8.4...v1.8.5) (2021-07-20)
|
|
353
236
|
|
|
354
|
-
|
|
355
|
-
|
|
356
237
|
## 1.8.4 (2021-07-20)
|
|
357
238
|
|
|
358
|
-
|
|
359
239
|
### Bug Fixes
|
|
360
240
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
241
|
+
- Corrigido o envio de arquivos de tipos de áudio via URL (fix [#329](https://github.com/wppconnect-team/wppconnect/issues/329)) ([6e8b836](https://github.com/wppconnect-team/wppconnect/commit/6e8b836f40ecda9df4870b09d6fc11410a15e1f6))
|
|
364
242
|
|
|
365
243
|
## 1.8.3 (2021-07-14)
|
|
366
244
|
|
|
367
|
-
|
|
368
245
|
### Bug Fixes
|
|
369
246
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
247
|
+
- Corrigido disparos de onNotificationMessage e onParticipantsChanged ao iniciar ([d421f7b](https://github.com/wppconnect-team/wppconnect/commit/d421f7bc860ec4cee503340c14e676692094ac1d))
|
|
373
248
|
|
|
374
249
|
## 1.8.2 (2021-07-14)
|
|
375
250
|
|
|
376
|
-
|
|
377
251
|
### Features
|
|
378
252
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
253
|
+
- Adicionado recurso de recusar ligação do WhatsApp (close [#299](https://github.com/wppconnect-team/wppconnect/issues/299)) ([e7ef0b6](https://github.com/wppconnect-team/wppconnect/commit/e7ef0b6db0aecf57bd058c681127a0bdd756636b))
|
|
382
254
|
|
|
383
255
|
## [1.8.1](https://github.com/wppconnect-team/wppconnect/compare/v1.8.0...v1.8.1) (2021-07-12)
|
|
384
256
|
|
package/README.md
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/@wppconnect-team/wppconnect)
|
|
7
7
|
[](https://isitmaintained.com/project/wppconnect-team/wppconnect 'Average time to resolve an issue')
|
|
8
8
|
[](https://isitmaintained.com/project/wppconnect-team/wppconnect 'Percentage of issues still open')
|
|
9
|
-
[](https://github.com/wppconnect-team/wppconnect/actions)
|
|
10
|
+
[](https://github.com/wppconnect-team/wppconnect/actions)
|
|
11
11
|
[](https://github.com/release-it/release-it)
|
|
12
12
|
|
|
13
13
|
> 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... 😀🤔💭
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
[](https://discord.gg/JU5JGGKGNG)
|
|
24
24
|
[](https://t.me/wppconnect)
|
|
25
|
-
[](https://chat.whatsapp.com/
|
|
25
|
+
[](https://chat.whatsapp.com/LJaQu6ZyNvnBPNAVRbX00K)
|
|
26
26
|
[](https://www.youtube.com/c/wppconnect)
|
|
27
27
|
|
|
28
28
|
## Functions
|
|
@@ -72,6 +72,10 @@ interested please open a Pull Request.
|
|
|
72
72
|
Pull requests are welcome. For major changes, please open an issue first to
|
|
73
73
|
discuss what you would like to change.
|
|
74
74
|
|
|
75
|
+
## Star History
|
|
76
|
+
|
|
77
|
+
[](https://star-history.com/#wppconnect-team/wppconnect&wppconnect-team/wa-js&Date)
|
|
78
|
+
|
|
75
79
|
## License
|
|
76
80
|
|
|
77
81
|
This file is part of WPPConnect.
|
|
@@ -4,6 +4,30 @@ import { HostLayer } from './host.layer';
|
|
|
4
4
|
export declare class CatalogLayer extends HostLayer {
|
|
5
5
|
page: Page;
|
|
6
6
|
constructor(page: Page, session?: string, options?: CreateConfig);
|
|
7
|
+
/**
|
|
8
|
+
* Create a product on catalog
|
|
9
|
+
* @param name Product name
|
|
10
|
+
* @param image Product image
|
|
11
|
+
* @param description Product description
|
|
12
|
+
* @param price Product price
|
|
13
|
+
* @param isHidden Product visibility
|
|
14
|
+
* @param url Product url
|
|
15
|
+
* @param retailerId Product own ID system
|
|
16
|
+
* @param currency Product currency
|
|
17
|
+
* @example
|
|
18
|
+
* ```javascript
|
|
19
|
+
* client.createtProduct(
|
|
20
|
+
* 'Product name',
|
|
21
|
+
* 'image in base64',
|
|
22
|
+
* 'product description',
|
|
23
|
+
* '89.90',
|
|
24
|
+
* true,
|
|
25
|
+
* 'https://wppconnect.io',
|
|
26
|
+
* 'AKA001',
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
createProduct(name: string, image: string, description: string, price: number, isHidden: boolean, url: string, retailerId: string, currency: string): Promise<import("@wppconnect/wa-js/dist/whatsapp").ProductModel>;
|
|
7
31
|
/**
|
|
8
32
|
* Querys all products
|
|
9
33
|
* @param id Buisness profile id ('00000@c.us')
|
|
@@ -77,6 +77,48 @@ var CatalogLayer = /** @class */ (function (_super) {
|
|
|
77
77
|
_this.page = page;
|
|
78
78
|
return _this;
|
|
79
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Create a product on catalog
|
|
82
|
+
* @param name Product name
|
|
83
|
+
* @param image Product image
|
|
84
|
+
* @param description Product description
|
|
85
|
+
* @param price Product price
|
|
86
|
+
* @param isHidden Product visibility
|
|
87
|
+
* @param url Product url
|
|
88
|
+
* @param retailerId Product own ID system
|
|
89
|
+
* @param currency Product currency
|
|
90
|
+
* @example
|
|
91
|
+
* ```javascript
|
|
92
|
+
* client.createtProduct(
|
|
93
|
+
* 'Product name',
|
|
94
|
+
* 'image in base64',
|
|
95
|
+
* 'product description',
|
|
96
|
+
* '89.90',
|
|
97
|
+
* true,
|
|
98
|
+
* 'https://wppconnect.io',
|
|
99
|
+
* 'AKA001',
|
|
100
|
+
* );
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
CatalogLayer.prototype.createProduct = function (name, image, description, price, isHidden, url, retailerId, currency) {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
105
|
+
return __generator(this, function (_a) {
|
|
106
|
+
return [2 /*return*/, (0, helpers_1.evaluateAndReturn)(this.page, function (_a) {
|
|
107
|
+
var name = _a.name, image = _a.image, description = _a.description, price = _a.price, isHidden = _a.isHidden, url = _a.url, retailerId = _a.retailerId, currency = _a.currency;
|
|
108
|
+
return WPP.catalog.createProduct({
|
|
109
|
+
name: name,
|
|
110
|
+
image: image,
|
|
111
|
+
description: description,
|
|
112
|
+
price: price,
|
|
113
|
+
isHidden: isHidden,
|
|
114
|
+
url: url,
|
|
115
|
+
retailerId: retailerId,
|
|
116
|
+
currency: currency,
|
|
117
|
+
});
|
|
118
|
+
}, { name: name, image: image, description: description, price: price, isHidden: isHidden, url: url, retailerId: retailerId, currency: currency })];
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
};
|
|
80
122
|
/**
|
|
81
123
|
* Querys all products
|
|
82
124
|
* @param id Buisness profile id ('00000@c.us')
|
|
@@ -79,11 +79,13 @@ export declare class GroupLayer extends RetrieverLayer {
|
|
|
79
79
|
createGroup(groupName: string, contacts: string | string[]): Promise<{
|
|
80
80
|
gid: import("@wppconnect/wa-js/dist/whatsapp").Wid;
|
|
81
81
|
participants: {
|
|
82
|
-
[key:
|
|
83
|
-
|
|
82
|
+
[key: `${number}@c.us`]: {
|
|
83
|
+
wid: string;
|
|
84
|
+
code: number;
|
|
85
|
+
invite_code: string;
|
|
86
|
+
invite_code_exp: number;
|
|
84
87
|
};
|
|
85
|
-
}
|
|
86
|
-
status: number;
|
|
88
|
+
};
|
|
87
89
|
}>;
|
|
88
90
|
/**
|
|
89
91
|
* Removes participant from group
|
|
@@ -100,6 +102,7 @@ export declare class GroupLayer extends RetrieverLayer {
|
|
|
100
102
|
*/
|
|
101
103
|
addParticipant(groupId: string, participantId: string | string[]): Promise<{
|
|
102
104
|
[key: `${number}@c.us`]: {
|
|
105
|
+
wid: string;
|
|
103
106
|
code: number;
|
|
104
107
|
message: string;
|
|
105
108
|
invite_code: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Page } from 'puppeteer';
|
|
2
2
|
import { CreateConfig } from '../../config/create-config';
|
|
3
|
-
import { Ack, Chat, LiveLocation, Message, ParticipantEvent, PresenceEvent } from '../model';
|
|
3
|
+
import { Ack, Chat, LiveLocation, Message, ParticipantEvent, PresenceEvent, Wid } from '../model';
|
|
4
4
|
import { SocketState, SocketStream } from '../model/enum';
|
|
5
5
|
import { InterfaceMode } from '../model/enum/interface-mode';
|
|
6
6
|
import { InterfaceState } from '../model/enum/interface-state';
|
|
@@ -212,4 +212,17 @@ export declare class ListenerLayer extends ProfileLayer {
|
|
|
212
212
|
}) => any): {
|
|
213
213
|
dispose: () => void;
|
|
214
214
|
};
|
|
215
|
+
/**
|
|
216
|
+
* @event Listens to poll response messages
|
|
217
|
+
* @returns Disposable object to stop the listening
|
|
218
|
+
*/
|
|
219
|
+
onPollResponse(callback: (data: {
|
|
220
|
+
msgId: string;
|
|
221
|
+
chatId: Wid;
|
|
222
|
+
selectedOptions: any;
|
|
223
|
+
timestamp: number;
|
|
224
|
+
sender: Wid;
|
|
225
|
+
}) => any): {
|
|
226
|
+
dispose: () => void;
|
|
227
|
+
};
|
|
215
228
|
}
|
|
@@ -124,6 +124,7 @@ var ListenerLayer = /** @class */ (function (_super) {
|
|
|
124
124
|
'onIncomingCall',
|
|
125
125
|
'onRevokedMessage',
|
|
126
126
|
'onReactionMessage',
|
|
127
|
+
'onPollResponse',
|
|
127
128
|
], false);
|
|
128
129
|
_loop_1 = function (func) {
|
|
129
130
|
var has;
|
|
@@ -321,6 +322,24 @@ var ListenerLayer = /** @class */ (function (_super) {
|
|
|
321
322
|
catch (error) {
|
|
322
323
|
console.error(error);
|
|
323
324
|
}
|
|
325
|
+
try {
|
|
326
|
+
if (!window['onPollResponse'].exposed) {
|
|
327
|
+
WPP.on('chat.poll_response', function (data) {
|
|
328
|
+
var eventData = {
|
|
329
|
+
msgId: data.msgId,
|
|
330
|
+
chatId: data.chatId,
|
|
331
|
+
selectedOptions: data.selectedOptions,
|
|
332
|
+
timestamp: data.timestamp,
|
|
333
|
+
sender: data.sender,
|
|
334
|
+
};
|
|
335
|
+
window['onPollResponse'](eventData);
|
|
336
|
+
});
|
|
337
|
+
window['onPollResponse'].exposed = true;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
catch (error) {
|
|
341
|
+
console.error(error);
|
|
342
|
+
}
|
|
324
343
|
try {
|
|
325
344
|
if (!window['onParticipantsChanged'].exposed) {
|
|
326
345
|
WPP.on('group.participant_changed', function (participantChangedEvent) {
|
|
@@ -546,6 +565,13 @@ var ListenerLayer = /** @class */ (function (_super) {
|
|
|
546
565
|
ListenerLayer.prototype.onReactionMessage = function (callback) {
|
|
547
566
|
return this.registerEvent('onReactionMessage', callback);
|
|
548
567
|
};
|
|
568
|
+
/**
|
|
569
|
+
* @event Listens to poll response messages
|
|
570
|
+
* @returns Disposable object to stop the listening
|
|
571
|
+
*/
|
|
572
|
+
ListenerLayer.prototype.onPollResponse = function (callback) {
|
|
573
|
+
return this.registerEvent('onPollResponse', callback);
|
|
574
|
+
};
|
|
549
575
|
return ListenerLayer;
|
|
550
576
|
}(profile_layer_1.ProfileLayer));
|
|
551
577
|
exports.ListenerLayer = ListenerLayer;
|