@open-wa/schema 5.0.0-alpha.8 → 5.1.0
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.md +2 -2
- package/README.md +1 -1
- package/dist/generated/index.cjs +8 -2
- package/dist/generated/index.cjs.map +1 -1
- package/dist/generated/index.d.cts +1164 -452
- package/dist/generated/index.d.cts.map +1 -1
- package/dist/generated/index.d.mts +1164 -452
- package/dist/generated/index.d.mts.map +1 -1
- package/dist/generated/index.mjs +8 -2
- package/dist/generated/index.mjs.map +1 -1
- package/dist/{http-manifest-BlJWPKsp.d.mts → http-manifest-CqjUoaDB.d.cts} +12 -13
- package/dist/http-manifest-CqjUoaDB.d.cts.map +1 -0
- package/dist/{http-manifest-DCOVY9QZ.d.cts → http-manifest-CqjUoaDB.d.mts} +12 -13
- package/dist/http-manifest-CqjUoaDB.d.mts.map +1 -0
- package/dist/http-manifest.cjs +1 -1
- package/dist/http-manifest.cjs.map +1 -1
- package/dist/http-manifest.d.cts +1 -1
- package/dist/http-manifest.d.mts +1 -1
- package/dist/http-manifest.mjs +1 -1
- package/dist/http-manifest.mjs.map +1 -1
- package/dist/{implementor-DIBNbQXA.d.cts → implementor-ACLHTHby.d.cts} +1 -2
- package/dist/implementor-ACLHTHby.d.cts.map +1 -0
- package/dist/{implementor-DoN9ga7C.d.mts → implementor-ACLHTHby.d.mts} +1 -2
- package/dist/implementor-ACLHTHby.d.mts.map +1 -0
- package/dist/implementor.cjs +1 -1
- package/dist/implementor.cjs.map +1 -1
- package/dist/implementor.d.cts +1 -1
- package/dist/implementor.d.mts +1 -1
- package/dist/implementor.mjs +1 -1
- package/dist/implementor.mjs.map +1 -1
- package/dist/{index-BB9uyLe8.d.cts → index-DTztyYhw.d.cts} +935 -103
- package/dist/index-DTztyYhw.d.cts.map +1 -0
- package/dist/{index-D77q1gPk.d.mts → index-nVKR0RmZ.d.mts} +935 -103
- package/dist/index-nVKR0RmZ.d.mts.map +1 -0
- package/dist/index.cjs +58 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +31 -7
- package/dist/index.mjs.map +1 -1
- package/dist/methods/index.cjs +5 -1
- package/dist/methods/index.d.cts +2 -2
- package/dist/methods/index.d.mts +2 -2
- package/dist/methods/index.mjs +2 -2
- package/dist/{methods-BXZrkKjP.mjs → methods-BSv5O3bS.mjs} +318 -3
- package/dist/methods-BSv5O3bS.mjs.map +1 -0
- package/dist/{methods-CuiwUO7-.cjs → methods-DO0JONvB.cjs} +473 -2
- package/dist/methods-DO0JONvB.cjs.map +1 -0
- package/dist/{registry-CsyR8i6y.mjs → registry-BIddXpin.mjs} +26 -1
- package/dist/{registry-CsyR8i6y.mjs.map → registry-BIddXpin.mjs.map} +1 -1
- package/dist/{registry-TbMVoiw5.cjs → registry-_s9a7_jl.cjs} +26 -1
- package/dist/{registry-TbMVoiw5.cjs.map → registry-_s9a7_jl.cjs.map} +1 -1
- package/package.json +12 -10
- package/src/__tests__/generators.contract.test.ts +181 -0
- package/src/__tests__/registry.contract.test.ts +81 -0
- package/src/client-config.ts +30 -0
- package/src/codecs.test.ts +41 -0
- package/src/codecs.ts +191 -0
- package/src/common-types.ts +280 -0
- package/src/config.ts +47 -0
- package/src/enums.ts +63 -0
- package/src/events/groups.ts +33 -0
- package/src/events/index.ts +4 -0
- package/src/events/messaging.ts +86 -0
- package/src/events/registry.ts +124 -0
- package/src/events/state.ts +59 -0
- package/src/generated/AliasMap.ts +216 -0
- package/src/generated/BaseClient.ts +878 -0
- package/src/generated/BaseNamespacedClient.ts +214 -0
- package/src/generated/index.ts +5 -0
- package/src/generated/openapi.json +8949 -0
- package/src/generated/types.ts +383 -0
- package/src/http-manifest.ts +97 -0
- package/src/implementor.test.ts +88 -0
- package/src/implementor.ts +75 -0
- package/src/index.ts +44 -0
- package/src/interactive.ts +151 -0
- package/src/methods/business.ts +51 -0
- package/src/methods/chats.ts +263 -0
- package/src/methods/communities.ts +119 -0
- package/src/methods/contacts.ts +158 -0
- package/src/methods/groups.ts +376 -0
- package/src/methods/index.ts +34 -0
- package/src/methods/interactive.ts +21 -0
- package/src/methods/labels.ts +86 -0
- package/src/methods/media.ts +36 -0
- package/src/methods/messaging.ts +828 -0
- package/src/methods/session.ts +261 -0
- package/src/methods/status.ts +120 -0
- package/src/parameters.ts +237 -0
- package/src/registry.test.ts +30 -0
- package/src/registry.ts +601 -0
- package/dist/http-manifest-BlJWPKsp.d.mts.map +0 -1
- package/dist/http-manifest-DCOVY9QZ.d.cts.map +0 -1
- package/dist/implementor-DIBNbQXA.d.cts.map +0 -1
- package/dist/implementor-DoN9ga7C.d.mts.map +0 -1
- package/dist/index-BB9uyLe8.d.cts.map +0 -1
- package/dist/index-D77q1gPk.d.mts.map +0 -1
- package/dist/methods-BXZrkKjP.mjs.map +0 -1
- package/dist/methods-CuiwUO7-.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-nVKR0RmZ.d.mts","names":["ContactIdSchema","ChatIdSchema","MessageIdSchema","GroupIdSchema","_$__0.OpenWAMethodSchema","_$__0.OpenWAMethodSchema","_$__0.OpenWAMethodSchema","_$__0.OpenWAMethodSchema","_$__0.OpenWAMethodSchema","_$__0.OpenWAMethodSchema","_$__0.OpenWAMethodSchema","_$__0.OpenWAMethodSchema","_$__0.OpenWAMethodSchema","_$__0.MessageTypes","_$__0.MessageAck","_$__0.OpenWAMethodSchema","_$__0.JsonValue","_$__0.OpenWAMethodSchema"],"sources":["../src/client-config.ts","../src/common-types.ts","../src/methods/messaging.ts","../src/methods/chats.ts","../src/methods/contacts.ts","../src/methods/groups.ts","../src/methods/communities.ts","../src/methods/status.ts","../src/methods/labels.ts","../src/methods/business.ts","../src/methods/session.ts","../src/methods/media.ts","../src/methods/interactive.ts","../src/methods/index.ts","../src/events/registry.ts","../src/events/messaging.ts","../src/events/state.ts","../src/events/groups.ts","../src/codecs.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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BnC,EAAA,KAAA;KAEU,qBAAqB,EAAE,aAAa;KACpC,oBAAoB,EAAE,aAAa;KACnC,oBAAoB,EAAE,aAAa;KACnC,eAAe,EAAE,aAAa;iBAE1B,yBAAyB,UAAU,oBAAoB,SAAS,IAAI,QAAQ,EAAE,cAAc;EAA6B,MAAM;;cAUlI,oBAAkB,EAAA;;;;;;;;;GAG7B,EAAA,KAAA;cACW,2BAAyB,EAAA,uBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAKpC,EAAA,KAAA;KACU,eAAe,EAAE,aAAa;KAC9B,sBAAsB,EAAE,aAAa"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_registry = require("./registry-
|
|
3
|
-
const require_methods = require("./methods-
|
|
2
|
+
const require_registry = require("./registry-_s9a7_jl.cjs");
|
|
3
|
+
const require_methods = require("./methods-DO0JONvB.cjs");
|
|
4
4
|
const require_implementor = require("./implementor.cjs");
|
|
5
5
|
const require_http_manifest = require("./http-manifest.cjs");
|
|
6
6
|
let zod = require("zod");
|
|
@@ -51,11 +51,13 @@ const eventRegistry = {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
const QueueOptionsSchema = zod.z.object({
|
|
54
|
-
concurrency: zod.z.number().positive().optional(),
|
|
55
|
-
|
|
54
|
+
concurrency: zod.z.number().int().positive().optional(),
|
|
55
|
+
capacity: zod.z.number().int().positive().optional(),
|
|
56
|
+
overload: zod.z.enum(["backpressure", "dropping"]).optional(),
|
|
57
|
+
ordering: zod.z.literal("fifo").optional(),
|
|
58
|
+
intervalCap: zod.z.number().int().positive().optional(),
|
|
56
59
|
interval: zod.z.number().positive().optional(),
|
|
57
|
-
timeout: zod.z.number().positive().optional()
|
|
58
|
-
priority: zod.z.number().optional()
|
|
60
|
+
timeout: zod.z.number().positive().optional()
|
|
59
61
|
}).optional();
|
|
60
62
|
function defineListenerV2(name, params) {
|
|
61
63
|
const legacyName = params.legacyName || `on${name.charAt(0).toUpperCase()}${name.slice(1)}`;
|
|
@@ -147,6 +149,28 @@ const reactionEvent = defineListenerV2("reaction", {
|
|
|
147
149
|
timestamp: zod.z.number()
|
|
148
150
|
})
|
|
149
151
|
});
|
|
152
|
+
const interactiveResponseEvent = defineListenerV2("interactiveResponse", {
|
|
153
|
+
legacyName: "onInteractiveResponse",
|
|
154
|
+
meta: {
|
|
155
|
+
description: "Structured reply, list, form or native interactive response",
|
|
156
|
+
namespace: "messages",
|
|
157
|
+
status: "stable",
|
|
158
|
+
license: "insiders"
|
|
159
|
+
},
|
|
160
|
+
payload: require_methods.InteractiveResponseSchema,
|
|
161
|
+
defaultQueueOptions: { concurrency: 1 }
|
|
162
|
+
});
|
|
163
|
+
const formResponseEvent = defineListenerV2("formResponse", {
|
|
164
|
+
legacyName: "onFormResponse",
|
|
165
|
+
meta: {
|
|
166
|
+
description: "A form submission with question IDs and chosen option IDs",
|
|
167
|
+
namespace: "messages",
|
|
168
|
+
status: "stable",
|
|
169
|
+
license: "insiders"
|
|
170
|
+
},
|
|
171
|
+
payload: require_methods.FormResponseSchema,
|
|
172
|
+
defaultQueueOptions: { concurrency: 1 }
|
|
173
|
+
});
|
|
150
174
|
//#endregion
|
|
151
175
|
//#region src/events/state.ts
|
|
152
176
|
const StateEnum = zod.z.enum([
|
|
@@ -297,12 +321,17 @@ const HttpMethodEnum = zod.z.enum([
|
|
|
297
321
|
//#endregion
|
|
298
322
|
exports.ActionEnum = ActionEnum;
|
|
299
323
|
exports.Base64ToDataUrlSchema = require_methods.Base64ToDataUrlSchema;
|
|
324
|
+
exports.BookingContentSchema = require_methods.BookingContentSchema;
|
|
325
|
+
exports.ButtonsContentSchema = require_methods.ButtonsContentSchema;
|
|
300
326
|
Object.defineProperty(exports, "CLOUD_PROVIDERS", {
|
|
301
327
|
enumerable: true,
|
|
302
328
|
get: function() {
|
|
303
329
|
return _open_wa_config.CLOUD_PROVIDERS;
|
|
304
330
|
}
|
|
305
331
|
});
|
|
332
|
+
exports.CallActionSchema = require_methods.CallActionSchema;
|
|
333
|
+
exports.CarouselCardSchema = require_methods.CarouselCardSchema;
|
|
334
|
+
exports.CarouselContentSchema = require_methods.CarouselContentSchema;
|
|
306
335
|
exports.ChatIdCodecSchema = require_methods.ChatIdCodecSchema;
|
|
307
336
|
exports.ChatIdSchema = require_methods.ChatIdSchema;
|
|
308
337
|
exports.ChatSchema = require_methods.ChatSchema;
|
|
@@ -327,6 +356,7 @@ Object.defineProperty(exports, "ConfigSchema", {
|
|
|
327
356
|
exports.ContactIdCodecSchema = require_methods.ContactIdCodecSchema;
|
|
328
357
|
exports.ContactIdSchema = require_methods.ContactIdSchema;
|
|
329
358
|
exports.ContactSchema = require_methods.ContactSchema;
|
|
359
|
+
exports.CopyActionSchema = require_methods.CopyActionSchema;
|
|
330
360
|
Object.defineProperty(exports, "DIRECTORY_STRATEGY", {
|
|
331
361
|
enumerable: true,
|
|
332
362
|
get: function() {
|
|
@@ -340,6 +370,9 @@ Object.defineProperty(exports, "DevToolsSchema", {
|
|
|
340
370
|
}
|
|
341
371
|
});
|
|
342
372
|
exports.FileToDataUrlSchema = require_methods.FileToDataUrlSchema;
|
|
373
|
+
exports.FormContentSchema = require_methods.FormContentSchema;
|
|
374
|
+
exports.FormQuestionSchema = require_methods.FormQuestionSchema;
|
|
375
|
+
exports.FormResponseSchema = require_methods.FormResponseSchema;
|
|
343
376
|
exports.FunctionalityEnum = FunctionalityEnum;
|
|
344
377
|
exports.GroupChatIdSchema = require_methods.GroupChatIdSchema;
|
|
345
378
|
exports.GroupIdCodecSchema = require_methods.GroupIdCodecSchema;
|
|
@@ -348,7 +381,13 @@ exports.GroupMetadataSchema = require_methods.GroupMetadataSchema;
|
|
|
348
381
|
exports.HexColorSchema = require_methods.HexColorSchema;
|
|
349
382
|
exports.HttpMethodEnum = HttpMethodEnum;
|
|
350
383
|
exports.IdSchema = require_methods.IdSchema;
|
|
384
|
+
exports.InteractiveActionSchema = require_methods.InteractiveActionSchema;
|
|
385
|
+
exports.InteractiveContentSchema = require_methods.InteractiveContentSchema;
|
|
386
|
+
exports.InteractiveHeaderSchema = require_methods.InteractiveHeaderSchema;
|
|
387
|
+
exports.InteractiveResponseSchema = require_methods.InteractiveResponseSchema;
|
|
351
388
|
exports.IsoDatetimeToDateSchema = require_methods.IsoDatetimeToDateSchema;
|
|
389
|
+
exports.JsonObjectSchema = require_methods.JsonObjectSchema;
|
|
390
|
+
exports.JsonValueSchema = require_methods.JsonValueSchema;
|
|
352
391
|
exports.LicenseEnum = LicenseEnum;
|
|
353
392
|
Object.defineProperty(exports, "LicenseType", {
|
|
354
393
|
enumerable: true,
|
|
@@ -356,6 +395,9 @@ Object.defineProperty(exports, "LicenseType", {
|
|
|
356
395
|
return _open_wa_config.LicenseType;
|
|
357
396
|
}
|
|
358
397
|
});
|
|
398
|
+
exports.LinkActionSchema = require_methods.LinkActionSchema;
|
|
399
|
+
exports.ListContentSchema = require_methods.ListContentSchema;
|
|
400
|
+
exports.ListRowSchema = require_methods.ListRowSchema;
|
|
359
401
|
exports.LocationSchema = require_methods.LocationSchema;
|
|
360
402
|
Object.defineProperty(exports, "LoggingTransportSchema", {
|
|
361
403
|
enumerable: true,
|
|
@@ -369,6 +411,8 @@ exports.MessageIdReturnSchema = require_methods.MessageIdReturnSchema;
|
|
|
369
411
|
exports.MessageIdSchema = require_methods.MessageIdSchema;
|
|
370
412
|
exports.MessageSchema = require_methods.MessageSchema;
|
|
371
413
|
exports.MessageTypes = require_methods.MessageTypes;
|
|
414
|
+
exports.NativeActionSchema = require_methods.NativeActionSchema;
|
|
415
|
+
exports.NativeContentSchema = require_methods.NativeContentSchema;
|
|
372
416
|
Object.defineProperty(exports, "NotificationLanguage", {
|
|
373
417
|
enumerable: true,
|
|
374
418
|
get: function() {
|
|
@@ -401,12 +445,15 @@ Object.defineProperty(exports, "QRFormat", {
|
|
|
401
445
|
});
|
|
402
446
|
exports.QueueOptionsSchema = QueueOptionsSchema;
|
|
403
447
|
exports.Registry = require_registry.Registry;
|
|
448
|
+
exports.ReplyActionSchema = require_methods.ReplyActionSchema;
|
|
404
449
|
Object.defineProperty(exports, "S3SyncSchema", {
|
|
405
450
|
enumerable: true,
|
|
406
451
|
get: function() {
|
|
407
452
|
return _open_wa_config.S3SyncSchema;
|
|
408
453
|
}
|
|
409
454
|
});
|
|
455
|
+
exports.SendInteractiveInputSchema = require_methods.SendInteractiveInputSchema;
|
|
456
|
+
exports.SendRawMessageInputSchema = require_methods.SendRawMessageInputSchema;
|
|
410
457
|
Object.defineProperty(exports, "SessionDataSchema", {
|
|
411
458
|
enumerable: true,
|
|
412
459
|
get: function() {
|
|
@@ -456,6 +503,7 @@ exports.createFileCodec = require_methods.createFileCodec;
|
|
|
456
503
|
exports.createGroup = require_methods.createGroup;
|
|
457
504
|
exports.decryptMedia = require_methods.decryptMedia;
|
|
458
505
|
exports.defineEvent = require_registry.defineEvent;
|
|
506
|
+
exports.defineInteractiveMessage = require_methods.defineInteractiveMessage;
|
|
459
507
|
exports.defineListenerV2 = defineListenerV2;
|
|
460
508
|
exports.defineMethod = require_registry.defineMethod;
|
|
461
509
|
exports.defineMethodV2 = require_registry.defineMethodV2;
|
|
@@ -475,6 +523,7 @@ exports.fileToDataUrlCodec = require_methods.fileToDataUrlCodec;
|
|
|
475
523
|
exports.fileToStreamCodec = require_methods.fileToStreamCodec;
|
|
476
524
|
exports.fileToTempPathCodec = require_methods.fileToTempPathCodec;
|
|
477
525
|
exports.filenameParam = require_methods.filenameParam;
|
|
526
|
+
exports.formResponseEvent = formResponseEvent;
|
|
478
527
|
exports.forwardMessages = require_methods.forwardMessages;
|
|
479
528
|
exports.getAllChatIds = require_methods.getAllChatIds;
|
|
480
529
|
exports.getAllChats = require_methods.getAllChats;
|
|
@@ -543,6 +592,7 @@ exports.implementMethod = require_implementor.implementMethod;
|
|
|
543
592
|
exports.implementMethodAsync = require_implementor.implementMethodAsync;
|
|
544
593
|
exports.includeMeParam = require_methods.includeMeParam;
|
|
545
594
|
exports.includeNotificationsParam = require_methods.includeNotificationsParam;
|
|
595
|
+
exports.interactiveResponseEvent = interactiveResponseEvent;
|
|
546
596
|
exports.isChatOnline = require_methods.isChatOnline;
|
|
547
597
|
exports.isPlugged = require_methods.isPlugged;
|
|
548
598
|
exports.isoDatetimeToDate = require_methods.isoDatetimeToDate;
|
|
@@ -595,6 +645,7 @@ exports.sendContact = require_methods.sendContact;
|
|
|
595
645
|
exports.sendFile = require_methods.sendFile;
|
|
596
646
|
exports.sendFileFromUrl = require_methods.sendFileFromUrl;
|
|
597
647
|
exports.sendImage = require_methods.sendImage;
|
|
648
|
+
exports.sendInteractive = require_methods.sendInteractive;
|
|
598
649
|
exports.sendLinkWithAutoPreview = require_methods.sendLinkWithAutoPreview;
|
|
599
650
|
exports.sendListMessage = require_methods.sendListMessage;
|
|
600
651
|
exports.sendLocation = require_methods.sendLocation;
|
|
@@ -603,6 +654,7 @@ exports.sendMultipleContacts = require_methods.sendMultipleContacts;
|
|
|
603
654
|
exports.sendPaymentRequest = require_methods.sendPaymentRequest;
|
|
604
655
|
exports.sendPoll = require_methods.sendPoll;
|
|
605
656
|
exports.sendPtt = require_methods.sendPtt;
|
|
657
|
+
exports.sendRawMessage = require_methods.sendRawMessage;
|
|
606
658
|
exports.sendReplyWithMentions = require_methods.sendReplyWithMentions;
|
|
607
659
|
exports.sendSeen = require_methods.sendSeen;
|
|
608
660
|
exports.sendText = require_methods.sendText;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["z","z","MessageAck","MessageSchema","z","z","z"],"sources":["../src/client-config.ts","../src/events/registry.ts","../src/events/messaging.ts","../src/events/state.ts","../src/events/groups.ts","../src/enums.ts"],"sourcesContent":["/**\n * Client configuration types - re-exported from @open-wa/config\n * \n * @deprecated Import from '@open-wa/config' instead\n */\n\nexport { ConfigSchema as ClientConfigSchema, type Config as ClientConfig } from '@open-wa/config';\n\n/**\n * Migrates a v4 configuration object to the v5 schema format.\n * Currently, most v4 options are compatible with v5.\n * This function serves as a placeholder for any future transformations.\n * \n * @deprecated This is a legacy compatibility function. Use @open-wa/config directly.\n */\nexport function migrateV4Config(oldConfig: Record<string, unknown>): Record<string, unknown> {\n // Deep clone to avoid mutating original\n const config = JSON.parse(JSON.stringify(oldConfig));\n\n // Example migration: if 'authTimeout' was string in some legacy version (unlikely but example)\n if (typeof config.authTimeout === 'string') {\n config.authTimeout = parseInt(config.authTimeout, 10);\n }\n\n if (config.apiLifecycle === undefined) {\n config.apiLifecycle = 'hybrid';\n }\n\n return config;\n}\n","import { z } from 'zod';\nimport { Options as PQueueOptions, DefaultAddOptions } from 'p-queue';\nimport PriorityQueue from 'p-queue/dist/priority-queue';\nimport { LicenseTier } from '../enums';\n\nexport type EventStatus = 'stable' | 'beta' | 'deprecated' | 'experimental';\n\nexport interface EventMetadata {\n eventName: string;\n legacyName: string;\n description?: string;\n namespace?: string;\n status?: EventStatus;\n deprecated?: string;\n license?: LicenseTier;\n since?: string;\n payloadSchema: z.ZodTypeAny;\n defaultQueueOptions?: PQueueOptions<PriorityQueue, DefaultAddOptions>;\n}\n\nexport interface EventDefinition {\n callbackSchema: z.ZodFunction<any, any>;\n meta: EventMetadata;\n}\n\nconst eventsByName = new Map<string, EventDefinition>();\nconst nameByCallback = new WeakMap<z.ZodFunction<any, any>, string>();\n\nexport const eventRegistry = {\n register(def: EventDefinition): z.ZodFunction<any, any> {\n const name = def.meta.eventName;\n \n if (eventsByName.has(name)) {\n throw new Error(`Event \"${name}\" already registered`);\n }\n \n eventsByName.set(name, def);\n nameByCallback.set(def.callbackSchema, name);\n \n return def.callbackSchema;\n },\n \n get(name: string): EventDefinition | undefined {\n return eventsByName.get(name);\n },\n \n getByLegacyName(legacyName: string): EventDefinition | undefined {\n for (const def of eventsByName.values()) {\n if (def.meta.legacyName === legacyName) return def;\n }\n return undefined;\n },\n \n has(name: string): boolean {\n return eventsByName.has(name);\n },\n \n getAll(): EventDefinition[] {\n return Array.from(eventsByName.values());\n },\n \n getByNamespace(namespace: string): EventDefinition[] {\n return this.getAll().filter(def => def.meta.namespace === namespace);\n },\n \n clear(): void {\n eventsByName.clear();\n }\n};\n\nexport const QueueOptionsSchema = z.object({\n concurrency: z.number().positive().optional(),\n intervalCap: z.number().positive().optional(),\n interval: z.number().positive().optional(),\n timeout: z.number().positive().optional(),\n priority: z.number().optional(),\n}).optional();\n\nexport type QueueOptions = z.infer<typeof QueueOptionsSchema>;\n\nexport function defineListenerV2<T extends z.ZodTypeAny>(\n name: string,\n params: {\n legacyName?: string;\n meta: Omit<EventMetadata, 'eventName' | 'legacyName' | 'payloadSchema'>;\n payload: T;\n defaultQueueOptions?: PQueueOptions<PriorityQueue, DefaultAddOptions>;\n }\n): z.ZodFunction<any, any> {\n \n const legacyName = params.legacyName || `on${name.charAt(0).toUpperCase()}${name.slice(1)}`;\n \n const callbackSchema = z.function({\n input: z.tuple([params.payload, QueueOptionsSchema]),\n output: z.union([\n z.boolean(),\n z.promise(z.boolean()),\n z.function({ input: z.tuple([]), output: z.void() }),\n ])\n });\n \n eventRegistry.register({\n callbackSchema,\n meta: {\n eventName: name,\n legacyName,\n payloadSchema: params.payload,\n defaultQueueOptions: params.defaultQueueOptions,\n ...params.meta\n }\n });\n \n return callbackSchema as any;\n}\n","import { z } from 'zod';\nimport { defineListenerV2 } from './registry';\nimport { MessageSchema, MessageAck } from '../common-types';\n\nconst AckSchema = z.object({\n id: z.string(),\n chatId: z.string(),\n ack: z.nativeEnum(MessageAck),\n timestamp: z.number().optional(),\n});\n\nexport const messageEvent = defineListenerV2('message', {\n legacyName: 'onMessage',\n meta: {\n description: 'Fired when a new message is received (excluding own messages)',\n namespace: 'messages',\n status: 'stable',\n license: 'none',\n },\n payload: MessageSchema,\n defaultQueueOptions: { concurrency: 1 },\n});\n\nexport const anyMessageEvent = defineListenerV2('anyMessage', {\n legacyName: 'onAnyMessage',\n meta: {\n description: 'Fired for any message including own messages',\n namespace: 'messages',\n status: 'stable',\n license: 'none',\n },\n payload: MessageSchema,\n defaultQueueOptions: { concurrency: 1 },\n});\n\nexport const messageDeletedEvent = defineListenerV2('messageDeleted', {\n legacyName: 'onMessageDeleted',\n meta: {\n description: 'Fired when a message is deleted',\n namespace: 'messages',\n status: 'stable',\n license: 'none',\n },\n payload: MessageSchema,\n});\n\nexport const ackEvent = defineListenerV2('ack', {\n legacyName: 'onAck',\n meta: {\n description: 'Fired when a message acknowledgment is received',\n namespace: 'messages',\n status: 'stable',\n license: 'none',\n },\n payload: AckSchema,\n});\n\nexport const reactionEvent = defineListenerV2('reaction', {\n legacyName: 'onReaction',\n meta: {\n description: 'Fired when a reaction is added to a message',\n namespace: 'messages',\n status: 'stable',\n license: 'none',\n },\n payload: z.object({\n messageId: z.string(),\n reaction: z.string(),\n senderId: z.string(),\n timestamp: z.number(),\n }),\n});\n","import { z } from 'zod';\nimport { defineListenerV2 } from './registry';\n\nexport const StateEnum = z.enum([\n 'STARTING',\n 'AUTHENTICATING',\n 'READY',\n 'STOPPED',\n 'CONNECTED',\n 'DISCONNECTED', \n 'SYNCING',\n 'CONFLICT',\n 'UNLAUNCHED',\n 'PAIRING',\n 'TIMEOUT',\n]);\n\nexport const stateChangedEvent = defineListenerV2('stateChanged', {\n legacyName: 'onStateChanged',\n meta: {\n description: 'Fired when connection state changes',\n namespace: 'state',\n status: 'stable',\n license: 'none',\n },\n payload: z.object({\n state: StateEnum,\n previousState: StateEnum.optional(),\n }),\n});\n\nexport const chatStateEvent = defineListenerV2('chatState', {\n legacyName: 'onChatState',\n meta: {\n description: 'Fired when someone is typing or recording',\n namespace: 'state',\n status: 'stable',\n license: 'none',\n },\n payload: z.object({\n chatId: z.string(),\n state: z.enum(['typing', 'recording', 'paused']),\n senderId: z.string(),\n }),\n});\n\nexport const logoutEvent = defineListenerV2('logout', {\n legacyName: 'onLogout',\n meta: {\n description: 'Fired when the session is logged out',\n namespace: 'state',\n status: 'stable',\n license: 'none',\n },\n payload: z.object({\n reason: z.string().optional(),\n timestamp: z.number(),\n }),\n});\n","import { z } from 'zod';\nimport { defineListenerV2 } from './registry';\n\nexport const participantsChangedEvent = defineListenerV2('participantsChanged', {\n legacyName: 'onParticipantsChanged',\n meta: {\n description: 'Fired when group participants change',\n namespace: 'groups',\n status: 'stable',\n license: 'none',\n },\n payload: z.object({\n groupId: z.string(),\n action: z.enum(['add', 'remove', 'promote', 'demote']),\n participantIds: z.array(z.string()),\n by: z.string().optional(),\n }),\n});\n\nexport const addedToGroupEvent = defineListenerV2('addedToGroup', {\n legacyName: 'onAddedToGroup',\n meta: {\n description: 'Fired when you are added to a group',\n namespace: 'groups',\n status: 'stable',\n license: 'none',\n },\n payload: z.object({\n groupId: z.string(),\n groupName: z.string(),\n addedBy: z.string().optional(),\n }),\n});\n","import { z } from 'zod';\n\n/**\n * Action types for RBAC permissions\n * - read: Retrieve data (e.g., get contact, chat object)\n * - send: Create/send new content (e.g., send message, image, story)\n * - update: Modify existing data (e.g., update message, chat metadata, promote admin)\n * - delete: Remove data (e.g., delete chat, story, remove contact, demote admin)\n */\nexport const ActionEnum = z.enum([\n 'read',\n 'send',\n 'update',\n 'delete'\n]);\n\nexport type ActionType = z.infer<typeof ActionEnum>;\n\n/**\n * License tiers for feature gating\n * - none: Available to all users\n * - insiders: Requires insiders license\n * - restricted: Requires special/restricted license\n */\nexport const LicenseEnum = z.enum([\n 'none',\n 'insiders',\n 'restricted'\n]);\n\nexport type LicenseTier = z.infer<typeof LicenseEnum>;\n\n/**\n * Functionality scope for WhatsApp account types\n * - both: Works on both business and personal accounts\n * - business-only: Only works on business accounts\n * - personal-only: Only works on personal accounts\n */\nexport const FunctionalityEnum = z.enum([\n 'both',\n 'business-only',\n 'personal-only'\n]);\n\nexport type FunctionalityScope = z.infer<typeof FunctionalityEnum>;\n\n/**\n * HTTP methods for API mapping\n * - AUTO: Automatically inferred from action type or defaults to POST\n * - GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD: Standard HTTP methods\n */\nexport const HttpMethodEnum = z.enum([\n 'AUTO',\n 'GET',\n 'POST',\n 'PUT',\n 'DELETE',\n 'PATCH',\n 'OPTIONS',\n 'HEAD'\n]);\n\nexport type HttpMethod = z.infer<typeof HttpMethodEnum>;\n"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAgB,gBAAgB,WAA6D;CAEzF,MAAM,SAAS,KAAK,MAAM,KAAK,UAAU,UAAU,CAAC;AAGpD,KAAI,OAAO,OAAO,gBAAgB,SAC9B,QAAO,cAAc,SAAS,OAAO,aAAa,GAAG;AAGzD,KAAI,OAAO,iBAAiB,KAAA,EACxB,QAAO,eAAe;AAG1B,QAAO;;;;ACHX,MAAM,+BAAe,IAAI,KAA8B;AACvD,MAAM,iCAAiB,IAAI,SAA0C;AAErE,MAAa,gBAAgB;CACzB,SAAS,KAA+C;EACpD,MAAM,OAAO,IAAI,KAAK;AAEtB,MAAI,aAAa,IAAI,KAAK,CACtB,OAAM,IAAI,MAAM,UAAU,KAAK,sBAAsB;AAGzD,eAAa,IAAI,MAAM,IAAI;AAC3B,iBAAe,IAAI,IAAI,gBAAgB,KAAK;AAE5C,SAAO,IAAI;;CAGf,IAAI,MAA2C;AAC3C,SAAO,aAAa,IAAI,KAAK;;CAGjC,gBAAgB,YAAiD;AAC7D,OAAK,MAAM,OAAO,aAAa,QAAQ,CACnC,KAAI,IAAI,KAAK,eAAe,WAAY,QAAO;;CAKvD,IAAI,MAAuB;AACvB,SAAO,aAAa,IAAI,KAAK;;CAGjC,SAA4B;AACxB,SAAO,MAAM,KAAK,aAAa,QAAQ,CAAC;;CAG5C,eAAe,WAAsC;AACjD,SAAO,KAAK,Q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aAAaC,IAAAA,EAAE,KAAK;CAC7B;CACA;CACA;CACA;CACH,CAAC;;;;;;;AAUF,MAAa,cAAcA,IAAAA,EAAE,KAAK;CAC9B;CACA;CACA;CACH,CAAC;;;;;;;AAUF,MAAa,oBAAoBA,IAAAA,EAAE,KAAK;CACpC;CACA;CACA;CACH,CAAC;;;;;;AASF,MAAa,iBAAiBA,IAAAA,EAAE,KAAK;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["z","z","MessageAck","MessageSchema","InteractiveResponseSchema","FormResponseSchema","z","z","z"],"sources":["../src/client-config.ts","../src/events/registry.ts","../src/events/messaging.ts","../src/events/state.ts","../src/events/groups.ts","../src/enums.ts"],"sourcesContent":["/**\n * Client configuration types - re-exported from @open-wa/config\n * \n * @deprecated Import from '@open-wa/config' instead\n */\n\nexport { ConfigSchema as ClientConfigSchema, type Config as ClientConfig } from '@open-wa/config';\n\n/**\n * Migrates a v4 configuration object to the v5 schema format.\n * Currently, most v4 options are compatible with v5.\n * This function serves as a placeholder for any future transformations.\n * \n * @deprecated This is a legacy compatibility function. Use @open-wa/config directly.\n */\nexport function migrateV4Config(oldConfig: Record<string, unknown>): Record<string, unknown> {\n // Deep clone to avoid mutating original\n const config = JSON.parse(JSON.stringify(oldConfig));\n\n // Example migration: if 'authTimeout' was string in some legacy version (unlikely but example)\n if (typeof config.authTimeout === 'string') {\n config.authTimeout = parseInt(config.authTimeout, 10);\n }\n\n if (config.apiLifecycle === undefined) {\n config.apiLifecycle = 'hybrid';\n }\n\n return config;\n}\n","import { z } from 'zod';\nimport { LicenseTier } from '../enums';\n\nexport type QueueOverloadStrategy = 'backpressure' | 'dropping';\n\nexport interface QueueOptions {\n concurrency?: number;\n capacity?: number;\n overload?: QueueOverloadStrategy;\n ordering?: 'fifo';\n intervalCap?: number;\n interval?: number;\n timeout?: number;\n}\n\nexport type EventStatus = 'stable' | 'beta' | 'deprecated' | 'experimental';\n\nexport interface EventMetadata {\n eventName: string;\n legacyName: string;\n description?: string;\n namespace?: string;\n status?: EventStatus;\n deprecated?: string;\n license?: LicenseTier;\n since?: string;\n payloadSchema: z.ZodTypeAny;\n defaultQueueOptions?: QueueOptions;\n}\n\nexport interface EventDefinition {\n callbackSchema: z.ZodFunction<any, any>;\n meta: EventMetadata;\n}\n\nconst eventsByName = new Map<string, EventDefinition>();\nconst nameByCallback = new WeakMap<z.ZodFunction<any, any>, string>();\n\nexport const eventRegistry = {\n register(def: EventDefinition): z.ZodFunction<any, any> {\n const name = def.meta.eventName;\n \n if (eventsByName.has(name)) {\n throw new Error(`Event \"${name}\" already registered`);\n }\n \n eventsByName.set(name, def);\n nameByCallback.set(def.callbackSchema, name);\n \n return def.callbackSchema;\n },\n \n get(name: string): EventDefinition | undefined {\n return eventsByName.get(name);\n },\n \n getByLegacyName(legacyName: string): EventDefinition | undefined {\n for (const def of eventsByName.values()) {\n if (def.meta.legacyName === legacyName) return def;\n }\n return undefined;\n },\n \n has(name: string): boolean {\n return eventsByName.has(name);\n },\n \n getAll(): EventDefinition[] {\n return Array.from(eventsByName.values());\n },\n \n getByNamespace(namespace: string): EventDefinition[] {\n return this.getAll().filter(def => def.meta.namespace === namespace);\n },\n \n clear(): void {\n eventsByName.clear();\n }\n};\n\nexport const QueueOptionsSchema = z.object({\n concurrency: z.number().int().positive().optional(),\n capacity: z.number().int().positive().optional(),\n overload: z.enum(['backpressure', 'dropping']).optional(),\n ordering: z.literal('fifo').optional(),\n intervalCap: z.number().int().positive().optional(),\n interval: z.number().positive().optional(),\n timeout: z.number().positive().optional(),\n}).optional();\n\nexport function defineListenerV2<T extends z.ZodTypeAny>(\n name: string,\n params: {\n legacyName?: string;\n meta: Omit<EventMetadata, 'eventName' | 'legacyName' | 'payloadSchema'>;\n payload: T;\n defaultQueueOptions?: QueueOptions;\n }\n): z.ZodFunction<any, any> {\n \n const legacyName = params.legacyName || `on${name.charAt(0).toUpperCase()}${name.slice(1)}`;\n \n const callbackSchema = z.function({\n input: z.tuple([params.payload, QueueOptionsSchema]),\n output: z.union([\n z.boolean(),\n z.promise(z.boolean()),\n z.function({ input: z.tuple([]), output: z.void() }),\n ])\n });\n \n eventRegistry.register({\n callbackSchema,\n meta: {\n eventName: name,\n legacyName,\n payloadSchema: params.payload,\n defaultQueueOptions: params.defaultQueueOptions,\n ...params.meta\n }\n });\n \n return callbackSchema as any;\n}\n","import { InteractiveResponseSchema, FormResponseSchema } from '../interactive';\nimport { z } from 'zod';\nimport { defineListenerV2 } from './registry';\nimport { MessageSchema, MessageAck } from '../common-types';\n\nconst AckSchema = z.object({\n id: z.string(),\n chatId: z.string(),\n ack: z.nativeEnum(MessageAck),\n timestamp: z.number().optional(),\n});\n\nexport const messageEvent = defineListenerV2('message', {\n legacyName: 'onMessage',\n meta: {\n description: 'Fired when a new message is received (excluding own messages)',\n namespace: 'messages',\n status: 'stable',\n license: 'none',\n },\n payload: MessageSchema,\n defaultQueueOptions: { concurrency: 1 },\n});\n\nexport const anyMessageEvent = defineListenerV2('anyMessage', {\n legacyName: 'onAnyMessage',\n meta: {\n description: 'Fired for any message including own messages',\n namespace: 'messages',\n status: 'stable',\n license: 'none',\n },\n payload: MessageSchema,\n defaultQueueOptions: { concurrency: 1 },\n});\n\nexport const messageDeletedEvent = defineListenerV2('messageDeleted', {\n legacyName: 'onMessageDeleted',\n meta: {\n description: 'Fired when a message is deleted',\n namespace: 'messages',\n status: 'stable',\n license: 'none',\n },\n payload: MessageSchema,\n});\n\nexport const ackEvent = defineListenerV2('ack', {\n legacyName: 'onAck',\n meta: {\n description: 'Fired when a message acknowledgment is received',\n namespace: 'messages',\n status: 'stable',\n license: 'none',\n },\n payload: AckSchema,\n});\n\nexport const reactionEvent = defineListenerV2('reaction', {\n legacyName: 'onReaction',\n meta: {\n description: 'Fired when a reaction is added to a message',\n namespace: 'messages',\n status: 'stable',\n license: 'none',\n },\n payload: z.object({\n messageId: z.string(),\n reaction: z.string(),\n senderId: z.string(),\n timestamp: z.number(),\n }),\n});\n\nexport const interactiveResponseEvent = defineListenerV2('interactiveResponse', {\n legacyName: 'onInteractiveResponse',\n meta: { description: 'Structured reply, list, form or native interactive response', namespace: 'messages', status: 'stable', license: 'insiders' },\n payload: InteractiveResponseSchema,\n defaultQueueOptions: { concurrency: 1 },\n});\nexport const formResponseEvent = defineListenerV2('formResponse', {\n legacyName: 'onFormResponse',\n meta: { description: 'A form submission with question IDs and chosen option IDs', namespace: 'messages', status: 'stable', license: 'insiders' },\n payload: FormResponseSchema,\n defaultQueueOptions: { concurrency: 1 },\n});\n","import { z } from 'zod';\nimport { defineListenerV2 } from './registry';\n\nexport const StateEnum = z.enum([\n 'STARTING',\n 'AUTHENTICATING',\n 'READY',\n 'STOPPED',\n 'CONNECTED',\n 'DISCONNECTED', \n 'SYNCING',\n 'CONFLICT',\n 'UNLAUNCHED',\n 'PAIRING',\n 'TIMEOUT',\n]);\n\nexport const stateChangedEvent = defineListenerV2('stateChanged', {\n legacyName: 'onStateChanged',\n meta: {\n description: 'Fired when connection state changes',\n namespace: 'state',\n status: 'stable',\n license: 'none',\n },\n payload: z.object({\n state: StateEnum,\n previousState: StateEnum.optional(),\n }),\n});\n\nexport const chatStateEvent = defineListenerV2('chatState', {\n legacyName: 'onChatState',\n meta: {\n description: 'Fired when someone is typing or recording',\n namespace: 'state',\n status: 'stable',\n license: 'none',\n },\n payload: z.object({\n chatId: z.string(),\n state: z.enum(['typing', 'recording', 'paused']),\n senderId: z.string(),\n }),\n});\n\nexport const logoutEvent = defineListenerV2('logout', {\n legacyName: 'onLogout',\n meta: {\n description: 'Fired when the session is logged out',\n namespace: 'state',\n status: 'stable',\n license: 'none',\n },\n payload: z.object({\n reason: z.string().optional(),\n timestamp: z.number(),\n }),\n});\n","import { z } from 'zod';\nimport { defineListenerV2 } from './registry';\n\nexport const participantsChangedEvent = defineListenerV2('participantsChanged', {\n legacyName: 'onParticipantsChanged',\n meta: {\n description: 'Fired when group participants change',\n namespace: 'groups',\n status: 'stable',\n license: 'none',\n },\n payload: z.object({\n groupId: z.string(),\n action: z.enum(['add', 'remove', 'promote', 'demote']),\n participantIds: z.array(z.string()),\n by: z.string().optional(),\n }),\n});\n\nexport const addedToGroupEvent = defineListenerV2('addedToGroup', {\n legacyName: 'onAddedToGroup',\n meta: {\n description: 'Fired when you are added to a group',\n namespace: 'groups',\n status: 'stable',\n license: 'none',\n },\n payload: z.object({\n groupId: z.string(),\n groupName: z.string(),\n addedBy: z.string().optional(),\n }),\n});\n","import { z } from 'zod';\n\n/**\n * Action types for RBAC permissions\n * - read: Retrieve data (e.g., get contact, chat object)\n * - send: Create/send new content (e.g., send message, image, story)\n * - update: Modify existing data (e.g., update message, chat metadata, promote admin)\n * - delete: Remove data (e.g., delete chat, story, remove contact, demote admin)\n */\nexport const ActionEnum = z.enum([\n 'read',\n 'send',\n 'update',\n 'delete'\n]);\n\nexport type ActionType = z.infer<typeof ActionEnum>;\n\n/**\n * License tiers for feature gating\n * - none: Available to all users\n * - insiders: Requires insiders license\n * - restricted: Requires special/restricted license\n */\nexport const LicenseEnum = z.enum([\n 'none',\n 'insiders',\n 'restricted'\n]);\n\nexport type LicenseTier = z.infer<typeof LicenseEnum>;\n\n/**\n * Functionality scope for WhatsApp account types\n * - both: Works on both business and personal accounts\n * - business-only: Only works on business accounts\n * - personal-only: Only works on personal accounts\n */\nexport const FunctionalityEnum = z.enum([\n 'both',\n 'business-only',\n 'personal-only'\n]);\n\nexport type FunctionalityScope = z.infer<typeof FunctionalityEnum>;\n\n/**\n * HTTP methods for API mapping\n * - AUTO: Automatically inferred from action type or defaults to POST\n * - GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD: Standard HTTP methods\n */\nexport const HttpMethodEnum = z.enum([\n 'AUTO',\n 'GET',\n 'POST',\n 'PUT',\n 'DELETE',\n 'PATCH',\n 'OPTIONS',\n 'HEAD'\n]);\n\nexport type HttpMethod = z.infer<typeof HttpMethodEnum>;\n"],"mappings":";;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BAAiB,gBAAgB;CAC9D,YAAY;CACZ,MAAM;EACF,aAAa;EACb,WAAW;EACX,QAAQ;EACR,SAAS;CACb;CACA,SAASA,IAAAA,EAAE,OAAO;EACd,SAASA,IAAAA,EAAE,OAAO;EAClB,WAAWA,IAAAA,EAAE,OAAO;EACpB,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CACjC,CAAC;AACL,CAAC;;;;;;;;;;ACvBD,MAAa,aAAaC,IAAAA,EAAE,KAAK;CAC7B;CACA;CACA;CACA;AACJ,CAAC;;;;;;;AAUD,MAAa,cAAcA,IAAAA,EAAE,KAAK;CAC9B;CACA;CACA;AACJ,CAAC;;;;;;;AAUD,MAAa,oBAAoBA,IAAAA,EAAE,KAAK;CACpC;CACA;CACA;AACJ,CAAC;;;;;;AASD,MAAa,iBAAiBA,IAAAA,EAAE,KAAK;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ,CAAC"}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import {
|
|
3
|
-
import { n as implementMethodAsync, t as implementMethod } from "./implementor-
|
|
4
|
-
export { ActionEnum, ActionType, AliasMetadata, Base64, Base64ToDataUrlSchema, CLOUD_PROVIDERS, CapabilityDefinition, CapabilityMetadata, CapabilityStatus, CapabilityType, Chat, ChatId, ChatIdCodecSchema, ChatIdSchema, ChatSchema, ClientConfig, ClientConfigSchema, ClientFunctionMetadata, CloudUploadOptions, CloudUploadOptionsSchema, Config, ConfigSchema, Contact, ContactId, ContactIdCodecSchema, ContactIdSchema, ContactSchema, Content, DIRECTORY_STRATEGY, DataURL, DeepPartialConfig, DevTools, DevToolsSchema, EventDefinition, EventMetadata, EventStatus, FileToDataUrlSchema, FunctionalityEnum, FunctionalityScope, GroupChatId, GroupChatIdSchema, GroupId, GroupIdCodecSchema, GroupIdSchema, GroupMetadata, GroupMetadataSchema, HexColorSchema, HttpMethod, HttpMethodDefinition, HttpMethodEnum, HttpRouteAlias, Id, IdSchema, InferInput, InferOutput, IsoDatetimeToDateSchema, LicenseEnum, LicenseTier, LicenseType, Location, LocationSchema, LoggingTransport, LoggingTransportSchema, Message, MessageAck, MessageId, MessageIdCodecSchema, MessageIdReturnSchema, MessageIdSchema, MessageSchema, MessageTypes, MethodDefinition, NotificationLanguage, OnError, OpenWAMethodSchema, ParameterMetadata, PartialConfig, PartialConfigSchema, ProxyServerCredentials, ProxyServerCredentialsSchema, QRFormat, QueueOptions, QueueOptionsSchema, Registry, S3Sync, S3SyncSchema, SessionData, SessionDataSchema, SimpleListener, StateEnum, StrictConfig, StrictConfigSchema, UnixMillisToDateSchema, UnixSecondsToDateSchema, Viewport, ViewportSchema, ackEvent, addLabel, addParticipant, addedToGroupEvent, anyMessageEvent, approveGroupJoinRequest, archiveChat, audioDataParam, base64ToDataUrlCodec, blockContact, buildKeyAliasMap, captionParam, chatIdCodec, chatIdParam, chatStateEvent, checkNumberStatus, checkReadReceipts, clearChat, clientRegistry, communityIdParam, contactIdCodec, contactIdParam, contentParam, createFileCodec, createGroup, decryptMedia, defineEvent, defineListenerV2, defineMethod, defineMethodV2, deleteAllStatus, deleteChat, deleteMessage, deleteStatus, demoteParticipant, deriveNamespacedMethodName, documentDataParam, downloadMedia, eventRegistry, fileDataParam, fileToBase64Codec, fileToBufferCodec, fileToDataUrlCodec, fileToStreamCodec, fileToTempPathCodec, filenameParam, forwardMessages, getAllChatIds, getAllChats, getAllCommunities, getAllContacts, getAllGroups, getAllLabels, getAllMessages, getBatteryLevel, getBlockedIds, getBusinessProducts, getBusinessProfile, getChat, getChatWithNonContacts, getChatsByLabel, getCommonGroups, getCommunityAdminIds, getCommunityAdmins, getCommunityInfo, getCommunityParticipantIds, getCommunityParticipants, getConnectionState, getContact, getDefaultConfig, getFeatures, getGroupAdmins, getGroupInfo, getGroupInviteLink, getGroupMembers, getGroupMembersId, getHostNumber, getHttpMethodDefinitions, getKickedGroups, getLicenseType, getLoadedMessageCount, getMe, getMessageById, getMessageInfo, getMessagesForLLM, getMethodAliases, getMyLastMessage, getNumberProfile, getOrder, getParameterMetadata, getProcessStats, getProfilePicture, getSnapshot, getStarredMessages, getStatus, getStories, getUnsentMessages, getUserAgent, getVCards, getWAVersion, groupIdCodec, groupIdParam, healthCheck, hexColorCodec, imageDataParam, implementMethod, implementMethodAsync, includeMeParam, includeNotificationsParam, isChatOnline, isPlugged, isoDatetimeToDate, joinGroupViaLink, jsonStringCodec, latitudeParam, leaveGroup, loadEarlierMessages, locationNameParam, logoutEvent, longitudeParam, markAsRead, markAsUnread, mentionedJidListParam, messageDeletedEvent, messageEvent, messageIdCodec, messageIdParam, messageIdsParam, messageOptionsParam, migrateV4Config, muteChat, nameParam, normalizeParameterKeys, onlyLocalParam, parameterRegistry, parseConfig, participantsChangedEvent, pinChat, postImageStatus, postTextStatus, postVideoStatus, promoteParticipant, react, reactionEvent, rejectGroupJoinRequest, removeLabel, removeParticipant, revokeGroupInviteLink, sendAdvancedButtons, sendAudio, sendBanner, sendButtons, sendContact, sendFile, sendFileFromUrl, sendImage, sendLinkWithAutoPreview, sendListMessage, sendLocation, sendMessageWithThumb, sendMultipleContacts, sendPaymentRequest, sendPoll, sendPtt, sendReplyWithMentions, sendSeen, sendText, sendTextWithMentions, sendVCard, sendVideoAsGif, sendYouTubeLink, setChatEphemeral, setGroupDescription, setGroupEditToAdminsOnly, setGroupIcon, setGroupTitle, setGroupToAdminsOnly, setMyName, setMyStatus, setProfilePicture, skipMyMessagesParam, starMessage, stateChangedEvent, statusTextParam, stickerDataParam, toParam, unarchiveChat, unblockContact, unixMillisToDate, unixSecondsToDate, unmuteChat, unpinChat, unstarMessage, urlToDataUrlCodec, userAgentParam, validateConfig, videoDataParam, waitForIdParam, withNewMessagesOnlyParam, z, zObjectToTuple };
|
|
1
|
+
import { $ as statusTextParam, $i as CloudUploadOptions, $n as getGroupInfo, $r as sendAdvancedButtons, $t as QueueOptions, A as audioDataParam, Ai as ContactSchema, An as addLabel, Ar as getChat, At as hexColorCodec, B as imageDataParam, Bi as Location, Bn as postVideoStatus, Br as unpinChat, Bt as chatStateEvent, C as LinkActionSchema, Ca as Viewport, Ci as unstarMessage, Cn as isPlugged, Cr as getProfilePicture, Ct as createFileCodec, D as NativeContentSchema, Da as validateConfig, Di as ChatSchema, Dn as getBusinessProducts, Dr as deleteChat, Dt as fileToStreamCodec, E as NativeActionSchema, Ea as parseConfig, Ei as ChatId, En as setProfilePicture, Er as clearChat, Et as fileToDataUrlCodec, F as contentParam, Fi as GroupId, Fn as deleteStatus, Fr as muteChat, Ft as unixSecondsToDate, G as longitudeParam, Gi as MessageIdReturnSchema, Gn as getCommunityParticipantIds, Gr as getMessageInfo, Gt as formResponseEvent, H as includeNotificationsParam, Hi as Message, Hn as getCommunityAdminIds, Hr as forwardMessages, Ht as stateChangedEvent, I as documentDataParam, Ii as GroupMetadata, In as getStatus, Ir as pinChat, It as urlToDataUrlCodec, J as messageIdsParam, Ji as SimpleListener, Jn as approveGroupJoinRequest, Jr as getStarredMessages, Jt as messageEvent, K as mentionedJidListParam, Ki as MessageSchema, Kn as getCommunityParticipants, Kr as getMessagesForLLM, Kt as interactiveResponseEvent, L as fileDataParam, Li as GroupMetadataSchema, Ln as getStories, Lr as setChatEphemeral, Lt as addedToGroupEvent, M as chatIdParam, Mi as DataURL, Mn as getChatsByLabel, Mr as isChatOnline, Mt as jsonStringCodec, N as communityIdParam, Ni as GroupChatId, Nn as removeLabel, Nr as markAsRead, Nt as messageIdCodec, O as ReplyActionSchema, Oi as Contact, On as getBusinessProfile, Or as getAllChatIds, Ot as fileToTempPathCodec, P as contactIdParam, Pi as GroupChatIdSchema, Pn as deleteAllStatus, Pr as markAsUnread, Pt as unixMillisToDate, Q as skipMyMessagesParam, Qi as CLOUD_PROVIDERS, Qn as getGroupAdmins, Qr as react, Qt as EventStatus, R as filenameParam, Ri as Id, Rn as postImageStatus, Rr as unarchiveChat, Rt as participantsChangedEvent, S as JsonValueSchema, Sa as StrictConfigSchema, Si as starMessage, Sn as healthCheck, Sr as getNumberProfile, St as contactIdCodec, T as ListRowSchema, Ta as getDefaultConfig, Ti as Chat, Tn as setMyStatus, Tr as archiveChat, Tt as fileToBufferCodec, U as latitudeParam, Ui as MessageAck, Un as getCommunityAdmins, Ur as getAllMessages, Ut as ackEvent, V as includeMeParam, Vi as LocationSchema, Vn as getAllCommunities, Vr as deleteMessage, Vt as logoutEvent, W as locationNameParam, Wi as MessageId, Wn as getCommunityInfo, Wr as getMessageById, Wt as anyMessageEvent, X as nameParam, Xi as ClientConfigSchema, Xn as demoteParticipant, Xr as getVCards, Xt as EventDefinition, Y as messageOptionsParam, Yi as ClientConfig, Yn as createGroup, Yr as getUnsentMessages, Yt as reactionEvent, Z as onlyLocalParam, Zi as migrateV4Config, Zn as getAllGroups, Zr as loadEarlierMessages, Zt as EventMetadata, _ as InteractiveHeaderSchema, _a as S3Sync, _i as sendText, _n as getMe, _r as checkReadReceipts, _t as MessageIdSchema, a as CarouselContentSchema, aa as DevTools, ai as sendFileFromUrl, an as SendInteractiveInputSchema, ar as leaveGroup, at as withNewMessagesOnlyParam, b as JsonObjectSchema, ba as SessionDataSchema, bi as sendVideoAsGif, bn as getUserAgent, br as getCommonGroups, bt as base64ToDataUrlCodec, c as FormQuestion, ca as LoggingTransport, ci as sendListMessage, cn as sendRawMessage, cr as removeParticipant, ct as ChatIdSchema, d as FormResponseSchema, da as OnError, di as sendMultipleContacts, dn as getBatteryLevel, dr as setGroupEditToAdminsOnly, dt as FileToDataUrlSchema, ea as CloudUploadOptionsSchema, ei as sendAudio, en as QueueOptionsSchema, er as getGroupInviteLink, et as stickerDataParam, f as InteractiveAction, fa as PartialConfig, fi as sendPaymentRequest, fn as getConnectionState, fr as setGroupIcon, ft as GroupIdCodecSchema, g as InteractiveHeader, ga as QRFormat, gi as sendSeen, gn as getLoadedMessageCount, gr as checkNumberStatus, gt as MessageIdCodecSchema, h as InteractiveContentSchema, ha as ProxyServerCredentialsSchema, hi as sendReplyWithMentions, hn as getLicenseType, hr as blockContact, ht as IsoDatetimeToDateSchema, i as CarouselCardSchema, ia as DeepPartialConfig, ii as sendFile, ir as joinGroupViaLink, it as waitForIdParam, j as captionParam, ji as Content, jn as getAllLabels, jr as getChatWithNonContacts, jt as isoDatetimeToDate, k as defineInteractiveMessage, ki as ContactId, kn as getOrder, kr as getAllChats, kt as groupIdCodec, l as FormQuestionSchema, la as LoggingTransportSchema, li as sendLocation, ln as decryptMedia, lr as revokeGroupInviteLink, lt as ContactIdCodecSchema, m as InteractiveContent, ma as ProxyServerCredentials, mi as sendPtt, mn as getHostNumber, mr as setGroupToAdminsOnly, mt as HexColorSchema, n as ButtonsContentSchema, na as ConfigSchema, ni as sendButtons, nn as defineListenerV2, nr as getGroupMembersId, nt as userAgentParam, o as CopyActionSchema, oa as DevToolsSchema, oi as sendImage, on as SendRawMessageInputSchema, or as promoteParticipant, ot as Base64ToDataUrlSchema, p as InteractiveActionSchema, pa as PartialConfigSchema, pi as sendPoll, pn as getFeatures, pr as setGroupTitle, pt as GroupIdSchema, q as messageIdParam, qi as MessageTypes, qn as addParticipant, qr as getMyLastMessage, qt as messageDeletedEvent, r as CallActionSchema, ra as DIRECTORY_STRATEGY, ri as sendContact, rn as eventRegistry, rr as getKickedGroups, rt as videoDataParam, s as FormContentSchema, sa as LicenseType, si as sendLinkWithAutoPreview, sn as sendInteractive, sr as rejectGroupJoinRequest, st as ChatIdCodecSchema, t as BookingContentSchema, ta as Config, ti as sendBanner, tn as QueueOverloadStrategy, tr as getGroupMembers, tt as toParam, u as FormResponse, ua as NotificationLanguage, ui as sendMessageWithThumb, un as downloadMedia, ur as setGroupDescription, ut as ContactIdSchema, v as InteractiveResponse, va as S3SyncSchema, vi as sendTextWithMentions, vn as getProcessStats, vr as getAllContacts, vt as UnixMillisToDateSchema, w as ListContentSchema, wa as ViewportSchema, wi as Base64, wn as setMyName, wr as unblockContact, wt as fileToBase64Codec, x as JsonValue, xa as StrictConfig, xi as sendYouTubeLink, xn as getWAVersion, xr as getContact, xt as chatIdCodec, y as InteractiveResponseSchema, ya as SessionData, yi as sendVCard, yn as getSnapshot, yr as getBlockedIds, yt as UnixSecondsToDateSchema, z as groupIdParam, zi as IdSchema, zn as postTextStatus, zr as unmuteChat, zt as StateEnum } from "./index-DTztyYhw.cjs";
|
|
2
|
+
import { A as FunctionalityEnum, C as getParameterMetadata, D as zObjectToTuple, E as z, F as LicenseTier, M as HttpMethod, N as HttpMethodEnum, O as ActionEnum, P as LicenseEnum, S as getMethodAliases, T as parameterRegistry, _ as clientRegistry, a as CapabilityDefinition, b as defineMethodV2, c as CapabilityType, d as InferOutput, f as MethodDefinition, g as buildKeyAliasMap, h as Registry, i as AliasMetadata, j as FunctionalityScope, k as ActionType, l as ClientFunctionMetadata, m as ParameterMetadata, n as HttpRouteAlias, o as CapabilityMetadata, p as OpenWAMethodSchema, r as getHttpMethodDefinitions, s as CapabilityStatus, t as HttpMethodDefinition, u as InferInput, v as defineEvent, w as normalizeParameterKeys, x as deriveNamespacedMethodName, y as defineMethod } from "./http-manifest-CqjUoaDB.cjs";
|
|
3
|
+
import { n as implementMethodAsync, t as implementMethod } from "./implementor-ACLHTHby.cjs";
|
|
4
|
+
export { ActionEnum, ActionType, AliasMetadata, Base64, Base64ToDataUrlSchema, BookingContentSchema, ButtonsContentSchema, CLOUD_PROVIDERS, CallActionSchema, CapabilityDefinition, CapabilityMetadata, CapabilityStatus, CapabilityType, CarouselCardSchema, CarouselContentSchema, Chat, ChatId, ChatIdCodecSchema, ChatIdSchema, ChatSchema, type ClientConfig, ClientConfigSchema, ClientFunctionMetadata, type CloudUploadOptions, CloudUploadOptionsSchema, type Config, ConfigSchema, Contact, ContactId, ContactIdCodecSchema, ContactIdSchema, ContactSchema, Content, CopyActionSchema, DIRECTORY_STRATEGY, DataURL, type DeepPartialConfig, type DevTools, DevToolsSchema, EventDefinition, EventMetadata, EventStatus, FileToDataUrlSchema, FormContentSchema, FormQuestion, FormQuestionSchema, FormResponse, FormResponseSchema, FunctionalityEnum, FunctionalityScope, GroupChatId, GroupChatIdSchema, GroupId, GroupIdCodecSchema, GroupIdSchema, GroupMetadata, GroupMetadataSchema, HexColorSchema, HttpMethod, HttpMethodDefinition, HttpMethodEnum, HttpRouteAlias, Id, IdSchema, InferInput, InferOutput, InteractiveAction, InteractiveActionSchema, InteractiveContent, InteractiveContentSchema, InteractiveHeader, InteractiveHeaderSchema, InteractiveResponse, InteractiveResponseSchema, IsoDatetimeToDateSchema, JsonObjectSchema, JsonValue, JsonValueSchema, LicenseEnum, LicenseTier, LicenseType, LinkActionSchema, ListContentSchema, ListRowSchema, Location, LocationSchema, type LoggingTransport, LoggingTransportSchema, Message, MessageAck, MessageId, MessageIdCodecSchema, MessageIdReturnSchema, MessageIdSchema, MessageSchema, MessageTypes, MethodDefinition, NativeActionSchema, NativeContentSchema, NotificationLanguage, OnError, OpenWAMethodSchema, ParameterMetadata, type PartialConfig, PartialConfigSchema, type ProxyServerCredentials, ProxyServerCredentialsSchema, QRFormat, QueueOptions, QueueOptionsSchema, QueueOverloadStrategy, Registry, ReplyActionSchema, type S3Sync, S3SyncSchema, SendInteractiveInputSchema, SendRawMessageInputSchema, type SessionData, SessionDataSchema, SimpleListener, StateEnum, type StrictConfig, StrictConfigSchema, UnixMillisToDateSchema, UnixSecondsToDateSchema, type Viewport, ViewportSchema, ackEvent, addLabel, addParticipant, addedToGroupEvent, anyMessageEvent, approveGroupJoinRequest, archiveChat, audioDataParam, base64ToDataUrlCodec, blockContact, buildKeyAliasMap, captionParam, chatIdCodec, chatIdParam, chatStateEvent, checkNumberStatus, checkReadReceipts, clearChat, clientRegistry, communityIdParam, contactIdCodec, contactIdParam, contentParam, createFileCodec, createGroup, decryptMedia, defineEvent, defineInteractiveMessage, defineListenerV2, defineMethod, defineMethodV2, deleteAllStatus, deleteChat, deleteMessage, deleteStatus, demoteParticipant, deriveNamespacedMethodName, documentDataParam, downloadMedia, eventRegistry, fileDataParam, fileToBase64Codec, fileToBufferCodec, fileToDataUrlCodec, fileToStreamCodec, fileToTempPathCodec, filenameParam, formResponseEvent, forwardMessages, getAllChatIds, getAllChats, getAllCommunities, getAllContacts, getAllGroups, getAllLabels, getAllMessages, getBatteryLevel, getBlockedIds, getBusinessProducts, getBusinessProfile, getChat, getChatWithNonContacts, getChatsByLabel, getCommonGroups, getCommunityAdminIds, getCommunityAdmins, getCommunityInfo, getCommunityParticipantIds, getCommunityParticipants, getConnectionState, getContact, getDefaultConfig, getFeatures, getGroupAdmins, getGroupInfo, getGroupInviteLink, getGroupMembers, getGroupMembersId, getHostNumber, getHttpMethodDefinitions, getKickedGroups, getLicenseType, getLoadedMessageCount, getMe, getMessageById, getMessageInfo, getMessagesForLLM, getMethodAliases, getMyLastMessage, getNumberProfile, getOrder, getParameterMetadata, getProcessStats, getProfilePicture, getSnapshot, getStarredMessages, getStatus, getStories, getUnsentMessages, getUserAgent, getVCards, getWAVersion, groupIdCodec, groupIdParam, healthCheck, hexColorCodec, imageDataParam, implementMethod, implementMethodAsync, includeMeParam, includeNotificationsParam, interactiveResponseEvent, isChatOnline, isPlugged, isoDatetimeToDate, joinGroupViaLink, jsonStringCodec, latitudeParam, leaveGroup, loadEarlierMessages, locationNameParam, logoutEvent, longitudeParam, markAsRead, markAsUnread, mentionedJidListParam, messageDeletedEvent, messageEvent, messageIdCodec, messageIdParam, messageIdsParam, messageOptionsParam, migrateV4Config, muteChat, nameParam, normalizeParameterKeys, onlyLocalParam, parameterRegistry, parseConfig, participantsChangedEvent, pinChat, postImageStatus, postTextStatus, postVideoStatus, promoteParticipant, react, reactionEvent, rejectGroupJoinRequest, removeLabel, removeParticipant, revokeGroupInviteLink, sendAdvancedButtons, sendAudio, sendBanner, sendButtons, sendContact, sendFile, sendFileFromUrl, sendImage, sendInteractive, sendLinkWithAutoPreview, sendListMessage, sendLocation, sendMessageWithThumb, sendMultipleContacts, sendPaymentRequest, sendPoll, sendPtt, sendRawMessage, sendReplyWithMentions, sendSeen, sendText, sendTextWithMentions, sendVCard, sendVideoAsGif, sendYouTubeLink, setChatEphemeral, setGroupDescription, setGroupEditToAdminsOnly, setGroupIcon, setGroupTitle, setGroupToAdminsOnly, setMyName, setMyStatus, setProfilePicture, skipMyMessagesParam, starMessage, stateChangedEvent, statusTextParam, stickerDataParam, toParam, unarchiveChat, unblockContact, unixMillisToDate, unixSecondsToDate, unmuteChat, unpinChat, unstarMessage, urlToDataUrlCodec, userAgentParam, validateConfig, videoDataParam, waitForIdParam, withNewMessagesOnlyParam, z, zObjectToTuple };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import {
|
|
3
|
-
import { n as implementMethodAsync, t as implementMethod } from "./implementor-
|
|
4
|
-
export { ActionEnum, ActionType, AliasMetadata, Base64, Base64ToDataUrlSchema, CLOUD_PROVIDERS, CapabilityDefinition, CapabilityMetadata, CapabilityStatus, CapabilityType, Chat, ChatId, ChatIdCodecSchema, ChatIdSchema, ChatSchema, ClientConfig, ClientConfigSchema, ClientFunctionMetadata, CloudUploadOptions, CloudUploadOptionsSchema, Config, ConfigSchema, Contact, ContactId, ContactIdCodecSchema, ContactIdSchema, ContactSchema, Content, DIRECTORY_STRATEGY, DataURL, DeepPartialConfig, DevTools, DevToolsSchema, EventDefinition, EventMetadata, EventStatus, FileToDataUrlSchema, FunctionalityEnum, FunctionalityScope, GroupChatId, GroupChatIdSchema, GroupId, GroupIdCodecSchema, GroupIdSchema, GroupMetadata, GroupMetadataSchema, HexColorSchema, HttpMethod, HttpMethodDefinition, HttpMethodEnum, HttpRouteAlias, Id, IdSchema, InferInput, InferOutput, IsoDatetimeToDateSchema, LicenseEnum, LicenseTier, LicenseType, Location, LocationSchema, LoggingTransport, LoggingTransportSchema, Message, MessageAck, MessageId, MessageIdCodecSchema, MessageIdReturnSchema, MessageIdSchema, MessageSchema, MessageTypes, MethodDefinition, NotificationLanguage, OnError, OpenWAMethodSchema, ParameterMetadata, PartialConfig, PartialConfigSchema, ProxyServerCredentials, ProxyServerCredentialsSchema, QRFormat, QueueOptions, QueueOptionsSchema, Registry, S3Sync, S3SyncSchema, SessionData, SessionDataSchema, SimpleListener, StateEnum, StrictConfig, StrictConfigSchema, UnixMillisToDateSchema, UnixSecondsToDateSchema, Viewport, ViewportSchema, ackEvent, addLabel, addParticipant, addedToGroupEvent, anyMessageEvent, approveGroupJoinRequest, archiveChat, audioDataParam, base64ToDataUrlCodec, blockContact, buildKeyAliasMap, captionParam, chatIdCodec, chatIdParam, chatStateEvent, checkNumberStatus, checkReadReceipts, clearChat, clientRegistry, communityIdParam, contactIdCodec, contactIdParam, contentParam, createFileCodec, createGroup, decryptMedia, defineEvent, defineListenerV2, defineMethod, defineMethodV2, deleteAllStatus, deleteChat, deleteMessage, deleteStatus, demoteParticipant, deriveNamespacedMethodName, documentDataParam, downloadMedia, eventRegistry, fileDataParam, fileToBase64Codec, fileToBufferCodec, fileToDataUrlCodec, fileToStreamCodec, fileToTempPathCodec, filenameParam, forwardMessages, getAllChatIds, getAllChats, getAllCommunities, getAllContacts, getAllGroups, getAllLabels, getAllMessages, getBatteryLevel, getBlockedIds, getBusinessProducts, getBusinessProfile, getChat, getChatWithNonContacts, getChatsByLabel, getCommonGroups, getCommunityAdminIds, getCommunityAdmins, getCommunityInfo, getCommunityParticipantIds, getCommunityParticipants, getConnectionState, getContact, getDefaultConfig, getFeatures, getGroupAdmins, getGroupInfo, getGroupInviteLink, getGroupMembers, getGroupMembersId, getHostNumber, getHttpMethodDefinitions, getKickedGroups, getLicenseType, getLoadedMessageCount, getMe, getMessageById, getMessageInfo, getMessagesForLLM, getMethodAliases, getMyLastMessage, getNumberProfile, getOrder, getParameterMetadata, getProcessStats, getProfilePicture, getSnapshot, getStarredMessages, getStatus, getStories, getUnsentMessages, getUserAgent, getVCards, getWAVersion, groupIdCodec, groupIdParam, healthCheck, hexColorCodec, imageDataParam, implementMethod, implementMethodAsync, includeMeParam, includeNotificationsParam, isChatOnline, isPlugged, isoDatetimeToDate, joinGroupViaLink, jsonStringCodec, latitudeParam, leaveGroup, loadEarlierMessages, locationNameParam, logoutEvent, longitudeParam, markAsRead, markAsUnread, mentionedJidListParam, messageDeletedEvent, messageEvent, messageIdCodec, messageIdParam, messageIdsParam, messageOptionsParam, migrateV4Config, muteChat, nameParam, normalizeParameterKeys, onlyLocalParam, parameterRegistry, parseConfig, participantsChangedEvent, pinChat, postImageStatus, postTextStatus, postVideoStatus, promoteParticipant, react, reactionEvent, rejectGroupJoinRequest, removeLabel, removeParticipant, revokeGroupInviteLink, sendAdvancedButtons, sendAudio, sendBanner, sendButtons, sendContact, sendFile, sendFileFromUrl, sendImage, sendLinkWithAutoPreview, sendListMessage, sendLocation, sendMessageWithThumb, sendMultipleContacts, sendPaymentRequest, sendPoll, sendPtt, sendReplyWithMentions, sendSeen, sendText, sendTextWithMentions, sendVCard, sendVideoAsGif, sendYouTubeLink, setChatEphemeral, setGroupDescription, setGroupEditToAdminsOnly, setGroupIcon, setGroupTitle, setGroupToAdminsOnly, setMyName, setMyStatus, setProfilePicture, skipMyMessagesParam, starMessage, stateChangedEvent, statusTextParam, stickerDataParam, toParam, unarchiveChat, unblockContact, unixMillisToDate, unixSecondsToDate, unmuteChat, unpinChat, unstarMessage, urlToDataUrlCodec, userAgentParam, validateConfig, videoDataParam, waitForIdParam, withNewMessagesOnlyParam, z, zObjectToTuple };
|
|
1
|
+
import { $ as statusTextParam, $i as CloudUploadOptions, $n as getGroupInfo, $r as sendAdvancedButtons, $t as QueueOptions, A as audioDataParam, Ai as ContactSchema, An as addLabel, Ar as getChat, At as hexColorCodec, B as imageDataParam, Bi as Location, Bn as postVideoStatus, Br as unpinChat, Bt as chatStateEvent, C as LinkActionSchema, Ca as Viewport, Ci as unstarMessage, Cn as isPlugged, Cr as getProfilePicture, Ct as createFileCodec, D as NativeContentSchema, Da as validateConfig, Di as ChatSchema, Dn as getBusinessProducts, Dr as deleteChat, Dt as fileToStreamCodec, E as NativeActionSchema, Ea as parseConfig, Ei as ChatId, En as setProfilePicture, Er as clearChat, Et as fileToDataUrlCodec, F as contentParam, Fi as GroupId, Fn as deleteStatus, Fr as muteChat, Ft as unixSecondsToDate, G as longitudeParam, Gi as MessageIdReturnSchema, Gn as getCommunityParticipantIds, Gr as getMessageInfo, Gt as formResponseEvent, H as includeNotificationsParam, Hi as Message, Hn as getCommunityAdminIds, Hr as forwardMessages, Ht as stateChangedEvent, I as documentDataParam, Ii as GroupMetadata, In as getStatus, Ir as pinChat, It as urlToDataUrlCodec, J as messageIdsParam, Ji as SimpleListener, Jn as approveGroupJoinRequest, Jr as getStarredMessages, Jt as messageEvent, K as mentionedJidListParam, Ki as MessageSchema, Kn as getCommunityParticipants, Kr as getMessagesForLLM, Kt as interactiveResponseEvent, L as fileDataParam, Li as GroupMetadataSchema, Ln as getStories, Lr as setChatEphemeral, Lt as addedToGroupEvent, M as chatIdParam, Mi as DataURL, Mn as getChatsByLabel, Mr as isChatOnline, Mt as jsonStringCodec, N as communityIdParam, Ni as GroupChatId, Nn as removeLabel, Nr as markAsRead, Nt as messageIdCodec, O as ReplyActionSchema, Oi as Contact, On as getBusinessProfile, Or as getAllChatIds, Ot as fileToTempPathCodec, P as contactIdParam, Pi as GroupChatIdSchema, Pn as deleteAllStatus, Pr as markAsUnread, Pt as unixMillisToDate, Q as skipMyMessagesParam, Qi as CLOUD_PROVIDERS, Qn as getGroupAdmins, Qr as react, Qt as EventStatus, R as filenameParam, Ri as Id, Rn as postImageStatus, Rr as unarchiveChat, Rt as participantsChangedEvent, S as JsonValueSchema, Sa as StrictConfigSchema, Si as starMessage, Sn as healthCheck, Sr as getNumberProfile, St as contactIdCodec, T as ListRowSchema, Ta as getDefaultConfig, Ti as Chat, Tn as setMyStatus, Tr as archiveChat, Tt as fileToBufferCodec, U as latitudeParam, Ui as MessageAck, Un as getCommunityAdmins, Ur as getAllMessages, Ut as ackEvent, V as includeMeParam, Vi as LocationSchema, Vn as getAllCommunities, Vr as deleteMessage, Vt as logoutEvent, W as locationNameParam, Wi as MessageId, Wn as getCommunityInfo, Wr as getMessageById, Wt as anyMessageEvent, X as nameParam, Xi as ClientConfigSchema, Xn as demoteParticipant, Xr as getVCards, Xt as EventDefinition, Y as messageOptionsParam, Yi as ClientConfig, Yn as createGroup, Yr as getUnsentMessages, Yt as reactionEvent, Z as onlyLocalParam, Zi as migrateV4Config, Zn as getAllGroups, Zr as loadEarlierMessages, Zt as EventMetadata, _ as InteractiveHeaderSchema, _a as S3Sync, _i as sendText, _n as getMe, _r as checkReadReceipts, _t as MessageIdSchema, a as CarouselContentSchema, aa as DevTools, ai as sendFileFromUrl, an as SendInteractiveInputSchema, ar as leaveGroup, at as withNewMessagesOnlyParam, b as JsonObjectSchema, ba as SessionDataSchema, bi as sendVideoAsGif, bn as getUserAgent, br as getCommonGroups, bt as base64ToDataUrlCodec, c as FormQuestion, ca as LoggingTransport, ci as sendListMessage, cn as sendRawMessage, cr as removeParticipant, ct as ChatIdSchema, d as FormResponseSchema, da as OnError, di as sendMultipleContacts, dn as getBatteryLevel, dr as setGroupEditToAdminsOnly, dt as FileToDataUrlSchema, ea as CloudUploadOptionsSchema, ei as sendAudio, en as QueueOptionsSchema, er as getGroupInviteLink, et as stickerDataParam, f as InteractiveAction, fa as PartialConfig, fi as sendPaymentRequest, fn as getConnectionState, fr as setGroupIcon, ft as GroupIdCodecSchema, g as InteractiveHeader, ga as QRFormat, gi as sendSeen, gn as getLoadedMessageCount, gr as checkNumberStatus, gt as MessageIdCodecSchema, h as InteractiveContentSchema, ha as ProxyServerCredentialsSchema, hi as sendReplyWithMentions, hn as getLicenseType, hr as blockContact, ht as IsoDatetimeToDateSchema, i as CarouselCardSchema, ia as DeepPartialConfig, ii as sendFile, ir as joinGroupViaLink, it as waitForIdParam, j as captionParam, ji as Content, jn as getAllLabels, jr as getChatWithNonContacts, jt as isoDatetimeToDate, k as defineInteractiveMessage, ki as ContactId, kn as getOrder, kr as getAllChats, kt as groupIdCodec, l as FormQuestionSchema, la as LoggingTransportSchema, li as sendLocation, ln as decryptMedia, lr as revokeGroupInviteLink, lt as ContactIdCodecSchema, m as InteractiveContent, ma as ProxyServerCredentials, mi as sendPtt, mn as getHostNumber, mr as setGroupToAdminsOnly, mt as HexColorSchema, n as ButtonsContentSchema, na as ConfigSchema, ni as sendButtons, nn as defineListenerV2, nr as getGroupMembersId, nt as userAgentParam, o as CopyActionSchema, oa as DevToolsSchema, oi as sendImage, on as SendRawMessageInputSchema, or as promoteParticipant, ot as Base64ToDataUrlSchema, p as InteractiveActionSchema, pa as PartialConfigSchema, pi as sendPoll, pn as getFeatures, pr as setGroupTitle, pt as GroupIdSchema, q as messageIdParam, qi as MessageTypes, qn as addParticipant, qr as getMyLastMessage, qt as messageDeletedEvent, r as CallActionSchema, ra as DIRECTORY_STRATEGY, ri as sendContact, rn as eventRegistry, rr as getKickedGroups, rt as videoDataParam, s as FormContentSchema, sa as LicenseType, si as sendLinkWithAutoPreview, sn as sendInteractive, sr as rejectGroupJoinRequest, st as ChatIdCodecSchema, t as BookingContentSchema, ta as Config, ti as sendBanner, tn as QueueOverloadStrategy, tr as getGroupMembers, tt as toParam, u as FormResponse, ua as NotificationLanguage, ui as sendMessageWithThumb, un as downloadMedia, ur as setGroupDescription, ut as ContactIdSchema, v as InteractiveResponse, va as S3SyncSchema, vi as sendTextWithMentions, vn as getProcessStats, vr as getAllContacts, vt as UnixMillisToDateSchema, w as ListContentSchema, wa as ViewportSchema, wi as Base64, wn as setMyName, wr as unblockContact, wt as fileToBase64Codec, x as JsonValue, xa as StrictConfig, xi as sendYouTubeLink, xn as getWAVersion, xr as getContact, xt as chatIdCodec, y as InteractiveResponseSchema, ya as SessionData, yi as sendVCard, yn as getSnapshot, yr as getBlockedIds, yt as UnixSecondsToDateSchema, z as groupIdParam, zi as IdSchema, zn as postTextStatus, zr as unmuteChat, zt as StateEnum } from "./index-nVKR0RmZ.mjs";
|
|
2
|
+
import { A as FunctionalityEnum, C as getParameterMetadata, D as zObjectToTuple, E as z, F as LicenseTier, M as HttpMethod, N as HttpMethodEnum, O as ActionEnum, P as LicenseEnum, S as getMethodAliases, T as parameterRegistry, _ as clientRegistry, a as CapabilityDefinition, b as defineMethodV2, c as CapabilityType, d as InferOutput, f as MethodDefinition, g as buildKeyAliasMap, h as Registry, i as AliasMetadata, j as FunctionalityScope, k as ActionType, l as ClientFunctionMetadata, m as ParameterMetadata, n as HttpRouteAlias, o as CapabilityMetadata, p as OpenWAMethodSchema, r as getHttpMethodDefinitions, s as CapabilityStatus, t as HttpMethodDefinition, u as InferInput, v as defineEvent, w as normalizeParameterKeys, x as deriveNamespacedMethodName, y as defineMethod } from "./http-manifest-CqjUoaDB.mjs";
|
|
3
|
+
import { n as implementMethodAsync, t as implementMethod } from "./implementor-ACLHTHby.mjs";
|
|
4
|
+
export { ActionEnum, ActionType, AliasMetadata, Base64, Base64ToDataUrlSchema, BookingContentSchema, ButtonsContentSchema, CLOUD_PROVIDERS, CallActionSchema, CapabilityDefinition, CapabilityMetadata, CapabilityStatus, CapabilityType, CarouselCardSchema, CarouselContentSchema, Chat, ChatId, ChatIdCodecSchema, ChatIdSchema, ChatSchema, type ClientConfig, ClientConfigSchema, ClientFunctionMetadata, type CloudUploadOptions, CloudUploadOptionsSchema, type Config, ConfigSchema, Contact, ContactId, ContactIdCodecSchema, ContactIdSchema, ContactSchema, Content, CopyActionSchema, DIRECTORY_STRATEGY, DataURL, type DeepPartialConfig, type DevTools, DevToolsSchema, EventDefinition, EventMetadata, EventStatus, FileToDataUrlSchema, FormContentSchema, FormQuestion, FormQuestionSchema, FormResponse, FormResponseSchema, FunctionalityEnum, FunctionalityScope, GroupChatId, GroupChatIdSchema, GroupId, GroupIdCodecSchema, GroupIdSchema, GroupMetadata, GroupMetadataSchema, HexColorSchema, HttpMethod, HttpMethodDefinition, HttpMethodEnum, HttpRouteAlias, Id, IdSchema, InferInput, InferOutput, InteractiveAction, InteractiveActionSchema, InteractiveContent, InteractiveContentSchema, InteractiveHeader, InteractiveHeaderSchema, InteractiveResponse, InteractiveResponseSchema, IsoDatetimeToDateSchema, JsonObjectSchema, JsonValue, JsonValueSchema, LicenseEnum, LicenseTier, LicenseType, LinkActionSchema, ListContentSchema, ListRowSchema, Location, LocationSchema, type LoggingTransport, LoggingTransportSchema, Message, MessageAck, MessageId, MessageIdCodecSchema, MessageIdReturnSchema, MessageIdSchema, MessageSchema, MessageTypes, MethodDefinition, NativeActionSchema, NativeContentSchema, NotificationLanguage, OnError, OpenWAMethodSchema, ParameterMetadata, type PartialConfig, PartialConfigSchema, type ProxyServerCredentials, ProxyServerCredentialsSchema, QRFormat, QueueOptions, QueueOptionsSchema, QueueOverloadStrategy, Registry, ReplyActionSchema, type S3Sync, S3SyncSchema, SendInteractiveInputSchema, SendRawMessageInputSchema, type SessionData, SessionDataSchema, SimpleListener, StateEnum, type StrictConfig, StrictConfigSchema, UnixMillisToDateSchema, UnixSecondsToDateSchema, type Viewport, ViewportSchema, ackEvent, addLabel, addParticipant, addedToGroupEvent, anyMessageEvent, approveGroupJoinRequest, archiveChat, audioDataParam, base64ToDataUrlCodec, blockContact, buildKeyAliasMap, captionParam, chatIdCodec, chatIdParam, chatStateEvent, checkNumberStatus, checkReadReceipts, clearChat, clientRegistry, communityIdParam, contactIdCodec, contactIdParam, contentParam, createFileCodec, createGroup, decryptMedia, defineEvent, defineInteractiveMessage, defineListenerV2, defineMethod, defineMethodV2, deleteAllStatus, deleteChat, deleteMessage, deleteStatus, demoteParticipant, deriveNamespacedMethodName, documentDataParam, downloadMedia, eventRegistry, fileDataParam, fileToBase64Codec, fileToBufferCodec, fileToDataUrlCodec, fileToStreamCodec, fileToTempPathCodec, filenameParam, formResponseEvent, forwardMessages, getAllChatIds, getAllChats, getAllCommunities, getAllContacts, getAllGroups, getAllLabels, getAllMessages, getBatteryLevel, getBlockedIds, getBusinessProducts, getBusinessProfile, getChat, getChatWithNonContacts, getChatsByLabel, getCommonGroups, getCommunityAdminIds, getCommunityAdmins, getCommunityInfo, getCommunityParticipantIds, getCommunityParticipants, getConnectionState, getContact, getDefaultConfig, getFeatures, getGroupAdmins, getGroupInfo, getGroupInviteLink, getGroupMembers, getGroupMembersId, getHostNumber, getHttpMethodDefinitions, getKickedGroups, getLicenseType, getLoadedMessageCount, getMe, getMessageById, getMessageInfo, getMessagesForLLM, getMethodAliases, getMyLastMessage, getNumberProfile, getOrder, getParameterMetadata, getProcessStats, getProfilePicture, getSnapshot, getStarredMessages, getStatus, getStories, getUnsentMessages, getUserAgent, getVCards, getWAVersion, groupIdCodec, groupIdParam, healthCheck, hexColorCodec, imageDataParam, implementMethod, implementMethodAsync, includeMeParam, includeNotificationsParam, interactiveResponseEvent, isChatOnline, isPlugged, isoDatetimeToDate, joinGroupViaLink, jsonStringCodec, latitudeParam, leaveGroup, loadEarlierMessages, locationNameParam, logoutEvent, longitudeParam, markAsRead, markAsUnread, mentionedJidListParam, messageDeletedEvent, messageEvent, messageIdCodec, messageIdParam, messageIdsParam, messageOptionsParam, migrateV4Config, muteChat, nameParam, normalizeParameterKeys, onlyLocalParam, parameterRegistry, parseConfig, participantsChangedEvent, pinChat, postImageStatus, postTextStatus, postVideoStatus, promoteParticipant, react, reactionEvent, rejectGroupJoinRequest, removeLabel, removeParticipant, revokeGroupInviteLink, sendAdvancedButtons, sendAudio, sendBanner, sendButtons, sendContact, sendFile, sendFileFromUrl, sendImage, sendInteractive, sendLinkWithAutoPreview, sendListMessage, sendLocation, sendMessageWithThumb, sendMultipleContacts, sendPaymentRequest, sendPoll, sendPtt, sendRawMessage, sendReplyWithMentions, sendSeen, sendText, sendTextWithMentions, sendVCard, sendVideoAsGif, sendYouTubeLink, setChatEphemeral, setGroupDescription, setGroupEditToAdminsOnly, setGroupIcon, setGroupTitle, setGroupToAdminsOnly, setMyName, setMyStatus, setProfilePicture, skipMyMessagesParam, starMessage, stateChangedEvent, statusTextParam, stickerDataParam, toParam, unarchiveChat, unblockContact, unixMillisToDate, unixSecondsToDate, unmuteChat, unpinChat, unstarMessage, urlToDataUrlCodec, userAgentParam, validateConfig, videoDataParam, waitForIdParam, withNewMessagesOnlyParam, z, zObjectToTuple };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as defineMethod, c as getMethodAliases, d as parameterRegistry, f as z, i as defineEvent, l as getParameterMetadata, n as buildKeyAliasMap, o as defineMethodV2, p as zObjectToTuple, r as clientRegistry, s as deriveNamespacedMethodName, t as Registry, u as normalizeParameterKeys } from "./registry-
|
|
2
|
-
import { $ as
|
|
1
|
+
import { a as defineMethod, c as getMethodAliases, d as parameterRegistry, f as z, i as defineEvent, l as getParameterMetadata, n as buildKeyAliasMap, o as defineMethodV2, p as zObjectToTuple, r as clientRegistry, s as deriveNamespacedMethodName, t as Registry, u as normalizeParameterKeys } from "./registry-BIddXpin.mjs";
|
|
2
|
+
import { $ as deleteStatus, $n as includeMeParam, $r as IdSchema, $t as muteChat, A as getConnectionState, An as sendPaymentRequest, Ar as UnixMillisToDateSchema, At as setGroupIcon, B as healthCheck, Bn as starMessage, Br as fileToTempPathCodec, Bt as getNumberProfile, C as NativeActionSchema, Cn as sendFileFromUrl, Cr as FileToDataUrlSchema, Ct as leaveGroup, D as decryptMedia, Dn as sendLocation, Dr as IsoDatetimeToDateSchema, Dt as revokeGroupInviteLink, E as defineInteractiveMessage, En as sendListMessage, Er as HexColorSchema, Et as removeParticipant, F as getMe, Fn as sendText, Fr as createFileCodec, Ft as checkReadReceipts, G as getBusinessProducts, Gn as communityIdParam, Gr as messageIdCodec, Gt as deleteChat, H as setMyName, Hn as audioDataParam, Hr as hexColorCodec, Ht as unblockContact, I as getProcessStats, In as sendTextWithMentions, Ir as fileToBase64Codec, It as getAllContacts, J as addLabel, Jn as documentDataParam, Jr as urlToDataUrlCodec, Jt as getChat, K as getBusinessProfile, Kn as contactIdParam, Kr as unixMillisToDate, Kt as getAllChatIds, L as getSnapshot, Ln as sendVCard, Lr as fileToBufferCodec, Lt as getBlockedIds, M as getHostNumber, Mn as sendPtt, Mr as base64ToDataUrlCodec, Mt as setGroupToAdminsOnly, N as getLicenseType, Nn as sendReplyWithMentions, Nr as chatIdCodec, Nt as blockContact, O as downloadMedia, On as sendMessageWithThumb, Or as MessageIdCodecSchema, Ot as setGroupDescription, P as getLoadedMessageCount, Pn as sendSeen, Pr as contactIdCodec, Pt as checkNumberStatus, Q as deleteAllStatus, Qn as imageDataParam, Qr as GroupMetadataSchema, Qt as markAsUnread, R as getUserAgent, Rn as sendVideoAsGif, Rr as fileToDataUrlCodec, Rt as getCommonGroups, S as ListRowSchema, Sn as sendFile, Sr as ContactIdSchema, St as joinGroupViaLink, T as ReplyActionSchema, Tn as sendLinkWithAutoPreview, Tr as GroupIdSchema, Tt as rejectGroupJoinRequest, U as setMyStatus, Un as captionParam, Ur as isoDatetimeToDate, Ut as archiveChat, V as isPlugged, Vn as unstarMessage, Vr as groupIdCodec, Vt as getProfilePicture, W as setProfilePicture, Wn as chatIdParam, Wr as jsonStringCodec, Wt as clearChat, X as getChatsByLabel, Xn as filenameParam, Xr as ContactSchema, Xt as isChatOnline, Y as getAllLabels, Yn as fileDataParam, Yr as ChatSchema, Yt as getChatWithNonContacts, Z as removeLabel, Zn as groupIdParam, Zr as GroupChatIdSchema, Zt as markAsRead, _ as InteractiveResponseSchema, _n as sendAdvancedButtons, _r as withNewMessagesOnlyParam, _t as getGroupInfo, a as BookingContentSchema, ai as SimpleListener, an as deleteMessage, ar as messageIdParam, at as getAllCommunities, b as LinkActionSchema, bn as sendButtons, br as ChatIdSchema, bt as getGroupMembersId, c as CarouselCardSchema, cn as getMessageById, cr as nameParam, ct as getCommunityInfo, d as FormContentSchema, dn as getMyLastMessage, dr as statusTextParam, dt as addParticipant, ei as LocationSchema, en as pinChat, er as includeNotificationsParam, et as getStatus, f as FormQuestionSchema, fn as getStarredMessages, fr as stickerDataParam, ft as approveGroupJoinRequest, g as InteractiveHeaderSchema, gn as react, gr as waitForIdParam, gt as getGroupAdmins, h as InteractiveContentSchema, hn as loadEarlierMessages, hr as videoDataParam, ht as getAllGroups, i as sendRawMessage, ii as MessageTypes, in as unpinChat, ir as mentionedJidListParam, it as postVideoStatus, j as getFeatures, jn as sendPoll, jr as UnixSecondsToDateSchema, jt as setGroupTitle, k as getBatteryLevel, kn as sendMultipleContacts, kr as MessageIdSchema, kt as setGroupEditToAdminsOnly, l as CarouselContentSchema, ln as getMessageInfo, lr as onlyLocalParam, lt as getCommunityParticipantIds, m as InteractiveActionSchema, mn as getVCards, mr as userAgentParam, mt as demoteParticipant, n as SendRawMessageInputSchema, ni as MessageIdReturnSchema, nn as unarchiveChat, nr as locationNameParam, nt as postImageStatus, o as ButtonsContentSchema, on as forwardMessages, or as messageIdsParam, ot as getCommunityAdminIds, p as FormResponseSchema, pn as getUnsentMessages, pr as toParam, pt as createGroup, q as getOrder, qn as contentParam, qr as unixSecondsToDate, qt as getAllChats, r as sendInteractive, ri as MessageSchema, rn as unmuteChat, rr as longitudeParam, rt as postTextStatus, s as CallActionSchema, sn as getAllMessages, sr as messageOptionsParam, st as getCommunityAdmins, t as SendInteractiveInputSchema, ti as MessageAck, tn as setChatEphemeral, tr as latitudeParam, tt as getStories, u as CopyActionSchema, un as getMessagesForLLM, ur as skipMyMessagesParam, ut as getCommunityParticipants, v as JsonObjectSchema, vn as sendAudio, vr as Base64ToDataUrlSchema, vt as getGroupInviteLink, w as NativeContentSchema, wn as sendImage, wr as GroupIdCodecSchema, wt as promoteParticipant, x as ListContentSchema, xn as sendContact, xr as ContactIdCodecSchema, xt as getKickedGroups, y as JsonValueSchema, yn as sendBanner, yr as ChatIdCodecSchema, yt as getGroupMembers, z as getWAVersion, zn as sendYouTubeLink, zr as fileToStreamCodec, zt as getContact } from "./methods-BSv5O3bS.mjs";
|
|
3
3
|
import { implementMethod, implementMethodAsync } from "./implementor.mjs";
|
|
4
4
|
import { getHttpMethodDefinitions } from "./http-manifest.mjs";
|
|
5
5
|
import { z as z$1 } from "zod";
|
|
@@ -50,11 +50,13 @@ const eventRegistry = {
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
const QueueOptionsSchema = z$1.object({
|
|
53
|
-
concurrency: z$1.number().positive().optional(),
|
|
54
|
-
|
|
53
|
+
concurrency: z$1.number().int().positive().optional(),
|
|
54
|
+
capacity: z$1.number().int().positive().optional(),
|
|
55
|
+
overload: z$1.enum(["backpressure", "dropping"]).optional(),
|
|
56
|
+
ordering: z$1.literal("fifo").optional(),
|
|
57
|
+
intervalCap: z$1.number().int().positive().optional(),
|
|
55
58
|
interval: z$1.number().positive().optional(),
|
|
56
|
-
timeout: z$1.number().positive().optional()
|
|
57
|
-
priority: z$1.number().optional()
|
|
59
|
+
timeout: z$1.number().positive().optional()
|
|
58
60
|
}).optional();
|
|
59
61
|
function defineListenerV2(name, params) {
|
|
60
62
|
const legacyName = params.legacyName || `on${name.charAt(0).toUpperCase()}${name.slice(1)}`;
|
|
@@ -146,6 +148,28 @@ const reactionEvent = defineListenerV2("reaction", {
|
|
|
146
148
|
timestamp: z$1.number()
|
|
147
149
|
})
|
|
148
150
|
});
|
|
151
|
+
const interactiveResponseEvent = defineListenerV2("interactiveResponse", {
|
|
152
|
+
legacyName: "onInteractiveResponse",
|
|
153
|
+
meta: {
|
|
154
|
+
description: "Structured reply, list, form or native interactive response",
|
|
155
|
+
namespace: "messages",
|
|
156
|
+
status: "stable",
|
|
157
|
+
license: "insiders"
|
|
158
|
+
},
|
|
159
|
+
payload: InteractiveResponseSchema,
|
|
160
|
+
defaultQueueOptions: { concurrency: 1 }
|
|
161
|
+
});
|
|
162
|
+
const formResponseEvent = defineListenerV2("formResponse", {
|
|
163
|
+
legacyName: "onFormResponse",
|
|
164
|
+
meta: {
|
|
165
|
+
description: "A form submission with question IDs and chosen option IDs",
|
|
166
|
+
namespace: "messages",
|
|
167
|
+
status: "stable",
|
|
168
|
+
license: "insiders"
|
|
169
|
+
},
|
|
170
|
+
payload: FormResponseSchema,
|
|
171
|
+
defaultQueueOptions: { concurrency: 1 }
|
|
172
|
+
});
|
|
149
173
|
//#endregion
|
|
150
174
|
//#region src/events/state.ts
|
|
151
175
|
const StateEnum = z$1.enum([
|
|
@@ -294,6 +318,6 @@ const HttpMethodEnum = z$1.enum([
|
|
|
294
318
|
"HEAD"
|
|
295
319
|
]);
|
|
296
320
|
//#endregion
|
|
297
|
-
export { ActionEnum, Base64ToDataUrlSchema, CLOUD_PROVIDERS, ChatIdCodecSchema, ChatIdSchema, ChatSchema, ClientConfigSchema, CloudUploadOptionsSchema, ConfigSchema, ContactIdCodecSchema, ContactIdSchema, ContactSchema, DIRECTORY_STRATEGY, DevToolsSchema, FileToDataUrlSchema, FunctionalityEnum, GroupChatIdSchema, GroupIdCodecSchema, GroupIdSchema, GroupMetadataSchema, HexColorSchema, HttpMethodEnum, IdSchema, IsoDatetimeToDateSchema, LicenseEnum, LicenseType, LocationSchema, LoggingTransportSchema, MessageAck, MessageIdCodecSchema, MessageIdReturnSchema, MessageIdSchema, MessageSchema, MessageTypes, NotificationLanguage, OnError, PartialConfigSchema, ProxyServerCredentialsSchema, QRFormat, QueueOptionsSchema, Registry, S3SyncSchema, SessionDataSchema, SimpleListener, StateEnum, StrictConfigSchema, UnixMillisToDateSchema, UnixSecondsToDateSchema, ViewportSchema, ackEvent, addLabel, addParticipant, addedToGroupEvent, anyMessageEvent, approveGroupJoinRequest, archiveChat, audioDataParam, base64ToDataUrlCodec, blockContact, buildKeyAliasMap, captionParam, chatIdCodec, chatIdParam, chatStateEvent, checkNumberStatus, checkReadReceipts, clearChat, clientRegistry, communityIdParam, contactIdCodec, contactIdParam, contentParam, createFileCodec, createGroup, decryptMedia, defineEvent, defineListenerV2, defineMethod, defineMethodV2, deleteAllStatus, deleteChat, deleteMessage, deleteStatus, demoteParticipant, deriveNamespacedMethodName, documentDataParam, downloadMedia, eventRegistry, fileDataParam, fileToBase64Codec, fileToBufferCodec, fileToDataUrlCodec, fileToStreamCodec, fileToTempPathCodec, filenameParam, forwardMessages, getAllChatIds, getAllChats, getAllCommunities, getAllContacts, getAllGroups, getAllLabels, getAllMessages, getBatteryLevel, getBlockedIds, getBusinessProducts, getBusinessProfile, getChat, getChatWithNonContacts, getChatsByLabel, getCommonGroups, getCommunityAdminIds, getCommunityAdmins, getCommunityInfo, getCommunityParticipantIds, getCommunityParticipants, getConnectionState, getContact, getDefaultConfig, getFeatures, getGroupAdmins, getGroupInfo, getGroupInviteLink, getGroupMembers, getGroupMembersId, getHostNumber, getHttpMethodDefinitions, getKickedGroups, getLicenseType, getLoadedMessageCount, getMe, getMessageById, getMessageInfo, getMessagesForLLM, getMethodAliases, getMyLastMessage, getNumberProfile, getOrder, getParameterMetadata, getProcessStats, getProfilePicture, getSnapshot, getStarredMessages, getStatus, getStories, getUnsentMessages, getUserAgent, getVCards, getWAVersion, groupIdCodec, groupIdParam, healthCheck, hexColorCodec, imageDataParam, implementMethod, implementMethodAsync, includeMeParam, includeNotificationsParam, isChatOnline, isPlugged, isoDatetimeToDate, joinGroupViaLink, jsonStringCodec, latitudeParam, leaveGroup, loadEarlierMessages, locationNameParam, logoutEvent, longitudeParam, markAsRead, markAsUnread, mentionedJidListParam, messageDeletedEvent, messageEvent, messageIdCodec, messageIdParam, messageIdsParam, messageOptionsParam, migrateV4Config, muteChat, nameParam, normalizeParameterKeys, onlyLocalParam, parameterRegistry, parseConfig, participantsChangedEvent, pinChat, postImageStatus, postTextStatus, postVideoStatus, promoteParticipant, react, reactionEvent, rejectGroupJoinRequest, removeLabel, removeParticipant, revokeGroupInviteLink, sendAdvancedButtons, sendAudio, sendBanner, sendButtons, sendContact, sendFile, sendFileFromUrl, sendImage, sendLinkWithAutoPreview, sendListMessage, sendLocation, sendMessageWithThumb, sendMultipleContacts, sendPaymentRequest, sendPoll, sendPtt, sendReplyWithMentions, sendSeen, sendText, sendTextWithMentions, sendVCard, sendVideoAsGif, sendYouTubeLink, setChatEphemeral, setGroupDescription, setGroupEditToAdminsOnly, setGroupIcon, setGroupTitle, setGroupToAdminsOnly, setMyName, setMyStatus, setProfilePicture, skipMyMessagesParam, starMessage, stateChangedEvent, statusTextParam, stickerDataParam, toParam, unarchiveChat, unblockContact, unixMillisToDate, unixSecondsToDate, unmuteChat, unpinChat, unstarMessage, urlToDataUrlCodec, userAgentParam, validateConfig, videoDataParam, waitForIdParam, withNewMessagesOnlyParam, z, zObjectToTuple };
|
|
321
|
+
export { ActionEnum, Base64ToDataUrlSchema, BookingContentSchema, ButtonsContentSchema, CLOUD_PROVIDERS, CallActionSchema, CarouselCardSchema, CarouselContentSchema, ChatIdCodecSchema, ChatIdSchema, ChatSchema, ClientConfigSchema, CloudUploadOptionsSchema, ConfigSchema, ContactIdCodecSchema, ContactIdSchema, ContactSchema, CopyActionSchema, DIRECTORY_STRATEGY, DevToolsSchema, FileToDataUrlSchema, FormContentSchema, FormQuestionSchema, FormResponseSchema, FunctionalityEnum, GroupChatIdSchema, GroupIdCodecSchema, GroupIdSchema, GroupMetadataSchema, HexColorSchema, HttpMethodEnum, IdSchema, InteractiveActionSchema, InteractiveContentSchema, InteractiveHeaderSchema, InteractiveResponseSchema, IsoDatetimeToDateSchema, JsonObjectSchema, JsonValueSchema, LicenseEnum, LicenseType, LinkActionSchema, ListContentSchema, ListRowSchema, LocationSchema, LoggingTransportSchema, MessageAck, MessageIdCodecSchema, MessageIdReturnSchema, MessageIdSchema, MessageSchema, MessageTypes, NativeActionSchema, NativeContentSchema, NotificationLanguage, OnError, PartialConfigSchema, ProxyServerCredentialsSchema, QRFormat, QueueOptionsSchema, Registry, ReplyActionSchema, S3SyncSchema, SendInteractiveInputSchema, SendRawMessageInputSchema, SessionDataSchema, SimpleListener, StateEnum, StrictConfigSchema, UnixMillisToDateSchema, UnixSecondsToDateSchema, ViewportSchema, ackEvent, addLabel, addParticipant, addedToGroupEvent, anyMessageEvent, approveGroupJoinRequest, archiveChat, audioDataParam, base64ToDataUrlCodec, blockContact, buildKeyAliasMap, captionParam, chatIdCodec, chatIdParam, chatStateEvent, checkNumberStatus, checkReadReceipts, clearChat, clientRegistry, communityIdParam, contactIdCodec, contactIdParam, contentParam, createFileCodec, createGroup, decryptMedia, defineEvent, defineInteractiveMessage, defineListenerV2, defineMethod, defineMethodV2, deleteAllStatus, deleteChat, deleteMessage, deleteStatus, demoteParticipant, deriveNamespacedMethodName, documentDataParam, downloadMedia, eventRegistry, fileDataParam, fileToBase64Codec, fileToBufferCodec, fileToDataUrlCodec, fileToStreamCodec, fileToTempPathCodec, filenameParam, formResponseEvent, forwardMessages, getAllChatIds, getAllChats, getAllCommunities, getAllContacts, getAllGroups, getAllLabels, getAllMessages, getBatteryLevel, getBlockedIds, getBusinessProducts, getBusinessProfile, getChat, getChatWithNonContacts, getChatsByLabel, getCommonGroups, getCommunityAdminIds, getCommunityAdmins, getCommunityInfo, getCommunityParticipantIds, getCommunityParticipants, getConnectionState, getContact, getDefaultConfig, getFeatures, getGroupAdmins, getGroupInfo, getGroupInviteLink, getGroupMembers, getGroupMembersId, getHostNumber, getHttpMethodDefinitions, getKickedGroups, getLicenseType, getLoadedMessageCount, getMe, getMessageById, getMessageInfo, getMessagesForLLM, getMethodAliases, getMyLastMessage, getNumberProfile, getOrder, getParameterMetadata, getProcessStats, getProfilePicture, getSnapshot, getStarredMessages, getStatus, getStories, getUnsentMessages, getUserAgent, getVCards, getWAVersion, groupIdCodec, groupIdParam, healthCheck, hexColorCodec, imageDataParam, implementMethod, implementMethodAsync, includeMeParam, includeNotificationsParam, interactiveResponseEvent, isChatOnline, isPlugged, isoDatetimeToDate, joinGroupViaLink, jsonStringCodec, latitudeParam, leaveGroup, loadEarlierMessages, locationNameParam, logoutEvent, longitudeParam, markAsRead, markAsUnread, mentionedJidListParam, messageDeletedEvent, messageEvent, messageIdCodec, messageIdParam, messageIdsParam, messageOptionsParam, migrateV4Config, muteChat, nameParam, normalizeParameterKeys, onlyLocalParam, parameterRegistry, parseConfig, participantsChangedEvent, pinChat, postImageStatus, postTextStatus, postVideoStatus, promoteParticipant, react, reactionEvent, rejectGroupJoinRequest, removeLabel, removeParticipant, revokeGroupInviteLink, sendAdvancedButtons, sendAudio, sendBanner, sendButtons, sendContact, sendFile, sendFileFromUrl, sendImage, sendInteractive, sendLinkWithAutoPreview, sendListMessage, sendLocation, sendMessageWithThumb, sendMultipleContacts, sendPaymentRequest, sendPoll, sendPtt, sendRawMessage, sendReplyWithMentions, sendSeen, sendText, sendTextWithMentions, sendVCard, sendVideoAsGif, sendYouTubeLink, setChatEphemeral, setGroupDescription, setGroupEditToAdminsOnly, setGroupIcon, setGroupTitle, setGroupToAdminsOnly, setMyName, setMyStatus, setProfilePicture, skipMyMessagesParam, starMessage, stateChangedEvent, statusTextParam, stickerDataParam, toParam, unarchiveChat, unblockContact, unixMillisToDate, unixSecondsToDate, unmuteChat, unpinChat, unstarMessage, urlToDataUrlCodec, userAgentParam, validateConfig, videoDataParam, waitForIdParam, withNewMessagesOnlyParam, z, zObjectToTuple };
|
|
298
322
|
|
|
299
323
|
//# sourceMappingURL=index.mjs.map
|