Class: FormSubmissionRepository
Defined in: server/forms/form-submission-repository.ts:16
Repository with full CRUD capabilities. Extend this for most repositories that need create, read, update, and delete.
Extends
CrudRepository<PrismaClient,FormSubmissions,CreateInput,UpdateInput,string,Tx<PrismaClient>>
Constructors
Constructor
new FormSubmissionRepository(prismaClient: PrismaClientLike<Tx<PrismaClient<PrismaClientOptions, never, DefaultArgs>>> & PrismaClient<PrismaClientOptions, never, DefaultArgs>, options?: RepositoryOptions): FormSubmissionRepository;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
FormSubmissionRepository
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-submission-repository.ts:41
Returns
Promise<number>
Overrides
_create()
protected _create(input: CreateInput): Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>;Defined in: server/forms/form-submission-repository.ts:62
Parameters
| Parameter | Type |
|---|---|
input | CreateInput |
Returns
Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>
Overrides
_exists()
protected _exists(id: string): Promise<boolean>;Defined in: server/forms/form-submission-repository.ts:34
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<boolean>
Overrides
_findById()
protected _findById(id: string): Promise<
| {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}
| null>;Defined in: server/forms/form-submission-repository.ts:28
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<
| {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}
| null>
Overrides
_findMany()
protected _findMany(pagination: {
page: number;
pageSize: number;
}): Promise<{
items: {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}[];
total: number;
}>;Defined in: server/forms/form-submission-repository.ts:45
Parameters
| Parameter | Type |
|---|---|
pagination | { page: number; pageSize: number; } |
pagination.page | number |
pagination.pageSize | number |
Returns
Promise<{
items: {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}[];
total: number;
}>
Overrides
_hardDelete()
protected _hardDelete(id: string): Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>;Defined in: server/forms/form-submission-repository.ts:101
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>
Overrides
_softDelete()
protected _softDelete(id: string): Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>;Defined in: server/forms/form-submission-repository.ts:94
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>
Overrides
_update()
protected _update(id: string, patch: UpdateInput): Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>;Defined in: server/forms/form-submission-repository.ts:74
Parameters
| Parameter | Type |
|---|---|
id | string |
patch | UpdateInput |
Returns
Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>
Overrides
afterCreate()
protected afterCreate(entity: {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}, _input: CreateInput): Promise<void>;Defined in: server/persistence/base-repository.ts:316
Parameters
| Parameter | Type |
|---|---|
entity | { allowUserEditingOverride: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; submittedAt: Date; updatedAt: Date; updatedBy: string | null; userId: string; } |
entity.allowUserEditingOverride | boolean |
entity.createdAt | Date |
entity.createdBy | string | null |
entity.currentVersionId | string | null |
entity.deletedAt | Date | null |
entity.deletedBy | string | null |
entity.id | string |
entity.submittedAt | Date |
entity.updatedAt | Date |
entity.updatedBy | string | null |
entity.userId | string |
_input | CreateInput |
Returns
Promise<void>
Inherited from
afterDelete()
protected afterDelete(_entity: {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}, id: string): Promise<void>;Defined in: server/persistence/base-repository.ts:390
Parameters
| Parameter | Type |
|---|---|
_entity | { allowUserEditingOverride: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; submittedAt: Date; updatedAt: Date; updatedBy: string | null; userId: string; } |
_entity.allowUserEditingOverride | boolean |
_entity.createdAt | Date |
_entity.createdBy | string | null |
_entity.currentVersionId | string | null |
_entity.deletedAt | Date | null |
_entity.deletedBy | string | null |
_entity.id | string |
_entity.submittedAt | Date |
_entity.updatedAt | Date |
_entity.updatedBy | string | null |
_entity.userId | string |
id | string |
Returns
Promise<void>
Inherited from
afterUpdate()
protected afterUpdate(
_entity: {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
},
id: string,
input: Partial<Pick<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}, "currentVersionId" | "allowUserEditingOverride">>
): Promise<void>;Defined in: server/persistence/base-repository.ts:328
Parameters
| Parameter | Type |
|---|---|
_entity | { allowUserEditingOverride: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; submittedAt: Date; updatedAt: Date; updatedBy: string | null; userId: string; } |
_entity.allowUserEditingOverride | boolean |
_entity.createdAt | Date |
_entity.createdBy | string | null |
_entity.currentVersionId | string | null |
_entity.deletedAt | Date | null |
_entity.deletedBy | string | null |
_entity.id | string |
_entity.submittedAt | Date |
_entity.updatedAt | Date |
_entity.updatedBy | string | null |
_entity.userId | string |
id | string |
input | Partial<Pick<{ allowUserEditingOverride: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; submittedAt: Date; updatedAt: Date; updatedBy: string | null; userId: string; }, "currentVersionId" | "allowUserEditingOverride">> |
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: {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}): Promise<void>;Defined in: server/persistence/base-repository.ts:388
Parameters
| Parameter | Type |
|---|---|
_id | string |
_existing | { allowUserEditingOverride: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; submittedAt: Date; updatedAt: Date; updatedBy: string | null; userId: string; } |
_existing.allowUserEditingOverride | boolean |
_existing.createdAt | Date |
_existing.createdBy | string | null |
_existing.currentVersionId | string | null |
_existing.deletedAt | Date | null |
_existing.deletedBy | string | null |
_existing.id | string |
_existing.submittedAt | Date |
_existing.updatedAt | Date |
_existing.updatedBy | string | null |
_existing.userId | string |
Returns
Promise<void>
Inherited from
beforeUpdate()
protected beforeUpdate(
_id: string,
_input: Partial<Pick<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}, "currentVersionId" | "allowUserEditingOverride">>,
_existing: {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}
): Promise<void>;Defined in: server/persistence/base-repository.ts:323
Parameters
| Parameter | Type |
|---|---|
_id | string |
_input | Partial<Pick<{ allowUserEditingOverride: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; submittedAt: Date; updatedAt: Date; updatedBy: string | null; userId: string; }, "currentVersionId" | "allowUserEditingOverride">> |
_existing | { allowUserEditingOverride: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; submittedAt: Date; updatedAt: Date; updatedBy: string | null; userId: string; } |
_existing.allowUserEditingOverride | boolean |
_existing.createdAt | Date |
_existing.createdBy | string | null |
_existing.currentVersionId | string | null |
_existing.deletedAt | Date | null |
_existing.deletedBy | string | null |
_existing.id | string |
_existing.submittedAt | Date |
_existing.updatedAt | Date |
_existing.updatedBy | string | null |
_existing.userId | string |
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<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>;Defined in: server/persistence/base-repository.ts:292
Parameters
| Parameter | Type |
|---|---|
input | CreateInput |
Returns
Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>
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
findByFormSchemaId()
findByFormSchemaId(formSchemaId: string): Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}[]>;Defined in: server/forms/form-submission-repository.ts:114
Parameters
| Parameter | Type |
|---|---|
formSchemaId | string |
Returns
Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}[]>
findById()
findById(id: string): Promise<
| {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}
| null>;Defined in: server/persistence/base-repository.ts:177
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<
| {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}
| null>
Inherited from
findByIdOrThrow()
findByIdOrThrow(id: string): Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>;Defined in: server/persistence/base-repository.ts:181
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>
Inherited from
CrudRepository.findByIdOrThrow
findByUserId()
findByUserId(userId: string): Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}[]>;Defined in: server/forms/form-submission-repository.ts:107
Parameters
| Parameter | Type |
|---|---|
userId | string |
Returns
Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}[]>
findLatestByUserAndFormSchema()
findLatestByUserAndFormSchema(userId: string, formSchemaId: string): Promise<
| {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}
| null>;Defined in: server/forms/form-submission-repository.ts:133
Find the user's most recent submission for the given form schema. Used for cross-version prefill — pairs with the schema's current version to decide whether to pass data through or run shape migration.
Parameters
| Parameter | Type |
|---|---|
userId | string |
formSchemaId | string |
Returns
Promise<
| {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}
| null>
findLatestCompletedForUser()
findLatestCompletedForUser(userId: string, formSchemaId: string): Promise<
| {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}
| null>;Defined in: server/forms/form-submission-repository.ts:179
Returns the user's most recent submission whose current version is
isComplete: true. Drafts are deliberately excluded — they must
never be used as a prefill source for a new draft.
If the versions: { some: ... } join proves slow at scale, denormalize
formSchemaId onto FormSubmissions later. Out of scope for v1.
Parameters
| Parameter | Type |
|---|---|
userId | string |
formSchemaId | string |
Returns
Promise<
| {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}
| null>
findLatestForUser()
findLatestForUser(userId: string, formSchemaId: string): Promise<
| {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}
| null>;Defined in: server/forms/form-submission-repository.ts:157
Returns the user's most recent submission for formSchemaId, regardless
of whether its current version is a draft or complete. Used by
createDraft to decide between resuming an in-flight draft and
starting a fresh one on the existing submission row.
Parameters
| Parameter | Type |
|---|---|
userId | string |
formSchemaId | string |
Returns
Promise<
| {
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}
| null>
findMany()
findMany(pagination: {
page: number;
pageSize: number;
}): Promise<OffsetPaginatedResult<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>>;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<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>>
Inherited from
hardDelete()
hardDelete(id: string): Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>;Defined in: server/persistence/base-repository.ts:377
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>
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-submission-repository.ts:24
Create a not-found error. Override to provide custom error types.
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Error
Overrides
softDelete()
softDelete(id: string): Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>;Defined in: server/persistence/base-repository.ts:366
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>
Inherited from
update()
update(id: string, input: Partial<Pick<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}, "currentVersionId" | "allowUserEditingOverride">>): Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>;Defined in: server/persistence/base-repository.ts:301
Parameters
| Parameter | Type |
|---|---|
id | string |
input | Partial<Pick<{ allowUserEditingOverride: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; submittedAt: Date; updatedAt: Date; updatedBy: string | null; userId: string; }, "currentVersionId" | "allowUserEditingOverride">> |
Returns
Promise<{
allowUserEditingOverride: boolean;
createdAt: Date;
createdBy: string | null;
currentVersionId: string | null;
deletedAt: Date | null;
deletedBy: string | null;
id: string;
submittedAt: Date;
updatedAt: Date;
updatedBy: string | null;
userId: string;
}>