// Plugin-level configuration: the Postiz connection (base URL + API key). Set // once per Saltcorn site under Settings -> Plugins -> postiz-poster. Every // trigger action reuses this saved connection. const Workflow = require("@saltcorn/data/models/workflow"); const Form = require("@saltcorn/data/models/form"); const configurationWorkflow = () => new Workflow({ steps: [ { name: "Postiz connection", form: async () => new Form({ fields: [ { name: "baseUrl", label: "Postiz base URL", type: "String", required: true, sublabel: "Self-hosted: https://postiz.example.com | Cloud: https://api.postiz.com" }, { name: "apiKey", label: "Public API key", type: "String", required: true, sublabel: "Postiz -> Settings -> Developers -> Public API", attributes: { input_type: "password" } } ] }) } ] }); module.exports = { configurationWorkflow };