UNPKG

@juzi/wechaty

Version:

Wechaty is a RPA SDK for Chatbot Makers.

49 lines 1.75 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PremiumOnlineAppointmentCardImpl = 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 PremiumOnlineAppointmentCardMixin extends (0, wechatify_js_1.wechatifyMixinBase)() { payload; constructor(payload) { super(); this.payload = payload; config_js_1.log.verbose('PremiumOnlineAppointmentCard', 'constructor()'); } static async findAll(query) { config_js_1.log.verbose('PremiumOnlineAppointmentCard', 'findAll(%s)', JSON.stringify(query)); const params = { cardType: query.cardType || 'card', page: query.page || 1, pageSize: query.pageSize || 50, }; const result = await this.wechaty.puppet.listPremiumOnlineAppointmentCards(params); if (!result || !result.tools) { return []; } const cardList = result.tools.map((payload) => { return new this(payload); }); return cardList; } componentId() { return this.payload.componentId; } titleImage() { return this.payload.titleImage; } createTime() { return this.payload.createTime; } title() { return this.payload.title; } subTitle() { return this.payload.subTitle; } } class PremiumOnlineAppointmentCardImpl extends (0, validation_js_1.validationMixin)(PremiumOnlineAppointmentCardMixin)() { } exports.PremiumOnlineAppointmentCardImpl = PremiumOnlineAppointmentCardImpl; //# sourceMappingURL=premium-online-appointment-card.js.map