@muhammedaksam/waha-node 2026.2.1 → 2026.3.2

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}),this.chatwootLocalesControllerGetLanguages=(e={})=>this.request({path:"/api/apps/chatwoot/locales",method:"GET",secure:!0,format:"json",...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})}}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.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})}}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)}};
package/dist/index.d.ts CHANGED
@@ -365,7 +365,7 @@ interface RemoteFile {
365
365
  * @example "filename.jpg"
366
366
  */
367
367
  filename?: string;
368
- /** @example "https://github.com/devlikeapro/waha/raw/core/examples/waha.jpg" */
368
+ /** @example "https://picsum.photos/1024" */
369
369
  url: string;
370
370
  }
371
371
  interface BinaryFile {
@@ -648,7 +648,7 @@ interface MessageVideoRequest {
648
648
  session: string;
649
649
  }
650
650
  interface FileURL {
651
- /** @example "https://github.com/devlikeapro/waha/raw/core/examples/waha.jpg" */
651
+ /** @example "https://picsum.photos/1024" */
652
652
  url?: string;
653
653
  }
654
654
  interface FileContent {
@@ -659,7 +659,7 @@ interface FileContent {
659
659
  data?: string;
660
660
  }
661
661
  interface LinkPreviewData {
662
- /** @example {"url":"https://github.com/devlikeapro/waha/raw/core/examples/waha.jpg"} */
662
+ /** @example {"url":"https://picsum.photos/1024"} */
663
663
  image?: FileURL | FileContent;
664
664
  /** @default "https://github.com/" */
665
665
  url: string;
@@ -960,7 +960,13 @@ interface ChatSummary {
960
960
  lastMessage: object;
961
961
  _chat: object;
962
962
  }
963
- interface OverviewPaginationParams {
963
+ interface GetChatsOverviewParams {
964
+ /**
965
+ * Merge LID (@lid) and phone-number (@c.us) chats referencing the same contact
966
+ * @default true
967
+ * @example true
968
+ */
969
+ merge?: boolean;
964
970
  /** @default 20 */
965
971
  limit?: number;
966
972
  offset?: number;
@@ -973,7 +979,7 @@ interface OverviewFilter {
973
979
  ids?: string[];
974
980
  }
975
981
  interface OverviewBodyRequest {
976
- pagination: OverviewPaginationParams;
982
+ pagination: GetChatsOverviewParams;
977
983
  filter: OverviewFilter;
978
984
  }
979
985
  interface ChatPictureResponse {
@@ -1538,7 +1544,7 @@ interface WAHAWebhookSessionStatus {
1538
1544
  */
1539
1545
  metadata?: object;
1540
1546
  /** @example "WEBJS" */
1541
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
1547
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
1542
1548
  /**
1543
1549
  * The event is triggered when the session status changes.
1544
1550
  * @default "session.status"
@@ -1567,7 +1573,7 @@ interface WAHAWebhookMessage {
1567
1573
  */
1568
1574
  metadata?: object;
1569
1575
  /** @example "WEBJS" */
1570
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
1576
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
1571
1577
  /**
1572
1578
  * Incoming message.
1573
1579
  * @default "message"
@@ -1641,7 +1647,7 @@ interface WAHAWebhookMessageReaction {
1641
1647
  */
1642
1648
  metadata?: object;
1643
1649
  /** @example "WEBJS" */
1644
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
1650
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
1645
1651
  /**
1646
1652
  * The event is triggered when a user reacts or removes a reaction.
1647
1653
  * @default "message.reaction"
@@ -1670,7 +1676,7 @@ interface WAHAWebhookMessageAny {
1670
1676
  */
1671
1677
  metadata?: object;
1672
1678
  /** @example "WEBJS" */
1673
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
1679
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
1674
1680
  /**
1675
1681
  * Fired on all message creations, including your own.
1676
1682
  * @default "message.any"
@@ -1716,7 +1722,7 @@ interface WAHAWebhookMessageAck {
1716
1722
  */
1717
1723
  metadata?: object;
1718
1724
  /** @example "WEBJS" */
1719
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
1725
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
1720
1726
  /**
1721
1727
  * Receive events when server or recipient gets the message, read or played it (contacts only).
1722
1728
  * @default "message.ack"
@@ -1745,7 +1751,7 @@ interface WAHAWebhookMessageAckGroup {
1745
1751
  */
1746
1752
  metadata?: object;
1747
1753
  /** @example "WEBJS" */
1748
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
1754
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
1749
1755
  /**
1750
1756
  * Receive events when participants in a group read or play messages.
1751
1757
  * @default "message.ack.group"
@@ -1784,7 +1790,7 @@ interface WAHAWebhookMessageRevoked {
1784
1790
  */
1785
1791
  metadata?: object;
1786
1792
  /** @example "WEBJS" */
1787
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
1793
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
1788
1794
  /**
1789
1795
  * The event is triggered when a user, whether it be you or any other participant, revokes a previously sent message.
1790
1796
  * @default "message.revoked"
@@ -1877,7 +1883,7 @@ interface WAHAWebhookMessageEdited {
1877
1883
  */
1878
1884
  metadata?: object;
1879
1885
  /** @example "WEBJS" */
1880
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
1886
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
1881
1887
  /**
1882
1888
  * The event is triggered when a user edits a previously sent message.
1883
1889
  * @default "message.edited"
@@ -1935,7 +1941,7 @@ interface WebhookGroupV2Join {
1935
1941
  */
1936
1942
  metadata?: object;
1937
1943
  /** @example "WEBJS" */
1938
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
1944
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
1939
1945
  /**
1940
1946
  * When you joined or were added to a group
1941
1947
  * @default "group.v2.join"
@@ -1977,7 +1983,7 @@ interface WebhookGroupV2Leave {
1977
1983
  */
1978
1984
  metadata?: object;
1979
1985
  /** @example "WEBJS" */
1980
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
1986
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
1981
1987
  /**
1982
1988
  * When you left or were removed from a group
1983
1989
  * @default "group.v2.leave"
@@ -2015,7 +2021,7 @@ interface WebhookGroupV2Update {
2015
2021
  */
2016
2022
  metadata?: object;
2017
2023
  /** @example "WEBJS" */
2018
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2024
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2019
2025
  /**
2020
2026
  * When group info is updated
2021
2027
  * @default "group.v2.update"
@@ -2056,7 +2062,7 @@ interface WebhookGroupV2Participants {
2056
2062
  */
2057
2063
  metadata?: object;
2058
2064
  /** @example "WEBJS" */
2059
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2065
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2060
2066
  /**
2061
2067
  * When participants changed - join, leave, promote to admin
2062
2068
  * @default "group.v2.participants"
@@ -2085,7 +2091,7 @@ interface WAHAWebhookPresenceUpdate {
2085
2091
  */
2086
2092
  metadata?: object;
2087
2093
  /** @example "WEBJS" */
2088
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2094
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2089
2095
  /**
2090
2096
  * The most recent presence information for a chat.
2091
2097
  * @default "presence.update"
@@ -2151,7 +2157,7 @@ interface WAHAWebhookPollVote {
2151
2157
  */
2152
2158
  metadata?: object;
2153
2159
  /** @example "WEBJS" */
2154
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2160
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2155
2161
  /**
2156
2162
  * With this event, you receive new votes for the poll sent.
2157
2163
  * @default "poll.vote"
@@ -2180,7 +2186,7 @@ interface WAHAWebhookPollVoteFailed {
2180
2186
  */
2181
2187
  metadata?: object;
2182
2188
  /** @example "WEBJS" */
2183
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2189
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2184
2190
  /**
2185
2191
  * There may be cases when it fails to decrypt a vote from the user. Read more about how to handle such events in the documentations.
2186
2192
  * @default "poll.vote.failed"
@@ -2215,7 +2221,7 @@ interface WAHAWebhookChatArchive {
2215
2221
  */
2216
2222
  metadata?: object;
2217
2223
  /** @example "WEBJS" */
2218
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2224
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2219
2225
  /**
2220
2226
  * The event is triggered when the chat is archived or unarchived
2221
2227
  * @default "chat.archive"
@@ -2257,7 +2263,7 @@ interface WAHAWebhookCallReceived {
2257
2263
  */
2258
2264
  metadata?: object;
2259
2265
  /** @example "WEBJS" */
2260
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2266
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2261
2267
  /**
2262
2268
  * The event is triggered when the call is received by the user.
2263
2269
  * @default "call.received"
@@ -2286,7 +2292,7 @@ interface WAHAWebhookCallAccepted {
2286
2292
  */
2287
2293
  metadata?: object;
2288
2294
  /** @example "WEBJS" */
2289
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2295
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2290
2296
  /**
2291
2297
  * The event is triggered when the call is accepted by the user.
2292
2298
  * @default "call.accepted"
@@ -2315,7 +2321,7 @@ interface WAHAWebhookCallRejected {
2315
2321
  */
2316
2322
  metadata?: object;
2317
2323
  /** @example "WEBJS" */
2318
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2324
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2319
2325
  /**
2320
2326
  * The event is triggered when the call is rejected by the user.
2321
2327
  * @default "call.rejected"
@@ -2344,7 +2350,7 @@ interface WAHAWebhookLabelUpsert {
2344
2350
  */
2345
2351
  metadata?: object;
2346
2352
  /** @example "WEBJS" */
2347
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2353
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2348
2354
  /**
2349
2355
  * The event is triggered when a label is created or updated
2350
2356
  * @default "label.upsert"
@@ -2373,7 +2379,7 @@ interface WAHAWebhookLabelDeleted {
2373
2379
  */
2374
2380
  metadata?: object;
2375
2381
  /** @example "WEBJS" */
2376
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2382
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2377
2383
  /**
2378
2384
  * The event is triggered when a label is deleted
2379
2385
  * @default "label.deleted"
@@ -2415,7 +2421,7 @@ interface WAHAWebhookLabelChatAdded {
2415
2421
  */
2416
2422
  metadata?: object;
2417
2423
  /** @example "WEBJS" */
2418
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2424
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2419
2425
  /**
2420
2426
  * The event is triggered when a label is added to a chat
2421
2427
  * @default "label.chat.added"
@@ -2444,7 +2450,7 @@ interface WAHAWebhookLabelChatDeleted {
2444
2450
  */
2445
2451
  metadata?: object;
2446
2452
  /** @example "WEBJS" */
2447
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2453
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2448
2454
  /**
2449
2455
  * The event is triggered when a label is deleted from a chat
2450
2456
  * @default "label.chat.deleted"
@@ -2516,7 +2522,7 @@ interface WAHAWebhookEventResponse {
2516
2522
  */
2517
2523
  metadata?: object;
2518
2524
  /** @example "WEBJS" */
2519
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2525
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2520
2526
  /**
2521
2527
  * The event is triggered when the event response is received.
2522
2528
  * @default "event.response"
@@ -2545,7 +2551,7 @@ interface WAHAWebhookEventResponseFailed {
2545
2551
  */
2546
2552
  metadata?: object;
2547
2553
  /** @example "WEBJS" */
2548
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2554
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2549
2555
  /**
2550
2556
  * The event is triggered when the event response is failed to decrypt.
2551
2557
  * @default "event.response.failed"
@@ -2578,7 +2584,7 @@ interface WAHAWebhookEngineEvent {
2578
2584
  */
2579
2585
  metadata?: object;
2580
2586
  /** @example "WEBJS" */
2581
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2587
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2582
2588
  /**
2583
2589
  * Internal engine event.
2584
2590
  * @default "engine.event"
@@ -2607,7 +2613,7 @@ interface WAHAWebhookGroupJoin {
2607
2613
  */
2608
2614
  metadata?: object;
2609
2615
  /** @example "WEBJS" */
2610
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2616
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2611
2617
  /**
2612
2618
  * Some one join a group.
2613
2619
  * @deprecated
@@ -2637,7 +2643,7 @@ interface WAHAWebhookGroupLeave {
2637
2643
  */
2638
2644
  metadata?: object;
2639
2645
  /** @example "WEBJS" */
2640
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2646
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2641
2647
  /**
2642
2648
  * Some one left a group.
2643
2649
  * @deprecated
@@ -2667,7 +2673,7 @@ interface WAHAWebhookStateChange {
2667
2673
  */
2668
2674
  metadata?: object;
2669
2675
  /** @example "WEBJS" */
2670
- engine: 'WEBJS' | 'NOWEB' | 'GOWS';
2676
+ engine: 'WEBJS' | 'WPP' | 'NOWEB' | 'GOWS';
2671
2677
  /**
2672
2678
  * It’s an internal engine’s state, not session status.
2673
2679
  * @deprecated
@@ -2821,16 +2827,6 @@ declare class Apps<SecurityDataType = unknown> extends HttpClient<SecurityDataTy
2821
2827
  * @secure
2822
2828
  */
2823
2829
  appsControllerDelete: (id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
2824
- /**
2825
- * @description Get available languages for Chatwoot app
2826
- *
2827
- * @tags 🧩 Apps
2828
- * @name ChatwootLocalesControllerGetLanguages
2829
- * @summary Get available languages for Chatwoot app
2830
- * @request GET:/api/apps/chatwoot/locales
2831
- * @secure
2832
- */
2833
- chatwootLocalesControllerGetLanguages: (params?: RequestParams) => Promise<AxiosResponse<object[], any, {}>>;
2834
2830
  }
2835
2831
 
2836
2832
  declare class Calls<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
@@ -3011,6 +3007,12 @@ declare class Chats<SecurityDataType = unknown> extends HttpClient<SecurityDataT
3011
3007
  sortBy?: "conversationTimestamp" | "id" | "name";
3012
3008
  /** Sort order - <b>desc</b>ending (Z => A, New first) or <b>asc</b>ending (A => Z, Old first) */
3013
3009
  sortOrder?: "desc" | "asc";
3010
+ /**
3011
+ * Merge LID (@lid) and phone-number (@c.us) chats referencing the same contact
3012
+ * @default true
3013
+ * @example true
3014
+ */
3015
+ merge?: boolean;
3014
3016
  limit?: number;
3015
3017
  offset?: number;
3016
3018
  }, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
@@ -3024,6 +3026,12 @@ declare class Chats<SecurityDataType = unknown> extends HttpClient<SecurityDataT
3024
3026
  * @secure
3025
3027
  */
3026
3028
  chatsControllerGetChatsOverview: (session: any, query?: {
3029
+ /**
3030
+ * Merge LID (@lid) and phone-number (@c.us) chats referencing the same contact
3031
+ * @default true
3032
+ * @example true
3033
+ */
3034
+ merge?: boolean;
3027
3035
  /** @default 20 */
3028
3036
  limit?: number;
3029
3037
  offset?: number;
@@ -3093,6 +3101,12 @@ declare class Chats<SecurityDataType = unknown> extends HttpClient<SecurityDataT
3093
3101
  * @example false
3094
3102
  */
3095
3103
  downloadMedia?: boolean;
3104
+ /**
3105
+ * Merge LID (@lid) and phone-number (@c.us) chats referencing the same contact
3106
+ * @default true
3107
+ * @example true
3108
+ */
3109
+ merge?: boolean;
3096
3110
  /** @default 10 */
3097
3111
  limit: number;
3098
3112
  offset?: number;
@@ -3152,6 +3166,12 @@ declare class Chats<SecurityDataType = unknown> extends HttpClient<SecurityDataT
3152
3166
  * @example true
3153
3167
  */
3154
3168
  downloadMedia?: boolean;
3169
+ /**
3170
+ * Merge LID (@lid) and phone-number (@c.us) chats referencing the same contact
3171
+ * @default true
3172
+ * @example true
3173
+ */
3174
+ merge?: boolean;
3155
3175
  }, params?: RequestParams) => Promise<AxiosResponse<WAMessage, any, {}>>;
3156
3176
  /**
3157
3177
  * No description
@@ -3451,6 +3471,12 @@ declare class Chatting<SecurityDataType = unknown> extends HttpClient<SecurityDa
3451
3471
  * @example false
3452
3472
  */
3453
3473
  downloadMedia?: boolean;
3474
+ /**
3475
+ * Merge LID (@lid) and phone-number (@c.us) chats referencing the same contact
3476
+ * @default true
3477
+ * @example true
3478
+ */
3479
+ merge?: boolean;
3454
3480
  /** @example "11111111111@c.us" */
3455
3481
  chatId: string;
3456
3482
  /** @default "default" */
@@ -3618,6 +3644,16 @@ declare class Contacts<SecurityDataType = unknown> extends HttpClient<SecurityDa
3618
3644
  * @secure
3619
3645
  */
3620
3646
  contactsControllerUnblock: (data: ContactRequest, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
3647
+ /**
3648
+ * @description The method always return result, even if the phone number is not registered in WhatsApp. For that - use /contacts/check-exists endpoint below.
3649
+ *
3650
+ * @tags 👤 Contacts
3651
+ * @name ContactsSessionControllerGet
3652
+ * @summary Get contact basic info
3653
+ * @request GET:/api/{session}/contacts/{id}
3654
+ * @secure
3655
+ */
3656
+ contactsSessionControllerGet: (session: any, id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
3621
3657
  /**
3622
3658
  * @description Create or update contact on the phone address book. May not work if you have installed many WhatsApp apps on the same phone
3623
3659
  *
@@ -4247,7 +4283,7 @@ declare class Pairing<SecurityDataType = unknown> extends HttpClient<SecurityDat
4247
4283
  *
4248
4284
  * @tags 📱 Pairing
4249
4285
  * @name ScreenshotControllerScreenshot
4250
- * @summary Get a screenshot of the current WhatsApp session (**WEBJS** only)
4286
+ * @summary Get a screenshot of the current WhatsApp session (**WEBJS/WPP** only)
4251
4287
  * @request GET:/api/screenshot
4252
4288
  * @secure
4253
4289
  */
@@ -4608,4 +4644,4 @@ declare class WahaClient {
4608
4644
  }
4609
4645
 
4610
4646
  export { ApiKeys, Apps, Calls, Channels, Chats, Chatting, Contacts, Events, Groups, HttpClient, Labels, Media, Observability, Pairing, Presence, Profile, Sessions, Status, WahaClient };
4611
- 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, 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, OverviewPaginationParams, 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 };
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 };
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}),this.chatwootLocalesControllerGetLanguages=(e={})=>this.request({path:"/api/apps/chatwoot/locales",method:"GET",secure:!0,format:"json",...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})}}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.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})}}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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muhammedaksam/waha-node",
3
- "version": "2026.2.1",
3
+ "version": "2026.3.2",
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",