@open-wa/schema 5.9.7 → 5.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/index.cjs +1 -1
- package/dist/generated/index.cjs.map +1 -1
- package/dist/generated/index.d.cts +141 -583
- package/dist/generated/index.d.cts.map +1 -1
- package/dist/generated/index.d.mts +141 -583
- package/dist/generated/index.d.mts.map +1 -1
- package/dist/generated/index.mjs +1 -1
- package/dist/generated/index.mjs.map +1 -1
- package/dist/{index-j2GMQzWY.d.mts → index-DlfSVhzo.d.mts} +53 -234
- package/dist/index-DlfSVhzo.d.mts.map +1 -0
- package/dist/{index-BR61SSKs.d.cts → index-JLPIa9s-.d.cts} +53 -234
- package/dist/index-JLPIa9s-.d.cts.map +1 -0
- package/dist/index.cjs +20 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +16 -10
- package/dist/index.mjs.map +1 -1
- package/dist/{interactive-DxUwKpzK.d.cts → interactive-BE_M4nur.d.cts} +14 -6
- package/dist/interactive-BE_M4nur.d.cts.map +1 -0
- package/dist/{interactive-DxUwKpzK.d.mts → interactive-BE_M4nur.d.mts} +14 -6
- package/dist/interactive-BE_M4nur.d.mts.map +1 -0
- package/dist/interactive-ClvvgmVP.cjs +630 -0
- package/dist/interactive-ClvvgmVP.cjs.map +1 -0
- package/dist/interactive-Dec4HB2U.mjs +475 -0
- package/dist/interactive-Dec4HB2U.mjs.map +1 -0
- package/dist/interactive.cjs +26 -304
- package/dist/interactive.d.cts +2 -2
- package/dist/interactive.d.mts +2 -2
- package/dist/interactive.mjs +2 -283
- package/dist/methods/index.cjs +1 -1
- package/dist/methods/index.d.cts +1 -1
- package/dist/methods/index.d.mts +1 -1
- package/dist/methods/index.mjs +1 -1
- package/dist/{methods-D4XLSUxh.cjs → methods-CILSsPyT.cjs} +27 -93
- package/dist/methods-CILSsPyT.cjs.map +1 -0
- package/dist/{methods-CpeSpB2P.mjs → methods-L7ijqbZM.mjs} +19 -79
- package/dist/methods-L7ijqbZM.mjs.map +1 -0
- package/package.json +3 -3
- package/src/__tests__/booking-time.contract.test.ts +88 -0
- package/src/__tests__/generators.contract.test.ts +82 -45
- package/src/booking-time.ts +39 -0
- package/src/common-types.ts +1 -1
- package/src/effect-projection.ts +90 -47
- package/src/events/asyncapi.ts +2 -2
- package/src/events/contracts.ts +10 -3
- package/src/events/polls.ts +1 -1
- package/src/generated/BaseClient.ts +12 -12
- package/src/generated/asyncapi.json +206 -95
- package/src/generated/openapi.json +1702 -1337
- package/src/interactive.ts +12 -1
- package/src/methods/calls.ts +4 -4
- package/src/methods/contacts.ts +1 -1
- package/src/methods/groups.ts +2 -2
- package/src/methods/messaging.ts +7 -7
- package/src/methods/session.ts +1 -1
- package/src/methods/whatsapp-events.ts +1 -1
- package/src/parameters.ts +2 -2
- package/src/return-types.ts +1 -1
- package/dist/index-BR61SSKs.d.cts.map +0 -1
- package/dist/index-j2GMQzWY.d.mts.map +0 -1
- package/dist/interactive-DxUwKpzK.d.cts.map +0 -1
- package/dist/interactive-DxUwKpzK.d.mts.map +0 -1
- package/dist/interactive.cjs.map +0 -1
- package/dist/interactive.mjs.map +0 -1
- package/dist/methods-CpeSpB2P.mjs.map +0 -1
- package/dist/methods-D4XLSUxh.cjs.map +0 -1
package/dist/methods/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $a as sendTextWithMentions, $i as getChat, $r as deleteAllStatus, Aa as pinMessage, Ai as revokeGroupInviteLink, Ar as getConnectionState, Ba as sendImage, Bi as getBlockedIds, Br as getWAVersion, Ca as getMessagesForLLM, Ci as getGroupMembersId, Cr as SendInteractiveInputSchema, Da as getUnsentMessages, Di as promoteParticipant, Dr as decryptMedia, Ea as getStarredMessages, Ei as leaveGroup, Er as sendRawMessage, Fa as sendBanner, Fi as setGroupToAdminsOnly, Fr as getLoadedMessageCount, Ga as sendMultipleContacts, Gi as requestPhoneNumber, Gr as setProfilePicture, Ha as sendListMessage, Hi as getContact, Hr as isPlugged, Ia as sendButtons, Ii as blockContact, Ir as getMe, Ja as sendPtt, Ji as archiveChat, Jr as getOrder, Ka as sendPaymentRequest, Ki as sharePhoneNumber, Kr as getBusinessProducts, La as sendContact, Li as checkNumberStatus, Lr as getProcessStats, Ma as sendAdvancedButtons, Mi as setGroupEditToAdminsOnly, Mr as getHostNumber, Na as sendAlbum, Ni as setGroupIcon, Nr as getLicenseFeatures, Oa as getVCards, Oi as rejectGroupJoinRequest, Or as downloadMedia, Pa as sendAudio, Pi as setGroupTitle, Pr as getLicenseType, Qa as sendText, Qi as getAllChats, Qr as removeLabel, Ra as sendFile, Ri as checkReadReceipts, Rr as getSnapshot, Sa as getMessageInfo, Si as getGroupMembers, Sr as stopCallAudioObserver, Ta as getPollResults, Ti as joinGroupViaLink, Tr as sendInteractive, Ua as sendLocation, Ui as getNumberProfile, Ur as setMyName, Va as sendLinkWithAutoPreview, Vi as getCommonGroups, Vr as healthCheck, Wa as sendMessageWithThumb, Wi as getProfilePicture, Wr as setMyStatus, Xa as sendSeen, Xi as deleteChat, Xr as getAllLabels, Ya as sendReplyWithMentions, Yi as clearChat, Yr as addLabel, Za as sendSticker, Zi as getAllChatIds, Zr as getChatsByLabel, _a as editMessage, _i as demoteParticipant, _r as muteCall, aa as pinChat, ai as postVideoStatus, ao as unstarMessage, ar as cancelEvent, ba as getAllMessages, bi as getGroupInfo, br as setCallMedia, ca as unmuteChat, ci as getCommunityAdmins, cr as getEventResponses, da as AlbumMediaSchema, di as getCommunityParticipants, dr as sendEvent, ea as getChatWithNonContacts, ei as deleteStatus, eo as sendVCard, fa as AlbumSendResult, fi as GroupInfo, fr as acceptCall, ga as deleteMessage, gi as createGroup, gr as getCallCapabilities, ha as StickerJobSchema, hi as approveGroupJoinRequest, hr as getActiveCall, ia as muteChat, ii as postTextStatus, io as unpinMessage, ja as react, ji as setGroupDescription, jr as getFeatures, ka as loadEarlierMessages, ki as removeParticipant, kr as getBatteryLevel, la as unpinChat, li as getCommunityInfo, lr as getEvents, ma as SendTextResultSchema, mi as addParticipant, mr as endCall, na as markAsRead, ni as getStories, no as sendYouTubeLink, oa as setChatEphemeral, oi as getAllCommunities, oo as voteOnPoll, or as editEvent, pa as AlbumSendResultSchema, pi as GroupInfoSchema, pr as clearCallAudio, qa as sendPoll, qi as unblockContact, qr as getBusinessProfile, ra as markAsUnread, ri as postImageStatus, ro as starMessage, sa as unarchiveChat, si as getCommunityAdminIds, sr as getEvent, ta as isChatOnline, ti as getStatus, to as sendVideoAsGif, ua as AlbumMedia, ui as getCommunityParticipantIds, ur as respondToEvent, va as forwardMessages, vi as getAllGroups, vr as observeCallAudio, wa as getMyLastMessage, wi as getKickedGroups, wr as SendRawMessageInputSchema, xa as getMessageById, xi as getGroupInviteLink, xr as startCall, ya as getAlbumMessages, yi as getGroupAdmins, yr as rejectCall, za as sendFileFromUrl, zi as getAllContacts, zr as getUserAgent } from "../index-
|
|
1
|
+
import { $a as sendTextWithMentions, $i as getChat, $r as deleteAllStatus, Aa as pinMessage, Ai as revokeGroupInviteLink, Ar as getConnectionState, Ba as sendImage, Bi as getBlockedIds, Br as getWAVersion, Ca as getMessagesForLLM, Ci as getGroupMembersId, Cr as SendInteractiveInputSchema, Da as getUnsentMessages, Di as promoteParticipant, Dr as decryptMedia, Ea as getStarredMessages, Ei as leaveGroup, Er as sendRawMessage, Fa as sendBanner, Fi as setGroupToAdminsOnly, Fr as getLoadedMessageCount, Ga as sendMultipleContacts, Gi as requestPhoneNumber, Gr as setProfilePicture, Ha as sendListMessage, Hi as getContact, Hr as isPlugged, Ia as sendButtons, Ii as blockContact, Ir as getMe, Ja as sendPtt, Ji as archiveChat, Jr as getOrder, Ka as sendPaymentRequest, Ki as sharePhoneNumber, Kr as getBusinessProducts, La as sendContact, Li as checkNumberStatus, Lr as getProcessStats, Ma as sendAdvancedButtons, Mi as setGroupEditToAdminsOnly, Mr as getHostNumber, Na as sendAlbum, Ni as setGroupIcon, Nr as getLicenseFeatures, Oa as getVCards, Oi as rejectGroupJoinRequest, Or as downloadMedia, Pa as sendAudio, Pi as setGroupTitle, Pr as getLicenseType, Qa as sendText, Qi as getAllChats, Qr as removeLabel, Ra as sendFile, Ri as checkReadReceipts, Rr as getSnapshot, Sa as getMessageInfo, Si as getGroupMembers, Sr as stopCallAudioObserver, Ta as getPollResults, Ti as joinGroupViaLink, Tr as sendInteractive, Ua as sendLocation, Ui as getNumberProfile, Ur as setMyName, Va as sendLinkWithAutoPreview, Vi as getCommonGroups, Vr as healthCheck, Wa as sendMessageWithThumb, Wi as getProfilePicture, Wr as setMyStatus, Xa as sendSeen, Xi as deleteChat, Xr as getAllLabels, Ya as sendReplyWithMentions, Yi as clearChat, Yr as addLabel, Za as sendSticker, Zi as getAllChatIds, Zr as getChatsByLabel, _a as editMessage, _i as demoteParticipant, _r as muteCall, aa as pinChat, ai as postVideoStatus, ao as unstarMessage, ar as cancelEvent, ba as getAllMessages, bi as getGroupInfo, br as setCallMedia, ca as unmuteChat, ci as getCommunityAdmins, cr as getEventResponses, da as AlbumMediaSchema, di as getCommunityParticipants, dr as sendEvent, ea as getChatWithNonContacts, ei as deleteStatus, eo as sendVCard, fa as AlbumSendResult, fi as GroupInfo, fr as acceptCall, ga as deleteMessage, gi as createGroup, gr as getCallCapabilities, ha as StickerJobSchema, hi as approveGroupJoinRequest, hr as getActiveCall, ia as muteChat, ii as postTextStatus, io as unpinMessage, ja as react, ji as setGroupDescription, jr as getFeatures, ka as loadEarlierMessages, ki as removeParticipant, kr as getBatteryLevel, la as unpinChat, li as getCommunityInfo, lr as getEvents, ma as SendTextResultSchema, mi as addParticipant, mr as endCall, na as markAsRead, ni as getStories, no as sendYouTubeLink, oa as setChatEphemeral, oi as getAllCommunities, oo as voteOnPoll, or as editEvent, pa as AlbumSendResultSchema, pi as GroupInfoSchema, pr as clearCallAudio, qa as sendPoll, qi as unblockContact, qr as getBusinessProfile, ra as markAsUnread, ri as postImageStatus, ro as starMessage, sa as unarchiveChat, si as getCommunityAdminIds, sr as getEvent, ta as isChatOnline, ti as getStatus, to as sendVideoAsGif, ua as AlbumMedia, ui as getCommunityParticipantIds, ur as respondToEvent, va as forwardMessages, vi as getAllGroups, vr as observeCallAudio, wa as getMyLastMessage, wi as getKickedGroups, wr as SendRawMessageInputSchema, xa as getMessageById, xi as getGroupInviteLink, xr as startCall, ya as getAlbumMessages, yi as getGroupAdmins, yr as rejectCall, za as sendFileFromUrl, zi as getAllContacts, zr as getUserAgent } from "../index-DlfSVhzo.mjs";
|
|
2
2
|
export { AlbumMedia, AlbumMediaSchema, AlbumSendResult, AlbumSendResultSchema, GroupInfo, GroupInfoSchema, SendInteractiveInputSchema, SendRawMessageInputSchema, SendTextResultSchema, StickerJobSchema, acceptCall, addLabel, addParticipant, approveGroupJoinRequest, archiveChat, blockContact, cancelEvent, checkNumberStatus, checkReadReceipts, clearCallAudio, clearChat, createGroup, decryptMedia, deleteAllStatus, deleteChat, deleteMessage, deleteStatus, demoteParticipant, downloadMedia, editEvent, editMessage, endCall, 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, getEvent, getEventResponses, getEvents, getFeatures, getGroupAdmins, getGroupInfo, getGroupInviteLink, getGroupMembers, getGroupMembersId, getHostNumber, getKickedGroups, getLicenseFeatures, getLicenseType, getLoadedMessageCount, getMe, getMessageById, getMessageInfo, getMessagesForLLM, getMyLastMessage, getNumberProfile, getOrder, getPollResults, getProcessStats, getProfilePicture, getSnapshot, getStarredMessages, getStatus, getStories, getUnsentMessages, getUserAgent, getVCards, getWAVersion, healthCheck, isChatOnline, isPlugged, joinGroupViaLink, leaveGroup, loadEarlierMessages, markAsRead, markAsUnread, muteCall, muteChat, observeCallAudio, pinChat, pinMessage, postImageStatus, postTextStatus, postVideoStatus, promoteParticipant, react, 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, setCallMedia, setChatEphemeral, setGroupDescription, setGroupEditToAdminsOnly, setGroupIcon, setGroupTitle, setGroupToAdminsOnly, setMyName, setMyStatus, setProfilePicture, sharePhoneNumber, starMessage, startCall, stopCallAudioObserver, unarchiveChat, unblockContact, unmuteChat, unpinChat, unpinMessage, unstarMessage, voteOnPoll };
|
package/dist/methods/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as getBusinessProfile, $n as sendSeen, $t as archiveChat, A as sendInteractive, An as getUnsentMessages, At as joinGroupViaLink, B as getLoadedMessageCount, Bn as sendContact, Bt as setGroupToAdminsOnly, Cn as getAllMessages, Ct as getAllGroups, Dn as getMyLastMessage, Dt as getGroupMembers, En as getMessagesForLLM, Et as getGroupInviteLink, F as getConnectionState, Fn as sendAdvancedButtons, Ft as revokeGroupInviteLink, G as getWAVersion, Gn as sendListMessage, Gt as getBlockedIds, H as getProcessStats, Hn as sendFileFromUrl, Ht as checkNumberStatus, I as getFeatures, In as sendAlbum, It as setGroupDescription, J as setMyName, Jn as sendMultipleContacts, Jt as getNumberProfile, K as healthCheck, Kn as sendLocation, Kt as getCommonGroups, L as getHostNumber, Ln as sendAudio, Lt as setGroupEditToAdminsOnly, M as decryptMedia, Mn as loadEarlierMessages, Mt as promoteParticipant, N as downloadMedia, Nn as pinMessage, Nt as rejectGroupJoinRequest, O as SendInteractiveInputSchema, On as getPollResults, Ot as getGroupMembersId, P as getBatteryLevel, Pn as react, Pt as removeParticipant, Q as getBusinessProducts, Qn as sendReplyWithMentions, Qt as unblockContact, R as getLicenseFeatures, Rn as sendBanner, Rt as setGroupIcon, Sn as getAlbumMessages, St as demoteParticipant, Tn as getMessageInfo, Tt as getGroupInfo, U as getSnapshot, Un as sendImage, Ut as checkReadReceipts, V as getMe, Vn as sendFile, Vt as blockContact, W as getUserAgent, Wn as sendLinkWithAutoPreview, Wt as getAllContacts, X as setProfilePicture, Xn as sendPoll, Xt as requestPhoneNumber, Y as setMyStatus, Yn as sendPaymentRequest, Yt as getProfilePicture, Zn as sendPtt, Zt as sharePhoneNumber, _ as startCall, _n as SendTextResultSchema, _t as getCommunityParticipants, a as getEvents, an as getChatWithNonContacts, ar as sendYouTubeLink, at as deleteAllStatus, bn as editMessage, bt as approveGroupJoinRequest, c as acceptCall, cn as markAsUnread, cr as unstarMessage, ct as getStories, d as getActiveCall, dn as setChatEphemeral, dt as postVideoStatus, en as clearChat, er as sendSticker, et as getOrder, f as getCallCapabilities, fn as unarchiveChat, ft as getAllCommunities, g as setCallMedia, gn as AlbumSendResultSchema, gt as getCommunityParticipantIds, h as rejectCall, hn as AlbumMediaSchema, ht as getCommunityInfo, i as getEventResponses, in as getChat, ir as sendVideoAsGif, it as removeLabel, j as sendRawMessage, jn as getVCards, jt as leaveGroup, k as SendRawMessageInputSchema, kn as getStarredMessages, kt as getKickedGroups, l as clearCallAudio, ln as muteChat, lr as voteOnPoll, lt as postImageStatus, m as observeCallAudio, mn as unpinChat, mt as getCommunityAdmins, n as editEvent, nn as getAllChatIds, nr as sendTextWithMentions, nt as getAllLabels, o as respondToEvent, on as isChatOnline, or as starMessage, ot as deleteStatus, p as muteCall, pn as unmuteChat, pt as getCommunityAdminIds, q as isPlugged, qn as sendMessageWithThumb, qt as getContact, r as getEvent, rn as getAllChats, rr as sendVCard, rt as getChatsByLabel, s as sendEvent, sn as markAsRead, sr as unpinMessage, st as getStatus, t as cancelEvent, tn as deleteChat, tr as sendText, tt as addLabel, u as endCall, un as pinChat, ut as postTextStatus, v as stopCallAudioObserver, vn as StickerJobSchema, vt as GroupInfoSchema, wn as getMessageById, wt as getGroupAdmins, xn as forwardMessages, xt as createGroup, yn as deleteMessage, yt as addParticipant, z as getLicenseType, zn as sendButtons, zt as setGroupTitle } from "../methods-
|
|
1
|
+
import { $ as getBusinessProfile, $n as sendSeen, $t as archiveChat, A as sendInteractive, An as getUnsentMessages, At as joinGroupViaLink, B as getLoadedMessageCount, Bn as sendContact, Bt as setGroupToAdminsOnly, Cn as getAllMessages, Ct as getAllGroups, Dn as getMyLastMessage, Dt as getGroupMembers, En as getMessagesForLLM, Et as getGroupInviteLink, F as getConnectionState, Fn as sendAdvancedButtons, Ft as revokeGroupInviteLink, G as getWAVersion, Gn as sendListMessage, Gt as getBlockedIds, H as getProcessStats, Hn as sendFileFromUrl, Ht as checkNumberStatus, I as getFeatures, In as sendAlbum, It as setGroupDescription, J as setMyName, Jn as sendMultipleContacts, Jt as getNumberProfile, K as healthCheck, Kn as sendLocation, Kt as getCommonGroups, L as getHostNumber, Ln as sendAudio, Lt as setGroupEditToAdminsOnly, M as decryptMedia, Mn as loadEarlierMessages, Mt as promoteParticipant, N as downloadMedia, Nn as pinMessage, Nt as rejectGroupJoinRequest, O as SendInteractiveInputSchema, On as getPollResults, Ot as getGroupMembersId, P as getBatteryLevel, Pn as react, Pt as removeParticipant, Q as getBusinessProducts, Qn as sendReplyWithMentions, Qt as unblockContact, R as getLicenseFeatures, Rn as sendBanner, Rt as setGroupIcon, Sn as getAlbumMessages, St as demoteParticipant, Tn as getMessageInfo, Tt as getGroupInfo, U as getSnapshot, Un as sendImage, Ut as checkReadReceipts, V as getMe, Vn as sendFile, Vt as blockContact, W as getUserAgent, Wn as sendLinkWithAutoPreview, Wt as getAllContacts, X as setProfilePicture, Xn as sendPoll, Xt as requestPhoneNumber, Y as setMyStatus, Yn as sendPaymentRequest, Yt as getProfilePicture, Zn as sendPtt, Zt as sharePhoneNumber, _ as startCall, _n as SendTextResultSchema, _t as getCommunityParticipants, a as getEvents, an as getChatWithNonContacts, ar as sendYouTubeLink, at as deleteAllStatus, bn as editMessage, bt as approveGroupJoinRequest, c as acceptCall, cn as markAsUnread, cr as unstarMessage, ct as getStories, d as getActiveCall, dn as setChatEphemeral, dt as postVideoStatus, en as clearChat, er as sendSticker, et as getOrder, f as getCallCapabilities, fn as unarchiveChat, ft as getAllCommunities, g as setCallMedia, gn as AlbumSendResultSchema, gt as getCommunityParticipantIds, h as rejectCall, hn as AlbumMediaSchema, ht as getCommunityInfo, i as getEventResponses, in as getChat, ir as sendVideoAsGif, it as removeLabel, j as sendRawMessage, jn as getVCards, jt as leaveGroup, k as SendRawMessageInputSchema, kn as getStarredMessages, kt as getKickedGroups, l as clearCallAudio, ln as muteChat, lr as voteOnPoll, lt as postImageStatus, m as observeCallAudio, mn as unpinChat, mt as getCommunityAdmins, n as editEvent, nn as getAllChatIds, nr as sendTextWithMentions, nt as getAllLabels, o as respondToEvent, on as isChatOnline, or as starMessage, ot as deleteStatus, p as muteCall, pn as unmuteChat, pt as getCommunityAdminIds, q as isPlugged, qn as sendMessageWithThumb, qt as getContact, r as getEvent, rn as getAllChats, rr as sendVCard, rt as getChatsByLabel, s as sendEvent, sn as markAsRead, sr as unpinMessage, st as getStatus, t as cancelEvent, tn as deleteChat, tr as sendText, tt as addLabel, u as endCall, un as pinChat, ut as postTextStatus, v as stopCallAudioObserver, vn as StickerJobSchema, vt as GroupInfoSchema, wn as getMessageById, wt as getGroupAdmins, xn as forwardMessages, xt as createGroup, yn as deleteMessage, yt as addParticipant, z as getLicenseType, zn as sendButtons, zt as setGroupTitle } from "../methods-L7ijqbZM.mjs";
|
|
2
2
|
export { AlbumMediaSchema, AlbumSendResultSchema, GroupInfoSchema, SendInteractiveInputSchema, SendRawMessageInputSchema, SendTextResultSchema, StickerJobSchema, acceptCall, addLabel, addParticipant, approveGroupJoinRequest, archiveChat, blockContact, cancelEvent, checkNumberStatus, checkReadReceipts, clearCallAudio, clearChat, createGroup, decryptMedia, deleteAllStatus, deleteChat, deleteMessage, deleteStatus, demoteParticipant, downloadMedia, editEvent, editMessage, endCall, 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, getEvent, getEventResponses, getEvents, getFeatures, getGroupAdmins, getGroupInfo, getGroupInviteLink, getGroupMembers, getGroupMembersId, getHostNumber, getKickedGroups, getLicenseFeatures, getLicenseType, getLoadedMessageCount, getMe, getMessageById, getMessageInfo, getMessagesForLLM, getMyLastMessage, getNumberProfile, getOrder, getPollResults, getProcessStats, getProfilePicture, getSnapshot, getStarredMessages, getStatus, getStories, getUnsentMessages, getUserAgent, getVCards, getWAVersion, healthCheck, isChatOnline, isPlugged, joinGroupViaLink, leaveGroup, loadEarlierMessages, markAsRead, markAsUnread, muteCall, muteChat, observeCallAudio, pinChat, pinMessage, postImageStatus, postTextStatus, postVideoStatus, promoteParticipant, react, 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, setCallMedia, setChatEphemeral, setGroupDescription, setGroupEditToAdminsOnly, setGroupIcon, setGroupTitle, setGroupToAdminsOnly, setMyName, setMyStatus, setProfilePicture, sharePhoneNumber, starMessage, startCall, stopCallAudioObserver, unarchiveChat, unblockContact, unmuteChat, unpinChat, unpinMessage, unstarMessage, voteOnPoll };
|
|
@@ -1,67 +1,8 @@
|
|
|
1
1
|
const require_registry = require("./registry-_s9a7_jl.cjs");
|
|
2
|
-
const require_interactive = require("./interactive.cjs");
|
|
2
|
+
const require_interactive = require("./interactive-ClvvgmVP.cjs");
|
|
3
3
|
let zod = require("zod");
|
|
4
4
|
let effect = require("effect");
|
|
5
5
|
let _open_wa_utils = require("@open-wa/utils");
|
|
6
|
-
//#region src/effect-projection.ts
|
|
7
|
-
/** Project Effect contracts into the serving method and listener registry. */
|
|
8
|
-
function projectEffectSchema(schema) {
|
|
9
|
-
if ("fields" in schema) {
|
|
10
|
-
const fields = schema.fields;
|
|
11
|
-
const shape = Object.fromEntries(Object.entries(fields).map(([name, field]) => {
|
|
12
|
-
const optional = field.ast.context?.isOptional === true;
|
|
13
|
-
const hasUndefined = field.ast._tag === "Union" && field.ast.types.some((member) => member._tag === "Undefined");
|
|
14
|
-
const value = projectEffectSchema(!optional ? field : hasUndefined ? effect.Schema.required(field) : effect.Schema.requiredKey(field));
|
|
15
|
-
return [name, optional ? value.optional() : value];
|
|
16
|
-
}));
|
|
17
|
-
return zod.z.object(shape);
|
|
18
|
-
}
|
|
19
|
-
const document = effect.Schema.toJsonSchemaDocument(schema);
|
|
20
|
-
const project = (node) => {
|
|
21
|
-
if (node.$ref) {
|
|
22
|
-
const key = node.$ref.split("/").at(-1);
|
|
23
|
-
return project(document.definitions[key]);
|
|
24
|
-
}
|
|
25
|
-
if ("const" in node) return zod.z.literal(node.const);
|
|
26
|
-
if (node.enum) return zod.z.union(node.enum.map((value) => zod.z.literal(value)));
|
|
27
|
-
const members = node.anyOf ?? node.oneOf;
|
|
28
|
-
if (members) return zod.z.union(members.map(project));
|
|
29
|
-
switch (node.type) {
|
|
30
|
-
case "string": {
|
|
31
|
-
let value = zod.z.string();
|
|
32
|
-
if (node.minLength !== void 0) value = value.min(node.minLength);
|
|
33
|
-
if (node.maxLength !== void 0) value = value.max(node.maxLength);
|
|
34
|
-
return value;
|
|
35
|
-
}
|
|
36
|
-
case "number":
|
|
37
|
-
case "integer": {
|
|
38
|
-
let value = node.type === "integer" ? zod.z.number().int() : zod.z.number();
|
|
39
|
-
if (node.minimum !== void 0) value = value.min(node.minimum);
|
|
40
|
-
if (node.maximum !== void 0) value = value.max(node.maximum);
|
|
41
|
-
if (node.exclusiveMinimum !== void 0) value = value.gt(node.exclusiveMinimum);
|
|
42
|
-
if (node.exclusiveMaximum !== void 0) value = value.lt(node.exclusiveMaximum);
|
|
43
|
-
return value;
|
|
44
|
-
}
|
|
45
|
-
case "boolean": return zod.z.boolean();
|
|
46
|
-
case "null": return zod.z.null();
|
|
47
|
-
case "array": return zod.z.array(project(node.items ?? {}));
|
|
48
|
-
case "object": {
|
|
49
|
-
const properties = node.properties ?? {};
|
|
50
|
-
const values = typeof node.additionalProperties === "object" ? project(node.additionalProperties) : node.additionalProperties ? zod.z.unknown() : void 0;
|
|
51
|
-
if (!Object.keys(properties).length && values) return zod.z.record(zod.z.string(), values);
|
|
52
|
-
const required = new Set(node.required ?? []);
|
|
53
|
-
const object = zod.z.object(Object.fromEntries(Object.entries(properties).map(([key, value]) => {
|
|
54
|
-
const field = project(value);
|
|
55
|
-
return [key, required.has(key) ? field : field.optional()];
|
|
56
|
-
})));
|
|
57
|
-
return values ? object.catchall(values) : object;
|
|
58
|
-
}
|
|
59
|
-
default: return zod.z.unknown();
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
return project(document.schema);
|
|
63
|
-
}
|
|
64
|
-
//#endregion
|
|
65
6
|
//#region src/whatsapp-events.ts
|
|
66
7
|
const id = effect.Schema.String.check(effect.Schema.isMinLength(1));
|
|
67
8
|
const seconds = effect.Schema.Number.check(effect.Schema.isInt(), effect.Schema.isGreaterThanOrEqualTo(0), effect.Schema.isLessThanOrEqualTo(2147483647));
|
|
@@ -152,7 +93,7 @@ const serializeEventResponse = (response) => JSON.stringify(effect.Schema.encode
|
|
|
152
93
|
const deserializeEventResponse = (json) => decodeEventResponse(JSON.parse(json));
|
|
153
94
|
//#endregion
|
|
154
95
|
//#region src/whatsapp-event-registry.ts
|
|
155
|
-
const EventInputRegistrySchema = projectEffectSchema(EventInputSchema).superRefine((value, ctx) => {
|
|
96
|
+
const EventInputRegistrySchema = require_interactive.projectEffectSchema(EventInputSchema).superRefine((value, ctx) => {
|
|
156
97
|
try {
|
|
157
98
|
validateEventInput(value);
|
|
158
99
|
} catch (error) {
|
|
@@ -166,7 +107,7 @@ const EventInputRegistrySchema = projectEffectSchema(EventInputSchema).superRefi
|
|
|
166
107
|
startTime: 1893456e3,
|
|
167
108
|
description: "Meet the community"
|
|
168
109
|
}] });
|
|
169
|
-
const EventUpdateRegistrySchema = projectEffectSchema(EventUpdateSchema).superRefine((value, ctx) => {
|
|
110
|
+
const EventUpdateRegistrySchema = require_interactive.projectEffectSchema(EventUpdateSchema).superRefine((value, ctx) => {
|
|
170
111
|
try {
|
|
171
112
|
validateEventUpdate(value);
|
|
172
113
|
} catch (error) {
|
|
@@ -176,10 +117,10 @@ const EventUpdateRegistrySchema = projectEffectSchema(EventUpdateSchema).superRe
|
|
|
176
117
|
});
|
|
177
118
|
}
|
|
178
119
|
}).meta({ examples: [{ description: "Updated meetup details" }] });
|
|
179
|
-
const WhatsAppEventRegistrySchema = projectEffectSchema(WhatsAppEventSchema);
|
|
180
|
-
const EventResponseRegistrySchema = projectEffectSchema(EventResponseSchema);
|
|
181
|
-
const EventListOptionsRegistrySchema = projectEffectSchema(EventListOptionsSchema);
|
|
182
|
-
const EventPageRegistrySchema = projectEffectSchema(EventPageSchema);
|
|
120
|
+
const WhatsAppEventRegistrySchema = require_interactive.projectEffectSchema(WhatsAppEventSchema);
|
|
121
|
+
const EventResponseRegistrySchema = require_interactive.projectEffectSchema(EventResponseSchema);
|
|
122
|
+
const EventListOptionsRegistrySchema = require_interactive.projectEffectSchema(EventListOptionsSchema);
|
|
123
|
+
const EventPageRegistrySchema = require_interactive.projectEffectSchema(EventPageSchema);
|
|
183
124
|
//#endregion
|
|
184
125
|
//#region src/common-types.ts
|
|
185
126
|
const ContactIdSchema$1 = zod.z.string().brand("ContactId").describe("Opaque WhatsApp contact identifier. Preserve the exact value returned by the API.");
|
|
@@ -392,7 +333,7 @@ const ContactSchema = zod.z.object({
|
|
|
392
333
|
msgs: zod.z.array(zod.z.unknown()).nullable().optional(),
|
|
393
334
|
profilePicThumbObj: zod.z.object({
|
|
394
335
|
eurl: zod.z.string().optional(),
|
|
395
|
-
id:
|
|
336
|
+
id: ContactIdSchema$1.optional().describe("Serialized contact ID returned by the profile-picture serializer"),
|
|
396
337
|
img: zod.z.string().optional(),
|
|
397
338
|
imgFull: zod.z.string().optional(),
|
|
398
339
|
tag: zod.z.string().optional()
|
|
@@ -517,7 +458,6 @@ const HealthCheckSchema = zod.z.object({
|
|
|
517
458
|
state: zod.z.string().optional(),
|
|
518
459
|
isPhoneDisconnected: zod.z.boolean().optional(),
|
|
519
460
|
isHere: zod.z.boolean().optional(),
|
|
520
|
-
wapiInjected: zod.z.boolean().optional(),
|
|
521
461
|
online: zod.z.boolean().optional(),
|
|
522
462
|
tryingToReachPhone: zod.z.boolean().optional(),
|
|
523
463
|
retryingIn: zod.z.number().optional(),
|
|
@@ -952,7 +892,7 @@ const messageIdsParam = zod.z.union([zod.z.array(messageIdParam), messageIdParam
|
|
|
952
892
|
keyAliases: ["messages"]
|
|
953
893
|
});
|
|
954
894
|
const mentionedJidListParam = zod.z.array(contactIdParam).optional().describe("List of mentioned contact IDs").register(require_registry.parameterRegistry, { example: ["447123456789@c.us", "441234567890@c.us"] });
|
|
955
|
-
const messageOptionsParam = zod.z.unknown().optional().describe("
|
|
895
|
+
const messageOptionsParam = zod.z.unknown().optional().describe("Not used. Leave it out; use reply() for quoted replies and sendTextWithMentions() for mentions.").register(require_registry.parameterRegistry, { formatDescription: "sendText ignores this value." });
|
|
956
896
|
//#endregion
|
|
957
897
|
//#region src/methods/messaging.ts
|
|
958
898
|
/** The normalized serialized message key returned by the public sendText client. */
|
|
@@ -966,7 +906,7 @@ const StickerJobSchema = zod.z.object({
|
|
|
966
906
|
"auto",
|
|
967
907
|
"browser",
|
|
968
908
|
"standalone"
|
|
969
|
-
]).optional().describe("
|
|
909
|
+
]).optional().describe("Where the sticker is rendered. `auto` (the default) picks the best option for the whole job."),
|
|
970
910
|
quality: zod.z.number().min(.01).max(1).optional().describe("Maximum encoding quality; encoding can reduce quality to meet sticker byte limits."),
|
|
971
911
|
fit: zod.z.enum(["contain", "cover"]).optional(),
|
|
972
912
|
circle: zod.z.boolean().optional(),
|
|
@@ -980,7 +920,7 @@ const StickerJobSchema = zod.z.object({
|
|
|
980
920
|
}).strict();
|
|
981
921
|
const sendSticker = require_registry.defineMethodV2("sendSticker", {
|
|
982
922
|
meta: {
|
|
983
|
-
description: "
|
|
923
|
+
description: "Turn an image or video into a sticker, apply optional effects and author and pack labels, and send it. Resolves to the message ID once WhatsApp accepts it, not a delivery receipt. If the outcome is unknown, check the chat before you retry.",
|
|
984
924
|
action: "send",
|
|
985
925
|
namespace: "messages",
|
|
986
926
|
license: "none",
|
|
@@ -1040,7 +980,7 @@ const sendAlbum = require_registry.defineMethodV2("sendAlbum", {
|
|
|
1040
980
|
*/
|
|
1041
981
|
const sendText = require_registry.defineMethodV2("sendText", {
|
|
1042
982
|
meta: {
|
|
1043
|
-
description: "
|
|
983
|
+
description: "Send a text message to a chat. Starting a chat with a number that has never messaged you needs a Restricted or Premium license.",
|
|
1044
984
|
action: "send",
|
|
1045
985
|
namespace: "messages",
|
|
1046
986
|
license: "none",
|
|
@@ -1144,7 +1084,7 @@ const sendPaymentRequest = require_registry.defineMethodV2("sendPaymentRequest",
|
|
|
1144
1084
|
*/
|
|
1145
1085
|
const sendImage = require_registry.defineMethodV2("sendImage", {
|
|
1146
1086
|
meta: {
|
|
1147
|
-
description: "
|
|
1087
|
+
description: "Send an image or video, or any other media file, as a WhatsApp attachment. Options set the caption, view once, GIF playback or a round video note. Media is sent as is, without conversion. Resolves to the send result, not a delivery receipt.",
|
|
1148
1088
|
action: "send",
|
|
1149
1089
|
namespace: "messages",
|
|
1150
1090
|
license: "none",
|
|
@@ -1458,7 +1398,7 @@ const sendListMessage = require_registry.defineMethodV2("sendListMessage", {
|
|
|
1458
1398
|
*/
|
|
1459
1399
|
const sendPoll = require_registry.defineMethodV2("sendPoll", {
|
|
1460
1400
|
meta: {
|
|
1461
|
-
description: "
|
|
1401
|
+
description: "Send a poll with a selection limit, an optional quoted message, an optional closing time in Unix milliseconds and optionally hidden voter names. Closing times and hidden names only work where WhatsApp supports them for the sending account and chat.",
|
|
1462
1402
|
action: "send",
|
|
1463
1403
|
namespace: "messages",
|
|
1464
1404
|
license: "none",
|
|
@@ -1506,7 +1446,7 @@ const voteOnPoll = require_registry.defineMethodV2("voteOnPoll", {
|
|
|
1506
1446
|
});
|
|
1507
1447
|
const getPollResults = require_registry.defineMethodV2("getPollResults", {
|
|
1508
1448
|
meta: {
|
|
1509
|
-
description: "
|
|
1449
|
+
description: "Get the current counts, choices and votes for a poll. Polls with hidden voters leave out voter identities and the votes array, and very recent votes may not appear yet.",
|
|
1510
1450
|
action: "get",
|
|
1511
1451
|
namespace: "messages",
|
|
1512
1452
|
license: "none",
|
|
@@ -1893,7 +1833,7 @@ const unstarMessage = require_registry.defineMethodV2("unstarMessage", {
|
|
|
1893
1833
|
});
|
|
1894
1834
|
const editMessage = require_registry.defineMethodV2("editMessage", {
|
|
1895
1835
|
meta: {
|
|
1896
|
-
description: "
|
|
1836
|
+
description: "Edit the text of a message you sent",
|
|
1897
1837
|
action: "update",
|
|
1898
1838
|
namespace: "messages",
|
|
1899
1839
|
license: "none",
|
|
@@ -2231,7 +2171,7 @@ const requestPhoneNumber = require_registry.defineMethodV2("requestPhoneNumber",
|
|
|
2231
2171
|
});
|
|
2232
2172
|
const sharePhoneNumber = require_registry.defineMethodV2("sharePhoneNumber", {
|
|
2233
2173
|
meta: {
|
|
2234
|
-
description: "Share the
|
|
2174
|
+
description: "Share the logged-in account’s own phone number in a one-to-one chat that only shows a LID. You can’t share any other number.",
|
|
2235
2175
|
action: "send",
|
|
2236
2176
|
namespace: "contacts",
|
|
2237
2177
|
license: "none",
|
|
@@ -2427,10 +2367,10 @@ const getGroupMembersId = require_registry.defineMethodV2("getGroupMembersId", {
|
|
|
2427
2367
|
const GroupInfoSchema = zod.z.object({
|
|
2428
2368
|
title: zod.z.string(),
|
|
2429
2369
|
description: zod.z.string().nullish()
|
|
2430
|
-
}).passthrough().describe("
|
|
2370
|
+
}).passthrough().describe("The group title and description.");
|
|
2431
2371
|
const getGroupInfo = require_registry.defineMethodV2("getGroupInfo", {
|
|
2432
2372
|
meta: {
|
|
2433
|
-
description: "Get
|
|
2373
|
+
description: "Get a group title and description",
|
|
2434
2374
|
action: "read",
|
|
2435
2375
|
namespace: "groups",
|
|
2436
2376
|
license: "none",
|
|
@@ -3181,7 +3121,7 @@ const getLicenseType = require_registry.defineMethodV2("getLicenseType", {
|
|
|
3181
3121
|
});
|
|
3182
3122
|
const getLicenseFeatures = require_registry.defineMethodV2("getLicenseFeatures", {
|
|
3183
3123
|
meta: {
|
|
3184
|
-
description: "
|
|
3124
|
+
description: "List which licensed features your license key turns on. Each method still checks availability when you call it.",
|
|
3185
3125
|
action: "read",
|
|
3186
3126
|
namespace: "session",
|
|
3187
3127
|
license: "none",
|
|
@@ -3190,7 +3130,7 @@ const getLicenseFeatures = require_registry.defineMethodV2("getLicenseFeatures",
|
|
|
3190
3130
|
},
|
|
3191
3131
|
input: zod.z.object({}),
|
|
3192
3132
|
parameterOrder: [],
|
|
3193
|
-
output: projectEffectSchema(LicenseFeaturesSchema)
|
|
3133
|
+
output: require_interactive.projectEffectSchema(LicenseFeaturesSchema)
|
|
3194
3134
|
});
|
|
3195
3135
|
const getUserAgent = require_registry.defineMethodV2("getUserAgent", {
|
|
3196
3136
|
meta: {
|
|
@@ -3487,12 +3427,12 @@ const register = (name, input, output, parameters, description) => require_regis
|
|
|
3487
3427
|
functionality: "both",
|
|
3488
3428
|
description
|
|
3489
3429
|
},
|
|
3490
|
-
input: projectEffectSchema(input),
|
|
3430
|
+
input: require_interactive.projectEffectSchema(input),
|
|
3491
3431
|
parameterOrder: parameters,
|
|
3492
|
-
output: projectEffectSchema(output)
|
|
3432
|
+
output: require_interactive.projectEffectSchema(output)
|
|
3493
3433
|
});
|
|
3494
3434
|
const getCallCapabilities = register("getCallCapabilities", effect.Schema.Struct({}), CallCapabilitiesSchema, [], "Optional calling availability for UI and diagnostics. Actions perform admission automatically.");
|
|
3495
|
-
const getActiveCall = register("getActiveCall", effect.Schema.Struct({}), effect.Schema.NullOr(CallSnapshotSchema), [], "Get the current call
|
|
3435
|
+
const getActiveCall = register("getActiveCall", effect.Schema.Struct({}), effect.Schema.NullOr(CallSnapshotSchema), [], "Get the current call, if there is one. In the SDK the result also has methods to control the call.");
|
|
3496
3436
|
const acceptCall = register("acceptCall", actionInput, CallActionResultSchema, ["call", "media"], "Prepare media and accept this incoming call.");
|
|
3497
3437
|
const startCall = register("startCall", effect.Schema.Struct({
|
|
3498
3438
|
to: effect.Schema.String,
|
|
@@ -3505,7 +3445,7 @@ const startCall = register("startCall", effect.Schema.Struct({
|
|
|
3505
3445
|
"speaker",
|
|
3506
3446
|
"camera"
|
|
3507
3447
|
], "Prepare media and place an outgoing audio or video call.");
|
|
3508
|
-
const rejectCall = register("rejectCall", effect.Schema.Struct({ call: CallIdentitySchema }), CallActionResultSchema, ["call"], "Reject
|
|
3448
|
+
const rejectCall = register("rejectCall", effect.Schema.Struct({ call: CallIdentitySchema }), CallActionResultSchema, ["call"], "Reject an incoming call and wait for WhatsApp to confirm it.");
|
|
3509
3449
|
const endCall = register("endCall", effect.Schema.Struct({ call: CallIdentitySchema }), CallActionResultSchema, ["call"], "Request hangup for this call.");
|
|
3510
3450
|
const muteCall = register("muteCall", effect.Schema.Struct({
|
|
3511
3451
|
call: CallIdentitySchema,
|
|
@@ -3612,7 +3552,7 @@ const respondToEvent = require_registry.defineMethodV2("respondToEvent", {
|
|
|
3612
3552
|
...meta,
|
|
3613
3553
|
action: "send",
|
|
3614
3554
|
httpMethod: "POST",
|
|
3615
|
-
description: "RSVP
|
|
3555
|
+
description: "Send your RSVP to a WhatsApp event."
|
|
3616
3556
|
},
|
|
3617
3557
|
input: zod.z.object({
|
|
3618
3558
|
eventId: messageIdParam,
|
|
@@ -4994,12 +4934,6 @@ Object.defineProperty(exports, "postVideoStatus", {
|
|
|
4994
4934
|
return postVideoStatus;
|
|
4995
4935
|
}
|
|
4996
4936
|
});
|
|
4997
|
-
Object.defineProperty(exports, "projectEffectSchema", {
|
|
4998
|
-
enumerable: true,
|
|
4999
|
-
get: function() {
|
|
5000
|
-
return projectEffectSchema;
|
|
5001
|
-
}
|
|
5002
|
-
});
|
|
5003
4937
|
Object.defineProperty(exports, "promoteParticipant", {
|
|
5004
4938
|
enumerable: true,
|
|
5005
4939
|
get: function() {
|
|
@@ -5439,4 +5373,4 @@ Object.defineProperty(exports, "withNewMessagesOnlyParam", {
|
|
|
5439
5373
|
}
|
|
5440
5374
|
});
|
|
5441
5375
|
|
|
5442
|
-
//# sourceMappingURL=methods-
|
|
5376
|
+
//# sourceMappingURL=methods-CILSsPyT.cjs.map
|