@stackedapp/types 1.9.10 → 1.9.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -729,10 +729,7 @@ type Nullable<T> = {
729
729
  /** this is the Stacked platforms' copy of a user/entity's snapshot for the current app/game */
730
730
  type StackedSnapshot = Nullable<Pick<IPlayerSnapshot, '_id' | 'gameId' | 'playerId' | 'unifiedUserLinkedAt' | 'unifiedUserUnlinkedAt' | 'referredById' | 'username' | 'snapshotLastUpdated' | 'offersLastChecked' | 'daysInGame' | 'loginStreak' | 'daysInGameLastUpdated' | 'dateSignedUp' | 'dynamic' | 'stakedTokens' | 'currencies' | 'levels' | 'quests' | 'trustScore' | 'trustLastUpdated' | 'achievements' | 'memberships' | 'cryptoWallets' | 'identifiers' | 'entityKind' | 'entityLinks'>>;
731
731
  /** Currencies for this entity that is populated with name and image information */
732
- type StackedEntityCurrencies = Record<string, IPlayerDataCurrency & {
733
- name: string;
734
- image?: string;
735
- }>;
732
+ type StackedEntityCurrencies = Record<string, IPlayerDataCurrency>;
736
733
  /** represents a stacked entity's snapshot's data within a specific app/game. This is scoped to the app/game!
737
734
  * Has information about stacked currencies of this entity earned through this specific app/game
738
735
  */
@@ -843,15 +840,30 @@ interface StackedUserComplete {
843
840
  };
844
841
  }
845
842
 
843
+ type StackedAsset = {
844
+ name: string;
845
+ image: string;
846
+ };
847
+ /** Relevant assets like currencies with name image information so that the client
848
+ * can render name/image
849
+ */
850
+ interface StackedAssets {
851
+ currencies: Record<string, StackedAsset>;
852
+ }
853
+
846
854
  /** Base campaigns response - shared fields between client and server */
847
855
  interface StackedCampaignsBaseResponse extends StackedUserResponse {
848
856
  /** List of offers/campaigns for the player */
849
857
  offers: StackedOffer[];
850
858
  /**
851
859
  * @deprecated
852
- * look at stackedData.currencies instead.
853
- * Currencies with name and image and balance information */
854
- currencies?: StackedEntityCurrencies;
860
+ * look at assets for currencies asset information name/image. The actually currencies on
861
+ * the player is in stackedUser.currencies */
862
+ currencies?: Record<string, StackedAsset>;
863
+ /** Relevant assets like currencies with name image information so that the client
864
+ * can render name/image
865
+ */
866
+ assets: StackedAssets;
855
867
  }
856
868
  /** Client-side campaigns response (from JWT-authenticated endpoints). Returns a list of offers plus
857
869
  * user snapshot and stacked user-specific data.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackedapp/types",
3
- "version": "1.9.10",
3
+ "version": "1.9.12",
4
4
  "description": "Public types for Stacked platform SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/stacked-types.d.ts",