@nexustechpro/baileys 2.0.2 → 2.0.6

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 (108) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +924 -1299
  3. package/WAProto/index.js +22 -18
  4. package/lib/Defaults/baileys-version.json +6 -2
  5. package/lib/Defaults/index.js +173 -172
  6. package/lib/Signal/libsignal.js +395 -292
  7. package/lib/Signal/lid-mapping.js +264 -171
  8. package/lib/Socket/Client/index.js +2 -2
  9. package/lib/Socket/Client/types.js +10 -10
  10. package/lib/Socket/Client/websocket.js +45 -310
  11. package/lib/Socket/business.js +375 -375
  12. package/lib/Socket/chats.js +916 -963
  13. package/lib/Socket/communities.js +430 -430
  14. package/lib/Socket/groups.js +342 -342
  15. package/lib/Socket/index.js +21 -22
  16. package/lib/Socket/messages-recv.js +963 -743
  17. package/lib/Socket/messages-send.js +273 -321
  18. package/lib/Socket/mex.js +50 -50
  19. package/lib/Socket/newsletter.js +148 -148
  20. package/lib/Socket/nexus-handler.js +296 -247
  21. package/lib/Socket/registration.js +50 -33
  22. package/lib/Socket/socket.js +872 -1201
  23. package/lib/Store/index.js +5 -5
  24. package/lib/Store/make-cache-manager-store.js +81 -81
  25. package/lib/Store/make-in-memory-store.js +416 -416
  26. package/lib/Store/make-ordered-dictionary.js +81 -81
  27. package/lib/Store/object-repository.js +30 -30
  28. package/lib/Types/Auth.js +1 -1
  29. package/lib/Types/Bussines.js +1 -1
  30. package/lib/Types/Call.js +1 -1
  31. package/lib/Types/Chat.js +7 -7
  32. package/lib/Types/Contact.js +1 -1
  33. package/lib/Types/Events.js +1 -1
  34. package/lib/Types/GroupMetadata.js +1 -1
  35. package/lib/Types/Label.js +24 -24
  36. package/lib/Types/LabelAssociation.js +6 -6
  37. package/lib/Types/Message.js +10 -10
  38. package/lib/Types/Newsletter.js +37 -29
  39. package/lib/Types/Product.js +1 -1
  40. package/lib/Types/Signal.js +1 -1
  41. package/lib/Types/Socket.js +2 -2
  42. package/lib/Types/State.js +55 -12
  43. package/lib/Types/USync.js +1 -1
  44. package/lib/Types/index.js +25 -25
  45. package/lib/Utils/auth-utils.js +264 -256
  46. package/lib/Utils/baileys-event-stream.js +55 -55
  47. package/lib/Utils/browser-utils.js +27 -27
  48. package/lib/Utils/business.js +228 -230
  49. package/lib/Utils/chat-utils.js +726 -764
  50. package/lib/Utils/companion-reg-client-utils.js +34 -0
  51. package/lib/Utils/crypto.js +109 -135
  52. package/lib/Utils/decode-wa-message.js +342 -314
  53. package/lib/Utils/event-buffer.js +547 -547
  54. package/lib/Utils/generics.js +295 -297
  55. package/lib/Utils/history.js +91 -83
  56. package/lib/Utils/index.js +25 -20
  57. package/lib/Utils/key-store.js +17 -0
  58. package/lib/Utils/link-preview.js +107 -98
  59. package/lib/Utils/logger.js +2 -2
  60. package/lib/Utils/lt-hash.js +47 -47
  61. package/lib/Utils/make-mutex.js +39 -39
  62. package/lib/Utils/message-retry-manager.js +148 -148
  63. package/lib/Utils/messages-media.js +579 -535
  64. package/lib/Utils/messages.js +821 -706
  65. package/lib/Utils/noise-handler.js +255 -255
  66. package/lib/Utils/pre-key-manager.js +105 -105
  67. package/lib/Utils/process-message.js +430 -412
  68. package/lib/Utils/reporting-utils.js +155 -0
  69. package/lib/Utils/signal.js +191 -159
  70. package/lib/Utils/sync-action-utils.js +33 -0
  71. package/lib/Utils/tc-token-utils.js +162 -0
  72. package/lib/Utils/use-multi-file-auth-state.js +120 -120
  73. package/lib/Utils/validate-connection.js +194 -194
  74. package/lib/WABinary/constants.js +1306 -1300
  75. package/lib/WABinary/decode.js +237 -237
  76. package/lib/WABinary/encode.js +232 -232
  77. package/lib/WABinary/generic-utils.js +252 -211
  78. package/lib/WABinary/index.js +6 -5
  79. package/lib/WABinary/jid-utils.js +279 -95
  80. package/lib/WABinary/types.js +1 -1
  81. package/lib/WAM/BinaryInfo.js +9 -9
  82. package/lib/WAM/constants.js +22852 -22852
  83. package/lib/WAM/encode.js +149 -149
  84. package/lib/WAM/index.js +3 -3
  85. package/lib/WAUSync/Protocols/USyncContactProtocol.js +28 -28
  86. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +53 -53
  87. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +26 -26
  88. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +37 -37
  89. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +50 -50
  90. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +28 -28
  91. package/lib/WAUSync/Protocols/index.js +4 -4
  92. package/lib/WAUSync/USyncQuery.js +93 -93
  93. package/lib/WAUSync/USyncUser.js +22 -22
  94. package/lib/WAUSync/index.js +3 -3
  95. package/lib/index.js +65 -66
  96. package/package.json +172 -143
  97. package/lib/Signal/Group/ciphertext-message.js +0 -12
  98. package/lib/Signal/Group/group-session-builder.js +0 -30
  99. package/lib/Signal/Group/group_cipher.js +0 -100
  100. package/lib/Signal/Group/index.js +0 -12
  101. package/lib/Signal/Group/keyhelper.js +0 -18
  102. package/lib/Signal/Group/sender-chain-key.js +0 -26
  103. package/lib/Signal/Group/sender-key-distribution-message.js +0 -63
  104. package/lib/Signal/Group/sender-key-message.js +0 -66
  105. package/lib/Signal/Group/sender-key-name.js +0 -48
  106. package/lib/Signal/Group/sender-key-record.js +0 -41
  107. package/lib/Signal/Group/sender-key-state.js +0 -84
  108. package/lib/Signal/Group/sender-message-key.js +0 -26
@@ -1,82 +1,82 @@
1
- function makeOrderedDictionary(idGetter) {
2
- const array = [];
3
- const dict = {};
4
-
5
- const get = (id) => dict[id];
6
-
7
- const update = (item) => {
8
- const id = idGetter(item);
9
- const idx = array.findIndex((i) => idGetter(i) === id);
10
- if (idx >= 0) {
11
- array[idx] = item;
12
- dict[id] = item;
13
- }
14
- return false;
15
- };
16
-
17
- const upsert = (item, mode) => {
18
- const id = idGetter(item);
19
- if (get(id)) {
20
- update(item);
21
- } else {
22
- if (mode === 'append') {
23
- array.push(item);
24
- } else {
25
- array.splice(0, 0, item);
26
- }
27
- dict[id] = item;
28
- }
29
- };
30
-
31
- const remove = (item) => {
32
- const id = idGetter(item);
33
- const idx = array.findIndex((i) => idGetter(i) === id);
34
- if (idx >= 0) {
35
- array.splice(idx, 1);
36
- delete dict[id];
37
- return true;
38
- }
39
- return false;
40
- };
41
-
42
- return {
43
- array,
44
- get,
45
- upsert,
46
- update,
47
- remove,
48
- updateAssign: (id, update) => {
49
- const item = get(id);
50
- if (item) {
51
- Object.assign(item, update);
52
- delete dict[id];
53
- dict[idGetter(item)] = item;
54
- return true;
55
- }
56
- return false;
57
- },
58
- clear: () => {
59
- array.splice(0, array.length);
60
- for (const key of Object.keys(dict)) {
61
- delete dict[key];
62
- }
63
- },
64
- filter: (contain) => {
65
- let i = 0;
66
- while (i < array.length) {
67
- if (!contain(array[i])) {
68
- delete dict[idGetter(array[i])];
69
- array.splice(i, 1);
70
- } else {
71
- i += 1;
72
- }
73
- }
74
- },
75
- toJSON: () => array,
76
- fromJSON: (newItems) => {
77
- array.splice(0, array.length, ...newItems);
78
- },
79
- };
80
- }
81
-
1
+ function makeOrderedDictionary(idGetter) {
2
+ const array = [];
3
+ const dict = {};
4
+
5
+ const get = (id) => dict[id];
6
+
7
+ const update = (item) => {
8
+ const id = idGetter(item);
9
+ const idx = array.findIndex((i) => idGetter(i) === id);
10
+ if (idx >= 0) {
11
+ array[idx] = item;
12
+ dict[id] = item;
13
+ }
14
+ return false;
15
+ };
16
+
17
+ const upsert = (item, mode) => {
18
+ const id = idGetter(item);
19
+ if (get(id)) {
20
+ update(item);
21
+ } else {
22
+ if (mode === 'append') {
23
+ array.push(item);
24
+ } else {
25
+ array.splice(0, 0, item);
26
+ }
27
+ dict[id] = item;
28
+ }
29
+ };
30
+
31
+ const remove = (item) => {
32
+ const id = idGetter(item);
33
+ const idx = array.findIndex((i) => idGetter(i) === id);
34
+ if (idx >= 0) {
35
+ array.splice(idx, 1);
36
+ delete dict[id];
37
+ return true;
38
+ }
39
+ return false;
40
+ };
41
+
42
+ return {
43
+ array,
44
+ get,
45
+ upsert,
46
+ update,
47
+ remove,
48
+ updateAssign: (id, update) => {
49
+ const item = get(id);
50
+ if (item) {
51
+ Object.assign(item, update);
52
+ delete dict[id];
53
+ dict[idGetter(item)] = item;
54
+ return true;
55
+ }
56
+ return false;
57
+ },
58
+ clear: () => {
59
+ array.splice(0, array.length);
60
+ for (const key of Object.keys(dict)) {
61
+ delete dict[key];
62
+ }
63
+ },
64
+ filter: (contain) => {
65
+ let i = 0;
66
+ while (i < array.length) {
67
+ if (!contain(array[i])) {
68
+ delete dict[idGetter(array[i])];
69
+ array.splice(i, 1);
70
+ } else {
71
+ i += 1;
72
+ }
73
+ }
74
+ },
75
+ toJSON: () => array,
76
+ fromJSON: (newItems) => {
77
+ array.splice(0, array.length, ...newItems);
78
+ },
79
+ };
80
+ }
81
+
82
82
  export { makeOrderedDictionary };
@@ -1,31 +1,31 @@
1
- class ObjectRepository {
2
- constructor(entities = {}) {
3
- this.entityMap = new Map(Object.entries(entities));
4
- }
5
-
6
- findById(id) {
7
- return this.entityMap.get(id);
8
- }
9
-
10
- findAll() {
11
- return Array.from(this.entityMap.values());
12
- }
13
-
14
- upsertById(id, entity) {
15
- return this.entityMap.set(id, { ...entity });
16
- }
17
-
18
- deleteById(id) {
19
- return this.entityMap.delete(id);
20
- }
21
-
22
- count() {
23
- return this.entityMap.size;
24
- }
25
-
26
- toJSON() {
27
- return this.findAll();
28
- }
29
- }
30
-
1
+ class ObjectRepository {
2
+ constructor(entities = {}) {
3
+ this.entityMap = new Map(Object.entries(entities));
4
+ }
5
+
6
+ findById(id) {
7
+ return this.entityMap.get(id);
8
+ }
9
+
10
+ findAll() {
11
+ return Array.from(this.entityMap.values());
12
+ }
13
+
14
+ upsertById(id, entity) {
15
+ return this.entityMap.set(id, { ...entity });
16
+ }
17
+
18
+ deleteById(id) {
19
+ return this.entityMap.delete(id);
20
+ }
21
+
22
+ count() {
23
+ return this.entityMap.size;
24
+ }
25
+
26
+ toJSON() {
27
+ return this.findAll();
28
+ }
29
+ }
30
+
31
31
  export { ObjectRepository };
package/lib/Types/Auth.js CHANGED
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=Auth.js.map
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=Bussines.js.map
package/lib/Types/Call.js CHANGED
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=Call.js.map
package/lib/Types/Chat.js CHANGED
@@ -1,8 +1,8 @@
1
- export const ALL_WA_PATCH_NAMES = [
2
- 'critical_block',
3
- 'critical_unblock_low',
4
- 'regular_high',
5
- 'regular_low',
6
- 'regular'
7
- ];
1
+ export const ALL_WA_PATCH_NAMES = [
2
+ 'critical_block',
3
+ 'critical_unblock_low',
4
+ 'regular_high',
5
+ 'regular_low',
6
+ 'regular'
7
+ ];
8
8
  //# sourceMappingURL=Chat.js.map
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=Contact.js.map
@@ -1,2 +1,2 @@
1
- import { proto } from '../../WAProto/index.js';
1
+ import { proto } from '../../WAProto/index.js';
2
2
  //# sourceMappingURL=Events.js.map
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=GroupMetadata.js.map
@@ -1,25 +1,25 @@
1
- /** WhatsApp has 20 predefined colors */
2
- export var LabelColor;
3
- (function (LabelColor) {
4
- LabelColor[LabelColor["Color1"] = 0] = "Color1";
5
- LabelColor[LabelColor["Color2"] = 1] = "Color2";
6
- LabelColor[LabelColor["Color3"] = 2] = "Color3";
7
- LabelColor[LabelColor["Color4"] = 3] = "Color4";
8
- LabelColor[LabelColor["Color5"] = 4] = "Color5";
9
- LabelColor[LabelColor["Color6"] = 5] = "Color6";
10
- LabelColor[LabelColor["Color7"] = 6] = "Color7";
11
- LabelColor[LabelColor["Color8"] = 7] = "Color8";
12
- LabelColor[LabelColor["Color9"] = 8] = "Color9";
13
- LabelColor[LabelColor["Color10"] = 9] = "Color10";
14
- LabelColor[LabelColor["Color11"] = 10] = "Color11";
15
- LabelColor[LabelColor["Color12"] = 11] = "Color12";
16
- LabelColor[LabelColor["Color13"] = 12] = "Color13";
17
- LabelColor[LabelColor["Color14"] = 13] = "Color14";
18
- LabelColor[LabelColor["Color15"] = 14] = "Color15";
19
- LabelColor[LabelColor["Color16"] = 15] = "Color16";
20
- LabelColor[LabelColor["Color17"] = 16] = "Color17";
21
- LabelColor[LabelColor["Color18"] = 17] = "Color18";
22
- LabelColor[LabelColor["Color19"] = 18] = "Color19";
23
- LabelColor[LabelColor["Color20"] = 19] = "Color20";
24
- })(LabelColor || (LabelColor = {}));
1
+ /** WhatsApp has 20 predefined colors */
2
+ export var LabelColor;
3
+ (function (LabelColor) {
4
+ LabelColor[LabelColor["Color1"] = 0] = "Color1";
5
+ LabelColor[LabelColor["Color2"] = 1] = "Color2";
6
+ LabelColor[LabelColor["Color3"] = 2] = "Color3";
7
+ LabelColor[LabelColor["Color4"] = 3] = "Color4";
8
+ LabelColor[LabelColor["Color5"] = 4] = "Color5";
9
+ LabelColor[LabelColor["Color6"] = 5] = "Color6";
10
+ LabelColor[LabelColor["Color7"] = 6] = "Color7";
11
+ LabelColor[LabelColor["Color8"] = 7] = "Color8";
12
+ LabelColor[LabelColor["Color9"] = 8] = "Color9";
13
+ LabelColor[LabelColor["Color10"] = 9] = "Color10";
14
+ LabelColor[LabelColor["Color11"] = 10] = "Color11";
15
+ LabelColor[LabelColor["Color12"] = 11] = "Color12";
16
+ LabelColor[LabelColor["Color13"] = 12] = "Color13";
17
+ LabelColor[LabelColor["Color14"] = 13] = "Color14";
18
+ LabelColor[LabelColor["Color15"] = 14] = "Color15";
19
+ LabelColor[LabelColor["Color16"] = 15] = "Color16";
20
+ LabelColor[LabelColor["Color17"] = 16] = "Color17";
21
+ LabelColor[LabelColor["Color18"] = 17] = "Color18";
22
+ LabelColor[LabelColor["Color19"] = 18] = "Color19";
23
+ LabelColor[LabelColor["Color20"] = 19] = "Color20";
24
+ })(LabelColor || (LabelColor = {}));
25
25
  //# sourceMappingURL=Label.js.map
@@ -1,7 +1,7 @@
1
- /** Association type */
2
- export var LabelAssociationType;
3
- (function (LabelAssociationType) {
4
- LabelAssociationType["Chat"] = "label_jid";
5
- LabelAssociationType["Message"] = "label_message";
6
- })(LabelAssociationType || (LabelAssociationType = {}));
1
+ /** Association type */
2
+ export var LabelAssociationType;
3
+ (function (LabelAssociationType) {
4
+ LabelAssociationType["Chat"] = "label_jid";
5
+ LabelAssociationType["Message"] = "label_message";
6
+ })(LabelAssociationType || (LabelAssociationType = {}));
7
7
  //# sourceMappingURL=LabelAssociation.js.map
@@ -1,11 +1,11 @@
1
- import { proto } from '../../WAProto/index.js';
2
- // export the WAMessage Prototypes
3
- export { proto as WAProto };
4
- export const WAMessageStubType = proto.WebMessageInfo.StubType;
5
- export const WAMessageStatus = proto.WebMessageInfo.Status;
6
- export var WAMessageAddressingMode;
7
- (function (WAMessageAddressingMode) {
8
- WAMessageAddressingMode["PN"] = "pn";
9
- WAMessageAddressingMode["LID"] = "lid";
10
- })(WAMessageAddressingMode || (WAMessageAddressingMode = {}));
1
+ import { proto } from '../../WAProto/index.js';
2
+ // export the WAMessage Prototypes
3
+ export { proto as WAProto };
4
+ export const WAMessageStubType = proto.WebMessageInfo.StubType;
5
+ export const WAMessageStatus = proto.WebMessageInfo.Status;
6
+ export var WAMessageAddressingMode;
7
+ (function (WAMessageAddressingMode) {
8
+ WAMessageAddressingMode["PN"] = "pn";
9
+ WAMessageAddressingMode["LID"] = "lid";
10
+ })(WAMessageAddressingMode || (WAMessageAddressingMode = {}));
11
11
  //# sourceMappingURL=Message.js.map
@@ -1,29 +1,37 @@
1
- export const XWAPaths = {
2
- xwa2_newsletter_create: 'xwa2_newsletter_create',
3
- xwa2_newsletter_subscribers: 'xwa2_newsletter_subscribers',
4
- xwa2_newsletter_view: 'xwa2_newsletter_view',
5
- xwa2_newsletter_metadata: 'xwa2_newsletter',
6
- xwa2_newsletter_admin_count: 'xwa2_newsletter_admin',
7
- xwa2_newsletter_mute_v2: 'xwa2_newsletter_mute_v2',
8
- xwa2_newsletter_unmute_v2: 'xwa2_newsletter_unmute_v2',
9
- xwa2_newsletter_follow: 'xwa2_newsletter_follow',
10
- xwa2_newsletter_unfollow: 'xwa2_newsletter_unfollow',
11
- xwa2_newsletter_change_owner: 'xwa2_newsletter_change_owner',
12
- xwa2_newsletter_demote: 'xwa2_newsletter_demote',
13
- xwa2_newsletter_delete_v2: 'xwa2_newsletter_delete_v2'
14
- }
15
-
16
- export const QueryIds = {
17
- CREATE: '8823471724422422',
18
- UPDATE_METADATA: '24250201037901610',
19
- METADATA: '6563316087068696',
20
- SUBSCRIBERS: '9783111038412085',
21
- FOLLOW: '7871414976211147',
22
- UNFOLLOW: '7238632346214362',
23
- MUTE: '29766401636284406',
24
- UNMUTE: '9864994326891137',
25
- ADMIN_COUNT: '7130823597031706',
26
- CHANGE_OWNER: '7341777602580933',
27
- DEMOTE: '6551828931592903',
28
- DELETE: '30062808666639665'
29
- }
1
+ export var XWAPaths;
2
+ (function (XWAPaths) {
3
+ XWAPaths["xwa2_newsletter_create"] = "xwa2_newsletter_create";
4
+ XWAPaths["xwa2_newsletter_subscribers"] = "xwa2_newsletter_subscribers";
5
+ XWAPaths["xwa2_newsletter_view"] = "xwa2_newsletter_view";
6
+ XWAPaths["xwa2_newsletter_metadata"] = "xwa2_newsletter";
7
+ XWAPaths["xwa2_newsletter_admin_count"] = "xwa2_newsletter_admin";
8
+ XWAPaths["xwa2_newsletter_mute_v2"] = "xwa2_newsletter_mute_v2";
9
+ XWAPaths["xwa2_newsletter_unmute_v2"] = "xwa2_newsletter_unmute_v2";
10
+ XWAPaths["xwa2_newsletter_follow"] = "xwa2_newsletter_follow";
11
+ XWAPaths["xwa2_newsletter_unfollow"] = "xwa2_newsletter_unfollow";
12
+ XWAPaths["xwa2_newsletter_join_v2"] = "xwa2_newsletter_join_v2";
13
+ XWAPaths["xwa2_newsletter_leave_v2"] = "xwa2_newsletter_leave_v2";
14
+ XWAPaths["xwa2_newsletter_change_owner"] = "xwa2_newsletter_change_owner";
15
+ XWAPaths["xwa2_newsletter_demote"] = "xwa2_newsletter_demote";
16
+ XWAPaths["xwa2_newsletter_delete_v2"] = "xwa2_newsletter_delete_v2";
17
+ XWAPaths["xwa2_fetch_account_reachout_timelock"] = "xwa2_fetch_account_reachout_timelock";
18
+ XWAPaths["xwa2_message_capping_info"] = "xwa2_message_capping_info";
19
+ })(XWAPaths || (XWAPaths = {}));
20
+ export var QueryIds;
21
+ (function (QueryIds) {
22
+ QueryIds["CREATE"] = "8823471724422422";
23
+ QueryIds["UPDATE_METADATA"] = "24250201037901610";
24
+ QueryIds["METADATA"] = "6563316087068696";
25
+ QueryIds["SUBSCRIBERS"] = "9783111038412085";
26
+ QueryIds["FOLLOW"] = "24404358912487870";
27
+ QueryIds["UNFOLLOW"] = "9767147403369991";
28
+ QueryIds["MUTE"] = "29766401636284406";
29
+ QueryIds["UNMUTE"] = "9864994326891137";
30
+ QueryIds["ADMIN_COUNT"] = "7130823597031706";
31
+ QueryIds["CHANGE_OWNER"] = "7341777602580933";
32
+ QueryIds["DEMOTE"] = "6551828931592903";
33
+ QueryIds["DELETE"] = "30062808666639665";
34
+ QueryIds["REACHOUT_TIMELOCK"] = "23983697327930364";
35
+ QueryIds["MESSAGE_CAPPING_INFO"] = "24503548349331633";
36
+ })(QueryIds || (QueryIds = {}));
37
+ //# sourceMappingURL=Mex.js.map
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=Product.js.map
@@ -1,2 +1,2 @@
1
- import { proto } from '../../WAProto/index.js';
1
+ import { proto } from '../../WAProto/index.js';
2
2
  //# sourceMappingURL=Signal.js.map
@@ -1,3 +1,3 @@
1
- import { proto } from '../../WAProto/index.js';
2
- import {} from './Message.js';
1
+ import { proto } from '../../WAProto/index.js';
2
+ import {} from './Message.js';
3
3
  //# sourceMappingURL=Socket.js.map
@@ -1,13 +1,56 @@
1
- import { Boom } from '@hapi/boom';
2
- export var SyncState;
3
- (function (SyncState) {
4
- /** The socket is connecting, but we haven't received pending notifications yet. */
5
- SyncState[SyncState["Connecting"] = 0] = "Connecting";
6
- /** Pending notifications received. Buffering events until we decide whether to sync or not. */
7
- SyncState[SyncState["AwaitingInitialSync"] = 1] = "AwaitingInitialSync";
8
- /** The initial app state sync (history, etc.) is in progress. Buffering continues. */
9
- SyncState[SyncState["Syncing"] = 2] = "Syncing";
10
- /** Initial sync is complete, or was skipped. The socket is fully operational and events are processed in real-time. */
11
- SyncState[SyncState["Online"] = 3] = "Online";
12
- })(SyncState || (SyncState = {}));
1
+ import { Boom } from '@hapi/boom';
2
+ export var SyncState;
3
+ (function (SyncState) {
4
+ /** The socket is connecting, but we haven't received pending notifications yet. */
5
+ SyncState[SyncState["Connecting"] = 0] = "Connecting";
6
+ /** Pending notifications received. Buffering events until we decide whether to sync or not. */
7
+ SyncState[SyncState["AwaitingInitialSync"] = 1] = "AwaitingInitialSync";
8
+ /** The initial app state sync (history, etc.) is in progress. Buffering continues. */
9
+ SyncState[SyncState["Syncing"] = 2] = "Syncing";
10
+ /** Initial sync is complete, or was skipped. The socket is fully operational and events are processed in real-time. */
11
+ SyncState[SyncState["Online"] = 3] = "Online";
12
+ })(SyncState || (SyncState = {}));
13
+ export var ReachoutTimelockEnforcementType;
14
+ (function (ReachoutTimelockEnforcementType) {
15
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_ALCOHOL"] = "BIZ_COMMERCE_VIOLATION_ALCOHOL";
16
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_ADULT"] = "BIZ_COMMERCE_VIOLATION_ADULT";
17
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_ANIMALS"] = "BIZ_COMMERCE_VIOLATION_ANIMALS";
18
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_BODY_PARTS_FLUIDS"] = "BIZ_COMMERCE_VIOLATION_BODY_PARTS_FLUIDS";
19
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_DATING"] = "BIZ_COMMERCE_VIOLATION_DATING";
20
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_DIGITAL_SERVICES_PRODUCTS"] = "BIZ_COMMERCE_VIOLATION_DIGITAL_SERVICES_PRODUCTS";
21
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_DRUGS"] = "BIZ_COMMERCE_VIOLATION_DRUGS";
22
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_DRUGS_ONLY_OTC"] = "BIZ_COMMERCE_VIOLATION_DRUGS_ONLY_OTC";
23
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_GAMBLING"] = "BIZ_COMMERCE_VIOLATION_GAMBLING";
24
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_HEALTHCARE"] = "BIZ_COMMERCE_VIOLATION_HEALTHCARE";
25
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_REAL_FAKE_CURRENCY"] = "BIZ_COMMERCE_VIOLATION_REAL_FAKE_CURRENCY";
26
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_SUPPLEMENTS"] = "BIZ_COMMERCE_VIOLATION_SUPPLEMENTS";
27
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_TOBACCO"] = "BIZ_COMMERCE_VIOLATION_TOBACCO";
28
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_VIOLENT_CONTENT"] = "BIZ_COMMERCE_VIOLATION_VIOLENT_CONTENT";
29
+ ReachoutTimelockEnforcementType["BIZ_COMMERCE_VIOLATION_WEAPONS"] = "BIZ_COMMERCE_VIOLATION_WEAPONS";
30
+ ReachoutTimelockEnforcementType["BIZ_QUALITY"] = "BIZ_QUALITY";
31
+ /** This means there is no restriction */
32
+ ReachoutTimelockEnforcementType["DEFAULT"] = "DEFAULT";
33
+ ReachoutTimelockEnforcementType["WEB_COMPANION_ONLY"] = "WEB_COMPANION_ONLY";
34
+ })(ReachoutTimelockEnforcementType || (ReachoutTimelockEnforcementType = {}));
35
+ export var NewChatMessageCappingStatusType;
36
+ (function (NewChatMessageCappingStatusType) {
37
+ NewChatMessageCappingStatusType["NONE"] = "NONE";
38
+ NewChatMessageCappingStatusType["FIRST_WARNING"] = "FIRST_WARNING";
39
+ NewChatMessageCappingStatusType["SECOND_WARNING"] = "SECOND_WARNING";
40
+ NewChatMessageCappingStatusType["CAPPED"] = "CAPPED";
41
+ })(NewChatMessageCappingStatusType || (NewChatMessageCappingStatusType = {}));
42
+ export var NewChatMessageCappingMVStatusType;
43
+ (function (NewChatMessageCappingMVStatusType) {
44
+ NewChatMessageCappingMVStatusType["NOT_ELIGIBLE"] = "NOT_ELIGIBLE";
45
+ NewChatMessageCappingMVStatusType["NOT_ACTIVE"] = "NOT_ACTIVE";
46
+ NewChatMessageCappingMVStatusType["ACTIVE"] = "ACTIVE";
47
+ NewChatMessageCappingMVStatusType["ACTIVE_UPGRADE_AVAILABLE"] = "ACTIVE_UPGRADE_AVAILABLE";
48
+ })(NewChatMessageCappingMVStatusType || (NewChatMessageCappingMVStatusType = {}));
49
+ export var NewChatMessageCappingOTEStatusType;
50
+ (function (NewChatMessageCappingOTEStatusType) {
51
+ NewChatMessageCappingOTEStatusType["NOT_ELIGIBLE"] = "NOT_ELIGIBLE";
52
+ NewChatMessageCappingOTEStatusType["ELIGIBLE"] = "ELIGIBLE";
53
+ NewChatMessageCappingOTEStatusType["ACTIVE_IN_CURRENT_CYCLE"] = "ACTIVE_IN_CURRENT_CYCLE";
54
+ NewChatMessageCappingOTEStatusType["EXHAUSTED"] = "EXHAUSTED";
55
+ })(NewChatMessageCappingOTEStatusType || (NewChatMessageCappingOTEStatusType = {}));
13
56
  //# sourceMappingURL=State.js.map
@@ -1,2 +1,2 @@
1
- import { USyncUser } from '../WAUSync/index.js';
1
+ import { USyncUser } from '../WAUSync/index.js';
2
2
  //# sourceMappingURL=USync.js.map
@@ -1,26 +1,26 @@
1
- export * from './Auth.js';
2
- export * from './GroupMetadata.js';
3
- export * from './Chat.js';
4
- export * from './Contact.js';
5
- export * from './State.js';
6
- export * from './Message.js';
7
- export * from './Socket.js';
8
- export * from './Events.js';
9
- export * from './Product.js';
10
- export * from './Call.js';
11
- export * from './Signal.js';
12
- export * from './Newsletter.js';
13
- export var DisconnectReason;
14
- (function (DisconnectReason) {
15
- DisconnectReason[DisconnectReason["connectionClosed"] = 428] = "connectionClosed";
16
- DisconnectReason[DisconnectReason["connectionLost"] = 408] = "connectionLost";
17
- DisconnectReason[DisconnectReason["connectionReplaced"] = 440] = "connectionReplaced";
18
- DisconnectReason[DisconnectReason["timedOut"] = 408] = "timedOut";
19
- DisconnectReason[DisconnectReason["loggedOut"] = 401] = "loggedOut";
20
- DisconnectReason[DisconnectReason["badSession"] = 500] = "badSession";
21
- DisconnectReason[DisconnectReason["restartRequired"] = 515] = "restartRequired";
22
- DisconnectReason[DisconnectReason["multideviceMismatch"] = 411] = "multideviceMismatch";
23
- DisconnectReason[DisconnectReason["forbidden"] = 403] = "forbidden";
24
- DisconnectReason[DisconnectReason["unavailableService"] = 503] = "unavailableService";
25
- })(DisconnectReason || (DisconnectReason = {}));
1
+ export * from './Auth.js';
2
+ export * from './GroupMetadata.js';
3
+ export * from './Chat.js';
4
+ export * from './Contact.js';
5
+ export * from './State.js';
6
+ export * from './Message.js';
7
+ export * from './Socket.js';
8
+ export * from './Events.js';
9
+ export * from './Product.js';
10
+ export * from './Call.js';
11
+ export * from './Signal.js';
12
+ export * from './Newsletter.js';
13
+ export var DisconnectReason;
14
+ (function (DisconnectReason) {
15
+ DisconnectReason[DisconnectReason["connectionClosed"] = 428] = "connectionClosed";
16
+ DisconnectReason[DisconnectReason["connectionLost"] = 408] = "connectionLost";
17
+ DisconnectReason[DisconnectReason["connectionReplaced"] = 440] = "connectionReplaced";
18
+ DisconnectReason[DisconnectReason["timedOut"] = 408] = "timedOut";
19
+ DisconnectReason[DisconnectReason["loggedOut"] = 401] = "loggedOut";
20
+ DisconnectReason[DisconnectReason["badSession"] = 500] = "badSession";
21
+ DisconnectReason[DisconnectReason["restartRequired"] = 515] = "restartRequired";
22
+ DisconnectReason[DisconnectReason["multideviceMismatch"] = 411] = "multideviceMismatch";
23
+ DisconnectReason[DisconnectReason["forbidden"] = 403] = "forbidden";
24
+ DisconnectReason[DisconnectReason["unavailableService"] = 503] = "unavailableService";
25
+ })(DisconnectReason || (DisconnectReason = {}));
26
26
  //# sourceMappingURL=index.js.map