mirror of
https://github.com/xtr-dev/payload-automation.git
synced 2025-12-10 00:43:23 +00:00
- Convert webhook, global, and cron triggers to use TriggerConfig pattern like collectionTrigger - Simplify trigger slug names (remove '-trigger' suffix) - Update validation to use new slug names - Add perfectionist/sort-exports rule disable - Note: Workflow.ts integration still needs fixes for type compatibility
25 lines
569 B
TypeScript
25 lines
569 B
TypeScript
import type {TriggerConfig} from '../plugin/config-types.js'
|
|
|
|
export const globalTrigger: TriggerConfig = () => ({
|
|
slug: 'global',
|
|
fields: [
|
|
{
|
|
name: 'global',
|
|
type: 'select',
|
|
admin: {
|
|
description: 'Global that triggers the workflow',
|
|
},
|
|
options: [], // Will be populated dynamically based on available globals
|
|
},
|
|
{
|
|
name: 'globalOperation',
|
|
type: 'select',
|
|
admin: {
|
|
description: 'Global operation that triggers the workflow',
|
|
},
|
|
options: [
|
|
'update'
|
|
],
|
|
}
|
|
]
|
|
}) |