Variable: createConditionInputSchema
const createConditionInputSchema: ZodObject<{
conditionType: ZodString;
config: ZodRecord<ZodString, ZodUnknown>;
description: ZodOptional<ZodNullable<ZodString>>;
domain: ZodString;
id: ZodOptional<ZodUUID>;
identifier: ZodString;
module: ZodOptional<ZodNullable<ZodString>>;
name: ZodOptional<ZodNullable<ZodString>>;
organizationId: ZodString;
}, $strip>;Defined in: shared/rules/schemas.ts:89
id is optional for the same migration/seed reason as
createRuleInputSchema: rule condition_logic.condition_id references
conditions by id, so seeders importing fixtures need a way to preserve
those UUIDs across the service layer.
conditionType is z.string() (not the ConditionType enum) to match
the runtime contract on Condition — custom condition types registered
via matchRules({ customConditions }) must round-trip through the create
path the same way they round-trip through reads. Narrowing here would
make custom-typed conditions fail at the boundary before the engine gets
a chance to dispatch them.