@moonpay/platform-protocol 1.8.0 → 1.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 +1 @@
1
- {"version":3,"sources":["../../src/frames/apple-pay.ts"],"sourcesContent":["import type { ChallengeRequired } from '../models/challenge.js';\nimport type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport interface InboundMessageMap {\n ready: void;\n error: FrameError<\n 'configurationError' | 'quoteExpired' | 'invalidQuote' | 'applePayUnavailable' | 'generic'\n >;\n /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */\n challenge: ChallengeRequired;\n complete: { transaction: FrameTransaction };\n}\n\nexport interface OutboundMessageMap {\n setQuote: { quote: { signature: string } };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/frames/apple-pay.ts"],"sourcesContent":["import type { ChallengeRequired } from '../models/challenge.js';\nimport type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport interface InboundMessageMap {\n ready: void;\n error: FrameError<\n 'configurationError' | 'quoteExpired' | 'invalidQuote' | 'applePayUnavailable' | 'generic'\n >;\n /**\n * Fired the instant the user taps the native Apple Pay button, BEFORE the OS\n * payment sheet is presented. This is an intent-to-buy / tap signal, distinct\n * from `complete` (the purchase outcome). It fires unconditionally on tap,\n * even if the user later cancels the sheet.\n */\n buttonPressed: void;\n /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */\n challenge: ChallengeRequired;\n complete: { transaction: FrameTransaction };\n}\n\nexport interface OutboundMessageMap {\n setQuote: { quote: { signature: string } };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -5,6 +5,13 @@ import { FrameError } from '../protocol.cjs';
5
5
  interface InboundMessageMap {
6
6
  ready: void;
7
7
  error: FrameError<'configurationError' | 'quoteExpired' | 'invalidQuote' | 'applePayUnavailable' | 'generic'>;
8
+ /**
9
+ * Fired the instant the user taps the native Apple Pay button, BEFORE the OS
10
+ * payment sheet is presented. This is an intent-to-buy / tap signal, distinct
11
+ * from `complete` (the purchase outcome). It fires unconditionally on tap,
12
+ * even if the user later cancels the sheet.
13
+ */
14
+ buttonPressed: void;
8
15
  /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
9
16
  challenge: ChallengeRequired;
10
17
  complete: {
@@ -5,6 +5,13 @@ import { FrameError } from '../protocol.js';
5
5
  interface InboundMessageMap {
6
6
  ready: void;
7
7
  error: FrameError<'configurationError' | 'quoteExpired' | 'invalidQuote' | 'applePayUnavailable' | 'generic'>;
8
+ /**
9
+ * Fired the instant the user taps the native Apple Pay button, BEFORE the OS
10
+ * payment sheet is presented. This is an intent-to-buy / tap signal, distinct
11
+ * from `complete` (the purchase outcome). It fires unconditionally on tap,
12
+ * even if the user later cancels the sheet.
13
+ */
14
+ buttonPressed: void;
8
15
  /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
9
16
  challenge: ChallengeRequired;
10
17
  complete: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/frames/buy-button.ts"],"sourcesContent":["import type { ChallengeRequired } from '../models/challenge.js';\nimport type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport interface MessageMap {\n /** Frame's UI is rendered and ready to be shown. */\n ready: void;\n complete: { transaction: FrameTransaction };\n /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */\n challenge: ChallengeRequired;\n error: FrameError;\n}\n\nexport interface OutboundMessageMap {\n setQuote: { quote: { signature: string } };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/frames/buy-button.ts"],"sourcesContent":["import type { ChallengeRequired } from '../models/challenge.js';\nimport type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport interface MessageMap {\n /** Frame's UI is rendered and ready to be shown. */\n ready: void;\n /**\n * Fired the instant the user taps the native wallet-pay button (Apple Pay /\n * Google Pay) rendered by the buy button frame, BEFORE the OS payment sheet is\n * presented. This is an intent-to-buy / tap signal, distinct from `complete`\n * (the purchase outcome). It fires unconditionally on tap, even if the user\n * later cancels the sheet.\n */\n buttonPressed: void;\n complete: { transaction: FrameTransaction };\n /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */\n challenge: ChallengeRequired;\n error: FrameError;\n}\n\nexport interface OutboundMessageMap {\n setQuote: { quote: { signature: string } };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -5,6 +5,14 @@ import { FrameError } from '../protocol.cjs';
5
5
  interface MessageMap {
6
6
  /** Frame's UI is rendered and ready to be shown. */
7
7
  ready: void;
8
+ /**
9
+ * Fired the instant the user taps the native wallet-pay button (Apple Pay /
10
+ * Google Pay) rendered by the buy button frame, BEFORE the OS payment sheet is
11
+ * presented. This is an intent-to-buy / tap signal, distinct from `complete`
12
+ * (the purchase outcome). It fires unconditionally on tap, even if the user
13
+ * later cancels the sheet.
14
+ */
15
+ buttonPressed: void;
8
16
  complete: {
9
17
  transaction: FrameTransaction;
10
18
  };
@@ -5,6 +5,14 @@ import { FrameError } from '../protocol.js';
5
5
  interface MessageMap {
6
6
  /** Frame's UI is rendered and ready to be shown. */
7
7
  ready: void;
8
+ /**
9
+ * Fired the instant the user taps the native wallet-pay button (Apple Pay /
10
+ * Google Pay) rendered by the buy button frame, BEFORE the OS payment sheet is
11
+ * presented. This is an intent-to-buy / tap signal, distinct from `complete`
12
+ * (the purchase outcome). It fires unconditionally on tap, even if the user
13
+ * later cancels the sheet.
14
+ */
15
+ buttonPressed: void;
8
16
  complete: {
9
17
  transaction: FrameTransaction;
10
18
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/frames/google-pay.ts"],"sourcesContent":["import type { ChallengeRequired } from '../models/challenge.js';\nimport type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport interface InboundMessageMap {\n ready: void;\n error: FrameError<\n 'configurationError' | 'quoteExpired' | 'invalidQuote' | 'googlePayUnavailable' | 'generic'\n >;\n /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */\n challenge: ChallengeRequired;\n complete: { transaction: FrameTransaction };\n}\n\nexport interface OutboundMessageMap {\n setQuote: { quote: { signature: string } };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/frames/google-pay.ts"],"sourcesContent":["import type { ChallengeRequired } from '../models/challenge.js';\nimport type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport interface InboundMessageMap {\n ready: void;\n error: FrameError<\n 'configurationError' | 'quoteExpired' | 'invalidQuote' | 'googlePayUnavailable' | 'generic'\n >;\n /**\n * Fired the instant the user taps the native Google Pay button, BEFORE the OS\n * payment sheet is presented. This is an intent-to-buy / tap signal, distinct\n * from `complete` (the purchase outcome). It fires unconditionally on tap,\n * even if the user later cancels the sheet.\n */\n buttonPressed: void;\n /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */\n challenge: ChallengeRequired;\n complete: { transaction: FrameTransaction };\n}\n\nexport interface OutboundMessageMap {\n setQuote: { quote: { signature: string } };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -5,6 +5,13 @@ import { FrameError } from '../protocol.cjs';
5
5
  interface InboundMessageMap {
6
6
  ready: void;
7
7
  error: FrameError<'configurationError' | 'quoteExpired' | 'invalidQuote' | 'googlePayUnavailable' | 'generic'>;
8
+ /**
9
+ * Fired the instant the user taps the native Google Pay button, BEFORE the OS
10
+ * payment sheet is presented. This is an intent-to-buy / tap signal, distinct
11
+ * from `complete` (the purchase outcome). It fires unconditionally on tap,
12
+ * even if the user later cancels the sheet.
13
+ */
14
+ buttonPressed: void;
8
15
  /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
9
16
  challenge: ChallengeRequired;
10
17
  complete: {
@@ -5,6 +5,13 @@ import { FrameError } from '../protocol.js';
5
5
  interface InboundMessageMap {
6
6
  ready: void;
7
7
  error: FrameError<'configurationError' | 'quoteExpired' | 'invalidQuote' | 'googlePayUnavailable' | 'generic'>;
8
+ /**
9
+ * Fired the instant the user taps the native Google Pay button, BEFORE the OS
10
+ * payment sheet is presented. This is an intent-to-buy / tap signal, distinct
11
+ * from `complete` (the purchase outcome). It fires unconditionally on tap,
12
+ * even if the user later cancels the sheet.
13
+ */
14
+ buttonPressed: void;
8
15
  /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
9
16
  challenge: ChallengeRequired;
10
17
  complete: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/sdks/apple-pay.ts"],"sourcesContent":["import type * as ApplePayFrame from '../frames/apple-pay.js';\nimport type { FrameTransaction } from '../models/transaction.js';\n\nexport type EventError = {\n kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | 'genericError';\n message: string;\n};\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'complete'; payload: { transaction: FrameTransaction } }\n | { kind: 'challenge'; payload: ApplePayFrame.InboundMessageMap['challenge'] }\n | { kind: 'quoteExpired'; payload: { setQuote: (signature: string) => void } }\n | { kind: 'error'; payload: EventError }\n | { kind: 'unsupported' };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/sdks/apple-pay.ts"],"sourcesContent":["import type * as ApplePayFrame from '../frames/apple-pay.js';\nimport type { FrameTransaction } from '../models/transaction.js';\n\nexport type EventError = {\n kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | 'genericError';\n message: string;\n};\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'buttonPressed' }\n | { kind: 'complete'; payload: { transaction: FrameTransaction } }\n | { kind: 'challenge'; payload: ApplePayFrame.InboundMessageMap['challenge'] }\n | { kind: 'quoteExpired'; payload: { setQuote: (signature: string) => void } }\n | { kind: 'error'; payload: EventError }\n | { kind: 'unsupported' };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -9,6 +9,8 @@ type EventError = {
9
9
  };
10
10
  type Event = {
11
11
  kind: 'ready';
12
+ } | {
13
+ kind: 'buttonPressed';
12
14
  } | {
13
15
  kind: 'complete';
14
16
  payload: {
@@ -9,6 +9,8 @@ type EventError = {
9
9
  };
10
10
  type Event = {
11
11
  kind: 'ready';
12
+ } | {
13
+ kind: 'buttonPressed';
12
14
  } | {
13
15
  kind: 'complete';
14
16
  payload: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/sdks/buy-button.ts"],"sourcesContent":["import type * as BuyButtonFrame from '../frames/buy-button.js';\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'complete'; payload: BuyButtonFrame.MessageMap['complete'] }\n | { kind: 'challenge'; payload: BuyButtonFrame.MessageMap['challenge'] }\n | { kind: 'error'; payload: BuyButtonFrame.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/buy-button.ts"],"sourcesContent":["import type * as BuyButtonFrame from '../frames/buy-button.js';\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'buttonPressed' }\n | { kind: 'complete'; payload: BuyButtonFrame.MessageMap['complete'] }\n | { kind: 'challenge'; payload: BuyButtonFrame.MessageMap['challenge'] }\n | { kind: 'error'; payload: BuyButtonFrame.MessageMap['error'] };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -5,6 +5,8 @@ import '../protocol.cjs';
5
5
 
6
6
  type Event = {
7
7
  kind: 'ready';
8
+ } | {
9
+ kind: 'buttonPressed';
8
10
  } | {
9
11
  kind: 'complete';
10
12
  payload: MessageMap['complete'];
@@ -5,6 +5,8 @@ import '../protocol.js';
5
5
 
6
6
  type Event = {
7
7
  kind: 'ready';
8
+ } | {
9
+ kind: 'buttonPressed';
8
10
  } | {
9
11
  kind: 'complete';
10
12
  payload: MessageMap['complete'];
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/sdks/google-pay.ts"],"sourcesContent":["import type * as GooglePayFrame from '../frames/google-pay.js';\nimport type { FrameTransaction } from '../models/transaction.js';\n\nexport type EventError = {\n kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | 'genericError';\n message: string;\n};\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'complete'; payload: { transaction: FrameTransaction } }\n | { kind: 'challenge'; payload: GooglePayFrame.InboundMessageMap['challenge'] }\n | { kind: 'quoteExpired'; payload: { setQuote: (signature: string) => void } }\n | { kind: 'error'; payload: EventError }\n | { kind: 'unsupported' };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/sdks/google-pay.ts"],"sourcesContent":["import type * as GooglePayFrame from '../frames/google-pay.js';\nimport type { FrameTransaction } from '../models/transaction.js';\n\nexport type EventError = {\n kind: 'configurationError' | 'invalidQuote' | 'quoteExpired' | 'genericError';\n message: string;\n};\n\nexport type Event =\n | { kind: 'ready' }\n | { kind: 'buttonPressed' }\n | { kind: 'complete'; payload: { transaction: FrameTransaction } }\n | { kind: 'challenge'; payload: GooglePayFrame.InboundMessageMap['challenge'] }\n | { kind: 'quoteExpired'; payload: { setQuote: (signature: string) => void } }\n | { kind: 'error'; payload: EventError }\n | { kind: 'unsupported' };\n\nexport interface SetupError {\n kind: 'configurationError' | 'genericError';\n message: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -9,6 +9,8 @@ type EventError = {
9
9
  };
10
10
  type Event = {
11
11
  kind: 'ready';
12
+ } | {
13
+ kind: 'buttonPressed';
12
14
  } | {
13
15
  kind: 'complete';
14
16
  payload: {
@@ -9,6 +9,8 @@ type EventError = {
9
9
  };
10
10
  type Event = {
11
11
  kind: 'ready';
12
+ } | {
13
+ kind: 'buttonPressed';
12
14
  } | {
13
15
  kind: 'complete';
14
16
  payload: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moonpay/platform-protocol",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "Shared protocol types for the MoonPay Developer Platform",
5
5
  "type": "module",
6
6
  "exports": {