Appearance
apps/api/src/features/ponyexpress/ponyexpress.service.ts ​
Auto-generated by
scripts/generate-file-docs.ts. Do not edit — overwritten on every run.
Purpose ​
PonyExpressService — community courier / delivery request workflow. Domain rules: - Member-only feature. Every operation requires the caller to be at least a member (no visitors, no comms_author bypass). - listRequests: public community-board view returns only REQUESTED deliveries; the caller's own requests are always visible regardless of status so the requester can track their own work. - getRequest: any member may view a single request along with its offers and tracking history. - createRequest: any member may post a request; it is created in REQUESTED status. - claimDelivery: first-claim-wins. A request can have at most one accepted DeliveryOffer; once claimed the request transitions to IN_TRANSIT. Requester cannot claim their own request. - addTracking: only the accepted courier (or an admin) may post a tracking update. The DeliveryRequest.status is moved to match the tracking entry's status. A DELIVERED update notifies the requester. - cancelRequest: the requester or an admin may cancel the request. Every state transition writes an AuditLog row inside the same transaction as the state change. /
Exports ​
export interface ListRequestsParamsexport interface ListRequestsResultexport interface DeliveryRequestDetailexport class PonyExpressServiceexport const ponyExpressService
Imports ​
../../adapters/db../../lib/errors../../lib/logger../../lib/notifier.factory../../lib/pagination../../middleware/requireAuth