Sanity Library Reference Docs
    Preparing search index...

    Result of workflows_get_definition — one deployed version's content. definition is the stored (desugared) form with the document envelope stripped — valid input for the validate/deploy tools as-is (their parse accepts stored form; parts of it, e.g. resolved guard idRefs, are NOT valid authoring shape): modify it and redeploy via workflows_deploy_definition to mint the next version.

    interface ProjectedDefinition {
        definition: {
            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;
        };
        name: string;
        version: number;
    }
    Index

    Properties

    definition: {
        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;
    }

    The envelope-stripped definition content.

    name: string

    Definition name.

    version: number

    The deployed version this content came from.