Class: FormStepTransitionRepository
Defined in: server/forms/form-step-transition-repository.ts:38
Repository with full CRUD capabilities. Extend this for most repositories that need create, read, update, and delete.
Extends
CrudRepository<PrismaClient,FormStepTransitions,CreateInput,UpdateInput,string,Tx<PrismaClient>>
Constructors
Constructor
new FormStepTransitionRepository(prismaClient: PrismaClientLike<Tx<PrismaClient<PrismaClientOptions, never, DefaultArgs>>> & PrismaClient<PrismaClientOptions, never, DefaultArgs>, options?: RepositoryOptions): FormStepTransitionRepository;Defined in: server/persistence/base-repository.ts:68
Parameters
| Parameter | Type |
|---|---|
prismaClient | PrismaClientLike<Tx<PrismaClient<PrismaClientOptions, never, DefaultArgs>>> & PrismaClient<PrismaClientOptions, never, DefaultArgs> |
options | RepositoryOptions |
Returns
FormStepTransitionRepository
Inherited from
Properties
ENTITY_TYPE?
protected readonly optional ENTITY_TYPE?: string;Defined in: server/persistence/base-repository.ts:61
Set ENTITY_TYPE in child repositories to enable automatic activity
logging. When set, create/update/delete operations auto-log unless
silenced with .silent. Requires an activity model on the consumer's
Prisma schema.
Inherited from
logger?
protected readonly optional logger?: Logger;Defined in: server/persistence/base-repository.ts:64
Inherited from
prismaClient
protected prismaClient: PrismaClientLike<Tx<PrismaClient<PrismaClientOptions, never, DefaultArgs>>> & PrismaClient<PrismaClientOptions, never, DefaultArgs>;Defined in: server/persistence/base-repository.ts:69
Inherited from
Accessors
actorId
Get Signature
get protected actorId(): string | null | undefined;Defined in: server/persistence/base-repository.ts:76
Returns
string | null | undefined
Inherited from
auditCreate
Get Signature
get protected auditCreate(): {
createdBy: string | null | undefined;
updatedBy: string | null | undefined;
};Defined in: server/persistence/base-repository.ts:90
Returns
{
createdBy: string | null | undefined;
updatedBy: string | null | undefined;
}createdBy
createdBy: string | null | undefined = actorId;updatedBy
updatedBy: string | null | undefined = actorId;Inherited from
auditDelete
Get Signature
get protected auditDelete(): {
deletedAt: Date;
deletedBy: string | null | undefined;
};Defined in: server/persistence/base-repository.ts:99
Returns
{
deletedAt: Date;
deletedBy: string | null | undefined;
}deletedAt
deletedAt: Date;deletedBy
deletedBy: string | null | undefined;Inherited from
auditUpdate
Get Signature
get protected auditUpdate(): {
updatedBy: string | null | undefined;
};Defined in: server/persistence/base-repository.ts:95
Returns
{
updatedBy: string | null | undefined;
}updatedBy
updatedBy: string | null | undefined;Inherited from
silent
Get Signature
get silent(): this;Defined in: server/persistence/base-repository.ts:115
Suppress activity logging for the next mutation call. One-shot: the flag is consumed by the next create/update/delete.
Example
await repo.silent.update(id, data); // no activity logged
await repo.update(id, data); // activity logged normallyReturns
this
Inherited from
tx
Get Signature
get protected tx(): TTx;Defined in: server/persistence/base-repository.ts:86
The current Prisma handle: the active transaction if one is running on this async context, otherwise the raw client.
Returns
TTx
Inherited from
Methods
_count()
protected _count(): Promise<number>;Defined in: server/forms/form-step-transition-repository.ts:63
Returns
Promise<number>
Overrides
_create()
protected _create(input: CreateInput): Promise<{
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;
}>;Defined in: server/forms/form-step-transition-repository.ts:84
Parameters
| Parameter | Type |
|---|---|
input | CreateInput |
Returns
Promise<{
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;
}>
Overrides
_exists()
protected _exists(id: string): Promise<boolean>;Defined in: server/forms/form-step-transition-repository.ts:56
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<boolean>
Overrides
_findById()
protected _findById(id: string): Promise<
| {
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;
}
| null>;Defined in: server/forms/form-step-transition-repository.ts:50
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<
| {
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;
}
| null>
Overrides
_findMany()
protected _findMany(pagination: {
page: number;
pageSize: number;
}): Promise<{
items: {
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;
}[];
total: number;
}>;Defined in: server/forms/form-step-transition-repository.ts:67
Parameters
| Parameter | Type |
|---|---|
pagination | { page: number; pageSize: number; } |
pagination.page | number |
pagination.pageSize | number |
Returns
Promise<{
items: {
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;
}[];
total: number;
}>
Overrides
_hardDelete()
protected _hardDelete(id: string): Promise<{
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;
}>;Defined in: server/forms/form-step-transition-repository.ts:124
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
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;
}>
Overrides
_softDelete()
protected _softDelete(id: string): Promise<{
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;
}>;Defined in: server/forms/form-step-transition-repository.ts:117
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
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;
}>
Overrides
_update()
protected _update(id: string, patch: UpdateInput): Promise<{
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;
}>;Defined in: server/forms/form-step-transition-repository.ts:93
Parameters
| Parameter | Type |
|---|---|
id | string |
patch | UpdateInput |
Returns
Promise<{
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;
}>
Overrides
afterCreate()
protected afterCreate(entity: {
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;
}, _input: CreateInput): Promise<void>;Defined in: server/persistence/base-repository.ts:316
Parameters
| Parameter | Type | Description |
|---|---|---|
entity | { 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; } | - |
entity.createdAt | Date | - |
entity.createdBy | string | null | - |
entity.deletedAt | Date | null | - |
entity.deletedBy | string | null | - |
entity.fromStepId | string | - |
entity.id | string | - |
entity.label | string | null | - |
entity.priority | number | - |
entity.ruleId | string | null | Logical authoring pointer — Rules row whose condition_logic gates this edge. Null means unconditional (first-match else branch). |
entity.ruleVersionId | string | null | Pinned immutable rule version at schema-version publish time; drives runtime eval for drafts. |
entity.toStepId | string | - |
entity.updatedAt | Date | - |
entity.updatedBy | string | null | - |
_input | CreateInput | - |
Returns
Promise<void>
Inherited from
afterDelete()
protected afterDelete(_entity: {
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;
}, id: string): Promise<void>;Defined in: server/persistence/base-repository.ts:390
Parameters
| Parameter | Type | Description |
|---|---|---|
_entity | { 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; } | - |
_entity.createdAt | Date | - |
_entity.createdBy | string | null | - |
_entity.deletedAt | Date | null | - |
_entity.deletedBy | string | null | - |
_entity.fromStepId | string | - |
_entity.id | string | - |
_entity.label | string | null | - |
_entity.priority | number | - |
_entity.ruleId | string | null | Logical authoring pointer — Rules row whose condition_logic gates this edge. Null means unconditional (first-match else branch). |
_entity.ruleVersionId | string | null | Pinned immutable rule version at schema-version publish time; drives runtime eval for drafts. |
_entity.toStepId | string | - |
_entity.updatedAt | Date | - |
_entity.updatedBy | string | null | - |
id | string | - |
Returns
Promise<void>
Inherited from
afterUpdate()
protected afterUpdate(
_entity: {
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;
},
id: string,
input: Partial<{
label: string | null;
priority: number;
ruleId: string | null;
ruleVersionId: string | null;
toStepId: string;
updatedBy: string | null;
}>
): Promise<void>;Defined in: server/persistence/base-repository.ts:328
Parameters
| Parameter | Type | Description |
|---|---|---|
_entity | { 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; } | - |
_entity.createdAt | Date | - |
_entity.createdBy | string | null | - |
_entity.deletedAt | Date | null | - |
_entity.deletedBy | string | null | - |
_entity.fromStepId | string | - |
_entity.id | string | - |
_entity.label | string | null | - |
_entity.priority | number | - |
_entity.ruleId | string | null | Logical authoring pointer — Rules row whose condition_logic gates this edge. Null means unconditional (first-match else branch). |
_entity.ruleVersionId | string | null | Pinned immutable rule version at schema-version publish time; drives runtime eval for drafts. |
_entity.toStepId | string | - |
_entity.updatedAt | Date | - |
_entity.updatedBy | string | null | - |
id | string | - |
input | Partial<{ label: string | null; priority: number; ruleId: string | null; ruleVersionId: string | null; toStepId: string; updatedBy: string | null; }> | - |
Returns
Promise<void>
Inherited from
beforeCreate()
protected beforeCreate(_input: CreateInput): Promise<void>;Defined in: server/persistence/base-repository.ts:315
Parameters
| Parameter | Type |
|---|---|
_input | CreateInput |
Returns
Promise<void>
Inherited from
beforeDelete()
protected beforeDelete(_id: string, _existing: {
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;
}): Promise<void>;Defined in: server/persistence/base-repository.ts:388
Parameters
| Parameter | Type | Description |
|---|---|---|
_id | string | - |
_existing | { 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; } | - |
_existing.createdAt | Date | - |
_existing.createdBy | string | null | - |
_existing.deletedAt | Date | null | - |
_existing.deletedBy | string | null | - |
_existing.fromStepId | string | - |
_existing.id | string | - |
_existing.label | string | null | - |
_existing.priority | number | - |
_existing.ruleId | string | null | Logical authoring pointer — Rules row whose condition_logic gates this edge. Null means unconditional (first-match else branch). |
_existing.ruleVersionId | string | null | Pinned immutable rule version at schema-version publish time; drives runtime eval for drafts. |
_existing.toStepId | string | - |
_existing.updatedAt | Date | - |
_existing.updatedBy | string | null | - |
Returns
Promise<void>
Inherited from
beforeUpdate()
protected beforeUpdate(
_id: string,
_input: Partial<{
label: string | null;
priority: number;
ruleId: string | null;
ruleVersionId: string | null;
toStepId: string;
updatedBy: string | null;
}>,
_existing: {
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;
}
): Promise<void>;Defined in: server/persistence/base-repository.ts:323
Parameters
| Parameter | Type | Description |
|---|---|---|
_id | string | - |
_input | Partial<{ label: string | null; priority: number; ruleId: string | null; ruleVersionId: string | null; toStepId: string; updatedBy: string | null; }> | - |
_existing | { 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; } | - |
_existing.createdAt | Date | - |
_existing.createdBy | string | null | - |
_existing.deletedAt | Date | null | - |
_existing.deletedBy | string | null | - |
_existing.fromStepId | string | - |
_existing.id | string | - |
_existing.label | string | null | - |
_existing.priority | number | - |
_existing.ruleId | string | null | Logical authoring pointer — Rules row whose condition_logic gates this edge. Null means unconditional (first-match else branch). |
_existing.ruleVersionId | string | null | Pinned immutable rule version at schema-version publish time; drives runtime eval for drafts. |
_existing.toStepId | string | - |
_existing.updatedAt | Date | - |
_existing.updatedBy | string | null | - |
Returns
Promise<void>
Inherited from
consumeSilent()
protected consumeSilent(): boolean;Defined in: server/persistence/base-repository.ts:128
Consume and reset the silent flag. Called by template methods.
Returns
boolean
Inherited from
count()
count(): Promise<number>;Defined in: server/persistence/base-repository.ts:191
Returns
Promise<number>
Inherited from
create()
create(input: CreateInput): Promise<{
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;
}>;Defined in: server/persistence/base-repository.ts:292
Parameters
| Parameter | Type |
|---|---|
input | CreateInput |
Returns
Promise<{
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;
}>
Inherited from
exists()
exists(id: string): Promise<boolean>;Defined in: server/persistence/base-repository.ts:187
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<boolean>
Inherited from
findByFromStepId()
findByFromStepId(fromStepId: string): Promise<{
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;
}[]>;Defined in: server/forms/form-step-transition-repository.ts:130
Parameters
| Parameter | Type |
|---|---|
fromStepId | string |
Returns
Promise<{
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;
}[]>
findById()
findById(id: string): Promise<
| {
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;
}
| null>;Defined in: server/persistence/base-repository.ts:177
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<
| {
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;
}
| null>
Inherited from
findByIdOrThrow()
findByIdOrThrow(id: string): Promise<{
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;
}>;Defined in: server/persistence/base-repository.ts:181
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
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;
}>
Inherited from
CrudRepository.findByIdOrThrow
findByVersionId()
findByVersionId(formSchemaVersionId: string): Promise<{
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;
}[]>;Defined in: server/forms/form-step-transition-repository.ts:137
Parameters
| Parameter | Type |
|---|---|
formSchemaVersionId | string |
Returns
Promise<{
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;
}[]>
findConditionsWithVersionByIds()
findConditionsWithVersionByIds(ids: string[]): Promise<{
conditionType: string;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
domain: string;
id: string;
identifier: string;
module: string | null;
name: string | null;
organizationId: string;
updatedAt: Date;
updatedBy: string | null;
} & {
currentVersion: | {
changeReason: string | null;
conditionId: string;
config: JsonValue;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
effectiveEnd: Date | null;
effectiveStart: Date;
id: string;
versionNumber: number;
}
| null;
}[]>;Defined in: server/forms/form-step-transition-repository.ts:205
Lookup conditions by id with their current version joined. Returns
the shape condition-evaluator.toEngineCondition expects: a
Conditions row whose currentVersion is either ConditionVersions
or null. The evaluator filters out the null case.
Parameters
| Parameter | Type |
|---|---|
ids | string[] |
Returns
Promise<{
conditionType: string;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
domain: string;
id: string;
identifier: string;
module: string | null;
name: string | null;
organizationId: string;
updatedAt: Date;
updatedBy: string | null;
} & {
currentVersion: | {
changeReason: string | null;
conditionId: string;
config: JsonValue;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
effectiveEnd: Date | null;
effectiveStart: Date;
id: string;
versionNumber: number;
}
| null;
}[]>
findDraftReferencesForRule()
findDraftReferencesForRule(ruleId: string): Promise<{
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;
}[]>;Defined in: server/forms/form-step-transition-repository.ts:154
Returns transitions on draft (unpublished) versions that reference the given rule. Used to block destructive edits to a rule that's still gating an editable draft transition.
Parameters
| Parameter | Type |
|---|---|
ruleId | string |
Returns
Promise<{
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;
}[]>
findMany()
findMany(pagination: {
page: number;
pageSize: number;
}): Promise<OffsetPaginatedResult<{
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;
}>>;Defined in: server/persistence/base-repository.ts:195
Parameters
| Parameter | Type |
|---|---|
pagination | { page: number; pageSize: number; } |
pagination.page | number |
pagination.pageSize | number |
Returns
Promise<OffsetPaginatedResult<{
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;
}>>
Inherited from
findRulesByIds()
findRulesByIds(ruleIds: string[]): Promise<{
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
domain: string;
id: string;
identifier: string;
module: string | null;
name: string;
organizationId: string;
rateTierId: string | null;
scheduleConditionId: string | null;
status: RuleStatus;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
updatedAt: Date;
updatedBy: string | null;
}[]>;Defined in: server/forms/form-step-transition-repository.ts:175
Lookup rules by id. The forms publish flow uses this to validate
transition rule references and to drive pinCurrentRuleVersions.
Lives on this repo so the transaction-scoped this.tx covers the
rules table read too.
Parameters
| Parameter | Type |
|---|---|
ruleIds | string[] |
Returns
Promise<{
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
domain: string;
id: string;
identifier: string;
module: string | null;
name: string;
organizationId: string;
rateTierId: string | null;
scheduleConditionId: string | null;
status: RuleStatus;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
updatedAt: Date;
updatedBy: string | null;
}[]>
findRuleVersionsByIds()
findRuleVersionsByIds(ids: string[]): Promise<{
changeReason: string | null;
conditionLogic: JsonValue;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
domainConfig: JsonValue;
effectiveEnd: Date | null;
effectiveStart: Date;
id: string;
priority: number;
ruleEffectiveDate: Date | null;
ruleExpirationDate: Date | null;
ruleId: string;
scopes: JsonValue;
versionNumber: number;
}[]>;Defined in: server/forms/form-step-transition-repository.ts:190
Lookup pinned rule versions by id. The draft renderer/evaluator
resolves each transition's ruleVersionId to a RuleVersions row
to read condition_logic. Returns an empty array on empty input
so the caller's Promise.all stays flat.
Parameters
| Parameter | Type |
|---|---|
ids | string[] |
Returns
Promise<{
changeReason: string | null;
conditionLogic: JsonValue;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
domainConfig: JsonValue;
effectiveEnd: Date | null;
effectiveStart: Date;
id: string;
priority: number;
ruleEffectiveDate: Date | null;
ruleExpirationDate: Date | null;
ruleId: string;
scopes: JsonValue;
versionNumber: number;
}[]>
hardDelete()
hardDelete(id: string): Promise<{
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;
}>;Defined in: server/persistence/base-repository.ts:377
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
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;
}>
Inherited from
logActivity()
protected logActivity(
_entityId: string,
_action: string,
_metadata?: Record<string, unknown>
): Promise<void>;Defined in: server/persistence/base-repository.ts:140
Log an activity entry.
NOTE: This is not implemented because there's no activity model implemented in taproot yet! https://linear.app/kaizenlabs/issue/ENG-7846/add-activity-log-tables
Parameters
| Parameter | Type |
|---|---|
_entityId | string |
_action | string |
_metadata? | Record<string, unknown> |
Returns
Promise<void>
Inherited from
notFoundError()
protected notFoundError(id: string): Error;Defined in: server/forms/form-step-transition-repository.ts:46
Create a not-found error. Override to provide custom error types.
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Error
Overrides
pinCurrentRuleVersions()
pinCurrentRuleVersions(formSchemaVersionId: string): Promise<void>;Defined in: server/forms/form-step-transition-repository.ts:224
For every transition under formSchemaVersionId that has a non-null
ruleId and null ruleVersionId, pin the rule's currentVersionId
onto ruleVersionId. Called inside the publish transaction so
runtime evaluation of the published form always reads the snapshot,
insulated from subsequent live edits to the rule.
Parameters
| Parameter | Type |
|---|---|
formSchemaVersionId | string |
Returns
Promise<void>
softDelete()
softDelete(id: string): Promise<{
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;
}>;Defined in: server/persistence/base-repository.ts:366
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
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;
}>
Inherited from
update()
update(id: string, input: Partial<{
label: string | null;
priority: number;
ruleId: string | null;
ruleVersionId: string | null;
toStepId: string;
updatedBy: string | null;
}>): Promise<{
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;
}>;Defined in: server/persistence/base-repository.ts:301
Parameters
| Parameter | Type |
|---|---|
id | string |
input | Partial<{ label: string | null; priority: number; ruleId: string | null; ruleVersionId: string | null; toStepId: string; updatedBy: string | null; }> |
Returns
Promise<{
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;
}>