kage-baileys 25.0.11 → 25.3.1

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 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,58 @@ 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
+ Toolkit,
472
+ BaseBuilder,
473
+ RowBuilder,
474
+ Button,
475
+ CardBuilder,
476
+ ButtonV2,
477
+ ButtonV3,
478
+ Carousel,
479
+ Poll,
480
+ Album,
481
+ Event,
482
+ Expiring,
483
+ ExpiringButton,
484
+ AIRichError,
485
+ ItemNotFoundError,
486
+ DuplicateIdError,
487
+ InvalidTargetError,
488
+ ContentValidationError,
489
+ AIRich,
490
+ ORich,
491
+ tokenizeCodeForRich,
492
+ A2UI,
493
+ sendA2UIWidget,
494
+ MESSAGE_BUILDER_VERSION,
495
+ BuilderHub,
496
+ } from './Builders/index.js';
497
+
498
+ // Alias popular names
499
+ export { AIRich as Airch } from './Builders/index.js';
500
+ export { AIRich as AIrch } from './Builders/index.js';
501
+
502
+ // Sticker pack (from CJS side via api)
503
+ export const makeStickerPack = api.makeStickerPack;
504
+ export const normalizeSticker = api.normalizeSticker;
505
+ export const DEFAULT_EMOJIS = api.DEFAULT_EMOJIS;
506
+
507
+ // Path utils
508
+ export const resolveMediaPath = api.resolveMediaPath;
509
+ export const joinPath = api.joinPath;
510
+ export const ensureDir = api.ensureDir;
511
+ export const getExt = api.getExt;
512
+ export const basename = api.basename;
513
+
514
+ // Country helpers
515
+ export const getCountryInfo = api.getCountryInfo;
516
+ export const country = api.getCountryInfo; // alias
517
+ export const countries = api.countries;
518
+
519
+ // Framework
520
+ export const Bot = api.Bot;
521
+ export const Context = api.Context;
522
+ export const MediaManager = api.MediaManager;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kage-baileys",
3
- "version": "25.0.11",
3
+ "version": "25.3.1",
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
- "./extras": "./extras/index.js",
152
- "./helpers/media-thumb": "./helpers/media-thumb.js",
153
- "./helpers/interactive-pay": "./helpers/interactive-pay.js"
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
  }