LogoStacked
API

Type Reference

Complete TypeScript type definitions for the Stacked API

This page documents all TypeScript types used in the Stacked API.
These types are available in the @pixels-online/pixels-analytics-node-sdk package.


Offers

IClientOffer

Represents an offer instance for a specific player.

Prop

Type

Prop

Type

Prop

Type


PlayerOfferStatus

The lifecycle status of a player offer.

type PlayerOfferStatus =
  | 'inQueue'    // Queued but not yet surfaced (max slots reached)
  | 'surfaced'   // Active and tracking progress
  | 'viewed'     // Player has seen the offer
  | 'claimable'  // Ready to claim rewards
  | 'claimed'    // Rewards already claimed
  | 'expired';   // Time limit reached before completion

Rewards

IReward

Represents a reward that can be distributed to players.

Prop

Type

Prop

Type

Prop

Type


RewardIdentifier

Identifies a reward by its kind and optional ID for asset resolution.

Prop

Type

Prop

Type


AssetContent

Custom asset data (name and image) for rewards, returned by the asset resolver.

Prop

Type

Prop

Type


RewardKind

The type of reward being distributed.

type RewardKind =
  | 'item'              // In-game items (e.g., weapons, potions)
  | 'coins'             // In-game currency
  | 'exp'               // Experience points
  | 'trust_points'      // Reputation/trust score
  | 'loyalty_currency'; // Premium/loyalty currency

Player Data

IClientPlayer

Player object returned by campaigns endpoints, containing both snapshot and data.

Prop

Type

Prop

Type

Prop

Type


IPlayerSnapshot

Complete snapshot of a player's profile and progression.

Prop

Type

Prop

Type

Prop

Type


IPlayerData

Player's currency data with visual metadata.

Prop

Type

Prop

Type

Prop

Type


IPlayerDataCurrency

Currency information including balance and display metadata.

Prop

Type

Prop

Type

Prop

Type


Conditions

ICompletionCondition

Conditions that must be met for an offer to become claimable.

Prop

Type

Prop

Type

Prop

Type


ICompletionTrackers

Tracks a player's progress towards completing offer conditions.

Prop

Type

Prop

Type

Prop

Type


ISurfacingCondition

Conditions that determine who sees which offers.

Prop

Type

Prop

Type

Prop

Type


Dynamic Conditions

IDynamicCondition

A single condition based on dynamic player fields.

Prop

Type

Prop

Type

Prop

Type


IDynamicGroup

A group of dynamic conditions with logical operators.

Prop

Type

Prop

Type

Prop

Type


DynamicConditionOperator

Operators for comparing dynamic field values.

type DynamicConditionOperator =
  | '=='       // Equals
  | '!='       // Not equals
  | '>'        // Greater than
  | '>='       // Greater than or equal
  | '<'        // Less than
  | '<='       // Less than or equal
  | 'has'      // Contains (for strings/arrays)
  | 'not_has'; // Does not contain

Logical operators linking conditions in a group.

type DynamicConditionLink =
  | 'AND'      // Both conditions must be true
  | 'OR'       // Either condition can be true
  | 'AND NOT'; // First true AND second false

Analytics SDK Event Parameters

These types are used when tracking player events with the Analytics SDK.

PixelsSignInParams

Parameters for tracking player sign-in events.

Prop

Type

Prop

Type

Prop

Type


PixelsSignUpParams

Parameters for tracking player sign-up events.

Prop

Type

Prop

Type

Prop

Type


PixelsSnapshotParams

Complete player snapshot data.

Prop

Type

Prop

Type

Prop

Type


PixelsCurrencyTxParams

Parameters for currency transactions (earn/spend/deposit/withdraw).

Prop

Type

Prop

Type

Prop

Type


PixelsItemTxParams

Parameters for item transactions (gain/lose).

Prop

Type

Prop

Type

Prop

Type


PixelsMembershipTxParams

Parameters for membership/subscription transactions.

Prop

Type

Prop

Type

Prop

Type


PixelsFunnelStepParams

Parameters for tracking quest/funnel progression.

Prop

Type

Prop

Type

Prop

Type


PixelsLevelUpParams

Parameters for tracking player level/skill progression.

Prop

Type

Prop

Type

Prop

Type


PixelsAchievementTxParams

Parameters for achievement transactions.

Prop

Type

Prop

Type

Prop

Type


PixelsReferUserParams

Parameters for tracking referrals.

Prop

Type

Prop

Type

Prop

Type


PixelsTrustScoreParams

Parameters for updating player trust score.

Prop

Type

Prop

Type

Prop

Type


PixelsIdentifierLinkParams

Parameters for linking/unlinking player identifiers.

Prop

Type

Prop

Type

Prop

Type


PixelsModifyTagsParams

Parameters for adding/removing player tags.

Prop

Type

Prop

Type

Prop

Type


PixelsCallContextParams

Parameters for tracking custom context events.

Prop

Type

Prop

Type

Prop

Type


PixelsSetDynamicFieldParams

Parameters for setting dynamic player fields.

Prop

Type

Prop

Type

Prop

Type


Webhooks

PixelsOfferRewardWebhook

Webhook payload received when a player claims rewards via the Stacked iframe.

Prop

Type

Prop

Type

Prop

Type


TxSourceTarget

Transaction source/target types.

type TxSourceTarget =
  | 'player'
  | 'store'
  | 'marketplace'
  | 'auction'
  | (string & {});

Consumer Types

These are simplified/specialized versions of the base Analytics SDK types, used by consumer-facing SDK methods.

PixelsEarnCurrencyParams

Parameters for earning currency (simplified from PixelsCurrencyTxParams).

Prop

Type

Prop

Type

Prop

Type


PixelsSpendCurrencyParams

Parameters for spending currency (simplified from PixelsCurrencyTxParams).

Prop

Type

Prop

Type

Prop

Type


PixelsWithdrawCurrencyParams

Parameters for withdrawing currency (simplified from PixelsCurrencyTxParams).

Prop

Type

Prop

Type

Prop

Type


PixelsDepositCurrencyParams

Parameters for depositing currency (simplified from PixelsCurrencyTxParams).

Prop

Type

Prop

Type

Prop

Type


PixelsGainItemParams

Parameters for gaining items (simplified from PixelsItemTxParams).

Prop

Type

Prop

Type

Prop

Type


PixelsLoseItemParams

Parameters for losing items (simplified from PixelsItemTxParams).

Prop

Type

Prop

Type

Prop

Type


PixelsGainManyItemsParams

Parameters for gaining multiple items at once.

Prop

Type

Prop

Type

Prop

Type


PixelsLoseManyItemsParams

Parameters for losing multiple items at once.

Prop

Type

Prop

Type

Prop

Type


PixelsGainAchievementParams

Parameters for gaining achievements.

Prop

Type

Prop

Type

Prop

Type


PixelsLoseAchievementParams

Parameters for losing achievements.

Prop

Type

Prop

Type

Prop

Type


PixelsGainMembershipParams

Parameters for gaining memberships.

Prop

Type

Prop

Type

Prop

Type


PixelsLoseMembershipParams

Parameters for losing/revoking memberships.

Prop

Type

Prop

Type

Prop

Type


PixelsFunnelStartParams

Parameters for starting a funnel/quest.

Prop

Type

Prop

Type

Prop

Type


PixelsFunnelProgressionParams

Parameters for tracking funnel/quest progression.

Prop

Type

Prop

Type

Prop

Type


PixelsFunnelEndParams

Parameters for completing or aborting a funnel/quest.

Prop

Type

Prop

Type

Prop

Type


PixelsReferUserConsumerParams

Parameters for tracking referrals (consumer version with referrer_id).

Prop

Type

Prop

Type

Prop

Type


PixelsAddTagsParams

Parameters for adding tags to players.

Prop

Type

Prop

Type

Prop

Type


PixelsRemoveTagsParams

Parameters for removing tags from players.

Prop

Type

Prop

Type

Prop

Type


PixelsPlayerTradeParams

Parameters for tracking player-to-player trades.


PixelsPlayerTradeData

Trade data for a single player in a trade.

Prop

Type

Prop

Type

Prop

Type


PixelsLinkUserParams

Parameters for linking another user/player to the current user.

Prop

Type

Prop

Type

Prop

Type


PixelsUnlinkUserParams

Parameters for unlinking a previously linked user/player.

Prop

Type

Prop

Type

Prop

Type


Utility Types

ReservedPixelsAnalyticsEvent

Reserved event names used by the Analytics SDK.

type ReservedPixelsAnalyticsEvent = "sign_in" 
  | "sign_up" 
  | "identifier_link" 
  | "trust_score" 
  | "membership_tx" 
  | "currency_tx" 
  | "item_tx" 
  | "funnel_step" 
  | "level_up" 
  | "refer_user" 
  | "achievement_tx" 
  | "player_snapshot" 
  | "modify_tags" 
  | "blockchain_staking_staked_v2" 
  | "blockchain_staking_unstaked_v2"
  | "call_context" 
  | "set_dynamic_field" 
  | "delete_dynamic_field";

PixelsCustomParams

Custom parameters for events (all keys must be lowercase).

interface PixelsCustomParams {
  [key: `${Lowercase<string>}`]: any;
}