Kaizen
Browse modulesFormsforms/serverClasses

Class: FormSchemaRepository

Defined in: server/forms/form-schema-repository.ts:19

Repository with full CRUD capabilities. Extend this for most repositories that need create, read, update, and delete.

Extends

  • CrudRepository<PrismaClient, FormSchemas, CreateInput, UpdateInput, string, Tx<PrismaClient>>

Constructors

Constructor

new FormSchemaRepository(prismaClient: PrismaClientLike<Tx<PrismaClient<PrismaClientOptions, never, DefaultArgs>>> & PrismaClient<PrismaClientOptions, never, DefaultArgs>, options?: RepositoryOptions): FormSchemaRepository;

Defined in: server/persistence/base-repository.ts:68

Parameters

ParameterType
prismaClientPrismaClientLike<Tx<PrismaClient<PrismaClientOptions, never, DefaultArgs>>> & PrismaClient<PrismaClientOptions, never, DefaultArgs>
optionsRepositoryOptions

Returns

FormSchemaRepository

Inherited from

CrudRepository.constructor

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

CrudRepository.ENTITY_TYPE


logger?

protected readonly optional logger?: Logger;

Defined in: server/persistence/base-repository.ts:64

Inherited from

CrudRepository.logger


prismaClient

protected prismaClient: PrismaClientLike<Tx<PrismaClient<PrismaClientOptions, never, DefaultArgs>>> & PrismaClient<PrismaClientOptions, never, DefaultArgs>;

Defined in: server/persistence/base-repository.ts:69

Inherited from

CrudRepository.prismaClient

Accessors

actorId

Get Signature

get protected actorId(): string | null | undefined;

Defined in: server/persistence/base-repository.ts:76

Returns

string | null | undefined

Inherited from

CrudRepository.actorId


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

CrudRepository.auditCreate


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

CrudRepository.auditDelete


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

CrudRepository.auditUpdate


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 normally
Returns

this

Inherited from

CrudRepository.silent


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

CrudRepository.tx

Methods

_count()

protected _count(): Promise<number>;

Defined in: server/forms/form-schema-repository.ts:44

Returns

Promise<number>

Overrides

CrudRepository._count


_create()

protected _create(input: CreateInput): Promise<{
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}>;

Defined in: server/forms/form-schema-repository.ts:65

Parameters

ParameterType
inputCreateInput

Returns

Promise<{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }>

Overrides

CrudRepository._create


_exists()

protected _exists(id: string): Promise<boolean>;

Defined in: server/forms/form-schema-repository.ts:37

Parameters

ParameterType
idstring

Returns

Promise<boolean>

Overrides

CrudRepository._exists


_findById()

protected _findById(id: string): Promise<
  | {
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}
| null>;

Defined in: server/forms/form-schema-repository.ts:31

Parameters

ParameterType
idstring

Returns

Promise< | { allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; } | null>

Overrides

CrudRepository._findById


_findMany()

protected _findMany(pagination: {
  page: number;
  pageSize: number;
}): Promise<{
  items: {
     allowUserEditing: boolean;
     createdAt: Date;
     createdBy: string | null;
     currentVersionId: string | null;
     deletedAt: Date | null;
     deletedBy: string | null;
     id: string;
     isActive: boolean;
     name: string;
     organizationId: string | null;
     renderMode: string;
     type: string;
     updatedAt: Date;
     updatedBy: string | null;
  }[];
  total: number;
}>;

Defined in: server/forms/form-schema-repository.ts:48

Parameters

ParameterType
pagination{ page: number; pageSize: number; }
pagination.pagenumber
pagination.pageSizenumber

Returns

Promise<{ items: { allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }[]; total: number; }>

Overrides

CrudRepository._findMany


_hardDelete()

protected _hardDelete(id: string): Promise<{
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}>;

Defined in: server/forms/form-schema-repository.ts:98

Parameters

ParameterType
idstring

Returns

Promise<{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }>

Overrides

CrudRepository._hardDelete


_softDelete()

protected _softDelete(id: string): Promise<{
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}>;

Defined in: server/forms/form-schema-repository.ts:91

Parameters

ParameterType
idstring

Returns

Promise<{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }>

Overrides

CrudRepository._softDelete


_update()

protected _update(id: string, patch: UpdateInput): Promise<{
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}>;

Defined in: server/forms/form-schema-repository.ts:71

Parameters

ParameterType
idstring
patchUpdateInput

Returns

Promise<{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }>

Overrides

CrudRepository._update


afterCreate()

protected afterCreate(entity: {
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}, _input: CreateInput): Promise<void>;

Defined in: server/persistence/base-repository.ts:316

Parameters

ParameterType
entity{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }
entity.allowUserEditingboolean
entity.createdAtDate
entity.createdBystring | null
entity.currentVersionIdstring | null
entity.deletedAtDate | null
entity.deletedBystring | null
entity.idstring
entity.isActiveboolean
entity.namestring
entity.organizationIdstring | null
entity.renderModestring
entity.typestring
entity.updatedAtDate
entity.updatedBystring | null
_inputCreateInput

Returns

Promise<void>

Inherited from

CrudRepository.afterCreate


afterDelete()

protected afterDelete(_entity: {
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}, id: string): Promise<void>;

Defined in: server/persistence/base-repository.ts:390

Parameters

ParameterType
_entity{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }
_entity.allowUserEditingboolean
_entity.createdAtDate
_entity.createdBystring | null
_entity.currentVersionIdstring | null
_entity.deletedAtDate | null
_entity.deletedBystring | null
_entity.idstring
_entity.isActiveboolean
_entity.namestring
_entity.organizationIdstring | null
_entity.renderModestring
_entity.typestring
_entity.updatedAtDate
_entity.updatedBystring | null
idstring

Returns

Promise<void>

Inherited from

CrudRepository.afterDelete


afterUpdate()

protected afterUpdate(
   _entity: {
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}, 
   id: string, 
   input: Partial<Pick<{
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}, 
  | "name"
  | "currentVersionId"
  | "isActive"
  | "allowUserEditing"
  | "renderMode">>
): Promise<void>;

Defined in: server/persistence/base-repository.ts:328

Parameters

ParameterType
_entity{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }
_entity.allowUserEditingboolean
_entity.createdAtDate
_entity.createdBystring | null
_entity.currentVersionIdstring | null
_entity.deletedAtDate | null
_entity.deletedBystring | null
_entity.idstring
_entity.isActiveboolean
_entity.namestring
_entity.organizationIdstring | null
_entity.renderModestring
_entity.typestring
_entity.updatedAtDate
_entity.updatedBystring | null
idstring
inputPartial<Pick<{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }, | "name" | "currentVersionId" | "isActive" | "allowUserEditing" | "renderMode">>

Returns

Promise<void>

Inherited from

CrudRepository.afterUpdate


beforeCreate()

protected beforeCreate(_input: CreateInput): Promise<void>;

Defined in: server/persistence/base-repository.ts:315

Parameters

ParameterType
_inputCreateInput

Returns

Promise<void>

Inherited from

CrudRepository.beforeCreate


beforeDelete()

protected beforeDelete(_id: string, _existing: {
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}): Promise<void>;

Defined in: server/persistence/base-repository.ts:388

Parameters

ParameterType
_idstring
_existing{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }
_existing.allowUserEditingboolean
_existing.createdAtDate
_existing.createdBystring | null
_existing.currentVersionIdstring | null
_existing.deletedAtDate | null
_existing.deletedBystring | null
_existing.idstring
_existing.isActiveboolean
_existing.namestring
_existing.organizationIdstring | null
_existing.renderModestring
_existing.typestring
_existing.updatedAtDate
_existing.updatedBystring | null

Returns

Promise<void>

Inherited from

CrudRepository.beforeDelete


beforeUpdate()

protected beforeUpdate(
   _id: string, 
   _input: Partial<Pick<{
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}, 
  | "name"
  | "currentVersionId"
  | "isActive"
  | "allowUserEditing"
  | "renderMode">>, 
   _existing: {
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}
): Promise<void>;

Defined in: server/persistence/base-repository.ts:323

Parameters

ParameterType
_idstring
_inputPartial<Pick<{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }, | "name" | "currentVersionId" | "isActive" | "allowUserEditing" | "renderMode">>
_existing{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }
_existing.allowUserEditingboolean
_existing.createdAtDate
_existing.createdBystring | null
_existing.currentVersionIdstring | null
_existing.deletedAtDate | null
_existing.deletedBystring | null
_existing.idstring
_existing.isActiveboolean
_existing.namestring
_existing.organizationIdstring | null
_existing.renderModestring
_existing.typestring
_existing.updatedAtDate
_existing.updatedBystring | null

Returns

Promise<void>

Inherited from

CrudRepository.beforeUpdate


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

CrudRepository.consumeSilent


count()

count(): Promise<number>;

Defined in: server/persistence/base-repository.ts:191

Returns

Promise<number>

Inherited from

CrudRepository.count


create()

create(input: CreateInput): Promise<{
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}>;

Defined in: server/persistence/base-repository.ts:292

Parameters

ParameterType
inputCreateInput

Returns

Promise<{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }>

Inherited from

CrudRepository.create


exists()

exists(id: string): Promise<boolean>;

Defined in: server/persistence/base-repository.ts:187

Parameters

ParameterType
idstring

Returns

Promise<boolean>

Inherited from

CrudRepository.exists


findActive()

findActive(): Promise<{
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}[]>;

Defined in: server/forms/form-schema-repository.ts:110

Returns

Promise<{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }[]>


findById()

findById(id: string): Promise<
  | {
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}
| null>;

Defined in: server/persistence/base-repository.ts:177

Parameters

ParameterType
idstring

Returns

Promise< | { allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; } | null>

Inherited from

CrudRepository.findById


findByIdOrThrow()

findByIdOrThrow(id: string): Promise<{
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}>;

Defined in: server/persistence/base-repository.ts:181

Parameters

ParameterType
idstring

Returns

Promise<{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }>

Inherited from

CrudRepository.findByIdOrThrow


findByType()

findByType(type: string): Promise<
  | {
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}
| null>;

Defined in: server/forms/form-schema-repository.ts:104

Parameters

ParameterType
typestring

Returns

Promise< | { allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; } | null>


findMany()

findMany(pagination: {
  page: number;
  pageSize: number;
}): Promise<OffsetPaginatedResult<{
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}>>;

Defined in: server/persistence/base-repository.ts:195

Parameters

ParameterType
pagination{ page: number; pageSize: number; }
pagination.pagenumber
pagination.pageSizenumber

Returns

Promise<OffsetPaginatedResult<{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }>>

Inherited from

CrudRepository.findMany


hardDelete()

hardDelete(id: string): Promise<{
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}>;

Defined in: server/persistence/base-repository.ts:377

Parameters

ParameterType
idstring

Returns

Promise<{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }>

Inherited from

CrudRepository.hardDelete


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

ParameterType
_entityIdstring
_actionstring
_metadata?Record<string, unknown>

Returns

Promise<void>

Inherited from

CrudRepository.logActivity


notFoundError()

protected notFoundError(id: string): Error;

Defined in: server/forms/form-schema-repository.ts:27

Create a not-found error. Override to provide custom error types.

Parameters

ParameterType
idstring

Returns

Error

Overrides

CrudRepository.notFoundError


softDelete()

softDelete(id: string): Promise<{
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}>;

Defined in: server/persistence/base-repository.ts:366

Parameters

ParameterType
idstring

Returns

Promise<{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }>

Inherited from

CrudRepository.softDelete


update()

update(id: string, input: Partial<Pick<{
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}, 
  | "name"
  | "currentVersionId"
  | "isActive"
  | "allowUserEditing"
  | "renderMode">>): Promise<{
  allowUserEditing: boolean;
  createdAt: Date;
  createdBy: string | null;
  currentVersionId: string | null;
  deletedAt: Date | null;
  deletedBy: string | null;
  id: string;
  isActive: boolean;
  name: string;
  organizationId: string | null;
  renderMode: string;
  type: string;
  updatedAt: Date;
  updatedBy: string | null;
}>;

Defined in: server/persistence/base-repository.ts:301

Parameters

ParameterType
idstring
inputPartial<Pick<{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }, | "name" | "currentVersionId" | "isActive" | "allowUserEditing" | "renderMode">>

Returns

Promise<{ allowUserEditing: boolean; createdAt: Date; createdBy: string | null; currentVersionId: string | null; deletedAt: Date | null; deletedBy: string | null; id: string; isActive: boolean; name: string; organizationId: string | null; renderMode: string; type: string; updatedAt: Date; updatedBy: string | null; }>

Inherited from

CrudRepository.update

On this page

ExtendsConstructorsConstructorParametersReturnsInherited fromPropertiesENTITY_TYPE?Inherited fromlogger?Inherited fromprismaClientInherited fromAccessorsactorIdGet SignatureReturnsInherited fromauditCreateGet SignatureReturnscreatedByupdatedByInherited fromauditDeleteGet SignatureReturnsdeletedAtdeletedByInherited fromauditUpdateGet SignatureReturnsupdatedByInherited fromsilentGet SignatureExampleReturnsInherited fromtxGet SignatureReturnsInherited fromMethods_count()ReturnsOverrides_create()ParametersReturnsOverrides_exists()ParametersReturnsOverrides_findById()ParametersReturnsOverrides_findMany()ParametersReturnsOverrides_hardDelete()ParametersReturnsOverrides_softDelete()ParametersReturnsOverrides_update()ParametersReturnsOverridesafterCreate()ParametersReturnsInherited fromafterDelete()ParametersReturnsInherited fromafterUpdate()ParametersReturnsInherited frombeforeCreate()ParametersReturnsInherited frombeforeDelete()ParametersReturnsInherited frombeforeUpdate()ParametersReturnsInherited fromconsumeSilent()ReturnsInherited fromcount()ReturnsInherited fromcreate()ParametersReturnsInherited fromexists()ParametersReturnsInherited fromfindActive()ReturnsfindById()ParametersReturnsInherited fromfindByIdOrThrow()ParametersReturnsInherited fromfindByType()ParametersReturnsfindMany()ParametersReturnsInherited fromhardDelete()ParametersReturnsInherited fromlogActivity()ParametersReturnsInherited fromnotFoundError()ParametersReturnsOverridessoftDelete()ParametersReturnsInherited fromupdate()ParametersReturnsInherited from