@squidcloud/backend
    Preparing search index...

    Function webhook

    • Decorator that marks a function as a webhook. The function will be called when a webhook is triggered. Once the webhook is created, it will be exposed as a URL with the provided webhook ID with this format: https://<your app Id>.<app region>.squid.cloud/webhooks/<webhook-id>.

      The function accepts a context object as a parameter. The context object contains information about the webhook. The function can return any value that can be serialized to JSON or a WebhookResponse object that can be created using: this.createWebhookResponse(<params>).

      To read more about webhooks, see the documentation.

      Parameters

      • id: string

        The ID of the webhook. Should be unique.

      Returns ActionMethodDecorator<WebhookAction>