Body, Mind & Soul — API Reference
    Preparing search index...

    Function validateImportedTrigger

    • Validate and normalize a parsed JSON payload (single trigger object, or array of trigger objects) pasted back from an external LLM into this system's live trigger shape. Pure — does not touch any document. All-or-nothing: if any entry in the batch fails validation, returns valid:false with every error found and no triggers.

      Parameters

      • raw: object | object[]

        Already-JSON.parse'd payload

      • consumerType: string

        Key in TRIGGER_CONSUMER_REGISTRY

      Returns {
          errors: { field: string; index: number; message: string }[];
          triggers: object[];
          valid: boolean;
      }