@stackedapp/types 1.15.10 → 1.15.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.
package/dist/index.js CHANGED
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.isEmptyDelta = void 0;
18
17
  // Re-export all public types
19
18
  __exportStar(require("./stacked_offer"), exports);
20
19
  __exportStar(require("./stacked_reward"), exports);
@@ -24,6 +23,4 @@ __exportStar(require("./stacked_response"), exports);
24
23
  __exportStar(require("./stacked_content"), exports);
25
24
  __exportStar(require("./stacked_app"), exports);
26
25
  __exportStar(require("./stacked_currency"), exports);
27
- var player_delta_1 = require("@stackedplatform/types/pubsub/player_delta");
28
- Object.defineProperty(exports, "isEmptyDelta", { enumerable: true, get: function () { return player_delta_1.isEmptyDelta; } });
29
26
  //# sourceMappingURL=index.js.map
@@ -741,6 +741,28 @@ type StackedEntityCurrencies = Record<string, IPlayerDataCurrency>;
741
741
  type StackedEntityData = Pick<IPlayerData, 'gameId' | 'playerId'> & {
742
742
  currencies?: StackedEntityCurrencies;
743
743
  };
744
+ interface StackedPlayerDelta {
745
+ /** What type of data is being updated */
746
+ target: 'offers' | 'snapshot';
747
+ /** For offer updates: the affected playerOffer IDs */
748
+ offers?: string[];
749
+ /** Replace value: local[path] = value */
750
+ set?: Record<string, unknown>;
751
+ /** Increment value: local[path] = (local[path] ?? 0) + delta */
752
+ inc?: Record<string, number>;
753
+ /** Keep minimum: local[path] = Math.min(local[path], value) */
754
+ min?: Record<string, number>;
755
+ /** Keep maximum: local[path] = Math.max(local[path], value) */
756
+ max?: Record<string, number>;
757
+ /** Remove fields: delete local[path] */
758
+ unset?: string[];
759
+ /** Add to array if not exists (match by key like address, identifier, playerId) */
760
+ addToSet?: Record<string, unknown[]>;
761
+ /** Append to array (allows duplicates) */
762
+ push?: Record<string, unknown[]>;
763
+ /** Remove from array where matches criteria */
764
+ pull?: Record<string, unknown[]>;
765
+ }
744
766
 
745
767
  type StackedBaseConditions = IBaseCondition;
746
768
  type StackedCompletionConditions = ICompletionCondition;
@@ -1261,145 +1283,13 @@ interface IAppState {
1261
1283
  type StackedThirdPartyApp = Pick<IThirdPartyApp, 'id' | 'displayName' | 'image' | 'showLinkable' | 'unlinkable' | 'autoAdd' | 'url' | 'tagline' | 'description' | 'genres' | 'trailerUrl' | 'gameThumbnail' | 'logo' | 'squareLogo' | 'headerImage' | 'squareScreenshot' | 'screenshots' | 'appStoreUrl' | 'playStoreUrl' | 'webUrl' | 'landingPageUrl' | 'appStoreRating' | 'appStoreRatingCount' | 'playStoreRating' | 'playStoreRatingCount'>;
1262
1284
  type StackedAppState = Pick<IAppState, 'featureFlags' | 'maxCryptoWallets' | 'maxOfferSlots' | 'restrictedCountryCodes' | 'deleteWalletThresholdDays'>;
1263
1285
 
1264
- declare const SupportedNetworks: readonly [
1265
- 'ethereum',
1266
- 'sepolia',
1267
- 'ronin',
1268
- 'saigon',
1269
- 'worldChainMainnet',
1270
- 'worldChainSepolia',
1271
- 'shapeMainnet',
1272
- 'shapeSepolia',
1273
- 'ethereumHolešky',
1274
- 'ethereumHoodi',
1275
- 'ethereumMainnetBeacon',
1276
- 'ethereumSepoliaBeacon',
1277
- 'ethereumHoleškyBeacon',
1278
- 'ethereumHoodiBeacon',
1279
- 'zksyncMainnet',
1280
- 'zksyncSepolia',
1281
- 'opMainnetMainnet',
1282
- 'opMainnetSepolia',
1283
- 'polygonMainnet',
1284
- 'polygonAmoy',
1285
- 'arbitrumMainnet',
1286
- 'arbitrumSepolia',
1287
- 'starknetMainnet',
1288
- 'starknetSepolia',
1289
- 'arbitrumNovaMainnet',
1290
- 'astarMainnet',
1291
- 'polygonZkevmMainnet',
1292
- 'polygonZkevmCardona',
1293
- 'zetachainMainnet',
1294
- 'zetachainTestnet',
1295
- 'mantleMainnet',
1296
- 'mantleSepolia',
1297
- 'berachainMainnet',
1298
- 'berachainBepolia',
1299
- 'blastMainnet',
1300
- 'blastSepolia',
1301
- 'lineaMainnet',
1302
- 'lineaSepolia',
1303
- 'zoraMainnet',
1304
- 'zoraSepolia',
1305
- 'plasmaMainnet',
1306
- 'plasmaTestnet',
1307
- 'settlusMainnet',
1308
- 'settlusSepolia',
1309
- 'bobMainnet',
1310
- 'bobSepolia',
1311
- 'megaethTestnet',
1312
- 'rootstockMainnet',
1313
- 'rootstockTestnet',
1314
- 'citreaTestnet',
1315
- 'teaSepolia',
1316
- 'solanaMainnet',
1317
- 'solanaDevnet',
1318
- 'gensynTestnet',
1319
- 'arcTestnet',
1320
- 'storyMainnet',
1321
- 'storyAeneid',
1322
- 'clankermonMainnet',
1323
- 'humanityMainnet',
1324
- 'humanityTestnet',
1325
- 'baseMainnet',
1326
- 'baseSepolia',
1327
- 'hyperliquidMainnet',
1328
- 'hyperliquidTestnet',
1329
- 'galacticaMainnet',
1330
- 'galacticaCassiopeia',
1331
- 'lensMainnet',
1332
- 'lensSepolia',
1333
- 'worldmobilechainMainnet',
1334
- 'fraxMainnet',
1335
- 'fraxSepolia',
1336
- 'inkMainnet',
1337
- 'inkSepolia',
1338
- 'avalancheMainnet',
1339
- 'avalancheFuji',
1340
- 'botanixMainnet',
1341
- 'botanixTestnet',
1342
- 'gnosisMainnet',
1343
- 'gnosisChiado',
1344
- 'celestiabridgeMainnet',
1345
- 'celestiabridgeMocha',
1346
- 'bnbSmartChainMainnet',
1347
- 'bnbSmartChainTestnet',
1348
- 'bobaMainnet',
1349
- 'bobaSepolia',
1350
- 'lumiaPrism',
1351
- 'lumiaBeam',
1352
- 'unichainMainnet',
1353
- 'unichainSepolia',
1354
- 'syndicateMainnet',
1355
- 'superseedMainnet',
1356
- 'superseedSepolia',
1357
- 'riseTestnet',
1358
- 'monadTestnet',
1359
- 'monadMainnet',
1360
- 'flowEvmMainnet',
1361
- 'flowEvmTestnet',
1362
- 'worldmobileTestnet',
1363
- 'tronMainnet',
1364
- 'tronTestnet',
1365
- 'degenMainnet',
1366
- 'bitcoinMainnet',
1367
- 'bitcoinTestnet',
1368
- 'bitcoinSignet',
1369
- 'polynomialMainnet',
1370
- 'polynomialSepolia',
1371
- 'modeMainnet',
1372
- 'modeSepolia',
1373
- 'moonbeamMainnet',
1374
- 'apechainMainnet',
1375
- 'apechainCurtis',
1376
- 'celoMainnet',
1377
- 'celoSepolia',
1378
- 'aptosMainnet',
1379
- 'aptosTestnet',
1380
- 'animeMainnet',
1381
- 'animeSepolia',
1382
- 'metisMainnet',
1383
- 'sonicMainnet',
1384
- 'sonicTestnet',
1385
- 'sonicBlaze',
1386
- 'seiMainnet',
1387
- 'seiTestnet',
1388
- 'xmtpRopsten',
1389
- 'adiTestnetAb',
1390
- 'scrollMainnet',
1391
- 'scrollSepolia',
1392
- 'opbnbMainnet',
1393
- 'opbnbTestnet',
1394
- 'crossfiTestnet',
1395
- 'crossfiMainnet',
1396
- 'abstractMainnet'
1397
- ];
1286
+ declare const SupportedNetworks: readonly ["ethereum", "sepolia", "ronin", "saigon", "worldChainMainnet", "worldChainSepolia", "shapeMainnet", "shapeSepolia", "ethereumHolešky", "ethereumHoodi", "ethereumMainnetBeacon", "ethereumSepoliaBeacon", "ethereumHoleškyBeacon", "ethereumHoodiBeacon", "zksyncMainnet", "zksyncSepolia", "opMainnetMainnet", "opMainnetSepolia", "polygonMainnet", "polygonAmoy", "arbitrumMainnet", "arbitrumSepolia", "starknetMainnet", "starknetSepolia", "arbitrumNovaMainnet", "astarMainnet", "polygonZkevmMainnet", "polygonZkevmCardona", "zetachainMainnet", "zetachainTestnet", "mantleMainnet", "mantleSepolia", "berachainMainnet", "berachainBepolia", "blastMainnet", "blastSepolia", "lineaMainnet", "lineaSepolia", "zoraMainnet", "zoraSepolia", "plasmaMainnet", "plasmaTestnet", "settlusMainnet", "settlusSepolia", "bobMainnet", "bobSepolia", "megaethTestnet", "rootstockMainnet", "rootstockTestnet", "citreaTestnet", "teaSepolia", "solanaMainnet", "solanaDevnet", "gensynTestnet", "arcTestnet", "storyMainnet", "storyAeneid", "clankermonMainnet", "humanityMainnet", "humanityTestnet", "baseMainnet", "baseSepolia", "hyperliquidMainnet", "hyperliquidTestnet", "galacticaMainnet", "galacticaCassiopeia", "lensMainnet", "lensSepolia", "worldmobilechainMainnet", "fraxMainnet", "fraxSepolia", "inkMainnet", "inkSepolia", "avalancheMainnet", "avalancheFuji", "botanixMainnet", "botanixTestnet", "gnosisMainnet", "gnosisChiado", "celestiabridgeMainnet", "celestiabridgeMocha", "bnbSmartChainMainnet", "bnbSmartChainTestnet", "bobaMainnet", "bobaSepolia", "lumiaPrism", "lumiaBeam", "unichainMainnet", "unichainSepolia", "syndicateMainnet", "superseedMainnet", "superseedSepolia", "riseTestnet", "monadTestnet", "monadMainnet", "flowEvmMainnet", "flowEvmTestnet", "worldmobileTestnet", "tronMainnet", "tronTestnet", "degenMainnet", "bitcoinMainnet", "bitcoinTestnet", "bitcoinSignet", "polynomialMainnet", "polynomialSepolia", "modeMainnet", "modeSepolia", "moonbeamMainnet", "apechainMainnet", "apechainCurtis", "celoMainnet", "celoSepolia", "aptosMainnet", "aptosTestnet", "animeMainnet", "animeSepolia", "metisMainnet", "sonicMainnet", "sonicTestnet", "sonicBlaze", "seiMainnet", "seiTestnet", "xmtpRopsten", "adiTestnetAb", "scrollMainnet", "scrollSepolia", "opbnbMainnet", "opbnbTestnet", "crossfiTestnet", "crossfiMainnet", "abstractMainnet"];
1398
1287
  type SupportedNetwork = (typeof SupportedNetworks)[number];
1399
1288
  interface ICurrency {
1400
1289
  _id: Stringable;
1401
1290
  /** if true, then this currency can be used as a reward currency from offerwall/neo */
1402
1291
  rewardable?: boolean;
1292
+ symbol?: string;
1403
1293
  /**
1404
1294
  * id of the currency: cur_pixel, cur_berry, cur_gold, etc.
1405
1295
  */
@@ -1571,38 +1461,6 @@ type StackedCurrency = Pick<ICurrency, 'id' | 'name' | 'image' | 'contractAddres
1571
1461
  };
1572
1462
  type StackedCurrencyPrice = ILibraryCurrencyPrice;
1573
1463
 
1574
- /**
1575
- * Unified delta format for real-time player updates via SSE.
1576
- * Used for both offer tracker updates and snapshot updates.
1577
- */
1578
- interface PlayerDelta {
1579
- /** What type of data is being updated */
1580
- target: 'offers' | 'snapshot';
1581
- /** For offer updates: the affected playerOffer IDs */
1582
- offers?: string[];
1583
- /** Replace value: local[path] = value */
1584
- set?: Record<string, unknown>;
1585
- /** Increment value: local[path] = (local[path] ?? 0) + delta */
1586
- inc?: Record<string, number>;
1587
- /** Keep minimum: local[path] = Math.min(local[path], value) */
1588
- min?: Record<string, number>;
1589
- /** Keep maximum: local[path] = Math.max(local[path], value) */
1590
- max?: Record<string, number>;
1591
- /** Remove fields: delete local[path] */
1592
- unset?: string[];
1593
- /** Add to array if not exists (match by key like address, identifier, playerId) */
1594
- addToSet?: Record<string, unknown[]>;
1595
- /** Append to array (allows duplicates) */
1596
- push?: Record<string, unknown[]>;
1597
- /** Remove from array where matches criteria */
1598
- pull?: Record<string, unknown[]>;
1599
- }
1600
- /**
1601
- * Helper to check if a delta has any operations
1602
- */
1603
- declare function isEmptyDelta(delta: PlayerDelta): boolean;
1604
-
1605
1464
  type StackedEnv = IEnv;
1606
1465
 
1607
- export { isEmptyDelta };
1608
- export type { CompleteCryptoAuthResponse, CompleteOAuthResponse, CompleteOneTimeAuthResponse, ConditionDetail, ConditionResult, CurrencyUnit, DeleteAccountResponse, ExchangeOneTimeTokenForSessionTokenResponse, ExchangeStackedLinkTokenResponse, GenerateStackedLinkTokenResponse, GetOneTimeAuthTokenResponse, IClientPlayerData, InitializeUnifiedUserResponse, LinkExternalGameToUnifiedAccountResponse, PlayerDelta, RemoveAuthMethodResponse, RemoveOAuthProviderResponse, SignOutUnifiedUserResponse, StackedAppConnection, StackedAppState, StackedBaseConditions, StackedBaseOffer, StackedBaseUser, StackedBaseUserExtra, StackedCampaignsResponse, StackedCampaignsServerResponse, StackedClaimableConditions, StackedClaimableTrackers, StackedCompletionConditions, StackedCompletionDynamicTracker, StackedCompletionTrackers, StackedContentItem, StackedContentResponse, StackedContentStats, StackedCurrency, StackedCurrencyPrice, StackedDynamicCondition, StackedDynamicGroup, StackedEntityCurrencies, StackedEntityData, StackedEnv, StackedOffer, StackedOfferHelpers, StackedOfferTrackers, StackedReward, StackedRewardKind, StackedSnapshot, StackedSnapshotProgress, StackedSocialTrackerAccumulate, StackedSocialTrackerAttach, StackedSupportedNetwork, StackedThirdPartyApp, StackedUser, StackedUserComplete, StackedUserOffer, StackedUserResponse, StackedUserWithApps, StartCryptoAuthResponse, StartOAuthAttachResponse, StartOAuthResponse, StartOneTimeAuthResponse, TeamProgress, UnlinkExternalGameFromUnifiedAccountResponse, UserOfferStatus };
1466
+ export type { CompleteCryptoAuthResponse, CompleteOAuthResponse, CompleteOneTimeAuthResponse, ConditionDetail, ConditionResult, CurrencyUnit, DeleteAccountResponse, ExchangeOneTimeTokenForSessionTokenResponse, ExchangeStackedLinkTokenResponse, GenerateStackedLinkTokenResponse, GetOneTimeAuthTokenResponse, IClientPlayerData, InitializeUnifiedUserResponse, LinkExternalGameToUnifiedAccountResponse, RemoveAuthMethodResponse, RemoveOAuthProviderResponse, SignOutUnifiedUserResponse, StackedAppConnection, StackedAppState, StackedBaseConditions, StackedBaseOffer, StackedBaseUser, StackedBaseUserExtra, StackedCampaignsResponse, StackedCampaignsServerResponse, StackedClaimableConditions, StackedClaimableTrackers, StackedCompletionConditions, StackedCompletionDynamicTracker, StackedCompletionTrackers, StackedContentItem, StackedContentResponse, StackedContentStats, StackedCurrency, StackedCurrencyPrice, StackedDynamicCondition, StackedDynamicGroup, StackedEntityCurrencies, StackedEntityData, StackedEnv, StackedOffer, StackedOfferHelpers, StackedOfferTrackers, StackedPlayerDelta, StackedReward, StackedRewardKind, StackedSnapshot, StackedSnapshotProgress, StackedSocialTrackerAccumulate, StackedSocialTrackerAttach, StackedSupportedNetwork, StackedThirdPartyApp, StackedUser, StackedUserComplete, StackedUserOffer, StackedUserResponse, StackedUserWithApps, StartCryptoAuthResponse, StartOAuthAttachResponse, StartOAuthResponse, StartOneTimeAuthResponse, TeamProgress, UnlinkExternalGameFromUnifiedAccountResponse, UserOfferStatus };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackedapp/types",
3
- "version": "1.15.10",
3
+ "version": "1.15.12",
4
4
  "description": "Public types for Stacked platform SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/stacked-types.d.ts",