Class: PeripheralDeviceRepository
Defined in: server/peripherals/peripheral-device-repository.ts:57
CRUD repository over peripheral_devices rows. Works in camelCase Prisma
rows; the service layer maps to/from the shared PeripheralDevice shape.
Mirrors RuleCrudRepository.
Extends
CrudRepository<PrismaClient,PeripheralDevices,PeripheralDeviceCreateRow,PeripheralDeviceUpdateRow,string,Tx<PrismaClient>>
Constructors
Constructor
new PeripheralDeviceRepository(prismaClient: PrismaClientLike<Tx<PrismaClient<PrismaClientOptions, never, DefaultArgs>>> & PrismaClient<PrismaClientOptions, never, DefaultArgs>, options?: RepositoryOptions): PeripheralDeviceRepository;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
PeripheralDeviceRepository
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/peripherals/peripheral-device-repository.ts:85
Returns
Promise<number>
Overrides
_create()
protected _create(input: PeripheralDeviceCreateRow): Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>;Defined in: server/peripherals/peripheral-device-repository.ts:106
Parameters
| Parameter | Type |
|---|---|
input | PeripheralDeviceCreateRow |
Returns
Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>
Overrides
_exists()
protected _exists(id: string): Promise<boolean>;Defined in: server/peripherals/peripheral-device-repository.ts:78
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<boolean>
Overrides
_findById()
protected _findById(id: string): Promise<
| {
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}
| null>;Defined in: server/peripherals/peripheral-device-repository.ts:72
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<
| {
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}
| null>
Overrides
_findMany()
protected _findMany(pagination: {
page: number;
pageSize: number;
}): Promise<{
items: {
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}[];
total: number;
}>;Defined in: server/peripherals/peripheral-device-repository.ts:89
Parameters
| Parameter | Type |
|---|---|
pagination | { page: number; pageSize: number; } |
pagination.page | number |
pagination.pageSize | number |
Returns
Promise<{
items: {
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}[];
total: number;
}>
Overrides
_hardDelete()
protected _hardDelete(id: string): Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>;Defined in: server/peripherals/peripheral-device-repository.ts:128
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>
Overrides
_softDelete()
protected _softDelete(id: string): Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>;Defined in: server/peripherals/peripheral-device-repository.ts:121
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>
Overrides
_update()
protected _update(id: string, patch: PeripheralDeviceUpdateRow): Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>;Defined in: server/peripherals/peripheral-device-repository.ts:114
Parameters
| Parameter | Type |
|---|---|
id | string |
patch | PeripheralDeviceUpdateRow |
Returns
Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>
Overrides
afterCreate()
protected afterCreate(entity: {
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}, _input: PeripheralDeviceCreateRow): Promise<void>;Defined in: server/persistence/base-repository.ts:316
Parameters
| Parameter | Type |
|---|---|
entity | { connectionKind: string; createdAt: Date; createdBy: string | null; deletedAt: Date | null; deletedBy: string | null; deviceType: string; drawerPin: number | null; host: string | null; id: string; make: string | null; metadata: JsonValue; model: string | null; name: string; organizationId: string; paperWidthChars: number | null; port: number | null; printerLanguage: string | null; qzPrinterName: string | null; stationId: string | null; status: string; statusUpdatedAt: Date; statusUpdatedBy: string | null; storeId: string | null; updatedAt: Date; updatedBy: string | null; usbProductId: number | null; usbSerialNumber: string | null; usbVendorId: number | null; } |
entity.connectionKind | string |
entity.createdAt | Date |
entity.createdBy | string | null |
entity.deletedAt | Date | null |
entity.deletedBy | string | null |
entity.deviceType | string |
entity.drawerPin | number | null |
entity.host | string | null |
entity.id | string |
entity.make | string | null |
entity.metadata | JsonValue |
entity.model | string | null |
entity.name | string |
entity.organizationId | string |
entity.paperWidthChars | number | null |
entity.port | number | null |
entity.printerLanguage | string | null |
entity.qzPrinterName | string | null |
entity.stationId | string | null |
entity.status | string |
entity.statusUpdatedAt | Date |
entity.statusUpdatedBy | string | null |
entity.storeId | string | null |
entity.updatedAt | Date |
entity.updatedBy | string | null |
entity.usbProductId | number | null |
entity.usbSerialNumber | string | null |
entity.usbVendorId | number | null |
_input | PeripheralDeviceCreateRow |
Returns
Promise<void>
Inherited from
afterDelete()
protected afterDelete(_entity: {
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}, id: string): Promise<void>;Defined in: server/persistence/base-repository.ts:390
Parameters
| Parameter | Type |
|---|---|
_entity | { connectionKind: string; createdAt: Date; createdBy: string | null; deletedAt: Date | null; deletedBy: string | null; deviceType: string; drawerPin: number | null; host: string | null; id: string; make: string | null; metadata: JsonValue; model: string | null; name: string; organizationId: string; paperWidthChars: number | null; port: number | null; printerLanguage: string | null; qzPrinterName: string | null; stationId: string | null; status: string; statusUpdatedAt: Date; statusUpdatedBy: string | null; storeId: string | null; updatedAt: Date; updatedBy: string | null; usbProductId: number | null; usbSerialNumber: string | null; usbVendorId: number | null; } |
_entity.connectionKind | string |
_entity.createdAt | Date |
_entity.createdBy | string | null |
_entity.deletedAt | Date | null |
_entity.deletedBy | string | null |
_entity.deviceType | string |
_entity.drawerPin | number | null |
_entity.host | string | null |
_entity.id | string |
_entity.make | string | null |
_entity.metadata | JsonValue |
_entity.model | string | null |
_entity.name | string |
_entity.organizationId | string |
_entity.paperWidthChars | number | null |
_entity.port | number | null |
_entity.printerLanguage | string | null |
_entity.qzPrinterName | string | null |
_entity.stationId | string | null |
_entity.status | string |
_entity.statusUpdatedAt | Date |
_entity.statusUpdatedBy | string | null |
_entity.storeId | string | null |
_entity.updatedAt | Date |
_entity.updatedBy | string | null |
_entity.usbProductId | number | null |
_entity.usbSerialNumber | string | null |
_entity.usbVendorId | number | null |
id | string |
Returns
Promise<void>
Inherited from
afterUpdate()
protected afterUpdate(
_entity: {
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
},
id: string,
input: PeripheralDeviceUpdateRow
): Promise<void>;Defined in: server/persistence/base-repository.ts:328
Parameters
| Parameter | Type |
|---|---|
_entity | { connectionKind: string; createdAt: Date; createdBy: string | null; deletedAt: Date | null; deletedBy: string | null; deviceType: string; drawerPin: number | null; host: string | null; id: string; make: string | null; metadata: JsonValue; model: string | null; name: string; organizationId: string; paperWidthChars: number | null; port: number | null; printerLanguage: string | null; qzPrinterName: string | null; stationId: string | null; status: string; statusUpdatedAt: Date; statusUpdatedBy: string | null; storeId: string | null; updatedAt: Date; updatedBy: string | null; usbProductId: number | null; usbSerialNumber: string | null; usbVendorId: number | null; } |
_entity.connectionKind | string |
_entity.createdAt | Date |
_entity.createdBy | string | null |
_entity.deletedAt | Date | null |
_entity.deletedBy | string | null |
_entity.deviceType | string |
_entity.drawerPin | number | null |
_entity.host | string | null |
_entity.id | string |
_entity.make | string | null |
_entity.metadata | JsonValue |
_entity.model | string | null |
_entity.name | string |
_entity.organizationId | string |
_entity.paperWidthChars | number | null |
_entity.port | number | null |
_entity.printerLanguage | string | null |
_entity.qzPrinterName | string | null |
_entity.stationId | string | null |
_entity.status | string |
_entity.statusUpdatedAt | Date |
_entity.statusUpdatedBy | string | null |
_entity.storeId | string | null |
_entity.updatedAt | Date |
_entity.updatedBy | string | null |
_entity.usbProductId | number | null |
_entity.usbSerialNumber | string | null |
_entity.usbVendorId | number | null |
id | string |
input | PeripheralDeviceUpdateRow |
Returns
Promise<void>
Inherited from
beforeCreate()
protected beforeCreate(_input: PeripheralDeviceCreateRow): Promise<void>;Defined in: server/persistence/base-repository.ts:315
Parameters
| Parameter | Type |
|---|---|
_input | PeripheralDeviceCreateRow |
Returns
Promise<void>
Inherited from
beforeDelete()
protected beforeDelete(_id: string, _existing: {
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}): Promise<void>;Defined in: server/persistence/base-repository.ts:388
Parameters
| Parameter | Type |
|---|---|
_id | string |
_existing | { connectionKind: string; createdAt: Date; createdBy: string | null; deletedAt: Date | null; deletedBy: string | null; deviceType: string; drawerPin: number | null; host: string | null; id: string; make: string | null; metadata: JsonValue; model: string | null; name: string; organizationId: string; paperWidthChars: number | null; port: number | null; printerLanguage: string | null; qzPrinterName: string | null; stationId: string | null; status: string; statusUpdatedAt: Date; statusUpdatedBy: string | null; storeId: string | null; updatedAt: Date; updatedBy: string | null; usbProductId: number | null; usbSerialNumber: string | null; usbVendorId: number | null; } |
_existing.connectionKind | string |
_existing.createdAt | Date |
_existing.createdBy | string | null |
_existing.deletedAt | Date | null |
_existing.deletedBy | string | null |
_existing.deviceType | string |
_existing.drawerPin | number | null |
_existing.host | string | null |
_existing.id | string |
_existing.make | string | null |
_existing.metadata | JsonValue |
_existing.model | string | null |
_existing.name | string |
_existing.organizationId | string |
_existing.paperWidthChars | number | null |
_existing.port | number | null |
_existing.printerLanguage | string | null |
_existing.qzPrinterName | string | null |
_existing.stationId | string | null |
_existing.status | string |
_existing.statusUpdatedAt | Date |
_existing.statusUpdatedBy | string | null |
_existing.storeId | string | null |
_existing.updatedAt | Date |
_existing.updatedBy | string | null |
_existing.usbProductId | number | null |
_existing.usbSerialNumber | string | null |
_existing.usbVendorId | number | null |
Returns
Promise<void>
Inherited from
beforeUpdate()
protected beforeUpdate(
_id: string,
_input: PeripheralDeviceUpdateRow,
_existing: {
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}
): Promise<void>;Defined in: server/persistence/base-repository.ts:323
Parameters
| Parameter | Type |
|---|---|
_id | string |
_input | PeripheralDeviceUpdateRow |
_existing | { connectionKind: string; createdAt: Date; createdBy: string | null; deletedAt: Date | null; deletedBy: string | null; deviceType: string; drawerPin: number | null; host: string | null; id: string; make: string | null; metadata: JsonValue; model: string | null; name: string; organizationId: string; paperWidthChars: number | null; port: number | null; printerLanguage: string | null; qzPrinterName: string | null; stationId: string | null; status: string; statusUpdatedAt: Date; statusUpdatedBy: string | null; storeId: string | null; updatedAt: Date; updatedBy: string | null; usbProductId: number | null; usbSerialNumber: string | null; usbVendorId: number | null; } |
_existing.connectionKind | string |
_existing.createdAt | Date |
_existing.createdBy | string | null |
_existing.deletedAt | Date | null |
_existing.deletedBy | string | null |
_existing.deviceType | string |
_existing.drawerPin | number | null |
_existing.host | string | null |
_existing.id | string |
_existing.make | string | null |
_existing.metadata | JsonValue |
_existing.model | string | null |
_existing.name | string |
_existing.organizationId | string |
_existing.paperWidthChars | number | null |
_existing.port | number | null |
_existing.printerLanguage | string | null |
_existing.qzPrinterName | string | null |
_existing.stationId | string | null |
_existing.status | string |
_existing.statusUpdatedAt | Date |
_existing.statusUpdatedBy | string | null |
_existing.storeId | string | null |
_existing.updatedAt | Date |
_existing.updatedBy | string | null |
_existing.usbProductId | number | null |
_existing.usbSerialNumber | string | null |
_existing.usbVendorId | number | 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: PeripheralDeviceCreateRow): Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>;Defined in: server/persistence/base-repository.ts:292
Parameters
| Parameter | Type |
|---|---|
input | PeripheralDeviceCreateRow |
Returns
Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | 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
findActiveForStation()
findActiveForStation(organizationId: string, scope?: {
deviceType?: string;
stationId?: string;
storeId?: string;
}): Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}[]>;Defined in: server/peripherals/peripheral-device-repository.ts:164
Active devices visible AT a station. The station is the primary axis and
is ALWAYS constrained: an omitted stationId means "station-agnostic"
(matches only rows with stationId null), so a bare findActiveForStation
returns org-wide devices — never every station's devices. A provided
stationId also matches station-null (org-wide) rows.
The store is a secondary filter applied ONLY when provided — querying by
stationId alone does NOT require storeId to be null, so a device
pinned to both a store and that station still appears (unlike a naive
"both default to null" filter, which hid it).
Parameters
| Parameter | Type |
|---|---|
organizationId | string |
scope | { deviceType?: string; stationId?: string; storeId?: string; } |
scope.deviceType? | string |
scope.stationId? | string |
scope.storeId? | string |
Returns
Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}[]>
findById()
findById(id: string): Promise<
| {
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}
| null>;Defined in: server/persistence/base-repository.ts:177
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<
| {
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}
| null>
Inherited from
findByIdOrThrow()
findByIdOrThrow(id: string): Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>;Defined in: server/persistence/base-repository.ts:181
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>
Inherited from
CrudRepository.findByIdOrThrow
findByOrg()
findByOrg(organizationId: string, filter?: PeripheralDeviceFilter): Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}[]>;Defined in: server/peripherals/peripheral-device-repository.ts:133
Non-deleted devices for an organization, optionally narrowed.
Parameters
| Parameter | Type |
|---|---|
organizationId | string |
filter | PeripheralDeviceFilter |
Returns
Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}[]>
findMany()
findMany(pagination: {
page: number;
pageSize: number;
}): Promise<OffsetPaginatedResult<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | 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<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>>
Inherited from
hardDelete()
hardDelete(id: string): Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>;Defined in: server/persistence/base-repository.ts:377
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | 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/peripherals/peripheral-device-repository.ts:65
Create a not-found error. Override to provide custom error types.
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Error
Overrides
softDelete()
softDelete(id: string): Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>;Defined in: server/persistence/base-repository.ts:366
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>
Inherited from
update()
update(id: string, input: PeripheralDeviceUpdateRow): Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>;Defined in: server/persistence/base-repository.ts:301
Parameters
| Parameter | Type |
|---|---|
id | string |
input | PeripheralDeviceUpdateRow |
Returns
Promise<{
connectionKind: string;
createdAt: Date;
createdBy: string | null;
deletedAt: Date | null;
deletedBy: string | null;
deviceType: string;
drawerPin: number | null;
host: string | null;
id: string;
make: string | null;
metadata: JsonValue;
model: string | null;
name: string;
organizationId: string;
paperWidthChars: number | null;
port: number | null;
printerLanguage: string | null;
qzPrinterName: string | null;
stationId: string | null;
status: string;
statusUpdatedAt: Date;
statusUpdatedBy: string | null;
storeId: string | null;
updatedAt: Date;
updatedBy: string | null;
usbProductId: number | null;
usbSerialNumber: string | null;
usbVendorId: number | null;
}>