API reference

Every tRPC procedure and HTTP route, generated from the source

Generated by node scripts/generate-api-docs.mjs — do not edit by hand. Run it after changing a router.

Three clients share this API: the console (web), the app (Flutter), and the HTTP routes the phone calls directly for punches and photos. Nothing here is app-only or web-only — that is the rule (AGENTS.md, section 六).

ColumnMeaning
ProcedureThe tRPC path: <router>.<name>
Kindquery reads, mutation writes
AccessThe gate the chain names. — means it decides access some other way: read the source
InputThe name of the schema it validates with
What it is forThe first sentence of the comment above it

tRPC procedures

admin.agreement

trpc/routers/admin/admin-agreement-router.ts
ProcedureKindAccessInputWhat it is for
admin.agreement.listForJobqueryplatform: platform.job.viewjobIdSchemaEvery agreement issued for one shift, newest first.
admin.agreement.listForWorkerqueryplatform: platform.worker.viewinline zod objectEvery agreement issued to one worker, across shifts.
admin.agreement.previewqueryplatform: platform.job.viewbookingIdSchemaWhat would be sent right now, without sending it.
admin.agreement.sendmutationplatform: platform.assignment.manage—Sends one shift's agreement to one worker: email plus app notification.
admin.agreement.sendForJobmutationplatform: platform.assignment.managejobIdSchemaSends to everybody on the shift who has nothing to sign.
admin.agreement.setRatemutationplatform: platform.assignment.manage—Records the rate agreed for one assignment.
admin.agreement.cancelForBookingmutationplatform: platform.assignment.managebookingIdSchemaCancels an open agreement when the assignment behind it goes away.

admin.application

trpc/routers/admin/admin-application-router.ts
ProcedureKindAccessInputWhat it is for
admin.application.listqueryplatform: platform.organization.viewlistAccountApplicationsSchemaThe review queue: one page of applications, with the tab counts.
admin.application.approvemutationplatform: platform.organization.viewapproveAccountApplicationSchemaApproves one application: the account that already exists becomes usable.
admin.application.rejectmutationplatform: platform.organization.viewrejectAccountApplicationSchemaRejects one application, with a reason.

admin.appRelease

trpc/routers/admin/admin-app-release-router.ts
ProcedureKindAccessInputWhat it is for
admin.appRelease.listqueryplatform: platform.app_config.manage—Every published build, newest first, with whether its package is on disk.
admin.appRelease.notifymutationplatform: platform.app_config.manageinline zod objectSends "a newer version is ready" again for one build.
admin.appRelease.withdrawmutationplatform: platform.app_config.manageinline zod objectTakes a build out of circulation: the row and its files.

admin.attachment

trpc/routers/admin/admin-attachment-router.ts
ProcedureKindAccessInputWhat it is for
admin.attachment.listquery—attachmentEntitySchema—
admin.attachment.uploadmutation—uploadAttachmentSchema—
admin.attachment.deletemutation—deleteAttachmentSchema—

admin.audit

trpc/routers/admin/admin-audit-router.ts
ProcedureKindAccessInputWhat it is for
admin.audit.listqueryplatform: platform.audit.viewlistAuditLogSchemaThe audit log, newest first, filtered and paged.
admin.audit.exportmutation—exportAuditLogSchemaThe same query as a CSV.

admin.candidate

trpc/routers/admin/admin-candidate-router.ts
ProcedureKindAccessInputWhat it is for
admin.candidate.listqueryplatform: platform.assignment.viewcandidateListInputThe shift and both of its lists.
admin.candidate.precheckqueryplatform: platform.assignment.viewcandidatePrecheckInputWould this invitation be refused? (owner's rule, 2026-10-02).
admin.candidate.addmutationplatform: platform.assignment.managecandidateAddInputPuts people on one of the lists (idempotent per person).
admin.candidate.enrollPhotomutationplatform: platform.assignment.managecandidateEnrollPhotoInputA photo of somebody on one of this shift's lists (SEL-01 follow-up).
admin.candidate.movemutationplatform: platform.assignment.managecandidateMoveInputMoves entries between the candidate and backup lists.
admin.candidate.recordAcceptancemutationplatform: platform.assignment.managerecordAcceptanceSchemaRecords an acceptance that happened outside the app.
admin.candidate.applyRatesmutationplatform: platform.assignment.manageapplyScheduleRatesSchemaApplies rates to every contractor in the schedule at once.
admin.candidate.removemutationplatform: platform.assignment.managecandidateIdsInputTakes people off the lists.
admin.candidate.setCapacitymutationplatform: platform.assignment.managecandidateCapacityInputThe shortlist size the responsible project manager set (null = no cap).
admin.candidate.offermutationplatform: platform.assignment.managecandidateOfferInput待接受 — sends the work agreement.
admin.candidate.withdrawmutationplatform: platform.assignment.managecandidateWithdrawInputTakes an offer back after it went out.

admin.dashboard

trpc/routers/admin/admin-dashboard-router.ts
ProcedureKindAccessInputWhat it is for
admin.dashboard.summaryquery———

admin.developer.bug

trpc/routers/admin/developer/bug-router.ts
ProcedureKindAccessInputWhat it is for
admin.developer.bug.listqueryplatform ownerbugListInput—
admin.developer.bug.getqueryplatform ownerbugIdInput—
admin.developer.bug.createmutationplatform ownerbugCreateInput—
admin.developer.bug.updatemutationplatform ownerbugUpdateInput—

admin.developer.requirement

trpc/routers/admin/developer/requirement-router.ts
ProcedureKindAccessInputWhat it is for
admin.developer.requirement.listqueryplatform ownerrequirementListInput—
admin.developer.requirement.getqueryplatform ownerrequirementIdInput—
admin.developer.requirement.createmutationplatform ownerrequirementCreateInput—
admin.developer.requirement.updatemutationplatform ownerrequirementUpdateInput—
admin.developer.requirement.setDeliveryStatemutationplatform ownerrequirementDeliveryStateInputMove one requirement along the delivery axis — the only write here that is

admin.dispute

trpc/routers/admin/admin-dispute-router.ts
ProcedureKindAccessInputWhat it is for
admin.dispute.listqueryplatform: platform.payment.viewlistAdminDisputesSchemaThe queue: every dispute, newest first, with the hotel, the worker and the
admin.dispute.getqueryplatform: platform.payment.viewadminDisputeIdSchemaOne dispute, with the shift, the worker, the hotel, and whatever figures
admin.dispute.resolvemutationplatform: platform.payment.manageresolveAdminDisputeSchemaRecords CGP's answer.

admin.faceNode

trpc/routers/admin/admin-face-node-router.ts
ProcedureKindAccessInputWhat it is for
admin.faceNode.listqueryplatform: platform.face_node.view——
admin.faceNode.createmutationplatform: platform.face_node.manageinline zod objectIssues a machine its own access code.
admin.faceNode.setEnabledmutationplatform: platform.face_node.manageinline zod objectSwitches a machine on or off.
admin.faceNode.removemutationplatform: platform.face_node.manageinline zod objectRemoves the credential entirely.
admin.faceNode.debugEmbedmutationplatform: platform.face_node.manageinline zod objectRuns one photo through the pipeline and reports **where it ran and with

admin.faceScan

trpc/routers/admin/admin-face-scan-router.ts
ProcedureKindAccessInputWhat it is for
admin.faceScan.listqueryplatform: platform.face_record.viewlistFaceScansAdminSchema—

admin.holiday

trpc/routers/admin/admin-holiday-router.ts
ProcedureKindAccessInputWhat it is for
admin.holiday.listqueryplatform: platform.holiday.viewinline zod object—
admin.holiday.createmutationplatform: platform.holiday.manageinline zod object—
admin.holiday.updatemutationplatform: platform.holiday.manageinline zod object—
admin.holiday.removemutationplatform: platform.holiday.manageinline zod object—
admin.holiday.yearsqueryplatform: platform.holiday.view—The years that have rows, so the console offers them instead of guessing.

admin.job

trpc/routers/admin/admin-job-router.ts
ProcedureKindAccessInputWhat it is for
admin.job.listqueryplatform: platform.job.viewlistAdminJobsSchema—
admin.job.approvalQueuequeryplatform: platform.job.viewinline zod objectShifts a hotel has posted that are waiting for a reviewer.
admin.job.approvemutationplatform: platform.job.manageadminJobIdSchemaApproves a hotel's shift request so it can be staffed.
admin.job.rejectmutationplatform: platform.job.managerejectAdminJobSchemaRejects a hotel's shift request, with the reason the hotel will see.
admin.job.agreementqueryplatform: platform.job.viewadminJobIdSchemaThe work agreement settings for one shift, plus what it composes to.
admin.job.updateAgreementmutationplatform: platform.job.manageinline zod object—
admin.job.getqueryplatform: platform.job.viewadminJobIdSchemaA single job, used by the job detail screen.
admin.job.attendancequeryplatform: platform.job.viewadminJobIdSchemaAttendance roster for a job: everyone booked onto it, with the punches
admin.job.createmutationplatform: platform.job.managecreateAdminJobSchema—
admin.job.updatemutationplatform: platform.job.manageupdateAdminJobSchema—
admin.job.closemutationplatform: platform.job.manageadminJobIdSchema—
admin.job.adjustAttendancemutationplatform: platform.job.manageadjustAttendanceSchemaCorrect one punch (owner, 2026-10-15: "提供修改考勤记录的操作,要保留原始考勤记录并体现是谁
admin.job.attendanceHistoryqueryplatform: platform.job.viewattendanceHistorySchemaWhat was changed on this shift's attendance, and by whom — the other half of the owner's
admin.job.updateAttendancemutationplatform: platform.job.manageupdateJobAttendanceSchema—
admin.job.setStatusmutationplatform: platform.job.managesetAdminJobStatusSchema—
admin.job.duplicatemutationplatform: platform.job.manageduplicateAdminJobSchema—
admin.job.departmentsByOrganizationqueryplatform: platform.job.viewlistDepartmentsByOrganizationSchema—
admin.job.rateMenuqueryplatform: platform.job.viewinline zod objectWhat a new shift's prices should open at (owner's rule, 2026-10-09:
admin.job.qrmutationplatform: platform.job.managecreateJobQrSchemaAttendance QR codes a worker scans on site.

admin.notification

trpc/routers/admin/admin-notification-router.ts
ProcedureKindAccessInputWhat it is for
admin.notification.listqueryplatform: platform.notification.viewlistAdminNotificationsSchema—
admin.notification.recipientsqueryplatform: platform.notification.viewlistNotificationRecipientsSchema—
admin.notification.createmutationplatform: platform.notification.managecreateNotificationSchema—
admin.notification.bulkDeletemutationplatform: platform.notification.managebulkDeleteNotificationsSchema—

admin.organization

trpc/routers/admin/admin-organization-router.ts
ProcedureKindAccessInputWhat it is for
admin.organization.listqueryplatform: platform.organization.viewlistOrganizationsAdminSchema—
admin.organization.getqueryplatform: platform.organization.viewgetOrganizationAdminSchemaOne organization in full — what the console's View opens.
admin.organization.membersqueryplatform: platform.organization.viewlistOrganizationSectionAdminSchemaOne page of an organization's members — the Members tab's read.
admin.organization.invitationsqueryplatform: platform.organization.viewlistOrganizationSectionAdminSchemaOne page of an organization's pending invitations.
admin.organization.jobsqueryplatform: platform.organization.viewlistOrganizationSectionAdminSchemaOne page of an organization's shifts — the Shifts tab's read.
admin.organization.creditLedgerqueryplatform: platform.organization.viewlistOrganizationSectionAdminSchemaOne page of an organization's credit ledger — the Credits tab's read.
admin.organization.adminCandidatesqueryplatform: platform.organization.managelistOrganizationAdminCandidatesSchemaAccounts that may be chosen as an organization's administrator.
admin.organization.projectManagerCandidatesqueryplatform: platform.organization.managelistOrganizationProjectManagerCandidatesSchemaAccounts that may be chosen as a hotel's project manager.
admin.organization.createmutationplatform: platform.organization.managecreateOrganizationAdminSchema—
admin.organization.updatemutationplatform: platform.organization.manageupdateOrganizationAdminSchema—
admin.organization.enterConsolemutation—enterOrganizationConsoleAdminSchemaOpens an organization's console as the signed-in super admin.
admin.organization.setStatusmutationplatform: platform.organization.managesetOrganizationStatusAdminSchema—
admin.organization.resendInvitemutationplatform: platform.organization.manageresendOrganizationInviteAdminSchema—
admin.organization.deletemutationplatform: platform.organization.managedeleteOrganizationAdminSchema—
admin.organization.exportSelectedToCsvmutationplatform: platform.organization.viewexportOrganizationsAdminSchema—
admin.organization.exportSelectedToExcelmutationplatform: platform.organization.viewexportOrganizationsAdminSchema—
admin.organization.syncFromStripemutationplatform: platform.billing.manageexportOrganizationsAdminSchemaSync selected organizations' subscriptions from Stripe
admin.organization.adjustCreditsmutationplatform: platform.billing.manageadjustCreditsAdminSchemaAdjust organization credits (admin action)
admin.organization.cancelSubscriptionmutationplatform: platform.billing.managecancelSubscriptionAdminSchemaCancel an organization's subscription (admin action)

admin.permission

trpc/routers/admin/admin-permission-router.ts
ProcedureKindAccessInputWhat it is for
admin.permission.listqueryplatform: platform.role.manage——
admin.permission.setPermissionsmutationplatform: platform.role.manageinline zod object—
admin.permission.resetmutationplatform: platform.role.manageinline zod object—
admin.permission.presetsqueryplatform: platform.role.manage—The presets, for a screen that needs the starting point.

admin.push

trpc/routers/admin/admin-push-router.ts
ProcedureKindAccessInputWhat it is for
admin.push.listqueryplatform: platform.notification.viewlistPushDevicesSchemaDevices, newest first, with the account they currently point at.
admin.push.sendTestmutationplatform: platform.notification.managesendTestPushSchemaSends one notification on purpose.
admin.push.deliveriesqueryplatform: platform.notification.viewlistPushDevicesSchemaRecent sends, for "did yesterday's reminders go out".

admin.settings

trpc/routers/admin/admin-settings-router.ts
ProcedureKindAccessInputWhat it is for
admin.settings.listqueryplatform: platform.app_config.manage——
admin.settings.updatemutationplatform: platform.app_config.manageinline zod object—

admin.timesheet

trpc/routers/admin/admin-timesheet-router.ts
ProcedureKindAccessInputWhat it is for
admin.timesheet.listqueryplatform: platform.payment.viewlistSchemaThe review queue: sheets waiting on the platform, newest first.
admin.timesheet.getqueryplatform: platform.payment.viewtimesheetIdSchemaOne timesheet with its entries, the punches behind them and any payment.
admin.timesheet.generatemutationplatform: platform.job.manageinline zod objectBuilds the hours of one shift from its punches, on the hotel's behalf.
admin.timesheet.adjustmutationplatform: platform.job.manageinline zod objectAdjusts one entry's payable minutes, with a reason.
admin.timesheet.adjustTimesmutationplatform: platform.job.manageadjustTimesSchemaCorrects when somebody actually clocked in and out (owner's rule,
admin.timesheet.adjustPaymutationplatform: platform.payment.manageadjustPaySchema"多给或者少给" for one line (owner's rule, 2026-10-13: "在approve的时候,可以
admin.timesheet.returnToClientmutationplatform: platform.job.manage—Sends a timesheet back to the hotel to correct, with a note.
admin.timesheet.approvemutationplatform: platform.payment.manage—Approves and locks the version, and creates the payments.
admin.timesheet.approveManymutationplatform: platform.payment.manageinline zod objectApproving a batch, from the list.
admin.timesheet.reopenmutationplatform: platform.payment.manage—Reopens an approved timesheet as a new version (PAY-06).
admin.timesheet.paymentsqueryplatform: platform.payment.viewinline zod objectThe payments behind approved hours, for the payout screen (PAY-04).
admin.timesheet.payrollExportmutationplatform: platform.payment.manageinline zod objectThe payroll file, bound to the timesheet version behind every line.
admin.timesheet.markPaidmutationplatform: platform.payment.manageinline zod objectMarks a batch of payments as paid (PAY-04).

admin.user

trpc/routers/admin/admin-user-router.ts
ProcedureKindAccessInputWhat it is for
admin.user.listqueryplatform: platform.user.viewlistUsersAdminSchema—
admin.user.createmutationplatform: platform.user.managecreateUserAdminSchema—
admin.user.getqueryplatform: platform.user.viewgetUserAdminSchema—
admin.user.addToOrganizationmutationplatform: platform.user.manageaddUserToOrganizationAdminSchema—
admin.user.removeFromOrganizationmutationplatform: platform.user.manageremoveUserFromOrganizationAdminSchema—
admin.user.exportSelectedToCsvmutationplatform: platform.user.viewexportUsersAdminSchema—
admin.user.exportSelectedToExcelmutationplatform: platform.user.viewexportUsersAdminSchema—
admin.user.changePlatformRolemutationplatform: platform.user.managechangePlatformRoleAdminSchemaChanges an account's platform role.
admin.user.removeUsermutationplatform: platform.user.manageremoveUserAdminSchemaDeletes an account from the console.
admin.user.banUsermutationplatform: platform.user.managebanUserAdminSchema—
admin.user.unbanUsermutationplatform: platform.user.manageunbanUserAdminSchema—
admin.user.resendVerificationEmailmutationplatform: platform.user.manageresendVerificationEmailAdminSchema—

admin.worker

trpc/routers/admin/admin-worker-router.ts
ProcedureKindAccessInputWhat it is for
admin.worker.listqueryplatform: platform.worker.viewlistAdminWorkersSchema—
admin.worker.getqueryplatform: platform.worker.viewworkerIdSchema—
admin.worker.agreementsqueryplatform: platform.worker.viewworkerIdSchemaEverything this worker has agreed to, and every shift they hold a work
admin.worker.contractqueryplatform: platform.worker.viewworkerContractSchemaOne shift's agreement as it would be issued to this worker (AGR-03).
admin.worker.createmutationplatform: platform.worker.managecreateWorkerSchema—
admin.worker.updatemutationplatform: platform.worker.manageupdateWorkerSchema—
admin.worker.resendActivationmutationplatform: platform.worker.manageresendActivationSchema—
admin.worker.deletemutationplatform: platform.worker.manageworkerIdSchema—
admin.worker.reviewmutationplatform: platform.worker.managereviewWorkerSchema—
admin.worker.banmutationplatform: platform.worker.managebanWorkerSchema—
admin.worker.deactivatemutationplatform: platform.worker.managedeactivateWorkerSchema—
admin.worker.reactivatemutationplatform: platform.worker.manageworkerIdSchema—
admin.worker.assignmutationplatform: platform.assignment.manageassignWorkerSchema—
admin.worker.unassignmutationplatform: platform.assignment.manageunassignWorkerSchema—
admin.worker.assignToJobmutationplatform: platform.assignment.manageassignWorkersToJobSchema—
admin.worker.cancelAssignmentmutationplatform: platform.assignment.managecancelAssignmentSchema—
admin.worker.listAssignmentsqueryplatform: platform.worker.viewlistAdminAssignmentsSchema—
admin.worker.enrollFacemutationplatform: platform.worker.manageenrollFaceSchema—
admin.worker.removeFacemutationplatform: platform.worker.manageremoveWorkerFaceSchema—
admin.worker.setFacePhotomutationplatform: platform.worker.managesetWorkerFacePhotoSchema—

application

trpc/routers/application-router.ts
ProcedureKindAccessInputWhat it is for
application.availabilityquerypublic—Which lines the platform is currently accepting applications on.
application.submitWorkermutationpublicsubmitWorkerApplicationSchemaA worker asking for an account: name, phone, email, and optionally where
application.submitOrganizationmutationpublicsubmitOrganizationApplicationSchemaA company asking for an organization account: who they are, and who at the

contact

trpc/routers/contact/index.ts
ProcedureKindAccessInputWhat it is for
contact.submitmutationpublicinline zod object—

database

trpc/routers/admin/admin-database-router.ts
ProcedureKindAccessInputWhat it is for
database.listTablesquery—listDatabaseTablesSchemaEvery manageable table, with its column count, the planner's row estimate
database.describeTablequery—describeDatabaseTableSchemaOne table's columns, as the editor needs them to build its form.
database.listRowsquery—listDatabaseRowsSchemaOne page of one table, searched, sorted and counted.
database.insertRowmutation—insertDatabaseRowSchemaInsert one row.
database.updateRowmutation—updateDatabaseRowSchemaUpdate one row, addressed by its primary key.
database.deleteRowmutation—deleteDatabaseRowSchemaDelete one row, addressed by its primary key, and report how many rows went.

notification

trpc/routers/notification/index.ts
ProcedureKindAccessInputWhat it is for
notification.listquerysigned inlistNotificationsSchema—
notification.unreadCountquerysigned in——
notification.getquerysigned innotificationIdSchema—
notification.markReadmutationsigned innotificationIdSchema—
notification.deliveredmutationsigned indeliveredNotificationSchemaA device saying "I have this one".
notification.markAllReadmutationsigned in——

organization

trpc/routers/organization/index.ts
ProcedureKindAccessInputWhat it is for
organization.listquerysigned in——
organization.setActivemutationsigned insetActiveOrganizationSchemaSwitches the caller's active organization (used by the mobile app).
organization.getquerysigned ingetOrganizationByIdSchema—
organization.createmutationsigned increateOrganizationSchema—

organization.announcement

trpc/routers/organization/organization-announcement-router.ts
ProcedureKindAccessInputWhat it is for
organization.announcement.listqueryorganization: org.announcement.viewlistAnnouncementsSchema—
organization.announcement.getqueryorganization: org.announcement.viewannouncementIdSchema—
organization.announcement.createmutationorganization: org.announcement.managecreateAnnouncementSchema—
organization.announcement.updatemutationorganization: org.announcement.manageupdateAnnouncementSchema—
organization.announcement.publishmutationorganization: org.announcement.manageannouncementIdSchema—
organization.announcement.archivemutationorganization: org.announcement.manageannouncementIdSchema—

organization.attachment

trpc/routers/organization/organization-attachment-router.ts
ProcedureKindAccessInputWhat it is for
organization.attachment.listquery—attachmentEntitySchema—
organization.attachment.uploadmutation—uploadAttachmentSchema—
organization.attachment.deletemutation—deleteAttachmentSchema—

organization.client

trpc/routers/organization/organization-client-router.ts
ProcedureKindAccessInputWhat it is for
organization.client.listqueryorganization: org.client.viewlistClientsSchema—
organization.client.getqueryorganization: org.client.viewclientIdSchema—
organization.client.createmutationorganization: org.client.managecreateClientSchema—
organization.client.updatemutationorganization: org.client.manageupdateClientSchema—
organization.client.deletemutationorganization: org.client.manageclientIdSchema—
organization.client.listDepartmentsqueryorganization: org.client.viewlistDepartmentsSchema—
organization.client.listAllDepartmentsqueryorganization: org.client.viewlistAllDepartmentsSchema—
organization.client.createDepartmentmutationorganization: org.client.managecreateDepartmentSchema—
organization.client.updateDepartmentmutationorganization: org.client.manageupdateDepartmentSchema—
organization.client.deleteDepartmentmutationorganization: org.client.managedeleteDepartmentSchema—

organization.credit

trpc/routers/organization/organization-credit-router.ts
ProcedureKindAccessInputWhat it is for
organization.credit.getBalancequeryorganization: org.billing.view——
organization.credit.getTransactionsqueryorganization: org.billing.viewgetOrganizationCreditTransactionsSchema—
organization.credit.getPackagesqueryorganization: org.billing.view——
organization.credit.purchaseCreditsmutationorganization: org.billing.managepurchaseOrganizationCreditSchema—

organization.dashboard

trpc/routers/organization/organization-dashboard-router.ts
ProcedureKindAccessInputWhat it is for
organization.dashboard.summaryquery——Everything above the fold: today's shifts, this week and this month at a
organization.dashboard.trendquery—inline zod objectThe per-day series behind the trend chart.

organization.dispute

trpc/routers/organization/organization-dispute-router.ts
ProcedureKindAccessInputWhat it is for
organization.dispute.listqueryorganization: org.dispute.viewlistDisputesSchema—
organization.dispute.resolvemutationorganization: org.dispute.manageresolveDisputeSchema—

organization.job

trpc/routers/organization/organization-job-router.ts
ProcedureKindAccessInputWhat it is for
organization.job.listqueryorganization: org.job.viewlistJobsSchema—
organization.job.getqueryorganization: org.job.viewjobIdSchema—
organization.job.rateMenuqueryorganization: org.job.manageinline zod objectWhat a new shift's billing should open at (owner's rule, 2026-10-09:
organization.job.createmutationorganization: org.job.managecreateJobSchema—
organization.job.adjustAttendancemutationorganization: org.job.manageadjustAttendanceSchemaCorrecting one punch, from the hotel's side (owner, 2026-10-15: "已经打开的,怎么修改?").
organization.job.attendanceHistoryqueryorganization: org.job.viewattendanceHistorySchema—
organization.job.updateAttendancemutationorganization: org.job.manageupdateJobAttendanceSchema—
organization.job.updatemutationorganization: org.job.manageupdateJobSchema—
organization.job.withdrawmutationorganization: org.job.managejobIdSchemaThe hotel takes its own request back, while it is still waiting.
organization.job.closemutationorganization: org.job.managejobIdSchema—
organization.job.setStatusmutationorganization: org.job.managesetJobStatusSchema—
organization.job.duplicatemutationorganization: org.job.manageduplicateJobSchema—
organization.job.listBookingsqueryorganization: org.job.viewlistJobBookingsSchema—
organization.job.acceptBookingmutationorganization: org.job.manageacceptBookingSchema—
organization.job.rejectBookingmutationorganization: org.job.managerejectBookingSchema—
organization.job.listAssignmentsqueryorganization: org.job.viewlistOrgAssignmentsSchemaAssignment records for the whole organization: every worker booked onto
organization.job.attendancequeryorganization: org.job.viewjobIdSchemaAttendance roster for one of this organization's jobs.
organization.job.qrmutationorganization: org.job.managecreateJobQrSchemaAttendance QR codes for one of this organization's jobs.

organization.labour

trpc/routers/organization/organization-labour-router.ts
ProcedureKindAccessInputWhat it is for
organization.labour.fillStatsqueryorganization: org.job.viewfillStatsSchema—

organization.payment

trpc/routers/organization/organization-payment-router.ts
ProcedureKindAccessInputWhat it is for
organization.payment.listqueryorganization: org.payment.viewlistPaymentsSchema—

organization.role

trpc/routers/organization/organization-role-router.ts
ProcedureKindAccessInputWhat it is for
organization.role.minequery——The caller's own role and effective permissions, for client components
organization.role.listqueryorganization: org.member.view——
organization.role.setPermissionsmutationorganization: org.member.manageinline zod object—
organization.role.resetmutationorganization: org.member.manageinline zod object—

organization.subscription

trpc/routers/organization/organization-subscription-router.ts
ProcedureKindAccessInputWhat it is for
organization.subscription.checkoutReturnqueryorganization: org.billing.viewcheckoutReturnSchema—
organization.subscription.getStatusqueryorganization: org.billing.view—Get the current billing status for the organization
organization.subscription.listSubscriptionsqueryorganization: org.billing.view—Get all subscriptions (history) for the organization with pagination
organization.subscription.listOrdersqueryorganization: org.billing.view—Get all one-time orders for the organization with pagination
organization.subscription.listInvoicesqueryorganization: org.billing.view—Get invoices from Stripe for the organization
organization.subscription.createCheckoutmutationorganization: org.billing.managecreateCheckoutSchemaCreate a checkout session for a subscription or one-time order
organization.subscription.createPortalSessionmutationorganization: org.billing.manage—Create a customer portal session
organization.subscription.cancelSubscriptionmutationorganization: org.billing.manage—Cancel the current subscription at the end of the billing period
organization.subscription.reactivateSubscriptionmutationorganization: org.billing.manage—Reactivate a subscription that was scheduled for cancellation
organization.subscription.listPlansqueryorganization: org.billing.view—Get available plans from config
organization.subscription.previewPlanChangequeryorganization: org.billing.manageplanChangeSchemaPreview subscription change (upgrade/downgrade)
organization.subscription.changePlanmutationorganization: org.billing.manageplanChangeSchemaChange subscription to a different plan (upgrade/downgrade)
organization.subscription.updateSeatsmutationorganization: org.billing.manageupdateSeatsSchemaUpdate subscription seat count (for per-seat billing)
organization.subscription.getSeatInfoqueryorganization: org.billing.view—Get current seat information for the organization

organization.timesheet

trpc/routers/organization/organization-timesheet-router.ts
ProcedureKindAccessInputWhat it is for
organization.timesheet.listqueryorganization: org.timesheet.viewlistTimesheetsSchema—
organization.timesheet.pendingJobsqueryorganization: org.timesheet.view—The shifts whose hours are still to be submitted.
organization.timesheet.getqueryorganization: org.timesheet.viewtimesheetIdSchema—
organization.timesheet.generatemutationorganization: org.timesheet.approvegenerateTimesheetSchemaDerives (or re-derives) the hours of one shift from its punches.
organization.timesheet.adjustmutationorganization: org.timesheet.approveadjustTimesheetEntrySchemaThe hotel corrects one line's payable time (TIM-02).
organization.timesheet.adjustTimesmutationorganization: org.timesheet.approveadjustTimesheetEntryTimesSchemaThe hotel corrects when somebody clocked in and out (owner's rule,
organization.timesheet.confirmmutationorganization: org.timesheet.approveconfirmTimesheetSchemaThe hotel confirms CGP's adjustment (TIM-04).

organization.worker

trpc/routers/organization/organization-worker-router.ts
ProcedureKindAccessInputWhat it is for
organization.worker.listqueryorganization: org.worker.viewlistWorkersSchema—
organization.worker.getqueryorganization: org.worker.viewworkerIdSchema—

push/push-router

trpc/routers/push/push-router.ts
ProcedureKindAccessInputWhat it is for
push/push-router.registermutationsigned inregisterPushDeviceSchemaRegisters (or refreshes) this install for the signed-in account.
push/push-router.unregistermutationsigned inunregisterPushDeviceSchemaForgets this install.
push/push-router.myDevicesquerysigned in—Whether this account can be reached right now.

storage

trpc/routers/storage/index.ts
ProcedureKindAccessInputWhat it is for
storage.userAvatarUploadUrlmutationsigned in——
storage.organizationLogoUploadUrlmutationorganization: org.settings.manage——

user

trpc/routers/user/index.ts
ProcedureKindAccessInputWhat it is for
user.getSessionquerypublic——
user.getActiveSessionsquerysigned in——
user.getAccountsquerysigned in——
user.completeOnboardingmutationsigned in——

worker

trpc/routers/worker/index.ts
ProcedureKindAccessInputWhat it is for
worker.agreementsmutationsigned in—The platform terms this worker has to accept, and whether they have.
worker.bandChoicesmutationsigned ininline zod objectShifts that let the candidate choose their own time bands (owner's
worker.disputemutationsigned inraiseDisputeSchemaDisputes about this worker's own shifts.
worker.assignmentsquerysigned in—The caller's profile plus their assignments across every organization,
worker.paymentsquerysigned in—The worker's own pay: the shifts behind it, the hours that were approved
worker.announcementsquerysigned in—Published announcements from the organizations this worker works for —
worker.facesmutationsigned ininline zod objectThe caller's own face photos, and which one is the avatar.
worker.enrollFacemutationsigned inenrollFaceSchemaEnrols the caller's own face, so they can check in by face.
worker.uploadPhotomutationsigned inuploadWorkerPhotoSchemaA photo the worker picks out of their own album.

HTTP routes

The app calls these directly. They are authenticated by the session cookie the app holds.

RouteMethodsAccessWhat it is for
/api/agreement/:tokenPOST—The worker's answer, posted from the page the email links to (SEL-02).
/api/app/android/download/:idGET——
/api/app/android/latestGET——
/api/attendance/check-inPOSTsigned inStep 2 of a QR punch: matches the captured face against the faces enrolled
/api/attendance/face-verifyPOSTsigned inPOST /api/attendance/face-verify, with the server's own share of the time
/api/attendance/locationPOSTsigned inA position that arrived after the punch was already recorded.
/api/attendance/qr/verifyPOSTsigned inStep 1 of a QR punch: checks the scanned code, then records a
/api/auth/set-passwordPOST——
/api/cron/push-remindersGET, POST——
/api/eventsGETsigned in—
/api/face-nodes/heartbeatPOST—Liveness, sent between polls while a node is busy computing.
/api/face-nodes/jobsGET—A node asking for work.
/api/face-nodes/registerPOST—A node announcing itself, on boot and after every reconnect.
/api/face-nodes/resultsPOST—A node handing back an answer.
/api/face-nodes/streamGET—Legacy: a node asking for work over a streaming response.
/api/face/identifyPOSTsigned in1:N face identification.
/api/meGETsigned inThe signed-in user, as the mobile app needs them.
/api/versionGET——
/api/webhooks/stripePOST—Stripe webhook handler
/api/worker-activationGET, POST—The activation link's public half (?token=).

Regenerating

cd server && node scripts/generate-api-docs.mjs

The page is written to content/docs/api-reference.mdx; meta.json lists it in the sidebar.

On this page