Files
payload-automation/src/index.ts
Bas van den Aakster 6397250045 Fix JSON circular reference serialization and use PayloadCMS generated types
- Replace duplicate type definitions with PayloadCMS generated types
- Fix workflow context serialization with safeSerialize() method
- Resolve type mismatches (id: string vs number)
- Update all imports to use PayloadWorkflow type
- Ensure workflow runs are created successfully without serialization errors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-01 18:02:21 +02:00

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'
// Pure types only - completely safe for client bundling
export type {
CustomTriggerOptions,
TriggerResult,
ExecutionContext,
WorkflowsPluginConfig
} from './types/index.js'
export type {
PayloadWorkflow as Workflow,
WorkflowStep,
WorkflowTrigger
} from './core/workflow-executor.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'