UsageRollup
@forge/monorepo / backend/src / UsageRollup
Type Alias: UsageRollup
UsageRollup =
UsageTotals&object
Defined in: backend/src/persistence/index.ts:486
One tenant's consumption in one bucket.
bucketStart is the ISO instant the bucket opens, truncated to the period — so a bucket is identified by
its start rather than by a range, and two writers computing "the hour containing T" agree by construction.
Type Declaration
bucketStart
readonlybucketStart:string
computedAt
readonlycomputedAt:string
When this bucket was last recomputed. For spotting a rollup job that has stopped running.
currency
readonlycurrency:string
period
readonlyperiod:RollupPeriod
principalId?
readonlyoptionalprincipalId?:PrincipalId
Whose bucket this is — absent for the tenant's own total (#175).
On the row rather than only in the query, because a caller holding a mixed list otherwise cannot tell a tenant total from one person's, and adding them together double-counts everything.