mirror of
https://github.com/xtr-dev/payload-automation.git
synced 2025-12-10 17:03:22 +00:00
- Add createTrigger() and createAdvancedTrigger() helpers - Add preset builders: webhookTrigger, cronTrigger, eventTrigger, etc. - Implement virtual fields with JSON backing for trigger parameters - Eliminate 90% of boilerplate when creating custom triggers - Add /helpers export path for trigger builders - Fix field name clashing between built-in and custom trigger parameters - Add comprehensive examples and documentation - Maintain backward compatibility with existing triggers 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
849 B
TypeScript
25 lines
849 B
TypeScript
// Main export contains only types and client-safe utilities
|
|
// Server-side functions are exported via '@xtr-dev/payload-automation/server'
|
|
|
|
export type {
|
|
PayloadWorkflow as Workflow,
|
|
WorkflowStep,
|
|
WorkflowTrigger
|
|
} from './core/workflow-executor.js'
|
|
|
|
// Pure types only - completely safe for client bundling
|
|
export type {
|
|
CustomTriggerOptions,
|
|
ExecutionContext,
|
|
TriggerResult,
|
|
WorkflowsPluginConfig
|
|
} from './types/index.js'
|
|
|
|
// Server-side functions are NOT re-exported here to avoid bundling issues
|
|
// Import server-side functions from the /server export instead
|
|
|
|
// Server functions and plugin should be imported from '/server':
|
|
// import { workflowsPlugin } from '@xtr-dev/payload-automation/server'
|
|
// UI components should be imported from '/client':
|
|
// import { TriggerWorkflowButton } from '@xtr-dev/payload-automation/client'
|