@stackedapp/types 1.15.10 → 1.15.11
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 -3
- package/dist/stacked-types.d.ts +23 -33
- package/package.json +1 -1
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
|
package/dist/stacked-types.d.ts
CHANGED
|
@@ -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;
|
|
@@ -1571,38 +1593,6 @@ type StackedCurrency = Pick<ICurrency, 'id' | 'name' | 'image' | 'contractAddres
|
|
|
1571
1593
|
};
|
|
1572
1594
|
type StackedCurrencyPrice = ILibraryCurrencyPrice;
|
|
1573
1595
|
|
|
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
1596
|
type StackedEnv = IEnv;
|
|
1606
1597
|
|
|
1607
|
-
export {
|
|
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 };
|
|
1598
|
+
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 };
|