mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-04-21 00:59:50 -05:00
Feat: Webhook fixes / improvements (#2131)
* feat: webhook update * feat: add headers to cel env * fix: header casing * feat: wire up edits * fix: updates * fix: finish wiring up updates * fix: handle save on enter * fix: lint * feat: add slack and discord * feat: initial slack setup * fix: get slack working * fix: rm discord for now * fix: lint * chore: gen * fix: explicit save button * feat: add link to CEL docs * feat: add callout for reaching out to support * feat: docs * refactor: challenge * fix: naming * fix: return * fix: resp codes * fix: webhooks beta flag * fix: rm discord * fix: docs
This commit is contained in:
@@ -358,6 +358,8 @@ V1CreateFilterRequest:
|
||||
$ref: "./v1/filter.yaml#/V1CreateFilterRequest"
|
||||
V1CreateWebhookRequest:
|
||||
$ref: "./v1/webhook.yaml#/V1CreateWebhookRequest"
|
||||
V1UpdateWebhookRequest:
|
||||
$ref: "./v1/webhook.yaml#/V1UpdateWebhookRequest"
|
||||
V1UpdateFilterRequest:
|
||||
$ref: "./v1/filter.yaml#/V1UpdateFilterRequest"
|
||||
V1CELDebugRequest:
|
||||
|
||||
@@ -51,6 +51,7 @@ V1WebhookSourceName:
|
||||
- GENERIC
|
||||
- GITHUB
|
||||
- STRIPE
|
||||
- SLACK
|
||||
|
||||
V1WebhookHMACAlgorithm:
|
||||
type: string
|
||||
@@ -184,3 +185,12 @@ V1CreateWebhookRequest:
|
||||
- $ref: "#/V1CreateWebhookRequestBasicAuth"
|
||||
- $ref: "#/V1CreateWebhookRequestAPIKey"
|
||||
- $ref: "#/V1CreateWebhookRequestHMAC"
|
||||
|
||||
V1UpdateWebhookRequest:
|
||||
type: object
|
||||
properties:
|
||||
eventKeyExpression:
|
||||
type: string
|
||||
description: The CEL expression to use for the event key. This is used to create the event key from the webhook payload.
|
||||
required:
|
||||
- eventKeyExpression
|
||||
|
||||
@@ -64,7 +64,7 @@ paths:
|
||||
# !!! IMPORTANT: we directly reference this path in the webhook rate limiter in `webhook_rate_limit.go`
|
||||
# changing this path will break the rate limiter. !!!
|
||||
/api/v1/stable/tenants/{tenant}/webhooks/{v1-webhook}:
|
||||
$ref: "./paths/v1/webhooks/webhook.yaml#/V1WebhookGetDeleteReceive"
|
||||
$ref: "./paths/v1/webhooks/webhook.yaml#/V1WebhookGetDeleteReceiveUpdate"
|
||||
/api/v1/stable/tenants/{tenant}/cel/debug:
|
||||
$ref: "./paths/v1/cel/cel.yaml#/V1CELDebug"
|
||||
/api/ready:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
V1WebhookGetDeleteReceive:
|
||||
V1WebhookGetDeleteReceiveUpdate:
|
||||
get:
|
||||
description: Get a webhook by its name
|
||||
operationId: v1-webhook:get
|
||||
@@ -123,10 +123,7 @@ V1WebhookGetDeleteReceive:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
example: 'OK'
|
||||
additionalProperties: true
|
||||
"400":
|
||||
content:
|
||||
application/json:
|
||||
@@ -142,6 +139,62 @@ V1WebhookGetDeleteReceive:
|
||||
summary: Post a webhook message
|
||||
tags:
|
||||
- Webhook
|
||||
patch:
|
||||
x-resources: ["tenant", "v1-webhook"]
|
||||
description: Update a webhook
|
||||
operationId: v1-webhook:update
|
||||
parameters:
|
||||
- description: The tenant id
|
||||
in: path
|
||||
name: tenant
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
minLength: 36
|
||||
maxLength: 36
|
||||
- description: The webhook name
|
||||
in: path
|
||||
name: v1-webhook
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "../../../components/schemas/_index.yaml#/V1UpdateWebhookRequest"
|
||||
description: The input to the webhook creation
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "../../../components/schemas/_index.yaml#/V1Webhook"
|
||||
description: Successfully updated the webhook
|
||||
"400":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "../../../components/schemas/_index.yaml#/APIErrors"
|
||||
description: A malformed or bad request
|
||||
"403":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "../../../components/schemas/_index.yaml#/APIErrors"
|
||||
description: Forbidden
|
||||
"404":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "../../../components/schemas/_index.yaml#/APIErrors"
|
||||
description: Not found
|
||||
summary: Update a webhook
|
||||
tags:
|
||||
- Webhook
|
||||
|
||||
|
||||
V1WebhookListCreate:
|
||||
get:
|
||||
|
||||
Reference in New Issue
Block a user