Kaizen
Browse modulesPeripheralsperipherals/serverClasses

Class: PeripheralRepositories

Defined in: server/peripherals/peripheral-repositories.ts:23

Holds the peripherals repositories and exposes a transaction() entry point. Uses the ambient Prisma client registered via registerPrismaClient / initPrismaClient on @the-kaizen-labs/taproot/persistence. Mirrors RuleRepositories.

Constructors

Constructor

new PeripheralRepositories(options?: PeripheralRepositoriesOptions): PeripheralRepositories;

Defined in: server/peripherals/peripheral-repositories.ts:28

Parameters

ParameterType
optionsPeripheralRepositoriesOptions

Returns

PeripheralRepositories

Properties

devices

readonly devices: PeripheralDeviceRepository;

Defined in: server/peripherals/peripheral-repositories.ts:26

Methods

transaction()

transaction<T>(fn: (repos: PeripheralRepositories) => Promise<T>): Promise<T>;

Defined in: server/peripherals/peripheral-repositories.ts:34

Type Parameters

Type Parameter
T

Parameters

ParameterType
fn(repos: PeripheralRepositories) => Promise<T>

Returns

Promise<T>

On this page