@nexustechpro/baileys 2.0.2 → 2.0.5
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/LICENSE +1 -1
- package/README.md +924 -1299
- package/lib/Defaults/baileys-version.json +6 -2
- package/lib/Defaults/index.js +172 -172
- package/lib/Signal/libsignal.js +380 -292
- package/lib/Signal/lid-mapping.js +264 -171
- package/lib/Socket/Client/index.js +2 -2
- package/lib/Socket/Client/types.js +10 -10
- package/lib/Socket/Client/websocket.js +45 -310
- package/lib/Socket/business.js +375 -375
- package/lib/Socket/chats.js +909 -963
- package/lib/Socket/communities.js +430 -430
- package/lib/Socket/groups.js +342 -342
- package/lib/Socket/index.js +22 -22
- package/lib/Socket/messages-recv.js +777 -743
- package/lib/Socket/messages-send.js +295 -305
- package/lib/Socket/mex.js +50 -50
- package/lib/Socket/newsletter.js +148 -148
- package/lib/Socket/nexus-handler.js +75 -261
- package/lib/Socket/socket.js +709 -1201
- package/lib/Store/index.js +5 -5
- package/lib/Store/make-cache-manager-store.js +81 -81
- package/lib/Store/make-in-memory-store.js +416 -416
- package/lib/Store/make-ordered-dictionary.js +81 -81
- package/lib/Store/object-repository.js +30 -30
- package/lib/Types/Auth.js +1 -1
- package/lib/Types/Bussines.js +1 -1
- package/lib/Types/Call.js +1 -1
- package/lib/Types/Chat.js +7 -7
- package/lib/Types/Contact.js +1 -1
- package/lib/Types/Events.js +1 -1
- package/lib/Types/GroupMetadata.js +1 -1
- package/lib/Types/Label.js +24 -24
- package/lib/Types/LabelAssociation.js +6 -6
- package/lib/Types/Message.js +10 -10
- package/lib/Types/Newsletter.js +28 -28
- package/lib/Types/Product.js +1 -1
- package/lib/Types/Signal.js +1 -1
- package/lib/Types/Socket.js +2 -2
- package/lib/Types/State.js +12 -12
- package/lib/Types/USync.js +1 -1
- package/lib/Types/index.js +25 -25
- package/lib/Utils/auth-utils.js +264 -256
- package/lib/Utils/baileys-event-stream.js +55 -55
- package/lib/Utils/browser-utils.js +27 -27
- package/lib/Utils/business.js +228 -230
- package/lib/Utils/chat-utils.js +694 -764
- package/lib/Utils/crypto.js +109 -135
- package/lib/Utils/decode-wa-message.js +310 -314
- package/lib/Utils/event-buffer.js +547 -547
- package/lib/Utils/generics.js +297 -297
- package/lib/Utils/history.js +91 -83
- package/lib/Utils/index.js +21 -20
- package/lib/Utils/key-store.js +17 -0
- package/lib/Utils/link-preview.js +97 -98
- package/lib/Utils/logger.js +2 -2
- package/lib/Utils/lt-hash.js +47 -47
- package/lib/Utils/make-mutex.js +39 -39
- package/lib/Utils/message-retry-manager.js +148 -148
- package/lib/Utils/messages-media.js +534 -534
- package/lib/Utils/messages.js +705 -705
- package/lib/Utils/noise-handler.js +255 -255
- package/lib/Utils/pre-key-manager.js +105 -105
- package/lib/Utils/process-message.js +412 -412
- package/lib/Utils/signal.js +160 -158
- package/lib/Utils/use-multi-file-auth-state.js +120 -120
- package/lib/Utils/validate-connection.js +194 -194
- package/lib/WABinary/constants.js +1300 -1300
- package/lib/WABinary/decode.js +237 -237
- package/lib/WABinary/encode.js +232 -232
- package/lib/WABinary/generic-utils.js +252 -211
- package/lib/WABinary/index.js +5 -5
- package/lib/WABinary/jid-utils.js +279 -95
- package/lib/WABinary/types.js +1 -1
- package/lib/WAM/BinaryInfo.js +9 -9
- package/lib/WAM/constants.js +22852 -22852
- package/lib/WAM/encode.js +149 -149
- package/lib/WAM/index.js +3 -3
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +28 -28
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +53 -53
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +26 -26
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +37 -37
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +50 -50
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +28 -28
- package/lib/WAUSync/Protocols/index.js +4 -4
- package/lib/WAUSync/USyncQuery.js +93 -93
- package/lib/WAUSync/USyncUser.js +22 -22
- package/lib/WAUSync/index.js +3 -3
- package/lib/index.js +66 -66
- package/package.json +171 -144
- package/lib/Signal/Group/ciphertext-message.js +0 -12
- package/lib/Signal/Group/group-session-builder.js +0 -30
- package/lib/Signal/Group/group_cipher.js +0 -100
- package/lib/Signal/Group/index.js +0 -12
- package/lib/Signal/Group/keyhelper.js +0 -18
- package/lib/Signal/Group/sender-chain-key.js +0 -26
- package/lib/Signal/Group/sender-key-distribution-message.js +0 -63
- package/lib/Signal/Group/sender-key-message.js +0 -66
- package/lib/Signal/Group/sender-key-name.js +0 -48
- package/lib/Signal/Group/sender-key-record.js +0 -41
- package/lib/Signal/Group/sender-key-state.js +0 -84
- 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
|
package/lib/Types/Bussines.js
CHANGED
|
@@ -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
|
package/lib/Types/Contact.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=Contact.js.map
|
package/lib/Types/Events.js
CHANGED
|
@@ -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
|
package/lib/Types/Label.js
CHANGED
|
@@ -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
|
package/lib/Types/Message.js
CHANGED
|
@@ -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
|
package/lib/Types/Newsletter.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
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'
|
|
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
29
|
}
|
package/lib/Types/Product.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=Product.js.map
|
package/lib/Types/Signal.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { proto } from '../../WAProto/index.js';
|
|
1
|
+
import { proto } from '../../WAProto/index.js';
|
|
2
2
|
//# sourceMappingURL=Signal.js.map
|
package/lib/Types/Socket.js
CHANGED
|
@@ -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
|
package/lib/Types/State.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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
13
|
//# sourceMappingURL=State.js.map
|
package/lib/Types/USync.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { USyncUser } from '../WAUSync/index.js';
|
|
1
|
+
import { USyncUser } from '../WAUSync/index.js';
|
|
2
2
|
//# sourceMappingURL=USync.js.map
|
package/lib/Types/index.js
CHANGED
|
@@ -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
|