socketon 1.31.2-rc → 1.51.16

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 (213) hide show
  1. package/README.md +313 -159
  2. package/WAProto/WAProto.proto +5311 -0
  3. package/WAProto/index.js +65801 -141371
  4. package/lib/Defaults/index.js +117 -141
  5. package/lib/KeyDB/BinarySearch.js +20 -0
  6. package/lib/KeyDB/KeyedDB.js +167 -0
  7. package/lib/KeyDB/index.js +4 -0
  8. package/lib/Signal/Group/ciphertext-message.js +12 -14
  9. package/lib/Signal/Group/group-session-builder.js +10 -42
  10. package/lib/Signal/Group/group_cipher.js +75 -87
  11. package/lib/Signal/Group/index.js +13 -57
  12. package/lib/Signal/Group/keyhelper.js +17 -52
  13. package/lib/Signal/Group/sender-chain-key.js +27 -33
  14. package/lib/Signal/Group/sender-key-distribution-message.js +62 -63
  15. package/lib/Signal/Group/sender-key-message.js +65 -66
  16. package/lib/Signal/Group/sender-key-name.js +45 -44
  17. package/lib/Signal/Group/sender-key-record.js +39 -49
  18. package/lib/Signal/Group/sender-key-state.js +80 -93
  19. package/lib/Signal/Group/sender-message-key.js +27 -28
  20. package/lib/Signal/libsignal.js +313 -163
  21. package/lib/Signal/lid-mapping.js +155 -0
  22. package/lib/Socket/Client/index.js +4 -19
  23. package/lib/Socket/Client/types.js +13 -0
  24. package/lib/Socket/Client/websocket.js +52 -0
  25. package/lib/Socket/Client/websocket.js.bak +53 -0
  26. package/lib/Socket/business.js +359 -242
  27. package/lib/Socket/chats.js +846 -935
  28. package/lib/Socket/communities.js +413 -0
  29. package/lib/Socket/groups.js +304 -309
  30. package/lib/Socket/index.js +15 -10
  31. package/lib/Socket/messages-recv.js +1107 -1054
  32. package/lib/Socket/messages-send.js +639 -448
  33. package/lib/Socket/mex.js +45 -0
  34. package/lib/Socket/newsletter.js +240 -324
  35. package/lib/Socket/socket.js +794 -651
  36. package/lib/Socket/socketon.js +402 -0
  37. package/lib/Store/index.js +6 -10
  38. package/lib/Store/make-cache-manager-store.js +73 -81
  39. package/lib/Store/make-in-memory-store.js +286 -423
  40. package/lib/Store/make-ordered-dictionary.js +77 -79
  41. package/lib/Store/object-repository.js +24 -26
  42. package/lib/Types/Auth.js +3 -2
  43. package/lib/Types/Bussines.js +3 -0
  44. package/lib/Types/Call.js +3 -2
  45. package/lib/Types/Chat.js +9 -4
  46. package/lib/Types/Contact.js +3 -2
  47. package/lib/Types/Events.js +3 -2
  48. package/lib/Types/GroupMetadata.js +3 -2
  49. package/lib/Types/Label.js +24 -26
  50. package/lib/Types/LabelAssociation.js +6 -8
  51. package/lib/Types/Message.js +12 -9
  52. package/lib/Types/Newsletter.js +33 -38
  53. package/lib/Types/Newsletter.js.bak +33 -0
  54. package/lib/Types/Product.js +3 -2
  55. package/lib/Types/Signal.js +3 -2
  56. package/lib/Types/Socket.js +4 -2
  57. package/lib/Types/State.js +11 -2
  58. package/lib/Types/USync.js +3 -2
  59. package/lib/Types/index.js +27 -41
  60. package/lib/Utils/auth-utils.js +211 -198
  61. package/lib/Utils/baileys-event-stream.js +42 -61
  62. package/lib/Utils/browser-utils.js +25 -0
  63. package/lib/Utils/business.js +213 -214
  64. package/lib/Utils/chat-utils.js +710 -687
  65. package/lib/Utils/crypto.js +112 -133
  66. package/lib/Utils/decode-wa-message.js +252 -183
  67. package/lib/Utils/decode-wa-message.js.bak +267 -0
  68. package/lib/Utils/event-buffer.js +510 -496
  69. package/lib/Utils/generics.js +319 -392
  70. package/lib/Utils/history.js +83 -92
  71. package/lib/Utils/index.js +21 -33
  72. package/lib/Utils/link-preview.js +71 -83
  73. package/lib/Utils/logger.js +5 -7
  74. package/lib/Utils/lt-hash.js +40 -46
  75. package/lib/Utils/make-mutex.js +34 -41
  76. package/lib/Utils/message-retry-manager.js +113 -0
  77. package/lib/Utils/messages-media.js +550 -768
  78. package/lib/Utils/messages.js +354 -263
  79. package/lib/Utils/noise-handler.js +138 -149
  80. package/lib/Utils/pre-key-manager.js +85 -0
  81. package/lib/Utils/process-message.js +323 -303
  82. package/lib/Utils/signal.js +149 -141
  83. package/lib/Utils/use-multi-file-auth-state.js +95 -103
  84. package/lib/Utils/validate-connection.js +183 -214
  85. package/lib/WABinary/constants.js +1298 -35
  86. package/lib/WABinary/decode.js +237 -249
  87. package/lib/WABinary/encode.js +213 -260
  88. package/lib/WABinary/generic-utils.js +56 -65
  89. package/lib/WABinary/index.js +7 -21
  90. package/lib/WABinary/jid-utils.js +89 -58
  91. package/lib/WABinary/types.js +3 -2
  92. package/lib/WAM/BinaryInfo.js +10 -12
  93. package/lib/WAM/constants.js +22851 -15348
  94. package/lib/WAM/encode.js +135 -136
  95. package/lib/WAM/index.js +5 -19
  96. package/lib/WAUSync/Protocols/USyncContactProtocol.js +28 -30
  97. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +49 -53
  98. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +27 -28
  99. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +36 -39
  100. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +50 -50
  101. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +26 -20
  102. package/lib/WAUSync/Protocols/index.js +6 -20
  103. package/lib/WAUSync/USyncQuery.js +86 -85
  104. package/lib/WAUSync/USyncUser.js +23 -25
  105. package/lib/WAUSync/index.js +5 -19
  106. package/lib/index.js +27 -35
  107. package/package.json +85 -95
  108. package/engine-requirements.js +0 -10
  109. package/lib/Defaults/baileys-version.json +0 -3
  110. package/lib/Defaults/index.d.ts +0 -53
  111. package/lib/Defaults/phonenumber-mcc.json +0 -223
  112. package/lib/Signal/Group/ciphertext-message.d.ts +0 -9
  113. package/lib/Signal/Group/group-session-builder.d.ts +0 -14
  114. package/lib/Signal/Group/group_cipher.d.ts +0 -17
  115. package/lib/Signal/Group/index.d.ts +0 -11
  116. package/lib/Signal/Group/keyhelper.d.ts +0 -10
  117. package/lib/Signal/Group/queue-job.d.ts +0 -1
  118. package/lib/Signal/Group/queue-job.js +0 -57
  119. package/lib/Signal/Group/sender-chain-key.d.ts +0 -13
  120. package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -16
  121. package/lib/Signal/Group/sender-key-message.d.ts +0 -18
  122. package/lib/Signal/Group/sender-key-name.d.ts +0 -17
  123. package/lib/Signal/Group/sender-key-record.d.ts +0 -30
  124. package/lib/Signal/Group/sender-key-state.d.ts +0 -38
  125. package/lib/Signal/Group/sender-message-key.d.ts +0 -11
  126. package/lib/Signal/libsignal.d.ts +0 -3
  127. package/lib/Socket/Client/abstract-socket-client.d.ts +0 -17
  128. package/lib/Socket/Client/abstract-socket-client.js +0 -13
  129. package/lib/Socket/Client/index.d.ts +0 -3
  130. package/lib/Socket/Client/mobile-socket-client.d.ts +0 -13
  131. package/lib/Socket/Client/mobile-socket-client.js +0 -65
  132. package/lib/Socket/Client/web-socket-client.d.ts +0 -12
  133. package/lib/Socket/Client/web-socket-client.js +0 -62
  134. package/lib/Socket/business.d.ts +0 -171
  135. package/lib/Socket/chats.d.ts +0 -267
  136. package/lib/Socket/dugong.d.ts +0 -254
  137. package/lib/Socket/dugong.js +0 -484
  138. package/lib/Socket/groups.d.ts +0 -115
  139. package/lib/Socket/index.d.ts +0 -173
  140. package/lib/Socket/messages-recv.d.ts +0 -161
  141. package/lib/Socket/messages-send.d.ts +0 -149
  142. package/lib/Socket/newsletter.d.ts +0 -134
  143. package/lib/Socket/registration.d.ts +0 -267
  144. package/lib/Socket/registration.js +0 -166
  145. package/lib/Socket/socket.d.ts +0 -43
  146. package/lib/Socket/usync.d.ts +0 -36
  147. package/lib/Socket/usync.js +0 -70
  148. package/lib/Store/index.d.ts +0 -3
  149. package/lib/Store/make-cache-manager-store.d.ts +0 -13
  150. package/lib/Store/make-in-memory-store.d.ts +0 -118
  151. package/lib/Store/make-ordered-dictionary.d.ts +0 -13
  152. package/lib/Store/object-repository.d.ts +0 -10
  153. package/lib/Types/Auth.d.ts +0 -110
  154. package/lib/Types/Call.d.ts +0 -13
  155. package/lib/Types/Chat.d.ts +0 -102
  156. package/lib/Types/Contact.d.ts +0 -19
  157. package/lib/Types/Events.d.ts +0 -157
  158. package/lib/Types/GroupMetadata.d.ts +0 -55
  159. package/lib/Types/Label.d.ts +0 -35
  160. package/lib/Types/LabelAssociation.d.ts +0 -29
  161. package/lib/Types/Message.d.ts +0 -273
  162. package/lib/Types/Newsletter.d.ts +0 -103
  163. package/lib/Types/Product.d.ts +0 -78
  164. package/lib/Types/Signal.d.ts +0 -57
  165. package/lib/Types/Socket.d.ts +0 -111
  166. package/lib/Types/State.d.ts +0 -27
  167. package/lib/Types/USync.d.ts +0 -25
  168. package/lib/Types/index.d.ts +0 -57
  169. package/lib/Utils/auth-utils.d.ts +0 -18
  170. package/lib/Utils/baileys-event-stream.d.ts +0 -16
  171. package/lib/Utils/business.d.ts +0 -22
  172. package/lib/Utils/chat-utils.d.ts +0 -71
  173. package/lib/Utils/crypto.d.ts +0 -41
  174. package/lib/Utils/decode-wa-message.d.ts +0 -19
  175. package/lib/Utils/event-buffer.d.ts +0 -35
  176. package/lib/Utils/generics.d.ts +0 -92
  177. package/lib/Utils/generics.js.bak +0 -433
  178. package/lib/Utils/history.d.ts +0 -15
  179. package/lib/Utils/index.d.ts +0 -17
  180. package/lib/Utils/link-preview.d.ts +0 -21
  181. package/lib/Utils/logger.d.ts +0 -4
  182. package/lib/Utils/lt-hash.d.ts +0 -12
  183. package/lib/Utils/make-mutex.d.ts +0 -7
  184. package/lib/Utils/messages-media.d.ts +0 -116
  185. package/lib/Utils/messages.d.ts +0 -77
  186. package/lib/Utils/noise-handler.d.ts +0 -21
  187. package/lib/Utils/process-message.d.ts +0 -41
  188. package/lib/Utils/signal.d.ts +0 -32
  189. package/lib/Utils/use-multi-file-auth-state.d.ts +0 -13
  190. package/lib/Utils/validate-connection.d.ts +0 -11
  191. package/lib/Utils/validate-connection.js.bak +0 -237
  192. package/lib/WABinary/constants.d.ts +0 -30
  193. package/lib/WABinary/decode.d.ts +0 -7
  194. package/lib/WABinary/encode.d.ts +0 -3
  195. package/lib/WABinary/generic-utils.d.ts +0 -17
  196. package/lib/WABinary/index.d.ts +0 -5
  197. package/lib/WABinary/jid-utils.d.ts +0 -31
  198. package/lib/WABinary/types.d.ts +0 -18
  199. package/lib/WAM/BinaryInfo.d.ts +0 -17
  200. package/lib/WAM/constants.d.ts +0 -38
  201. package/lib/WAM/encode.d.ts +0 -3
  202. package/lib/WAM/index.d.ts +0 -3
  203. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -9
  204. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -22
  205. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -12
  206. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -12
  207. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +0 -25
  208. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +0 -8
  209. package/lib/WAUSync/Protocols/index.d.ts +0 -4
  210. package/lib/WAUSync/USyncQuery.d.ts +0 -28
  211. package/lib/WAUSync/USyncUser.d.ts +0 -12
  212. package/lib/WAUSync/index.d.ts +0 -3
  213. package/lib/index.d.ts +0 -12
@@ -1,81 +1,79 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function makeOrderedDictionary(idGetter) {
4
- const array = [];
5
- const dict = {};
6
- const get = (id) => dict[id];
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;
1
+ //===================================//
2
+ export function makeOrderedDictionary(idGetter) {
3
+ const array = []
4
+ const dict = {}
5
+ const get = (id) => dict[id]
6
+ const update = (item) => {
7
+ const id = idGetter(item)
8
+ const idx = array.findIndex(i => idGetter(i) === id)
9
+ if (idx >= 0) {
10
+ array[idx] = item
11
+ dict[id] = item
12
+ }
13
+ return false
14
+ }
15
+ const upsert = (item, mode) => {
16
+ const id = idGetter(item)
17
+ if (get(id)) {
18
+ update(item)
19
+ }
20
+ else {
21
+ if (mode === "append") {
22
+ array.push(item)
23
+ }
24
+ else {
25
+ array.splice(0, 0, item)
26
+ }
27
+ dict[id] = item
28
+ }
29
+ }
30
+ const remove = (item) => {
31
+ const id = idGetter(item)
32
+ const idx = array.findIndex(i => idGetter(i) === id)
33
+ if (idx >= 0) {
34
+ array.splice(idx, 1)
35
+ delete dict[id]
36
+ return true
37
+ }
38
+ return false
39
+ }
40
+ return {
41
+ array,
42
+ get,
43
+ upsert,
44
+ update,
45
+ remove,
46
+ updateAssign: (id, update) => {
47
+ const item = get(id)
48
+ if (item) {
49
+ Object.assign(item, update)
50
+ delete dict[id]
51
+ dict[idGetter(item)] = item
52
+ return true
53
+ }
54
+ return false
55
+ },
56
+ clear: () => {
57
+ array.splice(0, array.length)
58
+ for (const key of Object.keys(dict)) {
59
+ delete dict[key]
60
+ }
61
+ },
62
+ filter: (contain) => {
63
+ let i = 0
64
+ while (i < array.length) {
65
+ if (!contain(array[i])) {
66
+ delete dict[idGetter(array[i])]
67
+ array.splice(i, 1)
68
+ } else {
69
+ i += 1
13
70
  }
14
- return false;
15
- };
16
- const upsert = (item, mode) => {
17
- const id = idGetter(item);
18
- if (get(id)) {
19
- update(item);
20
- }
21
- else {
22
- if (mode === 'append') {
23
- array.push(item);
24
- }
25
- else {
26
- array.splice(0, 0, item);
27
- }
28
- dict[id] = item;
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
- return {
42
- array,
43
- get,
44
- upsert,
45
- update,
46
- remove,
47
- updateAssign: (id, update) => {
48
- const item = get(id);
49
- if (item) {
50
- Object.assign(item, update);
51
- delete dict[id];
52
- dict[idGetter(item)] = item;
53
- return true;
54
- }
55
- return false;
56
- },
57
- clear: () => {
58
- array.splice(0, array.length);
59
- Object.keys(dict).forEach(key => {
60
- delete dict[key];
61
- });
62
- },
63
- filter: (contain) => {
64
- let i = 0;
65
- while (i < array.length) {
66
- if (!contain(array[i])) {
67
- delete dict[idGetter(array[i])];
68
- array.splice(i, 1);
69
- }
70
- else {
71
- i += 1;
72
- }
73
- }
74
- },
75
- toJSON: () => array,
76
- fromJSON: (newItems) => {
77
- array.splice(0, array.length, ...newItems);
78
- }
79
- };
71
+ }
72
+ },
73
+ toJSON: () => array,
74
+ fromJSON: (newItems) => {
75
+ array.splice(0, array.length, ...newItems)
76
+ }
77
+ }
80
78
  }
81
- exports.default = makeOrderedDictionary;
79
+ //===================================//
@@ -1,27 +1,25 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ObjectRepository = void 0;
4
- class ObjectRepository {
5
- constructor(entities = {}) {
6
- this.entityMap = new Map(Object.entries(entities));
7
- }
8
- findById(id) {
9
- return this.entityMap.get(id);
10
- }
11
- findAll() {
12
- return Array.from(this.entityMap.values());
13
- }
14
- upsertById(id, entity) {
15
- return this.entityMap.set(id, { ...entity });
16
- }
17
- deleteById(id) {
18
- return this.entityMap.delete(id);
19
- }
20
- count() {
21
- return this.entityMap.size;
22
- }
23
- toJSON() {
24
- return this.findAll();
25
- }
1
+ //===================================//
2
+ export class ObjectRepository {
3
+ constructor(entities = {}) {
4
+ this.entityMap = new Map(Object.entries(entities))
5
+ }
6
+ findById(id) {
7
+ return this.entityMap.get(id)
8
+ }
9
+ findAll() {
10
+ return Array.from(this.entityMap.values())
11
+ }
12
+ upsertById(id, entity) {
13
+ return this.entityMap.set(id, { ...entity })
14
+ }
15
+ deleteById(id) {
16
+ return this.entityMap.delete(id)
17
+ }
18
+ count() {
19
+ return this.entityMap.size
20
+ }
21
+ toJSON() {
22
+ return this.findAll()
23
+ }
26
24
  }
27
- exports.ObjectRepository = ObjectRepository;
25
+ //===================================//
package/lib/Types/Auth.js CHANGED
@@ -1,2 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ //=======================================================//
2
+ export {};
3
+ //=======================================================//
@@ -0,0 +1,3 @@
1
+ //=======================================================//
2
+ export {};
3
+ //=======================================================//
package/lib/Types/Call.js CHANGED
@@ -1,2 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ //=======================================================//
2
+ export {};
3
+ //=======================================================//
package/lib/Types/Chat.js CHANGED
@@ -1,4 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ALL_WA_PATCH_NAMES = void 0;
4
- exports.ALL_WA_PATCH_NAMES = ['critical_block', 'critical_unblock_low', 'regular_high', 'regular_low', 'regular'];
1
+ //=======================================================//
2
+ export const ALL_WA_PATCH_NAMES = [
3
+ "critical_block",
4
+ "critical_unblock_low",
5
+ "regular_high",
6
+ "regular_low",
7
+ "regular"
8
+ ];
9
+ //=======================================================//
@@ -1,2 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ //=======================================================//
2
+ export {};
3
+ //=======================================================//
@@ -1,2 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ //=======================================================//
2
+ import { proto } from "../../WAProto/index.js";
3
+ //=======================================================//
@@ -1,2 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ //=======================================================//
2
+ export {};
3
+ //=======================================================//
@@ -1,27 +1,25 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LabelColor = void 0;
4
- /** WhatsApp has 20 predefined colors */
5
- var LabelColor;
1
+ //=======================================================//
2
+ export var LabelColor;
6
3
  (function (LabelColor) {
7
- LabelColor[LabelColor["Color1"] = 0] = "Color1";
8
- LabelColor[LabelColor["Color2"] = 1] = "Color2";
9
- LabelColor[LabelColor["Color3"] = 2] = "Color3";
10
- LabelColor[LabelColor["Color4"] = 3] = "Color4";
11
- LabelColor[LabelColor["Color5"] = 4] = "Color5";
12
- LabelColor[LabelColor["Color6"] = 5] = "Color6";
13
- LabelColor[LabelColor["Color7"] = 6] = "Color7";
14
- LabelColor[LabelColor["Color8"] = 7] = "Color8";
15
- LabelColor[LabelColor["Color9"] = 8] = "Color9";
16
- LabelColor[LabelColor["Color10"] = 9] = "Color10";
17
- LabelColor[LabelColor["Color11"] = 10] = "Color11";
18
- LabelColor[LabelColor["Color12"] = 11] = "Color12";
19
- LabelColor[LabelColor["Color13"] = 12] = "Color13";
20
- LabelColor[LabelColor["Color14"] = 13] = "Color14";
21
- LabelColor[LabelColor["Color15"] = 14] = "Color15";
22
- LabelColor[LabelColor["Color16"] = 15] = "Color16";
23
- LabelColor[LabelColor["Color17"] = 16] = "Color17";
24
- LabelColor[LabelColor["Color18"] = 17] = "Color18";
25
- LabelColor[LabelColor["Color19"] = 18] = "Color19";
26
- LabelColor[LabelColor["Color20"] = 19] = "Color20";
27
- })(LabelColor = exports.LabelColor || (exports.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
+ //=======================================================//
@@ -1,9 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LabelAssociationType = void 0;
4
- /** Association type */
5
- var LabelAssociationType;
1
+ //=======================================================//
2
+ export var LabelAssociationType;
6
3
  (function (LabelAssociationType) {
7
- LabelAssociationType["Chat"] = "label_jid";
8
- LabelAssociationType["Message"] = "label_message";
9
- })(LabelAssociationType = exports.LabelAssociationType || (exports.LabelAssociationType = {}));
4
+ LabelAssociationType["Chat"] = "label_jid";
5
+ LabelAssociationType["Message"] = "label_message";
6
+ })(LabelAssociationType || (LabelAssociationType = {}));
7
+ //=======================================================//
@@ -1,9 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WAMessageStatus = exports.WAMessageStubType = exports.WAProto = void 0;
4
- const WAProto_1 = require("../../WAProto");
5
- Object.defineProperty(exports, "WAProto", { enumerable: true, get: function () { return WAProto_1.proto; } });
6
- // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
7
- exports.WAMessageStubType = WAProto_1.proto.WebMessageInfo.StubType;
8
- // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
9
- exports.WAMessageStatus = WAProto_1.proto.WebMessageInfo.Status;
1
+ //=======================================================//
2
+ import { proto } from "../../WAProto/index.js";
3
+ //=======================================================//
4
+ export { proto as WAProto };
5
+ export const WAMessageStubType = proto.WebMessageInfo.StubType;
6
+ export const WAMessageStatus = proto.WebMessageInfo.Status;
7
+ export var WAMessageAddressingMode;
8
+ (function (WAMessageAddressingMode) {
9
+ WAMessageAddressingMode["PN"] = "pn";
10
+ WAMessageAddressingMode["LID"] = "lid";
11
+ })(WAMessageAddressingMode || (WAMessageAddressingMode = {}));
12
+ //=======================================================//
@@ -1,38 +1,33 @@
1
- "use strict"
2
-
3
- Object.defineProperty(exports, "__esModule", { value: true })
4
-
5
- const MexOperations = {
6
- PROMOTE: "NotificationNewsletterAdminPromote",
7
- DEMOTE: "NotificationNewsletterAdminDemote",
8
- UPDATE: "NotificationNewsletterUpdate"
9
- }
10
-
11
- const XWAPaths = {
12
- PROMOTE: "xwa2_notify_newsletter_admin_promote",
13
- DEMOTE: "xwa2_notify_newsletter_admin_demote",
14
- ADMIN_COUNT: "xwa2_newsletter_admin",
15
- CREATE: "xwa2_newsletter_create",
16
- NEWSLETTER: "xwa2_newsletter",
17
- SUBSCRIBED: "xwa2_newsletter_subscribed",
18
- METADATA_UPDATE: "xwa2_notify_newsletter_on_metadata_update"
19
- }
20
-
21
- const QueryIds = {
22
- JOB_MUTATION: "7150902998257522",
23
- METADATA: "6620195908089573",
24
- UNFOLLOW: "7238632346214362",
25
- FOLLOW: "7871414976211147",
26
- UNMUTE: "7337137176362961",
27
- MUTE: "25151904754424642",
28
- CREATE: "6996806640408138",
29
- ADMIN_COUNT: "7130823597031706",
30
- CHANGE_OWNER: "7341777602580933",
31
- DELETE: "8316537688363079",
32
- DEMOTE: "6551828931592903",
33
- SUBSCRIBED: "6388546374527196"
34
- }
35
-
36
- exports.MexOperations = MexOperations
37
- exports.XWAPaths = XWAPaths
38
- exports.QueryIds = QueryIds
1
+ //=======================================================//
2
+ export var XWAPaths;
3
+ (function (XWAPaths) {
4
+ XWAPaths["xwa2_newsletter_create"] = "xwa2_newsletter_create";
5
+ XWAPaths["xwa2_newsletter_subscribers"] = "xwa2_newsletter_subscribers";
6
+ XWAPaths["xwa2_newsletter_view"] = "xwa2_newsletter_view";
7
+ XWAPaths["xwa2_newsletter_metadata"] = "xwa2_newsletter";
8
+ XWAPaths["xwa2_newsletter_admin_count"] = "xwa2_newsletter_admin";
9
+ XWAPaths["xwa2_newsletter_mute_v2"] = "xwa2_newsletter_mute_v2";
10
+ XWAPaths["xwa2_newsletter_unmute_v2"] = "xwa2_newsletter_unmute_v2";
11
+ XWAPaths["xwa2_newsletter_follow"] = "xwa2_newsletter_follow";
12
+ XWAPaths["xwa2_newsletter_unfollow"] = "xwa2_newsletter_unfollow";
13
+ XWAPaths["xwa2_newsletter_change_owner"] = "xwa2_newsletter_change_owner";
14
+ XWAPaths["xwa2_newsletter_demote"] = "xwa2_newsletter_demote";
15
+ XWAPaths["xwa2_newsletter_delete_v2"] = "xwa2_newsletter_delete_v2";
16
+ })(XWAPaths || (XWAPaths = {}));
17
+ //=======================================================//
18
+ export var QueryIds;
19
+ (function (QueryIds) {
20
+ QueryIds["CREATE"] = "8823471724422422";
21
+ QueryIds["UPDATE_METADATA"] = "24250201037901610";
22
+ QueryIds["METADATA"] = "6620195908089573";
23
+ QueryIds["SUBSCRIBERS"] = "6388546374527196";
24
+ QueryIds["FOLLOW"] = "7871414976211147";
25
+ QueryIds["UNFOLLOW"] = "7238632346214362";
26
+ QueryIds["MUTE"] = "29766401636284406";
27
+ QueryIds["UNMUTE"] = "9864994326891137";
28
+ QueryIds["ADMIN_COUNT"] = "7130823597031706";
29
+ QueryIds["CHANGE_OWNER"] = "7341777602580933";
30
+ QueryIds["DEMOTE"] = "6551828931592903";
31
+ QueryIds["DELETE"] = "30062808666639665";
32
+ })(QueryIds || (QueryIds = {}));
33
+ //=======================================================//
@@ -0,0 +1,33 @@
1
+ //=======================================================//
2
+ export var XWAPaths;
3
+ (function (XWAPaths) {
4
+ XWAPaths["xwa2_newsletter_create"] = "xwa2_newsletter_create";
5
+ XWAPaths["xwa2_newsletter_subscribers"] = "xwa2_newsletter_subscribers";
6
+ XWAPaths["xwa2_newsletter_view"] = "xwa2_newsletter_view";
7
+ XWAPaths["xwa2_newsletter_metadata"] = "xwa2_newsletter";
8
+ XWAPaths["xwa2_newsletter_admin_count"] = "xwa2_newsletter_admin";
9
+ XWAPaths["xwa2_newsletter_mute_v2"] = "xwa2_newsletter_mute_v2";
10
+ XWAPaths["xwa2_newsletter_unmute_v2"] = "xwa2_newsletter_unmute_v2";
11
+ XWAPaths["xwa2_newsletter_follow"] = "xwa2_newsletter_follow";
12
+ XWAPaths["xwa2_newsletter_unfollow"] = "xwa2_newsletter_unfollow";
13
+ XWAPaths["xwa2_newsletter_change_owner"] = "xwa2_newsletter_change_owner";
14
+ XWAPaths["xwa2_newsletter_demote"] = "xwa2_newsletter_demote";
15
+ XWAPaths["xwa2_newsletter_delete_v2"] = "xwa2_newsletter_delete_v2";
16
+ })(XWAPaths || (XWAPaths = {}));
17
+ //=======================================================//
18
+ export var QueryIds;
19
+ (function (QueryIds) {
20
+ QueryIds["CREATE"] = "8823471724422422";
21
+ QueryIds["UPDATE_METADATA"] = "24250201037901610";
22
+ QueryIds["METADATA"] = "6620195908089573";
23
+ QueryIds["SUBSCRIBERS"] = "6388546374527196";
24
+ QueryIds["FOLLOW"] = "7871414976211147";
25
+ QueryIds["UNFOLLOW"] = "7238632346214362";
26
+ QueryIds["MUTE"] = "29766401636284406";
27
+ QueryIds["UNMUTE"] = "9864994326891137";
28
+ QueryIds["ADMIN_COUNT"] = "7130823597031706";
29
+ QueryIds["CHANGE_OWNER"] = "7341777602580933";
30
+ QueryIds["DEMOTE"] = "6551828931592903";
31
+ QueryIds["DELETE"] = "30062808666639665";
32
+ })(QueryIds || (QueryIds = {}));
33
+ //=======================================================//
@@ -1,2 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ //=======================================================//
2
+ export {};
3
+ //=======================================================//
@@ -1,2 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ //=======================================================//
2
+ import { proto } from "../../WAProto/index.js";
3
+ //=======================================================//
@@ -1,2 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ //=======================================================//
2
+ import { proto } from "../../WAProto/index.js";
3
+ import {} from "./Message.js";
4
+ //=======================================================//
@@ -1,2 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ //=======================================================//
2
+ import { Boom } from "@hapi/boom";
3
+ //=======================================================//
4
+ export var SyncState;
5
+ (function (SyncState) {
6
+ SyncState[SyncState["Connecting"] = 0] = "Connecting";
7
+ SyncState[SyncState["AwaitingInitialSync"] = 1] = "AwaitingInitialSync";
8
+ SyncState[SyncState["Syncing"] = 2] = "Syncing";
9
+ SyncState[SyncState["Online"] = 3] = "Online";
10
+ })(SyncState || (SyncState = {}));
11
+ //=======================================================//
@@ -1,2 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ //=======================================================//
2
+ import { USyncUser } from "../WAUSync/index.js";
3
+ //=======================================================//
@@ -1,42 +1,28 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.DisconnectReason = void 0;
18
- __exportStar(require("./Auth"), exports);
19
- __exportStar(require("./GroupMetadata"), exports);
20
- __exportStar(require("./Chat"), exports);
21
- __exportStar(require("./Contact"), exports);
22
- __exportStar(require("./State"), exports);
23
- __exportStar(require("./Message"), exports);
24
- __exportStar(require("./Newsletter"), exports);
25
- __exportStar(require("./Socket"), exports);
26
- __exportStar(require("./Events"), exports);
27
- __exportStar(require("./Product"), exports);
28
- __exportStar(require("./Call"), exports);
29
- __exportStar(require("./Signal"), exports);
30
- var DisconnectReason;
1
+ //=======================================================//
2
+ export * from "./GroupMetadata.js";
3
+ export * from "./Newsletter.js";
4
+ export * from "./Contact.js";
5
+ export * from "./Message.js";
6
+ export * from "./Product.js";
7
+ export * from "./Socket.js";
8
+ export * from "./Events.js";
9
+ export * from "./Signal.js";
10
+ export * from "./State.js";
11
+ export * from "./Chat.js";
12
+ export * from "./Call.js";
13
+ export * from "./Auth.js";
14
+ //=======================================================//
15
+ export var DisconnectReason;
31
16
  (function (DisconnectReason) {
32
- DisconnectReason[DisconnectReason["connectionClosed"] = 428] = "connectionClosed";
33
- DisconnectReason[DisconnectReason["connectionLost"] = 408] = "connectionLost";
34
- DisconnectReason[DisconnectReason["connectionReplaced"] = 440] = "connectionReplaced";
35
- DisconnectReason[DisconnectReason["timedOut"] = 408] = "timedOut";
36
- DisconnectReason[DisconnectReason["loggedOut"] = 401] = "loggedOut";
37
- DisconnectReason[DisconnectReason["badSession"] = 500] = "badSession";
38
- DisconnectReason[DisconnectReason["restartRequired"] = 515] = "restartRequired";
39
- DisconnectReason[DisconnectReason["multideviceMismatch"] = 411] = "multideviceMismatch";
40
- DisconnectReason[DisconnectReason["forbidden"] = 403] = "forbidden";
41
- DisconnectReason[DisconnectReason["unavailableService"] = 503] = "unavailableService";
42
- })(DisconnectReason = exports.DisconnectReason || (exports.DisconnectReason = {}));
17
+ DisconnectReason[DisconnectReason["connectionClosed"] = 428] = "connectionClosed";
18
+ DisconnectReason[DisconnectReason["connectionLost"] = 408] = "connectionLost";
19
+ DisconnectReason[DisconnectReason["connectionReplaced"] = 440] = "connectionReplaced";
20
+ DisconnectReason[DisconnectReason["timedOut"] = 408] = "timedOut";
21
+ DisconnectReason[DisconnectReason["loggedOut"] = 401] = "loggedOut";
22
+ DisconnectReason[DisconnectReason["badSession"] = 500] = "badSession";
23
+ DisconnectReason[DisconnectReason["restartRequired"] = 515] = "restartRequired";
24
+ DisconnectReason[DisconnectReason["multideviceMismatch"] = 411] = "multideviceMismatch";
25
+ DisconnectReason[DisconnectReason["forbidden"] = 403] = "forbidden";
26
+ DisconnectReason[DisconnectReason["unavailableService"] = 503] = "unavailableService";
27
+ })(DisconnectReason || (DisconnectReason = {}));
28
+ //=======================================================//