@oficialapi/sdk 9.0.4 → 9.0.6

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/README.md CHANGED
@@ -1805,22 +1805,74 @@ console.log(media.data.size);
1805
1805
  #### Enviar Mensagem de Texto
1806
1806
 
1807
1807
  ```typescript
1808
+ // Mensagem simples
1808
1809
  await sdk.instagram.sendText({
1809
1810
  channelToken: 'sk_live_...',
1810
1811
  recipientId: 'user_id',
1811
- message: 'Olá!'
1812
+ text: 'Olá!'
1813
+ }, accessToken);
1814
+
1815
+ // Mensagem com tag HUMAN_AGENT (estende janela de 24h para 7 dias)
1816
+ await sdk.instagram.sendText({
1817
+ channelToken: 'sk_live_...',
1818
+ recipientId: 'user_id',
1819
+ text: 'Vou transferir você para nosso time de suporte humano.',
1820
+ tags: ['HUMAN_AGENT']
1812
1821
  }, accessToken);
1813
1822
  ```
1814
1823
 
1815
1824
  #### Enviar Mídia
1816
1825
 
1817
1826
  ```typescript
1827
+ // Enviar imagem
1818
1828
  await sdk.instagram.sendMedia({
1819
1829
  channelToken: 'sk_live_...',
1820
1830
  recipientId: 'user_id',
1821
- fileUrl: 'https://example.com/image.jpg',
1822
- type: 'image',
1823
- caption: 'Veja esta imagem!'
1831
+ attachment: {
1832
+ type: 'image',
1833
+ url: 'https://example.com/image.jpg'
1834
+ }
1835
+ }, accessToken);
1836
+
1837
+ // Enviar vídeo
1838
+ await sdk.instagram.sendMedia({
1839
+ channelToken: 'sk_live_...',
1840
+ recipientId: 'user_id',
1841
+ attachment: {
1842
+ type: 'video',
1843
+ url: 'https://example.com/video.mp4'
1844
+ }
1845
+ }, accessToken);
1846
+
1847
+ // Enviar áudio
1848
+ await sdk.instagram.sendMedia({
1849
+ channelToken: 'sk_live_...',
1850
+ recipientId: 'user_id',
1851
+ attachment: {
1852
+ type: 'audio',
1853
+ url: 'https://example.com/audio.m4a'
1854
+ }
1855
+ }, accessToken);
1856
+
1857
+ // Enviar arquivo PDF
1858
+ await sdk.instagram.sendMedia({
1859
+ channelToken: 'sk_live_...',
1860
+ recipientId: 'user_id',
1861
+ attachment: {
1862
+ type: 'file',
1863
+ url: 'https://example.com/documento.pdf'
1864
+ }
1865
+ }, accessToken);
1866
+
1867
+ // Enviar imagem com tag HUMAN_AGENT
1868
+ await sdk.instagram.sendMedia({
1869
+ channelToken: 'sk_live_...',
1870
+ recipientId: 'user_id',
1871
+ attachment: {
1872
+ type: 'image',
1873
+ url: 'https://example.com/image.jpg'
1874
+ },
1875
+ tags: ['HUMAN_AGENT']
1824
1876
  }, accessToken);
1825
1877
  ```
1826
1878
 
package/dist/index.d.mts CHANGED
@@ -671,14 +671,17 @@ interface SendInstagramPrivateReplyParams {
671
671
  interface SendInstagramTextParams {
672
672
  channelToken: string;
673
673
  recipientId: string;
674
- message: string;
674
+ text: string;
675
+ tags?: string[];
675
676
  }
676
677
  interface SendInstagramMediaParams {
677
678
  channelToken: string;
678
679
  recipientId: string;
679
- fileUrl: string;
680
- type: 'image' | 'video' | 'audio' | 'file';
681
- caption?: string;
680
+ attachment: {
681
+ type: 'image' | 'video' | 'audio' | 'file';
682
+ url: string;
683
+ };
684
+ tags?: string[];
682
685
  }
683
686
  interface SendInstagramImagesParams {
684
687
  channelToken: string;
package/dist/index.d.ts CHANGED
@@ -671,14 +671,17 @@ interface SendInstagramPrivateReplyParams {
671
671
  interface SendInstagramTextParams {
672
672
  channelToken: string;
673
673
  recipientId: string;
674
- message: string;
674
+ text: string;
675
+ tags?: string[];
675
676
  }
676
677
  interface SendInstagramMediaParams {
677
678
  channelToken: string;
678
679
  recipientId: string;
679
- fileUrl: string;
680
- type: 'image' | 'video' | 'audio' | 'file';
681
- caption?: string;
680
+ attachment: {
681
+ type: 'image' | 'video' | 'audio' | 'file';
682
+ url: string;
683
+ };
684
+ tags?: string[];
682
685
  }
683
686
  interface SendInstagramImagesParams {
684
687
  channelToken: string;
package/dist/index.js CHANGED
@@ -3,6 +3,6 @@
3
3
  * @version 1.0.0
4
4
  * @license MIT
5
5
  */
6
- var I="https://api.oficialapi.com.br",l=class{constructor(e){this.config={clientId:e.clientId,clientSecret:e.clientSecret,timeout:e.timeout||3e4,maxRetries:e.maxRetries||3,retryDelay:e.retryDelay||1e3,headers:e.headers||{}},this.axiosInstance=P__default.default.create({baseURL:I,timeout:this.config.timeout,headers:{"Content-Type":"application/json",...this.config.headers}}),this.setupInterceptors();}setupInterceptors(){this.axiosInstance.interceptors.request.use(e=>{if(e.url?.includes("/auth/token"))return e;let t=e;return t.accessToken&&e.headers&&(e.headers.Authorization=`Bearer ${t.accessToken}`),e},e=>Promise.reject(e)),this.axiosInstance.interceptors.response.use(e=>e,async e=>{let t=e.config;if(!t)return Promise.reject(this.formatError(e));if((!e.response||e.response.status>=500&&e.response.status<600)&&(!t._retryCount||t._retryCount<this.config.maxRetries)){t._retryCount=(t._retryCount||0)+1;let s=this.config.retryDelay*t._retryCount;return await new Promise(i=>setTimeout(i,s)),this.axiosInstance(t)}return Promise.reject(this.formatError(e))});}formatError(e){if(e.response){let t=e.response.data,n=t?.error?.message||t?.message||e.message,s=t?.error?.details||[],i=new Error(n);return i.status=e.response.status,i.data=e.response.data,i.details=s,i}return e.request?new Error("Erro de conex\xE3o com a API. Verifique sua conex\xE3o com a internet."):e}async get(e,t,n){let s={...n,accessToken:t};return (await this.axiosInstance.get(e,s)).data}async post(e,t,n,s){let i={...s,accessToken:n};return (await this.axiosInstance.post(e,t,i)).data}async put(e,t,n,s){let i={...s,accessToken:n};return (await this.axiosInstance.put(e,t,i)).data}async delete(e,t,n,s){let i={...s,accessToken:t,data:n};return (await this.axiosInstance.delete(e,i)).data}async upload(e,t,n,s="file",i){let o=new FormData;if(t instanceof Buffer){let y=new Blob([t]);o.append(s,y);}else o.append(s,t);i&&Object.entries(i).forEach(([y,r])=>{r!=null&&o.append(y,typeof r=="string"?r:JSON.stringify(r));});let C={headers:{"Content-Type":"multipart/form-data"},accessToken:n};return (await this.axiosInstance.post(e,o,C)).data}};var d=class{constructor(e){this.httpClient=e;}async getToken(e,t){let n=await this.httpClient.post("/api/v1/auth/token",{client_id:e,client_secret:t});if(!n.success||!n.data)throw new Error(n.error?.message||"Falha ao obter token");return n.data}};var c=class{constructor(e){this.httpClient=e;}async list(e){let t=await this.httpClient.get("/api/v1/channels",e);if(!t.success||!t.data)throw new Error(t.error?.message||"Falha ao listar canais");return Array.isArray(t.data)?t.data:[t.data]}};var h=class{constructor(e){this.httpClient=e;}async createWebhook(e,t){let n=await this.httpClient.post("/api/v1/integrations",{url:e.url,expiresInDays:e.expiresInDays},t);if(!n.success||!n.data)throw new Error(n.error?.message||"Falha ao criar webhook");return n.data}};var p=class{constructor(e){this.httpClient=e;}async sendText(e,t){return this.httpClient.post("/api/v1/whatsapp/send-message",{channelToken:e.channelToken,sender:e.sender,messageText:e.messageText},t)}async sendMedia(e,t){return this.httpClient.post("/api/v1/whatsapp/send-media",{channelToken:e.channelToken,sender:e.sender,fileUrl:e.fileUrl,type:e.type,caption:e.caption,...e.fileName&&{fileName:e.fileName}},t)}async sendTemplate(e,t){return this.httpClient.post("/api/v1/whatsapp/send-template",{channelToken:e.channelToken,sender:e.sender,templateName:e.templateName,languageCode:e.languageCode,components:e.components},t)}async sendButtons(e,t){return this.httpClient.post("/api/v1/whatsapp/send-buttons",{channelToken:e.channelToken,sender:e.sender,text:e.text,buttons:e.buttons,...e.media&&{media:e.media}},t)}async sendList(e,t){return this.httpClient.post("/api/v1/whatsapp/send-list",{channelToken:e.channelToken,sender:e.sender,headerText:e.headerText,bodyText:e.bodyText,buttonText:e.buttonText,sections:e.sections,...e.footerText&&{footerText:e.footerText}},t)}async replyMessage(e,t){return this.httpClient.post("/api/v1/whatsapp/reply-message",{channelToken:e.channelToken,sender:e.sender,messageText:e.messageText,...e.replyMessageId&&{replyMessageId:e.replyMessageId},...e.preview_url!==void 0&&{preview_url:e.preview_url}},t)}async reactMessage(e,t){return this.httpClient.post("/api/v1/whatsapp/react-message",{channelToken:e.channelToken,sender:e.sender,emoji:e.emoji,...e.message_id&&{message_id:e.message_id}},t)}async createTemplate(e,t){return this.httpClient.post("/api/v1/whatsapp/create-template",{channelToken:e.channelToken,name:e.name,language:e.language,category:e.category,components:e.components},t)}async listTemplates(e,t){return this.httpClient.get(`/api/v1/whatsapp/templates?channelToken=${encodeURIComponent(e)}`,t)}async getTemplate(e,t,n){return this.httpClient.get(`/api/v1/whatsapp/templates/${t}?channelToken=${encodeURIComponent(e)}`,n)}async uploadMedia(e,t){return this.httpClient.upload("/api/v1/whatsapp/upload-media",e.file,t,"file",{channelToken:e.channelToken,mediaType:e.mediaType,...e.filename&&{filename:e.filename}})}async sendOrderDetails(e,t){return this.httpClient.post("/api/v1/whatsapp/send-order-details",{channelToken:e.channelToken,sender:e.sender,...e.headerText&&{headerText:e.headerText},bodyText:e.bodyText,...e.footerText&&{footerText:e.footerText},reference_id:e.reference_id,type:e.type,currency:e.currency,total_amount:e.total_amount,order:e.order,...e.payment_settings&&{payment_settings:e.payment_settings}},t)}async sendOrderStatus(e,t){return this.httpClient.post("/api/v1/whatsapp/send-order-status",{channelToken:e.channelToken,sender:e.sender,bodyText:e.bodyText,...e.footerText&&{footerText:e.footerText},reference_id:e.reference_id,order_status:e.order_status,...e.status_description&&{status_description:e.status_description},...e.payment_status&&{payment_status:e.payment_status},...e.payment_timestamp!==void 0&&{payment_timestamp:e.payment_timestamp}},t)}async sendAudio(e,t){return this.httpClient.post("/api/v1/whatsapp/send-audio",{channelToken:e.channelToken,sender:e.sender,mediaId:e.mediaId,...e.voice!==void 0&&{voice:e.voice}},t)}async sendSticker(e,t){return this.httpClient.post("/api/v1/whatsapp/send-sticker",{channelToken:e.channelToken,sender:e.sender,mediaId:e.mediaId},t)}async sendVideo(e,t){return this.httpClient.post("/api/v1/whatsapp/send-video",{channelToken:e.channelToken,sender:e.sender,mediaId:e.mediaId,...e.caption&&{caption:e.caption}},t)}async sendDocument(e,t){return this.httpClient.post("/api/v1/whatsapp/send-document",{channelToken:e.channelToken,sender:e.sender,mediaId:e.mediaId,...e.filename&&{filename:e.filename},...e.caption&&{caption:e.caption}},t)}async sendContact(e,t){return this.httpClient.post("/api/v1/whatsapp/send-contact",{channelToken:e.channelToken,sender:e.sender,contacts:e.contacts},t)}async sendLocation(e,t){return this.httpClient.post("/api/v1/whatsapp/send-location",{channelToken:e.channelToken,sender:e.sender,latitude:e.latitude,longitude:e.longitude,name:e.name,address:e.address},t)}async sendLocationRequest(e,t){return this.httpClient.post("/api/v1/whatsapp/send-location-request",{channelToken:e.channelToken,sender:e.sender,bodyText:e.bodyText,...e.headerText&&{headerText:e.headerText},...e.footerText&&{footerText:e.footerText}},t)}async sendCtaUrl(e,t){return this.httpClient.post("/api/v1/whatsapp/send-cta-url",{channelToken:e.channelToken,sender:e.sender,bodyText:e.bodyText,buttonText:e.buttonText,url:e.url,...e.header&&{header:e.header},...e.footerText&&{footerText:e.footerText}},t)}async sendMediaCarousel(e,t){return this.httpClient.post("/api/v1/whatsapp/send-media-carousel",{channelToken:e.channelToken,sender:e.sender,bodyText:e.bodyText,cards:e.cards},t)}async downloadMedia(e,t){return this.httpClient.post("/api/v1/whatsapp/download-media",{channelToken:e.channelToken,url:e.url},t)}};var g=class{constructor(e){this.httpClient=e;}async sendMessage(e,t){return this.httpClient.post("/api/v1/telegram/send-message",{channelToken:e.channelToken,chatId:e.chatId,text:e.text,parseMode:e.parseMode,replyToMessageId:e.replyToMessageId,disableNotification:e.disableNotification},t)}async sendMedia(e,t){return this.httpClient.post("/api/v1/telegram/send-media",{channelToken:e.channelToken,chatId:e.chatId,fileUrl:e.fileUrl,type:e.type,caption:e.caption,parseMode:e.parseMode,replyToMessageId:e.replyToMessageId},t)}async sendButtons(e,t){return this.httpClient.post("/api/v1/telegram/send-buttons",{channelToken:e.channelToken,chatId:e.chatId,text:e.text,buttons:e.buttons,parseMode:e.parseMode},t)}async sendLocation(e,t){return this.httpClient.post("/api/v1/telegram/send-location",{channelToken:e.channelToken,chatId:e.chatId,latitude:e.latitude,longitude:e.longitude,livePeriod:e.livePeriod},t)}async sendContact(e,t){return this.httpClient.post("/api/v1/telegram/send-contact",{channelToken:e.channelToken,chatId:e.chatId,phoneNumber:e.phoneNumber,firstName:e.firstName,lastName:e.lastName,vcard:e.vcard},t)}async sendPoll(e,t){return this.httpClient.post("/api/v1/telegram/send-poll",{channelToken:e.channelToken,chatId:e.chatId,question:e.question,options:e.options,isAnonymous:e.isAnonymous,type:e.type,correctOptionId:e.correctOptionId},t)}async sendVenue(e,t){return this.httpClient.post("/api/v1/telegram/send-venue",{channelToken:e.channelToken,chatId:e.chatId,latitude:e.latitude,longitude:e.longitude,title:e.title,address:e.address,foursquareId:e.foursquareId},t)}async sendDice(e,t){return this.httpClient.post("/api/v1/telegram/send-dice",{channelToken:e.channelToken,chatId:e.chatId,emoji:e.emoji},t)}async sendSticker(e,t){return this.httpClient.post("/api/v1/telegram/send-sticker",{channelToken:e.channelToken,chatId:e.chatId,stickerUrl:e.stickerUrl},t)}async sendVoice(e,t){return this.httpClient.post("/api/v1/telegram/send-voice",{channelToken:e.channelToken,chatId:e.chatId,voiceUrl:e.voiceUrl,caption:e.caption,duration:e.duration},t)}async sendVideoNote(e,t){return this.httpClient.post("/api/v1/telegram/send-video-note",{channelToken:e.channelToken,chatId:e.chatId,videoNoteUrl:e.videoNoteUrl,duration:e.duration,length:e.length},t)}async sendMediaGroup(e,t){return this.httpClient.post("/api/v1/telegram/send-media-group",{channelToken:e.channelToken,chatId:e.chatId,media:e.media},t)}async sendReplyKeyboard(e,t){return this.httpClient.post("/api/v1/telegram/send-reply-keyboard",{channelToken:e.channelToken,chatId:e.chatId,text:e.text,keyboard:e.keyboard,resizeKeyboard:e.resizeKeyboard,oneTimeKeyboard:e.oneTimeKeyboard},t)}async editMessage(e,t){return this.httpClient.post("/api/v1/telegram/edit-message",{channelToken:e.channelToken,chatId:e.chatId,messageId:e.messageId,text:e.text,parseMode:e.parseMode},t)}async deleteMessage(e,t){return this.httpClient.post("/api/v1/telegram/delete-message",{channelToken:e.channelToken,chatId:e.chatId,messageId:e.messageId},t)}async downloadMedia(e,t){return this.httpClient.post("/api/v1/telegram/download-media",{channelToken:e.channelToken,fileId:e.fileId},t)}};var u=class{constructor(e){this.httpClient=e;}async sendText(e,t){return this.httpClient.post("/api/v1/webchat/send-text",{channelToken:e.channelToken,chatId:e.chatId,type:"text",content:{text:e.messageText,typingTime:e.typingTime},typing:e.typing},t)}async sendMedia(e,t){return this.httpClient.post("/api/v1/webchat/send-media",{channelToken:e.channelToken,chatId:e.chatId,type:e.type,content:{url:e.fileUrl,caption:e.caption,typingTime:e.typingTime},typing:e.typing},t)}async sendCarousel(e,t){return this.httpClient.post("/api/v1/webchat/send-carousel",{channelToken:e.channelToken,chatId:e.chatId,type:"carousel",content:{cards:e.cards.map(n=>({title:n.title,subtitle:n.subtitle,imageUrl:n.imageUrl,buttons:n.buttons?.map(s=>({id:s.id||`btn_${Date.now()}_${Math.random()}`,text:s.text,type:s.type,value:s.value,url:s.url}))})),typingTime:e.typingTime},typing:e.typing},t)}async sendForm(e,t){return this.httpClient.post("/api/v1/webchat/send-form",{channelToken:e.channelToken,chatId:e.chatId,type:"form",content:{id:e.id,title:e.title,submitText:e.submitButtonText,fields:e.fields.map(n=>({id:n.id||n.name,type:n.type,label:n.label,placeholder:n.placeholder,required:n.required,options:n.options})),typingTime:e.typingTime},typing:e.typing},t)}async sendQuickReplies(e,t){return this.httpClient.post("/api/v1/webchat/send-quick-replies",{channelToken:e.channelToken,chatId:e.chatId,type:"quickReplies",content:{text:e.messageText,quickReplies:e.quickReplies.map(n=>({id:n.id||`qr_${Date.now()}_${Math.random()}`,text:n.text,value:n.value})),typingTime:e.typingTime},typing:e.typing},t)}async sendCard(e,t){return this.httpClient.post("/api/v1/webchat/send-card",{channelToken:e.channelToken,chatId:e.chatId,type:"card",content:{title:e.title,subtitle:e.description,imageUrl:e.imageUrl,buttons:e.buttons?.map(n=>({id:n.id||`btn_${Date.now()}_${Math.random()}`,text:n.text,type:n.type,value:n.value,url:n.url})),typingTime:e.typingTime},typing:e.typing},t)}async sendButtons(e,t){return this.httpClient.post("/api/v1/webchat/send-buttons",{channelToken:e.channelToken,chatId:e.chatId,type:"buttons",content:{text:e.messageText,buttons:e.buttons.map(n=>({id:n.id||`btn_${Date.now()}_${Math.random()}`,text:n.text,type:n.type,value:n.value,url:n.url})),typingTime:e.typingTime},typing:e.typing},t)}};var m=class{constructor(e){this.httpClient=e;}async listPosts(e,t){return this.httpClient.post("/api/v1/facebook/list-posts",{channelToken:e.channelToken,pageId:e.pageId,limit:e.limit},t)}async listComments(e,t){return this.httpClient.post("/api/v1/facebook/list-comments",{channelToken:e.channelToken,postId:e.postId,limit:e.limit},t)}async createPost(e,t){return this.httpClient.post("/api/v1/facebook/create-post",{channelToken:e.channelToken,pageId:e.pageId,message:e.message,link:e.link},t)}async replyComment(e,t){return this.httpClient.post("/api/v1/facebook/reply-comment",{channelToken:e.channelToken,commentId:e.commentId,message:e.message},t)}async deleteComment(e,t){return this.httpClient.post("/api/v1/facebook/delete-comment",{channelToken:e.channelToken,commentId:e.commentId},t)}async sendText(e,t){return this.httpClient.post("/api/v1/facebook/send-text",{channelToken:e.channelToken,recipientId:e.recipientId,message:e.message},t)}async sendMedia(e,t){return this.httpClient.post("/api/v1/facebook/send-media",{channelToken:e.channelToken,recipientId:e.recipientId,fileUrl:e.fileUrl,type:e.type,caption:e.caption},t)}async sendButtons(e,t){return this.httpClient.post("/api/v1/facebook/send-buttons",{channelToken:e.channelToken,recipientId:e.recipientId,message:e.message,buttons:e.buttons},t)}async sendSticker(e,t){return this.httpClient.post("/api/v1/facebook/send-sticker",{channelToken:e.channelToken,recipientId:e.recipientId,stickerId:e.stickerId},t)}async replyMessage(e,t){return this.httpClient.post("/api/v1/facebook/reply-message",{channelToken:e.channelToken,messageId:e.messageId,message:e.message},t)}async replyMedia(e,t){return this.httpClient.post("/api/v1/facebook/reply-media",{channelToken:e.channelToken,messageId:e.messageId,fileUrl:e.fileUrl,type:e.type,caption:e.caption},t)}async sharePost(e,t){return this.httpClient.post("/api/v1/facebook/share-post",{channelToken:e.channelToken,mediaId:e.mediaId,recipientId:e.recipientId},t)}async getUserProfile(e,t){return this.httpClient.post("/api/v1/facebook/user-profile",{channelToken:e.channelToken,userId:e.userId},t)}async getPageProfile(e,t){return this.httpClient.post("/api/v1/facebook/page-profile",{channelToken:e.channelToken,pageId:e.pageId},t)}async downloadMedia(e,t){return this.httpClient.post("/api/v1/facebook/download-media",{channelToken:e.channelToken,url:e.url},t)}};var T=class{constructor(e){this.httpClient=e;}async sendPrivateReply(e,t){return this.httpClient.post("/api/v1/instagram/private-reply",{channelToken:e.channelToken,commentId:e.commentId,message:e.message},t)}async sendText(e,t){return this.httpClient.post("/api/v1/instagram/messages/text",{channelToken:e.channelToken,recipientId:e.recipientId,message:e.message},t)}async sendMedia(e,t){return this.httpClient.post("/api/v1/instagram/messages/media",{channelToken:e.channelToken,recipientId:e.recipientId,fileUrl:e.fileUrl,type:e.type,caption:e.caption},t)}async sendImages(e,t){return this.httpClient.post("/api/v1/instagram/messages/images",{channelToken:e.channelToken,recipientId:e.recipientId,images:e.images},t)}async sendSticker(e,t){return this.httpClient.post("/api/v1/instagram/messages/sticker",{channelToken:e.channelToken,recipientId:e.recipientId,stickerType:e.stickerType},t)}async reactMessage(e,t){return this.httpClient.post("/api/v1/instagram/messages/reaction",{channelToken:e.channelToken,messageId:e.messageId,reactionType:e.reactionType},t)}async removeReaction(e,t){return this.httpClient.delete("/api/v1/instagram/messages/reaction",t,{channelToken:e.channelToken,recipientId:e.recipientId,messageId:e.messageId})}async sendQuickReplies(e,t){return this.httpClient.post("/api/v1/instagram/messages/quick-replies",{channelToken:e.channelToken,recipientId:e.recipientId,message:e.message,quickReplies:e.quickReplies},t)}async sendGenericTemplate(e,t){return this.httpClient.post("/api/v1/instagram/messages/generic-template",{channelToken:e.channelToken,recipientId:e.recipientId,elements:e.elements},t)}async sendButtonTemplate(e,t){return this.httpClient.post("/api/v1/instagram/messages/button-template",{channelToken:e.channelToken,recipientId:e.recipientId,text:e.text,buttons:e.buttons},t)}async sendSenderAction(e,t){return this.httpClient.post("/api/v1/instagram/messages/sender-action",{channelToken:e.channelToken,recipientId:e.recipientId,action:e.action},t)}async getUserProfile(e,t){return this.httpClient.post("/api/v1/instagram/user-profile",{channelToken:e.channelToken,userId:e.userId},t)}async listPosts(e,t){return this.httpClient.post("/api/v1/instagram/posts",{channelToken:e.channelToken,userId:e.userId,limit:e.limit},t)}async getBusinessProfile(e,t){return this.httpClient.post("/api/v1/instagram/business-profile",{channelToken:e.channelToken},t)}async downloadMedia(e,t){return this.httpClient.post("/api/v1/instagram/download-media",{channelToken:e.channelToken,url:e.url},t)}async createMediaContainer(e,t){return this.httpClient.post("/api/v1/instagram/media",{channelToken:e.channelToken,image_url:e.image_url,video_url:e.video_url,media_type:e.media_type,caption:e.caption,is_carousel_item:e.is_carousel_item,children:e.children,upload_type:e.upload_type,trial_params:e.trial_params,alt_text:e.alt_text,location_id:e.location_id,product_tags:e.product_tags,user_tags:e.user_tags},t)}async publishMedia(e,t){return this.httpClient.post("/api/v1/instagram/media_publish",{channelToken:e.channelToken,creation_id:e.creation_id},t)}async getContainerStatus(e,t){return this.httpClient.post(`/api/v1/instagram/media/${e.container_id}/status`,{channelToken:e.channelToken},t)}async getPublishingLimit(e,t){return this.httpClient.post("/api/v1/instagram/content_publishing_limit",{channelToken:e.channelToken},t)}async uploadVideo(e,t){return this.httpClient.post("/api/v1/instagram/upload",{channelToken:e.channelToken,container_id:e.container_id,file_url:e.file_url,offset:e.offset,file_size:e.file_size},t)}};var k=class{constructor(e){this.httpClient=new l(e),this.auth=new d(this.httpClient),this.channels=new c(this.httpClient),this.integrations=new h(this.httpClient),this.whatsapp=new p(this.httpClient),this.telegram=new g(this.httpClient),this.webchat=new u(this.httpClient),this.facebook=new m(this.httpClient),this.instagram=new T(this.httpClient);}},K=k;
6
+ var I="https://api.oficialapi.com.br",l=class{constructor(e){this.config={clientId:e.clientId,clientSecret:e.clientSecret,timeout:e.timeout||3e4,maxRetries:e.maxRetries||3,retryDelay:e.retryDelay||1e3,headers:e.headers||{}},this.axiosInstance=P__default.default.create({baseURL:I,timeout:this.config.timeout,headers:{"Content-Type":"application/json",...this.config.headers}}),this.setupInterceptors();}setupInterceptors(){this.axiosInstance.interceptors.request.use(e=>{if(e.url?.includes("/auth/token"))return e;let t=e;return t.accessToken&&e.headers&&(e.headers.Authorization=`Bearer ${t.accessToken}`),e},e=>Promise.reject(e)),this.axiosInstance.interceptors.response.use(e=>e,async e=>{let t=e.config;if(!t)return Promise.reject(this.formatError(e));if((!e.response||e.response.status>=500&&e.response.status<600)&&(!t._retryCount||t._retryCount<this.config.maxRetries)){t._retryCount=(t._retryCount||0)+1;let s=this.config.retryDelay*t._retryCount;return await new Promise(i=>setTimeout(i,s)),this.axiosInstance(t)}return Promise.reject(this.formatError(e))});}formatError(e){if(e.response){let t=e.response.data,n=t?.error?.message||t?.message||e.message,s=t?.error?.details||[],i=new Error(n);return i.status=e.response.status,i.data=e.response.data,i.details=s,i}return e.request?new Error("Erro de conex\xE3o com a API. Verifique sua conex\xE3o com a internet."):e}async get(e,t,n){let s={...n,accessToken:t};return (await this.axiosInstance.get(e,s)).data}async post(e,t,n,s){let i={...s,accessToken:n};return (await this.axiosInstance.post(e,t,i)).data}async put(e,t,n,s){let i={...s,accessToken:n};return (await this.axiosInstance.put(e,t,i)).data}async delete(e,t,n,s){let i={...s,accessToken:t,data:n};return (await this.axiosInstance.delete(e,i)).data}async upload(e,t,n,s="file",i){let o=new FormData;if(t instanceof Buffer){let y=new Blob([t]);o.append(s,y);}else o.append(s,t);i&&Object.entries(i).forEach(([y,r])=>{r!=null&&o.append(y,typeof r=="string"?r:JSON.stringify(r));});let C={headers:{"Content-Type":"multipart/form-data"},accessToken:n};return (await this.axiosInstance.post(e,o,C)).data}};var d=class{constructor(e){this.httpClient=e;}async getToken(e,t){let n=await this.httpClient.post("/api/v1/auth/token",{client_id:e,client_secret:t});if(!n.success||!n.data)throw new Error(n.error?.message||"Falha ao obter token");return n.data}};var c=class{constructor(e){this.httpClient=e;}async list(e){let t=await this.httpClient.get("/api/v1/channels",e);if(!t.success||!t.data)throw new Error(t.error?.message||"Falha ao listar canais");return Array.isArray(t.data)?t.data:[t.data]}};var h=class{constructor(e){this.httpClient=e;}async createWebhook(e,t){let n=await this.httpClient.post("/api/v1/integrations",{url:e.url,expiresInDays:e.expiresInDays},t);if(!n.success||!n.data)throw new Error(n.error?.message||"Falha ao criar webhook");return n.data}};var p=class{constructor(e){this.httpClient=e;}async sendText(e,t){return this.httpClient.post("/api/v1/whatsapp/send-message",{channelToken:e.channelToken,sender:e.sender,messageText:e.messageText},t)}async sendMedia(e,t){return this.httpClient.post("/api/v1/whatsapp/send-media",{channelToken:e.channelToken,sender:e.sender,fileUrl:e.fileUrl,type:e.type,caption:e.caption,...e.fileName&&{fileName:e.fileName}},t)}async sendTemplate(e,t){return this.httpClient.post("/api/v1/whatsapp/send-template",{channelToken:e.channelToken,sender:e.sender,templateName:e.templateName,languageCode:e.languageCode,components:e.components},t)}async sendButtons(e,t){return this.httpClient.post("/api/v1/whatsapp/send-buttons",{channelToken:e.channelToken,sender:e.sender,text:e.text,buttons:e.buttons,...e.media&&{media:e.media}},t)}async sendList(e,t){return this.httpClient.post("/api/v1/whatsapp/send-list",{channelToken:e.channelToken,sender:e.sender,headerText:e.headerText,bodyText:e.bodyText,buttonText:e.buttonText,sections:e.sections,...e.footerText&&{footerText:e.footerText}},t)}async replyMessage(e,t){return this.httpClient.post("/api/v1/whatsapp/reply-message",{channelToken:e.channelToken,sender:e.sender,messageText:e.messageText,...e.replyMessageId&&{replyMessageId:e.replyMessageId},...e.preview_url!==void 0&&{preview_url:e.preview_url}},t)}async reactMessage(e,t){return this.httpClient.post("/api/v1/whatsapp/react-message",{channelToken:e.channelToken,sender:e.sender,emoji:e.emoji,...e.message_id&&{message_id:e.message_id}},t)}async createTemplate(e,t){return this.httpClient.post("/api/v1/whatsapp/create-template",{channelToken:e.channelToken,name:e.name,language:e.language,category:e.category,components:e.components},t)}async listTemplates(e,t){return this.httpClient.get(`/api/v1/whatsapp/templates?channelToken=${encodeURIComponent(e)}`,t)}async getTemplate(e,t,n){return this.httpClient.get(`/api/v1/whatsapp/templates/${t}?channelToken=${encodeURIComponent(e)}`,n)}async uploadMedia(e,t){return this.httpClient.upload("/api/v1/whatsapp/upload-media",e.file,t,"file",{channelToken:e.channelToken,mediaType:e.mediaType,...e.filename&&{filename:e.filename}})}async sendOrderDetails(e,t){return this.httpClient.post("/api/v1/whatsapp/send-order-details",{channelToken:e.channelToken,sender:e.sender,...e.headerText&&{headerText:e.headerText},bodyText:e.bodyText,...e.footerText&&{footerText:e.footerText},reference_id:e.reference_id,type:e.type,currency:e.currency,total_amount:e.total_amount,order:e.order,...e.payment_settings&&{payment_settings:e.payment_settings}},t)}async sendOrderStatus(e,t){return this.httpClient.post("/api/v1/whatsapp/send-order-status",{channelToken:e.channelToken,sender:e.sender,bodyText:e.bodyText,...e.footerText&&{footerText:e.footerText},reference_id:e.reference_id,order_status:e.order_status,...e.status_description&&{status_description:e.status_description},...e.payment_status&&{payment_status:e.payment_status},...e.payment_timestamp!==void 0&&{payment_timestamp:e.payment_timestamp}},t)}async sendAudio(e,t){return this.httpClient.post("/api/v1/whatsapp/send-audio",{channelToken:e.channelToken,sender:e.sender,mediaId:e.mediaId,...e.voice!==void 0&&{voice:e.voice}},t)}async sendSticker(e,t){return this.httpClient.post("/api/v1/whatsapp/send-sticker",{channelToken:e.channelToken,sender:e.sender,mediaId:e.mediaId},t)}async sendVideo(e,t){return this.httpClient.post("/api/v1/whatsapp/send-video",{channelToken:e.channelToken,sender:e.sender,mediaId:e.mediaId,...e.caption&&{caption:e.caption}},t)}async sendDocument(e,t){return this.httpClient.post("/api/v1/whatsapp/send-document",{channelToken:e.channelToken,sender:e.sender,mediaId:e.mediaId,...e.filename&&{filename:e.filename},...e.caption&&{caption:e.caption}},t)}async sendContact(e,t){return this.httpClient.post("/api/v1/whatsapp/send-contact",{channelToken:e.channelToken,sender:e.sender,contacts:e.contacts},t)}async sendLocation(e,t){return this.httpClient.post("/api/v1/whatsapp/send-location",{channelToken:e.channelToken,sender:e.sender,latitude:e.latitude,longitude:e.longitude,name:e.name,address:e.address},t)}async sendLocationRequest(e,t){return this.httpClient.post("/api/v1/whatsapp/send-location-request",{channelToken:e.channelToken,sender:e.sender,bodyText:e.bodyText,...e.headerText&&{headerText:e.headerText},...e.footerText&&{footerText:e.footerText}},t)}async sendCtaUrl(e,t){return this.httpClient.post("/api/v1/whatsapp/send-cta-url",{channelToken:e.channelToken,sender:e.sender,bodyText:e.bodyText,buttonText:e.buttonText,url:e.url,...e.header&&{header:e.header},...e.footerText&&{footerText:e.footerText}},t)}async sendMediaCarousel(e,t){return this.httpClient.post("/api/v1/whatsapp/send-media-carousel",{channelToken:e.channelToken,sender:e.sender,bodyText:e.bodyText,cards:e.cards},t)}async downloadMedia(e,t){return this.httpClient.post("/api/v1/whatsapp/download-media",{channelToken:e.channelToken,url:e.url},t)}};var g=class{constructor(e){this.httpClient=e;}async sendMessage(e,t){return this.httpClient.post("/api/v1/telegram/send-message",{channelToken:e.channelToken,chatId:e.chatId,text:e.text,parseMode:e.parseMode,replyToMessageId:e.replyToMessageId,disableNotification:e.disableNotification},t)}async sendMedia(e,t){return this.httpClient.post("/api/v1/telegram/send-media",{channelToken:e.channelToken,chatId:e.chatId,fileUrl:e.fileUrl,type:e.type,caption:e.caption,parseMode:e.parseMode,replyToMessageId:e.replyToMessageId},t)}async sendButtons(e,t){return this.httpClient.post("/api/v1/telegram/send-buttons",{channelToken:e.channelToken,chatId:e.chatId,text:e.text,buttons:e.buttons,parseMode:e.parseMode},t)}async sendLocation(e,t){return this.httpClient.post("/api/v1/telegram/send-location",{channelToken:e.channelToken,chatId:e.chatId,latitude:e.latitude,longitude:e.longitude,livePeriod:e.livePeriod},t)}async sendContact(e,t){return this.httpClient.post("/api/v1/telegram/send-contact",{channelToken:e.channelToken,chatId:e.chatId,phoneNumber:e.phoneNumber,firstName:e.firstName,lastName:e.lastName,vcard:e.vcard},t)}async sendPoll(e,t){return this.httpClient.post("/api/v1/telegram/send-poll",{channelToken:e.channelToken,chatId:e.chatId,question:e.question,options:e.options,isAnonymous:e.isAnonymous,type:e.type,correctOptionId:e.correctOptionId},t)}async sendVenue(e,t){return this.httpClient.post("/api/v1/telegram/send-venue",{channelToken:e.channelToken,chatId:e.chatId,latitude:e.latitude,longitude:e.longitude,title:e.title,address:e.address,foursquareId:e.foursquareId},t)}async sendDice(e,t){return this.httpClient.post("/api/v1/telegram/send-dice",{channelToken:e.channelToken,chatId:e.chatId,emoji:e.emoji},t)}async sendSticker(e,t){return this.httpClient.post("/api/v1/telegram/send-sticker",{channelToken:e.channelToken,chatId:e.chatId,stickerUrl:e.stickerUrl},t)}async sendVoice(e,t){return this.httpClient.post("/api/v1/telegram/send-voice",{channelToken:e.channelToken,chatId:e.chatId,voiceUrl:e.voiceUrl,caption:e.caption,duration:e.duration},t)}async sendVideoNote(e,t){return this.httpClient.post("/api/v1/telegram/send-video-note",{channelToken:e.channelToken,chatId:e.chatId,videoNoteUrl:e.videoNoteUrl,duration:e.duration,length:e.length},t)}async sendMediaGroup(e,t){return this.httpClient.post("/api/v1/telegram/send-media-group",{channelToken:e.channelToken,chatId:e.chatId,media:e.media},t)}async sendReplyKeyboard(e,t){return this.httpClient.post("/api/v1/telegram/send-reply-keyboard",{channelToken:e.channelToken,chatId:e.chatId,text:e.text,keyboard:e.keyboard,resizeKeyboard:e.resizeKeyboard,oneTimeKeyboard:e.oneTimeKeyboard},t)}async editMessage(e,t){return this.httpClient.post("/api/v1/telegram/edit-message",{channelToken:e.channelToken,chatId:e.chatId,messageId:e.messageId,text:e.text,parseMode:e.parseMode},t)}async deleteMessage(e,t){return this.httpClient.post("/api/v1/telegram/delete-message",{channelToken:e.channelToken,chatId:e.chatId,messageId:e.messageId},t)}async downloadMedia(e,t){return this.httpClient.post("/api/v1/telegram/download-media",{channelToken:e.channelToken,fileId:e.fileId},t)}};var u=class{constructor(e){this.httpClient=e;}async sendText(e,t){return this.httpClient.post("/api/v1/webchat/send-text",{channelToken:e.channelToken,chatId:e.chatId,type:"text",content:{text:e.messageText,typingTime:e.typingTime},typing:e.typing},t)}async sendMedia(e,t){return this.httpClient.post("/api/v1/webchat/send-media",{channelToken:e.channelToken,chatId:e.chatId,type:e.type,content:{url:e.fileUrl,caption:e.caption,typingTime:e.typingTime},typing:e.typing},t)}async sendCarousel(e,t){return this.httpClient.post("/api/v1/webchat/send-carousel",{channelToken:e.channelToken,chatId:e.chatId,type:"carousel",content:{cards:e.cards.map(n=>({title:n.title,subtitle:n.subtitle,imageUrl:n.imageUrl,buttons:n.buttons?.map(s=>({id:s.id||`btn_${Date.now()}_${Math.random()}`,text:s.text,type:s.type,value:s.value,url:s.url}))})),typingTime:e.typingTime},typing:e.typing},t)}async sendForm(e,t){return this.httpClient.post("/api/v1/webchat/send-form",{channelToken:e.channelToken,chatId:e.chatId,type:"form",content:{id:e.id,title:e.title,submitText:e.submitButtonText,fields:e.fields.map(n=>({id:n.id||n.name,type:n.type,label:n.label,placeholder:n.placeholder,required:n.required,options:n.options})),typingTime:e.typingTime},typing:e.typing},t)}async sendQuickReplies(e,t){return this.httpClient.post("/api/v1/webchat/send-quick-replies",{channelToken:e.channelToken,chatId:e.chatId,type:"quickReplies",content:{text:e.messageText,quickReplies:e.quickReplies.map(n=>({id:n.id||`qr_${Date.now()}_${Math.random()}`,text:n.text,value:n.value})),typingTime:e.typingTime},typing:e.typing},t)}async sendCard(e,t){return this.httpClient.post("/api/v1/webchat/send-card",{channelToken:e.channelToken,chatId:e.chatId,type:"card",content:{title:e.title,subtitle:e.description,imageUrl:e.imageUrl,buttons:e.buttons?.map(n=>({id:n.id||`btn_${Date.now()}_${Math.random()}`,text:n.text,type:n.type,value:n.value,url:n.url})),typingTime:e.typingTime},typing:e.typing},t)}async sendButtons(e,t){return this.httpClient.post("/api/v1/webchat/send-buttons",{channelToken:e.channelToken,chatId:e.chatId,type:"buttons",content:{text:e.messageText,buttons:e.buttons.map(n=>({id:n.id||`btn_${Date.now()}_${Math.random()}`,text:n.text,type:n.type,value:n.value,url:n.url})),typingTime:e.typingTime},typing:e.typing},t)}};var m=class{constructor(e){this.httpClient=e;}async listPosts(e,t){return this.httpClient.post("/api/v1/facebook/list-posts",{channelToken:e.channelToken,pageId:e.pageId,limit:e.limit},t)}async listComments(e,t){return this.httpClient.post("/api/v1/facebook/list-comments",{channelToken:e.channelToken,postId:e.postId,limit:e.limit},t)}async createPost(e,t){return this.httpClient.post("/api/v1/facebook/create-post",{channelToken:e.channelToken,pageId:e.pageId,message:e.message,link:e.link},t)}async replyComment(e,t){return this.httpClient.post("/api/v1/facebook/reply-comment",{channelToken:e.channelToken,commentId:e.commentId,message:e.message},t)}async deleteComment(e,t){return this.httpClient.post("/api/v1/facebook/delete-comment",{channelToken:e.channelToken,commentId:e.commentId},t)}async sendText(e,t){return this.httpClient.post("/api/v1/facebook/send-text",{channelToken:e.channelToken,recipientId:e.recipientId,message:e.message},t)}async sendMedia(e,t){return this.httpClient.post("/api/v1/facebook/send-media",{channelToken:e.channelToken,recipientId:e.recipientId,fileUrl:e.fileUrl,type:e.type,caption:e.caption},t)}async sendButtons(e,t){return this.httpClient.post("/api/v1/facebook/send-buttons",{channelToken:e.channelToken,recipientId:e.recipientId,message:e.message,buttons:e.buttons},t)}async sendSticker(e,t){return this.httpClient.post("/api/v1/facebook/send-sticker",{channelToken:e.channelToken,recipientId:e.recipientId,stickerId:e.stickerId},t)}async replyMessage(e,t){return this.httpClient.post("/api/v1/facebook/reply-message",{channelToken:e.channelToken,messageId:e.messageId,message:e.message},t)}async replyMedia(e,t){return this.httpClient.post("/api/v1/facebook/reply-media",{channelToken:e.channelToken,messageId:e.messageId,fileUrl:e.fileUrl,type:e.type,caption:e.caption},t)}async sharePost(e,t){return this.httpClient.post("/api/v1/facebook/share-post",{channelToken:e.channelToken,mediaId:e.mediaId,recipientId:e.recipientId},t)}async getUserProfile(e,t){return this.httpClient.post("/api/v1/facebook/user-profile",{channelToken:e.channelToken,userId:e.userId},t)}async getPageProfile(e,t){return this.httpClient.post("/api/v1/facebook/page-profile",{channelToken:e.channelToken,pageId:e.pageId},t)}async downloadMedia(e,t){return this.httpClient.post("/api/v1/facebook/download-media",{channelToken:e.channelToken,url:e.url},t)}};var T=class{constructor(e){this.httpClient=e;}async sendPrivateReply(e,t){return this.httpClient.post("/api/v1/instagram/private-reply",{channelToken:e.channelToken,commentId:e.commentId,message:e.message},t)}async sendText(e,t){return this.httpClient.post("/api/v1/instagram/messages/text",{channelToken:e.channelToken,recipientId:e.recipientId,text:e.text,...e.tags&&{tags:e.tags}},t)}async sendMedia(e,t){return this.httpClient.post("/api/v1/instagram/messages/media",{channelToken:e.channelToken,recipientId:e.recipientId,attachment:e.attachment,...e.tags&&{tags:e.tags}},t)}async sendImages(e,t){return this.httpClient.post("/api/v1/instagram/messages/images",{channelToken:e.channelToken,recipientId:e.recipientId,images:e.images},t)}async sendSticker(e,t){return this.httpClient.post("/api/v1/instagram/messages/sticker",{channelToken:e.channelToken,recipientId:e.recipientId,stickerType:e.stickerType},t)}async reactMessage(e,t){return this.httpClient.post("/api/v1/instagram/messages/reaction",{channelToken:e.channelToken,messageId:e.messageId,reactionType:e.reactionType},t)}async removeReaction(e,t){return this.httpClient.delete("/api/v1/instagram/messages/reaction",t,{channelToken:e.channelToken,recipientId:e.recipientId,messageId:e.messageId})}async sendQuickReplies(e,t){return this.httpClient.post("/api/v1/instagram/messages/quick-replies",{channelToken:e.channelToken,recipientId:e.recipientId,message:e.message,quickReplies:e.quickReplies},t)}async sendGenericTemplate(e,t){return this.httpClient.post("/api/v1/instagram/messages/generic-template",{channelToken:e.channelToken,recipientId:e.recipientId,elements:e.elements},t)}async sendButtonTemplate(e,t){return this.httpClient.post("/api/v1/instagram/messages/button-template",{channelToken:e.channelToken,recipientId:e.recipientId,text:e.text,buttons:e.buttons},t)}async sendSenderAction(e,t){return this.httpClient.post("/api/v1/instagram/messages/sender-action",{channelToken:e.channelToken,recipientId:e.recipientId,action:e.action},t)}async getUserProfile(e,t){return this.httpClient.post("/api/v1/instagram/user-profile",{channelToken:e.channelToken,userId:e.userId},t)}async listPosts(e,t){return this.httpClient.post("/api/v1/instagram/posts",{channelToken:e.channelToken,userId:e.userId,limit:e.limit},t)}async getBusinessProfile(e,t){return this.httpClient.post("/api/v1/instagram/business-profile",{channelToken:e.channelToken},t)}async downloadMedia(e,t){return this.httpClient.post("/api/v1/instagram/download-media",{channelToken:e.channelToken,url:e.url},t)}async createMediaContainer(e,t){return this.httpClient.post("/api/v1/instagram/media",{channelToken:e.channelToken,image_url:e.image_url,video_url:e.video_url,media_type:e.media_type,caption:e.caption,is_carousel_item:e.is_carousel_item,children:e.children,upload_type:e.upload_type,trial_params:e.trial_params,alt_text:e.alt_text,location_id:e.location_id,product_tags:e.product_tags,user_tags:e.user_tags},t)}async publishMedia(e,t){return this.httpClient.post("/api/v1/instagram/media_publish",{channelToken:e.channelToken,creation_id:e.creation_id},t)}async getContainerStatus(e,t){return this.httpClient.post(`/api/v1/instagram/media/${e.container_id}/status`,{channelToken:e.channelToken},t)}async getPublishingLimit(e,t){return this.httpClient.post("/api/v1/instagram/content_publishing_limit",{channelToken:e.channelToken},t)}async uploadVideo(e,t){return this.httpClient.post("/api/v1/instagram/upload",{channelToken:e.channelToken,container_id:e.container_id,file_url:e.file_url,offset:e.offset,file_size:e.file_size},t)}};var k=class{constructor(e){this.httpClient=new l(e),this.auth=new d(this.httpClient),this.channels=new c(this.httpClient),this.integrations=new h(this.httpClient),this.whatsapp=new p(this.httpClient),this.telegram=new g(this.httpClient),this.webchat=new u(this.httpClient),this.facebook=new m(this.httpClient),this.instagram=new T(this.httpClient);}},K=k;
7
7
  exports.OficialAPISDK=k;exports.default=K;//# sourceMappingURL=index.js.map
8
8
  //# sourceMappingURL=index.js.map