Core resources
This page summarizes the main application resources that show up repeatedly across the API.
Projects
Projects are the top-level SR&ED work containers for a user.
Common fields in ProjectDTO:
| Field | Meaning |
|---|---|
id | Project UUID |
name | User-visible project name |
fiscalYear | SR&ED fiscal-year label |
status | Project lifecycle state |
description | Optional free-form description |
sessionCount | Number of sessions in the project |
fileCount | Number of files associated with the project |
Project status values:
DRAFTIN_REVIEWSUBMITTEDAPPROVEDARCHIVED
Sessions
Sessions are the unit of chat history, file selection, and run execution inside a project.
Common fields in SessionDTO:
| Field | Meaning |
|---|---|
id | Session UUID |
projectId | Parent project UUID |
type | Session/workflow type |
status | Session lifecycle state |
title | Optional user-visible title |
messageCount | Number of persisted messages |
Backend session types:
PRECHECKT661T661_GENT661_DRAFTT661_ANALYSISLOGBOOK
Frontend-only session labels such as TIME_EXTRACTION and GENERAL_CHAT are broader UX categories and are mapped onto the currently supported run types before the backend call.
Session status values:
ACTIVECOMPLETEDARCHIVED
Messages
Messages are persisted under a session and represent the request/response history around a run.
Common message fields:
| Field | Meaning |
|---|---|
id | Message UUID |
role | USER, ASSISTANT, or SYSTEM |
content | Stored message body |
createdAt | Creation timestamp |
Message history returned by the history endpoint is chronologically ordered.
Project files
File metadata is stored in PostgreSQL while the actual object bytes live in Cloudflare R2.
Common fields in ProjectFileInfo:
| Field | Meaning |
|---|---|
id | File UUID |
originalFilename | Browser-provided filename |
contentType | MIME type if supplied |
fileSize | Size in bytes |
uploadedAt | Upload confirmation timestamp |
uploadStatus | Two-phase upload state |
indexStatus | RAG indexing state |
indexError | Optional indexing failure message |
Upload status values:
PENDINGCONFIRMEDFAILED
Index status values:
PENDINGINDEXINGREADYFAILED
Only files in READY state are valid context for AI runs.
Billing resources
The main user-facing billing objects are:
| Resource | Purpose |
|---|---|
| subscription | Ongoing plan state tied to a membership tier |
| payment | Checkout/payment tracking for subscriptions or expert review |
| expert review order | One-time paid review workflow tied to a project |
Subscription status values:
INCOMPLETEINCOMPLETE_EXPIREDTRIALINGACTIVEPAST_DUECANCELEDUNPAIDUNKNOWN
Expert review order status values:
PENDING_PAYMENTPAIDIN_REVIEWCOMPLETEDCANCELED
Quota snapshot
GET /api/v1/quotas/me returns the current user quota snapshot. Common fields include:
| Field | Meaning |
|---|---|
tier | Membership tier |
storageUsedBytes / storageLimitBytes | Total storage consumption vs limit |
projectsUsed / projectsLimit | Project count vs limit |
filesPerProjectLimit | Per-project file cap |
aiRunsMonthlyUsed / aiRunsMonthlyLimit | Monthly AI-run usage |
fileSizeLimitBytes | Maximum single-file size |
periodKey | Usage accounting period, formatted like YYYY-MM |
Related quota metrics in code:
PROJECT_COUNTFILES_PER_PROJECTSTORAGE_BYTESAI_RUNS_MONTHLYFILE_SIZE_BYTES