baron-baileys-v2 1.3.2 → 1.3.4
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/WAProto/WAProto.proto +19 -1
- package/WAProto/index.d.ts +159 -1
- package/WAProto/index.js +636 -0
- package/package.json +10 -10
- package/src/Defaults/index.js +20 -4
- package/src/Socket/socket.js +1 -1
- package/src/Utils/auth-utils.js +45 -25
- package/src/Utils/decode-wa-message.js +18 -19
- package/src/Utils/messages-media.js +35 -21
- package/src/Utils/messages.js +21 -18
- package/src/Utils/process-message.js +22 -39
- package/src/Utils/use-multi-file-auth-state.js +58 -45
package/WAProto/WAProto.proto
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
package proto;
|
|
3
3
|
|
|
4
|
-
/// WhatsApp Version: 2.3000.
|
|
4
|
+
/// WhatsApp Version: 2.3000.1033685351
|
|
5
5
|
|
|
6
6
|
message ADVDeviceIdentity {
|
|
7
7
|
optional uint32 rawId = 1;
|
|
@@ -342,6 +342,14 @@ message BotAgeCollectionMetadata {
|
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
+
message BotAvatarMetadata {
|
|
346
|
+
optional uint32 sentiment = 1;
|
|
347
|
+
optional string behaviorGraph = 2;
|
|
348
|
+
optional uint32 action = 3;
|
|
349
|
+
optional uint32 intensity = 4;
|
|
350
|
+
optional uint32 wordCount = 5;
|
|
351
|
+
}
|
|
352
|
+
|
|
345
353
|
message BotCapabilityMetadata {
|
|
346
354
|
repeated BotCapabilityType capabilities = 1;
|
|
347
355
|
enum BotCapabilityType {
|
|
@@ -600,6 +608,7 @@ message BotMessageSharingInfo {
|
|
|
600
608
|
}
|
|
601
609
|
|
|
602
610
|
message BotMetadata {
|
|
611
|
+
optional BotAvatarMetadata avatarMetadata = 1;
|
|
603
612
|
optional string personaId = 2;
|
|
604
613
|
optional BotPluginMetadata pluginMetadata = 3;
|
|
605
614
|
optional BotSuggestedPromptMetadata suggestedPromptMetadata = 4;
|
|
@@ -1382,6 +1391,7 @@ message ContextInfo {
|
|
|
1382
1391
|
optional bool isSpoiler = 73;
|
|
1383
1392
|
optional MediaDomainInfo mediaDomainInfo = 74;
|
|
1384
1393
|
optional PartiallySelectedContent partiallySelectedContent = 75;
|
|
1394
|
+
optional uint32 afterReadDurationMs = 76;
|
|
1385
1395
|
message AdReplyInfo {
|
|
1386
1396
|
optional string advertiserName = 1;
|
|
1387
1397
|
optional MediaType mediaType = 2;
|
|
@@ -1697,6 +1707,7 @@ message DeviceProps {
|
|
|
1697
1707
|
optional bool completeOnDemandReady = 18;
|
|
1698
1708
|
optional uint32 thumbnailSyncDaysLimit = 19;
|
|
1699
1709
|
optional uint32 initialSyncMaxMessagesPerChat = 20;
|
|
1710
|
+
optional bool supportManusHistory = 21;
|
|
1700
1711
|
}
|
|
1701
1712
|
|
|
1702
1713
|
enum PlatformType {
|
|
@@ -3531,10 +3542,15 @@ message Message {
|
|
|
3531
3542
|
|
|
3532
3543
|
message RequestWelcomeMessageMetadata {
|
|
3533
3544
|
optional LocalChatState localChatState = 1;
|
|
3545
|
+
optional WelcomeTrigger welcomeTrigger = 2;
|
|
3534
3546
|
enum LocalChatState {
|
|
3535
3547
|
EMPTY = 0;
|
|
3536
3548
|
NON_EMPTY = 1;
|
|
3537
3549
|
}
|
|
3550
|
+
enum WelcomeTrigger {
|
|
3551
|
+
CHAT_OPEN = 0;
|
|
3552
|
+
COMPANION_PAIRING = 1;
|
|
3553
|
+
}
|
|
3538
3554
|
}
|
|
3539
3555
|
|
|
3540
3556
|
message ScheduledCallCreationMessage {
|
|
@@ -3675,6 +3691,7 @@ message Message {
|
|
|
3675
3691
|
optional string accessibilityLabel = 4;
|
|
3676
3692
|
optional bool isLottie = 5;
|
|
3677
3693
|
optional string mimetype = 6;
|
|
3694
|
+
optional int32 premium = 7;
|
|
3678
3695
|
}
|
|
3679
3696
|
|
|
3680
3697
|
enum StickerPackOrigin {
|
|
@@ -4571,6 +4588,7 @@ message StatusAttribution {
|
|
|
4571
4588
|
AI_CREATED = 7;
|
|
4572
4589
|
LAYOUTS = 8;
|
|
4573
4590
|
NEWSLETTER_STATUS = 9;
|
|
4591
|
+
STATUS_CLOSE_SHARING = 10;
|
|
4574
4592
|
}
|
|
4575
4593
|
}
|
|
4576
4594
|
|
package/WAProto/index.d.ts
CHANGED
|
@@ -4630,6 +4630,127 @@ export namespace proto {
|
|
|
4630
4630
|
}
|
|
4631
4631
|
}
|
|
4632
4632
|
|
|
4633
|
+
/** Properties of a BotAvatarMetadata. */
|
|
4634
|
+
interface IBotAvatarMetadata {
|
|
4635
|
+
|
|
4636
|
+
/** BotAvatarMetadata sentiment */
|
|
4637
|
+
sentiment?: (number|null);
|
|
4638
|
+
|
|
4639
|
+
/** BotAvatarMetadata behaviorGraph */
|
|
4640
|
+
behaviorGraph?: (string|null);
|
|
4641
|
+
|
|
4642
|
+
/** BotAvatarMetadata action */
|
|
4643
|
+
action?: (number|null);
|
|
4644
|
+
|
|
4645
|
+
/** BotAvatarMetadata intensity */
|
|
4646
|
+
intensity?: (number|null);
|
|
4647
|
+
|
|
4648
|
+
/** BotAvatarMetadata wordCount */
|
|
4649
|
+
wordCount?: (number|null);
|
|
4650
|
+
}
|
|
4651
|
+
|
|
4652
|
+
/** Represents a BotAvatarMetadata. */
|
|
4653
|
+
class BotAvatarMetadata implements IBotAvatarMetadata {
|
|
4654
|
+
|
|
4655
|
+
/**
|
|
4656
|
+
* Constructs a new BotAvatarMetadata.
|
|
4657
|
+
* @param [properties] Properties to set
|
|
4658
|
+
*/
|
|
4659
|
+
constructor(properties?: proto.IBotAvatarMetadata);
|
|
4660
|
+
|
|
4661
|
+
/** BotAvatarMetadata sentiment. */
|
|
4662
|
+
public sentiment?: (number|null);
|
|
4663
|
+
|
|
4664
|
+
/** BotAvatarMetadata behaviorGraph. */
|
|
4665
|
+
public behaviorGraph?: (string|null);
|
|
4666
|
+
|
|
4667
|
+
/** BotAvatarMetadata action. */
|
|
4668
|
+
public action?: (number|null);
|
|
4669
|
+
|
|
4670
|
+
/** BotAvatarMetadata intensity. */
|
|
4671
|
+
public intensity?: (number|null);
|
|
4672
|
+
|
|
4673
|
+
/** BotAvatarMetadata wordCount. */
|
|
4674
|
+
public wordCount?: (number|null);
|
|
4675
|
+
|
|
4676
|
+
/**
|
|
4677
|
+
* Creates a new BotAvatarMetadata instance using the specified properties.
|
|
4678
|
+
* @param [properties] Properties to set
|
|
4679
|
+
* @returns BotAvatarMetadata instance
|
|
4680
|
+
*/
|
|
4681
|
+
public static create(properties?: proto.IBotAvatarMetadata): proto.BotAvatarMetadata;
|
|
4682
|
+
|
|
4683
|
+
/**
|
|
4684
|
+
* Encodes the specified BotAvatarMetadata message. Does not implicitly {@link proto.BotAvatarMetadata.verify|verify} messages.
|
|
4685
|
+
* @param message BotAvatarMetadata message or plain object to encode
|
|
4686
|
+
* @param [writer] Writer to encode to
|
|
4687
|
+
* @returns Writer
|
|
4688
|
+
*/
|
|
4689
|
+
public static encode(message: proto.IBotAvatarMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
4690
|
+
|
|
4691
|
+
/**
|
|
4692
|
+
* Encodes the specified BotAvatarMetadata message, length delimited. Does not implicitly {@link proto.BotAvatarMetadata.verify|verify} messages.
|
|
4693
|
+
* @param message BotAvatarMetadata message or plain object to encode
|
|
4694
|
+
* @param [writer] Writer to encode to
|
|
4695
|
+
* @returns Writer
|
|
4696
|
+
*/
|
|
4697
|
+
public static encodeDelimited(message: proto.IBotAvatarMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
4698
|
+
|
|
4699
|
+
/**
|
|
4700
|
+
* Decodes a BotAvatarMetadata message from the specified reader or buffer.
|
|
4701
|
+
* @param reader Reader or buffer to decode from
|
|
4702
|
+
* @param [length] Message length if known beforehand
|
|
4703
|
+
* @returns BotAvatarMetadata
|
|
4704
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
4705
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
4706
|
+
*/
|
|
4707
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotAvatarMetadata;
|
|
4708
|
+
|
|
4709
|
+
/**
|
|
4710
|
+
* Decodes a BotAvatarMetadata message from the specified reader or buffer, length delimited.
|
|
4711
|
+
* @param reader Reader or buffer to decode from
|
|
4712
|
+
* @returns BotAvatarMetadata
|
|
4713
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
4714
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
4715
|
+
*/
|
|
4716
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotAvatarMetadata;
|
|
4717
|
+
|
|
4718
|
+
/**
|
|
4719
|
+
* Verifies a BotAvatarMetadata message.
|
|
4720
|
+
* @param message Plain object to verify
|
|
4721
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
4722
|
+
*/
|
|
4723
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
4724
|
+
|
|
4725
|
+
/**
|
|
4726
|
+
* Creates a BotAvatarMetadata message from a plain object. Also converts values to their respective internal types.
|
|
4727
|
+
* @param object Plain object
|
|
4728
|
+
* @returns BotAvatarMetadata
|
|
4729
|
+
*/
|
|
4730
|
+
public static fromObject(object: { [k: string]: any }): proto.BotAvatarMetadata;
|
|
4731
|
+
|
|
4732
|
+
/**
|
|
4733
|
+
* Creates a plain object from a BotAvatarMetadata message. Also converts values to other types if specified.
|
|
4734
|
+
* @param message BotAvatarMetadata
|
|
4735
|
+
* @param [options] Conversion options
|
|
4736
|
+
* @returns Plain object
|
|
4737
|
+
*/
|
|
4738
|
+
public static toObject(message: proto.BotAvatarMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
4739
|
+
|
|
4740
|
+
/**
|
|
4741
|
+
* Converts this BotAvatarMetadata to JSON.
|
|
4742
|
+
* @returns JSON object
|
|
4743
|
+
*/
|
|
4744
|
+
public toJSON(): { [k: string]: any };
|
|
4745
|
+
|
|
4746
|
+
/**
|
|
4747
|
+
* Gets the default type url for BotAvatarMetadata
|
|
4748
|
+
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
4749
|
+
* @returns The default type url
|
|
4750
|
+
*/
|
|
4751
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
4752
|
+
}
|
|
4753
|
+
|
|
4633
4754
|
/** Properties of a BotCapabilityMetadata. */
|
|
4634
4755
|
interface IBotCapabilityMetadata {
|
|
4635
4756
|
|
|
@@ -7374,6 +7495,9 @@ export namespace proto {
|
|
|
7374
7495
|
/** Properties of a BotMetadata. */
|
|
7375
7496
|
interface IBotMetadata {
|
|
7376
7497
|
|
|
7498
|
+
/** BotMetadata avatarMetadata */
|
|
7499
|
+
avatarMetadata?: (proto.IBotAvatarMetadata|null);
|
|
7500
|
+
|
|
7377
7501
|
/** BotMetadata personaId */
|
|
7378
7502
|
personaId?: (string|null);
|
|
7379
7503
|
|
|
@@ -7498,6 +7622,9 @@ export namespace proto {
|
|
|
7498
7622
|
*/
|
|
7499
7623
|
constructor(properties?: proto.IBotMetadata);
|
|
7500
7624
|
|
|
7625
|
+
/** BotMetadata avatarMetadata. */
|
|
7626
|
+
public avatarMetadata?: (proto.IBotAvatarMetadata|null);
|
|
7627
|
+
|
|
7501
7628
|
/** BotMetadata personaId. */
|
|
7502
7629
|
public personaId?: (string|null);
|
|
7503
7630
|
|
|
@@ -14358,6 +14485,9 @@ export namespace proto {
|
|
|
14358
14485
|
|
|
14359
14486
|
/** ContextInfo partiallySelectedContent */
|
|
14360
14487
|
partiallySelectedContent?: (proto.ContextInfo.IPartiallySelectedContent|null);
|
|
14488
|
+
|
|
14489
|
+
/** ContextInfo afterReadDurationMs */
|
|
14490
|
+
afterReadDurationMs?: (number|null);
|
|
14361
14491
|
}
|
|
14362
14492
|
|
|
14363
14493
|
/** Represents a ContextInfo. */
|
|
@@ -14543,6 +14673,9 @@ export namespace proto {
|
|
|
14543
14673
|
/** ContextInfo partiallySelectedContent. */
|
|
14544
14674
|
public partiallySelectedContent?: (proto.ContextInfo.IPartiallySelectedContent|null);
|
|
14545
14675
|
|
|
14676
|
+
/** ContextInfo afterReadDurationMs. */
|
|
14677
|
+
public afterReadDurationMs?: (number|null);
|
|
14678
|
+
|
|
14546
14679
|
/**
|
|
14547
14680
|
* Creates a new ContextInfo instance using the specified properties.
|
|
14548
14681
|
* @param [properties] Properties to set
|
|
@@ -17609,6 +17742,9 @@ export namespace proto {
|
|
|
17609
17742
|
|
|
17610
17743
|
/** HistorySyncConfig initialSyncMaxMessagesPerChat */
|
|
17611
17744
|
initialSyncMaxMessagesPerChat?: (number|null);
|
|
17745
|
+
|
|
17746
|
+
/** HistorySyncConfig supportManusHistory */
|
|
17747
|
+
supportManusHistory?: (boolean|null);
|
|
17612
17748
|
}
|
|
17613
17749
|
|
|
17614
17750
|
/** Represents a HistorySyncConfig. */
|
|
@@ -17680,6 +17816,9 @@ export namespace proto {
|
|
|
17680
17816
|
/** HistorySyncConfig initialSyncMaxMessagesPerChat. */
|
|
17681
17817
|
public initialSyncMaxMessagesPerChat?: (number|null);
|
|
17682
17818
|
|
|
17819
|
+
/** HistorySyncConfig supportManusHistory. */
|
|
17820
|
+
public supportManusHistory?: (boolean|null);
|
|
17821
|
+
|
|
17683
17822
|
/**
|
|
17684
17823
|
* Creates a new HistorySyncConfig instance using the specified properties.
|
|
17685
17824
|
* @param [properties] Properties to set
|
|
@@ -40234,6 +40373,9 @@ export namespace proto {
|
|
|
40234
40373
|
|
|
40235
40374
|
/** RequestWelcomeMessageMetadata localChatState */
|
|
40236
40375
|
localChatState?: (proto.Message.RequestWelcomeMessageMetadata.LocalChatState|null);
|
|
40376
|
+
|
|
40377
|
+
/** RequestWelcomeMessageMetadata welcomeTrigger */
|
|
40378
|
+
welcomeTrigger?: (proto.Message.RequestWelcomeMessageMetadata.WelcomeTrigger|null);
|
|
40237
40379
|
}
|
|
40238
40380
|
|
|
40239
40381
|
/** Represents a RequestWelcomeMessageMetadata. */
|
|
@@ -40248,6 +40390,9 @@ export namespace proto {
|
|
|
40248
40390
|
/** RequestWelcomeMessageMetadata localChatState. */
|
|
40249
40391
|
public localChatState?: (proto.Message.RequestWelcomeMessageMetadata.LocalChatState|null);
|
|
40250
40392
|
|
|
40393
|
+
/** RequestWelcomeMessageMetadata welcomeTrigger. */
|
|
40394
|
+
public welcomeTrigger?: (proto.Message.RequestWelcomeMessageMetadata.WelcomeTrigger|null);
|
|
40395
|
+
|
|
40251
40396
|
/**
|
|
40252
40397
|
* Creates a new RequestWelcomeMessageMetadata instance using the specified properties.
|
|
40253
40398
|
* @param [properties] Properties to set
|
|
@@ -40333,6 +40478,12 @@ export namespace proto {
|
|
|
40333
40478
|
EMPTY = 0,
|
|
40334
40479
|
NON_EMPTY = 1
|
|
40335
40480
|
}
|
|
40481
|
+
|
|
40482
|
+
/** WelcomeTrigger enum. */
|
|
40483
|
+
enum WelcomeTrigger {
|
|
40484
|
+
CHAT_OPEN = 0,
|
|
40485
|
+
COMPANION_PAIRING = 1
|
|
40486
|
+
}
|
|
40336
40487
|
}
|
|
40337
40488
|
|
|
40338
40489
|
/** Properties of a ScheduledCallCreationMessage. */
|
|
@@ -41843,6 +41994,9 @@ export namespace proto {
|
|
|
41843
41994
|
|
|
41844
41995
|
/** Sticker mimetype */
|
|
41845
41996
|
mimetype?: (string|null);
|
|
41997
|
+
|
|
41998
|
+
/** Sticker premium */
|
|
41999
|
+
premium?: (number|null);
|
|
41846
42000
|
}
|
|
41847
42001
|
|
|
41848
42002
|
/** Represents a Sticker. */
|
|
@@ -41872,6 +42026,9 @@ export namespace proto {
|
|
|
41872
42026
|
/** Sticker mimetype. */
|
|
41873
42027
|
public mimetype?: (string|null);
|
|
41874
42028
|
|
|
42029
|
+
/** Sticker premium. */
|
|
42030
|
+
public premium?: (number|null);
|
|
42031
|
+
|
|
41875
42032
|
/**
|
|
41876
42033
|
* Creates a new Sticker instance using the specified properties.
|
|
41877
42034
|
* @param [properties] Properties to set
|
|
@@ -51642,7 +51799,8 @@ export namespace proto {
|
|
|
51642
51799
|
RL_ATTRIBUTION = 6,
|
|
51643
51800
|
AI_CREATED = 7,
|
|
51644
51801
|
LAYOUTS = 8,
|
|
51645
|
-
NEWSLETTER_STATUS = 9
|
|
51802
|
+
NEWSLETTER_STATUS = 9,
|
|
51803
|
+
STATUS_CLOSE_SHARING = 10
|
|
51646
51804
|
}
|
|
51647
51805
|
}
|
|
51648
51806
|
|