kage-baileys 25.0.11 → 25.3.2
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/lib/index.d.ts +19 -1
- package/lib/index.js +24 -0
- package/lib/index.mjs +49 -0
- package/package.json +15 -6
package/lib/index.d.ts
CHANGED
|
@@ -9,4 +9,22 @@ export * from "./WAUSync/index.js";
|
|
|
9
9
|
export { makeWASocket };
|
|
10
10
|
export default makeWASocket;
|
|
11
11
|
import makeWASocket from './Socket/index.js';
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
13
|
+
// Builders (from lib/Builders)
|
|
14
|
+
export declare class AIRich { /* ... */ }
|
|
15
|
+
export declare class Button { /* ... */ }
|
|
16
|
+
export declare class ButtonV2 { /* ... */ }
|
|
17
|
+
export declare class ButtonV3 { /* ... */ }
|
|
18
|
+
export declare class Carousel { /* ... */ }
|
|
19
|
+
export declare class A2UI { /* ... */ }
|
|
20
|
+
export declare class BuilderHub { /* ... */ }
|
|
21
|
+
export declare const ORich: any;
|
|
22
|
+
export declare const Toolkit: any;
|
|
23
|
+
export declare const BaseBuilder: any;
|
|
24
|
+
export declare const Poll: any;
|
|
25
|
+
export declare const Album: any;
|
|
26
|
+
export declare function makeStickerPack(opts: any): any;
|
|
27
|
+
export declare function getCountryInfo(input: string): any;
|
|
28
|
+
export declare const country: typeof getCountryInfo;
|
|
29
|
+
export declare function resolveMediaPath(...parts: string[]): string;
|
|
30
|
+
export declare function getBuilders(): Promise<any>;
|
package/lib/index.js
CHANGED
|
@@ -227,3 +227,27 @@ try {
|
|
|
227
227
|
installRichMethods: richM.installRichMethods,
|
|
228
228
|
});
|
|
229
229
|
} catch (e) {}
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
// ---- Builders bridge (ESM) ----
|
|
233
|
+
// For full AIRich / Button / Carousel use: const { AIRich, Button } = await import('kage-baileys')
|
|
234
|
+
// or: import { AIRich, Button, Carousel } from 'kage-baileys'
|
|
235
|
+
try {
|
|
236
|
+
// Attempt to surface names if the environment supports it
|
|
237
|
+
const buildersPath = require("path").join(__dirname, "Builders", "index.js");
|
|
238
|
+
// Pure ESM cannot be required synchronously in all Node versions.
|
|
239
|
+
// We expose a helper that returns the builders via dynamic import.
|
|
240
|
+
exports.getBuilders = async () => {
|
|
241
|
+
const mod = await import(buildersPath);
|
|
242
|
+
return mod;
|
|
243
|
+
};
|
|
244
|
+
exports.AIRich = null; // placeholder – use await import() or getBuilders()
|
|
245
|
+
exports.Button = null;
|
|
246
|
+
exports.ButtonV2 = null;
|
|
247
|
+
exports.ButtonV3 = null;
|
|
248
|
+
exports.Carousel = null;
|
|
249
|
+
exports.A2UI = null;
|
|
250
|
+
exports.BuilderHub = null;
|
|
251
|
+
} catch (e) {
|
|
252
|
+
// ignore
|
|
253
|
+
}
|
package/lib/index.mjs
CHANGED
|
@@ -465,3 +465,52 @@ export const USERNAME_TIMEOUT_MS = api.USERNAME_TIMEOUT_MS;
|
|
|
465
465
|
export const normalizeUserJid = api.normalizeUserJid;
|
|
466
466
|
export const queryUsernames = api.queryUsernames;
|
|
467
467
|
export const installUsernameTools = api.installUsernameTools;
|
|
468
|
+
|
|
469
|
+
// ========== Builders (ESM) ==========
|
|
470
|
+
export {
|
|
471
|
+
BaseBuilder,
|
|
472
|
+
RowBuilder,
|
|
473
|
+
CardBuilder,
|
|
474
|
+
ButtonV3,
|
|
475
|
+
Poll,
|
|
476
|
+
Album,
|
|
477
|
+
Event,
|
|
478
|
+
Expiring,
|
|
479
|
+
ExpiringButton,
|
|
480
|
+
AIRichError,
|
|
481
|
+
ItemNotFoundError,
|
|
482
|
+
DuplicateIdError,
|
|
483
|
+
InvalidTargetError,
|
|
484
|
+
ContentValidationError,
|
|
485
|
+
tokenizeCodeForRich,
|
|
486
|
+
A2UI,
|
|
487
|
+
sendA2UIWidget,
|
|
488
|
+
MESSAGE_BUILDER_VERSION,
|
|
489
|
+
BuilderHub
|
|
490
|
+
} from './Builders/index.js';
|
|
491
|
+
|
|
492
|
+
// Alias popular names
|
|
493
|
+
export { AIRich as Airch } from './Builders/index.js';
|
|
494
|
+
export { AIRich as AIrch } from './Builders/index.js';
|
|
495
|
+
|
|
496
|
+
// Sticker pack (from CJS side via api)
|
|
497
|
+
/* [fixed] duplicate export const makeStickerPack removed */
|
|
498
|
+
export const normalizeSticker = api.normalizeSticker;
|
|
499
|
+
export const DEFAULT_EMOJIS = api.DEFAULT_EMOJIS;
|
|
500
|
+
|
|
501
|
+
// Path utils
|
|
502
|
+
export const resolveMediaPath = api.resolveMediaPath;
|
|
503
|
+
export const joinPath = api.joinPath;
|
|
504
|
+
export const ensureDir = api.ensureDir;
|
|
505
|
+
export const getExt = api.getExt;
|
|
506
|
+
export const basename = api.basename;
|
|
507
|
+
|
|
508
|
+
// Country helpers
|
|
509
|
+
/* [fixed] duplicate export const getCountryInfo removed */
|
|
510
|
+
export const country = api.getCountryInfo; // alias
|
|
511
|
+
export const countries = api.countries;
|
|
512
|
+
|
|
513
|
+
// Framework
|
|
514
|
+
export const Bot = api.Bot;
|
|
515
|
+
export const Context = api.Context;
|
|
516
|
+
export const MediaManager = api.MediaManager;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kage-baileys",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.3.2",
|
|
4
4
|
"description": "Kage Baileys full merge — Builders + mbuilder + Framework + advanced sticker packs + KAGE pairing + extended WAProto + full TypeScript defs (.d.ts + maps) from elray + path utils. Multi-device ready.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kage-baileys",
|
|
@@ -145,12 +145,19 @@
|
|
|
145
145
|
".": {
|
|
146
146
|
"types": "./lib/index.d.ts",
|
|
147
147
|
"import": "./lib/index.mjs",
|
|
148
|
-
"require": "./lib/index.js"
|
|
148
|
+
"require": "./lib/index.js",
|
|
149
|
+
"default": "./lib/index.js"
|
|
149
150
|
},
|
|
150
151
|
"./package.json": "./package.json",
|
|
151
|
-
"./
|
|
152
|
-
"./
|
|
153
|
-
|
|
152
|
+
"./WAProto": "./WAProto/index.js",
|
|
153
|
+
"./lib/Builders": {
|
|
154
|
+
"import": "./lib/Builders/index.js",
|
|
155
|
+
"default": "./lib/Builders/index.js"
|
|
156
|
+
},
|
|
157
|
+
"./Builders": {
|
|
158
|
+
"import": "./lib/Builders/index.js",
|
|
159
|
+
"default": "./lib/Builders/index.js"
|
|
160
|
+
}
|
|
154
161
|
},
|
|
155
162
|
"overrides": {
|
|
156
163
|
"ajv@^6.12.4": "^6.14.0",
|
|
@@ -221,5 +228,7 @@
|
|
|
221
228
|
"allowScripts": {
|
|
222
229
|
"protobufjs@7.6.6": true,
|
|
223
230
|
"sharp@0.35.5": true
|
|
224
|
-
}
|
|
231
|
+
},
|
|
232
|
+
"type": "commonjs",
|
|
233
|
+
"module": "lib/index.mjs"
|
|
225
234
|
}
|