Interface: CreditsServiceOptions
Defined in: javascript/src/credits/service-types.ts:37
Properties
analytics?
optionalanalytics?:UsageAnalyticsStore|null
Defined in: javascript/src/credits/service-types.ts:45
Optional read-only analytics backend. Defaults to the credit store, which keeps PostgreSQL as the zero-infrastructure behavior.
catalogCacheTtlMs?
optionalcatalogCacheTtlMs?:number
Defined in: javascript/src/credits/service-types.ts:67
Catalog cache TTL in milliseconds. A value of 0 disables automatic reloads. Concurrent reloads are deduplicated. Defaults to 300,000.
defaultTtlSeconds?
optionaldefaultTtlSeconds?:number
Defined in: javascript/src/credits/service-types.ts:60
Default lease TTL in seconds. Defaults to 600.
instrumentation?
optionalinstrumentation?:Instrumentation|null
Defined in: javascript/src/credits/service-types.ts:40
Explicit telemetry implementation; falls back to Bursar's no-op registry.
lazyExpiry?
optionallazyExpiry?:boolean
Defined in: javascript/src/credits/service-types.ts:62
Sweep a subject's expired credits before balance-sensitive operations.
logger?
optionallogger?:Logger|null
Defined in: javascript/src/credits/service-types.ts:38
lowBalance?
optionallowBalance?:LowBalanceConfig|null
Defined in: javascript/src/credits/service-types.ts:58
Edge-triggered low-balance thresholds and optional non-blocking handler. Defaults to zero when omitted.
maxConcurrent?
optionalmaxConcurrent?:number|null
Defined in: javascript/src/credits/service-types.ts:53
Planless-subject admission limit fallback.
overdraftFloor?
optionaloverdraftFloor?:ExactAmount|null
Defined in: javascript/src/credits/service-types.ts:51
Planless-subject floor used with the overdraft fallback.
policy?
optionalpolicy?:PolicyPreset
Defined in: javascript/src/credits/service-types.ts:49
Fallback credit policy for subjects without a plan assignment.
postDeduction?
optionalpostDeduction?: ((context) =>void|Promise<void>) |null
Defined in: javascript/src/credits/service-types.ts:72
Awaited after a committed, non-replayed deduction. Hook failures are isolated from the committed credit charge.
usageStore?
optionalusageStore?:UsageChargeStore|null
Defined in: javascript/src/credits/service-types.ts:47
Optional usage-history backend. Defaults to the credit store.