orm-admin
Installation
SKILL.md
orm-admin
ORM client for the admin API — provides typed CRUD operations for 37 tables and 15 custom operations
Usage
// Import the ORM client
import { db } from './orm';
// Available models: orgGetManagersRecord, orgGetSubordinatesRecord, appPermission, orgPermission, appLevelRequirement, orgMember, appPermissionDefault, orgPermissionDefault, ...
db.<model>.findMany({ select: { id: true } }).execute()
db.<model>.findOne({ id: '<UUID>', select: { id: true } }).execute()
db.<model>.create({ data: { ... }, select: { id: true } }).execute()
db.<model>.update({ where: { id: '<UUID>' }, data: { ... }, select: { id: true } }).execute()
db.<model>.delete({ where: { id: '<UUID>' } }).execute()