UNPKG

@juzi/wechaty

Version:

Wechaty is a RPA SDK for Chatbot Makers.

57 lines 1.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ChannelCardImpl = void 0; const config_js_1 = require("../config.js"); const validation_js_1 = require("../user-mixins/validation.js"); const wechatify_js_1 = require("../user-mixins/wechatify.js"); class ChannelCardMixin extends (0, wechatify_js_1.wechatifyMixinBase)() { payload; /** * * Create * */ static async create() { config_js_1.log.verbose('ChannelCard', 'create()'); // TODO: get appid and username from wechat const payload = { avatar: 'todo', extras: 'todo', nickname: 'todo', url: 'todo', authIconUrl: 'todo', authJob: 'todo', }; return new this(payload); } /* * @hideconstructor */ constructor(payload) { super(); this.payload = payload; config_js_1.log.verbose('ChannelCard', 'constructor()'); } avatar() { return this.payload.avatar; } extras() { return this.payload.extras; } nickname() { return this.payload.nickname; } url() { return this.payload.url; } authIconUrl() { return this.payload.authIconUrl; } authJob() { return this.payload.authJob; } } class ChannelCardImpl extends (0, validation_js_1.validationMixin)(ChannelCardMixin)() { } exports.ChannelCardImpl = ChannelCardImpl; //# sourceMappingURL=channel-card.js.map