UNPKG

meta-cloud-api

Version:
2 lines 984 B
import {a as a$1}from'./chunk-CRZ7EUYR.js';import {a as a$2}from'./chunk-MJEG3K4V.js';import {a}from'./chunk-RIL6QABY.js';var o=class extends a{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$1(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$2({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-LV3TULSI.js.map //# sourceMappingURL=chunk-LV3TULSI.js.map