Versioned, immutable record of a completed inventory operation. Captured at emission time so the record is frozen and does not depend on later mutation of inventory state. Every command that mutates or queries inventory produces one record on ItemVaultBus.inventory_operation_record.
Source: addons/item_vault/backend/inventory_operation_record.gd
Syntax
class InventoryOperationRecord extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
SCHEMA_VERSION | Field | |
schema_version | Property | Coarse terminal classification kept alongside the precise result code. `outcome` remains the canonical InventoryResultCode.Code. Schema version for forward/backward compatibility. |
operation_id | Property | Stable operation ID, monotonic within the backend's lifetime. Never reused within the same session. |
session_id | Property | Stable backend/session namespace. The numeric operation_id is only unique within this namespace; the pair remains unique across save/load restores. |
operation_key | Property | Collision-safe externally comparable operation identity. |
command_type | Property | Command type that produced this record (ADD_ITEM, REMOVE_ITEM, etc.). |
item_id | Property | The item identifier, when applicable. |
quantity | Property | Quantity affected (added, removed, transferred, reserved, etc.). |
source_container_id | Property | Source container identifier, when applicable. |
target_container_id | Property | Target container identifier, when applicable. |
currency | Property | Currency identifier for wallet operations. |
outcome | Property | Typed outcome code (InventoryResultCode.Code). |
outcome_kind | Property | Coarse outcome distinction for telemetry and retry handling. |
failure_reason | Property | Typed diagnostic reason independent of [member outcome]. |
delta | Property | Detached typed state delta captured with the record. |
message | Property | Human-readable detail for failures and diagnostics. |
correlation_context | Property | Caller-supplied opaque correlation context, echoed from the command. |
overflow_quantity | Property | Overflow stack quantity when a partial operation could not fit everything. 0 = none. |
item_instance_id | Property | Stable item-instance identity, when the operation addresses one retained stack instance. |
instance_id | Property | Alias matching the ItemStack/event field name. |
stack_id | Property | Concrete stack boundary identity, distinct from an item-instance identity. |
resource_id | Property | Named retained resource, when the operation addresses one. |
resource_delta | Property | Signed retained-resource delta, when applicable. |
resource_old_amount | Property | Retained-resource amount before the operation, when applicable. |
resource_new_amount | Property | Retained-resource amount after the operation, when applicable. |
resource_reason | Property | Caller/domain reason carried by a retained-resource operation. |
rollback_quantity | Property | Quantity that was restored after a rolled-back mutation. |
before_snapshot | Property | Snapshot of the inventory before the operation (may be null for an unavailable inventory). |
after_snapshot | Property | Snapshot of the inventory after the operation (may be null for an unavailable inventory). |
snapshot | Property | Backwards-compatible alias for the post-operation snapshot. |
final_after | Property | |
to_dict | Method |