@hansaka02/baileys 1.0.0 → 7.3.2
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 +172 -172
- package/WAProto/AICommon/AICommon.d.ts +7102 -5380
- package/WAProto/AICommon/AICommon.js +13991 -9169
- package/WAProto/AICommon/AICommon.proto +110 -3
- package/WAProto/CompanionReg/CompanionReg.d.ts +27 -0
- package/WAProto/CompanionReg/CompanionReg.js +114 -0
- package/WAProto/CompanionReg/CompanionReg.proto +3 -0
- package/WAProto/DeviceCapabilities/DeviceCapabilities.d.ts +244 -0
- package/WAProto/DeviceCapabilities/DeviceCapabilities.js +652 -0
- package/WAProto/DeviceCapabilities/DeviceCapabilities.proto +19 -0
- package/WAProto/E2E/E2E.d.ts +7234 -1003
- package/WAProto/E2E/E2E.js +77193 -51248
- package/WAProto/E2E/E2E.proto +68 -12
- package/WAProto/HistorySync/HistorySync.d.ts +1195 -75
- package/WAProto/HistorySync/HistorySync.js +3375 -178
- package/WAProto/HistorySync/HistorySync.proto +3 -3
- package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.d.ts +18 -6
- package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.js +98 -49
- package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.proto +2 -2
- package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.d.ts +7468 -1051
- package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.js +75226 -48422
- package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.proto +6 -0
- package/WAProto/StatusAttributions/StatusAttributions.d.ts +5 -2
- package/WAProto/StatusAttributions/StatusAttributions.js +21 -0
- package/WAProto/StatusAttributions/StatusAttributions.proto +3 -0
- package/WAProto/SyncAction/SyncAction.d.ts +2271 -280
- package/WAProto/SyncAction/SyncAction.js +9423 -2023
- package/WAProto/SyncAction/SyncAction.proto +208 -15
- package/WAProto/Wa6/Wa6.d.ts +20 -1
- package/WAProto/Wa6/Wa6.js +83 -0
- package/WAProto/Wa6/Wa6.proto +3 -0
- package/WAProto/Web/Web.d.ts +8207 -1194
- package/WAProto/Web/Web.js +92664 -63403
- package/WAProto/Web/Web.proto +31 -13
- package/lib/Defaults/baileys-version.json +1 -1
- package/lib/Socket/messages-recv.js +9 -1
- package/lib/Types/MexUpdates.js +1 -0
- package/lib/Utils/crypto.js +1 -1
- package/lib/Utils/decode-wa-message.js +14 -16
- package/lib/Utils/generics.js +63 -16
- package/lib/Utils/messages.js +40 -0
- package/lib/Utils/process-message.js +336 -24
- package/lib/Utils/validate-connection.js +51 -9
- package/package.json +19 -19
|
@@ -14,6 +14,15 @@ export namespace DeviceCapabilities {
|
|
|
14
14
|
|
|
15
15
|
/** DeviceCapabilities businessBroadcast */
|
|
16
16
|
businessBroadcast?: (DeviceCapabilities.DeviceCapabilities.IBusinessBroadcast|null);
|
|
17
|
+
|
|
18
|
+
/** DeviceCapabilities userHasAvatar */
|
|
19
|
+
userHasAvatar?: (DeviceCapabilities.DeviceCapabilities.IUserHasAvatar|null);
|
|
20
|
+
|
|
21
|
+
/** DeviceCapabilities memberNameTagPrimarySupport */
|
|
22
|
+
memberNameTagPrimarySupport?: (DeviceCapabilities.DeviceCapabilities.MemberNameTagPrimarySupport|null);
|
|
23
|
+
|
|
24
|
+
/** DeviceCapabilities aiThread */
|
|
25
|
+
aiThread?: (DeviceCapabilities.DeviceCapabilities.IAiThread|null);
|
|
17
26
|
}
|
|
18
27
|
|
|
19
28
|
/** Represents a DeviceCapabilities. */
|
|
@@ -34,6 +43,15 @@ export namespace DeviceCapabilities {
|
|
|
34
43
|
/** DeviceCapabilities businessBroadcast. */
|
|
35
44
|
public businessBroadcast?: (DeviceCapabilities.DeviceCapabilities.IBusinessBroadcast|null);
|
|
36
45
|
|
|
46
|
+
/** DeviceCapabilities userHasAvatar. */
|
|
47
|
+
public userHasAvatar?: (DeviceCapabilities.DeviceCapabilities.IUserHasAvatar|null);
|
|
48
|
+
|
|
49
|
+
/** DeviceCapabilities memberNameTagPrimarySupport. */
|
|
50
|
+
public memberNameTagPrimarySupport?: (DeviceCapabilities.DeviceCapabilities.MemberNameTagPrimarySupport|null);
|
|
51
|
+
|
|
52
|
+
/** DeviceCapabilities aiThread. */
|
|
53
|
+
public aiThread?: (DeviceCapabilities.DeviceCapabilities.IAiThread|null);
|
|
54
|
+
|
|
37
55
|
/** DeviceCapabilities _chatLockSupportLevel. */
|
|
38
56
|
public _chatLockSupportLevel?: "chatLockSupportLevel";
|
|
39
57
|
|
|
@@ -43,6 +61,15 @@ export namespace DeviceCapabilities {
|
|
|
43
61
|
/** DeviceCapabilities _businessBroadcast. */
|
|
44
62
|
public _businessBroadcast?: "businessBroadcast";
|
|
45
63
|
|
|
64
|
+
/** DeviceCapabilities _userHasAvatar. */
|
|
65
|
+
public _userHasAvatar?: "userHasAvatar";
|
|
66
|
+
|
|
67
|
+
/** DeviceCapabilities _memberNameTagPrimarySupport. */
|
|
68
|
+
public _memberNameTagPrimarySupport?: "memberNameTagPrimarySupport";
|
|
69
|
+
|
|
70
|
+
/** DeviceCapabilities _aiThread. */
|
|
71
|
+
public _aiThread?: "aiThread";
|
|
72
|
+
|
|
46
73
|
/**
|
|
47
74
|
* Creates a new DeviceCapabilities instance using the specified properties.
|
|
48
75
|
* @param [properties] Properties to set
|
|
@@ -123,6 +150,116 @@ export namespace DeviceCapabilities {
|
|
|
123
150
|
|
|
124
151
|
namespace DeviceCapabilities {
|
|
125
152
|
|
|
153
|
+
/** Properties of an AiThread. */
|
|
154
|
+
interface IAiThread {
|
|
155
|
+
|
|
156
|
+
/** AiThread supportLevel */
|
|
157
|
+
supportLevel?: (DeviceCapabilities.DeviceCapabilities.AiThread.SupportLevel|null);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/** Represents an AiThread. */
|
|
161
|
+
class AiThread implements IAiThread {
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Constructs a new AiThread.
|
|
165
|
+
* @param [properties] Properties to set
|
|
166
|
+
*/
|
|
167
|
+
constructor(properties?: DeviceCapabilities.DeviceCapabilities.IAiThread);
|
|
168
|
+
|
|
169
|
+
/** AiThread supportLevel. */
|
|
170
|
+
public supportLevel?: (DeviceCapabilities.DeviceCapabilities.AiThread.SupportLevel|null);
|
|
171
|
+
|
|
172
|
+
/** AiThread _supportLevel. */
|
|
173
|
+
public _supportLevel?: "supportLevel";
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Creates a new AiThread instance using the specified properties.
|
|
177
|
+
* @param [properties] Properties to set
|
|
178
|
+
* @returns AiThread instance
|
|
179
|
+
*/
|
|
180
|
+
public static create(properties?: DeviceCapabilities.DeviceCapabilities.IAiThread): DeviceCapabilities.DeviceCapabilities.AiThread;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Encodes the specified AiThread message. Does not implicitly {@link DeviceCapabilities.DeviceCapabilities.AiThread.verify|verify} messages.
|
|
184
|
+
* @param message AiThread message or plain object to encode
|
|
185
|
+
* @param [writer] Writer to encode to
|
|
186
|
+
* @returns Writer
|
|
187
|
+
*/
|
|
188
|
+
public static encode(message: DeviceCapabilities.DeviceCapabilities.IAiThread, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Encodes the specified AiThread message, length delimited. Does not implicitly {@link DeviceCapabilities.DeviceCapabilities.AiThread.verify|verify} messages.
|
|
192
|
+
* @param message AiThread message or plain object to encode
|
|
193
|
+
* @param [writer] Writer to encode to
|
|
194
|
+
* @returns Writer
|
|
195
|
+
*/
|
|
196
|
+
public static encodeDelimited(message: DeviceCapabilities.DeviceCapabilities.IAiThread, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Decodes an AiThread message from the specified reader or buffer.
|
|
200
|
+
* @param reader Reader or buffer to decode from
|
|
201
|
+
* @param [length] Message length if known beforehand
|
|
202
|
+
* @returns AiThread
|
|
203
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
204
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
205
|
+
*/
|
|
206
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): DeviceCapabilities.DeviceCapabilities.AiThread;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Decodes an AiThread message from the specified reader or buffer, length delimited.
|
|
210
|
+
* @param reader Reader or buffer to decode from
|
|
211
|
+
* @returns AiThread
|
|
212
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
213
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
214
|
+
*/
|
|
215
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): DeviceCapabilities.DeviceCapabilities.AiThread;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Verifies an AiThread message.
|
|
219
|
+
* @param message Plain object to verify
|
|
220
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
221
|
+
*/
|
|
222
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Creates an AiThread message from a plain object. Also converts values to their respective internal types.
|
|
226
|
+
* @param object Plain object
|
|
227
|
+
* @returns AiThread
|
|
228
|
+
*/
|
|
229
|
+
public static fromObject(object: { [k: string]: any }): DeviceCapabilities.DeviceCapabilities.AiThread;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Creates a plain object from an AiThread message. Also converts values to other types if specified.
|
|
233
|
+
* @param message AiThread
|
|
234
|
+
* @param [options] Conversion options
|
|
235
|
+
* @returns Plain object
|
|
236
|
+
*/
|
|
237
|
+
public static toObject(message: DeviceCapabilities.DeviceCapabilities.AiThread, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Converts this AiThread to JSON.
|
|
241
|
+
* @returns JSON object
|
|
242
|
+
*/
|
|
243
|
+
public toJSON(): { [k: string]: any };
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Gets the default type url for AiThread
|
|
247
|
+
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
248
|
+
* @returns The default type url
|
|
249
|
+
*/
|
|
250
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
namespace AiThread {
|
|
254
|
+
|
|
255
|
+
/** SupportLevel enum. */
|
|
256
|
+
enum SupportLevel {
|
|
257
|
+
NONE = 0,
|
|
258
|
+
INFRA = 1,
|
|
259
|
+
FULL = 2
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
126
263
|
/** Properties of a BusinessBroadcast. */
|
|
127
264
|
interface IBusinessBroadcast {
|
|
128
265
|
|
|
@@ -329,5 +466,112 @@ export namespace DeviceCapabilities {
|
|
|
329
466
|
*/
|
|
330
467
|
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
331
468
|
}
|
|
469
|
+
|
|
470
|
+
/** MemberNameTagPrimarySupport enum. */
|
|
471
|
+
enum MemberNameTagPrimarySupport {
|
|
472
|
+
DISABLED = 0,
|
|
473
|
+
RECEIVER_ENABLED = 1,
|
|
474
|
+
SENDER_ENABLED = 2
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/** Properties of a UserHasAvatar. */
|
|
478
|
+
interface IUserHasAvatar {
|
|
479
|
+
|
|
480
|
+
/** UserHasAvatar userHasAvatar */
|
|
481
|
+
userHasAvatar?: (boolean|null);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/** Represents a UserHasAvatar. */
|
|
485
|
+
class UserHasAvatar implements IUserHasAvatar {
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Constructs a new UserHasAvatar.
|
|
489
|
+
* @param [properties] Properties to set
|
|
490
|
+
*/
|
|
491
|
+
constructor(properties?: DeviceCapabilities.DeviceCapabilities.IUserHasAvatar);
|
|
492
|
+
|
|
493
|
+
/** UserHasAvatar userHasAvatar. */
|
|
494
|
+
public userHasAvatar?: (boolean|null);
|
|
495
|
+
|
|
496
|
+
/** UserHasAvatar _userHasAvatar. */
|
|
497
|
+
public _userHasAvatar?: "userHasAvatar";
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Creates a new UserHasAvatar instance using the specified properties.
|
|
501
|
+
* @param [properties] Properties to set
|
|
502
|
+
* @returns UserHasAvatar instance
|
|
503
|
+
*/
|
|
504
|
+
public static create(properties?: DeviceCapabilities.DeviceCapabilities.IUserHasAvatar): DeviceCapabilities.DeviceCapabilities.UserHasAvatar;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Encodes the specified UserHasAvatar message. Does not implicitly {@link DeviceCapabilities.DeviceCapabilities.UserHasAvatar.verify|verify} messages.
|
|
508
|
+
* @param message UserHasAvatar message or plain object to encode
|
|
509
|
+
* @param [writer] Writer to encode to
|
|
510
|
+
* @returns Writer
|
|
511
|
+
*/
|
|
512
|
+
public static encode(message: DeviceCapabilities.DeviceCapabilities.IUserHasAvatar, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Encodes the specified UserHasAvatar message, length delimited. Does not implicitly {@link DeviceCapabilities.DeviceCapabilities.UserHasAvatar.verify|verify} messages.
|
|
516
|
+
* @param message UserHasAvatar message or plain object to encode
|
|
517
|
+
* @param [writer] Writer to encode to
|
|
518
|
+
* @returns Writer
|
|
519
|
+
*/
|
|
520
|
+
public static encodeDelimited(message: DeviceCapabilities.DeviceCapabilities.IUserHasAvatar, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Decodes a UserHasAvatar message from the specified reader or buffer.
|
|
524
|
+
* @param reader Reader or buffer to decode from
|
|
525
|
+
* @param [length] Message length if known beforehand
|
|
526
|
+
* @returns UserHasAvatar
|
|
527
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
528
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
529
|
+
*/
|
|
530
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): DeviceCapabilities.DeviceCapabilities.UserHasAvatar;
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Decodes a UserHasAvatar message from the specified reader or buffer, length delimited.
|
|
534
|
+
* @param reader Reader or buffer to decode from
|
|
535
|
+
* @returns UserHasAvatar
|
|
536
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
537
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
538
|
+
*/
|
|
539
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): DeviceCapabilities.DeviceCapabilities.UserHasAvatar;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Verifies a UserHasAvatar message.
|
|
543
|
+
* @param message Plain object to verify
|
|
544
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
545
|
+
*/
|
|
546
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Creates a UserHasAvatar message from a plain object. Also converts values to their respective internal types.
|
|
550
|
+
* @param object Plain object
|
|
551
|
+
* @returns UserHasAvatar
|
|
552
|
+
*/
|
|
553
|
+
public static fromObject(object: { [k: string]: any }): DeviceCapabilities.DeviceCapabilities.UserHasAvatar;
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Creates a plain object from a UserHasAvatar message. Also converts values to other types if specified.
|
|
557
|
+
* @param message UserHasAvatar
|
|
558
|
+
* @param [options] Conversion options
|
|
559
|
+
* @returns Plain object
|
|
560
|
+
*/
|
|
561
|
+
public static toObject(message: DeviceCapabilities.DeviceCapabilities.UserHasAvatar, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Converts this UserHasAvatar to JSON.
|
|
565
|
+
* @returns JSON object
|
|
566
|
+
*/
|
|
567
|
+
public toJSON(): { [k: string]: any };
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Gets the default type url for UserHasAvatar
|
|
571
|
+
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
572
|
+
* @returns The default type url
|
|
573
|
+
*/
|
|
574
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
575
|
+
}
|
|
332
576
|
}
|
|
333
577
|
}
|