Skip to content

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

ProcedureTypeAuthDescription
loginmutationPublicLogin with email/password
registermutationPublicRegister new user + organization
refreshTokenmutationPublicRefresh access token
mequeryProtectedGet current user profile
logoutmutationProtectedInvalidate tokens

Employee Management

employee

ProcedureTypeAuthDescription
getEmployeesqueryProtectedList employees with filters (search, status, team)
getEmployeequeryProtectedGet single employee by ID
createmutationProtectedCreate new employee
updateEmployeemutationProtectedUpdate employee fields
uploadProfilePicturemutationProtectedUpload profile image (base64)

team

ProcedureTypeAuthDescription
listqueryProtectedList teams with filters
createmutationProtectedCreate team
updatemutationProtectedUpdate team
deletemutationProtectedSoft delete team
getCompositionqueryProtectedGet team members
addMembermutationProtectedAdd employee to team
removeMembermutationProtectedRemove member from team

organization

ProcedureTypeAuthDescription
getqueryProtectedGet organization details
updatemutationAdminUpdate organization settings

Payroll

payroll

ProcedureTypeAuthDescription
generateForPeriodmutationProtectedGenerate payroll records for all employees in a period
listqueryProtectedList payroll records (year, month, employee filters)
approvemutationProtectedApprove payroll for payment
processPaymentmutationProtectedMark payroll as paid
validatequeryProtectedValidate payroll data before confirmation
confirmmutationProtectedConfirm payroll with frozen snapshot
cancelConfirmmutationProtectedCancel confirmed payroll, revert to draft
adjustmentCheckqueryProtectedCheck for post-confirm adjustments
summaryqueryProtectedAggregated payroll summary for period
exportEcountqueryProtectedExport payroll to eCount ERP format
createTaxBracketmutationProtectedCreate tax bracket configuration
getActiveTaxBracketsqueryProtectedGet active tax bracket configs for year

salary-grade

ProcedureTypeAuthDescription
listqueryProtectedList salary grades by category
createmutationProtectedCreate salary grade
updatemutationProtectedUpdate grade amounts

allowance-record

ProcedureTypeAuthDescription
listqueryProtectedList allowances with type/status/period filters
createmutationProtectedCreate allowance record
getqueryProtectedGet single allowance record with detail
updatemutationProtectedUpdate allowance
deletemutationProtectedSoft delete allowance record
approvemutationProtectedBulk approve allowances
getSourceDetailqueryProtectedGet source module detail for auto-generated records

deduction-record

ProcedureTypeAuthDescription
listqueryProtectedList deductions by period
createmutationProtectedCreate deduction
updatemutationProtectedUpdate deduction

item-code

ProcedureTypeAuthDescription
listAllowanceCodesqueryProtectedList allowance item codes
createAllowanceCodemutationProtectedCreate allowance item code (max 4 chars)
bulkCreateAllowanceCodesmutationProtectedBulk create allowance codes (skip existing)
updateAllowanceCodemutationProtectedUpdate allowance code
deleteAllowanceCodemutationProtectedSoft delete allowance code
listDeductionCodesqueryProtectedList deduction item codes
createDeductionCodemutationProtectedCreate deduction item code
bulkCreateDeductionCodesmutationProtectedBulk create deduction codes
updateDeductionCodemutationProtectedUpdate deduction code
deleteDeductionCodemutationProtectedSoft delete deduction code

payroll-cell-memo

ProcedureTypeAuthDescription
createmutationProtectedCreate cell memo for a payroll column
resolvemutationProtectedMark memo as resolved
listForPeriodqueryProtectedList open memos for a year/month
historyqueryProtectedQuery memo history with filters (year, month, employee, column, status)

Time & Attendance

attendance

ProcedureTypeAuthDescription
listqueryProtectedList attendance records
quickCheckInmutationProtectedClock in (current time + GPS)
quickCheckOutmutationProtectedClock out
getTodayStatusqueryProtectedGet today's check-in status
getWorkHoursSummaryqueryProtectedWeekly hours summary (52h compliance)

shift

ProcedureTypeAuthDescription
listqueryProtectedList all shift definitions
createmutationProtectedCreate shift with code, time range, differential rates
updatemutationProtectedUpdate shift fields (unique code check)
deletemutationProtectedSoft delete shift

overtime-record

ProcedureTypeAuthDescription
listqueryProtectedList overtime records
createmutationProtectedCreate overtime record
updatemutationProtectedUpdate overtime
requestmutationProtectedEmployee overtime request
approvemutationProtectedApprove overtime

leave-request

ProcedureTypeAuthDescription
listqueryProtectedList leave requests
requestmutationProtectedSubmit leave request
cancelmutationProtectedCancel pending request
approvemutationProtectedApprove leave request
rejectmutationProtectedReject with reason

Compliance & Benefits

year-end-settlement

ProcedureTypeAuthDescription
listqueryProtectedList settlements by year
createmutationProtectedCreate settlement record
updatemutationProtectedUpdate settlement

resignation-record

ProcedureTypeAuthDescription
listqueryProtectedList resignation records with filters
getqueryProtectedGet single resignation record
createmutationProtectedCreate resignation record
updatemutationProtectedUpdate resignation details
deletemutationProtectedSoft delete resignation
historyqueryProtectedGet resignation history for employee
simulateSettlementmutationProtectedPreview settlement calculations without saving
calculateSettlementmutationProtectedExecute settlement and create deduction records
cancelSettlementmutationProtectedCancel an ongoing settlement

education-subsidy

ProcedureTypeAuthDescription
listqueryProtectedList education subsidies
getqueryProtectedGet single subsidy record
createmutationProtectedCreate subsidy record
updatemutationProtectedUpdate subsidy
deletemutationProtectedSoft delete subsidy
historyqueryProtectedGet subsidy history for employee
approvemutationProtectedApprove subsidy records

fixed-incentive

ProcedureTypeAuthDescription
listqueryProtectedList incentives with filters (employee, status, category, period)
getqueryProtectedGet single incentive by ID
createmutationProtectedCreate fixed incentive with append-only versioning
updatemutationProtectedUpdate incentive (content changes create new version)
deletemutationProtectedSoft delete incentive
approvemutationProtectedBulk approve incentives
historyqueryProtectedGet version history by chainId

grade-promotion

ProcedureTypeAuthDescription
detectmutationProtectedAuto-detect eligible employees for grade promotion (hire-anniversary or fiscal-year mode)
listqueryProtectedList pending/approved/rejected/applied promotion requests with filters
approvemutationProtectedApprove promotion(s), updates contract with new grade, notifies employee
rejectmutationProtectedReject promotion with reason
getSettingsqueryProtectedGet organization grade promotion mode (hire_date, fiscal_year, disabled)
updateSettingsmutationProtectedUpdate promotion mode and trigger month

General Affairs

general-affairs

Nested router with sub-routers for trainings, tasks, and notices.

ProcedureTypeAuthDescription
dashboardqueryProtectedAggregated counts for trainings, tasks, notices

general-affairs.training

ProcedureTypeAuthDescription
listqueryProtectedList mandatory trainings
getqueryProtectedGet single training
createmutationProtectedCreate mandatory training
updatemutationProtectedUpdate training
deletemutationProtectedSoft delete training
completionsqueryProtectedList training completions
addCompletionmutationProtectedRecord training completion
updateCompletionmutationProtectedUpdate completion record
dashboardqueryProtectedTraining compliance dashboard

general-affairs.task

ProcedureTypeAuthDescription
listqueryProtectedList recurring tasks
getqueryProtectedGet task with checklist items
createmutationProtectedCreate recurring task
updatemutationProtectedUpdate task
deletemutationProtectedSoft delete task
executionsqueryProtectedList task executions
createExecutionmutationProtectedCreate execution record
updateExecutionmutationProtectedUpdate execution status

general-affairs.notice

ProcedureTypeAuthDescription
listqueryProtectedList notices (admin)
getqueryProtectedGet single notice
createmutationProtectedCreate notice
updatemutationProtectedUpdate notice
deletemutationProtectedSoft delete notice
publishmutationProtectedPublish notice
listPublishedqueryProtectedList published notices (employee-facing)
acknowledgemutationProtectedAcknowledge notice
getUnacknowledgedEmployeesqueryProtectedList employees who haven't acknowledged
unreadCountqueryProtectedCount unread notices for current user

Nurse Scheduling

nurse-scheduler

ProcedureTypeAuthDescription
listSchedulesqueryProtectedList schedules by ward + period
getSchedulequeryProtectedGet schedule with entries
createSchedulemutationManagerCreate new draft schedule
generateSchedulemutationManagerAI-generate shift assignments
updateEntrymutationManagerUpdate single schedule cell
confirmSchedulemutationManagerLock schedule from editing
publishSchedulemutationManagerMake schedule visible to nurses
getProfilequeryProtectedGet nurse profile
listProfilesqueryManagerList nurse profiles by ward
createProfilemutationManagerRegister nurse profile
deleteProfilemutationManagerRemove nurse profile
getMyPreferencequeryProtectedGet own preferences
createPreferencemutationProtectedCreate preference for period
updatePreferencemutationProtectedUpdate preference
submitPreferencemutationProtectedSubmit preference for review
requestWorkTypeChangemutationProtectedRequest work type change
cancelWorkTypeChangemutationProtectedCancel pending change request
listWorkTypeChangesqueryProtectedList change request history

Team Management

team-manager

ProcedureTypeAuthDescription
dashboardqueryTeam LeaderGet pending counts
myTeamsqueryTeam LeaderList managed teams
teamMembersqueryTeam LeaderList team members
listLeaveRequestsqueryTeam LeaderList team leave requests
approveLeaveRequestsmutationTeam LeaderBulk approve leaves
rejectLeaveRequestsmutationTeam LeaderBulk reject with reason
listOvertimequeryTeam LeaderList team overtime
approveOvertimemutationTeam LeaderBulk approve overtime
rejectOvertimemutationTeam LeaderBulk reject with reason
listIncentivesqueryTeam LeaderList team incentives
createIncentivemutationTeam LeaderCreate incentive for team member
approveIncentivesmutationTeam LeaderBulk approve incentives

Module Registry

module-registry

ProcedureTypeAuthDescription
listqueryProtectedList all source modules with metadata, calculator status, and config counts

Storage

storage

ProcedureTypeAuthDescription
getUploadUrlmutationProtectedGet presigned upload URL (profile, document, message)
getDownloadUrlqueryProtectedGet presigned download URL

Communications

conversation

ProcedureTypeAuthDescription
listqueryProtectedList user's conversations
createmutationProtectedCreate direct/group/channel conversation

message

ProcedureTypeAuthDescription
listqueryProtectedList messages in conversation
sendmutationProtectedSend message
markReadmutationProtectedMark conversation as read

document

ProcedureTypeAuthDescription
listqueryProtectedList documents
uploadmutationProtectedUpload document

notification

ProcedureTypeAuthDescription
getSettingsqueryProtectedGet notification preferences as { [eventType]: { [channel]: enabled } }
updateSettingsmutationProtectedCreate/update preference for eventType + channel
inboxListqueryProtectedPaginated IN_APP notifications with type/isRead filters
inboxUnreadCountqueryProtectedCount unread IN_APP notifications
inboxMarkReadmutationProtectedMark single notification as read
inboxMarkAllReadmutationProtectedMark all unread notifications as read
inboxDismissmutationProtectedDismiss notification from action items
actionItemsqueryProtectedList pending approval notifications (undismissed, with reference)
muteListqueryProtectedList all mute settings for current user
muteCreatemutationProtectedCreate mute (by employee, team, event type, or all)
muteDeletemutationProtectedDelete mute setting

device-token

ProcedureTypeAuthDescription
registermutationProtectedRegister push notification token (iOS/Android/Web)
unregistermutationProtectedDeactivate token on logout

Document Templates

document-template

ProcedureTypeAuthDescription
listqueryProtectedList document templates for organization
getqueryProtectedGet single template by ID
createmutationProtectedCreate template (unique code per org)
updatemutationProtectedUpdate template fields
deletemutationProtectedSoft delete template
variablesqueryProtectedList available template variables (24 predefined)
previewqueryProtectedGenerate full HTML preview with variable substitution and org seal

SECOM Integration

secom-event

ProcedureTypeAuthDescription
ingestEventsmutationProtectedAccept raw fingerprint scan events from SECOM devices
processPendingmutationProtectedProcess pending events → create/update Attendance records
listEventsqueryProtectedList events with status/employeeNumber filters
getEventqueryProtectedGet single event with employee and attendance relations

Employee Certification

employee-certification

ProcedureTypeAuthDescription
listqueryProtectedList certifications with filters (employeeId, type, isActive)
summaryqueryProtectedCount-by-type summary for compliance audits (공단 관리)
createmutationProtectedAdd employee certification
updatemutationProtectedUpdate certification fields
deletemutationProtectedSoft delete certification
exportmutationProtectedExport certifications to Excel (공단 검사용)

Inventory Management

inventory

ProcedureTypeAuthDescription
listCategoriesqueryProtectedList inventory categories with item counts
getCategoryqueryProtectedGet single category with items
createCategorymutationProtectedCreate inventory category (unique code)
updateCategorymutationProtectedUpdate category fields
deleteCategorymutationProtectedSoft delete category
listItemsqueryProtectedList items with filters (category, search, active, expiring, refund)
getItemqueryProtectedGet single inventory item
createItemmutationProtectedCreate inventory item
updateItemmutationProtectedUpdate item fields
deleteItemmutationProtectedSoft delete item
adjustQuantitymutationProtectedAdjust item quantity with reason tracking
markRefundmutationProtectedFlag item as refund candidate
getExpirationAlertsqueryProtectedGet items expiring within configurable days
getDashboardSummaryqueryProtectedInventory health metrics (low stock, expiry, refunds)

Management Dashboard

management-dashboard

ProcedureTypeAuthDescription
laborCostByTeamqueryProtectedAggregated payroll by team (grossPay, deductions, netPay, headcount)
dailyLaborCostqueryProtectedDaily payroll snapshots by team for current month
incentiveSummaryqueryProtectedIncentive totals by category and status
staffingOverviewqueryProtectedNurse/staff counts by ward and skill set

Role & Permission

role

ProcedureTypeAuthDescription
listqueryAdminList roles with permissions
createmutationAdminCreate role
updatemutationAdminUpdate role
deletemutationAdminDelete non-system role
listPermissionsqueryAdminList all available permissions
updatePermissionsmutationAdminSet 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 keySource moduleDomain
accountaccount.router.tsAccount layer — 통합 로그인 회원, owner-scoped guards
platformplatform.router.tsPlatform/provisioning administration
aiai.router.tsClaude AI integration — conversations, tool loop, embeddings
inviteinvite.router.tsMember invitations
inquiryinquiry.router.tsLanding / contact inquiries
signupsignup.router.tsSelf-service signup + workspace hub
organizationHolidayorganization-holiday.router.tsOrg holiday calendar
organizationParameterorganization-parameter.router.tsOrg-wide payroll parameter store (append-only versions)
teamDriveteam-drive.router.tsDrive — shared folder/file storage (embedded in admin)
eSigne-sign.router.tsElectronic signature records + provider webhook inbox
attendanceRateattendance-rate.router.tsAttendance rate configuration
workTimeClosingworktime-closing.router.tsWork-time monthly closing
offsiteWorkoffsite-work.router.tsOffsite/외근 work records and types
deductionImportdeduction-import.router.tsBulk deduction import
annualLeavePromotionannual-leave-promotion.router.ts연차사용촉진 workflow (안내/서명/자동취소/지정)
permissionRequestpermission-request.router.tsPermission grant requests
shiftGroupshift-group.router.tsShift group definitions
certificationTypecertification-type.router.tsCertification/license custom type config
sheetViewsheet-view.router.tsPayroll workbook — sheet views
sheetRowsheet-row.router.tsPayroll workbook — rows + commitSheet (AR/DR output)
sheetCellsheet-cell.router.tsPayroll workbook — cell values
sheetTemplatesheet-template.router.tsPayroll workbook — sheet templates

The four sheet* routers are the core API surface of the payroll workbook (급여대장). AllowanceRecord/DeductionRecord are produced only by commitSheet in the sheet-row pipeline — see Payroll Provenance.