@mpgd/platform 0.19.0 → 0.20.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.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { AdProvider } from './ads.js';
2
+ import type { CommerceProvider } from './commerce-contract.js';
2
3
  export type PlatformTarget = 'browser' | 'microsoft-store' | 'android' | 'ios' | 'ait' | 'reddit' | 'verse8' | 'crazygames' | 'oneplay' | 'telegram' | 'tauri' | 'wechat' | 'tiktok';
3
4
  export type StarterLogicalProductId = 'COINS_100' | 'COINS_500' | 'REMOVE_ADS';
4
5
  export type LogicalProductId = StarterLogicalProductId | (string & Record<never, never>);
@@ -481,6 +482,13 @@ export interface PlatformGateway {
481
482
  getCapabilities(): Promise<PlatformCapabilities>;
482
483
  readonly identity: IdentityAdapter;
483
484
  readonly commerce: CommerceAdapter;
485
+ /**
486
+ * Optional commerce v2 provider (`@mpgd/platform/commerce`). Transitional:
487
+ * adapters expose it next to the v1 `commerce` adapter until C4 removes v1,
488
+ * and the game-services reconciler (C1) prefers it when present. Absent on
489
+ * gateways whose target has no v2 provider.
490
+ */
491
+ readonly commerceV2?: CommerceProvider;
484
492
  readonly ads: AdAdapter;
485
493
  readonly leaderboard: LeaderboardAdapter;
486
494
  readonly lifecycle: LifecycleAdapter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpgd/platform",
3
- "version": "0.19.0",
3
+ "version": "0.20.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": {