Kaizen
Browse modulesFormsforms/serverFunctions

Function: toFormStepTransitionDto()

function toFormStepTransitionDto(row: {
  createdAt: Date;
  createdBy: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  fromStepId: string;
  id: string;
  label: string | null;
  priority: number;
  ruleId: string | null;
  ruleVersionId: string | null;
  toStepId: string;
  updatedAt: Date;
  updatedBy: string | null;
}): {
  fromStepId: string;
  id: string;
  label: string | null;
  priority: number;
  ruleId: string | null;
  ruleVersionId: string | null;
  toStepId: string;
};

Defined in: server/forms/transitions-dto.ts:17

Project a Prisma FormStepTransitions row onto the canonical FormStepTransition DTO. A 1:1 field copy — no Json widening is needed because this row has no JSON columns — kept as a function so callers route everything through a single boundary even if the row shape ever grows.

Lives in the server lane because the function signature references @prisma/client; the shared FormStepTransition shape it produces is the isomorphic DTO consumers (DAG walkers, validators) import from ../../shared/forms.

Parameters

ParameterTypeDescription
row{ createdAt: Date; createdBy: string | null; deletedAt: Date | null; deletedBy: string | null; fromStepId: string; id: string; label: string | null; priority: number; ruleId: string | null; ruleVersionId: string | null; toStepId: string; updatedAt: Date; updatedBy: string | null; }-
row.createdAtDate-
row.createdBystring | null-
row.deletedAtDate | null-
row.deletedBystring | null-
row.fromStepIdstring-
row.idstring-
row.labelstring | null-
row.prioritynumber-
row.ruleIdstring | nullLogical authoring pointer — Rules row whose condition_logic gates this edge. Null means unconditional (first-match else branch).
row.ruleVersionIdstring | nullPinned immutable rule version at schema-version publish time; drives runtime eval for drafts.
row.toStepIdstring-
row.updatedAtDate-
row.updatedBystring | null-

Returns

fromStepId

fromStepId: string;

id

id: string;

label

label: string | null;

priority

priority: number;

ruleId

ruleId: string | null;

Authoring pointer: Rules row whose condition_logic gates this edge.

ruleVersionId

ruleVersionId: string | null;

Pinned at schema-version publish time; drives runtime evaluation.

toStepId

toStepId: string;

On this page