Skip to main content

Interface: LeaseResult

Defined in: javascript/src/types.ts:268

Result of acquiring (or renewing) a lease — the atomic admission hold.

A lease is the only admission control (interface plan §3/D4): it holds amount against available = balance − Σ(active holds) under one lock so concurrent operations see each other and maxConcurrent is real. On failure error carries a business code (insufficient_credits, concurrency_limit, cap_reached, feature_not_entitled, invalid_amount, lease_not_found, lease_expired, lease_released) for the manager to map to a typed exception.

Properties

amount

amount: Decimal

Defined in: javascript/src/types.ts:271


available

available: Decimal

Defined in: javascript/src/types.ts:272


billingMode

billingMode: BillingMode

Defined in: javascript/src/types.ts:274


error?

optional error?: string | null

Defined in: javascript/src/types.ts:276


expiresAt

expiresAt: string

Defined in: javascript/src/types.ts:275


leaseId

leaseId: string

Defined in: javascript/src/types.ts:269


reservedTotal

reservedTotal: Decimal

Defined in: javascript/src/types.ts:273


userId

userId: string

Defined in: javascript/src/types.ts:270