Files
ipal-kit/dist/modules/forms/formsPluginConfig.d.ts
T
2026-10-15 15:53:32 +02:00

18 lines
946 B
TypeScript

import type { Plugin } from 'payload';
import type { FormsOption } from './types.js';
/**
* Configures @payloadcms/plugin-form-builder from IPAL's FormsOption.
*
* Provides the forms / form-submissions collections and field types. E-mails
* after a submission are the form-builder's own (Forms → Emails), sent through
* the project's email adapter (mailAdapter()).
*
* SECURITY: form-builder defaults form-submissions to `create: () => true`, i.e.
* anyone can POST /api/form-submissions and skip everything submitForm enforces
* (rate limit, Turnstile, GDPR consent, schema validation). Here REST/GraphQL
* creation is limited to logged-in users; the site submits through submitForm
* (server action → Local API, which bypasses access by design). A project that
* really needs public REST submissions can override `formSubmissionOverrides.access.create`.
*/
export declare function buildFormsPlugin(forms: FormsOption): Plugin;