UNPKG

wechat-work

Version:
32 lines 1.7 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var app_message_type_enum_1 = require("../enums/app-message-type.enum"); var app_message_base_class_1 = require("./app-message-base.class"); var TextCardAppMessage = /** @class */ (function (_super) { __extends(TextCardAppMessage, _super); function TextCardAppMessage(title, description, url, btnText, agentId, targetUserIds, targetDepartmentIds, targetTags, safe) { var _this = this; if (!targetUserIds && !targetDepartmentIds && !targetTags) { throw Error("one of targetUserIds,targetDepartmentIds,targetTags should be set."); } _this = _super.call(this, targetUserIds, targetDepartmentIds, targetTags, agentId, app_message_type_enum_1.EnumAppMessageType.TextCard, safe) || this; _this.textcard = { title: title, description: description, url: url, btntxt: btnText }; return _this; } return TextCardAppMessage; }(app_message_base_class_1.AppMessageBase)); exports.TextCardAppMessage = TextCardAppMessage; //# sourceMappingURL=text-card-app-message.class.js.map