mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-04-21 17:28:59 -05:00
feat: Extend webhook support for scope_expression and payload (#2874)
* add: scope_expression and payload columns for v1_webhook * refactor: insert or update sql cmds for v1_webhook * feat: update api clients, openapi schema for new webhook body * refactor: receiver and transformer for v1 webhook * add: python sdk changes * feat: ts sdk changes * feat: add FE for webhook new params * fix: scope expression empty payload * add: support for scope and payload for go client * fix: lint * fix: error message UI on webhook * fix: lint * fix: migraiton conflict, build failure * fix: error handling * update docs, add tests * fix: lint, test file name
This commit is contained in:
@@ -576,6 +576,8 @@ CREATE TABLE v1_incoming_webhook (
|
||||
-- CEL expression that creates an event key
|
||||
-- from the payload of the webhook
|
||||
event_key_expression TEXT NOT NULL,
|
||||
scope_expression TEXT,
|
||||
static_payload JSONB,
|
||||
|
||||
auth_method v1_incoming_webhook_auth_type NOT NULL,
|
||||
|
||||
@@ -622,6 +624,8 @@ CREATE TABLE v1_incoming_webhook (
|
||||
)
|
||||
),
|
||||
CHECK (LENGTH(event_key_expression) > 0),
|
||||
-- Optional: prevent empty string but allow NULL
|
||||
CHECK (scope_expression IS NULL OR LENGTH(scope_expression) > 0),
|
||||
CHECK (LENGTH(name) > 0)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user