@squidcloud/backend
    Preparing search index...

    Interface TriggerRequest<T>

    The context provided to a trigger function.

    interface TriggerRequest<T extends DocumentData = any> {
        collectionName: string;
        docAfter?: T;
        docBefore?: T;
        docId: DocIdOrDocIdObj;
        integrationId: string;
        mutationType: "delete" | "insert" | "update";
        squidDocId: string;
    }

    Type Parameters

    • T extends DocumentData = any
    Index

    Properties

    collectionName: string

    The name of the collection affected by the trigger.

    docAfter?: T

    The document state after the mutation, if available.

    docBefore?: T

    The document state before the mutation, if available.

    docId: DocIdOrDocIdObj

    The document ID or object representing the affected document.

    integrationId: string

    The ID of the integration associated with the trigger.

    mutationType: "delete" | "insert" | "update"

    The type of mutation that triggered the action.

    squidDocId: string

    @deprecated. Use docId/collectionName/integrationId directly.