Packbase

pb.store

Browse the Packbase store and purchase items for the signed-in user.

pb.store includes the Packbase item catalog, the current user's balance and ownership, and purchases. The public catalog does not require authentication. Personal ownership and purchases require authentication.

Store overview

const  = await ..()

.(.)
for (const  of .) {
  .(., ., .)
}

list() requires authentication. It returns a StoreOverview object. The object contains items, the current trinketCount, and applicable store history. It does not return an item array directly.

Each history entry has a known id, action, and model_object: JsonValue. Use a separate display format for each known action. For new actions and payloads, show a recursive key-value view or formatted JSON.

Public catalog

const {  } = await ..()

catalog() lists public item information without fields tied to the current user's ownership.

Purchase an item

const  = await ..('founder-badge', {: 1})

.(.)
.(..)

The first argument is the store item ID. quantity is the number to buy. Staff callers can pass userId in the options to purchase for another account. The SDK does not supply a method to fetch one item by ID.

On this page