UNPKG

meta-cloud-api

Version:
2 lines 910 B
import {a}from'./chunk-BZ5QDXNR.js';import {b}from'./chunk-VW3LGHTJ.js';var n=class extends b{endpoint="message_templates";constructor(e,s){super(e,s);}async getTemplate(e){return this.sendJson("GET",`${e}`,this.config.REQUEST_TIMEOUT,null)}async updateTemplate(e,s){return this.sendJson("POST",`${e}`,this.config.REQUEST_TIMEOUT,JSON.stringify(s))}async getTemplates(e){return this.sendJson("GET",`${this.config.WA_BUSINESS_ACCOUNT_ID}/${this.endpoint}${a(e??{})}`,this.config.REQUEST_TIMEOUT,null)}async createTemplate(e){return this.sendJson("POST",`${this.config.WA_BUSINESS_ACCOUNT_ID}/${this.endpoint}`,this.config.REQUEST_TIMEOUT,JSON.stringify(e))}async deleteTemplate(e){return this.sendJson("DELETE",`${this.config.WA_BUSINESS_ACCOUNT_ID}/${this.endpoint}${a(e)}`,this.config.REQUEST_TIMEOUT,null)}};export{n as a};//# sourceMappingURL=chunk-R36L2XYO.js.map //# sourceMappingURL=chunk-R36L2XYO.js.map