UNPKG

@juzi/wechaty

Version:

Wechaty is a RPA SDK for Chatbot Makers.

66 lines 1.83 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MiniProgramImpl = 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 MiniProgramMixin extends (0, wechatify_js_1.wechatifyMixinBase)() { payload; /** * * Create * */ static async create() { config_js_1.log.verbose('MiniProgram', 'create()'); // TODO: get appid and username from wechat const payload = { appid: 'todo', description: 'todo', pagePath: 'todo', thumbKey: 'todo', thumbUrl: 'todo', title: 'todo', username: 'todo', }; return new this(payload); } /* * @hideconstructor */ constructor(payload) { super(); this.payload = payload; config_js_1.log.verbose('MiniProgram', 'constructor()'); // Huan(202110): it is ok to create a raw one without wechaty instance // guardWechatifyClass.call(this, MiniProgram) } appid() { return this.payload.appid; } title() { return this.payload.title; } pagePath() { return this.payload.pagePath; } username() { return this.payload.username; } description() { return this.payload.description; } thumbUrl() { return this.payload.thumbUrl; } thumbKey() { return this.payload.thumbKey; } thumbnailFile() { return this.payload.thumbnailFileBox; } } class MiniProgramImpl extends (0, validation_js_1.validationMixin)(MiniProgramMixin)() { } exports.MiniProgramImpl = MiniProgramImpl; //# sourceMappingURL=mini-program.js.map