Kaizen
Browse modulesRulesrules/serverFunctions

Function: createRuleServices()

function createRuleServices(options: CreateRuleServicesOptions): RuleServices;

Defined in: server/rules/create-rule-services.ts:34

Create ready-to-use rules services.

Resolves the Prisma client from the ambient registry — call initPrismaClient (or registerPrismaClient) on @the-kaizen-labs/taproot/persistence at application startup before using this factory.

Call this per-request (or per-unit-of-work), not once at application startup. getActorId is resolved at construction time to populate audit fields on repository writes; services also call it live for createdBy on new versions, so constructing once per request keeps both paths consistent.

Mirrors createFormServices from forms/server.

Parameters

ParameterType
optionsCreateRuleServicesOptions

Returns

RuleServices

On this page