@moonpay/platform-protocol 1.19.0 → 1.21.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 /**\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 /**\n * Fired when the user dismisses the native Apple Pay payment sheet without\n * completing the purchase. This is an explicit cancellation signal, distinct\n * from `error` (a failure) — the flow can simply be re-initiated.\n */\n cancelled: FrameError<'payment_sheet_dismissed'>;\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 /**\n * Fired when the user dismisses the native Apple Pay payment sheet without\n * completing the purchase. This is an explicit cancellation signal, distinct\n * from `error` (a failure) — the flow can simply be re-initiated.\n */\n cancelled: FrameError<'payment_sheet_dismissed'>;\n complete: { transaction: FrameTransaction };\n}\n\nexport interface OutboundMessageMap {\n setQuote: { quote: { signature: string } };\n}\n\nexport interface ApplePayButtonSettings {\n /** Button width in pixels, e.g. \"320\" or \"320px\". */\n width?: string;\n /** Button height in pixels. */\n height?: string;\n /** Corner radius in pixels. */\n borderRadius?: string;\n /** Horizontal padding in pixels. */\n paddingX?: string;\n /** Vertical padding in pixels. */\n paddingY?: string;\n /** Button visual style. */\n style?: 'black' | 'white-outline' | 'white';\n /** Button label/type. */\n type?: 'plain' | 'buy' | 'top-up' | 'reload' | 'continue' | 'check-out' | 'pay';\n /** One of the Apple Pay supported locales (e.g. \"en-US\", \"fr-FR\"). */\n locale?: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -31,5 +31,23 @@ interface OutboundMessageMap {
|
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
+
interface ApplePayButtonSettings {
|
|
35
|
+
/** Button width in pixels, e.g. "320" or "320px". */
|
|
36
|
+
width?: string;
|
|
37
|
+
/** Button height in pixels. */
|
|
38
|
+
height?: string;
|
|
39
|
+
/** Corner radius in pixels. */
|
|
40
|
+
borderRadius?: string;
|
|
41
|
+
/** Horizontal padding in pixels. */
|
|
42
|
+
paddingX?: string;
|
|
43
|
+
/** Vertical padding in pixels. */
|
|
44
|
+
paddingY?: string;
|
|
45
|
+
/** Button visual style. */
|
|
46
|
+
style?: 'black' | 'white-outline' | 'white';
|
|
47
|
+
/** Button label/type. */
|
|
48
|
+
type?: 'plain' | 'buy' | 'top-up' | 'reload' | 'continue' | 'check-out' | 'pay';
|
|
49
|
+
/** One of the Apple Pay supported locales (e.g. "en-US", "fr-FR"). */
|
|
50
|
+
locale?: string;
|
|
51
|
+
}
|
|
34
52
|
|
|
35
|
-
export type { InboundMessageMap, OutboundMessageMap };
|
|
53
|
+
export type { ApplePayButtonSettings, InboundMessageMap, OutboundMessageMap };
|
|
@@ -31,5 +31,23 @@ interface OutboundMessageMap {
|
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
+
interface ApplePayButtonSettings {
|
|
35
|
+
/** Button width in pixels, e.g. "320" or "320px". */
|
|
36
|
+
width?: string;
|
|
37
|
+
/** Button height in pixels. */
|
|
38
|
+
height?: string;
|
|
39
|
+
/** Corner radius in pixels. */
|
|
40
|
+
borderRadius?: string;
|
|
41
|
+
/** Horizontal padding in pixels. */
|
|
42
|
+
paddingX?: string;
|
|
43
|
+
/** Vertical padding in pixels. */
|
|
44
|
+
paddingY?: string;
|
|
45
|
+
/** Button visual style. */
|
|
46
|
+
style?: 'black' | 'white-outline' | 'white';
|
|
47
|
+
/** Button label/type. */
|
|
48
|
+
type?: 'plain' | 'buy' | 'top-up' | 'reload' | 'continue' | 'check-out' | 'pay';
|
|
49
|
+
/** One of the Apple Pay supported locales (e.g. "en-US", "fr-FR"). */
|
|
50
|
+
locale?: string;
|
|
51
|
+
}
|
|
34
52
|
|
|
35
|
-
export type { InboundMessageMap, OutboundMessageMap };
|
|
53
|
+
export type { ApplePayButtonSettings, InboundMessageMap, OutboundMessageMap };
|