@mpgd/adapter-ait 0.13.3 → 0.14.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/host.d.ts CHANGED
@@ -2,6 +2,8 @@ import { getTossShareLink, grantPromotionRewardForGame as grantPromotionReward,
2
2
  import type { Entitlement, LogicalProductId, NotificationTopic, ShareResult } from '@mpgd/platform';
3
3
  import type { AitAdPlacementType } from './ad-config.js';
4
4
  import type { GamePlatformBridge } from './index.js';
5
+ export { aitIapDiagnosticCodes, aitIapProductNotGrantedByPartnerCode, type AitIapDiagnosticCode, } from './iap-diagnostics.js';
6
+ export { aitBrowserOrigins, isAitBrowserOrigin } from './origins.js';
5
7
  export type AitIdentityProvider = () => Promise<unknown>;
6
8
  /**
7
9
  * Shares one game identity hash read across a wrapper session.
@@ -65,7 +67,18 @@ export interface AitIapProductGrantVerificationInput {
65
67
  readonly orderId: string;
66
68
  readonly productId: LogicalProductId;
67
69
  readonly platformSku: string;
70
+ /** Order-scoped server idempotency key: `apps-in-toss:purchase:<encoded order id>`. */
68
71
  readonly idempotencyKey: string;
72
+ /**
73
+ * The game's own `commerce.purchase` idempotency key for the attempt that
74
+ * opened this order. It is present on every path where the bridge can link
75
+ * the order to a client attempt (the grant callback, a direct re-verify, and
76
+ * restore or pre-checkout recovery of an order this device started), and
77
+ * absent when no link survives (for example after native storage loss).
78
+ * Use it to associate the order with a game operation; keep `idempotencyKey`
79
+ * as the grant authority identity.
80
+ */
81
+ readonly clientIdempotencyKey?: string;
69
82
  readonly source: 'process-product-grant' | 'pending-order-restore';
70
83
  /** Client callback time only; the game authority must use the order status time. */
71
84
  readonly purchasedAt: string;
@@ -165,4 +178,3 @@ interface AitShareDependencies {
165
178
  readonly share: typeof share;
166
179
  }
167
180
  export declare function shareIntent(payload: unknown, dependencies: AitShareDependencies): Promise<ShareResult>;
168
- export {};