Variable: createRuleInputSchema
const createRuleInputSchema: ZodObject<{
conditionLogic: ZodOptional<ZodType<ConditionLogicNode, unknown, $ZodTypeInternals<ConditionLogicNode, unknown>>>;
description: ZodOptional<ZodNullable<ZodString>>;
domain: ZodString;
domainConfig: ZodRecord<ZodString, ZodUnknown>;
effectiveEnd: ZodOptional<ZodNullable<ZodCoercedDate<unknown>>>;
effectiveStart: ZodOptional<ZodCoercedDate<unknown>>;
id: ZodOptional<ZodUUID>;
identifier: ZodString;
module: ZodOptional<ZodNullable<ZodString>>;
name: ZodString;
organizationId: ZodString;
priority: ZodNumber;
rateTierId: ZodOptional<ZodNullable<ZodUUID>>;
ruleEffectiveDate: ZodOptional<ZodNullable<ZodCoercedDate<unknown>>>;
ruleExpirationDate: ZodOptional<ZodNullable<ZodCoercedDate<unknown>>>;
scheduleConditionId: ZodOptional<ZodNullable<ZodUUID>>;
scopes: ZodArray<ZodObject<{
scope_type: ZodString;
scope_value: ZodArray<ZodString>;
}, $strip>>;
status: ZodOptional<ZodEnum<{
active: "active";
archived: "archived";
inactive: "inactive";
}>>;
}, $strip>;Defined in: shared/rules/schemas.ts:16
Inputs accepted by RuleService.create. Top-level fields are camelCase to
match Prisma row shapes; the scopes / conditionLogic JSON blobs preserve
the engine's snake_case interior because they round-trip through the engine
unchanged.
id is optional and exists for migration / seed scenarios where callers
need to preserve a stable UUID (e.g. fixture imports whose downstream
references are keyed by id). Omit it for normal authoring — Postgres
generates a UUID via gen_random_uuid().