@moonpay/platform-protocol 1.16.0 → 1.19.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 +1 @@
1
- {"version":3,"sources":["../../src/frames/challenge.ts"],"sourcesContent":["import type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\n/**\n * Mirrors the MoonPay API's `GuestCheckoutLimitUpgradeStatus` — a durable,\n * poll-any-time-later fact rather than a short-lived value: `upgraded` and\n * `rejected` reflect a persisted review outcome, not a transient in-progress signal.\n */\nexport type GuestCheckoutLimitUpgradeStatus = 'pending' | 'upgraded' | 'rejected';\n\nexport type CompleteResult =\n | { flow: 'buy'; transaction: FrameTransaction }\n | { flow: 'identity'; identityId: string }\n | { flow: 'guest_checkout_limit_upgrade'; status: GuestCheckoutLimitUpgradeStatus };\n\nexport type Cancellation =\n | { flow: 'buy'; transactionId?: string; challengeToken?: string }\n | { flow: 'identity' }\n | { flow: 'guest_checkout_limit_upgrade' };\n\n/**\n * The challenge frame is fully self-contained — it is driven by the\n * `challengeToken` URL param. There is no parent → child message map.\n */\nexport interface MessageMap {\n ready: void;\n complete: CompleteResult;\n /** User dismissed the challenge. Carry `transactionId` / `challengeToken` to resume. */\n cancelled: Cancellation;\n error: FrameError;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/frames/challenge.ts"],"sourcesContent":["import type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\n/**\n * Mirrors the MoonPay API's `GuestCheckoutLimitUpgradeStatus` — a durable,\n * poll-any-time-later fact rather than a short-lived value: `upgraded` and\n * `rejected` reflect a persisted review outcome, not a transient in-progress signal.\n */\nexport type GuestCheckoutLimitUpgradeStatus = 'pending' | 'upgraded' | 'rejected';\n\nexport type CompleteResult = (\n | { flow: 'buy'; transaction: FrameTransaction }\n | { flow: 'identity'; identityId: string }\n | { flow: 'guest_checkout_limit_upgrade'; status: GuestCheckoutLimitUpgradeStatus }\n) & {\n sessionUpgraded?: true;\n};\n\nexport type Cancellation =\n | { flow: 'buy'; transactionId?: string; challengeToken?: string }\n | { flow: 'identity' }\n | { flow: 'guest_checkout_limit_upgrade' };\n\n/**\n * The challenge frame is fully self-contained — it is driven by the\n * `challengeToken` URL param. There is no parent → child message map.\n */\nexport interface MessageMap {\n ready: void;\n complete: CompleteResult;\n /** User dismissed the challenge. Carry `transactionId` / `challengeToken` to resume. */\n cancelled: Cancellation;\n error: FrameError;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -7,7 +7,7 @@ import { FrameError } from '../protocol.cjs';
7
7
  * `rejected` reflect a persisted review outcome, not a transient in-progress signal.
8
8
  */
9
9
  type GuestCheckoutLimitUpgradeStatus = 'pending' | 'upgraded' | 'rejected';
10
- type CompleteResult = {
10
+ type CompleteResult = ({
11
11
  flow: 'buy';
12
12
  transaction: FrameTransaction;
13
13
  } | {
@@ -16,6 +16,8 @@ type CompleteResult = {
16
16
  } | {
17
17
  flow: 'guest_checkout_limit_upgrade';
18
18
  status: GuestCheckoutLimitUpgradeStatus;
19
+ }) & {
20
+ sessionUpgraded?: true;
19
21
  };
20
22
  type Cancellation = {
21
23
  flow: 'buy';
@@ -7,7 +7,7 @@ import { FrameError } from '../protocol.js';
7
7
  * `rejected` reflect a persisted review outcome, not a transient in-progress signal.
8
8
  */
9
9
  type GuestCheckoutLimitUpgradeStatus = 'pending' | 'upgraded' | 'rejected';
10
- type CompleteResult = {
10
+ type CompleteResult = ({
11
11
  flow: 'buy';
12
12
  transaction: FrameTransaction;
13
13
  } | {
@@ -16,6 +16,8 @@ type CompleteResult = {
16
16
  } | {
17
17
  flow: 'guest_checkout_limit_upgrade';
18
18
  status: GuestCheckoutLimitUpgradeStatus;
19
+ }) & {
20
+ sessionUpgraded?: true;
19
21
  };
20
22
  type Cancellation = {
21
23
  flow: 'buy';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moonpay/platform-protocol",
3
- "version": "1.16.0",
3
+ "version": "1.19.0",
4
4
  "description": "Shared protocol types for the MoonPay Developer Platform",
5
5
  "type": "module",
6
6
  "exports": {