@mpgd/platform 0.8.0 → 0.9.0

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.
@@ -1,5 +1,5 @@
1
1
  import type { PlatformCapabilities, PlatformGateway, PlatformTarget } from './index.js';
2
- export declare const platformCapabilityKeys: readonly ["nativeIap", "nativeAds", "rewardedAds", "interstitialAds", "nativeLeaderboard", "achievements", "cloudSave", "socialShare", "haptics", "localizedContent"];
2
+ export declare const platformCapabilityKeys: readonly ["nativeIap", "nativeAds", "rewardedAds", "interstitialAds", "nativeLeaderboard", "remoteLeaderboard", "achievements", "cloudSave", "socialShare", "haptics", "localizedContent"];
3
3
  export interface PlatformGatewayCapabilityConformanceTransition {
4
4
  readonly update: () => Promise<void> | void;
5
5
  readonly expectedCapabilities: PlatformCapabilities;
@@ -4,6 +4,7 @@ export const platformCapabilityKeys = Object.freeze([
4
4
  'rewardedAds',
5
5
  'interstitialAds',
6
6
  'nativeLeaderboard',
7
+ 'remoteLeaderboard',
7
8
  'achievements',
8
9
  'cloudSave',
9
10
  'socialShare',
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type PlatformTarget = 'browser' | 'android' | 'ios' | 'ait' | 'reddit' | 'verse8' | 'telegram' | 'tauri';
1
+ export type PlatformTarget = 'browser' | 'microsoft-store' | 'android' | 'ios' | 'ait' | 'reddit' | 'verse8' | 'telegram' | 'tauri';
2
2
  export type StarterLogicalProductId = 'COINS_100' | 'COINS_500' | 'REMOVE_ADS';
3
3
  export type LogicalProductId = StarterLogicalProductId | (string & Record<never, never>);
4
4
  export type StarterLogicalAdPlacementId = 'CONTINUE_AFTER_FAIL' | 'STAGE_END_INTERSTITIAL';
@@ -29,6 +29,11 @@ export interface PurchaseResult {
29
29
  readonly transactionId?: string;
30
30
  readonly entitlementIds: readonly string[];
31
31
  readonly evidence?: PlatformEvidenceEnvelope;
32
+ /** Present only when the adapter already completed the authoritative server grant. */
33
+ readonly authoritativeGrant?: Readonly<{
34
+ readonly ledgerEntryId: string;
35
+ readonly alreadyProcessed?: boolean;
36
+ }>;
32
37
  }
33
38
  export interface PurchaseRestoreResult {
34
39
  readonly restoredEntitlements: readonly Entitlement[];
@@ -111,6 +116,8 @@ export interface PlatformCapabilities {
111
116
  readonly rewardedAds: boolean;
112
117
  readonly interstitialAds: boolean;
113
118
  readonly nativeLeaderboard: boolean;
119
+ /** A game-owned server leaderboard is available without a native platform surface. */
120
+ readonly remoteLeaderboard: boolean;
114
121
  readonly achievements: boolean;
115
122
  readonly cloudSave: boolean;
116
123
  readonly socialShare: boolean;
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@ export function createUnsupportedCapabilities() {
14
14
  rewardedAds: false,
15
15
  interstitialAds: false,
16
16
  nativeLeaderboard: false,
17
+ remoteLeaderboard: false,
17
18
  achievements: false,
18
19
  cloudSave: false,
19
20
  socialShare: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpgd/platform",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Shared platform gateway, monetization, ads, leaderboard, identity, lifecycle, and storage contracts for mpgd games.",
5
5
  "license": "MIT",
6
6
  "repository": {