Class: FormStepRepository
Defined in: server/forms/form-step-repository.ts:25
Repository with full CRUD capabilities. Extend this for most repositories that need create, read, update, and delete.
Extends
CrudRepository<PrismaClient,FormSteps,CreateInput,UpdateInput,string,Tx<PrismaClient>>
Constructors
Constructor
new FormStepRepository(prismaClient: PrismaClientLike<Tx<PrismaClient<PrismaClientOptions, never, DefaultArgs>>> & PrismaClient<PrismaClientOptions, never, DefaultArgs>, options?: RepositoryOptions): FormStepRepository;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
FormStepRepository
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-repository.ts:50
Returns
Promise<number>
Overrides
_create()
protected _create(input: CreateInput): Promise<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}>;Defined in: server/forms/form-step-repository.ts:71
Parameters
| Parameter | Type |
|---|---|
input | CreateInput |
Returns
Promise<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}>
Overrides
_exists()
protected _exists(id: string): Promise<boolean>;Defined in: server/forms/form-step-repository.ts:43
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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}
| null>;Defined in: server/forms/form-step-repository.ts:37
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<
| {
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}[];
total: number;
}>;Defined in: server/forms/form-step-repository.ts:54
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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}>;Defined in: server/forms/form-step-repository.ts:98
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}>
Overrides
_softDelete()
protected _softDelete(id: string): Promise<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}>;Defined in: server/forms/form-step-repository.ts:91
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}>;Defined in: server/forms/form-step-repository.ts:80
Parameters
| Parameter | Type |
|---|---|
id | string |
patch | UpdateInput |
Returns
Promise<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}>
Overrides
afterCreate()
protected afterCreate(entity: {
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}, _input: CreateInput): Promise<void>;Defined in: server/persistence/base-repository.ts:316
Parameters
| Parameter | Type |
|---|---|
entity | { createdAt: Date; createdBy: string | null; deletedAt: Date | null; deletedBy: string | null; description: string | null; fields: JsonValue; formSchemaVersionId: string; id: string; key: string; label: string | null; updatedAt: Date; updatedBy: string | null; } |
entity.createdAt | Date |
entity.createdBy | string | null |
entity.deletedAt | Date | null |
entity.deletedBy | string | null |
entity.description | string | null |
entity.fields | JsonValue |
entity.formSchemaVersionId | string |
entity.id | string |
entity.key | string |
entity.label | string | null |
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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}, id: string): Promise<void>;Defined in: server/persistence/base-repository.ts:390
Parameters
| Parameter | Type |
|---|---|
_entity | { createdAt: Date; createdBy: string | null; deletedAt: Date | null; deletedBy: string | null; description: string | null; fields: JsonValue; formSchemaVersionId: string; id: string; key: string; label: string | null; updatedAt: Date; updatedBy: string | null; } |
_entity.createdAt | Date |
_entity.createdBy | string | null |
_entity.deletedAt | Date | null |
_entity.deletedBy | string | null |
_entity.description | string | null |
_entity.fields | JsonValue |
_entity.formSchemaVersionId | string |
_entity.id | string |
_entity.key | string |
_entity.label | string | null |
_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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
},
id: string,
input: Partial<Pick<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}, "description" | "updatedBy" | "label"> & {
fields: {
additionalInfo?: {
body?: string;
title?: string;
};
adoptionStatement?: string;
allowedFonts?: string[];
asset?: {
alt?: string;
fileId?: string;
filename?: string;
mimeType?: string;
url?: string;
};
dataSource?: string;
defaultValue?: | string
| {
from: string;
to: string | null;
};
description?: string;
fields?: {
additionalInfo?: {
body?: ... | ...;
title?: ... | ...;
};
adoptionStatement?: string;
allowedFonts?: string[];
asset?: {
alt?: ... | ...;
fileId?: ... | ...;
filename?: ... | ...;
mimeType?: ... | ...;
url?: ... | ...;
};
dataSource?: string;
defaultValue?: | string
| {
from: string;
to: ... | ...;
};
description?: string;
format?: string;
label: string;
maxDate?: string;
maxFiles?: number;
maxLength?: number;
minDate?: string;
name: string;
options?: (... | ...)[];
placeholder?: string;
prefillFrom?: string;
required: boolean;
showRange?: boolean;
showTime?: boolean;
signatureMode?: "typed" | "drawn";
timezone?: string;
type: | "number"
| "date"
| "file"
| "email"
| "url"
| "select"
| "text"
| "checkbox"
| "textarea"
| "phone"
| "radio-group"
| "multiselect"
| "field-array"
| "image"
| "file-download"
| "section-header"
| "section-unset"
| "signature"
| "signature-adopted";
}[];
format?: string;
label: string;
maxDate?: string;
maxFiles?: number;
maxLength?: number;
maxRows?: number;
minDate?: string;
minRows?: number;
name: string;
options?: (
| string
| {
description?: string;
value: string;
})[];
placeholder?: string;
prefillFrom?: string;
required: boolean;
showRange?: boolean;
showTime?: boolean;
signatureMode?: "typed" | "drawn";
timezone?: string;
type: | "number"
| "date"
| "file"
| "email"
| "url"
| "select"
| "text"
| "checkbox"
| "textarea"
| "phone"
| "radio-group"
| "multiselect"
| "field-array"
| "image"
| "file-download"
| "section-header"
| "section-unset"
| "signature"
| "signature-adopted";
}[];
}>
): Promise<void>;Defined in: server/persistence/base-repository.ts:328
Parameters
| Parameter | Type |
|---|---|
_entity | { createdAt: Date; createdBy: string | null; deletedAt: Date | null; deletedBy: string | null; description: string | null; fields: JsonValue; formSchemaVersionId: string; id: string; key: string; label: string | null; updatedAt: Date; updatedBy: string | null; } |
_entity.createdAt | Date |
_entity.createdBy | string | null |
_entity.deletedAt | Date | null |
_entity.deletedBy | string | null |
_entity.description | string | null |
_entity.fields | JsonValue |
_entity.formSchemaVersionId | string |
_entity.id | string |
_entity.key | string |
_entity.label | string | null |
_entity.updatedAt | Date |
_entity.updatedBy | string | null |
id | string |
input | Partial<Pick<{ createdAt: Date; createdBy: string | null; deletedAt: Date | null; deletedBy: string | null; description: string | null; fields: JsonValue; formSchemaVersionId: string; id: string; key: string; label: string | null; updatedAt: Date; updatedBy: string | null; }, "description" | "updatedBy" | "label"> & { fields: { additionalInfo?: { body?: string; title?: string; }; adoptionStatement?: string; allowedFonts?: string[]; asset?: { alt?: string; fileId?: string; filename?: string; mimeType?: string; url?: string; }; dataSource?: string; defaultValue?: | string | { from: string; to: string | null; }; description?: string; fields?: { additionalInfo?: { body?: ... | ...; title?: ... | ...; }; adoptionStatement?: string; allowedFonts?: string[]; asset?: { alt?: ... | ...; fileId?: ... | ...; filename?: ... | ...; mimeType?: ... | ...; url?: ... | ...; }; dataSource?: string; defaultValue?: | string | { from: string; to: ... | ...; }; description?: string; format?: string; label: string; maxDate?: string; maxFiles?: number; maxLength?: number; minDate?: string; name: string; options?: (... | ...)[]; placeholder?: string; prefillFrom?: string; required: boolean; showRange?: boolean; showTime?: boolean; signatureMode?: "typed" | "drawn"; timezone?: string; type: | "number" | "date" | "file" | "email" | "url" | "select" | "text" | "checkbox" | "textarea" | "phone" | "radio-group" | "multiselect" | "field-array" | "image" | "file-download" | "section-header" | "section-unset" | "signature" | "signature-adopted"; }[]; format?: string; label: string; maxDate?: string; maxFiles?: number; maxLength?: number; maxRows?: number; minDate?: string; minRows?: number; name: string; options?: ( | string | { description?: string; value: string; })[]; placeholder?: string; prefillFrom?: string; required: boolean; showRange?: boolean; showTime?: boolean; signatureMode?: "typed" | "drawn"; timezone?: string; type: | "number" | "date" | "file" | "email" | "url" | "select" | "text" | "checkbox" | "textarea" | "phone" | "radio-group" | "multiselect" | "field-array" | "image" | "file-download" | "section-header" | "section-unset" | "signature" | "signature-adopted"; }[]; }> |
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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}): Promise<void>;Defined in: server/persistence/base-repository.ts:388
Parameters
| Parameter | Type |
|---|---|
_id | string |
_existing | { createdAt: Date; createdBy: string | null; deletedAt: Date | null; deletedBy: string | null; description: string | null; fields: JsonValue; formSchemaVersionId: string; id: string; key: string; label: string | null; updatedAt: Date; updatedBy: string | null; } |
_existing.createdAt | Date |
_existing.createdBy | string | null |
_existing.deletedAt | Date | null |
_existing.deletedBy | string | null |
_existing.description | string | null |
_existing.fields | JsonValue |
_existing.formSchemaVersionId | string |
_existing.id | string |
_existing.key | string |
_existing.label | string | null |
_existing.updatedAt | Date |
_existing.updatedBy | string | null |
Returns
Promise<void>
Inherited from
beforeUpdate()
protected beforeUpdate(
_id: string,
_input: Partial<Pick<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}, "description" | "updatedBy" | "label"> & {
fields: {
additionalInfo?: {
body?: string;
title?: string;
};
adoptionStatement?: string;
allowedFonts?: string[];
asset?: {
alt?: string;
fileId?: string;
filename?: string;
mimeType?: string;
url?: string;
};
dataSource?: string;
defaultValue?: | string
| {
from: string;
to: string | null;
};
description?: string;
fields?: {
additionalInfo?: {
body?: ... | ...;
title?: ... | ...;
};
adoptionStatement?: string;
allowedFonts?: string[];
asset?: {
alt?: ... | ...;
fileId?: ... | ...;
filename?: ... | ...;
mimeType?: ... | ...;
url?: ... | ...;
};
dataSource?: string;
defaultValue?: | string
| {
from: string;
to: ... | ...;
};
description?: string;
format?: string;
label: string;
maxDate?: string;
maxFiles?: number;
maxLength?: number;
minDate?: string;
name: string;
options?: (... | ...)[];
placeholder?: string;
prefillFrom?: string;
required: boolean;
showRange?: boolean;
showTime?: boolean;
signatureMode?: "typed" | "drawn";
timezone?: string;
type: | "number"
| "date"
| "file"
| "email"
| "url"
| "select"
| "text"
| "checkbox"
| "textarea"
| "phone"
| "radio-group"
| "multiselect"
| "field-array"
| "image"
| "file-download"
| "section-header"
| "section-unset"
| "signature"
| "signature-adopted";
}[];
format?: string;
label: string;
maxDate?: string;
maxFiles?: number;
maxLength?: number;
maxRows?: number;
minDate?: string;
minRows?: number;
name: string;
options?: (
| string
| {
description?: string;
value: string;
})[];
placeholder?: string;
prefillFrom?: string;
required: boolean;
showRange?: boolean;
showTime?: boolean;
signatureMode?: "typed" | "drawn";
timezone?: string;
type: | "number"
| "date"
| "file"
| "email"
| "url"
| "select"
| "text"
| "checkbox"
| "textarea"
| "phone"
| "radio-group"
| "multiselect"
| "field-array"
| "image"
| "file-download"
| "section-header"
| "section-unset"
| "signature"
| "signature-adopted";
}[];
}>,
_existing: {
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}
): Promise<void>;Defined in: server/persistence/base-repository.ts:323
Parameters
| Parameter | Type |
|---|---|
_id | string |
_input | Partial<Pick<{ createdAt: Date; createdBy: string | null; deletedAt: Date | null; deletedBy: string | null; description: string | null; fields: JsonValue; formSchemaVersionId: string; id: string; key: string; label: string | null; updatedAt: Date; updatedBy: string | null; }, "description" | "updatedBy" | "label"> & { fields: { additionalInfo?: { body?: string; title?: string; }; adoptionStatement?: string; allowedFonts?: string[]; asset?: { alt?: string; fileId?: string; filename?: string; mimeType?: string; url?: string; }; dataSource?: string; defaultValue?: | string | { from: string; to: string | null; }; description?: string; fields?: { additionalInfo?: { body?: ... | ...; title?: ... | ...; }; adoptionStatement?: string; allowedFonts?: string[]; asset?: { alt?: ... | ...; fileId?: ... | ...; filename?: ... | ...; mimeType?: ... | ...; url?: ... | ...; }; dataSource?: string; defaultValue?: | string | { from: string; to: ... | ...; }; description?: string; format?: string; label: string; maxDate?: string; maxFiles?: number; maxLength?: number; minDate?: string; name: string; options?: (... | ...)[]; placeholder?: string; prefillFrom?: string; required: boolean; showRange?: boolean; showTime?: boolean; signatureMode?: "typed" | "drawn"; timezone?: string; type: | "number" | "date" | "file" | "email" | "url" | "select" | "text" | "checkbox" | "textarea" | "phone" | "radio-group" | "multiselect" | "field-array" | "image" | "file-download" | "section-header" | "section-unset" | "signature" | "signature-adopted"; }[]; format?: string; label: string; maxDate?: string; maxFiles?: number; maxLength?: number; maxRows?: number; minDate?: string; minRows?: number; name: string; options?: ( | string | { description?: string; value: string; })[]; placeholder?: string; prefillFrom?: string; required: boolean; showRange?: boolean; showTime?: boolean; signatureMode?: "typed" | "drawn"; timezone?: string; type: | "number" | "date" | "file" | "email" | "url" | "select" | "text" | "checkbox" | "textarea" | "phone" | "radio-group" | "multiselect" | "field-array" | "image" | "file-download" | "section-header" | "section-unset" | "signature" | "signature-adopted"; }[]; }> |
_existing | { createdAt: Date; createdBy: string | null; deletedAt: Date | null; deletedBy: string | null; description: string | null; fields: JsonValue; formSchemaVersionId: string; id: string; key: string; label: string | null; updatedAt: Date; updatedBy: string | null; } |
_existing.createdAt | Date |
_existing.createdBy | string | null |
_existing.deletedAt | Date | null |
_existing.deletedBy | string | null |
_existing.description | string | null |
_existing.fields | JsonValue |
_existing.formSchemaVersionId | string |
_existing.id | string |
_existing.key | string |
_existing.label | string | null |
_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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
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
findById()
findById(id: string): Promise<
| {
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}
| null>
Inherited from
findByIdOrThrow()
findByIdOrThrow(id: string): Promise<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}[]>;Defined in: server/forms/form-step-repository.ts:104
Parameters
| Parameter | Type |
|---|---|
formSchemaVersionId | string |
Returns
Promise<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}[]>
findByVersionIdAndKey()
findByVersionIdAndKey(formSchemaVersionId: string, key: string): Promise<
| {
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}
| null>;Defined in: server/forms/form-step-repository.ts:111
Parameters
| Parameter | Type |
|---|---|
formSchemaVersionId | string |
key | string |
Returns
Promise<
| {
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}
| null>
findMany()
findMany(pagination: {
page: number;
pageSize: number;
}): Promise<OffsetPaginatedResult<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}>>
Inherited from
hardDelete()
hardDelete(id: string): Promise<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
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-repository.ts:33
Create a not-found error. Override to provide custom error types.
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Error
Overrides
softDelete()
softDelete(id: string): Promise<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
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;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}>
Inherited from
update()
update(id: string, input: Partial<Pick<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}, "description" | "updatedBy" | "label"> & {
fields: {
additionalInfo?: {
body?: string;
title?: string;
};
adoptionStatement?: string;
allowedFonts?: string[];
asset?: {
alt?: string;
fileId?: string;
filename?: string;
mimeType?: string;
url?: string;
};
dataSource?: string;
defaultValue?: | string
| {
from: string;
to: string | null;
};
description?: string;
fields?: {
additionalInfo?: {
body?: ... | ...;
title?: ... | ...;
};
adoptionStatement?: string;
allowedFonts?: string[];
asset?: {
alt?: ... | ...;
fileId?: ... | ...;
filename?: ... | ...;
mimeType?: ... | ...;
url?: ... | ...;
};
dataSource?: string;
defaultValue?: | string
| {
from: string;
to: ... | ...;
};
description?: string;
format?: string;
label: string;
maxDate?: string;
maxFiles?: number;
maxLength?: number;
minDate?: string;
name: string;
options?: (... | ...)[];
placeholder?: string;
prefillFrom?: string;
required: boolean;
showRange?: boolean;
showTime?: boolean;
signatureMode?: "typed" | "drawn";
timezone?: string;
type: | "number"
| "date"
| "file"
| "email"
| "url"
| "select"
| "text"
| "checkbox"
| "textarea"
| "phone"
| "radio-group"
| "multiselect"
| "field-array"
| "image"
| "file-download"
| "section-header"
| "section-unset"
| "signature"
| "signature-adopted";
}[];
format?: string;
label: string;
maxDate?: string;
maxFiles?: number;
maxLength?: number;
maxRows?: number;
minDate?: string;
minRows?: number;
name: string;
options?: (
| string
| {
description?: string;
value: string;
})[];
placeholder?: string;
prefillFrom?: string;
required: boolean;
showRange?: boolean;
showTime?: boolean;
signatureMode?: "typed" | "drawn";
timezone?: string;
type: | "number"
| "date"
| "file"
| "email"
| "url"
| "select"
| "text"
| "checkbox"
| "textarea"
| "phone"
| "radio-group"
| "multiselect"
| "field-array"
| "image"
| "file-download"
| "section-header"
| "section-unset"
| "signature"
| "signature-adopted";
}[];
}>): Promise<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}>;Defined in: server/persistence/base-repository.ts:301
Parameters
| Parameter | Type |
|---|---|
id | string |
input | Partial<Pick<{ createdAt: Date; createdBy: string | null; deletedAt: Date | null; deletedBy: string | null; description: string | null; fields: JsonValue; formSchemaVersionId: string; id: string; key: string; label: string | null; updatedAt: Date; updatedBy: string | null; }, "description" | "updatedBy" | "label"> & { fields: { additionalInfo?: { body?: string; title?: string; }; adoptionStatement?: string; allowedFonts?: string[]; asset?: { alt?: string; fileId?: string; filename?: string; mimeType?: string; url?: string; }; dataSource?: string; defaultValue?: | string | { from: string; to: string | null; }; description?: string; fields?: { additionalInfo?: { body?: ... | ...; title?: ... | ...; }; adoptionStatement?: string; allowedFonts?: string[]; asset?: { alt?: ... | ...; fileId?: ... | ...; filename?: ... | ...; mimeType?: ... | ...; url?: ... | ...; }; dataSource?: string; defaultValue?: | string | { from: string; to: ... | ...; }; description?: string; format?: string; label: string; maxDate?: string; maxFiles?: number; maxLength?: number; minDate?: string; name: string; options?: (... | ...)[]; placeholder?: string; prefillFrom?: string; required: boolean; showRange?: boolean; showTime?: boolean; signatureMode?: "typed" | "drawn"; timezone?: string; type: | "number" | "date" | "file" | "email" | "url" | "select" | "text" | "checkbox" | "textarea" | "phone" | "radio-group" | "multiselect" | "field-array" | "image" | "file-download" | "section-header" | "section-unset" | "signature" | "signature-adopted"; }[]; format?: string; label: string; maxDate?: string; maxFiles?: number; maxLength?: number; maxRows?: number; minDate?: string; minRows?: number; name: string; options?: ( | string | { description?: string; value: string; })[]; placeholder?: string; prefillFrom?: string; required: boolean; showRange?: boolean; showTime?: boolean; signatureMode?: "typed" | "drawn"; timezone?: string; type: | "number" | "date" | "file" | "email" | "url" | "select" | "text" | "checkbox" | "textarea" | "phone" | "radio-group" | "multiselect" | "field-array" | "image" | "file-download" | "section-header" | "section-unset" | "signature" | "signature-adopted"; }[]; }> |
Returns
Promise<{
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
description: string | null;
fields: JsonValue;
formSchemaVersionId: string;
id: string;
key: string;
label: string | null;
updatedAt: Date;
updatedBy: string | null;
}>