@moonpay/platform-protocol 1.24.0 → 1.24.2

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) & {\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":[]}
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 /**\n * Fired the instant the user taps the native pay button inside the challenge\n * frame's payment sheet (Apple Pay / Google Pay), BEFORE the OS payment sheet\n * is presented. This is an intent-to-buy / tap signal, distinct from\n * `complete` (the purchase outcome). It fires unconditionally on tap, even if\n * the user later cancels the sheet.\n */\n buttonPressed: 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":[]}
@@ -34,6 +34,14 @@ type Cancellation = {
34
34
  */
35
35
  interface MessageMap {
36
36
  ready: void;
37
+ /**
38
+ * Fired the instant the user taps the native pay button inside the challenge
39
+ * frame's payment sheet (Apple Pay / Google Pay), BEFORE the OS payment sheet
40
+ * is presented. This is an intent-to-buy / tap signal, distinct from
41
+ * `complete` (the purchase outcome). It fires unconditionally on tap, even if
42
+ * the user later cancels the sheet.
43
+ */
44
+ buttonPressed: void;
37
45
  complete: CompleteResult;
38
46
  /** User dismissed the challenge. Carry `transactionId` / `challengeToken` to resume. */
39
47
  cancelled: Cancellation;
@@ -34,6 +34,14 @@ type Cancellation = {
34
34
  */
35
35
  interface MessageMap {
36
36
  ready: void;
37
+ /**
38
+ * Fired the instant the user taps the native pay button inside the challenge
39
+ * frame's payment sheet (Apple Pay / Google Pay), BEFORE the OS payment sheet
40
+ * is presented. This is an intent-to-buy / tap signal, distinct from
41
+ * `complete` (the purchase outcome). It fires unconditionally on tap, even if
42
+ * the user later cancels the sheet.
43
+ */
44
+ buttonPressed: void;
37
45
  complete: CompleteResult;
38
46
  /** User dismissed the challenge. Carry `transactionId` / `challengeToken` to resume. */
39
47
  cancelled: Cancellation;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/sdks/challenge.ts"],"sourcesContent":["import type * as ChallengeFrame from '../frames/challenge.js';\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'complete'; payload: ChallengeFrame.CompleteResult }\n | { kind: 'cancelled'; payload: ChallengeFrame.Cancellation }\n | { kind: 'error'; payload: ChallengeFrame.MessageMap['error'] };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/sdks/challenge.ts"],"sourcesContent":["import type * as ChallengeFrame from '../frames/challenge.js';\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'buttonPressed' }\n | { kind: 'complete'; payload: ChallengeFrame.CompleteResult }\n | { kind: 'cancelled'; payload: ChallengeFrame.Cancellation }\n | { kind: 'error'; payload: ChallengeFrame.MessageMap['error'] };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -4,6 +4,8 @@ import '../protocol.cjs';
4
4
 
5
5
  type Event = {
6
6
  kind: 'ready';
7
+ } | {
8
+ kind: 'buttonPressed';
7
9
  } | {
8
10
  kind: 'complete';
9
11
  payload: CompleteResult;
@@ -4,6 +4,8 @@ import '../protocol.js';
4
4
 
5
5
  type Event = {
6
6
  kind: 'ready';
7
+ } | {
8
+ kind: 'buttonPressed';
7
9
  } | {
8
10
  kind: 'complete';
9
11
  payload: CompleteResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moonpay/platform-protocol",
3
- "version": "1.24.0",
3
+ "version": "1.24.2",
4
4
  "description": "Shared protocol types for the MoonPay Developer Platform",
5
5
  "type": "module",
6
6
  "exports": {