@queenanya/baileys 6.8.6 → 6.9.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.
Files changed (39) hide show
  1. package/lib/Defaults/index.d.ts +0 -1
  2. package/lib/Defaults/index.js +3 -4
  3. package/lib/Socket/business.d.ts +2 -1
  4. package/lib/Socket/chats.d.ts +1 -0
  5. package/lib/Socket/chats.js +7 -23
  6. package/lib/Socket/groups.d.ts +1 -0
  7. package/lib/Socket/groups.js +2 -1
  8. package/lib/Socket/index.d.ts +2 -1
  9. package/lib/Socket/messages-recv.d.ts +2 -1
  10. package/lib/Socket/messages-recv.js +8 -4
  11. package/lib/Socket/messages-send.d.ts +1 -0
  12. package/lib/Socket/registration.d.ts +2 -1
  13. package/lib/Socket/socket.d.ts +1 -0
  14. package/lib/Socket/socket.js +22 -4
  15. package/lib/Store/make-cache-manager-store.d.ts +1 -1
  16. package/lib/Store/make-in-memory-store.d.ts +3 -2
  17. package/lib/Store/make-in-memory-store.js +23 -5
  18. package/lib/Types/Auth.d.ts +1 -0
  19. package/lib/Types/GroupMetadata.d.ts +3 -1
  20. package/lib/Types/Message.d.ts +4 -0
  21. package/lib/Utils/auth-utils.js +1 -0
  22. package/lib/Utils/decode-wa-message.js +10 -5
  23. package/lib/Utils/generics.js +1 -1
  24. package/lib/Utils/link-preview.js +1 -1
  25. package/lib/Utils/messages.js +11 -9
  26. package/lib/Utils/process-message.js +2 -1
  27. package/lib/Utils/validate-connection.js +16 -2
  28. package/lib/WAM/BinaryInfo.d.ts +17 -0
  29. package/lib/WAM/BinaryInfo.js +13 -0
  30. package/lib/WAM/constants.d.ts +38 -0
  31. package/lib/WAM/constants.js +15350 -0
  32. package/lib/WAM/encode.d.ts +3 -0
  33. package/lib/WAM/encode.js +155 -0
  34. package/lib/WAM/index.d.ts +3 -0
  35. package/lib/WAM/index.js +19 -0
  36. package/lib/index.d.ts +1 -0
  37. package/lib/index.js +1 -0
  38. package/package.json +5 -4
  39. package/WASignalGroup/readme.md +0 -6
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BinaryInfo = void 0;
4
+ class BinaryInfo {
5
+ constructor(options = {}) {
6
+ this.protocolVersion = 5;
7
+ this.sequence = 0;
8
+ this.events = [];
9
+ this.buffer = [];
10
+ Object.assign(this, options);
11
+ }
12
+ }
13
+ exports.BinaryInfo = BinaryInfo;
@@ -0,0 +1,38 @@
1
+ export declare const WEB_EVENTS: Event[];
2
+ export declare const WEB_GLOBALS: Global[];
3
+ export declare const FLAG_BYTE = 8, FLAG_GLOBAL = 0, FLAG_EVENT = 1, FLAG_FIELD = 2, FLAG_EXTENDED = 4;
4
+ export type Event = {
5
+ name: string;
6
+ id: number;
7
+ props: {
8
+ [key: string]: [number, string | {
9
+ [key: string]: number;
10
+ }];
11
+ };
12
+ weight: number;
13
+ wamChannel: string;
14
+ privateStatsIdInt: number;
15
+ };
16
+ export type Global = {
17
+ name: string;
18
+ id: number;
19
+ type: string | {
20
+ [key: string]: number;
21
+ };
22
+ validator?: string;
23
+ channels: string[];
24
+ };
25
+ type EventByName<T extends Event['name']> = Extract<Event, {
26
+ name: T;
27
+ }>;
28
+ export type EventInputType = {
29
+ [key in Event['name']]: {
30
+ props: {
31
+ [k in keyof EventByName<key>['props']]: any;
32
+ };
33
+ globals: {
34
+ [x: string]: any;
35
+ };
36
+ };
37
+ } & {};
38
+ export {};