UNPKG

@zenvia/sdk

Version:

This SDK for [Node.js](https://nodejs.org/) was created based on the [Zenvia](https://www.zenvia.com/) [API](https://zenvia.github.io/zenvia-openapi-spec/).

26 lines 979 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GbmChannel = void 0; const abstract_channel_1 = require("./abstract-channel"); /** * Implementation of GBM channel. */ class GbmChannel extends abstract_channel_1.AbstractChannel { /** * Returns a new `GbmChannel` that is used to set the GBM channel. * * @param token Zenvia platform token. * @param loggerInstance If you want, you can pass your log instance. */ constructor(token, loggerInstance, options) { super(token, 'gbm', loggerInstance, options); this.supportedContents = ['text', 'file', 'card', 'replyable_text', 'carousel']; } contentSupportValidation(content) { if (!this.supportedContents.includes(content.type)) { throw new Error(`Content of type ${content.type} is not supported in Google Business Messages channel`); } } } exports.GbmChannel = GbmChannel; //# sourceMappingURL=gbm.js.map