kage-baileys 3.0.6 → 3.2.3
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/Example/connection.cjs +4 -0
- package/README.MD +4726 -48
- package/WAProto/WAProto.proto +3395 -415
- package/WAProto/compat.cjs +12 -0
- package/WAProto/index.d.ts +47104 -19888
- package/WAProto/index.js +131979 -57361
- package/lib/Addon/http-error.js +43 -0
- package/lib/Addon/index.js +32 -0
- package/lib/Addon/keyed-db.js +250 -0
- package/lib/Addon/link-preview.js +82 -0
- package/lib/Defaults/baileys-version.json +3 -0
- package/lib/Defaults/connection.js +110 -0
- package/lib/Defaults/constants.js +156 -0
- package/lib/Defaults/history.js +46 -0
- package/lib/Defaults/index.js +230 -0
- package/lib/Defaults/media.js +104 -0
- package/lib/Defaults/phonenumber-mcc.json +223 -0
- package/lib/Defaults/prefix.js +44 -0
- package/lib/Extensions/business-advanced.js +382 -0
- package/lib/Extensions/business.js +159 -0
- package/lib/Extensions/chats-advanced.js +1106 -0
- package/lib/Extensions/chats.js +349 -0
- package/lib/Extensions/communities-advanced.js +430 -0
- package/lib/Extensions/community.js +94 -0
- package/lib/Extensions/groups-advanced.js +343 -0
- package/lib/Extensions/index.js +30 -0
- package/lib/Extensions/messages-recv-advanced.js +1690 -0
- package/lib/Extensions/messages-send-advanced.js +622 -0
- package/lib/Extensions/messages-send.js +1380 -0
- package/lib/Extensions/newsletter-advanced.js +228 -0
- package/lib/Extensions/newsletter.js +72 -0
- package/lib/Extensions/socket.js +389 -0
- package/lib/Modded/message_builder.js +2084 -4
- package/lib/Signal/Group/ciphertext-message.js +54 -0
- package/lib/Signal/Group/group-session-builder.js +124 -0
- package/lib/Signal/Group/group_cipher.js +216 -0
- package/lib/Signal/Group/index.js +124 -0
- package/lib/Signal/Group/keyhelper.js +108 -0
- package/lib/Signal/Group/sender-chain-key.js +83 -0
- package/lib/Signal/Group/sender-key-distribution-message.js +157 -0
- package/lib/Signal/Group/sender-key-message.js +166 -0
- package/lib/Signal/Group/sender-key-name.js +130 -0
- package/lib/Signal/Group/sender-key-record.js +113 -0
- package/lib/Signal/Group/sender-key-state.js +208 -0
- package/lib/Signal/Group/sender-message-key.js +82 -0
- package/lib/Signal/libsignal.js +935 -0
- package/lib/Signal/lid-mapping.js +545 -1
- package/lib/Socket/Client/index.js +60 -0
- package/lib/Socket/Client/types.js +51 -0
- package/lib/Socket/Client/websocket.js +152 -0
- package/lib/Socket/business.js +831 -0
- package/lib/Socket/chats.js +2535 -49
- package/lib/Socket/communities.js +450 -1
- package/lib/Socket/community.js +1022 -0
- package/lib/Socket/dugong.js +1 -1
- package/lib/Socket/groups.js +747 -0
- package/lib/Socket/index.js +60 -2
- package/lib/Socket/messages-recv.js +3450 -5
- package/lib/Socket/messages-send.js +3123 -0
- package/lib/Socket/mex.js +126 -1
- package/lib/Socket/newsletter.js +465 -0
- package/lib/Socket/socket.js +2217 -1
- package/lib/Store/index.js +79 -0
- package/lib/Store/make-cache-manager-store.js +186 -0
- package/lib/Store/make-in-memory-store.js +878 -0
- package/lib/Store/make-ordered-dictionary.js +187 -0
- package/lib/Store/object-repository.js +78 -0
- package/lib/Types/Auth.js +25 -0
- package/lib/Types/Bussines.js +25 -1
- package/lib/Types/Call.js +25 -0
- package/lib/Types/Chat.js +39 -0
- package/lib/Types/Contact.js +25 -0
- package/lib/Types/Events.js +25 -0
- package/lib/Types/GroupMetadata.js +25 -0
- package/lib/Types/Label.js +76 -0
- package/lib/Types/LabelAssociation.js +40 -0
- package/lib/Types/Message.js +57 -0
- package/lib/Types/Mex.js +56 -1
- package/lib/Types/MexUpdates.js +46 -0
- package/lib/Types/Newsletter.js +56 -0
- package/lib/Types/Product.js +25 -0
- package/lib/Types/RichType.js +23 -0
- package/lib/Types/Signal.js +25 -0
- package/lib/Types/Socket.js +25 -0
- package/lib/Types/State.js +92 -0
- package/lib/Types/USync.js +25 -0
- package/lib/Types/index.js +133 -0
- package/lib/Utils/auth-utils.js +703 -0
- package/lib/Utils/automation-tools.js +51 -16
- package/lib/Utils/baileys-event-stream.js +146 -0
- package/lib/Utils/browser-utils.js +95 -0
- package/lib/Utils/business.js +525 -0
- package/lib/Utils/chat-utils.js +1861 -0
- package/lib/Utils/companion-reg-client-utils.js +55 -1
- package/lib/Utils/crypto.js +355 -0
- package/lib/Utils/decode-wa-message.js +709 -0
- package/lib/Utils/event-buffer.js +1323 -8
- package/lib/Utils/generics.js +945 -1
- package/lib/Utils/history.js +266 -0
- package/lib/Utils/identity-change-handler.js +62 -1
- package/lib/Utils/index.js +114 -0
- package/lib/Utils/link-preview.js +179 -0
- package/lib/Utils/logger.js +42 -0
- package/lib/Utils/lt-hash.js +73 -0
- package/lib/Utils/make-mutex.js +104 -0
- package/lib/Utils/message-inspector.js +110 -0
- package/lib/Utils/message-retry-manager.js +507 -2
- package/lib/Utils/messages-media.js +1931 -1
- package/lib/Utils/messages.js +3748 -0
- package/lib/Utils/noise-handler.js +423 -0
- package/lib/Utils/offline-node-processor.js +53 -1
- package/lib/Utils/pre-key-manager.js +255 -1
- package/lib/Utils/process-message.js +1592 -0
- package/lib/Utils/reporting-utils.js +272 -1
- package/lib/Utils/rich-message-utils.js +377 -0
- package/lib/Utils/rich-messages.js +1 -1
- package/lib/Utils/signal.js +437 -0
- package/lib/Utils/stanza-ack.js +51 -1
- package/lib/Utils/status-refresh.js +37 -0
- package/lib/Utils/status-tools.js +4 -2
- package/lib/Utils/sync-action-utils.js +63 -1
- package/lib/Utils/tc-token-utils.js +185 -1
- package/lib/Utils/terminal-banner.js +31 -0
- package/lib/Utils/use-multi-file-auth-state.js +271 -0
- package/lib/Utils/use-single-file-auth-state.js +108 -0
- package/lib/Utils/use-sqlite-auth-state.js +142 -0
- package/lib/Utils/validate-connection.js +497 -1
- package/lib/Utils/view-once-compat.js +13 -5
- package/lib/VoIP/audio-feeder.js +150 -0
- package/lib/VoIP/index.js +289 -0
- package/lib/VoIP/relay-transport.js +608 -0
- package/lib/VoIP/signaling.js +583 -0
- package/lib/VoIP/types.js +30 -0
- package/lib/VoIP/wasm-engine.js +1261 -2
- package/lib/VoIP/worker-bootstrap.js +1090 -2
- package/lib/WABinary/constants.js +2805 -0
- package/lib/WABinary/decode.js +649 -2
- package/lib/WABinary/encode.js +564 -2
- package/lib/WABinary/generic-utils.js +401 -0
- package/lib/WABinary/index.js +82 -0
- package/lib/WABinary/jid-utils.js +290 -0
- package/lib/WABinary/types.js +25 -0
- package/lib/WAM/BinaryInfo.js +50 -0
- package/lib/WAM/constants.js +45747 -0
- package/lib/WAM/encode.js +393 -0
- package/lib/WAM/index.js +78 -0
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +135 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +110 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +142 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +85 -0
- package/lib/WAUSync/Protocols/USyncLIDProtocol.js +69 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +107 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +38 -1
- package/lib/WAUSync/Protocols/index.js +83 -0
- package/lib/WAUSync/USyncQuery.js +241 -2
- package/lib/WAUSync/USyncUser.js +86 -0
- package/lib/WAUSync/index.js +78 -0
- package/lib/assets/wasm/loader.js +1875 -1
- package/lib/assets/wasm/worker-modules.js +11047 -1
- package/lib/index.d.ts +126 -0
- package/lib/index.js +53 -21
- package/lib/index.mjs +437 -0
- package/licenses/upstream-MIT.txt +22 -0
- package/maintenance/api-coverage.json +1642 -0
- package/maintenance/archivos-sha256.json +207 -0
- package/maintenance/consumer-validation.log +3 -0
- package/maintenance/dependency-audit.json +4 -4
- package/maintenance/extension-inventory.json +57 -0
- package/maintenance/protocol-update.json +1101 -0
- package/maintenance/protocol-wire-audit.json +4 -0
- package/maintenance/reference-socket-surface.json +209 -0
- package/maintenance/resumen-validacion.json +50 -0
- package/maintenance/validation.log +2725 -0
- package/maintenance/verification.json +566 -0
- package/package.json +107 -9
- package/scripts/check-imports.cjs +10 -0
- package/scripts/check-package.cjs +40 -0
- package/scripts/check-syntax.cjs +1 -1
- package/scripts/generate-protobuf.cjs +6 -1
- package/scripts/generate-public-types.cjs +9 -0
- package/scripts/kage-base64-fix.cjs +45 -0
- package/scripts/maintenance.cjs +10 -0
- package/test/advanced.test.cjs +24 -0
- package/test/base64-fix.test.cjs +49 -0
- package/test/maintenance.test.cjs +1 -1
- package/test/npm-publication.test.cjs +141 -0
- package/test/recepcion-reparada.test.cjs +98 -0
- package/test/resilience-binary.test.cjs +69 -0
- package/test/resilience-transport.test.cjs +34 -0
- package/test/types.test.ts +5 -0
- package/test/upgrade.test.cjs +104 -0
- package/tsconfig.json +20 -0
- package/WAProto/p.html +0 -1
- package/lib/KageExtra/Modded/message_builder.js +0 -2330
- package/lib/KageExtra/VoIP/audio-feeder.js +0 -136
- package/lib/KageExtra/VoIP/index.js +0 -282
- package/lib/KageExtra/VoIP/relay-transport.js +0 -559
- package/lib/KageExtra/VoIP/signaling.js +0 -603
- package/lib/KageExtra/VoIP/types.js +0 -17
- package/lib/KageExtra/VoIP/wasm-engine.js +0 -1214
- package/lib/KageExtra/VoIP/worker-bootstrap.js +0 -1042
- package/lib/KageExtra/assets/wasm/loader.js +0 -5
- package/lib/KageExtra/assets/wasm/whatsapp.wasm +0 -0
- package/lib/KageExtra/assets/wasm/worker-modules.js +0 -273
- package/lib/KageExtra/index.js +0 -3
- package/lib/KageExtra/package.json +0 -1
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +0 -53
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +0 -24
- package/maintenance/revision-full-check.txt +0 -1097
- package/maintenance/revision-library-tests.tap +0 -1088
- package/maintenance/revision-protobuf.txt +0 -5
- package/maintenance/revision-syntax.txt +0 -5
- package/maintenance/schema-coverage.json +0 -23
- package/maintenance/schema-merge.json +0 -30
- package/maintenance/validation-node20.txt +0 -191
- package/maintenance/validation-node22.txt +0 -237
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.USyncQuery = void 0;
|
|
4
4
|
const WABinary_1 = require("../WABinary");
|
|
5
|
-
const UsyncBotProfileProtocol_1 = require("./Protocols/
|
|
6
|
-
const UsyncLIDProtocol_1 = require("./Protocols/
|
|
5
|
+
const UsyncBotProfileProtocol_1 = require("./Protocols/USyncBotProfileProtocol");
|
|
6
|
+
const UsyncLIDProtocol_1 = require("./Protocols/USyncLIDProtocol");
|
|
7
7
|
const Protocols_1 = require("./Protocols");
|
|
8
8
|
class USyncQuery {
|
|
9
9
|
constructor() {
|
|
@@ -61,6 +61,10 @@ class USyncQuery {
|
|
|
61
61
|
//const sideListNode = getBinaryNodeChild(usyncNode, 'side_list')
|
|
62
62
|
return queryResult;
|
|
63
63
|
}
|
|
64
|
+
withUsernameProtocol() {
|
|
65
|
+
this.protocols.push(new (require('./Protocols/USyncUsernameProtocol').USyncUsernameProtocol)());
|
|
66
|
+
return this;
|
|
67
|
+
}
|
|
64
68
|
withDeviceProtocol() {
|
|
65
69
|
this.protocols.push(new Protocols_1.USyncDeviceProtocol());
|
|
66
70
|
return this;
|
|
@@ -87,3 +91,238 @@ class USyncQuery {
|
|
|
87
91
|
}
|
|
88
92
|
}
|
|
89
93
|
exports.USyncQuery = USyncQuery;
|
|
94
|
+
|
|
95
|
+
// Kage: compatibilidad de API.
|
|
96
|
+
const __kageModule99 = (() => {
|
|
97
|
+
const module = { exports: {} }; const exports = module.exports;
|
|
98
|
+
"use strict"
|
|
99
|
+
|
|
100
|
+
Object.defineProperty(exports, "__esModule", { value: true })
|
|
101
|
+
|
|
102
|
+
const { getBinaryNodeChild } = require("../WABinary")
|
|
103
|
+
const {
|
|
104
|
+
USyncLIDProtocol,
|
|
105
|
+
USyncDeviceProtocol,
|
|
106
|
+
USyncContactProtocol,
|
|
107
|
+
USyncStatusProtocol,
|
|
108
|
+
USyncBotProfileProtocol,
|
|
109
|
+
USyncDisappearingModeProtocol
|
|
110
|
+
} = require("./Protocols")
|
|
111
|
+
|
|
112
|
+
class USyncQuery {
|
|
113
|
+
constructor() {
|
|
114
|
+
this.protocols = []
|
|
115
|
+
this.users = []
|
|
116
|
+
this.context = 'interactive'
|
|
117
|
+
this.mode = 'query'
|
|
118
|
+
}
|
|
119
|
+
withMode(mode) {
|
|
120
|
+
this.mode = mode
|
|
121
|
+
return this
|
|
122
|
+
}
|
|
123
|
+
withContext(context) {
|
|
124
|
+
this.context = context
|
|
125
|
+
return this
|
|
126
|
+
}
|
|
127
|
+
withUser(user) {
|
|
128
|
+
this.users.push(user)
|
|
129
|
+
return this
|
|
130
|
+
}
|
|
131
|
+
parseUSyncQueryResult(result) {
|
|
132
|
+
if (!result || result.attrs.type !== 'result') {
|
|
133
|
+
return
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const protocolMap = Object.fromEntries(this.protocols.map(protocol => {
|
|
137
|
+
return [protocol.name, protocol.parser]
|
|
138
|
+
}))
|
|
139
|
+
|
|
140
|
+
const queryResult = {
|
|
141
|
+
// TODO: implement errors etc.
|
|
142
|
+
list: [],
|
|
143
|
+
sideList: []
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const usyncNode = getBinaryNodeChild(result, 'usync')
|
|
147
|
+
|
|
148
|
+
//TODO: implement error backoff, refresh etc.
|
|
149
|
+
//TODO: see if there are any errors in the result node
|
|
150
|
+
//const resultNode = getBinaryNodeChild(usyncNode, 'result')
|
|
151
|
+
const listNode = usyncNode ? getBinaryNodeChild(usyncNode, 'list') : undefined
|
|
152
|
+
|
|
153
|
+
if (listNode?.content && Array.isArray(listNode.content)) {
|
|
154
|
+
queryResult.list = listNode.content.reduce((acc, node) => {
|
|
155
|
+
const id = node?.attrs.jid
|
|
156
|
+
|
|
157
|
+
if (id) {
|
|
158
|
+
const data = Array.isArray(node?.content)
|
|
159
|
+
? Object.fromEntries(node.content
|
|
160
|
+
.map(content => {
|
|
161
|
+
const protocol = content.tag
|
|
162
|
+
const parser = protocolMap[protocol]
|
|
163
|
+
|
|
164
|
+
if (parser) {
|
|
165
|
+
return [protocol, parser(content)]
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
else {
|
|
169
|
+
return [protocol, null]
|
|
170
|
+
}
|
|
171
|
+
}).filter(([, b]) => b !== null))
|
|
172
|
+
: {};
|
|
173
|
+
acc.push({ ...data, id })
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return acc
|
|
177
|
+
}, [])
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
//TODO: implement side list
|
|
181
|
+
//const sideListNode = getBinaryNodeChild(usyncNode, 'side_list')
|
|
182
|
+
return queryResult
|
|
183
|
+
}
|
|
184
|
+
withLIDProtocol() {
|
|
185
|
+
this.protocols.push(new USyncLIDProtocol())
|
|
186
|
+
return this
|
|
187
|
+
}
|
|
188
|
+
withDeviceProtocol() {
|
|
189
|
+
this.protocols.push(new USyncDeviceProtocol())
|
|
190
|
+
return this
|
|
191
|
+
}
|
|
192
|
+
withContactProtocol() {
|
|
193
|
+
this.protocols.push(new USyncContactProtocol())
|
|
194
|
+
return this
|
|
195
|
+
}
|
|
196
|
+
withStatusProtocol() {
|
|
197
|
+
this.protocols.push(new USyncStatusProtocol())
|
|
198
|
+
return this
|
|
199
|
+
}
|
|
200
|
+
withBotProfileProtocol() {
|
|
201
|
+
this.protocols.push(new USyncBotProfileProtocol())
|
|
202
|
+
return this
|
|
203
|
+
}
|
|
204
|
+
withDisappearingModeProtocol() {
|
|
205
|
+
this.protocols.push(new USyncDisappearingModeProtocol())
|
|
206
|
+
return this
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
module.exports = {
|
|
211
|
+
USyncQuery
|
|
212
|
+
}
|
|
213
|
+
return module.exports;
|
|
214
|
+
})();
|
|
215
|
+
for (const key of Object.keys(__kageModule99)) {
|
|
216
|
+
if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule99[key]});
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// Kage: funciones avanzadas.
|
|
220
|
+
const __kageModule207 = (() => {
|
|
221
|
+
const module = { exports: {} }; const exports = module.exports;
|
|
222
|
+
"use strict";
|
|
223
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
224
|
+
exports.USyncQuery = void 0;
|
|
225
|
+
const index_js_1 = require("../WABinary/index.js");
|
|
226
|
+
const UsyncBotProfileProtocol_js_1 = require("./Protocols/USyncBotProfileProtocol.js");
|
|
227
|
+
const UsyncLIDProtocol_js_1 = require("./Protocols/USyncLIDProtocol.js");
|
|
228
|
+
const index_js_2 = require("./Protocols/index.js");
|
|
229
|
+
class USyncQuery {
|
|
230
|
+
constructor() {
|
|
231
|
+
this.protocols = [];
|
|
232
|
+
this.users = [];
|
|
233
|
+
this.context = 'interactive';
|
|
234
|
+
this.mode = 'query';
|
|
235
|
+
}
|
|
236
|
+
withMode(mode) {
|
|
237
|
+
this.mode = mode;
|
|
238
|
+
return this;
|
|
239
|
+
}
|
|
240
|
+
withContext(context) {
|
|
241
|
+
this.context = context;
|
|
242
|
+
return this;
|
|
243
|
+
}
|
|
244
|
+
withUser(user) {
|
|
245
|
+
this.users.push(user);
|
|
246
|
+
return this;
|
|
247
|
+
}
|
|
248
|
+
parseUSyncQueryResult(result) {
|
|
249
|
+
if (result?.attrs.type !== 'result') {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
const protocolMap = Object.fromEntries(this.protocols.map(protocol => {
|
|
253
|
+
return [protocol.name, protocol.parser];
|
|
254
|
+
}));
|
|
255
|
+
const queryResult = {
|
|
256
|
+
// TODO: implement errors etc.
|
|
257
|
+
list: [],
|
|
258
|
+
sideList: []
|
|
259
|
+
};
|
|
260
|
+
const usyncNode = (0, index_js_1.getBinaryNodeChild)(result, 'usync');
|
|
261
|
+
//TODO: implement error backoff, refresh etc.
|
|
262
|
+
//TODO: see if there are any errors in the result node
|
|
263
|
+
//const resultNode = getBinaryNodeChild(usyncNode, 'result')
|
|
264
|
+
const listNode = usyncNode ? (0, index_js_1.getBinaryNodeChild)(usyncNode, 'list') : undefined;
|
|
265
|
+
if (listNode?.content && Array.isArray(listNode.content)) {
|
|
266
|
+
queryResult.list = listNode.content.reduce((acc, node) => {
|
|
267
|
+
const id = node?.attrs.jid;
|
|
268
|
+
if (id) {
|
|
269
|
+
const data = Array.isArray(node?.content)
|
|
270
|
+
? Object.fromEntries(node.content
|
|
271
|
+
.map(content => {
|
|
272
|
+
const protocol = content.tag;
|
|
273
|
+
const parser = protocolMap[protocol];
|
|
274
|
+
if (parser) {
|
|
275
|
+
return [protocol, parser(content)];
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
return [protocol, null];
|
|
279
|
+
}
|
|
280
|
+
})
|
|
281
|
+
.filter(([, b]) => b !== null))
|
|
282
|
+
: {};
|
|
283
|
+
acc.push({ ...data, id });
|
|
284
|
+
}
|
|
285
|
+
return acc;
|
|
286
|
+
}, []);
|
|
287
|
+
}
|
|
288
|
+
//TODO: implement side list
|
|
289
|
+
//const sideListNode = getBinaryNodeChild(usyncNode, 'side_list')
|
|
290
|
+
return queryResult;
|
|
291
|
+
}
|
|
292
|
+
withDeviceProtocol() {
|
|
293
|
+
this.protocols.push(new index_js_2.USyncDeviceProtocol());
|
|
294
|
+
return this;
|
|
295
|
+
}
|
|
296
|
+
withContactProtocol() {
|
|
297
|
+
this.protocols.push(new index_js_2.USyncContactProtocol());
|
|
298
|
+
return this;
|
|
299
|
+
}
|
|
300
|
+
withStatusProtocol() {
|
|
301
|
+
this.protocols.push(new index_js_2.USyncStatusProtocol());
|
|
302
|
+
return this;
|
|
303
|
+
}
|
|
304
|
+
withDisappearingModeProtocol() {
|
|
305
|
+
this.protocols.push(new index_js_2.USyncDisappearingModeProtocol());
|
|
306
|
+
return this;
|
|
307
|
+
}
|
|
308
|
+
withBotProfileProtocol() {
|
|
309
|
+
this.protocols.push(new UsyncBotProfileProtocol_js_1.USyncBotProfileProtocol());
|
|
310
|
+
return this;
|
|
311
|
+
}
|
|
312
|
+
withLIDProtocol() {
|
|
313
|
+
this.protocols.push(new UsyncLIDProtocol_js_1.USyncLIDProtocol());
|
|
314
|
+
return this;
|
|
315
|
+
}
|
|
316
|
+
withUsernameProtocol() {
|
|
317
|
+
this.protocols.push(new index_js_2.USyncUsernameProtocol());
|
|
318
|
+
return this;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
exports.USyncQuery = USyncQuery;
|
|
322
|
+
|
|
323
|
+
return module.exports;
|
|
324
|
+
})();
|
|
325
|
+
for (const key of Object.keys(__kageModule207)) {
|
|
326
|
+
if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule207[key]});
|
|
327
|
+
}
|
|
328
|
+
Object.defineProperty(exports, Symbol.for('kage.advanced'), {value:__kageModule207, configurable:true});
|
package/lib/WAUSync/USyncUser.js
CHANGED
|
@@ -10,6 +10,8 @@ class USyncUser {
|
|
|
10
10
|
this.lid = lid;
|
|
11
11
|
return this;
|
|
12
12
|
}
|
|
13
|
+
withUsername(username) { this.username = username; return this; }
|
|
14
|
+
withUsernameKey(usernameKey) { this.usernameKey = usernameKey; return this; }
|
|
13
15
|
withPhone(phone) {
|
|
14
16
|
this.phone = phone;
|
|
15
17
|
return this;
|
|
@@ -24,3 +26,87 @@ class USyncUser {
|
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
exports.USyncUser = USyncUser;
|
|
29
|
+
|
|
30
|
+
// Kage: compatibilidad de API.
|
|
31
|
+
const __kageModule100 = (() => {
|
|
32
|
+
const module = { exports: {} }; const exports = module.exports;
|
|
33
|
+
"use strict"
|
|
34
|
+
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true })
|
|
36
|
+
|
|
37
|
+
class USyncUser {
|
|
38
|
+
withId(id) {
|
|
39
|
+
this.id = id
|
|
40
|
+
return this
|
|
41
|
+
}
|
|
42
|
+
withLid(lid) {
|
|
43
|
+
this.lid = lid
|
|
44
|
+
return this
|
|
45
|
+
}
|
|
46
|
+
withPhone(phone) {
|
|
47
|
+
this.phone = phone
|
|
48
|
+
return this
|
|
49
|
+
}
|
|
50
|
+
withType(type) {
|
|
51
|
+
this.type = type
|
|
52
|
+
return this
|
|
53
|
+
}
|
|
54
|
+
withPersonaId(personaId) {
|
|
55
|
+
this.personaId = personaId
|
|
56
|
+
return this
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
module.exports = {
|
|
61
|
+
USyncUser
|
|
62
|
+
}
|
|
63
|
+
return module.exports;
|
|
64
|
+
})();
|
|
65
|
+
for (const key of Object.keys(__kageModule100)) {
|
|
66
|
+
if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule100[key]});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Kage: funciones avanzadas.
|
|
70
|
+
const __kageModule208 = (() => {
|
|
71
|
+
const module = { exports: {} }; const exports = module.exports;
|
|
72
|
+
"use strict";
|
|
73
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
74
|
+
exports.USyncUser = void 0;
|
|
75
|
+
class USyncUser {
|
|
76
|
+
withId(id) {
|
|
77
|
+
this.id = id;
|
|
78
|
+
return this;
|
|
79
|
+
}
|
|
80
|
+
withLid(lid) {
|
|
81
|
+
this.lid = lid;
|
|
82
|
+
return this;
|
|
83
|
+
}
|
|
84
|
+
withPhone(phone) {
|
|
85
|
+
this.phone = phone;
|
|
86
|
+
return this;
|
|
87
|
+
}
|
|
88
|
+
withUsername(username) {
|
|
89
|
+
this.username = username;
|
|
90
|
+
return this;
|
|
91
|
+
}
|
|
92
|
+
withUsernameKey(usernameKey) {
|
|
93
|
+
this.usernameKey = usernameKey;
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
96
|
+
withType(type) {
|
|
97
|
+
this.type = type;
|
|
98
|
+
return this;
|
|
99
|
+
}
|
|
100
|
+
withPersonaId(personaId) {
|
|
101
|
+
this.personaId = personaId;
|
|
102
|
+
return this;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.USyncUser = USyncUser;
|
|
106
|
+
|
|
107
|
+
return module.exports;
|
|
108
|
+
})();
|
|
109
|
+
for (const key of Object.keys(__kageModule208)) {
|
|
110
|
+
if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule208[key]});
|
|
111
|
+
}
|
|
112
|
+
Object.defineProperty(exports, Symbol.for('kage.advanced'), {value:__kageModule208, configurable:true});
|
package/lib/WAUSync/index.js
CHANGED
|
@@ -17,3 +17,81 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./Protocols"), exports);
|
|
18
18
|
__exportStar(require("./USyncQuery"), exports);
|
|
19
19
|
__exportStar(require("./USyncUser"), exports);
|
|
20
|
+
|
|
21
|
+
// Kage: compatibilidad de API.
|
|
22
|
+
const __kageModule101 = (() => {
|
|
23
|
+
const module = { exports: {} }; const exports = module.exports;
|
|
24
|
+
"use strict"
|
|
25
|
+
|
|
26
|
+
const __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
27
|
+
if (k2 === undefined) k2 = k
|
|
28
|
+
|
|
29
|
+
let desc = Object.getOwnPropertyDescriptor(m, k)
|
|
30
|
+
|
|
31
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
32
|
+
desc = {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function() {
|
|
35
|
+
return m[k]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
Object.defineProperty(o, k2, desc)
|
|
41
|
+
|
|
42
|
+
}) : (function(o, m, k, k2) {
|
|
43
|
+
if (k2 === undefined) k2 = k
|
|
44
|
+
o[k2] = m[k]
|
|
45
|
+
}
|
|
46
|
+
))
|
|
47
|
+
|
|
48
|
+
const __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
49
|
+
for (var p in m) {
|
|
50
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) {
|
|
51
|
+
__createBinding(exports, m, p)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
Object.defineProperty(exports, "__esModule", {
|
|
57
|
+
value: true
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
__exportStar(require("./Protocols"), exports)
|
|
61
|
+
__exportStar(require("./USyncQuery"), exports)
|
|
62
|
+
__exportStar(require("./USyncUser"), exports)
|
|
63
|
+
return module.exports;
|
|
64
|
+
})();
|
|
65
|
+
for (const key of Object.keys(__kageModule101)) {
|
|
66
|
+
if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule101[key]});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Kage: funciones avanzadas.
|
|
70
|
+
const __kageModule209 = (() => {
|
|
71
|
+
const module = { exports: {} }; const exports = module.exports;
|
|
72
|
+
"use strict";
|
|
73
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
74
|
+
if (k2 === undefined) k2 = k;
|
|
75
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
76
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
77
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
78
|
+
}
|
|
79
|
+
Object.defineProperty(o, k2, desc);
|
|
80
|
+
}) : (function(o, m, k, k2) {
|
|
81
|
+
if (k2 === undefined) k2 = k;
|
|
82
|
+
o[k2] = m[k];
|
|
83
|
+
}));
|
|
84
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
85
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
86
|
+
};
|
|
87
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
88
|
+
__exportStar(require("./Protocols/index.js"), exports);
|
|
89
|
+
__exportStar(require("./USyncQuery.js"), exports);
|
|
90
|
+
__exportStar(require("./USyncUser.js"), exports);
|
|
91
|
+
|
|
92
|
+
return module.exports;
|
|
93
|
+
})();
|
|
94
|
+
for (const key of Object.keys(__kageModule209)) {
|
|
95
|
+
if (key !== '__esModule' && !Object.prototype.hasOwnProperty.call(exports,key)) Object.defineProperty(exports,key,{enumerable:true,configurable:true,get:()=>__kageModule209[key]});
|
|
96
|
+
}
|
|
97
|
+
Object.defineProperty(exports, Symbol.for('kage.advanced'), {value:__kageModule209, configurable:true});
|