Skip to content

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:

FieldMeaning
idProject UUID
nameUser-visible project name
fiscalYearSR&ED fiscal-year label
statusProject lifecycle state
descriptionOptional free-form description
sessionCountNumber of sessions in the project
fileCountNumber of files associated with the project

Project status values:

  • DRAFT
  • IN_REVIEW
  • SUBMITTED
  • APPROVED
  • ARCHIVED

Sessions ​

Sessions are the unit of chat history, file selection, and run execution inside a project.

Common fields in SessionDTO:

FieldMeaning
idSession UUID
projectIdParent project UUID
typeSession/workflow type
statusSession lifecycle state
titleOptional user-visible title
messageCountNumber of persisted messages

Backend session types:

  • PRECHECK
  • T661
  • T661_GEN
  • T661_DRAFT
  • T661_ANALYSIS
  • LOGBOOK

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:

  • ACTIVE
  • COMPLETED
  • ARCHIVED

Messages ​

Messages are persisted under a session and represent the request/response history around a run.

Common message fields:

FieldMeaning
idMessage UUID
roleUSER, ASSISTANT, or SYSTEM
contentStored message body
createdAtCreation 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:

FieldMeaning
idFile UUID
originalFilenameBrowser-provided filename
contentTypeMIME type if supplied
fileSizeSize in bytes
uploadedAtUpload confirmation timestamp
uploadStatusTwo-phase upload state
indexStatusRAG indexing state
indexErrorOptional indexing failure message

Upload status values:

  • PENDING
  • CONFIRMED
  • FAILED

Index status values:

  • PENDING
  • INDEXING
  • READY
  • FAILED

Only files in READY state are valid context for AI runs.

Billing resources ​

The main user-facing billing objects are:

ResourcePurpose
subscriptionOngoing plan state tied to a membership tier
paymentCheckout/payment tracking for subscriptions or expert review
expert review orderOne-time paid review workflow tied to a project

Subscription status values:

  • INCOMPLETE
  • INCOMPLETE_EXPIRED
  • TRIALING
  • ACTIVE
  • PAST_DUE
  • CANCELED
  • UNPAID
  • UNKNOWN

Expert review order status values:

  • PENDING_PAYMENT
  • PAID
  • IN_REVIEW
  • COMPLETED
  • CANCELED

Quota snapshot ​

GET /api/v1/quotas/me returns the current user quota snapshot. Common fields include:

FieldMeaning
tierMembership tier
storageUsedBytes / storageLimitBytesTotal storage consumption vs limit
projectsUsed / projectsLimitProject count vs limit
filesPerProjectLimitPer-project file cap
aiRunsMonthlyUsed / aiRunsMonthlyLimitMonthly AI-run usage
fileSizeLimitBytesMaximum single-file size
periodKeyUsage accounting period, formatted like YYYY-MM

Related quota metrics in code:

  • PROJECT_COUNT
  • FILES_PER_PROJECT
  • STORAGE_BYTES
  • AI_RUNS_MONTHLY
  • FILE_SIZE_BYTES