@open-wa/schema 5.3.0 → 5.5.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.
Files changed (74) hide show
  1. package/dist/calling-media--BLrFrPc.cjs +113 -0
  2. package/dist/calling-media--BLrFrPc.cjs.map +1 -0
  3. package/dist/calling-media-BNTYvogE.mjs +60 -0
  4. package/dist/calling-media-BNTYvogE.mjs.map +1 -0
  5. package/dist/calling-media-CeGgSzhw.d.cts +48 -0
  6. package/dist/calling-media-CeGgSzhw.d.cts.map +1 -0
  7. package/dist/calling-media-CeGgSzhw.d.mts +48 -0
  8. package/dist/calling-media-CeGgSzhw.d.mts.map +1 -0
  9. package/dist/calling-media.cjs +8 -0
  10. package/dist/calling-media.d.cts +2 -0
  11. package/dist/calling-media.d.mts +2 -0
  12. package/dist/calling-media.mjs +2 -0
  13. package/dist/generated/index.cjs +94 -3
  14. package/dist/generated/index.cjs.map +1 -1
  15. package/dist/generated/index.d.cts +2328 -133
  16. package/dist/generated/index.d.cts.map +1 -1
  17. package/dist/generated/index.d.mts +2328 -133
  18. package/dist/generated/index.d.mts.map +1 -1
  19. package/dist/generated/index.mjs +94 -3
  20. package/dist/generated/index.mjs.map +1 -1
  21. package/dist/{index-C9Ad0lEr.d.cts → index-BWvNXopK.d.cts} +2375 -41
  22. package/dist/index-BWvNXopK.d.cts.map +1 -0
  23. package/dist/{index-D0QN2PaW.d.mts → index-Co8HQxm8.d.mts} +2375 -41
  24. package/dist/index-Co8HQxm8.d.mts.map +1 -0
  25. package/dist/index.cjs +191 -20
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +3 -2
  28. package/dist/index.d.mts +3 -2
  29. package/dist/index.mjs +105 -21
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/methods/index.cjs +34 -1
  32. package/dist/methods/index.d.cts +2 -2
  33. package/dist/methods/index.d.mts +2 -2
  34. package/dist/methods/index.mjs +2 -2
  35. package/dist/{methods-BhLsQNtL.mjs → methods-BH7nDC3z.mjs} +816 -51
  36. package/dist/methods-BH7nDC3z.mjs.map +1 -0
  37. package/dist/{methods-BGmdzjd3.cjs → methods-DpDzgsbe.cjs} +1284 -63
  38. package/dist/methods-DpDzgsbe.cjs.map +1 -0
  39. package/package.json +15 -4
  40. package/src/calling-media.ts +64 -0
  41. package/src/calling-wire.ts +17 -0
  42. package/src/calling.ts +61 -0
  43. package/src/common-types.ts +16 -0
  44. package/src/effect-projection.ts +67 -0
  45. package/src/events/calls.ts +12 -0
  46. package/src/events/groups.ts +30 -6
  47. package/src/events/index.ts +4 -0
  48. package/src/events/messaging.ts +7 -7
  49. package/src/events/polls.ts +11 -0
  50. package/src/events/registry.ts +2 -1
  51. package/src/events/whatsapp-events.ts +13 -0
  52. package/src/generated/AliasMap.ts +30 -1
  53. package/src/generated/BaseClient.ts +153 -8
  54. package/src/generated/BaseNamespacedClient.ts +36 -1
  55. package/src/generated/openapi.json +22999 -12765
  56. package/src/generated/types.ts +87 -0
  57. package/src/index.ts +10 -0
  58. package/src/license.ts +10 -0
  59. package/src/media-options.ts +46 -0
  60. package/src/methods/calls.ts +23 -0
  61. package/src/methods/contacts.ts +10 -1
  62. package/src/methods/groups.ts +9 -3
  63. package/src/methods/index.ts +2 -0
  64. package/src/methods/messaging.ts +159 -45
  65. package/src/methods/session.ts +10 -0
  66. package/src/methods/whatsapp-events.ts +35 -0
  67. package/src/polls.ts +37 -0
  68. package/src/session-refresh.ts +15 -0
  69. package/src/whatsapp-event-registry.ts +17 -0
  70. package/src/whatsapp-events.ts +91 -0
  71. package/dist/index-C9Ad0lEr.d.cts.map +0 -1
  72. package/dist/index-D0QN2PaW.d.mts.map +0 -1
  73. package/dist/methods-BGmdzjd3.cjs.map +0 -1
  74. package/dist/methods-BhLsQNtL.mjs.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,4 +1,5 @@
1
- import { $ as statusTextParam, $a as CloudUploadOptions, $i as LLMMessage, $n as getGroupInfo, $r as react, $t as QueueOptions, A as audioDataParam, Aa as GroupChatId, Ai as CartItemSchema, An as addLabel, Ar as getChat, At as hexColorCodec, B as imageDataParam, Ba as MessageAck, Bi as CommunityParticipantIdsSchema, Bn as postVideoStatus, Br as unpinChat, Bt as chatStateEvent, C as LinkActionSchema, Ca as ChatSchema, Ci as starMessage, Cn as isPlugged, Co as ViewportSchema, Cr as getProfilePicture, Ct as createFileCodec, D as NativeContentSchema, Da as Content, Di as BusinessProfile, Dn as getBusinessProducts, Dr as deleteChat, Dt as fileToStreamCodec, E as NativeActionSchema, Ea as ContactSchema, Ei as successResponseSchema, En as setProfilePicture, Eo as validateConfig, Er as clearChat, Et as fileToDataUrlCodec, F as contentParam, Fa as Id, Fi as CommunityAdmins, Fn as deleteStatus, Fr as muteChat, Ft as unixSecondsToDate, G as longitudeParam, Ga as MessageTypes, Gi as FeatureFlags, Gn as getCommunityParticipantIds, Gr as getMessageById, Gt as formResponseEvent, H as includeNotificationsParam, Ha as MessageIdReturn, Hi as CommunityParticipantsSchema, Hn as getCommunityAdminIds, Hr as deleteMessage, Ht as stateChangedEvent, I as documentDataParam, Ia as IdSchema, Ii as CommunityAdminsSchema, In as getStatus, Ir as pinChat, It as urlToDataUrlCodec, J as messageIdsParam, Ja as SimpleListener, Ji as GroupCreationResultSchema, Jn as approveGroupJoinRequest, Jr as getMyLastMessage, Jt as messageEvent, K as mentionedJidListParam, Ka as SerializedMessageId, Ki as FeatureFlagsSchema, Kn as getCommunityParticipants, Kr as getMessageInfo, Kt as interactiveResponseEvent, L as fileDataParam, La as Location, Li as CommunityMetadata, Ln as getStories, Lr as setChatEphemeral, Lt as addedToGroupEvent, M as chatIdParam, Ma as GroupId, Mi as CommonGroupSchema, Mn as getChatsByLabel, Mr as isChatOnline, Mt as jsonStringCodec, N as communityIdParam, Na as GroupMetadata, Ni as CommunityAdminIds, Nn as removeLabel, Nr as markAsRead, Nt as messageIdCodec, O as ReplyActionSchema, Oa as DataURL, Oi as BusinessProfileSchema, On as getBusinessProfile, Or as getAllChatIds, Ot as fileToTempPathCodec, P as contactIdParam, Pa as GroupMetadataSchema, Pi as CommunityAdminIdsSchema, Pn as deleteAllStatus, Pr as markAsUnread, Pt as unixMillisToDate, Q as skipMyMessagesParam, Qa as CLOUD_PROVIDERS, Qi as HostAccountSchema, Qn as getGroupAdmins, Qr as loadEarlierMessages, Qt as EventStatus, R as filenameParam, Ra as LocationSchema, Ri as CommunityMetadataSchema, Rn as postImageStatus, Rr as unarchiveChat, Rt as participantsChangedEvent, S as JsonValueSchema, Sa as ChatId, Si as sendYouTubeLink, Sn as healthCheck, So as Viewport, Sr as getNumberProfile, St as contactIdCodec, T as ListRowSchema, Ta as ContactId, Ti as outputJsonSchema, Tn as setMyStatus, To as parseConfig, Tr as archiveChat, Tt as fileToBufferCodec, U as latitudeParam, Ua as MessageIdReturnSchema, Ui as ContactStatus, Un as getCommunityAdmins, Ur as forwardMessages, Ut as ackEvent, V as includeMeParam, Va as MessageId, Vi as CommunityParticipants, Vn as getAllCommunities, Vr as SendTextResultSchema, Vt as logoutEvent, W as locationNameParam, Wa as MessageSchema, Wi as ContactStatusSchema, Wn as getCommunityInfo, Wr as getAllMessages, Wt as anyMessageEvent, X as nameParam, Xa as ClientConfigSchema, Xi as HealthCheckSchema, Xn as demoteParticipant, Xr as getUnsentMessages, Xt as EventDefinition, Y as messageOptionsParam, Ya as ClientConfig, Yi as HealthCheck, Yn as createGroup, Yr as getStarredMessages, Yt as reactionEvent, Z as onlyLocalParam, Za as migrateV4Config, Zi as HostAccount, Zn as getAllGroups, Zr as getVCards, Zt as EventMetadata, _ as InteractiveHeaderSchema, _a as ProductSchema, _i as sendSeen, _n as getMe, _o as S3SyncSchema, _r as checkReadReceipts, _t as MessageIdSchema, a as CarouselContentSchema, aa as MessageInfoSchema, ai as sendFile, an as SendInteractiveInputSchema, ao as DevTools, ar as leaveGroup, at as withNewMessagesOnlyParam, b as JsonObjectSchema, ba as Base64, bi as sendVCard, bn as getUserAgent, bo as StrictConfig, br as getCommonGroups, bt as base64ToDataUrlCodec, c as FormQuestion, ca as NumberCheck, ci as sendLinkWithAutoPreview, cn as sendRawMessage, co as LoggingTransportSchema, cr as removeParticipant, ct as ChatIdSchema, d as FormResponseSchema, da as NumberProfileSchema, di as sendMessageWithThumb, dn as getBatteryLevel, do as PartialConfig, dr as setGroupEditToAdminsOnly, dt as FileToDataUrlSchema, ea as LLMMessageSchema, ei as sendAdvancedButtons, en as QueueOptionsSchema, eo as CloudUploadOptionsSchema, er as getGroupInviteLink, et as stickerDataParam, f as InteractiveAction, fa as Order, fi as sendMultipleContacts, fn as getConnectionState, fo as PartialConfigSchema, fr as setGroupIcon, ft as GroupIdCodecSchema, g as InteractiveHeader, ga as Product, gi as sendReplyWithMentions, gn as getLoadedMessageCount, go as S3Sync, gr as checkNumberStatus, gt as MessageIdCodecSchema, h as InteractiveContentSchema, ha as ProcessStatsSchema, hi as sendPtt, hn as getLicenseType, ho as QRFormat, hr as blockContact, ht as IsoDatetimeToDateSchema, i as CarouselCardSchema, ia as MessageInfo, ii as sendContact, io as DeepPartialConfig, ir as joinGroupViaLink, it as waitForIdParam, j as captionParam, ja as GroupChatIdSchema, ji as CommonGroup, jn as getAllLabels, jr as getChatWithNonContacts, jt as isoDatetimeToDate, k as defineInteractiveMessage, ka as DataURLSchema, ki as CartItem, kn as getOrder, kr as getAllChats, kt as groupIdCodec, l as FormQuestionSchema, la as NumberCheckSchema, li as sendListMessage, ln as decryptMedia, lo as NotificationLanguage, lr as revokeGroupInviteLink, lt as ContactIdCodecSchema, m as InteractiveContent, ma as ProcessStats, mi as sendPoll, mn as getHostNumber, mo as ProxyServerCredentialsSchema, mr as setGroupToAdminsOnly, mt as HexColorSchema, n as ButtonsContentSchema, na as LabelSchema, ni as sendBanner, nn as defineListenerV2, no as ConfigSchema, nr as getGroupMembersId, nt as userAgentParam, o as CopyActionSchema, oa as MessageInteraction, oi as sendFileFromUrl, on as SendRawMessageInputSchema, oo as DevToolsSchema, or as promoteParticipant, ot as Base64ToDataUrlSchema, p as InteractiveActionSchema, pa as OrderSchema, pi as sendPaymentRequest, pn as getFeatures, po as ProxyServerCredentials, pr as setGroupTitle, pt as GroupIdSchema, q as messageIdParam, qa as SerializedMessageIdSchema, qi as GroupCreationResult, qn as addParticipant, qr as getMessagesForLLM, qt as messageDeletedEvent, r as CallActionSchema, ra as LicenseTypeSchema, ri as sendButtons, rn as eventRegistry, ro as DIRECTORY_STRATEGY, rr as getKickedGroups, rt as videoDataParam, s as FormContentSchema, sa as MessageInteractionSchema, si as sendImage, sn as sendInteractive, so as LoggingTransport, sr as rejectGroupJoinRequest, st as ChatIdCodecSchema, t as BookingContentSchema, ta as Label, ti as sendAudio, tn as QueueOverloadStrategy, to as Config, tr as getGroupMembers, tt as toParam, u as FormResponse, ua as NumberProfile, ui as sendLocation, un as downloadMedia, uo as OnError, ur as setGroupDescription, ut as ContactIdSchema, v as InteractiveResponse, va as Story, vi as sendText, vn as getProcessStats, vo as SessionData, vr as getAllContacts, vt as UnixMillisToDateSchema, w as ListContentSchema, wa as Contact, wi as unstarMessage, wn as setMyName, wo as getDefaultConfig, wr as unblockContact, wt as fileToBase64Codec, x as JsonValue, xa as Chat, xi as sendVideoAsGif, xn as getWAVersion, xo as StrictConfigSchema, xr as getContact, xt as chatIdCodec, y as InteractiveResponseSchema, ya as StorySchema, yi as sendTextWithMentions, yn as getSnapshot, yo as SessionDataSchema, yr as getBlockedIds, yt as UnixSecondsToDateSchema, z as groupIdParam, za as Message, zi as CommunityParticipantIds, zn as postTextStatus, zr as unmuteChat, zt as StateEnum } from "./index-C9Ad0lEr.cjs";
1
+ import { $ as Call, $a as react, $i as setGroupDescription, $n as whatsappEvent, $o as HealthCheck, $r as getFeatures, $s as ClientConfig, $t as groupIdParam, A as EventInputSchema, Aa as unmuteChat, Ac as validateConfig, Ai as getCommunityAdmins, An as MessageIdCodecSchema, Ao as successResponseSchema, Ar as getEventResponses, As as ContactSchema, At as InteractiveHeader, B as EventUpdateSchema, Ba as forwardMessages, Bi as getAllGroups, Bn as fileToDataUrlCodec, Bo as CommunityAdminsSchema, Br as observeCallAudio, Bs as IdSchema, Bt as NativeActionSchema, C as MediaSendOptions, Ca as isChatOnline, Cc as SessionDataSchema, Ci as getStatus, Cn as ContactIdCodecSchema, Co as sendVideoAsGif, Cr as QueueOverloadStrategy, Cs as StorySchema, Ct as FormQuestionSchema, D as VoiceNoteOptions, Da as pinChat, Dc as ViewportSchema, Di as postVideoStatus, Dn as GroupIdSchema, Do as unstarMessage, Dr as cancelEvent, Ds as ChatSchema, Dt as InteractiveActionSchema, E as VideoSendOptionsSchema, Ea as muteChat, Ec as Viewport, Ei as postTextStatus, En as GroupIdCodecSchema, Eo as unpinMessage, Es as ChatId, Et as InteractiveAction, F as EventResponse, Fa as AlbumSendResultSchema, Fi as GroupInfoSchema, Fn as chatIdCodec, Fo as CommonGroup, Fr as clearCallAudio, Fs as GroupChatIdSchema, Ft as JsonValue, G as deserializeEventResponse, Ga as getMessagesForLLM, Gi as getGroupMembersId, Gn as isoDatetimeToDate, Go as CommunityParticipants, Gr as SendInteractiveInputSchema, Gs as MessageId, Gt as captionParam, H as WhatsAppEventSchema, Ha as getAllMessages, Hi as getGroupInfo, Hn as fileToTempPathCodec, Ho as CommunityMetadataSchema, Hr as setCallMedia, Hs as LocationSchema, Ht as ReplyActionSchema, I as EventResponseSchema, Ia as SendTextResultSchema, Ii as addParticipant, In as contactIdCodec, Io as CommonGroupSchema, Ir as endCall, Is as GroupId, It as JsonValueSchema, J as serializeWhatsAppEvent, Ja as getStarredMessages, Ji as leaveGroup, Jn as unixMillisToDate, Jo as ContactStatusSchema, Jr as sendRawMessage, Js as MessageSchema, Jt as contactIdParam, K as deserializeWhatsAppEvent, Ka as getMyLastMessage, Ki as getKickedGroups, Kn as jsonStringCodec, Ko as CommunityParticipantsSchema, Kr as SendRawMessageInputSchema, Ks as MessageIdReturn, Kt as chatIdParam, L as EventResponseType, La as StickerJobSchema, Li as approveGroupJoinRequest, Ln as createFileCodec, Lo as CommunityAdminIds, Lr as getActiveCall, Ls as GroupMetadata, Lt as LinkActionSchema, M as EventListOptionsSchema, Ma as AlbumMedia, Mi as getCommunityParticipantIds, Mn as UnixMillisToDateSchema, Mo as BusinessProfileSchema, Mr as respondToEvent, Ms as DataURL, Mt as InteractiveResponse, N as EventPage, Na as AlbumMediaSchema, Ni as getCommunityParticipants, Nn as UnixSecondsToDateSchema, No as CartItem, Nr as sendEvent, Ns as DataURLSchema, Nt as InteractiveResponseSchema, O as VoiceNoteOptionsSchema, Oa as setChatEphemeral, Oc as getDefaultConfig, Oi as getAllCommunities, On as HexColorSchema, Oo as voteOnPoll, Or as editEvent, Os as Contact, Ot as InteractiveContent, P as EventPageSchema, Pa as AlbumSendResult, Pi as GroupInfo, Pn as base64ToDataUrlCodec, Po as CartItemSchema, Pr as acceptCall, Ps as GroupChatId, Pt as JsonObjectSchema, Q as LicenseFeaturesSchema, Qa as pinMessage, Qi as revokeGroupInviteLink, Qn as eventResponseEvent, Qo as GroupCreationResultSchema, Qr as getConnectionState, Qs as SimpleListener, Qt as filenameParam, R as EventResponseTypeSchema, Ra as deleteMessage, Ri as createGroup, Rn as fileToBase64Codec, Ro as CommunityAdminIdsSchema, Rr as getCallCapabilities, Rs as GroupMetadataSchema, Rt as ListContentSchema, S as ImageSendOptionsSchema, Sa as getChatWithNonContacts, Sc as SessionData, Si as deleteStatus, Sn as ChatIdSchema, So as sendVCard, Sr as QueueOptionsSchema, Ss as Story, St as FormQuestion, T as VideoSendOptions, Ta as markAsUnread, Tc as StrictConfigSchema, Ti as postImageStatus, Tn as FileToDataUrlSchema, To as starMessage, Tr as eventRegistry, Ts as Chat, Tt as FormResponseSchema, U as decodeEventResponse, Ua as getMessageById, Ui as getGroupInviteLink, Un as groupIdCodec, Uo as CommunityParticipantIds, Ur as startCall, Us as Message, Ut as defineInteractiveMessage, V as WhatsAppEvent, Va as getAlbumMessages, Vi as getGroupAdmins, Vn as fileToStreamCodec, Vo as CommunityMetadata, Vr as rejectCall, Vs as Location, Vt as NativeContentSchema, W as decodeWhatsAppEvent, Wa as getMessageInfo, Wi as getGroupMembers, Wn as hexColorCodec, Wo as CommunityParticipantIdsSchema, Wr as stopCallAudioObserver, Ws as MessageAck, Wt as audioDataParam, X as validateEventUpdate, Xa as getVCards, Xi as rejectGroupJoinRequest, Xn as urlToDataUrlCodec, Xo as FeatureFlagsSchema, Xr as downloadMedia, Xs as SerializedMessageId, Xt as documentDataParam, Y as validateEventInput, Ya as getUnsentMessages, Yi as promoteParticipant, Yn as unixSecondsToDate, Yo as FeatureFlags, Yr as decryptMedia, Ys as MessageTypes, Yt as contentParam, Z as LicenseFeatures, Za as loadEarlierMessages, Zi as removeParticipant, Zn as pollVoteEvent, Zo as GroupCreationResult, Zr as getBatteryLevel, Zs as SerializedMessageIdSchema, Zt as fileDataParam, _ as AutoMediaSendOptionsSchema, _a as clearChat, _c as ProxyServerCredentials, _i as addLabel, _n as videoDataParam, _o as sendReplyWithMentions, _r as reactionEvent, _s as OrderSchema, _t as CallActionSchema, a as PinDuration, aa as checkNumberStatus, ac as Config, ai as getProcessStats, an as longitudeParam, ao as sendContact, ar as addedToGroupEvent, as as Label, at as CallEndReason, b as GifSendOptionsSchema, ba as getAllChats, bc as S3Sync, bi as removeLabel, bn as Base64ToDataUrlSchema, bo as sendText, br as EventStatus, bs as Product, bt as CopyActionSchema, c as PollResultsSchema, ca as getBlockedIds, cc as DeepPartialConfig, ci as getWAVersion, cn as messageIdsParam, co as sendImage, cr as chatStateEvent, cs as MessageInfo, ct as CallIdentitySchema, d as PollVote, da as getNumberProfile, dc as LoggingTransport, di as setMyName, dn as onlyLocalParam, do as sendLocation, dr as ackEvent, ds as MessageInteractionSchema, dt as CallSnapshot, ea as setGroupEditToAdminsOnly, ec as ClientConfigSchema, ei as getHostNumber, en as imageDataParam, eo as sendAdvancedButtons, er as callStateEvent, es as HealthCheckSchema, et as CallActionResult, f as PollVoteSchema, fa as getProfilePicture, fc as LoggingTransportSchema, fi as setMyStatus, fn as skipMyMessagesParam, fo as sendMessageWithThumb, fr as anyMessageEvent, fs as NumberCheck, ft as CallSnapshotSchema, g as AudioSendOptionsSchema, ga as archiveChat, gc as PartialConfigSchema, gi as getOrder, gn as userAgentParam, go as sendPtt, gr as messageEvent, gs as Order, gt as ButtonsContentSchema, h as AudioSendOptions, ha as unblockContact, hc as PartialConfig, hi as getBusinessProfile, hn as toParam, ho as sendPoll, hr as messageDeletedEvent, hs as NumberProfileSchema, ht as BookingContentSchema, i as SessionRefreshSnapshot, ia as blockContact, ic as CloudUploadOptionsSchema, ii as getMe, in as locationNameParam, io as sendButtons, ir as ParticipantChangeSchema, is as LLMMessageSchema, it as CallCapabilitiesSchema, j as EventListOptions, ja as unpinChat, ji as getCommunityInfo, jn as MessageIdSchema, jo as BusinessProfile, jr as getEvents, js as Content, jt as InteractiveHeaderSchema, k as EventInput, ka as unarchiveChat, kc as parseConfig, ki as getCommunityAdminIds, kn as IsoDatetimeToDateSchema, ko as outputJsonSchema, kr as getEvent, ks as ContactId, kt as InteractiveContentSchema, l as PollSendOptions, la as getCommonGroups, lc as DevTools, li as healthCheck, ln as messageOptionsParam, lo as sendLinkWithAutoPreview, lr as logoutEvent, ls as MessageInfoSchema, lt as CallMediaOptionsSchema, m as AudioAttachmentOptionsSchema, ma as sharePhoneNumber, mc as OnError, mi as getBusinessProducts, mn as stickerDataParam, mo as sendPaymentRequest, mr as interactiveResponseEvent, ms as NumberProfile, mt as RawAudioFormatSchema, n as SessionRefreshPhase, na as setGroupTitle, nc as CLOUD_PROVIDERS, ni as getLicenseType, nn as includeNotificationsParam, no as sendAudio, nr as ParticipantChange, ns as HostAccountSchema, nt as CallAudioObserver, o as PinDurationSchema, oa as checkReadReceipts, oc as ConfigSchema, oi as getSnapshot, on as mentionedJidListParam, oo as sendFile, or as participantsChangedEvent, os as LabelSchema, ot as CallEndReasonSchema, p as AudioAttachmentOptions, pa as requestPhoneNumber, pc as NotificationLanguage, pi as setProfilePicture, pn as statusTextParam, po as sendMultipleContacts, pr as formResponseEvent, ps as NumberCheckSchema, pt as MediaDescriptorSchema, q as serializeEventResponse, qa as getPollResults, qi as joinGroupViaLink, qn as messageIdCodec, qo as ContactStatus, qr as sendInteractive, qs as MessageIdReturnSchema, qt as communityIdParam, r as SessionRefreshResult, ra as setGroupToAdminsOnly, rc as CloudUploadOptions, ri as getLoadedMessageCount, rn as latitudeParam, ro as sendBanner, rr as ParticipantChangePatchSchema, rs as LLMMessage, rt as CallCapabilities, s as PollResults, sa as getAllContacts, sc as DIRECTORY_STRATEGY, si as getUserAgent, sn as messageIdParam, so as sendFileFromUrl, sr as StateEnum, ss as LicenseTypeSchema, st as CallIdentity, t as SessionRefreshOptions, ta as setGroupIcon, tc as migrateV4Config, ti as getLicenseFeatures, tn as includeMeParam, to as sendAlbum, tr as incomingCallEvent, ts as HostAccount, tt as CallActionResultSchema, u as PollSendOptionsSchema, ua as getContact, uc as DevToolsSchema, ui as isPlugged, un as nameParam, uo as sendListMessage, ur as stateChangedEvent, us as MessageInteraction, ut as CallReasonSchema, v as DocumentSendOptionsSchema, va as deleteChat, vc as ProxyServerCredentialsSchema, vi as getAllLabels, vn as waitForIdParam, vo as sendSeen, vr as EventDefinition, vs as ProcessStats, vt as CarouselCardSchema, w as MediaSendOptionsSchema, wa as markAsRead, wc as StrictConfig, wi as getStories, wn as ContactIdSchema, wo as sendYouTubeLink, wr as defineListenerV2, ws as Base64, wt as FormResponse, x as ImageSendOptions, xa as getChat, xc as S3SyncSchema, xi as deleteAllStatus, xn as ChatIdCodecSchema, xo as sendTextWithMentions, xr as QueueOptions, xs as ProductSchema, xt as FormContentSchema, y as GifSendOptions, ya as getAllChatIds, yc as QRFormat, yi as getChatsByLabel, yn as withNewMessagesOnlyParam, yo as sendSticker, yr as EventMetadata, ys as ProcessStatsSchema, yt as CarouselContentSchema, z as EventUpdate, za as editMessage, zi as demoteParticipant, zn as fileToBufferCodec, zo as CommunityAdmins, zr as muteCall, zs as Id, zt as ListRowSchema } from "./index-BWvNXopK.cjs";
2
+ import { a as DEFAULT_CAM, c as MediaDescriptor, d as describeCallMediaFailure, f as normalizeCallMedia, g as encodeAudioPacket, h as decodeAudioPacket, i as CallingOptions, l as RawAudioFormat, m as AUDIO_WIRE_VERSION, n as AudioOutput, o as DEFAULT_MIC, p as AUDIO_FRAME_HEADER_BYTES, r as CallMediaOptions, s as DEFAULT_SPEAKER, t as AudioInput, u as VideoInput } from "./calling-media-CeGgSzhw.cjs";
2
3
  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
4
  import { n as implementMethodAsync, t as implementMethod } from "./implementor-ACLHTHby.cjs";
4
- export { ActionEnum, ActionType, AliasMetadata, Base64, Base64ToDataUrlSchema, BookingContentSchema, BusinessProfile, BusinessProfileSchema, ButtonsContentSchema, CLOUD_PROVIDERS, CallActionSchema, CapabilityDefinition, CapabilityMetadata, CapabilityStatus, CapabilityType, CarouselCardSchema, CarouselContentSchema, CartItem, CartItemSchema, Chat, ChatId, ChatIdCodecSchema, ChatIdSchema, ChatSchema, type ClientConfig, ClientConfigSchema, ClientFunctionMetadata, type CloudUploadOptions, CloudUploadOptionsSchema, CommonGroup, CommonGroupSchema, CommunityAdminIds, CommunityAdminIdsSchema, CommunityAdmins, CommunityAdminsSchema, CommunityMetadata, CommunityMetadataSchema, CommunityParticipantIds, CommunityParticipantIdsSchema, CommunityParticipants, CommunityParticipantsSchema, type Config, ConfigSchema, Contact, ContactId, ContactIdCodecSchema, ContactIdSchema, ContactSchema, ContactStatus, ContactStatusSchema, Content, CopyActionSchema, DIRECTORY_STRATEGY, DataURL, DataURLSchema, type DeepPartialConfig, type DevTools, DevToolsSchema, EventDefinition, EventMetadata, EventStatus, FeatureFlags, FeatureFlagsSchema, FileToDataUrlSchema, FormContentSchema, FormQuestion, FormQuestionSchema, FormResponse, FormResponseSchema, FunctionalityEnum, FunctionalityScope, GroupChatId, GroupChatIdSchema, GroupCreationResult, GroupCreationResultSchema, GroupId, GroupIdCodecSchema, GroupIdSchema, GroupMetadata, GroupMetadataSchema, HealthCheck, HealthCheckSchema, HexColorSchema, HostAccount, HostAccountSchema, HttpMethod, HttpMethodDefinition, HttpMethodEnum, HttpRouteAlias, Id, IdSchema, InferInput, InferOutput, InteractiveAction, InteractiveActionSchema, InteractiveContent, InteractiveContentSchema, InteractiveHeader, InteractiveHeaderSchema, InteractiveResponse, InteractiveResponseSchema, IsoDatetimeToDateSchema, JsonObjectSchema, JsonValue, JsonValueSchema, LLMMessage, LLMMessageSchema, Label, LabelSchema, LicenseEnum, LicenseTier, LicenseTypeSchema, LinkActionSchema, ListContentSchema, ListRowSchema, Location, LocationSchema, type LoggingTransport, LoggingTransportSchema, Message, MessageAck, MessageId, MessageIdCodecSchema, MessageIdReturn, MessageIdReturnSchema, MessageIdSchema, MessageInfo, MessageInfoSchema, MessageInteraction, MessageInteractionSchema, MessageSchema, MessageTypes, MethodDefinition, NativeActionSchema, NativeContentSchema, NotificationLanguage, NumberCheck, NumberCheckSchema, NumberProfile, NumberProfileSchema, OnError, OpenWAMethodSchema, Order, OrderSchema, ParameterMetadata, type PartialConfig, PartialConfigSchema, ProcessStats, ProcessStatsSchema, Product, ProductSchema, type ProxyServerCredentials, ProxyServerCredentialsSchema, QRFormat, QueueOptions, QueueOptionsSchema, QueueOverloadStrategy, Registry, ReplyActionSchema, type S3Sync, S3SyncSchema, SendInteractiveInputSchema, SendRawMessageInputSchema, SendTextResultSchema, SerializedMessageId, SerializedMessageIdSchema, type SessionData, SessionDataSchema, SimpleListener, StateEnum, Story, StorySchema, 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, outputJsonSchema, 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, successResponseSchema, toParam, unarchiveChat, unblockContact, unixMillisToDate, unixSecondsToDate, unmuteChat, unpinChat, unstarMessage, urlToDataUrlCodec, userAgentParam, validateConfig, videoDataParam, waitForIdParam, withNewMessagesOnlyParam, z, zObjectToTuple };
5
+ export { AUDIO_FRAME_HEADER_BYTES, AUDIO_WIRE_VERSION, ActionEnum, ActionType, AlbumMedia, AlbumMediaSchema, AlbumSendResult, AlbumSendResultSchema, AliasMetadata, AudioAttachmentOptions, AudioAttachmentOptionsSchema, AudioInput, AudioOutput, AudioSendOptions, AudioSendOptionsSchema, AutoMediaSendOptionsSchema, Base64, Base64ToDataUrlSchema, BookingContentSchema, BusinessProfile, BusinessProfileSchema, ButtonsContentSchema, CLOUD_PROVIDERS, Call, CallActionResult, CallActionResultSchema, CallActionSchema, CallAudioObserver, CallCapabilities, CallCapabilitiesSchema, CallEndReason, CallEndReasonSchema, CallIdentity, CallIdentitySchema, CallMediaOptions, CallMediaOptionsSchema, CallReasonSchema, CallSnapshot, CallSnapshotSchema, CallingOptions, CapabilityDefinition, CapabilityMetadata, CapabilityStatus, CapabilityType, CarouselCardSchema, CarouselContentSchema, CartItem, CartItemSchema, Chat, ChatId, ChatIdCodecSchema, ChatIdSchema, ChatSchema, type ClientConfig, ClientConfigSchema, ClientFunctionMetadata, type CloudUploadOptions, CloudUploadOptionsSchema, CommonGroup, CommonGroupSchema, CommunityAdminIds, CommunityAdminIdsSchema, CommunityAdmins, CommunityAdminsSchema, CommunityMetadata, CommunityMetadataSchema, CommunityParticipantIds, CommunityParticipantIdsSchema, CommunityParticipants, CommunityParticipantsSchema, type Config, ConfigSchema, Contact, ContactId, ContactIdCodecSchema, ContactIdSchema, ContactSchema, ContactStatus, ContactStatusSchema, Content, CopyActionSchema, DEFAULT_CAM, DEFAULT_MIC, DEFAULT_SPEAKER, DIRECTORY_STRATEGY, DataURL, DataURLSchema, type DeepPartialConfig, type DevTools, DevToolsSchema, DocumentSendOptionsSchema, EventDefinition, EventInput, EventInputSchema, EventListOptions, EventListOptionsSchema, EventMetadata, EventPage, EventPageSchema, EventResponse, EventResponseSchema, EventResponseType, EventResponseTypeSchema, EventStatus, EventUpdate, EventUpdateSchema, FeatureFlags, FeatureFlagsSchema, FileToDataUrlSchema, FormContentSchema, FormQuestion, FormQuestionSchema, FormResponse, FormResponseSchema, FunctionalityEnum, FunctionalityScope, GifSendOptions, GifSendOptionsSchema, GroupChatId, GroupChatIdSchema, GroupCreationResult, GroupCreationResultSchema, GroupId, GroupIdCodecSchema, GroupIdSchema, GroupInfo, GroupInfoSchema, GroupMetadata, GroupMetadataSchema, HealthCheck, HealthCheckSchema, HexColorSchema, HostAccount, HostAccountSchema, HttpMethod, HttpMethodDefinition, HttpMethodEnum, HttpRouteAlias, Id, IdSchema, ImageSendOptions, ImageSendOptionsSchema, InferInput, InferOutput, InteractiveAction, InteractiveActionSchema, InteractiveContent, InteractiveContentSchema, InteractiveHeader, InteractiveHeaderSchema, InteractiveResponse, InteractiveResponseSchema, IsoDatetimeToDateSchema, JsonObjectSchema, JsonValue, JsonValueSchema, LLMMessage, LLMMessageSchema, Label, LabelSchema, LicenseEnum, LicenseFeatures, LicenseFeaturesSchema, LicenseTier, LicenseTypeSchema, LinkActionSchema, ListContentSchema, ListRowSchema, Location, LocationSchema, type LoggingTransport, LoggingTransportSchema, MediaDescriptor, MediaDescriptorSchema, MediaSendOptions, MediaSendOptionsSchema, Message, MessageAck, MessageId, MessageIdCodecSchema, MessageIdReturn, MessageIdReturnSchema, MessageIdSchema, MessageInfo, MessageInfoSchema, MessageInteraction, MessageInteractionSchema, MessageSchema, MessageTypes, MethodDefinition, NativeActionSchema, NativeContentSchema, NotificationLanguage, NumberCheck, NumberCheckSchema, NumberProfile, NumberProfileSchema, OnError, OpenWAMethodSchema, Order, OrderSchema, ParameterMetadata, type PartialConfig, PartialConfigSchema, ParticipantChange, ParticipantChangePatchSchema, ParticipantChangeSchema, PinDuration, PinDurationSchema, PollResults, PollResultsSchema, PollSendOptions, PollSendOptionsSchema, PollVote, PollVoteSchema, ProcessStats, ProcessStatsSchema, Product, ProductSchema, type ProxyServerCredentials, ProxyServerCredentialsSchema, QRFormat, QueueOptions, QueueOptionsSchema, QueueOverloadStrategy, RawAudioFormat, RawAudioFormatSchema, Registry, ReplyActionSchema, type S3Sync, S3SyncSchema, SendInteractiveInputSchema, SendRawMessageInputSchema, SendTextResultSchema, SerializedMessageId, SerializedMessageIdSchema, type SessionData, SessionDataSchema, SessionRefreshOptions, SessionRefreshPhase, SessionRefreshResult, SessionRefreshSnapshot, SimpleListener, StateEnum, StickerJobSchema, Story, StorySchema, type StrictConfig, StrictConfigSchema, UnixMillisToDateSchema, UnixSecondsToDateSchema, VideoInput, VideoSendOptions, VideoSendOptionsSchema, type Viewport, ViewportSchema, VoiceNoteOptions, VoiceNoteOptionsSchema, WhatsAppEvent, WhatsAppEventSchema, acceptCall, ackEvent, addLabel, addParticipant, addedToGroupEvent, anyMessageEvent, approveGroupJoinRequest, archiveChat, audioDataParam, base64ToDataUrlCodec, blockContact, buildKeyAliasMap, callStateEvent, cancelEvent, captionParam, chatIdCodec, chatIdParam, chatStateEvent, checkNumberStatus, checkReadReceipts, clearCallAudio, clearChat, clientRegistry, communityIdParam, contactIdCodec, contactIdParam, contentParam, createFileCodec, createGroup, decodeAudioPacket, decodeEventResponse, decodeWhatsAppEvent, decryptMedia, defineEvent, defineInteractiveMessage, defineListenerV2, defineMethod, defineMethodV2, deleteAllStatus, deleteChat, deleteMessage, deleteStatus, demoteParticipant, deriveNamespacedMethodName, describeCallMediaFailure, deserializeEventResponse, deserializeWhatsAppEvent, documentDataParam, downloadMedia, editEvent, editMessage, encodeAudioPacket, endCall, eventRegistry, eventResponseEvent, fileDataParam, fileToBase64Codec, fileToBufferCodec, fileToDataUrlCodec, fileToStreamCodec, fileToTempPathCodec, filenameParam, formResponseEvent, forwardMessages, getActiveCall, getAlbumMessages, getAllChatIds, getAllChats, getAllCommunities, getAllContacts, getAllGroups, getAllLabels, getAllMessages, getBatteryLevel, getBlockedIds, getBusinessProducts, getBusinessProfile, getCallCapabilities, getChat, getChatWithNonContacts, getChatsByLabel, getCommonGroups, getCommunityAdminIds, getCommunityAdmins, getCommunityInfo, getCommunityParticipantIds, getCommunityParticipants, getConnectionState, getContact, getDefaultConfig, getEvent, getEventResponses, getEvents, getFeatures, getGroupAdmins, getGroupInfo, getGroupInviteLink, getGroupMembers, getGroupMembersId, getHostNumber, getHttpMethodDefinitions, getKickedGroups, getLicenseFeatures, getLicenseType, getLoadedMessageCount, getMe, getMessageById, getMessageInfo, getMessagesForLLM, getMethodAliases, getMyLastMessage, getNumberProfile, getOrder, getParameterMetadata, getPollResults, getProcessStats, getProfilePicture, getSnapshot, getStarredMessages, getStatus, getStories, getUnsentMessages, getUserAgent, getVCards, getWAVersion, groupIdCodec, groupIdParam, healthCheck, hexColorCodec, imageDataParam, implementMethod, implementMethodAsync, includeMeParam, includeNotificationsParam, incomingCallEvent, interactiveResponseEvent, isChatOnline, isPlugged, isoDatetimeToDate, joinGroupViaLink, jsonStringCodec, latitudeParam, leaveGroup, loadEarlierMessages, locationNameParam, logoutEvent, longitudeParam, markAsRead, markAsUnread, mentionedJidListParam, messageDeletedEvent, messageEvent, messageIdCodec, messageIdParam, messageIdsParam, messageOptionsParam, migrateV4Config, muteCall, muteChat, nameParam, normalizeCallMedia, normalizeParameterKeys, observeCallAudio, onlyLocalParam, outputJsonSchema, parameterRegistry, parseConfig, participantsChangedEvent, pinChat, pinMessage, pollVoteEvent, postImageStatus, postTextStatus, postVideoStatus, promoteParticipant, react, reactionEvent, rejectCall, rejectGroupJoinRequest, removeLabel, removeParticipant, requestPhoneNumber, respondToEvent, revokeGroupInviteLink, sendAdvancedButtons, sendAlbum, sendAudio, sendBanner, sendButtons, sendContact, sendEvent, sendFile, sendFileFromUrl, sendImage, sendInteractive, sendLinkWithAutoPreview, sendListMessage, sendLocation, sendMessageWithThumb, sendMultipleContacts, sendPaymentRequest, sendPoll, sendPtt, sendRawMessage, sendReplyWithMentions, sendSeen, sendSticker, sendText, sendTextWithMentions, sendVCard, sendVideoAsGif, sendYouTubeLink, serializeEventResponse, serializeWhatsAppEvent, setCallMedia, setChatEphemeral, setGroupDescription, setGroupEditToAdminsOnly, setGroupIcon, setGroupTitle, setGroupToAdminsOnly, setMyName, setMyStatus, setProfilePicture, sharePhoneNumber, skipMyMessagesParam, starMessage, startCall, stateChangedEvent, statusTextParam, stickerDataParam, stopCallAudioObserver, successResponseSchema, toParam, unarchiveChat, unblockContact, unixMillisToDate, unixSecondsToDate, unmuteChat, unpinChat, unpinMessage, unstarMessage, urlToDataUrlCodec, userAgentParam, validateConfig, validateEventInput, validateEventUpdate, videoDataParam, voteOnPoll, waitForIdParam, whatsappEvent, withNewMessagesOnlyParam, z, zObjectToTuple };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
- import { $ as statusTextParam, $a as CloudUploadOptions, $i as LLMMessage, $n as getGroupInfo, $r as react, $t as QueueOptions, A as audioDataParam, Aa as GroupChatId, Ai as CartItemSchema, An as addLabel, Ar as getChat, At as hexColorCodec, B as imageDataParam, Ba as MessageAck, Bi as CommunityParticipantIdsSchema, Bn as postVideoStatus, Br as unpinChat, Bt as chatStateEvent, C as LinkActionSchema, Ca as ChatSchema, Ci as starMessage, Cn as isPlugged, Co as ViewportSchema, Cr as getProfilePicture, Ct as createFileCodec, D as NativeContentSchema, Da as Content, Di as BusinessProfile, Dn as getBusinessProducts, Dr as deleteChat, Dt as fileToStreamCodec, E as NativeActionSchema, Ea as ContactSchema, Ei as successResponseSchema, En as setProfilePicture, Eo as validateConfig, Er as clearChat, Et as fileToDataUrlCodec, F as contentParam, Fa as Id, Fi as CommunityAdmins, Fn as deleteStatus, Fr as muteChat, Ft as unixSecondsToDate, G as longitudeParam, Ga as MessageTypes, Gi as FeatureFlags, Gn as getCommunityParticipantIds, Gr as getMessageById, Gt as formResponseEvent, H as includeNotificationsParam, Ha as MessageIdReturn, Hi as CommunityParticipantsSchema, Hn as getCommunityAdminIds, Hr as deleteMessage, Ht as stateChangedEvent, I as documentDataParam, Ia as IdSchema, Ii as CommunityAdminsSchema, In as getStatus, Ir as pinChat, It as urlToDataUrlCodec, J as messageIdsParam, Ja as SimpleListener, Ji as GroupCreationResultSchema, Jn as approveGroupJoinRequest, Jr as getMyLastMessage, Jt as messageEvent, K as mentionedJidListParam, Ka as SerializedMessageId, Ki as FeatureFlagsSchema, Kn as getCommunityParticipants, Kr as getMessageInfo, Kt as interactiveResponseEvent, L as fileDataParam, La as Location, Li as CommunityMetadata, Ln as getStories, Lr as setChatEphemeral, Lt as addedToGroupEvent, M as chatIdParam, Ma as GroupId, Mi as CommonGroupSchema, Mn as getChatsByLabel, Mr as isChatOnline, Mt as jsonStringCodec, N as communityIdParam, Na as GroupMetadata, Ni as CommunityAdminIds, Nn as removeLabel, Nr as markAsRead, Nt as messageIdCodec, O as ReplyActionSchema, Oa as DataURL, Oi as BusinessProfileSchema, On as getBusinessProfile, Or as getAllChatIds, Ot as fileToTempPathCodec, P as contactIdParam, Pa as GroupMetadataSchema, Pi as CommunityAdminIdsSchema, Pn as deleteAllStatus, Pr as markAsUnread, Pt as unixMillisToDate, Q as skipMyMessagesParam, Qa as CLOUD_PROVIDERS, Qi as HostAccountSchema, Qn as getGroupAdmins, Qr as loadEarlierMessages, Qt as EventStatus, R as filenameParam, Ra as LocationSchema, Ri as CommunityMetadataSchema, Rn as postImageStatus, Rr as unarchiveChat, Rt as participantsChangedEvent, S as JsonValueSchema, Sa as ChatId, Si as sendYouTubeLink, Sn as healthCheck, So as Viewport, Sr as getNumberProfile, St as contactIdCodec, T as ListRowSchema, Ta as ContactId, Ti as outputJsonSchema, Tn as setMyStatus, To as parseConfig, Tr as archiveChat, Tt as fileToBufferCodec, U as latitudeParam, Ua as MessageIdReturnSchema, Ui as ContactStatus, Un as getCommunityAdmins, Ur as forwardMessages, Ut as ackEvent, V as includeMeParam, Va as MessageId, Vi as CommunityParticipants, Vn as getAllCommunities, Vr as SendTextResultSchema, Vt as logoutEvent, W as locationNameParam, Wa as MessageSchema, Wi as ContactStatusSchema, Wn as getCommunityInfo, Wr as getAllMessages, Wt as anyMessageEvent, X as nameParam, Xa as ClientConfigSchema, Xi as HealthCheckSchema, Xn as demoteParticipant, Xr as getUnsentMessages, Xt as EventDefinition, Y as messageOptionsParam, Ya as ClientConfig, Yi as HealthCheck, Yn as createGroup, Yr as getStarredMessages, Yt as reactionEvent, Z as onlyLocalParam, Za as migrateV4Config, Zi as HostAccount, Zn as getAllGroups, Zr as getVCards, Zt as EventMetadata, _ as InteractiveHeaderSchema, _a as ProductSchema, _i as sendSeen, _n as getMe, _o as S3SyncSchema, _r as checkReadReceipts, _t as MessageIdSchema, a as CarouselContentSchema, aa as MessageInfoSchema, ai as sendFile, an as SendInteractiveInputSchema, ao as DevTools, ar as leaveGroup, at as withNewMessagesOnlyParam, b as JsonObjectSchema, ba as Base64, bi as sendVCard, bn as getUserAgent, bo as StrictConfig, br as getCommonGroups, bt as base64ToDataUrlCodec, c as FormQuestion, ca as NumberCheck, ci as sendLinkWithAutoPreview, cn as sendRawMessage, co as LoggingTransportSchema, cr as removeParticipant, ct as ChatIdSchema, d as FormResponseSchema, da as NumberProfileSchema, di as sendMessageWithThumb, dn as getBatteryLevel, do as PartialConfig, dr as setGroupEditToAdminsOnly, dt as FileToDataUrlSchema, ea as LLMMessageSchema, ei as sendAdvancedButtons, en as QueueOptionsSchema, eo as CloudUploadOptionsSchema, er as getGroupInviteLink, et as stickerDataParam, f as InteractiveAction, fa as Order, fi as sendMultipleContacts, fn as getConnectionState, fo as PartialConfigSchema, fr as setGroupIcon, ft as GroupIdCodecSchema, g as InteractiveHeader, ga as Product, gi as sendReplyWithMentions, gn as getLoadedMessageCount, go as S3Sync, gr as checkNumberStatus, gt as MessageIdCodecSchema, h as InteractiveContentSchema, ha as ProcessStatsSchema, hi as sendPtt, hn as getLicenseType, ho as QRFormat, hr as blockContact, ht as IsoDatetimeToDateSchema, i as CarouselCardSchema, ia as MessageInfo, ii as sendContact, io as DeepPartialConfig, ir as joinGroupViaLink, it as waitForIdParam, j as captionParam, ja as GroupChatIdSchema, ji as CommonGroup, jn as getAllLabels, jr as getChatWithNonContacts, jt as isoDatetimeToDate, k as defineInteractiveMessage, ka as DataURLSchema, ki as CartItem, kn as getOrder, kr as getAllChats, kt as groupIdCodec, l as FormQuestionSchema, la as NumberCheckSchema, li as sendListMessage, ln as decryptMedia, lo as NotificationLanguage, lr as revokeGroupInviteLink, lt as ContactIdCodecSchema, m as InteractiveContent, ma as ProcessStats, mi as sendPoll, mn as getHostNumber, mo as ProxyServerCredentialsSchema, mr as setGroupToAdminsOnly, mt as HexColorSchema, n as ButtonsContentSchema, na as LabelSchema, ni as sendBanner, nn as defineListenerV2, no as ConfigSchema, nr as getGroupMembersId, nt as userAgentParam, o as CopyActionSchema, oa as MessageInteraction, oi as sendFileFromUrl, on as SendRawMessageInputSchema, oo as DevToolsSchema, or as promoteParticipant, ot as Base64ToDataUrlSchema, p as InteractiveActionSchema, pa as OrderSchema, pi as sendPaymentRequest, pn as getFeatures, po as ProxyServerCredentials, pr as setGroupTitle, pt as GroupIdSchema, q as messageIdParam, qa as SerializedMessageIdSchema, qi as GroupCreationResult, qn as addParticipant, qr as getMessagesForLLM, qt as messageDeletedEvent, r as CallActionSchema, ra as LicenseTypeSchema, ri as sendButtons, rn as eventRegistry, ro as DIRECTORY_STRATEGY, rr as getKickedGroups, rt as videoDataParam, s as FormContentSchema, sa as MessageInteractionSchema, si as sendImage, sn as sendInteractive, so as LoggingTransport, sr as rejectGroupJoinRequest, st as ChatIdCodecSchema, t as BookingContentSchema, ta as Label, ti as sendAudio, tn as QueueOverloadStrategy, to as Config, tr as getGroupMembers, tt as toParam, u as FormResponse, ua as NumberProfile, ui as sendLocation, un as downloadMedia, uo as OnError, ur as setGroupDescription, ut as ContactIdSchema, v as InteractiveResponse, va as Story, vi as sendText, vn as getProcessStats, vo as SessionData, vr as getAllContacts, vt as UnixMillisToDateSchema, w as ListContentSchema, wa as Contact, wi as unstarMessage, wn as setMyName, wo as getDefaultConfig, wr as unblockContact, wt as fileToBase64Codec, x as JsonValue, xa as Chat, xi as sendVideoAsGif, xn as getWAVersion, xo as StrictConfigSchema, xr as getContact, xt as chatIdCodec, y as InteractiveResponseSchema, ya as StorySchema, yi as sendTextWithMentions, yn as getSnapshot, yo as SessionDataSchema, yr as getBlockedIds, yt as UnixSecondsToDateSchema, z as groupIdParam, za as Message, zi as CommunityParticipantIds, zn as postTextStatus, zr as unmuteChat, zt as StateEnum } from "./index-D0QN2PaW.mjs";
1
+ import { $ as Call, $a as react, $i as setGroupDescription, $n as whatsappEvent, $o as HealthCheck, $r as getFeatures, $s as ClientConfig, $t as groupIdParam, A as EventInputSchema, Aa as unmuteChat, Ac as validateConfig, Ai as getCommunityAdmins, An as MessageIdCodecSchema, Ao as successResponseSchema, Ar as getEventResponses, As as ContactSchema, At as InteractiveHeader, B as EventUpdateSchema, Ba as forwardMessages, Bi as getAllGroups, Bn as fileToDataUrlCodec, Bo as CommunityAdminsSchema, Br as observeCallAudio, Bs as IdSchema, Bt as NativeActionSchema, C as MediaSendOptions, Ca as isChatOnline, Cc as SessionDataSchema, Ci as getStatus, Cn as ContactIdCodecSchema, Co as sendVideoAsGif, Cr as QueueOverloadStrategy, Cs as StorySchema, Ct as FormQuestionSchema, D as VoiceNoteOptions, Da as pinChat, Dc as ViewportSchema, Di as postVideoStatus, Dn as GroupIdSchema, Do as unstarMessage, Dr as cancelEvent, Ds as ChatSchema, Dt as InteractiveActionSchema, E as VideoSendOptionsSchema, Ea as muteChat, Ec as Viewport, Ei as postTextStatus, En as GroupIdCodecSchema, Eo as unpinMessage, Es as ChatId, Et as InteractiveAction, F as EventResponse, Fa as AlbumSendResultSchema, Fi as GroupInfoSchema, Fn as chatIdCodec, Fo as CommonGroup, Fr as clearCallAudio, Fs as GroupChatIdSchema, Ft as JsonValue, G as deserializeEventResponse, Ga as getMessagesForLLM, Gi as getGroupMembersId, Gn as isoDatetimeToDate, Go as CommunityParticipants, Gr as SendInteractiveInputSchema, Gs as MessageId, Gt as captionParam, H as WhatsAppEventSchema, Ha as getAllMessages, Hi as getGroupInfo, Hn as fileToTempPathCodec, Ho as CommunityMetadataSchema, Hr as setCallMedia, Hs as LocationSchema, Ht as ReplyActionSchema, I as EventResponseSchema, Ia as SendTextResultSchema, Ii as addParticipant, In as contactIdCodec, Io as CommonGroupSchema, Ir as endCall, Is as GroupId, It as JsonValueSchema, J as serializeWhatsAppEvent, Ja as getStarredMessages, Ji as leaveGroup, Jn as unixMillisToDate, Jo as ContactStatusSchema, Jr as sendRawMessage, Js as MessageSchema, Jt as contactIdParam, K as deserializeWhatsAppEvent, Ka as getMyLastMessage, Ki as getKickedGroups, Kn as jsonStringCodec, Ko as CommunityParticipantsSchema, Kr as SendRawMessageInputSchema, Ks as MessageIdReturn, Kt as chatIdParam, L as EventResponseType, La as StickerJobSchema, Li as approveGroupJoinRequest, Ln as createFileCodec, Lo as CommunityAdminIds, Lr as getActiveCall, Ls as GroupMetadata, Lt as LinkActionSchema, M as EventListOptionsSchema, Ma as AlbumMedia, Mi as getCommunityParticipantIds, Mn as UnixMillisToDateSchema, Mo as BusinessProfileSchema, Mr as respondToEvent, Ms as DataURL, Mt as InteractiveResponse, N as EventPage, Na as AlbumMediaSchema, Ni as getCommunityParticipants, Nn as UnixSecondsToDateSchema, No as CartItem, Nr as sendEvent, Ns as DataURLSchema, Nt as InteractiveResponseSchema, O as VoiceNoteOptionsSchema, Oa as setChatEphemeral, Oc as getDefaultConfig, Oi as getAllCommunities, On as HexColorSchema, Oo as voteOnPoll, Or as editEvent, Os as Contact, Ot as InteractiveContent, P as EventPageSchema, Pa as AlbumSendResult, Pi as GroupInfo, Pn as base64ToDataUrlCodec, Po as CartItemSchema, Pr as acceptCall, Ps as GroupChatId, Pt as JsonObjectSchema, Q as LicenseFeaturesSchema, Qa as pinMessage, Qi as revokeGroupInviteLink, Qn as eventResponseEvent, Qo as GroupCreationResultSchema, Qr as getConnectionState, Qs as SimpleListener, Qt as filenameParam, R as EventResponseTypeSchema, Ra as deleteMessage, Ri as createGroup, Rn as fileToBase64Codec, Ro as CommunityAdminIdsSchema, Rr as getCallCapabilities, Rs as GroupMetadataSchema, Rt as ListContentSchema, S as ImageSendOptionsSchema, Sa as getChatWithNonContacts, Sc as SessionData, Si as deleteStatus, Sn as ChatIdSchema, So as sendVCard, Sr as QueueOptionsSchema, Ss as Story, St as FormQuestion, T as VideoSendOptions, Ta as markAsUnread, Tc as StrictConfigSchema, Ti as postImageStatus, Tn as FileToDataUrlSchema, To as starMessage, Tr as eventRegistry, Ts as Chat, Tt as FormResponseSchema, U as decodeEventResponse, Ua as getMessageById, Ui as getGroupInviteLink, Un as groupIdCodec, Uo as CommunityParticipantIds, Ur as startCall, Us as Message, Ut as defineInteractiveMessage, V as WhatsAppEvent, Va as getAlbumMessages, Vi as getGroupAdmins, Vn as fileToStreamCodec, Vo as CommunityMetadata, Vr as rejectCall, Vs as Location, Vt as NativeContentSchema, W as decodeWhatsAppEvent, Wa as getMessageInfo, Wi as getGroupMembers, Wn as hexColorCodec, Wo as CommunityParticipantIdsSchema, Wr as stopCallAudioObserver, Ws as MessageAck, Wt as audioDataParam, X as validateEventUpdate, Xa as getVCards, Xi as rejectGroupJoinRequest, Xn as urlToDataUrlCodec, Xo as FeatureFlagsSchema, Xr as downloadMedia, Xs as SerializedMessageId, Xt as documentDataParam, Y as validateEventInput, Ya as getUnsentMessages, Yi as promoteParticipant, Yn as unixSecondsToDate, Yo as FeatureFlags, Yr as decryptMedia, Ys as MessageTypes, Yt as contentParam, Z as LicenseFeatures, Za as loadEarlierMessages, Zi as removeParticipant, Zn as pollVoteEvent, Zo as GroupCreationResult, Zr as getBatteryLevel, Zs as SerializedMessageIdSchema, Zt as fileDataParam, _ as AutoMediaSendOptionsSchema, _a as clearChat, _c as ProxyServerCredentials, _i as addLabel, _n as videoDataParam, _o as sendReplyWithMentions, _r as reactionEvent, _s as OrderSchema, _t as CallActionSchema, a as PinDuration, aa as checkNumberStatus, ac as Config, ai as getProcessStats, an as longitudeParam, ao as sendContact, ar as addedToGroupEvent, as as Label, at as CallEndReason, b as GifSendOptionsSchema, ba as getAllChats, bc as S3Sync, bi as removeLabel, bn as Base64ToDataUrlSchema, bo as sendText, br as EventStatus, bs as Product, bt as CopyActionSchema, c as PollResultsSchema, ca as getBlockedIds, cc as DeepPartialConfig, ci as getWAVersion, cn as messageIdsParam, co as sendImage, cr as chatStateEvent, cs as MessageInfo, ct as CallIdentitySchema, d as PollVote, da as getNumberProfile, dc as LoggingTransport, di as setMyName, dn as onlyLocalParam, do as sendLocation, dr as ackEvent, ds as MessageInteractionSchema, dt as CallSnapshot, ea as setGroupEditToAdminsOnly, ec as ClientConfigSchema, ei as getHostNumber, en as imageDataParam, eo as sendAdvancedButtons, er as callStateEvent, es as HealthCheckSchema, et as CallActionResult, f as PollVoteSchema, fa as getProfilePicture, fc as LoggingTransportSchema, fi as setMyStatus, fn as skipMyMessagesParam, fo as sendMessageWithThumb, fr as anyMessageEvent, fs as NumberCheck, ft as CallSnapshotSchema, g as AudioSendOptionsSchema, ga as archiveChat, gc as PartialConfigSchema, gi as getOrder, gn as userAgentParam, go as sendPtt, gr as messageEvent, gs as Order, gt as ButtonsContentSchema, h as AudioSendOptions, ha as unblockContact, hc as PartialConfig, hi as getBusinessProfile, hn as toParam, ho as sendPoll, hr as messageDeletedEvent, hs as NumberProfileSchema, ht as BookingContentSchema, i as SessionRefreshSnapshot, ia as blockContact, ic as CloudUploadOptionsSchema, ii as getMe, in as locationNameParam, io as sendButtons, ir as ParticipantChangeSchema, is as LLMMessageSchema, it as CallCapabilitiesSchema, j as EventListOptions, ja as unpinChat, ji as getCommunityInfo, jn as MessageIdSchema, jo as BusinessProfile, jr as getEvents, js as Content, jt as InteractiveHeaderSchema, k as EventInput, ka as unarchiveChat, kc as parseConfig, ki as getCommunityAdminIds, kn as IsoDatetimeToDateSchema, ko as outputJsonSchema, kr as getEvent, ks as ContactId, kt as InteractiveContentSchema, l as PollSendOptions, la as getCommonGroups, lc as DevTools, li as healthCheck, ln as messageOptionsParam, lo as sendLinkWithAutoPreview, lr as logoutEvent, ls as MessageInfoSchema, lt as CallMediaOptionsSchema, m as AudioAttachmentOptionsSchema, ma as sharePhoneNumber, mc as OnError, mi as getBusinessProducts, mn as stickerDataParam, mo as sendPaymentRequest, mr as interactiveResponseEvent, ms as NumberProfile, mt as RawAudioFormatSchema, n as SessionRefreshPhase, na as setGroupTitle, nc as CLOUD_PROVIDERS, ni as getLicenseType, nn as includeNotificationsParam, no as sendAudio, nr as ParticipantChange, ns as HostAccountSchema, nt as CallAudioObserver, o as PinDurationSchema, oa as checkReadReceipts, oc as ConfigSchema, oi as getSnapshot, on as mentionedJidListParam, oo as sendFile, or as participantsChangedEvent, os as LabelSchema, ot as CallEndReasonSchema, p as AudioAttachmentOptions, pa as requestPhoneNumber, pc as NotificationLanguage, pi as setProfilePicture, pn as statusTextParam, po as sendMultipleContacts, pr as formResponseEvent, ps as NumberCheckSchema, pt as MediaDescriptorSchema, q as serializeEventResponse, qa as getPollResults, qi as joinGroupViaLink, qn as messageIdCodec, qo as ContactStatus, qr as sendInteractive, qs as MessageIdReturnSchema, qt as communityIdParam, r as SessionRefreshResult, ra as setGroupToAdminsOnly, rc as CloudUploadOptions, ri as getLoadedMessageCount, rn as latitudeParam, ro as sendBanner, rr as ParticipantChangePatchSchema, rs as LLMMessage, rt as CallCapabilities, s as PollResults, sa as getAllContacts, sc as DIRECTORY_STRATEGY, si as getUserAgent, sn as messageIdParam, so as sendFileFromUrl, sr as StateEnum, ss as LicenseTypeSchema, st as CallIdentity, t as SessionRefreshOptions, ta as setGroupIcon, tc as migrateV4Config, ti as getLicenseFeatures, tn as includeMeParam, to as sendAlbum, tr as incomingCallEvent, ts as HostAccount, tt as CallActionResultSchema, u as PollSendOptionsSchema, ua as getContact, uc as DevToolsSchema, ui as isPlugged, un as nameParam, uo as sendListMessage, ur as stateChangedEvent, us as MessageInteraction, ut as CallReasonSchema, v as DocumentSendOptionsSchema, va as deleteChat, vc as ProxyServerCredentialsSchema, vi as getAllLabels, vn as waitForIdParam, vo as sendSeen, vr as EventDefinition, vs as ProcessStats, vt as CarouselCardSchema, w as MediaSendOptionsSchema, wa as markAsRead, wc as StrictConfig, wi as getStories, wn as ContactIdSchema, wo as sendYouTubeLink, wr as defineListenerV2, ws as Base64, wt as FormResponse, x as ImageSendOptions, xa as getChat, xc as S3SyncSchema, xi as deleteAllStatus, xn as ChatIdCodecSchema, xo as sendTextWithMentions, xr as QueueOptions, xs as ProductSchema, xt as FormContentSchema, y as GifSendOptions, ya as getAllChatIds, yc as QRFormat, yi as getChatsByLabel, yn as withNewMessagesOnlyParam, yo as sendSticker, yr as EventMetadata, ys as ProcessStatsSchema, yt as CarouselContentSchema, z as EventUpdate, za as editMessage, zi as demoteParticipant, zn as fileToBufferCodec, zo as CommunityAdmins, zr as muteCall, zs as Id, zt as ListRowSchema } from "./index-Co8HQxm8.mjs";
2
+ import { a as DEFAULT_CAM, c as MediaDescriptor, d as describeCallMediaFailure, f as normalizeCallMedia, g as encodeAudioPacket, h as decodeAudioPacket, i as CallingOptions, l as RawAudioFormat, m as AUDIO_WIRE_VERSION, n as AudioOutput, o as DEFAULT_MIC, p as AUDIO_FRAME_HEADER_BYTES, r as CallMediaOptions, s as DEFAULT_SPEAKER, t as AudioInput, u as VideoInput } from "./calling-media-CeGgSzhw.mjs";
2
3
  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
4
  import { n as implementMethodAsync, t as implementMethod } from "./implementor-ACLHTHby.mjs";
4
- export { ActionEnum, ActionType, AliasMetadata, Base64, Base64ToDataUrlSchema, BookingContentSchema, BusinessProfile, BusinessProfileSchema, ButtonsContentSchema, CLOUD_PROVIDERS, CallActionSchema, CapabilityDefinition, CapabilityMetadata, CapabilityStatus, CapabilityType, CarouselCardSchema, CarouselContentSchema, CartItem, CartItemSchema, Chat, ChatId, ChatIdCodecSchema, ChatIdSchema, ChatSchema, type ClientConfig, ClientConfigSchema, ClientFunctionMetadata, type CloudUploadOptions, CloudUploadOptionsSchema, CommonGroup, CommonGroupSchema, CommunityAdminIds, CommunityAdminIdsSchema, CommunityAdmins, CommunityAdminsSchema, CommunityMetadata, CommunityMetadataSchema, CommunityParticipantIds, CommunityParticipantIdsSchema, CommunityParticipants, CommunityParticipantsSchema, type Config, ConfigSchema, Contact, ContactId, ContactIdCodecSchema, ContactIdSchema, ContactSchema, ContactStatus, ContactStatusSchema, Content, CopyActionSchema, DIRECTORY_STRATEGY, DataURL, DataURLSchema, type DeepPartialConfig, type DevTools, DevToolsSchema, EventDefinition, EventMetadata, EventStatus, FeatureFlags, FeatureFlagsSchema, FileToDataUrlSchema, FormContentSchema, FormQuestion, FormQuestionSchema, FormResponse, FormResponseSchema, FunctionalityEnum, FunctionalityScope, GroupChatId, GroupChatIdSchema, GroupCreationResult, GroupCreationResultSchema, GroupId, GroupIdCodecSchema, GroupIdSchema, GroupMetadata, GroupMetadataSchema, HealthCheck, HealthCheckSchema, HexColorSchema, HostAccount, HostAccountSchema, HttpMethod, HttpMethodDefinition, HttpMethodEnum, HttpRouteAlias, Id, IdSchema, InferInput, InferOutput, InteractiveAction, InteractiveActionSchema, InteractiveContent, InteractiveContentSchema, InteractiveHeader, InteractiveHeaderSchema, InteractiveResponse, InteractiveResponseSchema, IsoDatetimeToDateSchema, JsonObjectSchema, JsonValue, JsonValueSchema, LLMMessage, LLMMessageSchema, Label, LabelSchema, LicenseEnum, LicenseTier, LicenseTypeSchema, LinkActionSchema, ListContentSchema, ListRowSchema, Location, LocationSchema, type LoggingTransport, LoggingTransportSchema, Message, MessageAck, MessageId, MessageIdCodecSchema, MessageIdReturn, MessageIdReturnSchema, MessageIdSchema, MessageInfo, MessageInfoSchema, MessageInteraction, MessageInteractionSchema, MessageSchema, MessageTypes, MethodDefinition, NativeActionSchema, NativeContentSchema, NotificationLanguage, NumberCheck, NumberCheckSchema, NumberProfile, NumberProfileSchema, OnError, OpenWAMethodSchema, Order, OrderSchema, ParameterMetadata, type PartialConfig, PartialConfigSchema, ProcessStats, ProcessStatsSchema, Product, ProductSchema, type ProxyServerCredentials, ProxyServerCredentialsSchema, QRFormat, QueueOptions, QueueOptionsSchema, QueueOverloadStrategy, Registry, ReplyActionSchema, type S3Sync, S3SyncSchema, SendInteractiveInputSchema, SendRawMessageInputSchema, SendTextResultSchema, SerializedMessageId, SerializedMessageIdSchema, type SessionData, SessionDataSchema, SimpleListener, StateEnum, Story, StorySchema, 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, outputJsonSchema, 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, successResponseSchema, toParam, unarchiveChat, unblockContact, unixMillisToDate, unixSecondsToDate, unmuteChat, unpinChat, unstarMessage, urlToDataUrlCodec, userAgentParam, validateConfig, videoDataParam, waitForIdParam, withNewMessagesOnlyParam, z, zObjectToTuple };
5
+ export { AUDIO_FRAME_HEADER_BYTES, AUDIO_WIRE_VERSION, ActionEnum, ActionType, AlbumMedia, AlbumMediaSchema, AlbumSendResult, AlbumSendResultSchema, AliasMetadata, AudioAttachmentOptions, AudioAttachmentOptionsSchema, AudioInput, AudioOutput, AudioSendOptions, AudioSendOptionsSchema, AutoMediaSendOptionsSchema, Base64, Base64ToDataUrlSchema, BookingContentSchema, BusinessProfile, BusinessProfileSchema, ButtonsContentSchema, CLOUD_PROVIDERS, Call, CallActionResult, CallActionResultSchema, CallActionSchema, CallAudioObserver, CallCapabilities, CallCapabilitiesSchema, CallEndReason, CallEndReasonSchema, CallIdentity, CallIdentitySchema, CallMediaOptions, CallMediaOptionsSchema, CallReasonSchema, CallSnapshot, CallSnapshotSchema, CallingOptions, CapabilityDefinition, CapabilityMetadata, CapabilityStatus, CapabilityType, CarouselCardSchema, CarouselContentSchema, CartItem, CartItemSchema, Chat, ChatId, ChatIdCodecSchema, ChatIdSchema, ChatSchema, type ClientConfig, ClientConfigSchema, ClientFunctionMetadata, type CloudUploadOptions, CloudUploadOptionsSchema, CommonGroup, CommonGroupSchema, CommunityAdminIds, CommunityAdminIdsSchema, CommunityAdmins, CommunityAdminsSchema, CommunityMetadata, CommunityMetadataSchema, CommunityParticipantIds, CommunityParticipantIdsSchema, CommunityParticipants, CommunityParticipantsSchema, type Config, ConfigSchema, Contact, ContactId, ContactIdCodecSchema, ContactIdSchema, ContactSchema, ContactStatus, ContactStatusSchema, Content, CopyActionSchema, DEFAULT_CAM, DEFAULT_MIC, DEFAULT_SPEAKER, DIRECTORY_STRATEGY, DataURL, DataURLSchema, type DeepPartialConfig, type DevTools, DevToolsSchema, DocumentSendOptionsSchema, EventDefinition, EventInput, EventInputSchema, EventListOptions, EventListOptionsSchema, EventMetadata, EventPage, EventPageSchema, EventResponse, EventResponseSchema, EventResponseType, EventResponseTypeSchema, EventStatus, EventUpdate, EventUpdateSchema, FeatureFlags, FeatureFlagsSchema, FileToDataUrlSchema, FormContentSchema, FormQuestion, FormQuestionSchema, FormResponse, FormResponseSchema, FunctionalityEnum, FunctionalityScope, GifSendOptions, GifSendOptionsSchema, GroupChatId, GroupChatIdSchema, GroupCreationResult, GroupCreationResultSchema, GroupId, GroupIdCodecSchema, GroupIdSchema, GroupInfo, GroupInfoSchema, GroupMetadata, GroupMetadataSchema, HealthCheck, HealthCheckSchema, HexColorSchema, HostAccount, HostAccountSchema, HttpMethod, HttpMethodDefinition, HttpMethodEnum, HttpRouteAlias, Id, IdSchema, ImageSendOptions, ImageSendOptionsSchema, InferInput, InferOutput, InteractiveAction, InteractiveActionSchema, InteractiveContent, InteractiveContentSchema, InteractiveHeader, InteractiveHeaderSchema, InteractiveResponse, InteractiveResponseSchema, IsoDatetimeToDateSchema, JsonObjectSchema, JsonValue, JsonValueSchema, LLMMessage, LLMMessageSchema, Label, LabelSchema, LicenseEnum, LicenseFeatures, LicenseFeaturesSchema, LicenseTier, LicenseTypeSchema, LinkActionSchema, ListContentSchema, ListRowSchema, Location, LocationSchema, type LoggingTransport, LoggingTransportSchema, MediaDescriptor, MediaDescriptorSchema, MediaSendOptions, MediaSendOptionsSchema, Message, MessageAck, MessageId, MessageIdCodecSchema, MessageIdReturn, MessageIdReturnSchema, MessageIdSchema, MessageInfo, MessageInfoSchema, MessageInteraction, MessageInteractionSchema, MessageSchema, MessageTypes, MethodDefinition, NativeActionSchema, NativeContentSchema, NotificationLanguage, NumberCheck, NumberCheckSchema, NumberProfile, NumberProfileSchema, OnError, OpenWAMethodSchema, Order, OrderSchema, ParameterMetadata, type PartialConfig, PartialConfigSchema, ParticipantChange, ParticipantChangePatchSchema, ParticipantChangeSchema, PinDuration, PinDurationSchema, PollResults, PollResultsSchema, PollSendOptions, PollSendOptionsSchema, PollVote, PollVoteSchema, ProcessStats, ProcessStatsSchema, Product, ProductSchema, type ProxyServerCredentials, ProxyServerCredentialsSchema, QRFormat, QueueOptions, QueueOptionsSchema, QueueOverloadStrategy, RawAudioFormat, RawAudioFormatSchema, Registry, ReplyActionSchema, type S3Sync, S3SyncSchema, SendInteractiveInputSchema, SendRawMessageInputSchema, SendTextResultSchema, SerializedMessageId, SerializedMessageIdSchema, type SessionData, SessionDataSchema, SessionRefreshOptions, SessionRefreshPhase, SessionRefreshResult, SessionRefreshSnapshot, SimpleListener, StateEnum, StickerJobSchema, Story, StorySchema, type StrictConfig, StrictConfigSchema, UnixMillisToDateSchema, UnixSecondsToDateSchema, VideoInput, VideoSendOptions, VideoSendOptionsSchema, type Viewport, ViewportSchema, VoiceNoteOptions, VoiceNoteOptionsSchema, WhatsAppEvent, WhatsAppEventSchema, acceptCall, ackEvent, addLabel, addParticipant, addedToGroupEvent, anyMessageEvent, approveGroupJoinRequest, archiveChat, audioDataParam, base64ToDataUrlCodec, blockContact, buildKeyAliasMap, callStateEvent, cancelEvent, captionParam, chatIdCodec, chatIdParam, chatStateEvent, checkNumberStatus, checkReadReceipts, clearCallAudio, clearChat, clientRegistry, communityIdParam, contactIdCodec, contactIdParam, contentParam, createFileCodec, createGroup, decodeAudioPacket, decodeEventResponse, decodeWhatsAppEvent, decryptMedia, defineEvent, defineInteractiveMessage, defineListenerV2, defineMethod, defineMethodV2, deleteAllStatus, deleteChat, deleteMessage, deleteStatus, demoteParticipant, deriveNamespacedMethodName, describeCallMediaFailure, deserializeEventResponse, deserializeWhatsAppEvent, documentDataParam, downloadMedia, editEvent, editMessage, encodeAudioPacket, endCall, eventRegistry, eventResponseEvent, fileDataParam, fileToBase64Codec, fileToBufferCodec, fileToDataUrlCodec, fileToStreamCodec, fileToTempPathCodec, filenameParam, formResponseEvent, forwardMessages, getActiveCall, getAlbumMessages, getAllChatIds, getAllChats, getAllCommunities, getAllContacts, getAllGroups, getAllLabels, getAllMessages, getBatteryLevel, getBlockedIds, getBusinessProducts, getBusinessProfile, getCallCapabilities, getChat, getChatWithNonContacts, getChatsByLabel, getCommonGroups, getCommunityAdminIds, getCommunityAdmins, getCommunityInfo, getCommunityParticipantIds, getCommunityParticipants, getConnectionState, getContact, getDefaultConfig, getEvent, getEventResponses, getEvents, getFeatures, getGroupAdmins, getGroupInfo, getGroupInviteLink, getGroupMembers, getGroupMembersId, getHostNumber, getHttpMethodDefinitions, getKickedGroups, getLicenseFeatures, getLicenseType, getLoadedMessageCount, getMe, getMessageById, getMessageInfo, getMessagesForLLM, getMethodAliases, getMyLastMessage, getNumberProfile, getOrder, getParameterMetadata, getPollResults, getProcessStats, getProfilePicture, getSnapshot, getStarredMessages, getStatus, getStories, getUnsentMessages, getUserAgent, getVCards, getWAVersion, groupIdCodec, groupIdParam, healthCheck, hexColorCodec, imageDataParam, implementMethod, implementMethodAsync, includeMeParam, includeNotificationsParam, incomingCallEvent, interactiveResponseEvent, isChatOnline, isPlugged, isoDatetimeToDate, joinGroupViaLink, jsonStringCodec, latitudeParam, leaveGroup, loadEarlierMessages, locationNameParam, logoutEvent, longitudeParam, markAsRead, markAsUnread, mentionedJidListParam, messageDeletedEvent, messageEvent, messageIdCodec, messageIdParam, messageIdsParam, messageOptionsParam, migrateV4Config, muteCall, muteChat, nameParam, normalizeCallMedia, normalizeParameterKeys, observeCallAudio, onlyLocalParam, outputJsonSchema, parameterRegistry, parseConfig, participantsChangedEvent, pinChat, pinMessage, pollVoteEvent, postImageStatus, postTextStatus, postVideoStatus, promoteParticipant, react, reactionEvent, rejectCall, rejectGroupJoinRequest, removeLabel, removeParticipant, requestPhoneNumber, respondToEvent, revokeGroupInviteLink, sendAdvancedButtons, sendAlbum, sendAudio, sendBanner, sendButtons, sendContact, sendEvent, sendFile, sendFileFromUrl, sendImage, sendInteractive, sendLinkWithAutoPreview, sendListMessage, sendLocation, sendMessageWithThumb, sendMultipleContacts, sendPaymentRequest, sendPoll, sendPtt, sendRawMessage, sendReplyWithMentions, sendSeen, sendSticker, sendText, sendTextWithMentions, sendVCard, sendVideoAsGif, sendYouTubeLink, serializeEventResponse, serializeWhatsAppEvent, setCallMedia, setChatEphemeral, setGroupDescription, setGroupEditToAdminsOnly, setGroupIcon, setGroupTitle, setGroupToAdminsOnly, setMyName, setMyStatus, setProfilePicture, sharePhoneNumber, skipMyMessagesParam, starMessage, startCall, stateChangedEvent, statusTextParam, stickerDataParam, stopCallAudioObserver, successResponseSchema, toParam, unarchiveChat, unblockContact, unixMillisToDate, unixSecondsToDate, unmuteChat, unpinChat, unpinMessage, unstarMessage, urlToDataUrlCodec, userAgentParam, validateConfig, validateEventInput, validateEventUpdate, videoDataParam, voteOnPoll, waitForIdParam, whatsappEvent, withNewMessagesOnlyParam, z, zObjectToTuple };
package/dist/index.mjs CHANGED
@@ -1,7 +1,8 @@
1
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 imageDataParam, $r as CommunityAdminIdsSchema, $t as muteChat, A as getConnectionState, Ai as MessageTypes, An as sendMultipleContacts, Ar as MessageIdSchema, At as setGroupIcon, B as healthCheck, Bn as sendYouTubeLink, Br as fileToStreamCodec, Bt as getNumberProfile, C as NativeActionSchema, Ci as GroupChatIdSchema, Cn as sendFile, Cr as ContactIdSchema, Ct as leaveGroup, D as decryptMedia, Di as MessageAck, Dn as sendListMessage, Dr as HexColorSchema, Dt as revokeGroupInviteLink, E as defineInteractiveMessage, Ei as LocationSchema, En as sendLinkWithAutoPreview, Er as GroupIdSchema, Et as removeParticipant, F as getMe, Fn as sendSeen, Fr as contactIdCodec, Ft as checkReadReceipts, G as getBusinessProducts, Gn as chatIdParam, Gr as jsonStringCodec, Gt as deleteChat, H as setMyName, Hn as unstarMessage, Hr as groupIdCodec, Ht as unblockContact, I as getProcessStats, In as sendText, Ir as createFileCodec, It as getAllContacts, J as addLabel, Jn as contentParam, Jr as unixSecondsToDate, Jt as getChat, K as getBusinessProfile, Kn as communityIdParam, Kr as messageIdCodec, Kt as getAllChatIds, L as getSnapshot, Ln as sendTextWithMentions, Lr as fileToBase64Codec, Lt as getBlockedIds, M as getHostNumber, Mi as SimpleListener, Mn as sendPoll, Mr as UnixSecondsToDateSchema, Mt as setGroupToAdminsOnly, N as getLicenseType, Nn as sendPtt, Nr as base64ToDataUrlCodec, Nt as blockContact, O as downloadMedia, Oi as MessageIdReturnSchema, On as sendLocation, Or as IsoDatetimeToDateSchema, Ot as setGroupDescription, P as getLoadedMessageCount, Pn as sendReplyWithMentions, Pr as chatIdCodec, Pt as checkNumberStatus, Q as deleteAllStatus, Qn as groupIdParam, Qr as CommonGroupSchema, Qt as markAsUnread, R as getUserAgent, Rn as sendVCard, Rr as fileToBufferCodec, Rt as getCommonGroups, S as ListRowSchema, Si as DataURLSchema, Sn as sendContact, Sr as ContactIdCodecSchema, St as joinGroupViaLink, T as ReplyActionSchema, Ti as IdSchema, Tn as sendImage, Tr as GroupIdCodecSchema, Tt as rejectGroupJoinRequest, U as setMyStatus, Un as audioDataParam, Ur as hexColorCodec, Ut as archiveChat, V as isPlugged, Vn as starMessage, Vr as fileToTempPathCodec, Vt as getProfilePicture, W as setProfilePicture, Wn as captionParam, Wr as isoDatetimeToDate, Wt as clearChat, X as getChatsByLabel, Xn as fileDataParam, Xr as BusinessProfileSchema, Xt as isChatOnline, Y as getAllLabels, Yn as documentDataParam, Yr as urlToDataUrlCodec, Yt as getChatWithNonContacts, Z as removeLabel, Zn as filenameParam, Zr as CartItemSchema, Zt as markAsRead, _ as InteractiveResponseSchema, _i as ProcessStatsSchema, _n as react, _r as waitForIdParam, _t as getGroupInfo, a as BookingContentSchema, ai as FeatureFlagsSchema, an as SendTextResultSchema, ar as mentionedJidListParam, at as getAllCommunities, b as LinkActionSchema, bi as ChatSchema, bn as sendBanner, br as ChatIdCodecSchema, bt as getGroupMembersId, c as CarouselCardSchema, ci as HostAccountSchema, cn as getAllMessages, cr as messageOptionsParam, ct as getCommunityInfo, d as FormContentSchema, di as LicenseTypeSchema, dn as getMessagesForLLM, dr as skipMyMessagesParam, dt as addParticipant, ei as CommunityAdminsSchema, en as pinChat, er as includeMeParam, et as getStatus, f as FormQuestionSchema, fi as MessageInfoSchema, fn as getMyLastMessage, fr as statusTextParam, ft as approveGroupJoinRequest, g as InteractiveHeaderSchema, gi as OrderSchema, gn as loadEarlierMessages, gr as videoDataParam, gt as getGroupAdmins, h as InteractiveContentSchema, hi as NumberProfileSchema, hn as getVCards, hr as userAgentParam, ht as getAllGroups, i as sendRawMessage, ii as ContactStatusSchema, in as unpinChat, ir as longitudeParam, it as postVideoStatus, j as getFeatures, ji as SerializedMessageIdSchema, jn as sendPaymentRequest, jr as UnixMillisToDateSchema, jt as setGroupTitle, k as getBatteryLevel, ki as MessageSchema, kn as sendMessageWithThumb, kr as MessageIdCodecSchema, kt as setGroupEditToAdminsOnly, l as CarouselContentSchema, li as LLMMessageSchema, ln as getMessageById, lr as nameParam, lt as getCommunityParticipantIds, m as InteractiveActionSchema, mi as NumberCheckSchema, mn as getUnsentMessages, mr as toParam, mt as demoteParticipant, n as SendRawMessageInputSchema, ni as CommunityParticipantIdsSchema, nn as unarchiveChat, nr as latitudeParam, nt as postImageStatus, o as ButtonsContentSchema, oi as GroupCreationResultSchema, on as deleteMessage, or as messageIdParam, ot as getCommunityAdminIds, p as FormResponseSchema, pi as MessageInteractionSchema, pn as getStarredMessages, pr as stickerDataParam, pt as createGroup, q as getOrder, qn as contactIdParam, qr as unixMillisToDate, qt as getAllChats, r as sendInteractive, ri as CommunityParticipantsSchema, rn as unmuteChat, rr as locationNameParam, rt as postTextStatus, s as CallActionSchema, si as HealthCheckSchema, sn as forwardMessages, sr as messageIdsParam, st as getCommunityAdmins, t as SendInteractiveInputSchema, ti as CommunityMetadataSchema, tn as setChatEphemeral, tr as includeNotificationsParam, tt as getStories, u as CopyActionSchema, ui as LabelSchema, un as getMessageInfo, ur as onlyLocalParam, ut as getCommunityParticipants, v as JsonObjectSchema, vi as ProductSchema, vn as sendAdvancedButtons, vr as withNewMessagesOnlyParam, vt as getGroupInviteLink, w as NativeContentSchema, wi as GroupMetadataSchema, wn as sendFileFromUrl, wr as FileToDataUrlSchema, wt as promoteParticipant, x as ListContentSchema, xi as ContactSchema, xn as sendButtons, xr as ChatIdSchema, xt as getKickedGroups, y as JsonValueSchema, yi as StorySchema, yn as sendAudio, yr as Base64ToDataUrlSchema, yt as getGroupMembers, z as getWAVersion, zn as sendVideoAsGif, zr as fileToDataUrlCodec, zt as getContact } from "./methods-BhLsQNtL.mjs";
2
+ import { $ as defineInteractiveMessage, $a as validateEventUpdate, $i as CartItemSchema, $n as getVCards, $r as onlyLocalParam, $t as leaveGroup, A as sendInteractive, Aa as LocationSchema, Ai as fileToTempPathCodec, An as markAsUnread, Ar as unstarMessage, At as getStories, B as FormResponseSchema, Ba as EventListOptionsSchema, Bi as PollResultsSchema, Bn as StickerJobSchema, Br as filenameParam, Bt as GroupInfoSchema, C as CallMediaOptionsSchema, Ca as ContactIdSchema$1, Ci as chatIdCodec, Cn as deleteChat, Cr as sendText, Ct as addLabel, D as RawAudioFormatSchema, Da as GroupIdSchema$1, Di as fileToBufferCodec, Dn as getChatWithNonContacts, Dr as sendYouTubeLink, Dt as deleteAllStatus, E as MediaDescriptorSchema, Ea as GroupChatIdSchema, Ei as fileToBase64Codec, En as getChat, Er as sendVideoAsGif, Et as removeLabel, F as CarouselCardSchema, Fa as SerializedMessageIdSchema, Fi as messageIdCodec, Fn as unmuteChat, Fr as communityIdParam, Ft as getCommunityAdminIds, G as JsonObjectSchema, Ga as WhatsAppEventSchema, Gi as AutoMediaSendOptionsSchema, Gn as getAllMessages, Gr as latitudeParam, Gt as getAllGroups, H as InteractiveContentSchema, Ha as EventResponseSchema, Hi as PollVoteSchema, Hn as editMessage, Hr as imageDataParam, Ht as approveGroupJoinRequest, I as CarouselContentSchema, Ia as SimpleListener, Ii as unixMillisToDate, In as unpinChat, Ir as contactIdParam, It as getCommunityAdmins, J as ListContentSchema, Ja as deserializeEventResponse, Ji as ImageSendOptionsSchema, Jn as getMessagesForLLM, Jr as mentionedJidListParam, Jt as getGroupInviteLink, K as JsonValueSchema, Ka as decodeEventResponse, Ki as DocumentSendOptionsSchema, Kn as getMessageById, Kr as locationNameParam, Kt as getGroupAdmins, L as CopyActionSchema, La as EventResponseRegistrySchema, Li as unixSecondsToDate, Ln as AlbumMediaSchema, Lr as contentParam, Lt as getCommunityInfo, M as BookingContentSchema, Ma as MessageIdReturnSchema, Mi as hexColorCodec, Mn as pinChat, Mr as audioDataParam, Mt as postTextStatus, N as ButtonsContentSchema, Na as MessageSchema, Ni as isoDatetimeToDate, Nn as setChatEphemeral, Nr as captionParam, Nt as postVideoStatus, O as SendInteractiveInputSchema, Oa as GroupMetadataSchema, Oi as fileToDataUrlCodec, On as isChatOnline, Or as starMessage, Ot as deleteStatus, P as CallActionSchema, Pa as MessageTypes, Pi as jsonStringCodec, Pn as unarchiveChat, Pr as chatIdParam, Pt as getAllCommunities, Q as ReplyActionSchema, Qa as validateEventInput, Qi as BusinessProfileSchema, Qn as getUnsentMessages, Qr as nameParam, Qt as joinGroupViaLink, R as FormContentSchema, Ra as WhatsAppEventRegistrySchema, Ri as urlToDataUrlCodec, Rn as AlbumSendResultSchema, Rr as documentDataParam, Rt as getCommunityParticipantIds, S as CallIdentitySchema, Sa as ChatSchema, Si as base64ToDataUrlCodec, Sn as clearChat, Sr as sendSticker, St as getOrder, T as CallSnapshotSchema, Ta as DataURLSchema, Ti as createFileCodec, Tn as getAllChats, Tr as sendVCard, Tt as getChatsByLabel, U as InteractiveHeaderSchema, Ua as EventResponseTypeSchema, Ui as AudioAttachmentOptionsSchema, Un as forwardMessages, Ur as includeMeParam, Ut as createGroup, V as InteractiveActionSchema, Va as EventPageSchema, Vi as PollSendOptionsSchema, Vn as deleteMessage, Vr as groupIdParam, Vt as addParticipant, W as InteractiveResponseSchema, Wa as EventUpdateSchema, Wi as AudioSendOptionsSchema, Wn as getAlbumMessages, Wr as includeNotificationsParam, Wt as demoteParticipant, X as NativeActionSchema, Xa as serializeEventResponse, Xi as VideoSendOptionsSchema, Xn as getPollResults, Xr as messageIdsParam, Xt as getGroupMembersId, Y as ListRowSchema, Ya as deserializeWhatsAppEvent, Yi as MediaSendOptionsSchema, Yn as getMyLastMessage, Yr as messageIdParam, Yt as getGroupMembers, Z as NativeContentSchema, Za as serializeWhatsAppEvent, Zi as VoiceNoteOptionsSchema, Zn as getStarredMessages, Zr as messageOptionsParam, Zt as getKickedGroups, _ as startCall, _a as NumberProfileSchema, _i as IsoDatetimeToDateSchema, _n as getProfilePicture, _r as sendPaymentRequest, _t as setMyStatus, a as getEvents, aa as CommunityParticipantsSchema, ai as videoDataParam, an as setGroupEditToAdminsOnly, ar as sendAudio, at as getHostNumber, b as CallCapabilitiesSchema, ba as ProductSchema, bi as UnixMillisToDateSchema, bn as unblockContact, br as sendReplyWithMentions, bt as getBusinessProducts, c as acceptCall, ca as GroupCreationResultSchema, ci as Base64ToDataUrlSchema, cn as setGroupToAdminsOnly, cr as sendContact, ct as getLoadedMessageCount, d as getActiveCall, da as LLMMessageSchema, di as ContactIdCodecSchema, dn as checkReadReceipts, dr as sendImage, dt as getSnapshot, ea as CommonGroupSchema, ei as skipMyMessagesParam, en as promoteParticipant, eo as projectEffectSchema, er as loadEarlierMessages, et as decryptMedia, f as getCallCapabilities, fa as LabelSchema, fi as ContactIdSchema, fn as getAllContacts, fr as sendLinkWithAutoPreview, ft as getUserAgent, g as setCallMedia, ga as NumberCheckSchema, gi as HexColorSchema, gn as getNumberProfile, gr as sendMultipleContacts, gt as setMyName, h as rejectCall, ha as MessageInteractionSchema, hi as GroupIdSchema, hn as getContact, hr as sendMessageWithThumb, ht as isPlugged, i as getEventResponses, ia as CommunityParticipantIdsSchema, ii as userAgentParam, in as setGroupDescription, ir as sendAlbum, it as getFeatures, j as sendRawMessage, ja as MessageAck, ji as groupIdCodec, jn as muteChat, jr as voteOnPoll, jt as postImageStatus, k as SendRawMessageInputSchema, ka as IdSchema, ki as fileToStreamCodec, kn as markAsRead, kr as unpinMessage, kt as getStatus, l as clearCallAudio, la as HealthCheckSchema, li as ChatIdCodecSchema, ln as blockContact, lr as sendFile, lt as getMe, m as observeCallAudio, ma as MessageInfoSchema, mi as GroupIdCodecSchema, mn as getCommonGroups, mr as sendLocation, mt as healthCheck, n as editEvent, na as CommunityAdminsSchema, ni as stickerDataParam, nn as removeParticipant, nr as react, nt as getBatteryLevel, o as respondToEvent, oa as ContactStatusSchema, oi as waitForIdParam, on as setGroupIcon, or as sendBanner, ot as getLicenseFeatures, p as muteCall, pa as LicenseTypeSchema, pi as FileToDataUrlSchema, pn as getBlockedIds, pr as sendListMessage, pt as getWAVersion, q as LinkActionSchema, qa as decodeWhatsAppEvent, qi as GifSendOptionsSchema, qn as getMessageInfo, qr as longitudeParam, qt as getGroupInfo, r as getEvent, ra as CommunityMetadataSchema, ri as toParam, rn as revokeGroupInviteLink, rr as sendAdvancedButtons, rt as getConnectionState, s as sendEvent, sa as FeatureFlagsSchema, si as withNewMessagesOnlyParam, sn as setGroupTitle, sr as sendButtons, st as getLicenseType, t as cancelEvent, ta as CommunityAdminIdsSchema, ti as statusTextParam, tn as rejectGroupJoinRequest, tr as pinMessage, tt as downloadMedia, u as endCall, ua as HostAccountSchema, ui as ChatIdSchema, un as checkNumberStatus, ur as sendFileFromUrl, ut as getProcessStats, v as stopCallAudioObserver, va as OrderSchema, vi as MessageIdCodecSchema, vn as requestPhoneNumber, vr as sendPoll, vt as setProfilePicture, w as CallReasonSchema, wa as ContactSchema, wi as contactIdCodec, wn as getAllChatIds, wr as sendTextWithMentions, wt as getAllLabels, x as CallEndReasonSchema, xa as StorySchema, xi as UnixSecondsToDateSchema, xn as archiveChat, xr as sendSeen, xt as getBusinessProfile, y as CallActionResultSchema, ya as ProcessStatsSchema, yi as MessageIdSchema, yn as sharePhoneNumber, yr as sendPtt, yt as LicenseFeaturesSchema, z as FormQuestionSchema, za as EventInputSchema, zi as PinDurationSchema, zn as SendTextResultSchema, zr as fileDataParam, zt as getCommunityParticipants } from "./methods-BH7nDC3z.mjs";
3
3
  import { implementMethod, implementMethodAsync } from "./implementor.mjs";
4
4
  import { getHttpMethodDefinitions } from "./http-manifest.mjs";
5
+ import { a as normalizeCallMedia, c as decodeAudioPacket, i as describeCallMediaFailure, l as encodeAudioPacket, n as DEFAULT_MIC, o as AUDIO_FRAME_HEADER_BYTES, r as DEFAULT_SPEAKER, s as AUDIO_WIRE_VERSION, t as DEFAULT_CAM } from "./calling-media-BNTYvogE.mjs";
5
6
  import { z as z$1 } from "zod";
6
7
  import { CLOUD_PROVIDERS, CloudUploadOptionsSchema, ConfigSchema, ConfigSchema as ClientConfigSchema, DIRECTORY_STRATEGY, DevToolsSchema, LicenseType, LoggingTransportSchema, NotificationLanguage, OnError, PartialConfigSchema, ProxyServerCredentialsSchema, QRFormat, S3SyncSchema, SessionDataSchema, StrictConfigSchema, ViewportSchema, getDefaultConfig, parseConfig, validateConfig } from "@open-wa/config";
7
8
  //#region src/client-config.ts
@@ -63,7 +64,7 @@ const eventRegistry = {
63
64
  return eventsByName.get(name);
64
65
  },
65
66
  getByLegacyName(legacyName) {
66
- for (const def of eventsByName.values()) if (def.meta.legacyName === legacyName) return def;
67
+ for (const def of eventsByName.values()) if (def.meta.legacyName === legacyName || def.meta.aliases?.includes(legacyName)) return def;
67
68
  },
68
69
  has(name) {
69
70
  return eventsByName.has(name);
@@ -114,12 +115,10 @@ function defineListenerV2(name, params) {
114
115
  }
115
116
  //#endregion
116
117
  //#region src/events/messaging.ts
117
- const AckSchema = z$1.object({
118
- id: z$1.string(),
119
- chatId: z$1.string(),
120
- ack: z$1.nativeEnum(MessageAck),
121
- timestamp: z$1.number().optional()
122
- });
118
+ const AckSchema = MessageSchema.pick({
119
+ id: true,
120
+ ack: true
121
+ }).passthrough().describe("The full available message snapshot at acknowledgement time, including id, ack, body, sender and chat when supplied by WhatsApp.");
123
122
  const messageEvent = defineListenerV2("message", {
124
123
  legacyName: "onMessage",
125
124
  meta: {
@@ -260,25 +259,43 @@ const logoutEvent = defineListenerV2("logout", {
260
259
  });
261
260
  //#endregion
262
261
  //#region src/events/groups.ts
262
+ const participantChatIdSchema = z$1.union([GroupIdSchema$1, z$1.object({ _serialized: GroupIdSchema$1 }).passthrough()]);
263
+ const ParticipantChangeSchema = z$1.object({
264
+ groupId: GroupIdSchema$1,
265
+ action: z$1.enum([
266
+ "add",
267
+ "remove",
268
+ "promote",
269
+ "demote",
270
+ "invite",
271
+ "leave"
272
+ ]),
273
+ participantIds: z$1.array(ContactIdSchema$1),
274
+ by: z$1.string().optional(),
275
+ who: ContactIdSchema$1.optional(),
276
+ chat: participantChatIdSchema.optional()
277
+ }).passthrough();
278
+ /** Adapt the existing patch callback without replacing its native listener. */
279
+ const ParticipantChangePatchSchema = z$1.object({
280
+ action: ParticipantChangeSchema.shape.action,
281
+ who: ContactIdSchema$1,
282
+ chat: participantChatIdSchema,
283
+ by: z$1.string().optional()
284
+ }).passthrough().transform((change) => ({
285
+ ...change,
286
+ groupId: typeof change.chat === "string" ? change.chat : change.chat._serialized,
287
+ participantIds: [change.who]
288
+ })).pipe(ParticipantChangeSchema);
263
289
  const participantsChangedEvent = defineListenerV2("participantsChanged", {
264
290
  legacyName: "onParticipantsChanged",
265
291
  meta: {
266
292
  description: "Fired when group participants change",
267
293
  namespace: "groups",
268
294
  status: "stable",
269
- license: "none"
295
+ license: "none",
296
+ aliases: ["onGlobalParticipantsChanged"]
270
297
  },
271
- payload: z$1.object({
272
- groupId: z$1.string(),
273
- action: z$1.enum([
274
- "add",
275
- "remove",
276
- "promote",
277
- "demote"
278
- ]),
279
- participantIds: z$1.array(z$1.string()),
280
- by: z$1.string().optional()
281
- })
298
+ payload: ParticipantChangeSchema
282
299
  });
283
300
  const addedToGroupEvent = defineListenerV2("addedToGroup", {
284
301
  legacyName: "onAddedToGroup",
@@ -295,6 +312,73 @@ const addedToGroupEvent = defineListenerV2("addedToGroup", {
295
312
  })
296
313
  });
297
314
  //#endregion
315
+ //#region src/events/calls.ts
316
+ const incomingCallEvent = defineListenerV2("incomingCall", {
317
+ legacyName: "onIncomingCall",
318
+ meta: {
319
+ namespace: "calls",
320
+ license: "restricted",
321
+ status: "experimental",
322
+ description: "A native incoming call. The SDK hydrates its bound controls."
323
+ },
324
+ payload: projectEffectSchema(CallSnapshotSchema),
325
+ defaultQueueOptions: {
326
+ capacity: 32,
327
+ concurrency: 1
328
+ }
329
+ });
330
+ const callStateEvent = defineListenerV2("callState", {
331
+ legacyName: "onCallState",
332
+ meta: {
333
+ namespace: "calls",
334
+ license: "restricted",
335
+ status: "experimental",
336
+ description: "Observed native call state, including unknown states."
337
+ },
338
+ payload: projectEffectSchema(CallSnapshotSchema),
339
+ defaultQueueOptions: {
340
+ capacity: 64,
341
+ concurrency: 1
342
+ }
343
+ });
344
+ //#endregion
345
+ //#region src/events/whatsapp-events.ts
346
+ const whatsappEvent = defineListenerV2("event", {
347
+ legacyName: "onEvent",
348
+ meta: {
349
+ namespace: "events",
350
+ license: "none",
351
+ status: "beta",
352
+ description: "A native event added or changed in the synced message store, including this account’s events."
353
+ },
354
+ payload: WhatsAppEventRegistrySchema,
355
+ defaultQueueOptions: { concurrency: 1 }
356
+ });
357
+ const eventResponseEvent = defineListenerV2("eventResponse", {
358
+ legacyName: "onEventResponse",
359
+ meta: {
360
+ namespace: "events",
361
+ license: "none",
362
+ status: "beta",
363
+ description: "A decrypted RSVP added or changed in WhatsApp’s dedicated event-response collection. History loads may emit responses too; deduplicate by id and timestamp."
364
+ },
365
+ payload: EventResponseRegistrySchema,
366
+ defaultQueueOptions: { concurrency: 1 }
367
+ });
368
+ //#endregion
369
+ //#region src/events/polls.ts
370
+ const pollVoteEvent = defineListenerV2("pollVote", {
371
+ legacyName: "onPollVote",
372
+ meta: {
373
+ namespace: "messages",
374
+ license: "none",
375
+ status: "beta",
376
+ description: "A decrypted poll vote added or changed in the synced store. Hydration can emit old votes. Hidden-voter polls omit sender and message identifiers. Deduplicate ordinary votes by id and timestamp; refresh getPollResults for current totals."
377
+ },
378
+ payload: PollVoteSchema,
379
+ defaultQueueOptions: { concurrency: 1 }
380
+ });
381
+ //#endregion
298
382
  //#region src/enums.ts
299
383
  /**
300
384
  * Action types for RBAC permissions
@@ -347,6 +431,6 @@ const HttpMethodEnum = z$1.enum([
347
431
  "HEAD"
348
432
  ]);
349
433
  //#endregion
350
- export { ActionEnum, Base64ToDataUrlSchema, BookingContentSchema, BusinessProfileSchema, ButtonsContentSchema, CLOUD_PROVIDERS, CallActionSchema, CarouselCardSchema, CarouselContentSchema, CartItemSchema, ChatIdCodecSchema, ChatIdSchema, ChatSchema, ClientConfigSchema, CloudUploadOptionsSchema, CommonGroupSchema, CommunityAdminIdsSchema, CommunityAdminsSchema, CommunityMetadataSchema, CommunityParticipantIdsSchema, CommunityParticipantsSchema, ConfigSchema, ContactIdCodecSchema, ContactIdSchema, ContactSchema, ContactStatusSchema, CopyActionSchema, DIRECTORY_STRATEGY, DataURLSchema, DevToolsSchema, FeatureFlagsSchema, FileToDataUrlSchema, FormContentSchema, FormQuestionSchema, FormResponseSchema, FunctionalityEnum, GroupChatIdSchema, GroupCreationResultSchema, GroupIdCodecSchema, GroupIdSchema, GroupMetadataSchema, HealthCheckSchema, HexColorSchema, HostAccountSchema, HttpMethodEnum, IdSchema, InteractiveActionSchema, InteractiveContentSchema, InteractiveHeaderSchema, InteractiveResponseSchema, IsoDatetimeToDateSchema, JsonObjectSchema, JsonValueSchema, LLMMessageSchema, LabelSchema, LicenseEnum, LicenseType, LicenseTypeSchema, LinkActionSchema, ListContentSchema, ListRowSchema, LocationSchema, LoggingTransportSchema, MessageAck, MessageIdCodecSchema, MessageIdReturnSchema, MessageIdSchema, MessageInfoSchema, MessageInteractionSchema, MessageSchema, MessageTypes, NativeActionSchema, NativeContentSchema, NotificationLanguage, NumberCheckSchema, NumberProfileSchema, OnError, OrderSchema, PartialConfigSchema, ProcessStatsSchema, ProductSchema, ProxyServerCredentialsSchema, QRFormat, QueueOptionsSchema, Registry, ReplyActionSchema, S3SyncSchema, SendInteractiveInputSchema, SendRawMessageInputSchema, SendTextResultSchema, SerializedMessageIdSchema, SessionDataSchema, SimpleListener, StateEnum, StorySchema, 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, outputJsonSchema, 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, successResponseSchema, toParam, unarchiveChat, unblockContact, unixMillisToDate, unixSecondsToDate, unmuteChat, unpinChat, unstarMessage, urlToDataUrlCodec, userAgentParam, validateConfig, videoDataParam, waitForIdParam, withNewMessagesOnlyParam, z, zObjectToTuple };
434
+ export { AUDIO_FRAME_HEADER_BYTES, AUDIO_WIRE_VERSION, ActionEnum, AlbumMediaSchema, AlbumSendResultSchema, AudioAttachmentOptionsSchema, AudioSendOptionsSchema, AutoMediaSendOptionsSchema, Base64ToDataUrlSchema, BookingContentSchema, BusinessProfileSchema, ButtonsContentSchema, CLOUD_PROVIDERS, CallActionResultSchema, CallActionSchema, CallCapabilitiesSchema, CallEndReasonSchema, CallIdentitySchema, CallMediaOptionsSchema, CallReasonSchema, CallSnapshotSchema, CarouselCardSchema, CarouselContentSchema, CartItemSchema, ChatIdCodecSchema, ChatIdSchema, ChatSchema, ClientConfigSchema, CloudUploadOptionsSchema, CommonGroupSchema, CommunityAdminIdsSchema, CommunityAdminsSchema, CommunityMetadataSchema, CommunityParticipantIdsSchema, CommunityParticipantsSchema, ConfigSchema, ContactIdCodecSchema, ContactIdSchema, ContactSchema, ContactStatusSchema, CopyActionSchema, DEFAULT_CAM, DEFAULT_MIC, DEFAULT_SPEAKER, DIRECTORY_STRATEGY, DataURLSchema, DevToolsSchema, DocumentSendOptionsSchema, EventInputSchema, EventListOptionsSchema, EventPageSchema, EventResponseSchema, EventResponseTypeSchema, EventUpdateSchema, FeatureFlagsSchema, FileToDataUrlSchema, FormContentSchema, FormQuestionSchema, FormResponseSchema, FunctionalityEnum, GifSendOptionsSchema, GroupChatIdSchema, GroupCreationResultSchema, GroupIdCodecSchema, GroupIdSchema, GroupInfoSchema, GroupMetadataSchema, HealthCheckSchema, HexColorSchema, HostAccountSchema, HttpMethodEnum, IdSchema, ImageSendOptionsSchema, InteractiveActionSchema, InteractiveContentSchema, InteractiveHeaderSchema, InteractiveResponseSchema, IsoDatetimeToDateSchema, JsonObjectSchema, JsonValueSchema, LLMMessageSchema, LabelSchema, LicenseEnum, LicenseFeaturesSchema, LicenseType, LicenseTypeSchema, LinkActionSchema, ListContentSchema, ListRowSchema, LocationSchema, LoggingTransportSchema, MediaDescriptorSchema, MediaSendOptionsSchema, MessageAck, MessageIdCodecSchema, MessageIdReturnSchema, MessageIdSchema, MessageInfoSchema, MessageInteractionSchema, MessageSchema, MessageTypes, NativeActionSchema, NativeContentSchema, NotificationLanguage, NumberCheckSchema, NumberProfileSchema, OnError, OrderSchema, PartialConfigSchema, ParticipantChangePatchSchema, ParticipantChangeSchema, PinDurationSchema, PollResultsSchema, PollSendOptionsSchema, PollVoteSchema, ProcessStatsSchema, ProductSchema, ProxyServerCredentialsSchema, QRFormat, QueueOptionsSchema, RawAudioFormatSchema, Registry, ReplyActionSchema, S3SyncSchema, SendInteractiveInputSchema, SendRawMessageInputSchema, SendTextResultSchema, SerializedMessageIdSchema, SessionDataSchema, SimpleListener, StateEnum, StickerJobSchema, StorySchema, StrictConfigSchema, UnixMillisToDateSchema, UnixSecondsToDateSchema, VideoSendOptionsSchema, ViewportSchema, VoiceNoteOptionsSchema, WhatsAppEventSchema, acceptCall, ackEvent, addLabel, addParticipant, addedToGroupEvent, anyMessageEvent, approveGroupJoinRequest, archiveChat, audioDataParam, base64ToDataUrlCodec, blockContact, buildKeyAliasMap, callStateEvent, cancelEvent, captionParam, chatIdCodec, chatIdParam, chatStateEvent, checkNumberStatus, checkReadReceipts, clearCallAudio, clearChat, clientRegistry, communityIdParam, contactIdCodec, contactIdParam, contentParam, createFileCodec, createGroup, decodeAudioPacket, decodeEventResponse, decodeWhatsAppEvent, decryptMedia, defineEvent, defineInteractiveMessage, defineListenerV2, defineMethod, defineMethodV2, deleteAllStatus, deleteChat, deleteMessage, deleteStatus, demoteParticipant, deriveNamespacedMethodName, describeCallMediaFailure, deserializeEventResponse, deserializeWhatsAppEvent, documentDataParam, downloadMedia, editEvent, editMessage, encodeAudioPacket, endCall, eventRegistry, eventResponseEvent, fileDataParam, fileToBase64Codec, fileToBufferCodec, fileToDataUrlCodec, fileToStreamCodec, fileToTempPathCodec, filenameParam, formResponseEvent, forwardMessages, getActiveCall, getAlbumMessages, getAllChatIds, getAllChats, getAllCommunities, getAllContacts, getAllGroups, getAllLabels, getAllMessages, getBatteryLevel, getBlockedIds, getBusinessProducts, getBusinessProfile, getCallCapabilities, getChat, getChatWithNonContacts, getChatsByLabel, getCommonGroups, getCommunityAdminIds, getCommunityAdmins, getCommunityInfo, getCommunityParticipantIds, getCommunityParticipants, getConnectionState, getContact, getDefaultConfig, getEvent, getEventResponses, getEvents, getFeatures, getGroupAdmins, getGroupInfo, getGroupInviteLink, getGroupMembers, getGroupMembersId, getHostNumber, getHttpMethodDefinitions, getKickedGroups, getLicenseFeatures, getLicenseType, getLoadedMessageCount, getMe, getMessageById, getMessageInfo, getMessagesForLLM, getMethodAliases, getMyLastMessage, getNumberProfile, getOrder, getParameterMetadata, getPollResults, getProcessStats, getProfilePicture, getSnapshot, getStarredMessages, getStatus, getStories, getUnsentMessages, getUserAgent, getVCards, getWAVersion, groupIdCodec, groupIdParam, healthCheck, hexColorCodec, imageDataParam, implementMethod, implementMethodAsync, includeMeParam, includeNotificationsParam, incomingCallEvent, interactiveResponseEvent, isChatOnline, isPlugged, isoDatetimeToDate, joinGroupViaLink, jsonStringCodec, latitudeParam, leaveGroup, loadEarlierMessages, locationNameParam, logoutEvent, longitudeParam, markAsRead, markAsUnread, mentionedJidListParam, messageDeletedEvent, messageEvent, messageIdCodec, messageIdParam, messageIdsParam, messageOptionsParam, migrateV4Config, muteCall, muteChat, nameParam, normalizeCallMedia, normalizeParameterKeys, observeCallAudio, onlyLocalParam, outputJsonSchema, parameterRegistry, parseConfig, participantsChangedEvent, pinChat, pinMessage, pollVoteEvent, postImageStatus, postTextStatus, postVideoStatus, promoteParticipant, react, reactionEvent, rejectCall, rejectGroupJoinRequest, removeLabel, removeParticipant, requestPhoneNumber, respondToEvent, revokeGroupInviteLink, sendAdvancedButtons, sendAlbum, sendAudio, sendBanner, sendButtons, sendContact, sendEvent, sendFile, sendFileFromUrl, sendImage, sendInteractive, sendLinkWithAutoPreview, sendListMessage, sendLocation, sendMessageWithThumb, sendMultipleContacts, sendPaymentRequest, sendPoll, sendPtt, sendRawMessage, sendReplyWithMentions, sendSeen, sendSticker, sendText, sendTextWithMentions, sendVCard, sendVideoAsGif, sendYouTubeLink, serializeEventResponse, serializeWhatsAppEvent, setCallMedia, setChatEphemeral, setGroupDescription, setGroupEditToAdminsOnly, setGroupIcon, setGroupTitle, setGroupToAdminsOnly, setMyName, setMyStatus, setProfilePicture, sharePhoneNumber, skipMyMessagesParam, starMessage, startCall, stateChangedEvent, statusTextParam, stickerDataParam, stopCallAudioObserver, successResponseSchema, toParam, unarchiveChat, unblockContact, unixMillisToDate, unixSecondsToDate, unmuteChat, unpinChat, unpinMessage, unstarMessage, urlToDataUrlCodec, userAgentParam, validateConfig, validateEventInput, validateEventUpdate, videoDataParam, voteOnPoll, waitForIdParam, whatsappEvent, withNewMessagesOnlyParam, z, zObjectToTuple };
351
435
 
352
436
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["z","z","z","z","z","z"],"sources":["../src/client-config.ts","../src/output-json-schema.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';\n\n/** HTTP omits undefined results; void/undefined are not JSON data values. */\nexport function outputJsonSchema(schema: z.ZodType) {\n return z.toJSONSchema(schema, {\n target: 'openapi-3.0',\n unrepresentable: 'any',\n override: ({ zodSchema, jsonSchema }) => {\n const kind = zodSchema._zod.def.type;\n if (kind === 'void' || kind === 'undefined') {\n jsonSchema.not = {};\n jsonSchema.description = 'No JSON value; the response data property is omitted.';\n }\n },\n });\n}\n\nexport function successResponseSchema(schema: z.ZodType) {\n return {\n type: 'object',\n required: schema.isOptional() ? ['success'] : ['success', 'data'],\n properties: {\n success: { type: 'boolean', enum: [true] },\n data: outputJsonSchema(schema),\n },\n };\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":";;;;;;;;;;;;;;AAeA,SAAgB,gBAAgB,WAA6D;CAEzF,MAAM,SAAS,KAAK,MAAM,KAAK,UAAU,SAAS,CAAC;CAGnD,IAAI,OAAO,OAAO,gBAAgB,UAC9B,OAAO,cAAc,SAAS,OAAO,aAAa,EAAE;CAGxD,IAAI,OAAO,iBAAiB,KAAA,GACxB,OAAO,eAAe;CAG1B,OAAO;AACX;;;;AC1BA,SAAgB,iBAAiB,QAAmB;CAChD,OAAOA,IAAE,aAAa,QAAQ;EAC1B,QAAQ;EACR,iBAAiB;EACjB,WAAW,EAAE,WAAW,iBAAiB;GACrC,MAAM,OAAO,UAAU,KAAK,IAAI;GAChC,IAAI,SAAS,UAAU,SAAS,aAAa;IACzC,WAAW,MAAM,CAAC;IAClB,WAAW,cAAc;GAC7B;EACJ;CACJ,CAAC;AACL;AAEA,SAAgB,sBAAsB,QAAmB;CACrD,OAAO;EACH,MAAM;EACN,UAAU,OAAO,WAAW,IAAI,CAAC,SAAS,IAAI,CAAC,WAAW,MAAM;EAChE,YAAY;GACR,SAAS;IAAE,MAAM;IAAW,MAAM,CAAC,IAAI;GAAE;GACzC,MAAM,iBAAiB,MAAM;EACjC;CACJ;AACJ;;;ACSA,MAAM,+BAAe,IAAI,IAA6B;AACtD,MAAM,iCAAiB,IAAI,QAAyC;AAEpE,MAAa,gBAAgB;CACzB,SAAS,KAA+C;EACpD,MAAM,OAAO,IAAI,KA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AAQ;EACR,SAAS;CACb;CACA,SAASA,IAAE,OAAO;EACd,QAAQA,IAAE,OAAO,CAAC,CAAC,SAAS;EAC5B,WAAWA,IAAE,OAAO;CACxB,CAAC;AACL,CAAC;;;ACvDD,MAAa,2BAA2B,iBAAiB,uBAAuB;CAC5E,YAAY;CACZ,MAAM;EACF,aAAa;EACb,WAAW;EACX,QAAQ;EACR,SAAS;CACb;CACA,SAASC,IAAE,OAAO;EACd,SAASA,IAAE,OAAO;EAClB,QAAQA,IAAE,KAAK;GAAC;GAAO;GAAU;GAAW;EAAQ,CAAC;EACrD,gBAAgBA,IAAE,MAAMA,IAAE,OAAO,CAAC;EAClC,IAAIA,IAAE,OAAO,CAAC,CAAC,SAAS;CAC5B,CAAC;AACL,CAAC;AAED,MAAa,oBAAoB,iBAAiB,gBAAgB;CAC9D,YAAY;CACZ,MAAM;EACF,aAAa;EACb,WAAW;EACX,QAAQ;EACR,SAAS;CACb;CACA,SAASA,IAAE,OAAO;EACd,SAASA,IAAE,OAAO;EAClB,WAAWA,IAAE,OAAO;EACpB,SAASA,IAAE,OAAO,CAAC,CAAC,SAAS;CACjC,CAAC;AACL,CAAC;;;;;;;;;;ACvBD,MAAa,aAAaC,IAAE,KAAK;CAC7B;CACA;CACA;CACA;AACJ,CAAC;;;;;;;AAUD,MAAa,cAAcA,IAAE,KAAK;CAC9B;CACA;CACA;AACJ,CAAC;;;;;;;AAUD,MAAa,oBAAoBA,IAAE,KAAK;CACpC;CACA;CACA;AACJ,CAAC;;;;;;AASD,MAAa,iBAAiBA,IAAE,KAAK;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ,CAAC"}
1
+ {"version":3,"file":"index.mjs","names":["z","z","z","z","z","GroupIdSchema","ContactIdSchema","z"],"sources":["../src/client-config.ts","../src/output-json-schema.ts","../src/events/registry.ts","../src/events/messaging.ts","../src/events/state.ts","../src/events/groups.ts","../src/events/calls.ts","../src/events/whatsapp-events.ts","../src/events/polls.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';\n\n/** HTTP omits undefined results; void/undefined are not JSON data values. */\nexport function outputJsonSchema(schema: z.ZodType) {\n return z.toJSONSchema(schema, {\n target: 'openapi-3.0',\n unrepresentable: 'any',\n override: ({ zodSchema, jsonSchema }) => {\n const kind = zodSchema._zod.def.type;\n if (kind === 'void' || kind === 'undefined') {\n jsonSchema.not = {};\n jsonSchema.description = 'No JSON value; the response data property is omitted.';\n }\n },\n });\n}\n\nexport function successResponseSchema(schema: z.ZodType) {\n return {\n type: 'object',\n required: schema.isOptional() ? ['success'] : ['success', 'data'],\n properties: {\n success: { type: 'boolean', enum: [true] },\n data: outputJsonSchema(schema),\n },\n };\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 aliases?: 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 || def.meta.aliases?.includes(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 } from '../common-types';\n\n// Acknowledgements carry a message snapshot. Validate the delivery identity but\n// retain every message field, including fields absent from the static schema.\n// Requiring all received-message fields would discard updates for partially\n// loaded messages in WhatsApp's store.\nconst AckSchema = MessageSchema.pick({ id: true, ack: true }).passthrough()\n .describe('The full available message snapshot at acknowledgement time, including id, ack, body, sender and chat when supplied by WhatsApp.');\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';\nimport { ContactIdSchema, GroupIdSchema } from '../common-types';\n\nconst participantChatIdSchema = z.union([\n GroupIdSchema,\n z.object({ _serialized: GroupIdSchema }).passthrough(),\n]);\n\nexport const ParticipantChangeSchema = z.object({\n groupId: GroupIdSchema,\n action: z.enum(['add', 'remove', 'promote', 'demote', 'invite', 'leave']),\n participantIds: z.array(ContactIdSchema),\n by: z.string().optional(),\n who: ContactIdSchema.optional(),\n chat: participantChatIdSchema.optional(),\n}).passthrough();\nexport type ParticipantChange = z.infer<typeof ParticipantChangeSchema>;\n\n/** Adapt the existing patch callback without replacing its native listener. */\nexport const ParticipantChangePatchSchema = z.object({\n action: ParticipantChangeSchema.shape.action,\n who: ContactIdSchema,\n chat: participantChatIdSchema,\n by: z.string().optional(),\n}).passthrough().transform(change => ({\n ...change,\n groupId: typeof change.chat === 'string' ? change.chat : change.chat._serialized,\n participantIds: [change.who],\n})).pipe(ParticipantChangeSchema);\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 aliases: ['onGlobalParticipantsChanged'],\n },\n payload: ParticipantChangeSchema,\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 { CallSnapshotSchema } from '../calling';\nimport { projectEffectSchema } from '../effect-projection';\nimport { defineListenerV2 } from './registry';\n\nexport const incomingCallEvent = defineListenerV2('incomingCall', {\n legacyName: 'onIncomingCall', meta: { namespace: 'calls', license: 'restricted', status: 'experimental', description: 'A native incoming call. The SDK hydrates its bound controls.' },\n payload: projectEffectSchema(CallSnapshotSchema), defaultQueueOptions: { capacity: 32, concurrency: 1 },\n});\nexport const callStateEvent = defineListenerV2('callState', {\n legacyName: 'onCallState', meta: { namespace: 'calls', license: 'restricted', status: 'experimental', description: 'Observed native call state, including unknown states.' },\n payload: projectEffectSchema(CallSnapshotSchema), defaultQueueOptions: { capacity: 64, concurrency: 1 },\n});\n","import { WhatsAppEventRegistrySchema, EventResponseRegistrySchema } from '../whatsapp-event-registry';\nimport { defineListenerV2 } from './registry';\n\nexport const whatsappEvent = defineListenerV2('event', {\n legacyName: 'onEvent',\n meta: { namespace: 'events', license: 'none', status: 'beta', description: 'A native event added or changed in the synced message store, including this account’s events.' },\n payload: WhatsAppEventRegistrySchema, defaultQueueOptions: { concurrency: 1 },\n});\nexport const eventResponseEvent = defineListenerV2('eventResponse', {\n legacyName: 'onEventResponse',\n meta: { namespace: 'events', license: 'none', status: 'beta', description: 'A decrypted RSVP added or changed in WhatsApp’s dedicated event-response collection. History loads may emit responses too; deduplicate by id and timestamp.' },\n payload: EventResponseRegistrySchema, defaultQueueOptions: { concurrency: 1 },\n});\n","import { PollVoteSchema } from '../polls';\nimport { defineListenerV2 } from './registry';\n\nexport const pollVoteEvent = defineListenerV2('pollVote', {\n legacyName: 'onPollVote',\n meta: {\n namespace: 'messages', license: 'none', status: 'beta',\n description: 'A decrypted poll vote added or changed in the synced store. Hydration can emit old votes. Hidden-voter polls omit sender and message identifiers. Deduplicate ordinary votes by id and timestamp; refresh getPollResults for current totals.',\n },\n payload: PollVoteSchema, defaultQueueOptions: { concurrency: 1 },\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,SAAS,CAAC;CAGnD,IAAI,OAAO,OAAO,gBAAgB,UAC9B,OAAO,cAAc,SAAS,OAAO,aAAa,EAAE;CAGxD,IAAI,OAAO,iBAAiB,KAAA,GACxB,OAAO,eAAe;CAG1B,OAAO;AACX;;;;AC1BA,SAAgB,iBAAiB,QAAmB;CAChD,OAAOA,IAAE,aAAa,QAAQ;EAC1B,QAAQ;EACR,iBAAiB;EACjB,WAAW,EAAE,WAAW,iBAAiB;GACrC,MAAM,OAAO,UAAU,KAAK,IAAI;GAChC,IAAI,SAAS,UAAU,SAAS,aAAa;IACzC,WAAW,MAAM,CAAC;IAClB,WAAW,cAAc;GAC7B;EACJ;CACJ,CAAC;AACL;AAEA,SAAgB,sBAAsB,QAAmB;CACrD,OAAO;EACH,MAAM;EACN,UAAU,OAAO,WAAW,IAAI,CAAC,SAAS,IAAI,CAAC,WAAW,MAAM;EAChE,YAAY;GACR,SA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