@muhammedaksam/waha-node 2026.1.3 → 2026.1.4-dev.1

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.d.ts CHANGED
@@ -19,6 +19,35 @@ interface RequestCodeRequest {
19
19
  */
20
20
  method?: string;
21
21
  }
22
+ interface ApiKeyRequest {
23
+ /**
24
+ * @default false
25
+ * @example false
26
+ */
27
+ isAdmin: boolean;
28
+ /**
29
+ * @default null
30
+ * @example "default"
31
+ */
32
+ session: string | null;
33
+ /**
34
+ * @default true
35
+ * @example true
36
+ */
37
+ isActive: boolean;
38
+ }
39
+ interface ApiKeyDTO {
40
+ /** @example "key_id_00000000000000000000000000" */
41
+ id: string;
42
+ /** @example "key_11111111111AAAAAAAAAAAAAAAAAAAAA" */
43
+ key: string;
44
+ /** @example true */
45
+ isActive: boolean;
46
+ /** @example false */
47
+ isAdmin: boolean;
48
+ /** @example "default" */
49
+ session?: string | null;
50
+ }
22
51
  interface ChatWootCommandsConfig {
23
52
  /** @default true */
24
53
  server: boolean;
@@ -224,8 +253,6 @@ interface SessionInfo {
224
253
  interface SessionCreateRequest {
225
254
  /**
226
255
  * Session name (id)
227
- * @maxLength 54
228
- * @pattern /^[a-zA-Z0-9_-]*$/
229
256
  * @example "default"
230
257
  */
231
258
  name?: string;
@@ -1391,6 +1418,9 @@ interface WAHAEnvironment {
1391
1418
  browser: string;
1392
1419
  /** @example "linux/x86" */
1393
1420
  platform: string;
1421
+ worker: {
1422
+ id: string | null;
1423
+ };
1394
1424
  }
1395
1425
  interface WorkerInfo {
1396
1426
  /**
@@ -2664,6 +2694,49 @@ declare class HttpClient<SecurityDataType = unknown> {
2664
2694
  request: <T = any, _E = any>({ secure, path, type, query, format, body, ...params }: FullRequestParams) => Promise<AxiosResponse<T>>;
2665
2695
  }
2666
2696
 
2697
+ declare class ApiKeys<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
2698
+ /**
2699
+ * No description
2700
+ *
2701
+ * @tags 🔑 Api Keys
2702
+ * @name ApiKeysControllerCreate
2703
+ * @summary Create a new API key
2704
+ * @request POST:/api/keys
2705
+ * @secure
2706
+ */
2707
+ apiKeysControllerCreate: (data: ApiKeyRequest, params?: RequestParams) => Promise<AxiosResponse<ApiKeyDTO, any, {}>>;
2708
+ /**
2709
+ * No description
2710
+ *
2711
+ * @tags 🔑 Api Keys
2712
+ * @name ApiKeysControllerList
2713
+ * @summary Get all API keys
2714
+ * @request GET:/api/keys
2715
+ * @secure
2716
+ */
2717
+ apiKeysControllerList: (params?: RequestParams) => Promise<AxiosResponse<ApiKeyDTO[], any, {}>>;
2718
+ /**
2719
+ * No description
2720
+ *
2721
+ * @tags 🔑 Api Keys
2722
+ * @name ApiKeysControllerUpdate
2723
+ * @summary Update an API key
2724
+ * @request PUT:/api/keys/{id}
2725
+ * @secure
2726
+ */
2727
+ apiKeysControllerUpdate: (id: string, data: ApiKeyRequest, params?: RequestParams) => Promise<AxiosResponse<ApiKeyDTO, any, {}>>;
2728
+ /**
2729
+ * No description
2730
+ *
2731
+ * @tags 🔑 Api Keys
2732
+ * @name ApiKeysControllerDelete
2733
+ * @summary Delete an API key
2734
+ * @request DELETE:/api/keys/{id}
2735
+ * @secure
2736
+ */
2737
+ apiKeysControllerDelete: (id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
2738
+ }
2739
+
2667
2740
  declare class Apps<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
2668
2741
  /**
2669
2742
  * No description
@@ -2733,32 +2806,6 @@ declare class Apps<SecurityDataType = unknown> extends HttpClient<SecurityDataTy
2733
2806
  chatwootLocalesControllerGetLanguages: (params?: RequestParams) => Promise<AxiosResponse<object[], any, {}>>;
2734
2807
  }
2735
2808
 
2736
- declare class Auth<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
2737
- /**
2738
- * No description
2739
- *
2740
- * @tags 🔑 Auth
2741
- * @name AuthControllerGetQr
2742
- * @summary Get QR code for pairing WhatsApp API.
2743
- * @request GET:/api/{session}/auth/qr
2744
- * @secure
2745
- */
2746
- authControllerGetQr: (session: any, query: {
2747
- /** @default "image" */
2748
- format: "image" | "raw";
2749
- }, params?: RequestParams) => Promise<AxiosResponse<File, any, {}>>;
2750
- /**
2751
- * No description
2752
- *
2753
- * @tags 🔑 Auth
2754
- * @name AuthControllerRequestCode
2755
- * @summary Request authentication code.
2756
- * @request POST:/api/{session}/auth/request-code
2757
- * @secure
2758
- */
2759
- authControllerRequestCode: (session: any, data: RequestCodeRequest, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
2760
- }
2761
-
2762
2809
  declare class Calls<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
2763
2810
  /**
2764
2811
  * No description
@@ -4144,6 +4191,45 @@ declare class Observability<SecurityDataType = unknown> extends HttpClient<Secur
4144
4191
  versionControllerGet: (params?: RequestParams) => Promise<AxiosResponse<WAHAEnvironment, any, {}>>;
4145
4192
  }
4146
4193
 
4194
+ declare class Pairing<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
4195
+ /**
4196
+ * No description
4197
+ *
4198
+ * @tags 📱 Pairing
4199
+ * @name AuthControllerGetQr
4200
+ * @summary Get QR code for pairing WhatsApp API.
4201
+ * @request GET:/api/{session}/auth/qr
4202
+ * @secure
4203
+ */
4204
+ authControllerGetQr: (session: any, query: {
4205
+ /** @default "image" */
4206
+ format: "image" | "raw";
4207
+ }, params?: RequestParams) => Promise<AxiosResponse<File, any, {}>>;
4208
+ /**
4209
+ * No description
4210
+ *
4211
+ * @tags 📱 Pairing
4212
+ * @name AuthControllerRequestCode
4213
+ * @summary Request authentication code.
4214
+ * @request POST:/api/{session}/auth/request-code
4215
+ * @secure
4216
+ */
4217
+ authControllerRequestCode: (session: any, data: RequestCodeRequest, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
4218
+ /**
4219
+ * No description
4220
+ *
4221
+ * @tags 📱 Pairing
4222
+ * @name ScreenshotControllerScreenshot
4223
+ * @summary Get a screenshot of the current WhatsApp session (**WEBJS** only)
4224
+ * @request GET:/api/screenshot
4225
+ * @secure
4226
+ */
4227
+ screenshotControllerScreenshot: (query: {
4228
+ /** @default "default" */
4229
+ session: string;
4230
+ }, params?: RequestParams) => Promise<AxiosResponse<File, any, {}>>;
4231
+ }
4232
+
4147
4233
  declare class Presence<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
4148
4234
  /**
4149
4235
  * No description
@@ -4240,21 +4326,6 @@ declare class Profile<SecurityDataType = unknown> extends HttpClient<SecurityDat
4240
4326
  profileControllerDeleteProfilePicture: (session: any, params?: RequestParams) => Promise<AxiosResponse<Result, any, {}>>;
4241
4327
  }
4242
4328
 
4243
- declare class Screenshot<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
4244
- /**
4245
- * No description
4246
- *
4247
- * @tags 🖼️ Screenshot
4248
- * @name ScreenshotControllerScreenshot
4249
- * @request GET:/api/screenshot
4250
- * @secure
4251
- */
4252
- screenshotControllerScreenshot: (query: {
4253
- /** @default "default" */
4254
- session: string;
4255
- }, params?: RequestParams) => Promise<AxiosResponse<File, any, {}>>;
4256
- }
4257
-
4258
4329
  declare class Sessions<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
4259
4330
  /**
4260
4331
  * No description
@@ -4466,8 +4537,8 @@ declare class Status<SecurityDataType = unknown> extends HttpClient<SecurityData
4466
4537
  }
4467
4538
 
4468
4539
  declare class WahaClient {
4540
+ apikeys: ApiKeys;
4469
4541
  apps: Apps;
4470
- auth: Auth;
4471
4542
  calls: Calls;
4472
4543
  channels: Channels;
4473
4544
  chats: Chats;
@@ -4478,9 +4549,9 @@ declare class WahaClient {
4478
4549
  labels: Labels;
4479
4550
  media: Media;
4480
4551
  observability: Observability;
4552
+ pairing: Pairing;
4481
4553
  presence: Presence;
4482
4554
  profile: Profile;
4483
- screenshot: Screenshot;
4484
4555
  sessions: Sessions;
4485
4556
  status: Status;
4486
4557
  /**
@@ -4509,5 +4580,5 @@ declare class WahaClient {
4509
4580
  constructor(config: ApiConfig);
4510
4581
  }
4511
4582
 
4512
- export { Apps, Auth, Calls, Channels, Chats, Chatting, Contacts, Events, Groups, HttpClient, Labels, Media, Observability, Presence, Profile, Screenshot, Sessions, Status, WahaClient };
4513
- export type { 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, 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 };
4583
+ export { ApiKeys, Apps, Calls, Channels, Chats, Chatting, Contacts, Events, Groups, HttpClient, Labels, Media, Observability, Pairing, Presence, Profile, Sessions, Status, WahaClient };
4584
+ 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, 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 };
package/dist/index.esm.js CHANGED
@@ -1,2 +1,2 @@
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.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 r 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})}}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.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 C 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 q extends s{constructor(){super(...arguments),this.screenshotControllerScreenshot=(e,t={})=>this.request({path:"/api/screenshot",method:"GET",query:e,secure:!0,format:"json",...t})}}class T extends s{constructor(){super(...arguments),this.sessionsControllerList=(e,t={})=>this.request({path:"/api/sessions",method:"GET",query:e,secure:!0,format:"json",...t}),this.sessionsControllerCreate=(e,s={})=>this.request({path:"/api/sessions",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.sessionsControllerGet=(e,t,s={})=>this.request({path:`/api/sessions/${e}`,method:"GET",query:t,secure:!0,format:"json",...s}),this.sessionsControllerUpdate=(e,s,o={})=>this.request({path:`/api/sessions/${e}`,method:"PUT",body:s,secure:!0,type:t.Json,format:"json",...o}),this.sessionsControllerDelete=(e,t={})=>this.request({path:`/api/sessions/${e}`,method:"DELETE",secure:!0,...t}),this.sessionsControllerGetMe=(e,t={})=>this.request({path:`/api/sessions/${e}/me`,method:"GET",secure:!0,format:"json",...t}),this.sessionsControllerStart=(e,t={})=>this.request({path:`/api/sessions/${e}/start`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerStop=(e,t={})=>this.request({path:`/api/sessions/${e}/stop`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerLogout=(e,t={})=>this.request({path:`/api/sessions/${e}/logout`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerRestart=(e,t={})=>this.request({path:`/api/sessions/${e}/restart`,method:"POST",secure:!0,format:"json",...t}),this.sessionsControllerDepracatedStart=(e,s={})=>this.request({path:"/api/sessions/start",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.sessionsControllerDeprecatedStop=(e,s={})=>this.request({path:"/api/sessions/stop",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.sessionsControllerDeprecatedLogout=(e,s={})=>this.request({path:"/api/sessions/logout",method:"POST",body:e,secure:!0,type:t.Json,...s})}}class $ extends s{constructor(){super(...arguments),this.statusControllerSendTextStatus=(e,s,o={})=>this.request({path:`/api/${e}/status/text`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.statusControllerSendImageStatus=(e,s,o={})=>this.request({path:`/api/${e}/status/image`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.statusControllerSendVoiceStatus=(e,s,o={})=>this.request({path:`/api/${e}/status/voice`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.statusControllerSendVideoStatus=(e,s,o={})=>this.request({path:`/api/${e}/status/video`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.statusControllerDeleteStatus=(e,s,o={})=>this.request({path:`/api/${e}/status/delete`,method:"POST",body:s,secure:!0,type:t.Json,...o}),this.statusControllerGetNewMessageId=(e,t={})=>this.request({path:`/api/${e}/status/new-message-id`,method:"GET",secure:!0,format:"json",...t})}}class g{get httpClient(){return this.sessions.instance}constructor(e,t){let s;s="string"==typeof e?{baseURL:e,securityWorker:t?()=>({headers:{"X-Api-Key":t}}):void 0}:e,this.apps=new o(s),this.auth=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.presence=new y(s),this.profile=new C(s),this.screenshot=new q(s),this.sessions=new T(s),this.status=new $(s)}}export{o as Apps,r as Auth,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 Presence,C as Profile,q as Screenshot,T as Sessions,$ as Status,g as WahaClient};
1
+ import e from"axios";var t;!function(e){e.Json="application/json",e.JsonApi="application/vnd.api+json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain"}(t||(t={}));class s{constructor({securityWorker:s,secure:o,format:r,...a}={}){this.securityData=null,this.setSecurityData=e=>{this.securityData=e},this.request=async({secure:e,path:s,type:o,query:r,format:a,body:h,...i})=>{const n=("boolean"==typeof e?e:this.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},p=this.mergeRequestParams(i,n),u=a||this.format||void 0;return o===t.FormData&&h&&null!==h&&"object"==typeof h&&(h=this.createFormData(h)),o===t.Text&&h&&null!==h&&"string"!=typeof h&&(h=JSON.stringify(h)),this.instance.request({...p,headers:{...p.headers||{},...o?{"Content-Type":o}:{}},params:r,responseType:u,data:h,url:s})},this.instance=e.create({...a,baseURL:a.baseURL||""}),this.secure=o,this.format=r,this.securityWorker=s}mergeRequestParams(e,t){const s=e.method||t&&t.method;return{...this.instance.defaults,...e,...t||{},headers:{...s&&this.instance.defaults.headers[s.toLowerCase()]||{},...e.headers||{},...t&&t.headers||{}}}}stringifyFormItem(e){return"object"==typeof e&&null!==e?JSON.stringify(e):`${e}`}createFormData(e){return e instanceof FormData?e:Object.keys(e||{}).reduce((t,s)=>{const o=e[s],r=o instanceof Array?o:[o];for(const e of r){const o=e instanceof Blob||e instanceof File;t.append(s,o?e:this.stringifyFormItem(e))}return t},new FormData)}}class o extends s{constructor(){super(...arguments),this.apiKeysControllerCreate=(e,s={})=>this.request({path:"/api/keys",method:"POST",body:e,secure:!0,type:t.Json,format:"json",...s}),this.apiKeysControllerList=(e={})=>this.request({path:"/api/keys",method:"GET",secure:!0,format:"json",...e}),this.apiKeysControllerUpdate=(e,s,o={})=>this.request({path:`/api/keys/${e}`,method:"PUT",body:s,secure:!0,type:t.Json,format:"json",...o}),this.apiKeysControllerDelete=(e,t={})=>this.request({path:`/api/keys/${e}`,method:"DELETE",secure:!0,...t})}}class r extends s{constructor(){super(...arguments),this.appsControllerList=(e,t={})=>this.request({path:"/api/apps",method:"GET",query:e,secure:!0,...t}),this.appsControllerCreate=(e,s={})=>this.request({path:"/api/apps",method:"POST",body:e,secure:!0,type:t.Json,...s}),this.appsControllerGet=(e,t={})=>this.request({path:`/api/apps/${e}`,method:"GET",secure:!0,...t}),this.appsControllerUpdate=(e,s,o={})=>this.request({path:`/api/apps/${e}`,method:"PUT",body:s,secure:!0,type:t.Json,...o}),this.appsControllerDelete=(e,t={})=>this.request({path:`/api/apps/${e}`,method:"DELETE",secure:!0,...t}),this.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};
2
2
  //# sourceMappingURL=index.esm.js.map