mirror of
https://github.com/xtr-dev/payload-automation.git
synced 2025-12-11 09:13:24 +00:00
- Delete `init-global-hooks.ts`, `init-step-tasks.ts`, `init-webhook.ts`, and `init-workflow-hooks.ts` - Remove obsolete components: `TriggerWorkflowButton` and `WorkflowExecutionStatus` - Clean up unused trigger files: `webhook-trigger.ts` - Delete webhook-related integration tests: `webhook-triggers.spec.ts` - Streamline related documentation and improve maintainability by eliminating deprecated code
30 lines
654 B
TypeScript
30 lines
654 B
TypeScript
import type {TriggerConfig} from '../plugin/config-types.js'
|
|
|
|
export const globalTrigger: TriggerConfig = ({globalTriggers}) => ({
|
|
slug: 'global-hook',
|
|
parameters: [
|
|
{
|
|
name: 'global',
|
|
type: 'select',
|
|
admin: {
|
|
description: 'Global that triggers the workflow',
|
|
},
|
|
options: Object.keys(globalTriggers || {}),
|
|
},
|
|
{
|
|
name: 'operation',
|
|
type: 'select',
|
|
admin: {
|
|
description: 'Global hook that triggers the workflow',
|
|
},
|
|
options: [
|
|
"afterChange",
|
|
"afterRead",
|
|
"beforeChange",
|
|
"beforeRead",
|
|
"beforeValidate"
|
|
],
|
|
}
|
|
]
|
|
})
|