Skip to content

DoCurious API Reference / types / XPTransaction

Interface: XPTransaction

Defined in: types/gamification.types.ts:173

Ledger-style XP transaction with running balance, used for audit and history views.

Remarks

Unlike XPEvent (which is display-oriented), XPTransaction tracks the running XP balance after each change and supports negative amounts (e.g., Dealer's Choice abandon penalty).

Extends

Properties

amount

amount: number

Defined in: types/gamification.types.ts:177

XP change amount -- positive for gains, negative for penalties


badgeId?

optional badgeId: string

Defined in: types/gamification.types.ts:180


balanceAfter

balanceAfter: number

Defined in: types/gamification.types.ts:185

Cumulative XP total after this transaction was applied


challengeId?

optional challengeId: string

Defined in: types/gamification.types.ts:179


createdAt

createdAt: string

Defined in: types/common.types.ts:154

ISO 8601 datetime when the entity was created

Inherited from

BaseEntity.createdAt


description

description: string

Defined in: types/gamification.types.ts:182

Human-readable description of what triggered this transaction


eventType

eventType: XPEventType

Defined in: types/gamification.types.ts:175


id

id: string

Defined in: types/common.types.ts:167

Inherited from

BaseEntity.id


updatedAt

updatedAt: string

Defined in: types/common.types.ts:156

ISO 8601 datetime when the entity was last modified

Inherited from

BaseEntity.updatedAt


userId

userId: string

Defined in: types/gamification.types.ts:174

DoCurious Platform Documentation