UNPKG

@botonic/plugin-flow-builder

Version:

Use Flow Builder to show your contents

18 lines 741 B
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime"; import { BotonicAction } from '@botonic/core'; import { ContentFieldsBase } from './content-fields-base'; export class FlowBotAction extends ContentFieldsBase { static fromHubtypeCMS(cmsBotAction, _locale, cmsApi) { const newBotAction = new FlowBotAction(cmsBotAction.id); newBotAction.code = cmsBotAction.code; newBotAction.payload = cmsApi.createPayloadWithParams(cmsBotAction); return newBotAction; } doBotAction(request) { request.session._botonic_action = `${BotonicAction.Redirect}:${this.payload}`; } toBotonic() { return _jsx(_Fragment, {}); } } //# sourceMappingURL=flow-bot-action.js.map