@muhammedaksam/waha-node 2026.3.4 → 2026.4.3

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/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e,t=require("axios");!function(e){e.Json="application/json",e.JsonApi="application/vnd.api+json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain"}(e||(e={}));class s{constructor({securityWorker:s,secure:o,format:r,...a}={}){this.securityData=null,this.setSecurityData=e=>{this.securityData=e},this.request=async({secure:t,path:s,type:o,query:r,format:a,body:h,...i})=>{const n=("boolean"==typeof t?t:this.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},p=this.mergeRequestParams(i,n),u=a||this.format||void 0;return o===e.FormData&&h&&null!==h&&"object"==typeof h&&(h=this.createFormData(h)),o===e.Text&&h&&null!==h&&"string"!=typeof h&&(h=JSON.stringify(h)),this.instance.request({...p,headers:{...p.headers||{},...o?{"Content-Type":o}:{}},params:r,responseType:u,data:h,url:s})},this.instance=t.create({...a,baseURL:a.baseURL||""}),this.secure=o,this.format=r,this.securityWorker=s}mergeRequestParams(e,t){const s=e.method||t&&t.method;return{...this.instance.defaults,...e,...t||{},headers:{...s&&this.instance.defaults.headers[s.toLowerCase()]||{},...e.headers||{},...t&&t.headers||{}}}}stringifyFormItem(e){return"object"==typeof e&&null!==e?JSON.stringify(e):`${e}`}createFormData(e){return e instanceof FormData?e:Object.keys(e||{}).reduce((t,s)=>{const o=e[s],r=o instanceof Array?o:[o];for(const e of r){const o=e instanceof Blob||e instanceof File;t.append(s,o?e:this.stringifyFormItem(e))}return t},new FormData)}}class o extends s{constructor(){super(...arguments),this.apiKeysControllerCreate=(t,s={})=>this.request({path:"/api/keys",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.apiKeysControllerList=(e={})=>this.request({path:"/api/keys",method:"GET",secure:!0,format:"json",...e}),this.apiKeysControllerUpdate=(t,s,o={})=>this.request({path:`/api/keys/${t}`,method:"PUT",body:s,secure:!0,type:e.Json,format:"json",...o}),this.apiKeysControllerDelete=(e,t={})=>this.request({path:`/api/keys/${e}`,method:"DELETE",secure:!0,...t})}}class r extends s{constructor(){super(...arguments),this.appsControllerList=(e,t={})=>this.request({path:"/api/apps",method:"GET",query:e,secure:!0,...t}),this.appsControllerCreate=(t,s={})=>this.request({path:"/api/apps",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.appsControllerGet=(e,t={})=>this.request({path:`/api/apps/${e}`,method:"GET",secure:!0,...t}),this.appsControllerUpdate=(t,s,o={})=>this.request({path:`/api/apps/${t}`,method:"PUT",body:s,secure:!0,type:e.Json,...o}),this.appsControllerDelete=(e,t={})=>this.request({path:`/api/apps/${e}`,method:"DELETE",secure:!0,...t})}}class a extends s{constructor(){super(...arguments),this.callsControllerRejectCall=(t,s,o={})=>this.request({path:`/api/${t}/calls/reject`,method:"POST",body:s,secure:!0,type:e.Json,...o})}}class h extends s{constructor(){super(...arguments),this.channelsControllerList=(e,t,s={})=>this.request({path:`/api/${e}/channels`,method:"GET",query:t,secure:!0,format:"json",...s}),this.channelsControllerCreate=(t,s,o={})=>this.request({path:`/api/${t}/channels`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o}),this.channelsControllerDelete=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}`,method:"DELETE",secure:!0,...s}),this.channelsControllerGet=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}`,method:"GET",secure:!0,format:"json",...s}),this.channelsControllerPreviewChannelMessages=(e,t,s,o={})=>this.request({path:`/api/${e}/channels/${t}/messages/preview`,method:"GET",query:s,secure:!0,format:"json",...o}),this.channelsControllerFollow=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/follow`,method:"POST",secure:!0,...s}),this.channelsControllerUnfollow=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/unfollow`,method:"POST",secure:!0,...s}),this.channelsControllerMute=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/mute`,method:"POST",secure:!0,...s}),this.channelsControllerUnmute=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/unmute`,method:"POST",secure:!0,...s}),this.channelsControllerSearchByView=(t,s,o={})=>this.request({path:`/api/${t}/channels/search/by-view`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o}),this.channelsControllerSearchByText=(t,s,o={})=>this.request({path:`/api/${t}/channels/search/by-text`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o}),this.channelsControllerGetSearchViews=(e,t={})=>this.request({path:`/api/${e}/channels/search/views`,method:"GET",secure:!0,format:"json",...t}),this.channelsControllerGetSearchCountries=(e,t={})=>this.request({path:`/api/${e}/channels/search/countries`,method:"GET",secure:!0,format:"json",...t}),this.channelsControllerGetSearchCategories=(e,t={})=>this.request({path:`/api/${e}/channels/search/categories`,method:"GET",secure:!0,format:"json",...t})}}class i extends s{constructor(){super(...arguments),this.chatsControllerGetChats=(e,t,s={})=>this.request({path:`/api/${e}/chats`,method:"GET",query:t,secure:!0,...s}),this.chatsControllerGetChatsOverview=(e,t,s={})=>this.request({path:`/api/${e}/chats/overview`,method:"GET",query:t,secure:!0,format:"json",...s}),this.chatsControllerPostChatsOverview=(t,s,o={})=>this.request({path:`/api/${t}/chats/overview`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o}),this.chatsControllerDeleteChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}`,method:"DELETE",secure:!0,...s}),this.chatsControllerGetChatPicture=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/picture`,method:"GET",query:s,secure:!0,format:"json",...o}),this.chatsControllerGetChatMessages=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages`,method:"GET",query:s,secure:!0,format:"json",...o}),this.chatsControllerClearMessages=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/messages`,method:"DELETE",secure:!0,...s}),this.chatsControllerReadChatMessages=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages/read`,method:"POST",query:s,secure:!0,format:"json",...o}),this.chatsControllerGetChatMessage=(e,t,s,o,r={})=>this.request({path:`/api/${e}/chats/${t}/messages/${s}`,method:"GET",query:o,secure:!0,format:"json",...r}),this.chatsControllerDeleteMessage=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages/${s}`,method:"DELETE",secure:!0,...o}),this.chatsControllerEditMessage=(t,s,o,r,a={})=>this.request({path:`/api/${t}/chats/${s}/messages/${o}`,method:"PUT",body:r,secure:!0,type:e.Json,...a}),this.chatsControllerPinMessage=(t,s,o,r,a={})=>this.request({path:`/api/${t}/chats/${s}/messages/${o}/pin`,method:"POST",body:r,secure:!0,type:e.Json,...a}),this.chatsControllerUnpinMessage=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages/${s}/unpin`,method:"POST",secure:!0,...o}),this.chatsControllerArchiveChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/archive`,method:"POST",secure:!0,format:"json",...s}),this.chatsControllerUnarchiveChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/unarchive`,method:"POST",secure:!0,format:"json",...s}),this.chatsControllerUnreadChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/unread`,method:"POST",secure:!0,format:"json",...s})}}class n extends s{constructor(){super(...arguments),this.chattingControllerSendText=(t,s={})=>this.request({path:"/api/sendText",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendTextGet=(e,t={})=>this.request({path:"/api/sendText",method:"GET",query:e,secure:!0,format:"json",...t}),this.chattingControllerSendImage=(t,s={})=>this.request({path:"/api/sendImage",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendFile=(t,s={})=>this.request({path:"/api/sendFile",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendVoice=(t,s={})=>this.request({path:"/api/sendVoice",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendVideo=(t,s={})=>this.request({path:"/api/sendVideo",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerSendLinkCustomPreview=(t,s={})=>this.request({path:"/api/send/link-custom-preview",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendButtons=(t,s={})=>this.request({path:"/api/sendButtons",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerSendList=(t,s={})=>this.request({path:"/api/sendList",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerForwardMessage=(t,s={})=>this.request({path:"/api/forwardMessage",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendSeen=(t,s={})=>this.request({path:"/api/sendSeen",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerStartTyping=(t,s={})=>this.request({path:"/api/startTyping",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerStopTyping=(t,s={})=>this.request({path:"/api/stopTyping",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerSetReaction=(t,s={})=>this.request({path:"/api/reaction",method:"PUT",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSetStar=(t,s={})=>this.request({path:"/api/star",method:"PUT",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerSendPoll=(t,s={})=>this.request({path:"/api/sendPoll",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerSendPollVote=(t,s={})=>this.request({path:"/api/sendPollVote",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerSendLocation=(t,s={})=>this.request({path:"/api/sendLocation",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendContactVcard=(t,s={})=>this.request({path:"/api/sendContactVcard",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerSendButtonsReply=(t,s={})=>this.request({path:"/api/send/buttons/reply",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerGetMessages=(e,t={})=>this.request({path:"/api/messages",method:"GET",query:e,secure:!0,format:"json",...t}),this.chattingControllerDeprecatedCheckNumberStatus=(e,t={})=>this.request({path:"/api/checkNumberStatus",method:"GET",query:e,secure:!0,format:"json",...t}),this.chattingControllerReply=(t,s={})=>this.request({path:"/api/reply",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendLinkPreviewDeprecated=(t,s={})=>this.request({path:"/api/sendLinkPreview",method:"POST",body:t,secure:!0,type:e.Json,...s})}}class p extends s{constructor(){super(...arguments),this.contactsControllerGetAll=(e,t={})=>this.request({path:"/api/contacts/all",method:"GET",query:e,secure:!0,...t}),this.contactsControllerGet=(e,t={})=>this.request({path:"/api/contacts",method:"GET",query:e,secure:!0,...t}),this.contactsControllerCheckExists=(e,t={})=>this.request({path:"/api/contacts/check-exists",method:"GET",query:e,secure:!0,format:"json",...t}),this.contactsControllerGetAbout=(e,t={})=>this.request({path:"/api/contacts/about",method:"GET",query:e,secure:!0,...t}),this.contactsControllerGetProfilePicture=(e,t={})=>this.request({path:"/api/contacts/profile-picture",method:"GET",query:e,secure:!0,...t}),this.contactsControllerBlock=(t,s={})=>this.request({path:"/api/contacts/block",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.contactsControllerUnblock=(t,s={})=>this.request({path:"/api/contacts/unblock",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.contactsSessionControllerGet=(e,t,s={})=>this.request({path:`/api/${e}/contacts/${t}`,method:"GET",secure:!0,...s}),this.contactsSessionControllerPut=(t,s,o,r={})=>this.request({path:`/api/${t}/contacts/${s}`,method:"PUT",body:o,secure:!0,type:e.Json,format:"json",...r}),this.lidsControllerGetAll=(e,t,s={})=>this.request({path:`/api/${e}/lids`,method:"GET",query:t,secure:!0,format:"json",...s}),this.lidsControllerGetLidsCount=(e,t={})=>this.request({path:`/api/${e}/lids/count`,method:"GET",secure:!0,format:"json",...t}),this.lidsControllerFindPnByLid=(e,t,s={})=>this.request({path:`/api/${e}/lids/${t}`,method:"GET",secure:!0,format:"json",...s}),this.lidsControllerFindLidByPhoneNumber=(e,t,s={})=>this.request({path:`/api/${e}/lids/pn/${t}`,method:"GET",secure:!0,format:"json",...s})}}class u extends s{constructor(){super(...arguments),this.eventsControllerSendEvent=(t,s,o={})=>this.request({path:`/api/${t}/events`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o})}}class l extends s{constructor(){super(...arguments),this.groupsControllerCreateGroup=(t,s,o={})=>this.request({path:`/api/${t}/groups`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.groupsControllerGetGroups=(e,t,s={})=>this.request({path:`/api/${e}/groups`,method:"GET",query:t,secure:!0,format:"json",...s}),this.groupsControllerJoinInfoGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/join-info`,method:"GET",query:t,secure:!0,format:"json",...s}),this.groupsControllerJoinGroup=(t,s,o={})=>this.request({path:`/api/${t}/groups/join`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o}),this.groupsControllerGetGroupsCount=(e,t={})=>this.request({path:`/api/${e}/groups/count`,method:"GET",secure:!0,format:"json",...t}),this.groupsControllerRefreshGroups=(e,t={})=>this.request({path:`/api/${e}/groups/refresh`,method:"POST",secure:!0,...t}),this.groupsControllerGetGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}`,method:"GET",secure:!0,...s}),this.groupsControllerDeleteGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}`,method:"DELETE",secure:!0,...s}),this.groupsControllerLeaveGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/leave`,method:"POST",secure:!0,...s}),this.groupsControllerGetChatPicture=(e,t,s,o={})=>this.request({path:`/api/${e}/groups/${t}/picture`,method:"GET",query:s,secure:!0,format:"json",...o}),this.groupsControllerSetPicture=(t,s,o,r={})=>this.request({path:`/api/${s}/groups/${t}/picture`,method:"PUT",body:o,secure:!0,type:e.Json,format:"json",...r}),this.groupsControllerDeletePicture=(e,t,s={})=>this.request({path:`/api/${t}/groups/${e}/picture`,method:"DELETE",secure:!0,format:"json",...s}),this.groupsControllerSetDescription=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/description`,method:"PUT",body:o,secure:!0,type:e.Json,...r}),this.groupsControllerSetSubject=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/subject`,method:"PUT",body:o,secure:!0,type:e.Json,...r}),this.groupsControllerSetInfoAdminOnly=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/settings/security/info-admin-only`,method:"PUT",body:o,secure:!0,type:e.Json,...r}),this.groupsControllerGetInfoAdminOnly=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/settings/security/info-admin-only`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerSetMessagesAdminOnly=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/settings/security/messages-admin-only`,method:"PUT",body:o,secure:!0,type:e.Json,...r}),this.groupsControllerGetMessagesAdminOnly=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/settings/security/messages-admin-only`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerGetInviteCode=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/invite-code`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerRevokeInviteCode=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/invite-code/revoke`,method:"POST",secure:!0,format:"json",...s}),this.groupsControllerGetParticipants=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/participants`,method:"GET",secure:!0,...s}),this.groupsControllerGetGroupParticipants=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/participants/v2`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerAddParticipants=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/participants/add`,method:"POST",body:o,secure:!0,type:e.Json,...r}),this.groupsControllerRemoveParticipants=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/participants/remove`,method:"POST",body:o,secure:!0,type:e.Json,...r}),this.groupsControllerPromoteToAdmin=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/admin/promote`,method:"POST",body:o,secure:!0,type:e.Json,...r}),this.groupsControllerDemoteToAdmin=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/admin/demote`,method:"POST",body:o,secure:!0,type:e.Json,...r})}}class c extends s{constructor(){super(...arguments),this.labelsControllerGetAll=(e,t={})=>this.request({path:`/api/${e}/labels`,method:"GET",secure:!0,format:"json",...t}),this.labelsControllerCreate=(t,s,o={})=>this.request({path:`/api/${t}/labels`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o}),this.labelsControllerUpdate=(t,s,o,r={})=>this.request({path:`/api/${t}/labels/${s}`,method:"PUT",body:o,secure:!0,type:e.Json,format:"json",...r}),this.labelsControllerDelete=(e,t,s={})=>this.request({path:`/api/${e}/labels/${t}`,method:"DELETE",secure:!0,format:"json",...s}),this.labelsControllerGetChatLabels=(e,t,s={})=>this.request({path:`/api/${e}/labels/chats/${t}`,method:"GET",secure:!0,format:"json",...s}),this.labelsControllerPutChatLabels=(t,s,o,r={})=>this.request({path:`/api/${t}/labels/chats/${s}`,method:"PUT",body:o,secure:!0,type:e.Json,...r}),this.labelsControllerGetChatsByLabel=(e,t,s={})=>this.request({path:`/api/${e}/labels/${t}/chats`,method:"GET",secure:!0,...s})}}class d extends s{constructor(){super(...arguments),this.mediaControllerConvertVoice=(t,s,o={})=>this.request({path:`/api/${t}/media/convert/voice`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o}),this.mediaControllerConvertVideo=(t,s,o={})=>this.request({path:`/api/${t}/media/convert/video`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o})}}class m extends s{constructor(){super(...arguments),this.pingControllerPing=(e={})=>this.request({path:"/ping",method:"GET",format:"json",...e}),this.healthControllerCheck=(e={})=>this.request({path:"/health",method:"GET",secure:!0,format:"json",...e}),this.serverControllerGet=(e={})=>this.request({path:"/api/server/version",method:"GET",secure:!0,format:"json",...e}),this.serverControllerEnvironment=(e,t={})=>this.request({path:"/api/server/environment",method:"GET",query:e,secure:!0,format:"json",...t}),this.serverControllerStatus=(e={})=>this.request({path:"/api/server/status",method:"GET",secure:!0,format:"json",...e}),this.serverControllerStop=(t,s={})=>this.request({path:"/api/server/stop",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.serverDebugControllerCpuProfile=(e,t={})=>this.request({path:"/api/server/debug/cpu",method:"GET",query:e,secure:!0,...t}),this.serverDebugControllerHeapsnapshot=(e={})=>this.request({path:"/api/server/debug/heapsnapshot",method:"GET",secure:!0,...e}),this.serverDebugControllerBrowserTrace=(e,t,s={})=>this.request({path:`/api/server/debug/browser/trace/${e}`,method:"GET",query:t,secure:!0,...s}),this.versionControllerGet=(e={})=>this.request({path:"/api/version",method:"GET",secure:!0,format:"json",...e})}}class y extends s{constructor(){super(...arguments),this.authControllerGetQr=(e,t,s={})=>this.request({path:`/api/${e}/auth/qr`,method:"GET",query:t,secure:!0,format:"json",...s}),this.authControllerRequestCode=(t,s,o={})=>this.request({path:`/api/${t}/auth/request-code`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.screenshotControllerScreenshot=(e,t={})=>this.request({path:"/api/screenshot",method:"GET",query:e,secure:!0,format:"json",...t})}}class C extends s{constructor(){super(...arguments),this.presenceControllerSetPresence=(t,s,o={})=>this.request({path:`/api/${t}/presence`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.presenceControllerGetPresenceAll=(e,t={})=>this.request({path:`/api/${e}/presence`,method:"GET",secure:!0,format:"json",...t}),this.presenceControllerGetPresence=(e,t,s={})=>this.request({path:`/api/${e}/presence/${t}`,method:"GET",secure:!0,format:"json",...s}),this.presenceControllerSubscribe=(e,t,s={})=>this.request({path:`/api/${e}/presence/${t}/subscribe`,method:"POST",secure:!0,...s})}}class q extends s{constructor(){super(...arguments),this.profileControllerGetMyProfile=(e,t={})=>this.request({path:`/api/${e}/profile`,method:"GET",secure:!0,format:"json",...t}),this.profileControllerSetProfileName=(t,s,o={})=>this.request({path:`/api/${t}/profile/name`,method:"PUT",body:s,secure:!0,type:e.Json,format:"json",...o}),this.profileControllerSetProfileStatus=(t,s,o={})=>this.request({path:`/api/${t}/profile/status`,method:"PUT",body:s,secure:!0,type:e.Json,format:"json",...o}),this.profileControllerSetProfilePicture=(t,s,o={})=>this.request({path:`/api/${t}/profile/picture`,method:"PUT",body:s,secure:!0,type:e.Json,format:"json",...o}),this.profileControllerDeleteProfilePicture=(e,t={})=>this.request({path:`/api/${e}/profile/picture`,method:"DELETE",secure:!0,format:"json",...t})}}class T extends s{constructor(){super(...arguments),this.sessionsControllerList=(e,t={})=>this.request({path:"/api/sessions",method:"GET",query:e,secure:!0,format:"json",...t}),this.sessionsControllerCreate=(t,s={})=>this.request({path:"/api/sessions",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.sessionsControllerGet=(e,t,s={})=>this.request({path:`/api/sessions/${e}`,method:"GET",query:t,secure:!0,format:"json",...s}),this.sessionsControllerUpdate=(t,s,o={})=>this.request({path:`/api/sessions/${t}`,method:"PUT",body:s,secure:!0,type:e.Json,format:"json",...o}),this.sessionsControllerDelete=(e,t={})=>this.request({path:`/api/sessions/${e}`,method:"DELETE",secure:!0,...t}),this.sessionsControllerGetMe=(e,t={})=>this.request({path:`/api/sessions/${e}/me`,method:"GET",secure:!0,format:"json",...t}),this.sessionsControllerStart=(e,t={})=>this.request({path:`/api/sessions/${e}/start`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerStop=(e,t={})=>this.request({path:`/api/sessions/${e}/stop`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerLogout=(e,t={})=>this.request({path:`/api/sessions/${e}/logout`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerRestart=(e,t={})=>this.request({path:`/api/sessions/${e}/restart`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerDepracatedStart=(t,s={})=>this.request({path:"/api/sessions/start",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.sessionsControllerDeprecatedStop=(t,s={})=>this.request({path:"/api/sessions/stop",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.sessionsControllerDeprecatedLogout=(t,s={})=>this.request({path:"/api/sessions/logout",method:"POST",body:t,secure:!0,type:e.Json,...s})}}class $ extends s{constructor(){super(...arguments),this.statusControllerSendTextStatus=(t,s,o={})=>this.request({path:`/api/${t}/status/text`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.statusControllerSendImageStatus=(t,s,o={})=>this.request({path:`/api/${t}/status/image`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.statusControllerSendVoiceStatus=(t,s,o={})=>this.request({path:`/api/${t}/status/voice`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.statusControllerSendVideoStatus=(t,s,o={})=>this.request({path:`/api/${t}/status/video`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.statusControllerDeleteStatus=(t,s,o={})=>this.request({path:`/api/${t}/status/delete`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.statusControllerGetNewMessageId=(e,t={})=>this.request({path:`/api/${e}/status/new-message-id`,method:"GET",secure:!0,format:"json",...t})}}exports.ApiKeys=o,exports.Apps=r,exports.Calls=a,exports.Channels=h,exports.Chats=i,exports.Chatting=n,exports.Contacts=p,exports.Events=u,exports.Groups=l,exports.HttpClient=s,exports.Labels=c,exports.Media=d,exports.Observability=m,exports.Pairing=y,exports.Presence=C,exports.Profile=q,exports.Sessions=T,exports.Status=$,exports.WahaClient=class{get httpClient(){return this.sessions.instance}constructor(e,t){let s;s="string"==typeof e?{baseURL:e,securityWorker:t?()=>({headers:{"X-Api-Key":t}}):void 0}:e,this.apikeys=new o(s),this.apps=new r(s),this.calls=new a(s),this.channels=new h(s),this.chats=new i(s),this.chatting=new n(s),this.contacts=new p(s),this.events=new u(s),this.groups=new l(s),this.labels=new c(s),this.media=new d(s),this.observability=new m(s),this.pairing=new y(s),this.presence=new C(s),this.profile=new q(s),this.sessions=new T(s),this.status=new $(s)}};
1
+ "use strict";var e,t=require("axios");!function(e){e.Json="application/json",e.JsonApi="application/vnd.api+json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain"}(e||(e={}));class s{constructor({securityWorker:s,secure:o,format:r,...a}={}){this.securityData=null,this.setSecurityData=e=>{this.securityData=e},this.request=async({secure:t,path:s,type:o,query:r,format:a,body:h,...i})=>{const n=("boolean"==typeof t?t:this.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},p=this.mergeRequestParams(i,n),u=a||this.format||void 0;return o===e.FormData&&h&&null!==h&&"object"==typeof h&&(h=this.createFormData(h)),o===e.Text&&h&&null!==h&&"string"!=typeof h&&(h=JSON.stringify(h)),this.instance.request({...p,headers:{...p.headers||{},...o?{"Content-Type":o}:{}},params:r,responseType:u,data:h,url:s})},this.instance=t.create({...a,baseURL:a.baseURL||""}),this.secure=o,this.format=r,this.securityWorker=s}mergeRequestParams(e,t){const s=e.method||t&&t.method;return{...this.instance.defaults,...e,...t||{},headers:{...s&&this.instance.defaults.headers[s.toLowerCase()]||{},...e.headers||{},...t&&t.headers||{}}}}stringifyFormItem(e){return"object"==typeof e&&null!==e?JSON.stringify(e):`${e}`}createFormData(e){return e instanceof FormData?e:Object.keys(e||{}).reduce((t,s)=>{const o=e[s],r=o instanceof Array?o:[o];for(const e of r){const o=e instanceof Blob||e instanceof File;t.append(s,o?e:this.stringifyFormItem(e))}return t},new FormData)}}class o extends s{constructor(){super(...arguments),this.apiKeysControllerCreate=(t,s={})=>this.request({path:"/api/keys",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.apiKeysControllerList=(e={})=>this.request({path:"/api/keys",method:"GET",secure:!0,format:"json",...e}),this.apiKeysControllerUpdate=(t,s,o={})=>this.request({path:`/api/keys/${t}`,method:"PUT",body:s,secure:!0,type:e.Json,format:"json",...o}),this.apiKeysControllerDelete=(e,t={})=>this.request({path:`/api/keys/${e}`,method:"DELETE",secure:!0,...t})}}class r extends s{constructor(){super(...arguments),this.appsControllerList=(e,t={})=>this.request({path:"/api/apps",method:"GET",query:e,secure:!0,...t}),this.appsControllerCreate=(t,s={})=>this.request({path:"/api/apps",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.appsControllerGet=(e,t={})=>this.request({path:`/api/apps/${e}`,method:"GET",secure:!0,...t}),this.appsControllerUpdate=(t,s,o={})=>this.request({path:`/api/apps/${t}`,method:"PUT",body:s,secure:!0,type:e.Json,...o}),this.appsControllerDelete=(e,t={})=>this.request({path:`/api/apps/${e}`,method:"DELETE",secure:!0,...t}),this.mcpControllerPost=(e={})=>this.request({path:"/mcp",method:"POST",...e})}}class a extends s{constructor(){super(...arguments),this.callsControllerRejectCall=(t,s,o={})=>this.request({path:`/api/${t}/calls/reject`,method:"POST",body:s,secure:!0,type:e.Json,...o})}}class h extends s{constructor(){super(...arguments),this.channelsControllerList=(e,t,s={})=>this.request({path:`/api/${e}/channels`,method:"GET",query:t,secure:!0,format:"json",...s}),this.channelsControllerCreate=(t,s,o={})=>this.request({path:`/api/${t}/channels`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o}),this.channelsControllerDelete=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}`,method:"DELETE",secure:!0,...s}),this.channelsControllerGet=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}`,method:"GET",secure:!0,format:"json",...s}),this.channelsControllerPreviewChannelMessages=(e,t,s,o={})=>this.request({path:`/api/${e}/channels/${t}/messages/preview`,method:"GET",query:s,secure:!0,format:"json",...o}),this.channelsControllerFollow=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/follow`,method:"POST",secure:!0,...s}),this.channelsControllerUnfollow=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/unfollow`,method:"POST",secure:!0,...s}),this.channelsControllerMute=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/mute`,method:"POST",secure:!0,...s}),this.channelsControllerUnmute=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/unmute`,method:"POST",secure:!0,...s}),this.channelsControllerSearchByView=(t,s,o={})=>this.request({path:`/api/${t}/channels/search/by-view`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o}),this.channelsControllerSearchByText=(t,s,o={})=>this.request({path:`/api/${t}/channels/search/by-text`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o}),this.channelsControllerGetSearchViews=(e,t={})=>this.request({path:`/api/${e}/channels/search/views`,method:"GET",secure:!0,format:"json",...t}),this.channelsControllerGetSearchCountries=(e,t={})=>this.request({path:`/api/${e}/channels/search/countries`,method:"GET",secure:!0,format:"json",...t}),this.channelsControllerGetSearchCategories=(e,t={})=>this.request({path:`/api/${e}/channels/search/categories`,method:"GET",secure:!0,format:"json",...t})}}class i extends s{constructor(){super(...arguments),this.chatsControllerGetChats=(e,t,s={})=>this.request({path:`/api/${e}/chats`,method:"GET",query:t,secure:!0,...s}),this.chatsControllerGetChatsOverview=(e,t,s={})=>this.request({path:`/api/${e}/chats/overview`,method:"GET",query:t,secure:!0,format:"json",...s}),this.chatsControllerPostChatsOverview=(t,s,o={})=>this.request({path:`/api/${t}/chats/overview`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o}),this.chatsControllerDeleteChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}`,method:"DELETE",secure:!0,...s}),this.chatsControllerGetChatPicture=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/picture`,method:"GET",query:s,secure:!0,format:"json",...o}),this.chatsControllerGetChatMessages=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages`,method:"GET",query:s,secure:!0,format:"json",...o}),this.chatsControllerClearMessages=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/messages`,method:"DELETE",secure:!0,...s}),this.chatsControllerReadChatMessages=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages/read`,method:"POST",query:s,secure:!0,format:"json",...o}),this.chatsControllerGetChatMessage=(e,t,s,o,r={})=>this.request({path:`/api/${e}/chats/${t}/messages/${s}`,method:"GET",query:o,secure:!0,format:"json",...r}),this.chatsControllerDeleteMessage=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages/${s}`,method:"DELETE",secure:!0,...o}),this.chatsControllerEditMessage=(t,s,o,r,a={})=>this.request({path:`/api/${t}/chats/${s}/messages/${o}`,method:"PUT",body:r,secure:!0,type:e.Json,...a}),this.chatsControllerPinMessage=(t,s,o,r,a={})=>this.request({path:`/api/${t}/chats/${s}/messages/${o}/pin`,method:"POST",body:r,secure:!0,type:e.Json,...a}),this.chatsControllerUnpinMessage=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages/${s}/unpin`,method:"POST",secure:!0,...o}),this.chatsControllerArchiveChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/archive`,method:"POST",secure:!0,format:"json",...s}),this.chatsControllerUnarchiveChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/unarchive`,method:"POST",secure:!0,format:"json",...s}),this.chatsControllerUnreadChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/unread`,method:"POST",secure:!0,format:"json",...s})}}class n extends s{constructor(){super(...arguments),this.chattingControllerSendText=(t,s={})=>this.request({path:"/api/sendText",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendTextGet=(e,t={})=>this.request({path:"/api/sendText",method:"GET",query:e,secure:!0,format:"json",...t}),this.chattingControllerSendImage=(t,s={})=>this.request({path:"/api/sendImage",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendFile=(t,s={})=>this.request({path:"/api/sendFile",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendVoice=(t,s={})=>this.request({path:"/api/sendVoice",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendVideo=(t,s={})=>this.request({path:"/api/sendVideo",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerSendLinkCustomPreview=(t,s={})=>this.request({path:"/api/send/link-custom-preview",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendButtons=(t,s={})=>this.request({path:"/api/sendButtons",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerSendList=(t,s={})=>this.request({path:"/api/sendList",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerForwardMessage=(t,s={})=>this.request({path:"/api/forwardMessage",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendSeen=(t,s={})=>this.request({path:"/api/sendSeen",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerStartTyping=(t,s={})=>this.request({path:"/api/startTyping",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerStopTyping=(t,s={})=>this.request({path:"/api/stopTyping",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerSetReaction=(t,s={})=>this.request({path:"/api/reaction",method:"PUT",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSetStar=(t,s={})=>this.request({path:"/api/star",method:"PUT",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerSendPoll=(t,s={})=>this.request({path:"/api/sendPoll",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerSendPollVote=(t,s={})=>this.request({path:"/api/sendPollVote",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerSendLocation=(t,s={})=>this.request({path:"/api/sendLocation",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendContactVcard=(t,s={})=>this.request({path:"/api/sendContactVcard",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerSendButtonsReply=(t,s={})=>this.request({path:"/api/send/buttons/reply",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerGetMessages=(e,t={})=>this.request({path:"/api/messages",method:"GET",query:e,secure:!0,format:"json",...t}),this.chattingControllerDeprecatedCheckNumberStatus=(e,t={})=>this.request({path:"/api/checkNumberStatus",method:"GET",query:e,secure:!0,format:"json",...t}),this.chattingControllerReply=(t,s={})=>this.request({path:"/api/reply",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.chattingControllerSendLinkPreviewDeprecated=(t,s={})=>this.request({path:"/api/sendLinkPreview",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.chattingControllerGetNewMessageId=(e,t={})=>this.request({path:`/api/${e}/new-message-id`,method:"GET",secure:!0,format:"json",...t})}}class p extends s{constructor(){super(...arguments),this.contactsControllerGetAll=(e,t={})=>this.request({path:"/api/contacts/all",method:"GET",query:e,secure:!0,...t}),this.contactsControllerGet=(e,t={})=>this.request({path:"/api/contacts",method:"GET",query:e,secure:!0,...t}),this.contactsControllerCheckExists=(e,t={})=>this.request({path:"/api/contacts/check-exists",method:"GET",query:e,secure:!0,format:"json",...t}),this.contactsControllerGetAbout=(e,t={})=>this.request({path:"/api/contacts/about",method:"GET",query:e,secure:!0,...t}),this.contactsControllerGetProfilePicture=(e,t={})=>this.request({path:"/api/contacts/profile-picture",method:"GET",query:e,secure:!0,...t}),this.contactsControllerBlock=(t,s={})=>this.request({path:"/api/contacts/block",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.contactsControllerUnblock=(t,s={})=>this.request({path:"/api/contacts/unblock",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.contactsSessionControllerGet=(e,t,s={})=>this.request({path:`/api/${e}/contacts/${t}`,method:"GET",secure:!0,...s}),this.contactsSessionControllerPut=(t,s,o,r={})=>this.request({path:`/api/${t}/contacts/${s}`,method:"PUT",body:o,secure:!0,type:e.Json,format:"json",...r}),this.lidsControllerGetAll=(e,t,s={})=>this.request({path:`/api/${e}/lids`,method:"GET",query:t,secure:!0,format:"json",...s}),this.lidsControllerGetLidsCount=(e,t={})=>this.request({path:`/api/${e}/lids/count`,method:"GET",secure:!0,format:"json",...t}),this.lidsControllerFindPnByLid=(e,t,s={})=>this.request({path:`/api/${e}/lids/${t}`,method:"GET",secure:!0,format:"json",...s}),this.lidsControllerFindLidByPhoneNumber=(e,t,s={})=>this.request({path:`/api/${e}/lids/pn/${t}`,method:"GET",secure:!0,format:"json",...s})}}class u extends s{constructor(){super(...arguments),this.eventsControllerSendEvent=(t,s,o={})=>this.request({path:`/api/${t}/events`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o})}}class l extends s{constructor(){super(...arguments),this.groupsControllerCreateGroup=(t,s,o={})=>this.request({path:`/api/${t}/groups`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.groupsControllerGetGroups=(e,t,s={})=>this.request({path:`/api/${e}/groups`,method:"GET",query:t,secure:!0,format:"json",...s}),this.groupsControllerJoinInfoGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/join-info`,method:"GET",query:t,secure:!0,format:"json",...s}),this.groupsControllerJoinGroup=(t,s,o={})=>this.request({path:`/api/${t}/groups/join`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o}),this.groupsControllerGetGroupsCount=(e,t={})=>this.request({path:`/api/${e}/groups/count`,method:"GET",secure:!0,format:"json",...t}),this.groupsControllerRefreshGroups=(e,t={})=>this.request({path:`/api/${e}/groups/refresh`,method:"POST",secure:!0,...t}),this.groupsControllerGetGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}`,method:"GET",secure:!0,...s}),this.groupsControllerDeleteGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}`,method:"DELETE",secure:!0,...s}),this.groupsControllerLeaveGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/leave`,method:"POST",secure:!0,...s}),this.groupsControllerGetChatPicture=(e,t,s,o={})=>this.request({path:`/api/${e}/groups/${t}/picture`,method:"GET",query:s,secure:!0,format:"json",...o}),this.groupsControllerSetPicture=(t,s,o,r={})=>this.request({path:`/api/${s}/groups/${t}/picture`,method:"PUT",body:o,secure:!0,type:e.Json,format:"json",...r}),this.groupsControllerDeletePicture=(e,t,s={})=>this.request({path:`/api/${t}/groups/${e}/picture`,method:"DELETE",secure:!0,format:"json",...s}),this.groupsControllerSetDescription=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/description`,method:"PUT",body:o,secure:!0,type:e.Json,...r}),this.groupsControllerSetSubject=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/subject`,method:"PUT",body:o,secure:!0,type:e.Json,...r}),this.groupsControllerSetInfoAdminOnly=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/settings/security/info-admin-only`,method:"PUT",body:o,secure:!0,type:e.Json,...r}),this.groupsControllerGetInfoAdminOnly=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/settings/security/info-admin-only`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerSetMessagesAdminOnly=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/settings/security/messages-admin-only`,method:"PUT",body:o,secure:!0,type:e.Json,...r}),this.groupsControllerGetMessagesAdminOnly=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/settings/security/messages-admin-only`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerGetInviteCode=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/invite-code`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerRevokeInviteCode=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/invite-code/revoke`,method:"POST",secure:!0,format:"json",...s}),this.groupsControllerGetParticipants=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/participants`,method:"GET",secure:!0,...s}),this.groupsControllerGetGroupParticipants=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/participants/v2`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerAddParticipants=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/participants/add`,method:"POST",body:o,secure:!0,type:e.Json,...r}),this.groupsControllerRemoveParticipants=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/participants/remove`,method:"POST",body:o,secure:!0,type:e.Json,...r}),this.groupsControllerPromoteToAdmin=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/admin/promote`,method:"POST",body:o,secure:!0,type:e.Json,...r}),this.groupsControllerDemoteToAdmin=(t,s,o,r={})=>this.request({path:`/api/${t}/groups/${s}/admin/demote`,method:"POST",body:o,secure:!0,type:e.Json,...r})}}class c extends s{constructor(){super(...arguments),this.labelsControllerGetAll=(e,t={})=>this.request({path:`/api/${e}/labels`,method:"GET",secure:!0,format:"json",...t}),this.labelsControllerCreate=(t,s,o={})=>this.request({path:`/api/${t}/labels`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o}),this.labelsControllerUpdate=(t,s,o,r={})=>this.request({path:`/api/${t}/labels/${s}`,method:"PUT",body:o,secure:!0,type:e.Json,format:"json",...r}),this.labelsControllerDelete=(e,t,s={})=>this.request({path:`/api/${e}/labels/${t}`,method:"DELETE",secure:!0,format:"json",...s}),this.labelsControllerGetChatLabels=(e,t,s={})=>this.request({path:`/api/${e}/labels/chats/${t}`,method:"GET",secure:!0,format:"json",...s}),this.labelsControllerPutChatLabels=(t,s,o,r={})=>this.request({path:`/api/${t}/labels/chats/${s}`,method:"PUT",body:o,secure:!0,type:e.Json,...r}),this.labelsControllerGetChatsByLabel=(e,t,s={})=>this.request({path:`/api/${e}/labels/${t}/chats`,method:"GET",secure:!0,...s})}}class d extends s{constructor(){super(...arguments),this.mediaControllerConvertVoice=(t,s,o={})=>this.request({path:`/api/${t}/media/convert/voice`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o}),this.mediaControllerConvertVideo=(t,s,o={})=>this.request({path:`/api/${t}/media/convert/video`,method:"POST",body:s,secure:!0,type:e.Json,format:"json",...o})}}class m extends s{constructor(){super(...arguments),this.pingControllerPing=(e={})=>this.request({path:"/ping",method:"GET",format:"json",...e}),this.healthControllerCheck=(e={})=>this.request({path:"/health",method:"GET",secure:!0,format:"json",...e}),this.serverControllerGet=(e={})=>this.request({path:"/api/server/version",method:"GET",secure:!0,format:"json",...e}),this.serverControllerEnvironment=(e,t={})=>this.request({path:"/api/server/environment",method:"GET",query:e,secure:!0,format:"json",...t}),this.serverControllerStatus=(e={})=>this.request({path:"/api/server/status",method:"GET",secure:!0,format:"json",...e}),this.serverControllerStop=(t,s={})=>this.request({path:"/api/server/stop",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.serverDebugControllerCpuProfile=(e,t={})=>this.request({path:"/api/server/debug/cpu",method:"GET",query:e,secure:!0,...t}),this.serverDebugControllerHeapsnapshot=(e={})=>this.request({path:"/api/server/debug/heapsnapshot",method:"GET",secure:!0,...e}),this.serverDebugControllerBrowserTrace=(e,t,s={})=>this.request({path:`/api/server/debug/browser/trace/${e}`,method:"GET",query:t,secure:!0,...s}),this.versionControllerGet=(e={})=>this.request({path:"/api/version",method:"GET",secure:!0,format:"json",...e})}}class y extends s{constructor(){super(...arguments),this.authControllerGetQr=(e,t,s={})=>this.request({path:`/api/${e}/auth/qr`,method:"GET",query:t,secure:!0,format:"json",...s}),this.authControllerRequestCode=(t,s,o={})=>this.request({path:`/api/${t}/auth/request-code`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.screenshotControllerScreenshot=(e,t={})=>this.request({path:"/api/screenshot",method:"GET",query:e,secure:!0,format:"json",...t})}}class C extends s{constructor(){super(...arguments),this.presenceControllerSetPresence=(t,s,o={})=>this.request({path:`/api/${t}/presence`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.presenceControllerGetPresenceAll=(e,t={})=>this.request({path:`/api/${e}/presence`,method:"GET",secure:!0,format:"json",...t}),this.presenceControllerGetPresence=(e,t,s={})=>this.request({path:`/api/${e}/presence/${t}`,method:"GET",secure:!0,format:"json",...s}),this.presenceControllerSubscribe=(e,t,s={})=>this.request({path:`/api/${e}/presence/${t}/subscribe`,method:"POST",secure:!0,...s})}}class q extends s{constructor(){super(...arguments),this.profileControllerGetMyProfile=(e,t={})=>this.request({path:`/api/${e}/profile`,method:"GET",secure:!0,format:"json",...t}),this.profileControllerSetProfileName=(t,s,o={})=>this.request({path:`/api/${t}/profile/name`,method:"PUT",body:s,secure:!0,type:e.Json,format:"json",...o}),this.profileControllerSetProfileStatus=(t,s,o={})=>this.request({path:`/api/${t}/profile/status`,method:"PUT",body:s,secure:!0,type:e.Json,format:"json",...o}),this.profileControllerSetProfilePicture=(t,s,o={})=>this.request({path:`/api/${t}/profile/picture`,method:"PUT",body:s,secure:!0,type:e.Json,format:"json",...o}),this.profileControllerDeleteProfilePicture=(e,t={})=>this.request({path:`/api/${e}/profile/picture`,method:"DELETE",secure:!0,format:"json",...t})}}class T extends s{constructor(){super(...arguments),this.sessionsControllerList=(e,t={})=>this.request({path:"/api/sessions",method:"GET",query:e,secure:!0,format:"json",...t}),this.sessionsControllerCreate=(t,s={})=>this.request({path:"/api/sessions",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.sessionsControllerGet=(e,t,s={})=>this.request({path:`/api/sessions/${e}`,method:"GET",query:t,secure:!0,format:"json",...s}),this.sessionsControllerUpdate=(t,s,o={})=>this.request({path:`/api/sessions/${t}`,method:"PUT",body:s,secure:!0,type:e.Json,format:"json",...o}),this.sessionsControllerDelete=(e,t={})=>this.request({path:`/api/sessions/${e}`,method:"DELETE",secure:!0,...t}),this.sessionsControllerGetMe=(e,t={})=>this.request({path:`/api/sessions/${e}/me`,method:"GET",secure:!0,format:"json",...t}),this.sessionsControllerStart=(e,t={})=>this.request({path:`/api/sessions/${e}/start`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerStop=(e,t={})=>this.request({path:`/api/sessions/${e}/stop`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerLogout=(e,t={})=>this.request({path:`/api/sessions/${e}/logout`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerRestart=(e,t={})=>this.request({path:`/api/sessions/${e}/restart`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerDepracatedStart=(t,s={})=>this.request({path:"/api/sessions/start",method:"POST",body:t,secure:!0,type:e.Json,format:"json",...s}),this.sessionsControllerDeprecatedStop=(t,s={})=>this.request({path:"/api/sessions/stop",method:"POST",body:t,secure:!0,type:e.Json,...s}),this.sessionsControllerDeprecatedLogout=(t,s={})=>this.request({path:"/api/sessions/logout",method:"POST",body:t,secure:!0,type:e.Json,...s})}}class $ extends s{constructor(){super(...arguments),this.statusControllerSendTextStatus=(t,s,o={})=>this.request({path:`/api/${t}/status/text`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.statusControllerSendImageStatus=(t,s,o={})=>this.request({path:`/api/${t}/status/image`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.statusControllerSendVoiceStatus=(t,s,o={})=>this.request({path:`/api/${t}/status/voice`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.statusControllerSendVideoStatus=(t,s,o={})=>this.request({path:`/api/${t}/status/video`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.statusControllerDeleteStatus=(t,s,o={})=>this.request({path:`/api/${t}/status/delete`,method:"POST",body:s,secure:!0,type:e.Json,...o}),this.statusControllerGetNewMessageId=(e,t={})=>this.request({path:`/api/${e}/status/new-message-id`,method:"GET",secure:!0,format:"json",...t})}}exports.ApiKeys=o,exports.Apps=r,exports.Calls=a,exports.Channels=h,exports.Chats=i,exports.Chatting=n,exports.Contacts=p,exports.Events=u,exports.Groups=l,exports.HttpClient=s,exports.Labels=c,exports.Media=d,exports.Observability=m,exports.Pairing=y,exports.Presence=C,exports.Profile=q,exports.Sessions=T,exports.Status=$,exports.WahaClient=class{get httpClient(){return this.sessions.instance}constructor(e,t){let s;s="string"==typeof e?{baseURL:e,securityWorker:t?()=>({headers:{"X-Api-Key":t}}):void 0}:e,this.apikeys=new o(s),this.apps=new r(s),this.calls=new a(s),this.channels=new h(s),this.chats=new i(s),this.chatting=new n(s),this.contacts=new p(s),this.events=new u(s),this.groups=new l(s),this.labels=new c(s),this.media=new d(s),this.observability=new m(s),this.pairing=new y(s),this.presence=new C(s),this.profile=new q(s),this.sessions=new T(s),this.status=new $(s)}};
package/dist/index.d.ts CHANGED
@@ -19,6 +19,20 @@ interface RequestCodeRequest {
19
19
  */
20
20
  method?: string;
21
21
  }
22
+ interface SessionActionsDTO {
23
+ /** Read session data (messages, contacts, chats, groups, etc.) */
24
+ read?: boolean;
25
+ /** Send messages and manage session entities (groups, labels, channels, contacts, profile) */
26
+ send?: boolean;
27
+ /** Session lifecycle: start, stop, restart, logout, authenticate */
28
+ control?: boolean;
29
+ /** Session config: update session settings */
30
+ setting?: boolean;
31
+ /** Manage apps */
32
+ app?: boolean;
33
+ /** Delete the session */
34
+ delete?: boolean;
35
+ }
22
36
  interface ApiKeyRequest {
23
37
  /**
24
38
  * @default false
@@ -35,6 +49,8 @@ interface ApiKeyRequest {
35
49
  * @example true
36
50
  */
37
51
  isActive: boolean;
52
+ /** @default null */
53
+ actions?: SessionActionsDTO | null;
38
54
  }
39
55
  interface ApiKeyDTO {
40
56
  /** @example "key_id_00000000000000000000000000" */
@@ -47,6 +63,7 @@ interface ApiKeyDTO {
47
63
  isAdmin: boolean;
48
64
  /** @example "default" */
49
65
  session?: string | null;
66
+ actions?: SessionActionsDTO | null;
50
67
  }
51
68
  interface ChatWootCommandsConfig {
52
69
  /** @default true */
@@ -85,6 +102,16 @@ interface CallsAppChannelConfig {
85
102
  reject: boolean;
86
103
  /** Optional auto-reply message sent after the call is rejected. If empty, no message is sent. */
87
104
  message?: string;
105
+ /**
106
+ * Seconds to wait before declining the call. If not set or undefined, the call is declined immediately (0 seconds).
107
+ * @min 0
108
+ */
109
+ waitBeforeDecline?: number;
110
+ /**
111
+ * Seconds to wait before sending the auto-reply message. If not set or undefined, the message is sent immediately (0 seconds).
112
+ * @min 0
113
+ */
114
+ waitBeforeResponse?: number;
88
115
  }
89
116
  interface CallsAppConfig {
90
117
  /**
@@ -98,6 +125,20 @@ interface CallsAppConfig {
98
125
  */
99
126
  group: CallsAppChannelConfig;
100
127
  }
128
+ interface McpAppConfig {
129
+ /** Permission scopes for the generated API key. */
130
+ actions: SessionActionsDTO;
131
+ /**
132
+ * ID of the API key created for this app. Read-only.
133
+ * @example "key_id_00000000000000000000000000"
134
+ */
135
+ key_id?: string | null;
136
+ /**
137
+ * The API key value. Populated on read; not persisted in this record.
138
+ * @example "key_11111111111AAAAAAAAAAAAAAAAAAAAA"
139
+ */
140
+ key?: string | null;
141
+ }
101
142
  interface App {
102
143
  /**
103
144
  * Enable or disable this app without deleting it. If omitted, treated as enabled (true).
@@ -106,7 +147,7 @@ interface App {
106
147
  enabled?: boolean;
107
148
  id: string;
108
149
  session: string;
109
- app: 'chatwoot' | 'calls';
150
+ app: 'chatwoot' | 'calls' | 'mcp';
110
151
  config: object;
111
152
  }
112
153
  interface MeInfo {
@@ -391,6 +432,12 @@ interface ProfilePictureRequest {
391
432
  interface MessageTextRequest {
392
433
  /** @example "11111111111@c.us" */
393
434
  chatId: string;
435
+ /**
436
+ * Pre-generated message id
437
+ * @default null
438
+ * @example "BBBBBBBBBBBBBBBBB"
439
+ */
440
+ id?: string;
394
441
  /**
395
442
  * The ID of the message to reply to - false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA
396
443
  * @example null
@@ -461,6 +508,10 @@ interface ReplyToMessage {
461
508
  participant?: string;
462
509
  /** @example "Hello!" */
463
510
  body?: string;
511
+ /** Indicates if the message has media available for download */
512
+ hasMedia: boolean;
513
+ /** Media object for the message if any and downloaded */
514
+ media?: WAMedia;
464
515
  /** Raw data from reply's message */
465
516
  _data?: object;
466
517
  }
@@ -758,6 +809,12 @@ interface SendListRequest {
758
809
  interface MessageForwardRequest {
759
810
  /** @example "11111111111@c.us" */
760
811
  chatId: string;
812
+ /**
813
+ * Pre-generated message id
814
+ * @default null
815
+ * @example "BBBBBBBBBBBBBBBBB"
816
+ */
817
+ id?: string;
761
818
  /** @example "false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA" */
762
819
  messageId: string;
763
820
  /** @default "default" */
@@ -819,6 +876,12 @@ interface MessagePoll {
819
876
  interface MessagePollRequest {
820
877
  /** @example "11111111111@c.us" */
821
878
  chatId: string;
879
+ /**
880
+ * Pre-generated message id
881
+ * @default null
882
+ * @example "BBBBBBBBBBBBBBBBB"
883
+ */
884
+ id?: string;
822
885
  /**
823
886
  * The ID of the message to reply to - false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA
824
887
  * @example null
@@ -848,6 +911,12 @@ interface MessagePollVoteRequest {
848
911
  interface MessageLocationRequest {
849
912
  /** @example "11111111111@c.us" */
850
913
  chatId: string;
914
+ /**
915
+ * Pre-generated message id
916
+ * @default null
917
+ * @example "BBBBBBBBBBBBBBBBB"
918
+ */
919
+ id?: string;
851
920
  /** @example 38.8937255 */
852
921
  latitude: number;
853
922
  /** @example -77.0969763 */
@@ -901,6 +970,12 @@ interface VCardContact {
901
970
  interface MessageContactVcardRequest {
902
971
  /** @example "11111111111@c.us" */
903
972
  chatId: string;
973
+ /**
974
+ * Pre-generated message id
975
+ * @default null
976
+ * @example "BBBBBBBBBBBBBBBBB"
977
+ */
978
+ id?: string;
904
979
  contacts: (VCardContact | Contact)[];
905
980
  /**
906
981
  * The ID of the message to reply to - false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA
@@ -931,6 +1006,12 @@ interface WANumberExistResult {
931
1006
  interface MessageReplyRequest {
932
1007
  /** @example "11111111111@c.us" */
933
1008
  chatId: string;
1009
+ /**
1010
+ * Pre-generated message id
1011
+ * @default null
1012
+ * @example "BBBBBBBBBBBBBBBBB"
1013
+ */
1014
+ id?: string;
934
1015
  /**
935
1016
  * The ID of the message to reply to - false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA
936
1017
  * @example null
@@ -948,10 +1029,23 @@ interface MessageReplyRequest {
948
1029
  interface MessageLinkPreviewRequest {
949
1030
  /** @example "11111111111@c.us" */
950
1031
  chatId: string;
951
- /** @default "default" */
952
- session: string;
1032
+ /**
1033
+ * Pre-generated message id
1034
+ * @default null
1035
+ * @example "BBBBBBBBBBBBBBBBB"
1036
+ */
1037
+ id?: string;
953
1038
  url: string;
954
1039
  title: string;
1040
+ /** @default "default" */
1041
+ session: string;
1042
+ }
1043
+ interface NewMessageIDResponse {
1044
+ /**
1045
+ * Pre-generated message id
1046
+ * @example "BBBBBBBBBBBBBBBBB"
1047
+ */
1048
+ id: string;
955
1049
  }
956
1050
  interface ChatSummary {
957
1051
  id: string;
@@ -1223,13 +1317,6 @@ interface DeleteStatusRequest {
1223
1317
  */
1224
1318
  contacts?: string[];
1225
1319
  }
1226
- interface NewMessageIDResponse {
1227
- /**
1228
- * Pre-generated message id
1229
- * @example "BBBBBBBBBBBBBBBBB"
1230
- */
1231
- id: string;
1232
- }
1233
1320
  interface Label {
1234
1321
  /**
1235
1322
  * Label ID
@@ -2827,6 +2914,14 @@ declare class Apps<SecurityDataType = unknown> extends HttpClient<SecurityDataTy
2827
2914
  * @secure
2828
2915
  */
2829
2916
  appsControllerDelete: (id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
2917
+ /**
2918
+ * No description
2919
+ *
2920
+ * @tags 🧩 Apps
2921
+ * @name McpControllerPost
2922
+ * @request POST:/mcp
2923
+ */
2924
+ mcpControllerPost: (params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
2830
2925
  }
2831
2926
 
2832
2927
  declare class Calls<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
@@ -3533,6 +3628,16 @@ declare class Chatting<SecurityDataType = unknown> extends HttpClient<SecurityDa
3533
3628
  * @secure
3534
3629
  */
3535
3630
  chattingControllerSendLinkPreviewDeprecated: (data: MessageLinkPreviewRequest, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
3631
+ /**
3632
+ * No description
3633
+ *
3634
+ * @tags 📤 Chatting
3635
+ * @name ChattingControllerGetNewMessageId
3636
+ * @summary Generate a new message ID
3637
+ * @request GET:/api/{session}/new-message-id
3638
+ * @secure
3639
+ */
3640
+ chattingControllerGetNewMessageId: (session: any, params?: RequestParams) => Promise<AxiosResponse<NewMessageIDResponse, any, {}>>;
3536
3641
  }
3537
3642
 
3538
3643
  declare class Contacts<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
@@ -4644,4 +4749,4 @@ declare class WahaClient {
4644
4749
  }
4645
4750
 
4646
4751
  export { ApiKeys, Apps, Calls, Channels, Chats, Chatting, Contacts, Events, Groups, HttpClient, Labels, Media, Observability, Pairing, Presence, Profile, Sessions, Status, WahaClient };
4647
- export type { ApiKeyDTO, ApiKeyRequest, App, Base64File, BinaryFile, Button, CallData, CallsAppChannelConfig, CallsAppConfig, Channel, ChannelCategory, ChannelCountry, ChannelListResult, ChannelMessage, ChannelPagination, ChannelPublicInfo, ChannelSearchByText, ChannelSearchByView, ChannelView, ChatArchiveEvent, ChatPictureResponse, ChatRequest, ChatSummary, ChatWootAppConfig, ChatWootCommandsConfig, ChatWootConversationsConfig, ClientSessionConfig, Contact, ContactRequest, ContactUpdateBody, CountResponse, CreateChannelRequest, CreateGroupRequest, CustomHeader, DeleteStatusRequest, DescriptionRequest, EditMessageRequest, EnginePayload, EventLocation, EventMessage, EventMessageRequest, EventResponse, EventResponsePayload, FileContent, FileURL, GetChatsOverviewParams, GowsConfig, GowsStorageConfig, GroupId, GroupInfo, GroupParticipant, GroupV2JoinEvent, GroupV2LeaveEvent, GroupV2ParticipantsEvent, GroupV2UpdateEvent, HmacConfiguration, IgnoreConfig, ImageStatus, JoinGroupRequest, JoinGroupResponse, Label, LabelBody, LabelChatAssociation, LabelID, LidToPhoneNumber, LinkPreviewData, MeInfo, MessageButtonReply, MessageContactVcardRequest, MessageDestination, MessageFileRequest, MessageForwardRequest, MessageImageRequest, MessageLinkCustomPreviewRequest, MessageLinkPreviewRequest, MessageLocationRequest, MessagePoll, MessagePollRequest, MessagePollVoteRequest, MessageReactionRequest, MessageReplyRequest, MessageStarRequest, MessageTextRequest, MessageVideoRequest, MessageVoiceRequest, MyProfile, NewMessageIDResponse, NowebConfig, NowebStoreConfig, OverviewBodyRequest, OverviewFilter, Participant, ParticipantsRequest, PinMessageRequest, PingResponse, PollVote, PollVotePayload, ProfileNameRequest, ProfilePictureRequest, ProfileStatusRequest, ProxyConfig, QRCodeValue, ReadChatMessagesResponse, RejectCallRequest, RemoteFile, ReplyToMessage, RequestCodeRequest, Result, RetriesConfiguration, Row, S3MediaData, Section, SendButtonsRequest, SendListMessage, SendListRequest, SendSeenRequest, ServerStatusResponse, SessionConfig, SessionCreateRequest, SessionDTO, SessionInfo, SessionLogoutDeprecatedRequest, SessionStartDeprecatedRequest, SessionStatusPoint, SessionStopDeprecatedRequest, SessionUpdateRequest, SetLabelsRequest, SettingsSecurityChangeInfo, StopRequest, StopResponse, SubjectRequest, TextStatus, VCardContact, VideoBinaryFile, VideoFileDTO, VideoRemoteFile, VideoStatus, VoiceBinaryFile, VoiceFileDTO, VoiceRemoteFile, VoiceStatus, WAHAChatPresences, WAHAEnvironment, WAHAPresenceData, WAHASessionPresence, WAHAWebhookCallAccepted, WAHAWebhookCallReceived, WAHAWebhookCallRejected, WAHAWebhookChatArchive, WAHAWebhookEngineEvent, WAHAWebhookEventResponse, WAHAWebhookEventResponseFailed, WAHAWebhookGroupJoin, WAHAWebhookGroupLeave, WAHAWebhookLabelChatAdded, WAHAWebhookLabelChatDeleted, WAHAWebhookLabelDeleted, WAHAWebhookLabelUpsert, WAHAWebhookMessage, WAHAWebhookMessageAck, WAHAWebhookMessageAckGroup, WAHAWebhookMessageAny, WAHAWebhookMessageEdited, WAHAWebhookMessageReaction, WAHAWebhookMessageRevoked, WAHAWebhookPollVote, WAHAWebhookPollVoteFailed, WAHAWebhookPresenceUpdate, WAHAWebhookSessionStatus, WAHAWebhookStateChange, WALocation, WAMedia, WAMessage, WAMessageAckBody, WAMessageEditedBody, WAMessageReaction, WAMessageRevokedBody, WANumberExistResult, WAReaction, WASessionStatusBody, WebhookConfig, WebhookGroupV2Join, WebhookGroupV2Leave, WebhookGroupV2Participants, WebhookGroupV2Update, WebjsConfig, WorkerInfo };
4752
+ export type { ApiKeyDTO, ApiKeyRequest, App, Base64File, BinaryFile, Button, CallData, CallsAppChannelConfig, CallsAppConfig, Channel, ChannelCategory, ChannelCountry, ChannelListResult, ChannelMessage, ChannelPagination, ChannelPublicInfo, ChannelSearchByText, ChannelSearchByView, ChannelView, ChatArchiveEvent, ChatPictureResponse, ChatRequest, ChatSummary, ChatWootAppConfig, ChatWootCommandsConfig, ChatWootConversationsConfig, ClientSessionConfig, Contact, ContactRequest, ContactUpdateBody, CountResponse, CreateChannelRequest, CreateGroupRequest, CustomHeader, DeleteStatusRequest, DescriptionRequest, EditMessageRequest, EnginePayload, EventLocation, EventMessage, EventMessageRequest, EventResponse, EventResponsePayload, FileContent, FileURL, GetChatsOverviewParams, GowsConfig, GowsStorageConfig, GroupId, GroupInfo, GroupParticipant, GroupV2JoinEvent, GroupV2LeaveEvent, GroupV2ParticipantsEvent, GroupV2UpdateEvent, HmacConfiguration, IgnoreConfig, ImageStatus, JoinGroupRequest, JoinGroupResponse, Label, LabelBody, LabelChatAssociation, LabelID, LidToPhoneNumber, LinkPreviewData, McpAppConfig, MeInfo, MessageButtonReply, MessageContactVcardRequest, MessageDestination, MessageFileRequest, MessageForwardRequest, MessageImageRequest, MessageLinkCustomPreviewRequest, MessageLinkPreviewRequest, MessageLocationRequest, MessagePoll, MessagePollRequest, MessagePollVoteRequest, MessageReactionRequest, MessageReplyRequest, MessageStarRequest, MessageTextRequest, MessageVideoRequest, MessageVoiceRequest, MyProfile, NewMessageIDResponse, NowebConfig, NowebStoreConfig, OverviewBodyRequest, OverviewFilter, Participant, ParticipantsRequest, PinMessageRequest, PingResponse, PollVote, PollVotePayload, ProfileNameRequest, ProfilePictureRequest, ProfileStatusRequest, ProxyConfig, QRCodeValue, ReadChatMessagesResponse, RejectCallRequest, RemoteFile, ReplyToMessage, RequestCodeRequest, Result, RetriesConfiguration, Row, S3MediaData, Section, SendButtonsRequest, SendListMessage, SendListRequest, SendSeenRequest, ServerStatusResponse, SessionActionsDTO, SessionConfig, SessionCreateRequest, SessionDTO, SessionInfo, SessionLogoutDeprecatedRequest, SessionStartDeprecatedRequest, SessionStatusPoint, SessionStopDeprecatedRequest, SessionUpdateRequest, SetLabelsRequest, SettingsSecurityChangeInfo, StopRequest, StopResponse, SubjectRequest, TextStatus, VCardContact, VideoBinaryFile, VideoFileDTO, VideoRemoteFile, VideoStatus, VoiceBinaryFile, VoiceFileDTO, VoiceRemoteFile, VoiceStatus, WAHAChatPresences, WAHAEnvironment, WAHAPresenceData, WAHASessionPresence, WAHAWebhookCallAccepted, WAHAWebhookCallReceived, WAHAWebhookCallRejected, WAHAWebhookChatArchive, WAHAWebhookEngineEvent, WAHAWebhookEventResponse, WAHAWebhookEventResponseFailed, WAHAWebhookGroupJoin, WAHAWebhookGroupLeave, WAHAWebhookLabelChatAdded, WAHAWebhookLabelChatDeleted, WAHAWebhookLabelDeleted, WAHAWebhookLabelUpsert, WAHAWebhookMessage, WAHAWebhookMessageAck, WAHAWebhookMessageAckGroup, WAHAWebhookMessageAny, WAHAWebhookMessageEdited, WAHAWebhookMessageReaction, WAHAWebhookMessageRevoked, WAHAWebhookPollVote, WAHAWebhookPollVoteFailed, WAHAWebhookPresenceUpdate, WAHAWebhookSessionStatus, WAHAWebhookStateChange, WALocation, WAMedia, WAMessage, WAMessageAckBody, WAMessageEditedBody, WAMessageReaction, WAMessageRevokedBody, WANumberExistResult, WAReaction, WASessionStatusBody, WebhookConfig, WebhookGroupV2Join, WebhookGroupV2Leave, WebhookGroupV2Participants, WebhookGroupV2Update, WebjsConfig, WorkerInfo };
package/dist/index.esm.js CHANGED
@@ -1 +1 @@
1
- import e from"axios";var t;!function(e){e.Json="application/json",e.JsonApi="application/vnd.api+json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain"}(t||(t={}));class s{constructor({securityWorker:s,secure:o,format:r,...a}={}){this.securityData=null,this.setSecurityData=e=>{this.securityData=e},this.request=async({secure:e,path:s,type:o,query:r,format:a,body:h,...i})=>{const n=("boolean"==typeof e?e:this.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},p=this.mergeRequestParams(i,n),u=a||this.format||void 0;return o===t.FormData&&h&&null!==h&&"object"==typeof h&&(h=this.createFormData(h)),o===t.Text&&h&&null!==h&&"string"!=typeof h&&(h=JSON.stringify(h)),this.instance.request({...p,headers:{...p.headers||{},...o?{"Content-Type":o}:{}},params:r,responseType:u,data:h,url:s})},this.instance=e.create({...a,baseURL:a.baseURL||""}),this.secure=o,this.format=r,this.securityWorker=s}mergeRequestParams(e,t){const s=e.method||t&&t.method;return{...this.instance.defaults,...e,...t||{},headers:{...s&&this.instance.defaults.headers[s.toLowerCase()]||{},...e.headers||{},...t&&t.headers||{}}}}stringifyFormItem(e){return"object"==typeof e&&null!==e?JSON.stringify(e):`${e}`}createFormData(e){return e instanceof FormData?e:Object.keys(e||{}).reduce((t,s)=>{const o=e[s],r=o instanceof Array?o:[o];for(const e of r){const o=e instanceof Blob||e instanceof File;t.append(s,o?e:this.stringifyFormItem(e))}return t},new FormData)}}class o extends s{constructor(){super(...arguments),this.apiKeysControllerCreate=(e,s={})=>this.request({path:"/api/keys",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.apiKeysControllerList=(e={})=>this.request({path:"/api/keys",method:"GET",secure:!0,format:"json",...e}),this.apiKeysControllerUpdate=(e,s,o={})=>this.request({path:`/api/keys/${e}`,method:"PUT",body:s,secure:!0,type:t.Json,format:"json",...o}),this.apiKeysControllerDelete=(e,t={})=>this.request({path:`/api/keys/${e}`,method:"DELETE",secure:!0,...t})}}class r extends s{constructor(){super(...arguments),this.appsControllerList=(e,t={})=>this.request({path:"/api/apps",method:"GET",query:e,secure:!0,...t}),this.appsControllerCreate=(e,s={})=>this.request({path:"/api/apps",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.appsControllerGet=(e,t={})=>this.request({path:`/api/apps/${e}`,method:"GET",secure:!0,...t}),this.appsControllerUpdate=(e,s,o={})=>this.request({path:`/api/apps/${e}`,method:"PUT",body:s,secure:!0,type:t.Json,...o}),this.appsControllerDelete=(e,t={})=>this.request({path:`/api/apps/${e}`,method:"DELETE",secure:!0,...t})}}class a extends s{constructor(){super(...arguments),this.callsControllerRejectCall=(e,s,o={})=>this.request({path:`/api/${e}/calls/reject`,method:"POST",body:s,secure:!0,type:t.Json,...o})}}class h extends s{constructor(){super(...arguments),this.channelsControllerList=(e,t,s={})=>this.request({path:`/api/${e}/channels`,method:"GET",query:t,secure:!0,format:"json",...s}),this.channelsControllerCreate=(e,s,o={})=>this.request({path:`/api/${e}/channels`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o}),this.channelsControllerDelete=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}`,method:"DELETE",secure:!0,...s}),this.channelsControllerGet=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}`,method:"GET",secure:!0,format:"json",...s}),this.channelsControllerPreviewChannelMessages=(e,t,s,o={})=>this.request({path:`/api/${e}/channels/${t}/messages/preview`,method:"GET",query:s,secure:!0,format:"json",...o}),this.channelsControllerFollow=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/follow`,method:"POST",secure:!0,...s}),this.channelsControllerUnfollow=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/unfollow`,method:"POST",secure:!0,...s}),this.channelsControllerMute=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/mute`,method:"POST",secure:!0,...s}),this.channelsControllerUnmute=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/unmute`,method:"POST",secure:!0,...s}),this.channelsControllerSearchByView=(e,s,o={})=>this.request({path:`/api/${e}/channels/search/by-view`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o}),this.channelsControllerSearchByText=(e,s,o={})=>this.request({path:`/api/${e}/channels/search/by-text`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o}),this.channelsControllerGetSearchViews=(e,t={})=>this.request({path:`/api/${e}/channels/search/views`,method:"GET",secure:!0,format:"json",...t}),this.channelsControllerGetSearchCountries=(e,t={})=>this.request({path:`/api/${e}/channels/search/countries`,method:"GET",secure:!0,format:"json",...t}),this.channelsControllerGetSearchCategories=(e,t={})=>this.request({path:`/api/${e}/channels/search/categories`,method:"GET",secure:!0,format:"json",...t})}}class i extends s{constructor(){super(...arguments),this.chatsControllerGetChats=(e,t,s={})=>this.request({path:`/api/${e}/chats`,method:"GET",query:t,secure:!0,...s}),this.chatsControllerGetChatsOverview=(e,t,s={})=>this.request({path:`/api/${e}/chats/overview`,method:"GET",query:t,secure:!0,format:"json",...s}),this.chatsControllerPostChatsOverview=(e,s,o={})=>this.request({path:`/api/${e}/chats/overview`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o}),this.chatsControllerDeleteChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}`,method:"DELETE",secure:!0,...s}),this.chatsControllerGetChatPicture=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/picture`,method:"GET",query:s,secure:!0,format:"json",...o}),this.chatsControllerGetChatMessages=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages`,method:"GET",query:s,secure:!0,format:"json",...o}),this.chatsControllerClearMessages=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/messages`,method:"DELETE",secure:!0,...s}),this.chatsControllerReadChatMessages=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages/read`,method:"POST",query:s,secure:!0,format:"json",...o}),this.chatsControllerGetChatMessage=(e,t,s,o,r={})=>this.request({path:`/api/${e}/chats/${t}/messages/${s}`,method:"GET",query:o,secure:!0,format:"json",...r}),this.chatsControllerDeleteMessage=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages/${s}`,method:"DELETE",secure:!0,...o}),this.chatsControllerEditMessage=(e,s,o,r,a={})=>this.request({path:`/api/${e}/chats/${s}/messages/${o}`,method:"PUT",body:r,secure:!0,type:t.Json,...a}),this.chatsControllerPinMessage=(e,s,o,r,a={})=>this.request({path:`/api/${e}/chats/${s}/messages/${o}/pin`,method:"POST",body:r,secure:!0,type:t.Json,...a}),this.chatsControllerUnpinMessage=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages/${s}/unpin`,method:"POST",secure:!0,...o}),this.chatsControllerArchiveChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/archive`,method:"POST",secure:!0,format:"json",...s}),this.chatsControllerUnarchiveChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/unarchive`,method:"POST",secure:!0,format:"json",...s}),this.chatsControllerUnreadChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/unread`,method:"POST",secure:!0,format:"json",...s})}}class n extends s{constructor(){super(...arguments),this.chattingControllerSendText=(e,s={})=>this.request({path:"/api/sendText",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendTextGet=(e,t={})=>this.request({path:"/api/sendText",method:"GET",query:e,secure:!0,format:"json",...t}),this.chattingControllerSendImage=(e,s={})=>this.request({path:"/api/sendImage",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendFile=(e,s={})=>this.request({path:"/api/sendFile",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendVoice=(e,s={})=>this.request({path:"/api/sendVoice",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendVideo=(e,s={})=>this.request({path:"/api/sendVideo",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerSendLinkCustomPreview=(e,s={})=>this.request({path:"/api/send/link-custom-preview",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendButtons=(e,s={})=>this.request({path:"/api/sendButtons",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerSendList=(e,s={})=>this.request({path:"/api/sendList",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerForwardMessage=(e,s={})=>this.request({path:"/api/forwardMessage",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendSeen=(e,s={})=>this.request({path:"/api/sendSeen",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerStartTyping=(e,s={})=>this.request({path:"/api/startTyping",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerStopTyping=(e,s={})=>this.request({path:"/api/stopTyping",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerSetReaction=(e,s={})=>this.request({path:"/api/reaction",method:"PUT",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSetStar=(e,s={})=>this.request({path:"/api/star",method:"PUT",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerSendPoll=(e,s={})=>this.request({path:"/api/sendPoll",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerSendPollVote=(e,s={})=>this.request({path:"/api/sendPollVote",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerSendLocation=(e,s={})=>this.request({path:"/api/sendLocation",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendContactVcard=(e,s={})=>this.request({path:"/api/sendContactVcard",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerSendButtonsReply=(e,s={})=>this.request({path:"/api/send/buttons/reply",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerGetMessages=(e,t={})=>this.request({path:"/api/messages",method:"GET",query:e,secure:!0,format:"json",...t}),this.chattingControllerDeprecatedCheckNumberStatus=(e,t={})=>this.request({path:"/api/checkNumberStatus",method:"GET",query:e,secure:!0,format:"json",...t}),this.chattingControllerReply=(e,s={})=>this.request({path:"/api/reply",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendLinkPreviewDeprecated=(e,s={})=>this.request({path:"/api/sendLinkPreview",method:"POST",body:e,secure:!0,type:t.Json,...s})}}class p extends s{constructor(){super(...arguments),this.contactsControllerGetAll=(e,t={})=>this.request({path:"/api/contacts/all",method:"GET",query:e,secure:!0,...t}),this.contactsControllerGet=(e,t={})=>this.request({path:"/api/contacts",method:"GET",query:e,secure:!0,...t}),this.contactsControllerCheckExists=(e,t={})=>this.request({path:"/api/contacts/check-exists",method:"GET",query:e,secure:!0,format:"json",...t}),this.contactsControllerGetAbout=(e,t={})=>this.request({path:"/api/contacts/about",method:"GET",query:e,secure:!0,...t}),this.contactsControllerGetProfilePicture=(e,t={})=>this.request({path:"/api/contacts/profile-picture",method:"GET",query:e,secure:!0,...t}),this.contactsControllerBlock=(e,s={})=>this.request({path:"/api/contacts/block",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.contactsControllerUnblock=(e,s={})=>this.request({path:"/api/contacts/unblock",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.contactsSessionControllerGet=(e,t,s={})=>this.request({path:`/api/${e}/contacts/${t}`,method:"GET",secure:!0,...s}),this.contactsSessionControllerPut=(e,s,o,r={})=>this.request({path:`/api/${e}/contacts/${s}`,method:"PUT",body:o,secure:!0,type:t.Json,format:"json",...r}),this.lidsControllerGetAll=(e,t,s={})=>this.request({path:`/api/${e}/lids`,method:"GET",query:t,secure:!0,format:"json",...s}),this.lidsControllerGetLidsCount=(e,t={})=>this.request({path:`/api/${e}/lids/count`,method:"GET",secure:!0,format:"json",...t}),this.lidsControllerFindPnByLid=(e,t,s={})=>this.request({path:`/api/${e}/lids/${t}`,method:"GET",secure:!0,format:"json",...s}),this.lidsControllerFindLidByPhoneNumber=(e,t,s={})=>this.request({path:`/api/${e}/lids/pn/${t}`,method:"GET",secure:!0,format:"json",...s})}}class u extends s{constructor(){super(...arguments),this.eventsControllerSendEvent=(e,s,o={})=>this.request({path:`/api/${e}/events`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o})}}class l extends s{constructor(){super(...arguments),this.groupsControllerCreateGroup=(e,s,o={})=>this.request({path:`/api/${e}/groups`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.groupsControllerGetGroups=(e,t,s={})=>this.request({path:`/api/${e}/groups`,method:"GET",query:t,secure:!0,format:"json",...s}),this.groupsControllerJoinInfoGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/join-info`,method:"GET",query:t,secure:!0,format:"json",...s}),this.groupsControllerJoinGroup=(e,s,o={})=>this.request({path:`/api/${e}/groups/join`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o}),this.groupsControllerGetGroupsCount=(e,t={})=>this.request({path:`/api/${e}/groups/count`,method:"GET",secure:!0,format:"json",...t}),this.groupsControllerRefreshGroups=(e,t={})=>this.request({path:`/api/${e}/groups/refresh`,method:"POST",secure:!0,...t}),this.groupsControllerGetGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}`,method:"GET",secure:!0,...s}),this.groupsControllerDeleteGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}`,method:"DELETE",secure:!0,...s}),this.groupsControllerLeaveGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/leave`,method:"POST",secure:!0,...s}),this.groupsControllerGetChatPicture=(e,t,s,o={})=>this.request({path:`/api/${e}/groups/${t}/picture`,method:"GET",query:s,secure:!0,format:"json",...o}),this.groupsControllerSetPicture=(e,s,o,r={})=>this.request({path:`/api/${s}/groups/${e}/picture`,method:"PUT",body:o,secure:!0,type:t.Json,format:"json",...r}),this.groupsControllerDeletePicture=(e,t,s={})=>this.request({path:`/api/${t}/groups/${e}/picture`,method:"DELETE",secure:!0,format:"json",...s}),this.groupsControllerSetDescription=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/description`,method:"PUT",body:o,secure:!0,type:t.Json,...r}),this.groupsControllerSetSubject=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/subject`,method:"PUT",body:o,secure:!0,type:t.Json,...r}),this.groupsControllerSetInfoAdminOnly=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/settings/security/info-admin-only`,method:"PUT",body:o,secure:!0,type:t.Json,...r}),this.groupsControllerGetInfoAdminOnly=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/settings/security/info-admin-only`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerSetMessagesAdminOnly=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/settings/security/messages-admin-only`,method:"PUT",body:o,secure:!0,type:t.Json,...r}),this.groupsControllerGetMessagesAdminOnly=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/settings/security/messages-admin-only`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerGetInviteCode=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/invite-code`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerRevokeInviteCode=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/invite-code/revoke`,method:"POST",secure:!0,format:"json",...s}),this.groupsControllerGetParticipants=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/participants`,method:"GET",secure:!0,...s}),this.groupsControllerGetGroupParticipants=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/participants/v2`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerAddParticipants=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/participants/add`,method:"POST",body:o,secure:!0,type:t.Json,...r}),this.groupsControllerRemoveParticipants=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/participants/remove`,method:"POST",body:o,secure:!0,type:t.Json,...r}),this.groupsControllerPromoteToAdmin=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/admin/promote`,method:"POST",body:o,secure:!0,type:t.Json,...r}),this.groupsControllerDemoteToAdmin=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/admin/demote`,method:"POST",body:o,secure:!0,type:t.Json,...r})}}class c extends s{constructor(){super(...arguments),this.labelsControllerGetAll=(e,t={})=>this.request({path:`/api/${e}/labels`,method:"GET",secure:!0,format:"json",...t}),this.labelsControllerCreate=(e,s,o={})=>this.request({path:`/api/${e}/labels`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o}),this.labelsControllerUpdate=(e,s,o,r={})=>this.request({path:`/api/${e}/labels/${s}`,method:"PUT",body:o,secure:!0,type:t.Json,format:"json",...r}),this.labelsControllerDelete=(e,t,s={})=>this.request({path:`/api/${e}/labels/${t}`,method:"DELETE",secure:!0,format:"json",...s}),this.labelsControllerGetChatLabels=(e,t,s={})=>this.request({path:`/api/${e}/labels/chats/${t}`,method:"GET",secure:!0,format:"json",...s}),this.labelsControllerPutChatLabels=(e,s,o,r={})=>this.request({path:`/api/${e}/labels/chats/${s}`,method:"PUT",body:o,secure:!0,type:t.Json,...r}),this.labelsControllerGetChatsByLabel=(e,t,s={})=>this.request({path:`/api/${e}/labels/${t}/chats`,method:"GET",secure:!0,...s})}}class d extends s{constructor(){super(...arguments),this.mediaControllerConvertVoice=(e,s,o={})=>this.request({path:`/api/${e}/media/convert/voice`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o}),this.mediaControllerConvertVideo=(e,s,o={})=>this.request({path:`/api/${e}/media/convert/video`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o})}}class m extends s{constructor(){super(...arguments),this.pingControllerPing=(e={})=>this.request({path:"/ping",method:"GET",format:"json",...e}),this.healthControllerCheck=(e={})=>this.request({path:"/health",method:"GET",secure:!0,format:"json",...e}),this.serverControllerGet=(e={})=>this.request({path:"/api/server/version",method:"GET",secure:!0,format:"json",...e}),this.serverControllerEnvironment=(e,t={})=>this.request({path:"/api/server/environment",method:"GET",query:e,secure:!0,format:"json",...t}),this.serverControllerStatus=(e={})=>this.request({path:"/api/server/status",method:"GET",secure:!0,format:"json",...e}),this.serverControllerStop=(e,s={})=>this.request({path:"/api/server/stop",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.serverDebugControllerCpuProfile=(e,t={})=>this.request({path:"/api/server/debug/cpu",method:"GET",query:e,secure:!0,...t}),this.serverDebugControllerHeapsnapshot=(e={})=>this.request({path:"/api/server/debug/heapsnapshot",method:"GET",secure:!0,...e}),this.serverDebugControllerBrowserTrace=(e,t,s={})=>this.request({path:`/api/server/debug/browser/trace/${e}`,method:"GET",query:t,secure:!0,...s}),this.versionControllerGet=(e={})=>this.request({path:"/api/version",method:"GET",secure:!0,format:"json",...e})}}class y extends s{constructor(){super(...arguments),this.authControllerGetQr=(e,t,s={})=>this.request({path:`/api/${e}/auth/qr`,method:"GET",query:t,secure:!0,format:"json",...s}),this.authControllerRequestCode=(e,s,o={})=>this.request({path:`/api/${e}/auth/request-code`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.screenshotControllerScreenshot=(e,t={})=>this.request({path:"/api/screenshot",method:"GET",query:e,secure:!0,format:"json",...t})}}class C extends s{constructor(){super(...arguments),this.presenceControllerSetPresence=(e,s,o={})=>this.request({path:`/api/${e}/presence`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.presenceControllerGetPresenceAll=(e,t={})=>this.request({path:`/api/${e}/presence`,method:"GET",secure:!0,format:"json",...t}),this.presenceControllerGetPresence=(e,t,s={})=>this.request({path:`/api/${e}/presence/${t}`,method:"GET",secure:!0,format:"json",...s}),this.presenceControllerSubscribe=(e,t,s={})=>this.request({path:`/api/${e}/presence/${t}/subscribe`,method:"POST",secure:!0,...s})}}class q extends s{constructor(){super(...arguments),this.profileControllerGetMyProfile=(e,t={})=>this.request({path:`/api/${e}/profile`,method:"GET",secure:!0,format:"json",...t}),this.profileControllerSetProfileName=(e,s,o={})=>this.request({path:`/api/${e}/profile/name`,method:"PUT",body:s,secure:!0,type:t.Json,format:"json",...o}),this.profileControllerSetProfileStatus=(e,s,o={})=>this.request({path:`/api/${e}/profile/status`,method:"PUT",body:s,secure:!0,type:t.Json,format:"json",...o}),this.profileControllerSetProfilePicture=(e,s,o={})=>this.request({path:`/api/${e}/profile/picture`,method:"PUT",body:s,secure:!0,type:t.Json,format:"json",...o}),this.profileControllerDeleteProfilePicture=(e,t={})=>this.request({path:`/api/${e}/profile/picture`,method:"DELETE",secure:!0,format:"json",...t})}}class T extends s{constructor(){super(...arguments),this.sessionsControllerList=(e,t={})=>this.request({path:"/api/sessions",method:"GET",query:e,secure:!0,format:"json",...t}),this.sessionsControllerCreate=(e,s={})=>this.request({path:"/api/sessions",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.sessionsControllerGet=(e,t,s={})=>this.request({path:`/api/sessions/${e}`,method:"GET",query:t,secure:!0,format:"json",...s}),this.sessionsControllerUpdate=(e,s,o={})=>this.request({path:`/api/sessions/${e}`,method:"PUT",body:s,secure:!0,type:t.Json,format:"json",...o}),this.sessionsControllerDelete=(e,t={})=>this.request({path:`/api/sessions/${e}`,method:"DELETE",secure:!0,...t}),this.sessionsControllerGetMe=(e,t={})=>this.request({path:`/api/sessions/${e}/me`,method:"GET",secure:!0,format:"json",...t}),this.sessionsControllerStart=(e,t={})=>this.request({path:`/api/sessions/${e}/start`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerStop=(e,t={})=>this.request({path:`/api/sessions/${e}/stop`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerLogout=(e,t={})=>this.request({path:`/api/sessions/${e}/logout`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerRestart=(e,t={})=>this.request({path:`/api/sessions/${e}/restart`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerDepracatedStart=(e,s={})=>this.request({path:"/api/sessions/start",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.sessionsControllerDeprecatedStop=(e,s={})=>this.request({path:"/api/sessions/stop",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.sessionsControllerDeprecatedLogout=(e,s={})=>this.request({path:"/api/sessions/logout",method:"POST",body:e,secure:!0,type:t.Json,...s})}}class $ extends s{constructor(){super(...arguments),this.statusControllerSendTextStatus=(e,s,o={})=>this.request({path:`/api/${e}/status/text`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.statusControllerSendImageStatus=(e,s,o={})=>this.request({path:`/api/${e}/status/image`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.statusControllerSendVoiceStatus=(e,s,o={})=>this.request({path:`/api/${e}/status/voice`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.statusControllerSendVideoStatus=(e,s,o={})=>this.request({path:`/api/${e}/status/video`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.statusControllerDeleteStatus=(e,s,o={})=>this.request({path:`/api/${e}/status/delete`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.statusControllerGetNewMessageId=(e,t={})=>this.request({path:`/api/${e}/status/new-message-id`,method:"GET",secure:!0,format:"json",...t})}}class f{get httpClient(){return this.sessions.instance}constructor(e,t){let s;s="string"==typeof e?{baseURL:e,securityWorker:t?()=>({headers:{"X-Api-Key":t}}):void 0}:e,this.apikeys=new o(s),this.apps=new r(s),this.calls=new a(s),this.channels=new h(s),this.chats=new i(s),this.chatting=new n(s),this.contacts=new p(s),this.events=new u(s),this.groups=new l(s),this.labels=new c(s),this.media=new d(s),this.observability=new m(s),this.pairing=new y(s),this.presence=new C(s),this.profile=new q(s),this.sessions=new T(s),this.status=new $(s)}}export{o as ApiKeys,r as Apps,a as Calls,h as Channels,i as Chats,n as Chatting,p as Contacts,u as Events,l as Groups,s as HttpClient,c as Labels,d as Media,m as Observability,y as Pairing,C as Presence,q as Profile,T as Sessions,$ as Status,f as WahaClient};
1
+ import e from"axios";var t;!function(e){e.Json="application/json",e.JsonApi="application/vnd.api+json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain"}(t||(t={}));class s{constructor({securityWorker:s,secure:o,format:r,...a}={}){this.securityData=null,this.setSecurityData=e=>{this.securityData=e},this.request=async({secure:e,path:s,type:o,query:r,format:a,body:h,...i})=>{const n=("boolean"==typeof e?e:this.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},p=this.mergeRequestParams(i,n),u=a||this.format||void 0;return o===t.FormData&&h&&null!==h&&"object"==typeof h&&(h=this.createFormData(h)),o===t.Text&&h&&null!==h&&"string"!=typeof h&&(h=JSON.stringify(h)),this.instance.request({...p,headers:{...p.headers||{},...o?{"Content-Type":o}:{}},params:r,responseType:u,data:h,url:s})},this.instance=e.create({...a,baseURL:a.baseURL||""}),this.secure=o,this.format=r,this.securityWorker=s}mergeRequestParams(e,t){const s=e.method||t&&t.method;return{...this.instance.defaults,...e,...t||{},headers:{...s&&this.instance.defaults.headers[s.toLowerCase()]||{},...e.headers||{},...t&&t.headers||{}}}}stringifyFormItem(e){return"object"==typeof e&&null!==e?JSON.stringify(e):`${e}`}createFormData(e){return e instanceof FormData?e:Object.keys(e||{}).reduce((t,s)=>{const o=e[s],r=o instanceof Array?o:[o];for(const e of r){const o=e instanceof Blob||e instanceof File;t.append(s,o?e:this.stringifyFormItem(e))}return t},new FormData)}}class o extends s{constructor(){super(...arguments),this.apiKeysControllerCreate=(e,s={})=>this.request({path:"/api/keys",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.apiKeysControllerList=(e={})=>this.request({path:"/api/keys",method:"GET",secure:!0,format:"json",...e}),this.apiKeysControllerUpdate=(e,s,o={})=>this.request({path:`/api/keys/${e}`,method:"PUT",body:s,secure:!0,type:t.Json,format:"json",...o}),this.apiKeysControllerDelete=(e,t={})=>this.request({path:`/api/keys/${e}`,method:"DELETE",secure:!0,...t})}}class r extends s{constructor(){super(...arguments),this.appsControllerList=(e,t={})=>this.request({path:"/api/apps",method:"GET",query:e,secure:!0,...t}),this.appsControllerCreate=(e,s={})=>this.request({path:"/api/apps",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.appsControllerGet=(e,t={})=>this.request({path:`/api/apps/${e}`,method:"GET",secure:!0,...t}),this.appsControllerUpdate=(e,s,o={})=>this.request({path:`/api/apps/${e}`,method:"PUT",body:s,secure:!0,type:t.Json,...o}),this.appsControllerDelete=(e,t={})=>this.request({path:`/api/apps/${e}`,method:"DELETE",secure:!0,...t}),this.mcpControllerPost=(e={})=>this.request({path:"/mcp",method:"POST",...e})}}class a extends s{constructor(){super(...arguments),this.callsControllerRejectCall=(e,s,o={})=>this.request({path:`/api/${e}/calls/reject`,method:"POST",body:s,secure:!0,type:t.Json,...o})}}class h extends s{constructor(){super(...arguments),this.channelsControllerList=(e,t,s={})=>this.request({path:`/api/${e}/channels`,method:"GET",query:t,secure:!0,format:"json",...s}),this.channelsControllerCreate=(e,s,o={})=>this.request({path:`/api/${e}/channels`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o}),this.channelsControllerDelete=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}`,method:"DELETE",secure:!0,...s}),this.channelsControllerGet=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}`,method:"GET",secure:!0,format:"json",...s}),this.channelsControllerPreviewChannelMessages=(e,t,s,o={})=>this.request({path:`/api/${e}/channels/${t}/messages/preview`,method:"GET",query:s,secure:!0,format:"json",...o}),this.channelsControllerFollow=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/follow`,method:"POST",secure:!0,...s}),this.channelsControllerUnfollow=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/unfollow`,method:"POST",secure:!0,...s}),this.channelsControllerMute=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/mute`,method:"POST",secure:!0,...s}),this.channelsControllerUnmute=(e,t,s={})=>this.request({path:`/api/${e}/channels/${t}/unmute`,method:"POST",secure:!0,...s}),this.channelsControllerSearchByView=(e,s,o={})=>this.request({path:`/api/${e}/channels/search/by-view`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o}),this.channelsControllerSearchByText=(e,s,o={})=>this.request({path:`/api/${e}/channels/search/by-text`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o}),this.channelsControllerGetSearchViews=(e,t={})=>this.request({path:`/api/${e}/channels/search/views`,method:"GET",secure:!0,format:"json",...t}),this.channelsControllerGetSearchCountries=(e,t={})=>this.request({path:`/api/${e}/channels/search/countries`,method:"GET",secure:!0,format:"json",...t}),this.channelsControllerGetSearchCategories=(e,t={})=>this.request({path:`/api/${e}/channels/search/categories`,method:"GET",secure:!0,format:"json",...t})}}class i extends s{constructor(){super(...arguments),this.chatsControllerGetChats=(e,t,s={})=>this.request({path:`/api/${e}/chats`,method:"GET",query:t,secure:!0,...s}),this.chatsControllerGetChatsOverview=(e,t,s={})=>this.request({path:`/api/${e}/chats/overview`,method:"GET",query:t,secure:!0,format:"json",...s}),this.chatsControllerPostChatsOverview=(e,s,o={})=>this.request({path:`/api/${e}/chats/overview`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o}),this.chatsControllerDeleteChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}`,method:"DELETE",secure:!0,...s}),this.chatsControllerGetChatPicture=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/picture`,method:"GET",query:s,secure:!0,format:"json",...o}),this.chatsControllerGetChatMessages=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages`,method:"GET",query:s,secure:!0,format:"json",...o}),this.chatsControllerClearMessages=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/messages`,method:"DELETE",secure:!0,...s}),this.chatsControllerReadChatMessages=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages/read`,method:"POST",query:s,secure:!0,format:"json",...o}),this.chatsControllerGetChatMessage=(e,t,s,o,r={})=>this.request({path:`/api/${e}/chats/${t}/messages/${s}`,method:"GET",query:o,secure:!0,format:"json",...r}),this.chatsControllerDeleteMessage=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages/${s}`,method:"DELETE",secure:!0,...o}),this.chatsControllerEditMessage=(e,s,o,r,a={})=>this.request({path:`/api/${e}/chats/${s}/messages/${o}`,method:"PUT",body:r,secure:!0,type:t.Json,...a}),this.chatsControllerPinMessage=(e,s,o,r,a={})=>this.request({path:`/api/${e}/chats/${s}/messages/${o}/pin`,method:"POST",body:r,secure:!0,type:t.Json,...a}),this.chatsControllerUnpinMessage=(e,t,s,o={})=>this.request({path:`/api/${e}/chats/${t}/messages/${s}/unpin`,method:"POST",secure:!0,...o}),this.chatsControllerArchiveChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/archive`,method:"POST",secure:!0,format:"json",...s}),this.chatsControllerUnarchiveChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/unarchive`,method:"POST",secure:!0,format:"json",...s}),this.chatsControllerUnreadChat=(e,t,s={})=>this.request({path:`/api/${e}/chats/${t}/unread`,method:"POST",secure:!0,format:"json",...s})}}class n extends s{constructor(){super(...arguments),this.chattingControllerSendText=(e,s={})=>this.request({path:"/api/sendText",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendTextGet=(e,t={})=>this.request({path:"/api/sendText",method:"GET",query:e,secure:!0,format:"json",...t}),this.chattingControllerSendImage=(e,s={})=>this.request({path:"/api/sendImage",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendFile=(e,s={})=>this.request({path:"/api/sendFile",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendVoice=(e,s={})=>this.request({path:"/api/sendVoice",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendVideo=(e,s={})=>this.request({path:"/api/sendVideo",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerSendLinkCustomPreview=(e,s={})=>this.request({path:"/api/send/link-custom-preview",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendButtons=(e,s={})=>this.request({path:"/api/sendButtons",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerSendList=(e,s={})=>this.request({path:"/api/sendList",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerForwardMessage=(e,s={})=>this.request({path:"/api/forwardMessage",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendSeen=(e,s={})=>this.request({path:"/api/sendSeen",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerStartTyping=(e,s={})=>this.request({path:"/api/startTyping",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerStopTyping=(e,s={})=>this.request({path:"/api/stopTyping",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerSetReaction=(e,s={})=>this.request({path:"/api/reaction",method:"PUT",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSetStar=(e,s={})=>this.request({path:"/api/star",method:"PUT",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerSendPoll=(e,s={})=>this.request({path:"/api/sendPoll",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerSendPollVote=(e,s={})=>this.request({path:"/api/sendPollVote",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerSendLocation=(e,s={})=>this.request({path:"/api/sendLocation",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendContactVcard=(e,s={})=>this.request({path:"/api/sendContactVcard",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerSendButtonsReply=(e,s={})=>this.request({path:"/api/send/buttons/reply",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerGetMessages=(e,t={})=>this.request({path:"/api/messages",method:"GET",query:e,secure:!0,format:"json",...t}),this.chattingControllerDeprecatedCheckNumberStatus=(e,t={})=>this.request({path:"/api/checkNumberStatus",method:"GET",query:e,secure:!0,format:"json",...t}),this.chattingControllerReply=(e,s={})=>this.request({path:"/api/reply",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.chattingControllerSendLinkPreviewDeprecated=(e,s={})=>this.request({path:"/api/sendLinkPreview",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.chattingControllerGetNewMessageId=(e,t={})=>this.request({path:`/api/${e}/new-message-id`,method:"GET",secure:!0,format:"json",...t})}}class p extends s{constructor(){super(...arguments),this.contactsControllerGetAll=(e,t={})=>this.request({path:"/api/contacts/all",method:"GET",query:e,secure:!0,...t}),this.contactsControllerGet=(e,t={})=>this.request({path:"/api/contacts",method:"GET",query:e,secure:!0,...t}),this.contactsControllerCheckExists=(e,t={})=>this.request({path:"/api/contacts/check-exists",method:"GET",query:e,secure:!0,format:"json",...t}),this.contactsControllerGetAbout=(e,t={})=>this.request({path:"/api/contacts/about",method:"GET",query:e,secure:!0,...t}),this.contactsControllerGetProfilePicture=(e,t={})=>this.request({path:"/api/contacts/profile-picture",method:"GET",query:e,secure:!0,...t}),this.contactsControllerBlock=(e,s={})=>this.request({path:"/api/contacts/block",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.contactsControllerUnblock=(e,s={})=>this.request({path:"/api/contacts/unblock",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.contactsSessionControllerGet=(e,t,s={})=>this.request({path:`/api/${e}/contacts/${t}`,method:"GET",secure:!0,...s}),this.contactsSessionControllerPut=(e,s,o,r={})=>this.request({path:`/api/${e}/contacts/${s}`,method:"PUT",body:o,secure:!0,type:t.Json,format:"json",...r}),this.lidsControllerGetAll=(e,t,s={})=>this.request({path:`/api/${e}/lids`,method:"GET",query:t,secure:!0,format:"json",...s}),this.lidsControllerGetLidsCount=(e,t={})=>this.request({path:`/api/${e}/lids/count`,method:"GET",secure:!0,format:"json",...t}),this.lidsControllerFindPnByLid=(e,t,s={})=>this.request({path:`/api/${e}/lids/${t}`,method:"GET",secure:!0,format:"json",...s}),this.lidsControllerFindLidByPhoneNumber=(e,t,s={})=>this.request({path:`/api/${e}/lids/pn/${t}`,method:"GET",secure:!0,format:"json",...s})}}class u extends s{constructor(){super(...arguments),this.eventsControllerSendEvent=(e,s,o={})=>this.request({path:`/api/${e}/events`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o})}}class l extends s{constructor(){super(...arguments),this.groupsControllerCreateGroup=(e,s,o={})=>this.request({path:`/api/${e}/groups`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.groupsControllerGetGroups=(e,t,s={})=>this.request({path:`/api/${e}/groups`,method:"GET",query:t,secure:!0,format:"json",...s}),this.groupsControllerJoinInfoGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/join-info`,method:"GET",query:t,secure:!0,format:"json",...s}),this.groupsControllerJoinGroup=(e,s,o={})=>this.request({path:`/api/${e}/groups/join`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o}),this.groupsControllerGetGroupsCount=(e,t={})=>this.request({path:`/api/${e}/groups/count`,method:"GET",secure:!0,format:"json",...t}),this.groupsControllerRefreshGroups=(e,t={})=>this.request({path:`/api/${e}/groups/refresh`,method:"POST",secure:!0,...t}),this.groupsControllerGetGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}`,method:"GET",secure:!0,...s}),this.groupsControllerDeleteGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}`,method:"DELETE",secure:!0,...s}),this.groupsControllerLeaveGroup=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/leave`,method:"POST",secure:!0,...s}),this.groupsControllerGetChatPicture=(e,t,s,o={})=>this.request({path:`/api/${e}/groups/${t}/picture`,method:"GET",query:s,secure:!0,format:"json",...o}),this.groupsControllerSetPicture=(e,s,o,r={})=>this.request({path:`/api/${s}/groups/${e}/picture`,method:"PUT",body:o,secure:!0,type:t.Json,format:"json",...r}),this.groupsControllerDeletePicture=(e,t,s={})=>this.request({path:`/api/${t}/groups/${e}/picture`,method:"DELETE",secure:!0,format:"json",...s}),this.groupsControllerSetDescription=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/description`,method:"PUT",body:o,secure:!0,type:t.Json,...r}),this.groupsControllerSetSubject=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/subject`,method:"PUT",body:o,secure:!0,type:t.Json,...r}),this.groupsControllerSetInfoAdminOnly=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/settings/security/info-admin-only`,method:"PUT",body:o,secure:!0,type:t.Json,...r}),this.groupsControllerGetInfoAdminOnly=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/settings/security/info-admin-only`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerSetMessagesAdminOnly=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/settings/security/messages-admin-only`,method:"PUT",body:o,secure:!0,type:t.Json,...r}),this.groupsControllerGetMessagesAdminOnly=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/settings/security/messages-admin-only`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerGetInviteCode=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/invite-code`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerRevokeInviteCode=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/invite-code/revoke`,method:"POST",secure:!0,format:"json",...s}),this.groupsControllerGetParticipants=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/participants`,method:"GET",secure:!0,...s}),this.groupsControllerGetGroupParticipants=(e,t,s={})=>this.request({path:`/api/${e}/groups/${t}/participants/v2`,method:"GET",secure:!0,format:"json",...s}),this.groupsControllerAddParticipants=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/participants/add`,method:"POST",body:o,secure:!0,type:t.Json,...r}),this.groupsControllerRemoveParticipants=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/participants/remove`,method:"POST",body:o,secure:!0,type:t.Json,...r}),this.groupsControllerPromoteToAdmin=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/admin/promote`,method:"POST",body:o,secure:!0,type:t.Json,...r}),this.groupsControllerDemoteToAdmin=(e,s,o,r={})=>this.request({path:`/api/${e}/groups/${s}/admin/demote`,method:"POST",body:o,secure:!0,type:t.Json,...r})}}class c extends s{constructor(){super(...arguments),this.labelsControllerGetAll=(e,t={})=>this.request({path:`/api/${e}/labels`,method:"GET",secure:!0,format:"json",...t}),this.labelsControllerCreate=(e,s,o={})=>this.request({path:`/api/${e}/labels`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o}),this.labelsControllerUpdate=(e,s,o,r={})=>this.request({path:`/api/${e}/labels/${s}`,method:"PUT",body:o,secure:!0,type:t.Json,format:"json",...r}),this.labelsControllerDelete=(e,t,s={})=>this.request({path:`/api/${e}/labels/${t}`,method:"DELETE",secure:!0,format:"json",...s}),this.labelsControllerGetChatLabels=(e,t,s={})=>this.request({path:`/api/${e}/labels/chats/${t}`,method:"GET",secure:!0,format:"json",...s}),this.labelsControllerPutChatLabels=(e,s,o,r={})=>this.request({path:`/api/${e}/labels/chats/${s}`,method:"PUT",body:o,secure:!0,type:t.Json,...r}),this.labelsControllerGetChatsByLabel=(e,t,s={})=>this.request({path:`/api/${e}/labels/${t}/chats`,method:"GET",secure:!0,...s})}}class d extends s{constructor(){super(...arguments),this.mediaControllerConvertVoice=(e,s,o={})=>this.request({path:`/api/${e}/media/convert/voice`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o}),this.mediaControllerConvertVideo=(e,s,o={})=>this.request({path:`/api/${e}/media/convert/video`,method:"POST",body:s,secure:!0,type:t.Json,format:"json",...o})}}class m extends s{constructor(){super(...arguments),this.pingControllerPing=(e={})=>this.request({path:"/ping",method:"GET",format:"json",...e}),this.healthControllerCheck=(e={})=>this.request({path:"/health",method:"GET",secure:!0,format:"json",...e}),this.serverControllerGet=(e={})=>this.request({path:"/api/server/version",method:"GET",secure:!0,format:"json",...e}),this.serverControllerEnvironment=(e,t={})=>this.request({path:"/api/server/environment",method:"GET",query:e,secure:!0,format:"json",...t}),this.serverControllerStatus=(e={})=>this.request({path:"/api/server/status",method:"GET",secure:!0,format:"json",...e}),this.serverControllerStop=(e,s={})=>this.request({path:"/api/server/stop",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.serverDebugControllerCpuProfile=(e,t={})=>this.request({path:"/api/server/debug/cpu",method:"GET",query:e,secure:!0,...t}),this.serverDebugControllerHeapsnapshot=(e={})=>this.request({path:"/api/server/debug/heapsnapshot",method:"GET",secure:!0,...e}),this.serverDebugControllerBrowserTrace=(e,t,s={})=>this.request({path:`/api/server/debug/browser/trace/${e}`,method:"GET",query:t,secure:!0,...s}),this.versionControllerGet=(e={})=>this.request({path:"/api/version",method:"GET",secure:!0,format:"json",...e})}}class y extends s{constructor(){super(...arguments),this.authControllerGetQr=(e,t,s={})=>this.request({path:`/api/${e}/auth/qr`,method:"GET",query:t,secure:!0,format:"json",...s}),this.authControllerRequestCode=(e,s,o={})=>this.request({path:`/api/${e}/auth/request-code`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.screenshotControllerScreenshot=(e,t={})=>this.request({path:"/api/screenshot",method:"GET",query:e,secure:!0,format:"json",...t})}}class C extends s{constructor(){super(...arguments),this.presenceControllerSetPresence=(e,s,o={})=>this.request({path:`/api/${e}/presence`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.presenceControllerGetPresenceAll=(e,t={})=>this.request({path:`/api/${e}/presence`,method:"GET",secure:!0,format:"json",...t}),this.presenceControllerGetPresence=(e,t,s={})=>this.request({path:`/api/${e}/presence/${t}`,method:"GET",secure:!0,format:"json",...s}),this.presenceControllerSubscribe=(e,t,s={})=>this.request({path:`/api/${e}/presence/${t}/subscribe`,method:"POST",secure:!0,...s})}}class q extends s{constructor(){super(...arguments),this.profileControllerGetMyProfile=(e,t={})=>this.request({path:`/api/${e}/profile`,method:"GET",secure:!0,format:"json",...t}),this.profileControllerSetProfileName=(e,s,o={})=>this.request({path:`/api/${e}/profile/name`,method:"PUT",body:s,secure:!0,type:t.Json,format:"json",...o}),this.profileControllerSetProfileStatus=(e,s,o={})=>this.request({path:`/api/${e}/profile/status`,method:"PUT",body:s,secure:!0,type:t.Json,format:"json",...o}),this.profileControllerSetProfilePicture=(e,s,o={})=>this.request({path:`/api/${e}/profile/picture`,method:"PUT",body:s,secure:!0,type:t.Json,format:"json",...o}),this.profileControllerDeleteProfilePicture=(e,t={})=>this.request({path:`/api/${e}/profile/picture`,method:"DELETE",secure:!0,format:"json",...t})}}class T extends s{constructor(){super(...arguments),this.sessionsControllerList=(e,t={})=>this.request({path:"/api/sessions",method:"GET",query:e,secure:!0,format:"json",...t}),this.sessionsControllerCreate=(e,s={})=>this.request({path:"/api/sessions",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.sessionsControllerGet=(e,t,s={})=>this.request({path:`/api/sessions/${e}`,method:"GET",query:t,secure:!0,format:"json",...s}),this.sessionsControllerUpdate=(e,s,o={})=>this.request({path:`/api/sessions/${e}`,method:"PUT",body:s,secure:!0,type:t.Json,format:"json",...o}),this.sessionsControllerDelete=(e,t={})=>this.request({path:`/api/sessions/${e}`,method:"DELETE",secure:!0,...t}),this.sessionsControllerGetMe=(e,t={})=>this.request({path:`/api/sessions/${e}/me`,method:"GET",secure:!0,format:"json",...t}),this.sessionsControllerStart=(e,t={})=>this.request({path:`/api/sessions/${e}/start`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerStop=(e,t={})=>this.request({path:`/api/sessions/${e}/stop`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerLogout=(e,t={})=>this.request({path:`/api/sessions/${e}/logout`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerRestart=(e,t={})=>this.request({path:`/api/sessions/${e}/restart`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerDepracatedStart=(e,s={})=>this.request({path:"/api/sessions/start",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.sessionsControllerDeprecatedStop=(e,s={})=>this.request({path:"/api/sessions/stop",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.sessionsControllerDeprecatedLogout=(e,s={})=>this.request({path:"/api/sessions/logout",method:"POST",body:e,secure:!0,type:t.Json,...s})}}class $ extends s{constructor(){super(...arguments),this.statusControllerSendTextStatus=(e,s,o={})=>this.request({path:`/api/${e}/status/text`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.statusControllerSendImageStatus=(e,s,o={})=>this.request({path:`/api/${e}/status/image`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.statusControllerSendVoiceStatus=(e,s,o={})=>this.request({path:`/api/${e}/status/voice`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.statusControllerSendVideoStatus=(e,s,o={})=>this.request({path:`/api/${e}/status/video`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.statusControllerDeleteStatus=(e,s,o={})=>this.request({path:`/api/${e}/status/delete`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.statusControllerGetNewMessageId=(e,t={})=>this.request({path:`/api/${e}/status/new-message-id`,method:"GET",secure:!0,format:"json",...t})}}class g{get httpClient(){return this.sessions.instance}constructor(e,t){let s;s="string"==typeof e?{baseURL:e,securityWorker:t?()=>({headers:{"X-Api-Key":t}}):void 0}:e,this.apikeys=new o(s),this.apps=new r(s),this.calls=new a(s),this.channels=new h(s),this.chats=new i(s),this.chatting=new n(s),this.contacts=new p(s),this.events=new u(s),this.groups=new l(s),this.labels=new c(s),this.media=new d(s),this.observability=new m(s),this.pairing=new y(s),this.presence=new C(s),this.profile=new q(s),this.sessions=new T(s),this.status=new $(s)}}export{o as ApiKeys,r as Apps,a as Calls,h as Channels,i as Chats,n as Chatting,p as Contacts,u as Events,l as Groups,s as HttpClient,c as Labels,d as Media,m as Observability,y as Pairing,C as Presence,q as Profile,T as Sessions,$ as Status,g as WahaClient};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muhammedaksam/waha-node",
3
- "version": "2026.3.4",
3
+ "version": "2026.4.3",
4
4
  "type": "module",
5
5
  "description": "Node.js TypeScript SDK for WAHA (WhatsApp HTTP API) - auto-generated from OpenAPI spec",
6
6
  "main": "dist/index.cjs.js",