UNPKG

meta-cloud-api

Version:
2 lines 975 B
import {a}from'./chunk-7GL74SXM.js';import {a as a$1}from'./chunk-BZ5QDXNR.js';import {b}from'./chunk-VW3LGHTJ.js';var o=class extends b{endpoint="whatsapp_business_profile";constructor(e,s){super(e,s);}async getBusinessProfile(e){return this.sendJson("GET",`${this.config.WA_PHONE_NUMBER_ID}/${this.endpoint}${a(e)}`,this.config.REQUEST_TIMEOUT,null)}async updateBusinessProfile(e){return this.sendJson("POST",`${this.config.WA_PHONE_NUMBER_ID}/${this.endpoint}`,this.config.REQUEST_TIMEOUT,JSON.stringify(e))}async createUploadSession(e,s,r){let p=a$1({file_length:e,file_type:s,file_name:r});return this.sendJson("POST",`app/uploads/${p}`,this.config.REQUEST_TIMEOUT,null)}async uploadMedia(e,s){return this.sendJson("POST",`${e}`,this.config.REQUEST_TIMEOUT,s)}async getUploadHandle(e){return this.sendJson("GET",`${e}`,this.config.REQUEST_TIMEOUT,null)}};var P=o;export{o as a,P as b};//# sourceMappingURL=chunk-KFPOVYEJ.js.map //# sourceMappingURL=chunk-KFPOVYEJ.js.map