701 workflow improve webhook triggers (#11455)

as title

Nota bene: I did not filter execution by http method. A POST webhook
trigger can be triggered by a GET request for more flexibility. Tell me
if you think it is a mistake


https://github.com/user-attachments/assets/1833cbea-51a8-4772-bcd8-088d6a087e79
This commit is contained in:
martmull
2025-04-08 21:01:22 +02:00
committed by GitHub
parent 2f7f28a574
commit f121c94d4a
14 changed files with 297 additions and 20 deletions

View File

@ -61,6 +61,16 @@ export type WorkflowCronTrigger = BaseTrigger & {
export type WorkflowWebhookTrigger = BaseTrigger & {
type: WorkflowTriggerType.WEBHOOK;
settings:
| {
httpMethod: 'GET';
authentication: 'API_KEY' | null;
}
| ({
httpMethod: 'POST';
authentication: 'API_KEY' | null;
expectedBody: object;
} & { outputSchema: object });
};
export type WorkflowManualTriggerSettings = WorkflowManualTrigger['settings'];