Sanity Library Reference Docs
    Preparing search index...
    • Parse one incoming definition at the deploy/diff boundary (caller prefixes the error). Accepts authored content or a fetched definition document — the document envelope is stripped (the inverse of the deploy serialisation, so a fetched document round-trips to unchanged instead of fingerprinting its envelope as content), then the remainder strict-parses against the stored schema: any unknown key anywhere in the tree fails loud.

      Parameters

      • def: Record<string, unknown>
      • caller: string

      Returns {
          description?: string;
          fields?: FieldEntry[];
          groups?: Group[];
          initialStage: string;
          lifecycle?: WorkflowLifecycle;
          name: string;
          predicates?: Record<string, string>;
          roleAliases?: RoleAliases;
          semantics?: Semantic[];
          stages: Stage[];
          start?: StartBlock;
          title: string;
      }