@squidcloud/backend
    Preparing search index...

    Function trigger

    Decorator that marks a function as a trigger to a change in a collection. The function will be called each time a change is made to the collection. The function accepts a context object as a parameter. The context object contains information about the change.

    To read more about triggers, see the documentation.

    • Decorator that marks a function as a trigger to a change in a collection. The function will be called each time a change is made to the collection. The function accepts a context object as a parameter. The context object contains information about the change.

      To read more about triggers, see the documentation.

      Parameters

      • id: string

        The ID of the trigger. Should be unique.

      • collectionName: string

        The name of the collection to trigger on.

      • OptionalintegrationId: string

        The ID of the integration to trigger on. If not provided, the built_in_db integration is used.

      Returns ActionMethodDecorator<TriggerAction>

    • Decorator that marks a function as a trigger to a change in a collection. The function will be called each time a change is made to the collection. The function accepts a context object as a parameter. The context object contains information about the change.

      To read more about triggers, see the documentation.

      Parameters

      Returns ActionMethodDecorator<TriggerAction>