Routes and server functions
38 pages, 5 server routes and 80 server functions, 51 of which change data.
Pages under the pathless layout _authed need a signed-in user: its beforeLoad sends anyone else to /sign-in, and a user without a display name to /welcome.
Server routes
Section titled “Server routes”Not covered by the server functions’ same-origin check; each route checks what it needs itself.
| Path | Methods | Route file |
|---|---|---|
/api/documents/$documentId |
GET | src/routes/api/documents/$documentId.ts |
/api/log |
POST | src/routes/api/log.ts |
/api/receipts/$receiptId |
GET | src/routes/api/receipts/$receiptId.ts |
/api/test/inbox |
GET | src/routes/api/test/inbox.ts |
/offline |
GET | src/routes/offline.ts |
Server functions
Section titled “Server functions”Called by the UI through TanStack Start, same-origin only (createCsrfMiddleware in src/start.ts). Apart from signing in, a function that changes data (POST) checks the session itself: the signed-in layout protects pages, not endpoints. Expected failures return { ok: false, reason } with a reason code.
account
Section titled “account”Change data (POST)
| Function | Input | Defined in |
|---|---|---|
setAccountLanguage |
localeInput |
src/features/account/functions.ts:10 |
authentication
Section titled “authentication”Change data (POST)
| Function | Input | Defined in |
|---|---|---|
requestSignInCode |
requestCodeInput |
src/features/authentication/functions.ts:30 |
setDisplayName |
displayNameInput |
src/features/authentication/functions.ts:70 |
signOut |
src/features/authentication/functions.ts:89 |
|
verifySignInCode |
verifyCodeInput |
src/features/authentication/functions.ts:34 |
Read (GET)
| Function | Input | Defined in |
|---|---|---|
getSignedInUser |
src/features/authentication/functions.ts:55 |
deposits
Section titled “deposits”Change data (POST)
| Function | Input | Defined in |
|---|---|---|
deleteDepositReturn |
depositReturnRefInput |
src/features/deposits/functions.ts:62 |
recordDepositReturn |
depositReturnInput |
src/features/deposits/functions.ts:48 |
updateDepositReturn |
depositReturnInput |
src/features/deposits/functions.ts:55 |
Read (GET)
| Function | Input | Defined in |
|---|---|---|
getDepositReturn |
depositReturnRefInput |
src/features/deposits/functions.ts:42 |
documents
Section titled “documents”Change data (POST)
| Function | Input | Defined in |
|---|---|---|
addDocument |
readForm |
src/features/documents/functions.ts:103 |
deleteDocument |
documentRefInput |
src/features/documents/functions.ts:131 |
updateDocument |
updateDocumentInput |
src/features/documents/functions.ts:124 |
Read (GET)
| Function | Input | Defined in |
|---|---|---|
getDocument |
documentRefInput |
src/features/documents/functions.ts:93 |
getDocuments |
propertyRefInput |
src/features/documents/functions.ts:89 |
getNewDocument |
propertyRefInput |
src/features/documents/functions.ts:99 |
ownership
Section titled “ownership”Change data (POST)
| Function | Input | Defined in |
|---|---|---|
changeOwnership |
changeOwnershipInput |
src/features/ownership/functions.ts:44 |
correctFirstOwnershipDate |
correctFirstDateInput |
src/features/ownership/functions.ts:59 |
undoOwnershipChange |
propertyRefInput |
src/features/ownership/functions.ts:55 |
Read (GET)
| Function | Input | Defined in |
|---|---|---|
getOwnership |
propertyRefInput |
src/features/ownership/functions.ts:40 |
listCurrentOwners |
src/features/ownership/functions.ts:66 |
properties
Section titled “properties”Change data (POST)
| Function | Input | Defined in |
|---|---|---|
archiveProperty |
propertyIdInput |
src/features/properties/functions.ts:76 |
createProperty |
newPropertyInput |
src/features/properties/functions.ts:63 |
deleteProperty |
propertyIdInput |
src/features/properties/functions.ts:89 |
restoreProperty |
propertyIdInput |
src/features/properties/functions.ts:80 |
updateProperty |
updatePropertyInput |
src/features/properties/functions.ts:69 |
Read (GET)
| Function | Input | Defined in |
|---|---|---|
getFlatDetails |
propertyIdInput |
src/features/properties/functions.ts:94 |
getProperty |
propertyIdInput |
src/features/properties/functions.ts:59 |
getPropertyDeletion |
propertyIdInput |
src/features/properties/functions.ts:85 |
listProperties |
src/features/properties/functions.ts:55 |
recurring-amounts
Section titled “recurring-amounts”Change data (POST)
| Function | Input | Defined in |
|---|---|---|
addFinancingCharge |
addFinancingChargeInput |
src/features/recurring-amounts/functions.ts:77 |
renameFinancingCharge |
renameFinancingChargeInput |
src/features/recurring-amounts/functions.ts:87 |
setFinancingTreatment |
setTreatmentInput |
src/features/recurring-amounts/functions.ts:96 |
setRecurringAmount |
setAmountInput |
src/features/recurring-amounts/functions.ts:55 |
undoFinancingTreatment |
propertyRefInput |
src/features/recurring-amounts/functions.ts:105 |
undoRecurringAmount |
undoAmountInput |
src/features/recurring-amounts/functions.ts:66 |
Read (GET)
| Function | Input | Defined in |
|---|---|---|
getRecurringAmounts |
propertyRefInput |
src/features/recurring-amounts/functions.ts:49 |
rent-payments
Section titled “rent-payments”Change data (POST)
| Function | Input | Defined in |
|---|---|---|
deleteRentPayment |
deleteRentPaymentInput |
src/features/rent-payments/functions.ts:75 |
recordRentPayment |
recordRentPaymentInput |
src/features/rent-payments/functions.ts:68 |
Read (GET)
| Function | Input | Defined in |
|---|---|---|
getRentMonth |
rentMonthInput |
src/features/rent-payments/functions.ts:57 |
getRentPayments |
rentPaymentsInput |
src/features/rent-payments/functions.ts:47 |
listRentThisMonth |
src/features/rent-payments/functions.ts:53 |
sharing
Section titled “sharing”Change data (POST)
| Function | Input | Defined in |
|---|---|---|
acceptInvitation |
invitationIdInput |
src/features/sharing/functions.ts:71 |
cancelInvitation |
invitationIdInput |
src/features/sharing/functions.ts:63 |
declineInvitation |
invitationIdInput |
src/features/sharing/functions.ts:75 |
inviteToProperty |
inviteInput |
src/features/sharing/functions.ts:57 |
leaveProperty |
propertyRefInput |
src/features/sharing/functions.ts:85 |
removeAccess |
removeAccessInput |
src/features/sharing/functions.ts:79 |
Read (GET)
| Function | Input | Defined in |
|---|---|---|
getSharing |
propertyRefInput |
src/features/sharing/functions.ts:53 |
listMyInvitations |
src/features/sharing/functions.ts:67 |
tenancies
Section titled “tenancies”Change data (POST)
| Function | Input | Defined in |
|---|---|---|
addTenantFee |
addTenantFeeInput |
src/features/tenancies/functions.ts:155 |
cancelTenancyEnding |
tenancyRefInput |
src/features/tenancies/functions.ts:110 |
createTenancy |
createTenancyInput |
src/features/tenancies/functions.ts:81 |
endTenancy |
endTenancyInput |
src/features/tenancies/functions.ts:103 |
removeTenancy |
tenancyRefInput |
src/features/tenancies/functions.ts:116 |
setTenancyOccupants |
setTenancyOccupantsInput |
src/features/tenancies/functions.ts:139 |
setTenancyRent |
setTenancyRentInput |
src/features/tenancies/functions.ts:126 |
setTenantFee |
setTenantFeeInput |
src/features/tenancies/functions.ts:169 |
undoTenancyOccupants |
tenancyRefInput |
src/features/tenancies/functions.ts:149 |
undoTenancyRent |
tenancyRefInput |
src/features/tenancies/functions.ts:133 |
undoTenantFee |
tenantFeeRefInput |
src/features/tenancies/functions.ts:179 |
updateTenancy |
updateTenancyInput |
src/features/tenancies/functions.ts:96 |
Read (GET)
| Function | Input | Defined in |
|---|---|---|
getNewTenancyOptions |
propertyRefInput |
src/features/tenancies/functions.ts:71 |
getTenancies |
propertyRefInput |
src/features/tenancies/functions.ts:67 |
getTenancy |
tenancyRefInput |
src/features/tenancies/functions.ts:75 |
listTenancyStatuses |
src/features/tenancies/functions.ts:122 |
transactions
Section titled “transactions”Change data (POST)
| Function | Input | Defined in |
|---|---|---|
createTransaction |
readForm |
src/features/transactions/functions.ts:124 |
deleteTransaction |
transactionRefInput |
src/features/transactions/functions.ts:175 |
updateTransaction |
readForm |
src/features/transactions/functions.ts:143 |
Read (GET)
| Function | Input | Defined in |
|---|---|---|
entriesSince |
z.object({ propertyId: z.string().min(1).max(64), category: z.enum(WATER_CATEGORIES), from: z.string().regex(/^\d{4}-\d{2}-\d{2}$/), }) |
src/features/transactions/functions.ts:182 |
getNewTransactionOptions |
z.object({ propertyId: z.string().max(64).optional() }) |
src/features/transactions/functions.ts:118 |
getTransaction |
transactionRefInput |
src/features/transactions/functions.ts:112 |
getTransactions |
z.object({ propertyId: z.string().min(1).max(64), year: z.number().int().min(2000).max(2100).optional(), }) |
src/features/transactions/functions.ts:101 |
usage-charges
Section titled “usage-charges”Change data (POST)
| Function | Input | Defined in |
|---|---|---|
addUsageCharge |
addUsageChargeInput |
src/features/usage-charges/functions.ts:51 |
setUsageCharge |
setUsageChargeInput |
src/features/usage-charges/functions.ts:64 |
undoUsageCharge |
usageChargeRefInput |
src/features/usage-charges/functions.ts:73 |
Read (GET)
| Function | Input | Defined in |
|---|---|---|
getUsageCharges |
propertyRefInput |
src/features/usage-charges/functions.ts:47 |
year-summary
Section titled “year-summary”Read (GET)
| Function | Input | Defined in |
|---|---|---|
getFlatYear |
flatYearInput |
src/features/year-summary/functions.ts:53 |
getYearSummary |
yearSummaryInput |
src/features/year-summary/functions.ts:47 |
getYearSummaryPdf |
yearSummaryInput |
src/features/year-summary/functions.ts:64 |