Skip to main content
All Docs
API ReferencePurple PepperUpdated April 7, 2026

Outstanding Items Router

Outstanding Items Router

The outstandingItems tRPC router exposes four procedures used by the Outstanding Items dashboard view. All procedures are scoped to the authenticated organisation.

outstandingItems.summary

Returns aggregated counts of items requiring attention across the portfolio.

Input: none

Response:

{
  pendingTasks: number;       // All incomplete todos
  overdueTasks: number;       // Todos past their due date
  expiredCompliance: number;  // Compliance docs past expiry
  expiringSoonCompliance: number; // Compliance docs approaching expiry
}

outstandingItems.listTodos

Paginated list of all incomplete todos across tenancies, sorted by due date with overdue items first.

Input:

{
  limit?: number;        // Items per page (default 20)
  cursor?: string;       // Pagination cursor from previous response
  priority?: string;     // Filter: "urgent" | "high" | "normal" | "low"
  taskType?: string;     // Filter by task type code
  assignedTo?: string;   // Filter by assigned role
  overdueOnly?: boolean; // Return only overdue items
}

Response:

{
  items: Array<{
    id: string;
    title: string;
    description?: string;
    taskType: string;
    priority: string;
    dueDate?: Date | null;
    assignedTo: string;
    tenancyId?: string;
    propertyAddress?: string;
    tenantName?: string;
  }>;
  nextCursor?: string;  // Pass as cursor to fetch the next page
}

outstandingItems.listComplianceItems

Paginated list of expired and expiring-soon compliance documents, joined with property address data.

Input:

{
  limit?: number;          // Items per page (default 20)
  cursor?: string;         // Pagination cursor from previous response
  status?: "expired" | "expiring_soon";  // Filter by status
  docType?: string;        // Filter by document type code
}

Response:

{
  items: Array<{
    id: string;
    docType: string;         // e.g. "gas_safety", "epc"
    status: string;          // "expired" | "expiring_soon"
    expiryDate?: Date | null;
    version?: string | number;
    propertyId: string;
    propertyAddress?: string;
  }>;
  nextCursor?: string;
}

outstandingItems.markTodoComplete

Marks a todo as complete. Writes an audit log entry on success.

Input:

{
  todoId: string; // ID of the todo to complete
}

Response: { success: true } on success.

Side effects:

  • Sets the todo's completed state to true
  • Creates an audit log record
  • Invalidating listTodos and summary after calling this procedure is recommended to keep the UI consistent

Document Type Codes

CodeLabel
gas_safetyGas Safety
epcEPC
eicrEICR
hmo_licenceHMO Licence
landlord_insuranceInsurance
deposit_protectionDeposit Protection
legionella_riskLegionella
asbestos_surveyAsbestos
fire_riskFire Risk
otherOther

Task Type Codes

CodeLabel
cost_breakdown_signCost Breakdown
holding_deposit_payHolding Deposit
tenancy_agreement_signTenancy Agreement
compliance_docCompliance
customCustom