@stackedapp/types 1.15.8 → 1.15.10
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 +0 -1
- package/dist/stacked-types.d.ts +32 -32
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24,7 +24,6 @@ __exportStar(require("./stacked_response"), exports);
|
|
|
24
24
|
__exportStar(require("./stacked_content"), exports);
|
|
25
25
|
__exportStar(require("./stacked_app"), exports);
|
|
26
26
|
__exportStar(require("./stacked_currency"), exports);
|
|
27
|
-
// Re-export delta types for real-time updates
|
|
28
27
|
var player_delta_1 = require("@stackedplatform/types/pubsub/player_delta");
|
|
29
28
|
Object.defineProperty(exports, "isEmptyDelta", { enumerable: true, get: function () { return player_delta_1.isEmptyDelta; } });
|
|
30
29
|
//# sourceMappingURL=index.js.map
|
package/dist/stacked-types.d.ts
CHANGED
|
@@ -1,34 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unified delta format for real-time player updates via SSE.
|
|
3
|
-
* Used for both offer tracker updates and snapshot updates.
|
|
4
|
-
*/
|
|
5
|
-
interface PlayerDelta {
|
|
6
|
-
/** What type of data is being updated */
|
|
7
|
-
target: 'offers' | 'snapshot';
|
|
8
|
-
/** For offer updates: the affected playerOffer IDs */
|
|
9
|
-
offers?: string[];
|
|
10
|
-
/** Replace value: local[path] = value */
|
|
11
|
-
set?: Record<string, unknown>;
|
|
12
|
-
/** Increment value: local[path] = (local[path] ?? 0) + delta */
|
|
13
|
-
inc?: Record<string, number>;
|
|
14
|
-
/** Keep minimum: local[path] = Math.min(local[path], value) */
|
|
15
|
-
min?: Record<string, number>;
|
|
16
|
-
/** Keep maximum: local[path] = Math.max(local[path], value) */
|
|
17
|
-
max?: Record<string, number>;
|
|
18
|
-
/** Remove fields: delete local[path] */
|
|
19
|
-
unset?: string[];
|
|
20
|
-
/** Add to array if not exists (match by key like address, identifier, playerId) */
|
|
21
|
-
addToSet?: Record<string, unknown[]>;
|
|
22
|
-
/** Append to array (allows duplicates) */
|
|
23
|
-
push?: Record<string, unknown[]>;
|
|
24
|
-
/** Remove from array where matches criteria */
|
|
25
|
-
pull?: Record<string, unknown[]>;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Helper to check if a delta has any operations
|
|
29
|
-
*/
|
|
30
|
-
declare function isEmptyDelta(delta: PlayerDelta): boolean;
|
|
31
|
-
|
|
32
1
|
interface Stringable {
|
|
33
2
|
toString(): string;
|
|
34
3
|
}
|
|
@@ -1289,7 +1258,7 @@ interface IAppState {
|
|
|
1289
1258
|
activeListeners?: Record<string, IActiveListener[]>;
|
|
1290
1259
|
}
|
|
1291
1260
|
|
|
1292
|
-
type StackedThirdPartyApp = Pick<IThirdPartyApp, 'id' | 'displayName' | 'image' | 'showLinkable' | 'url' | 'tagline' | 'description' | 'genres' | 'trailerUrl' | 'gameThumbnail' | 'logo' | 'squareLogo' | 'headerImage' | 'squareScreenshot' | 'screenshots' | 'appStoreUrl' | 'playStoreUrl' | 'webUrl' | 'landingPageUrl' | 'appStoreRating' | 'appStoreRatingCount' | 'playStoreRating' | 'playStoreRatingCount'>;
|
|
1261
|
+
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'>;
|
|
1293
1262
|
type StackedAppState = Pick<IAppState, 'featureFlags' | 'maxCryptoWallets' | 'maxOfferSlots' | 'restrictedCountryCodes' | 'deleteWalletThresholdDays'>;
|
|
1294
1263
|
|
|
1295
1264
|
declare const SupportedNetworks: readonly [
|
|
@@ -1602,6 +1571,37 @@ type StackedCurrency = Pick<ICurrency, 'id' | 'name' | 'image' | 'contractAddres
|
|
|
1602
1571
|
};
|
|
1603
1572
|
type StackedCurrencyPrice = ILibraryCurrencyPrice;
|
|
1604
1573
|
|
|
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
1605
|
type StackedEnv = IEnv;
|
|
1606
1606
|
|
|
1607
1607
|
export { isEmptyDelta };
|