API Routers Reference
57 tRPC routers are registered in packages/api/src/router.ts, available at http://localhost:3000/trpc. The per-procedure tables below cover the 35 core business routers; the remaining 22 registered routers are listed under Additional registered routers.
Authentication
auth
| Procedure | Type | Auth | Description |
|---|---|---|---|
login | mutation | Public | Login with email/password |
register | mutation | Public | Register new user + organization |
refreshToken | mutation | Public | Refresh access token |
me | query | Protected | Get current user profile |
logout | mutation | Protected | Invalidate tokens |
Employee Management
employee
| Procedure | Type | Auth | Description |
|---|---|---|---|
getEmployees | query | Protected | List employees with filters (search, status, team) |
getEmployee | query | Protected | Get single employee by ID |
create | mutation | Protected | Create new employee |
updateEmployee | mutation | Protected | Update employee fields |
uploadProfilePicture | mutation | Protected | Upload profile image (base64) |
team
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List teams with filters |
create | mutation | Protected | Create team |
update | mutation | Protected | Update team |
delete | mutation | Protected | Soft delete team |
getComposition | query | Protected | Get team members |
addMember | mutation | Protected | Add employee to team |
removeMember | mutation | Protected | Remove member from team |
organization
| Procedure | Type | Auth | Description |
|---|---|---|---|
get | query | Protected | Get organization details |
update | mutation | Admin | Update organization settings |
Payroll
payroll
| Procedure | Type | Auth | Description |
|---|---|---|---|
generateForPeriod | mutation | Protected | Generate payroll records for all employees in a period |
list | query | Protected | List payroll records (year, month, employee filters) |
approve | mutation | Protected | Approve payroll for payment |
processPayment | mutation | Protected | Mark payroll as paid |
validate | query | Protected | Validate payroll data before confirmation |
confirm | mutation | Protected | Confirm payroll with frozen snapshot |
cancelConfirm | mutation | Protected | Cancel confirmed payroll, revert to draft |
adjustmentCheck | query | Protected | Check for post-confirm adjustments |
summary | query | Protected | Aggregated payroll summary for period |
exportEcount | query | Protected | Export payroll to eCount ERP format |
createTaxBracket | mutation | Protected | Create tax bracket configuration |
getActiveTaxBrackets | query | Protected | Get active tax bracket configs for year |
salary-grade
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List salary grades by category |
create | mutation | Protected | Create salary grade |
update | mutation | Protected | Update grade amounts |
allowance-record
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List allowances with type/status/period filters |
create | mutation | Protected | Create allowance record |
get | query | Protected | Get single allowance record with detail |
update | mutation | Protected | Update allowance |
delete | mutation | Protected | Soft delete allowance record |
approve | mutation | Protected | Bulk approve allowances |
getSourceDetail | query | Protected | Get source module detail for auto-generated records |
deduction-record
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List deductions by period |
create | mutation | Protected | Create deduction |
update | mutation | Protected | Update deduction |
item-code
| Procedure | Type | Auth | Description |
|---|---|---|---|
listAllowanceCodes | query | Protected | List allowance item codes |
createAllowanceCode | mutation | Protected | Create allowance item code (max 4 chars) |
bulkCreateAllowanceCodes | mutation | Protected | Bulk create allowance codes (skip existing) |
updateAllowanceCode | mutation | Protected | Update allowance code |
deleteAllowanceCode | mutation | Protected | Soft delete allowance code |
listDeductionCodes | query | Protected | List deduction item codes |
createDeductionCode | mutation | Protected | Create deduction item code |
bulkCreateDeductionCodes | mutation | Protected | Bulk create deduction codes |
updateDeductionCode | mutation | Protected | Update deduction code |
deleteDeductionCode | mutation | Protected | Soft delete deduction code |
payroll-cell-memo
| Procedure | Type | Auth | Description |
|---|---|---|---|
create | mutation | Protected | Create cell memo for a payroll column |
resolve | mutation | Protected | Mark memo as resolved |
listForPeriod | query | Protected | List open memos for a year/month |
history | query | Protected | Query memo history with filters (year, month, employee, column, status) |
Time & Attendance
attendance
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List attendance records |
quickCheckIn | mutation | Protected | Clock in (current time + GPS) |
quickCheckOut | mutation | Protected | Clock out |
getTodayStatus | query | Protected | Get today's check-in status |
getWorkHoursSummary | query | Protected | Weekly hours summary (52h compliance) |
shift
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List all shift definitions |
create | mutation | Protected | Create shift with code, time range, differential rates |
update | mutation | Protected | Update shift fields (unique code check) |
delete | mutation | Protected | Soft delete shift |
overtime-record
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List overtime records |
create | mutation | Protected | Create overtime record |
update | mutation | Protected | Update overtime |
request | mutation | Protected | Employee overtime request |
approve | mutation | Protected | Approve overtime |
leave-request
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List leave requests |
request | mutation | Protected | Submit leave request |
cancel | mutation | Protected | Cancel pending request |
approve | mutation | Protected | Approve leave request |
reject | mutation | Protected | Reject with reason |
Compliance & Benefits
year-end-settlement
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List settlements by year |
create | mutation | Protected | Create settlement record |
update | mutation | Protected | Update settlement |
resignation-record
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List resignation records with filters |
get | query | Protected | Get single resignation record |
create | mutation | Protected | Create resignation record |
update | mutation | Protected | Update resignation details |
delete | mutation | Protected | Soft delete resignation |
history | query | Protected | Get resignation history for employee |
simulateSettlement | mutation | Protected | Preview settlement calculations without saving |
calculateSettlement | mutation | Protected | Execute settlement and create deduction records |
cancelSettlement | mutation | Protected | Cancel an ongoing settlement |
education-subsidy
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List education subsidies |
get | query | Protected | Get single subsidy record |
create | mutation | Protected | Create subsidy record |
update | mutation | Protected | Update subsidy |
delete | mutation | Protected | Soft delete subsidy |
history | query | Protected | Get subsidy history for employee |
approve | mutation | Protected | Approve subsidy records |
fixed-incentive
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List incentives with filters (employee, status, category, period) |
get | query | Protected | Get single incentive by ID |
create | mutation | Protected | Create fixed incentive with append-only versioning |
update | mutation | Protected | Update incentive (content changes create new version) |
delete | mutation | Protected | Soft delete incentive |
approve | mutation | Protected | Bulk approve incentives |
history | query | Protected | Get version history by chainId |
grade-promotion
| Procedure | Type | Auth | Description |
|---|---|---|---|
detect | mutation | Protected | Auto-detect eligible employees for grade promotion (hire-anniversary or fiscal-year mode) |
list | query | Protected | List pending/approved/rejected/applied promotion requests with filters |
approve | mutation | Protected | Approve promotion(s), updates contract with new grade, notifies employee |
reject | mutation | Protected | Reject promotion with reason |
getSettings | query | Protected | Get organization grade promotion mode (hire_date, fiscal_year, disabled) |
updateSettings | mutation | Protected | Update promotion mode and trigger month |
General Affairs
general-affairs
Nested router with sub-routers for trainings, tasks, and notices.
| Procedure | Type | Auth | Description |
|---|---|---|---|
dashboard | query | Protected | Aggregated counts for trainings, tasks, notices |
general-affairs.training
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List mandatory trainings |
get | query | Protected | Get single training |
create | mutation | Protected | Create mandatory training |
update | mutation | Protected | Update training |
delete | mutation | Protected | Soft delete training |
completions | query | Protected | List training completions |
addCompletion | mutation | Protected | Record training completion |
updateCompletion | mutation | Protected | Update completion record |
dashboard | query | Protected | Training compliance dashboard |
general-affairs.task
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List recurring tasks |
get | query | Protected | Get task with checklist items |
create | mutation | Protected | Create recurring task |
update | mutation | Protected | Update task |
delete | mutation | Protected | Soft delete task |
executions | query | Protected | List task executions |
createExecution | mutation | Protected | Create execution record |
updateExecution | mutation | Protected | Update execution status |
general-affairs.notice
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List notices (admin) |
get | query | Protected | Get single notice |
create | mutation | Protected | Create notice |
update | mutation | Protected | Update notice |
delete | mutation | Protected | Soft delete notice |
publish | mutation | Protected | Publish notice |
listPublished | query | Protected | List published notices (employee-facing) |
acknowledge | mutation | Protected | Acknowledge notice |
getUnacknowledgedEmployees | query | Protected | List employees who haven't acknowledged |
unreadCount | query | Protected | Count unread notices for current user |
Nurse Scheduling
nurse-scheduler
| Procedure | Type | Auth | Description |
|---|---|---|---|
listSchedules | query | Protected | List schedules by ward + period |
getSchedule | query | Protected | Get schedule with entries |
createSchedule | mutation | Manager | Create new draft schedule |
generateSchedule | mutation | Manager | AI-generate shift assignments |
updateEntry | mutation | Manager | Update single schedule cell |
confirmSchedule | mutation | Manager | Lock schedule from editing |
publishSchedule | mutation | Manager | Make schedule visible to nurses |
getProfile | query | Protected | Get nurse profile |
listProfiles | query | Manager | List nurse profiles by ward |
createProfile | mutation | Manager | Register nurse profile |
deleteProfile | mutation | Manager | Remove nurse profile |
getMyPreference | query | Protected | Get own preferences |
createPreference | mutation | Protected | Create preference for period |
updatePreference | mutation | Protected | Update preference |
submitPreference | mutation | Protected | Submit preference for review |
requestWorkTypeChange | mutation | Protected | Request work type change |
cancelWorkTypeChange | mutation | Protected | Cancel pending change request |
listWorkTypeChanges | query | Protected | List change request history |
Team Management
team-manager
| Procedure | Type | Auth | Description |
|---|---|---|---|
dashboard | query | Team Leader | Get pending counts |
myTeams | query | Team Leader | List managed teams |
teamMembers | query | Team Leader | List team members |
listLeaveRequests | query | Team Leader | List team leave requests |
approveLeaveRequests | mutation | Team Leader | Bulk approve leaves |
rejectLeaveRequests | mutation | Team Leader | Bulk reject with reason |
listOvertime | query | Team Leader | List team overtime |
approveOvertime | mutation | Team Leader | Bulk approve overtime |
rejectOvertime | mutation | Team Leader | Bulk reject with reason |
listIncentives | query | Team Leader | List team incentives |
createIncentive | mutation | Team Leader | Create incentive for team member |
approveIncentives | mutation | Team Leader | Bulk approve incentives |
Module Registry
module-registry
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List all source modules with metadata, calculator status, and config counts |
Storage
storage
| Procedure | Type | Auth | Description |
|---|---|---|---|
getUploadUrl | mutation | Protected | Get presigned upload URL (profile, document, message) |
getDownloadUrl | query | Protected | Get presigned download URL |
Communications
conversation
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List user's conversations |
create | mutation | Protected | Create direct/group/channel conversation |
message
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List messages in conversation |
send | mutation | Protected | Send message |
markRead | mutation | Protected | Mark conversation as read |
document
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List documents |
upload | mutation | Protected | Upload document |
notification
| Procedure | Type | Auth | Description |
|---|---|---|---|
getSettings | query | Protected | Get notification preferences as { [eventType]: { [channel]: enabled } } |
updateSettings | mutation | Protected | Create/update preference for eventType + channel |
inboxList | query | Protected | Paginated IN_APP notifications with type/isRead filters |
inboxUnreadCount | query | Protected | Count unread IN_APP notifications |
inboxMarkRead | mutation | Protected | Mark single notification as read |
inboxMarkAllRead | mutation | Protected | Mark all unread notifications as read |
inboxDismiss | mutation | Protected | Dismiss notification from action items |
actionItems | query | Protected | List pending approval notifications (undismissed, with reference) |
muteList | query | Protected | List all mute settings for current user |
muteCreate | mutation | Protected | Create mute (by employee, team, event type, or all) |
muteDelete | mutation | Protected | Delete mute setting |
device-token
| Procedure | Type | Auth | Description |
|---|---|---|---|
register | mutation | Protected | Register push notification token (iOS/Android/Web) |
unregister | mutation | Protected | Deactivate token on logout |
Document Templates
document-template
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List document templates for organization |
get | query | Protected | Get single template by ID |
create | mutation | Protected | Create template (unique code per org) |
update | mutation | Protected | Update template fields |
delete | mutation | Protected | Soft delete template |
variables | query | Protected | List available template variables (24 predefined) |
preview | query | Protected | Generate full HTML preview with variable substitution and org seal |
SECOM Integration
secom-event
| Procedure | Type | Auth | Description |
|---|---|---|---|
ingestEvents | mutation | Protected | Accept raw fingerprint scan events from SECOM devices |
processPending | mutation | Protected | Process pending events → create/update Attendance records |
listEvents | query | Protected | List events with status/employeeNumber filters |
getEvent | query | Protected | Get single event with employee and attendance relations |
Employee Certification
employee-certification
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Protected | List certifications with filters (employeeId, type, isActive) |
summary | query | Protected | Count-by-type summary for compliance audits (공단 관리) |
create | mutation | Protected | Add employee certification |
update | mutation | Protected | Update certification fields |
delete | mutation | Protected | Soft delete certification |
export | mutation | Protected | Export certifications to Excel (공단 검사용) |
Inventory Management
inventory
| Procedure | Type | Auth | Description |
|---|---|---|---|
listCategories | query | Protected | List inventory categories with item counts |
getCategory | query | Protected | Get single category with items |
createCategory | mutation | Protected | Create inventory category (unique code) |
updateCategory | mutation | Protected | Update category fields |
deleteCategory | mutation | Protected | Soft delete category |
listItems | query | Protected | List items with filters (category, search, active, expiring, refund) |
getItem | query | Protected | Get single inventory item |
createItem | mutation | Protected | Create inventory item |
updateItem | mutation | Protected | Update item fields |
deleteItem | mutation | Protected | Soft delete item |
adjustQuantity | mutation | Protected | Adjust item quantity with reason tracking |
markRefund | mutation | Protected | Flag item as refund candidate |
getExpirationAlerts | query | Protected | Get items expiring within configurable days |
getDashboardSummary | query | Protected | Inventory health metrics (low stock, expiry, refunds) |
Management Dashboard
management-dashboard
| Procedure | Type | Auth | Description |
|---|---|---|---|
laborCostByTeam | query | Protected | Aggregated payroll by team (grossPay, deductions, netPay, headcount) |
dailyLaborCost | query | Protected | Daily payroll snapshots by team for current month |
incentiveSummary | query | Protected | Incentive totals by category and status |
staffingOverview | query | Protected | Nurse/staff counts by ward and skill set |
Role & Permission
role
| Procedure | Type | Auth | Description |
|---|---|---|---|
list | query | Admin | List roles with permissions |
create | mutation | Admin | Create role |
update | mutation | Admin | Update role |
delete | mutation | Admin | Delete non-system role |
listPermissions | query | Admin | List all available permissions |
updatePermissions | mutation | Admin | Set role's permission assignments |
Additional registered routers
Registered in appRouter (packages/api/src/router.ts) but not yet expanded into per-procedure tables above. Router key → domain:
| Router key | Source module | Domain |
|---|---|---|
account | account.router.ts | Account layer — 통합 로그인 회원, owner-scoped guards |
platform | platform.router.ts | Platform/provisioning administration |
ai | ai.router.ts | Claude AI integration — conversations, tool loop, embeddings |
invite | invite.router.ts | Member invitations |
inquiry | inquiry.router.ts | Landing / contact inquiries |
signup | signup.router.ts | Self-service signup + workspace hub |
organizationHoliday | organization-holiday.router.ts | Org holiday calendar |
organizationParameter | organization-parameter.router.ts | Org-wide payroll parameter store (append-only versions) |
teamDrive | team-drive.router.ts | Drive — shared folder/file storage (embedded in admin) |
eSign | e-sign.router.ts | Electronic signature records + provider webhook inbox |
attendanceRate | attendance-rate.router.ts | Attendance rate configuration |
workTimeClosing | worktime-closing.router.ts | Work-time monthly closing |
offsiteWork | offsite-work.router.ts | Offsite/외근 work records and types |
deductionImport | deduction-import.router.ts | Bulk deduction import |
annualLeavePromotion | annual-leave-promotion.router.ts | 연차사용촉진 workflow (안내/서명/자동취소/지정) |
permissionRequest | permission-request.router.ts | Permission grant requests |
shiftGroup | shift-group.router.ts | Shift group definitions |
certificationType | certification-type.router.ts | Certification/license custom type config |
sheetView | sheet-view.router.ts | Payroll workbook — sheet views |
sheetRow | sheet-row.router.ts | Payroll workbook — rows + commitSheet (AR/DR output) |
sheetCell | sheet-cell.router.ts | Payroll workbook — cell values |
sheetTemplate | sheet-template.router.ts | Payroll workbook — sheet templates |
The four
sheet*routers are the core API surface of the payroll workbook (급여대장).AllowanceRecord/DeductionRecordare produced only bycommitSheetin the sheet-row pipeline — see Payroll Provenance.