mirror of
https://github.com/xtr-dev/payload-automation.git
synced 2025-12-10 00:43:23 +00:00
26 lines
551 B
TypeScript
26 lines
551 B
TypeScript
import type {Field, TaskConfig} from "payload"
|
|
|
|
export type CollectionTriggerConfigCrud = {
|
|
create?: true
|
|
delete?: true
|
|
read?: true
|
|
update?: true
|
|
}
|
|
|
|
export type CollectionTriggerConfig = CollectionTriggerConfigCrud | true
|
|
|
|
export type CustomTriggerConfig = {
|
|
inputs?: Field[]
|
|
slug: string,
|
|
}
|
|
|
|
export type WorkflowsPluginConfig<TSlug extends string> = {
|
|
collectionTriggers: {
|
|
[key in TSlug]?: CollectionTriggerConfig
|
|
}
|
|
enabled?: boolean
|
|
steps: TaskConfig<string>[],
|
|
triggers?: CustomTriggerConfig[]
|
|
webhookPrefix?: string
|
|
}
|