@moonpay/platform-protocol 0.3.0-next.1 → 1.0.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.
Files changed (175) hide show
  1. package/README.md +45 -0
  2. package/dist/{index.cjs → api/errors.cjs} +7 -51
  3. package/dist/api/errors.cjs.map +1 -0
  4. package/dist/api/errors.d.cts +46 -0
  5. package/dist/api/errors.d.ts +46 -0
  6. package/dist/api/errors.js +27 -0
  7. package/dist/api/errors.js.map +1 -0
  8. package/dist/api/identity.cjs +19 -0
  9. package/dist/api/identity.cjs.map +1 -0
  10. package/dist/api/identity.d.cts +156 -0
  11. package/dist/api/identity.d.ts +156 -0
  12. package/dist/api/identity.js +1 -0
  13. package/dist/api/identity.js.map +1 -0
  14. package/dist/api/index.cjs +19 -0
  15. package/dist/api/index.cjs.map +1 -0
  16. package/dist/api/index.d.cts +466 -0
  17. package/dist/api/index.d.ts +466 -0
  18. package/dist/api/index.js +1 -0
  19. package/dist/api/index.js.map +1 -0
  20. package/dist/frames/add-card.cjs +19 -0
  21. package/dist/frames/add-card.cjs.map +1 -0
  22. package/dist/frames/add-card.d.cts +24 -0
  23. package/dist/frames/add-card.d.ts +24 -0
  24. package/dist/frames/add-card.js +1 -0
  25. package/dist/frames/add-card.js.map +1 -0
  26. package/dist/frames/apple-pay.cjs +19 -0
  27. package/dist/frames/apple-pay.cjs.map +1 -0
  28. package/dist/frames/apple-pay.d.cts +22 -0
  29. package/dist/frames/apple-pay.d.ts +22 -0
  30. package/dist/frames/apple-pay.js +1 -0
  31. package/dist/frames/apple-pay.js.map +1 -0
  32. package/dist/frames/auth.cjs +19 -0
  33. package/dist/frames/auth.cjs.map +1 -0
  34. package/dist/frames/auth.d.cts +15 -0
  35. package/dist/frames/auth.d.ts +15 -0
  36. package/dist/frames/auth.js +1 -0
  37. package/dist/frames/auth.js.map +1 -0
  38. package/dist/frames/buy-button.cjs +19 -0
  39. package/dist/frames/buy-button.cjs.map +1 -0
  40. package/dist/frames/buy-button.d.cts +21 -0
  41. package/dist/frames/buy-button.d.ts +21 -0
  42. package/dist/frames/buy-button.js +1 -0
  43. package/dist/frames/buy-button.js.map +1 -0
  44. package/dist/frames/buy.cjs +19 -0
  45. package/dist/frames/buy.cjs.map +1 -0
  46. package/dist/frames/buy.d.cts +22 -0
  47. package/dist/frames/buy.d.ts +22 -0
  48. package/dist/frames/buy.js +1 -0
  49. package/dist/frames/buy.js.map +1 -0
  50. package/dist/frames/challenge.cjs +19 -0
  51. package/dist/frames/challenge.cjs.map +1 -0
  52. package/dist/frames/challenge.d.cts +30 -0
  53. package/dist/frames/challenge.d.ts +30 -0
  54. package/dist/frames/challenge.js +1 -0
  55. package/dist/frames/challenge.js.map +1 -0
  56. package/dist/frames/connect.cjs +19 -0
  57. package/dist/frames/connect.cjs.map +1 -0
  58. package/dist/frames/connect.d.cts +9 -0
  59. package/dist/frames/connect.d.ts +9 -0
  60. package/dist/frames/connect.js +1 -0
  61. package/dist/frames/connect.js.map +1 -0
  62. package/dist/frames/google-pay.cjs +19 -0
  63. package/dist/frames/google-pay.cjs.map +1 -0
  64. package/dist/frames/google-pay.d.cts +22 -0
  65. package/dist/frames/google-pay.d.ts +22 -0
  66. package/dist/frames/google-pay.js +1 -0
  67. package/dist/frames/google-pay.js.map +1 -0
  68. package/dist/frames/reset.cjs +19 -0
  69. package/dist/frames/reset.cjs.map +1 -0
  70. package/dist/frames/reset.d.cts +12 -0
  71. package/dist/frames/reset.d.ts +12 -0
  72. package/dist/frames/reset.js +1 -0
  73. package/dist/frames/reset.js.map +1 -0
  74. package/dist/frames/widget.cjs +19 -0
  75. package/dist/frames/widget.cjs.map +1 -0
  76. package/dist/frames/widget.d.cts +19 -0
  77. package/dist/frames/widget.d.ts +19 -0
  78. package/dist/frames/widget.js +1 -0
  79. package/dist/frames/widget.js.map +1 -0
  80. package/dist/models/challenge.cjs +19 -0
  81. package/dist/models/challenge.cjs.map +1 -0
  82. package/dist/models/challenge.d.cts +12 -0
  83. package/dist/models/challenge.d.ts +12 -0
  84. package/dist/models/challenge.js +1 -0
  85. package/dist/models/challenge.js.map +1 -0
  86. package/dist/models/connection.cjs +46 -0
  87. package/dist/models/connection.cjs.map +1 -0
  88. package/dist/models/connection.d.cts +142 -0
  89. package/dist/models/connection.d.ts +142 -0
  90. package/dist/models/connection.js +20 -0
  91. package/dist/models/connection.js.map +1 -0
  92. package/dist/models/transaction.cjs +19 -0
  93. package/dist/models/transaction.cjs.map +1 -0
  94. package/dist/models/transaction.d.cts +15 -0
  95. package/dist/models/transaction.d.ts +15 -0
  96. package/dist/models/transaction.js +1 -0
  97. package/dist/models/transaction.js.map +1 -0
  98. package/dist/protocol.cjs +34 -0
  99. package/dist/protocol.cjs.map +1 -0
  100. package/dist/protocol.d.cts +30 -0
  101. package/dist/protocol.d.ts +30 -0
  102. package/dist/protocol.js +8 -0
  103. package/dist/protocol.js.map +1 -0
  104. package/dist/result.cjs +40 -0
  105. package/dist/result.cjs.map +1 -0
  106. package/dist/result.d.cts +30 -0
  107. package/dist/result.d.ts +30 -0
  108. package/dist/result.js +14 -0
  109. package/dist/result.js.map +1 -0
  110. package/dist/sdks/add-card.cjs +19 -0
  111. package/dist/sdks/add-card.cjs.map +1 -0
  112. package/dist/sdks/add-card.d.cts +20 -0
  113. package/dist/sdks/add-card.d.ts +20 -0
  114. package/dist/sdks/add-card.js +1 -0
  115. package/dist/sdks/add-card.js.map +1 -0
  116. package/dist/sdks/apple-pay.cjs +19 -0
  117. package/dist/sdks/apple-pay.cjs.map +1 -0
  118. package/dist/sdks/apple-pay.d.cts +36 -0
  119. package/dist/sdks/apple-pay.d.ts +36 -0
  120. package/dist/sdks/apple-pay.js +1 -0
  121. package/dist/sdks/apple-pay.js.map +1 -0
  122. package/dist/sdks/auth.cjs +19 -0
  123. package/dist/sdks/auth.cjs.map +1 -0
  124. package/dist/sdks/auth.d.cts +18 -0
  125. package/dist/sdks/auth.d.ts +18 -0
  126. package/dist/sdks/auth.js +1 -0
  127. package/dist/sdks/auth.js.map +1 -0
  128. package/dist/sdks/buy-button.cjs +19 -0
  129. package/dist/sdks/buy-button.cjs.map +1 -0
  130. package/dist/sdks/buy-button.d.cts +21 -0
  131. package/dist/sdks/buy-button.d.ts +21 -0
  132. package/dist/sdks/buy-button.js +1 -0
  133. package/dist/sdks/buy-button.js.map +1 -0
  134. package/dist/sdks/buy.cjs +19 -0
  135. package/dist/sdks/buy.cjs.map +1 -0
  136. package/dist/sdks/buy.d.cts +23 -0
  137. package/dist/sdks/buy.d.ts +23 -0
  138. package/dist/sdks/buy.js +1 -0
  139. package/dist/sdks/buy.js.map +1 -0
  140. package/dist/sdks/challenge.cjs +19 -0
  141. package/dist/sdks/challenge.cjs.map +1 -0
  142. package/dist/sdks/challenge.d.cts +22 -0
  143. package/dist/sdks/challenge.d.ts +22 -0
  144. package/dist/sdks/challenge.js +1 -0
  145. package/dist/sdks/challenge.js.map +1 -0
  146. package/dist/sdks/connect.cjs +19 -0
  147. package/dist/sdks/connect.cjs.map +1 -0
  148. package/dist/sdks/connect.d.cts +20 -0
  149. package/dist/sdks/connect.d.ts +20 -0
  150. package/dist/sdks/connect.js +1 -0
  151. package/dist/sdks/connect.js.map +1 -0
  152. package/dist/sdks/google-pay.cjs +19 -0
  153. package/dist/sdks/google-pay.cjs.map +1 -0
  154. package/dist/sdks/google-pay.d.cts +36 -0
  155. package/dist/sdks/google-pay.d.ts +36 -0
  156. package/dist/sdks/google-pay.js +1 -0
  157. package/dist/sdks/google-pay.js.map +1 -0
  158. package/dist/sdks/reset.cjs +19 -0
  159. package/dist/sdks/reset.cjs.map +1 -0
  160. package/dist/sdks/reset.d.cts +5 -0
  161. package/dist/sdks/reset.d.ts +5 -0
  162. package/dist/sdks/reset.js +1 -0
  163. package/dist/sdks/reset.js.map +1 -0
  164. package/dist/sdks/widget.cjs +19 -0
  165. package/dist/sdks/widget.cjs.map +1 -0
  166. package/dist/sdks/widget.d.cts +26 -0
  167. package/dist/sdks/widget.d.ts +26 -0
  168. package/dist/sdks/widget.js +1 -0
  169. package/dist/sdks/widget.js.map +1 -0
  170. package/package.json +278 -11
  171. package/dist/index.cjs.map +0 -1
  172. package/dist/index.d.cts +0 -1289
  173. package/dist/index.d.ts +0 -1289
  174. package/dist/index.js +0 -63
  175. package/dist/index.js.map +0 -1
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/frames/buy-button.ts
17
+ var buy_button_exports = {};
18
+ module.exports = __toCommonJS(buy_button_exports);
19
+ //# sourceMappingURL=buy-button.cjs.map
@@ -0,0 +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 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":[]}
@@ -0,0 +1,21 @@
1
+ import { ChallengeRequired } from '../models/challenge.cjs';
2
+ import { FrameTransaction } from '../models/transaction.cjs';
3
+ import { FrameError } from '../protocol.cjs';
4
+
5
+ interface MessageMap {
6
+ complete: {
7
+ transaction: FrameTransaction;
8
+ };
9
+ /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
10
+ challenge: ChallengeRequired;
11
+ error: FrameError;
12
+ }
13
+ interface OutboundMessageMap {
14
+ setQuote: {
15
+ quote: {
16
+ signature: string;
17
+ };
18
+ };
19
+ }
20
+
21
+ export type { MessageMap, OutboundMessageMap };
@@ -0,0 +1,21 @@
1
+ import { ChallengeRequired } from '../models/challenge.js';
2
+ import { FrameTransaction } from '../models/transaction.js';
3
+ import { FrameError } from '../protocol.js';
4
+
5
+ interface MessageMap {
6
+ complete: {
7
+ transaction: FrameTransaction;
8
+ };
9
+ /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
10
+ challenge: ChallengeRequired;
11
+ error: FrameError;
12
+ }
13
+ interface OutboundMessageMap {
14
+ setQuote: {
15
+ quote: {
16
+ signature: string;
17
+ };
18
+ };
19
+ }
20
+
21
+ export type { MessageMap, OutboundMessageMap };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=buy-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/frames/buy.ts
17
+ var buy_exports = {};
18
+ module.exports = __toCommonJS(buy_exports);
19
+ //# sourceMappingURL=buy.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/frames/buy.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 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":[]}
@@ -0,0 +1,22 @@
1
+ import { ChallengeRequired } from '../models/challenge.cjs';
2
+ import { FrameTransaction } from '../models/transaction.cjs';
3
+ import { FrameError } from '../protocol.cjs';
4
+
5
+ interface MessageMap {
6
+ ready: void;
7
+ complete: {
8
+ transaction: FrameTransaction;
9
+ };
10
+ /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
11
+ challenge: ChallengeRequired;
12
+ error: FrameError;
13
+ }
14
+ interface OutboundMessageMap {
15
+ setQuote: {
16
+ quote: {
17
+ signature: string;
18
+ };
19
+ };
20
+ }
21
+
22
+ export type { MessageMap, OutboundMessageMap };
@@ -0,0 +1,22 @@
1
+ import { ChallengeRequired } from '../models/challenge.js';
2
+ import { FrameTransaction } from '../models/transaction.js';
3
+ import { FrameError } from '../protocol.js';
4
+
5
+ interface MessageMap {
6
+ ready: void;
7
+ complete: {
8
+ transaction: FrameTransaction;
9
+ };
10
+ /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
11
+ challenge: ChallengeRequired;
12
+ error: FrameError;
13
+ }
14
+ interface OutboundMessageMap {
15
+ setQuote: {
16
+ quote: {
17
+ signature: string;
18
+ };
19
+ };
20
+ }
21
+
22
+ export type { MessageMap, OutboundMessageMap };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=buy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/frames/challenge.ts
17
+ var challenge_exports = {};
18
+ module.exports = __toCommonJS(challenge_exports);
19
+ //# sourceMappingURL=challenge.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/frames/challenge.ts"],"sourcesContent":["import type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport type CompleteResult =\n | { flow: 'buy'; transaction: FrameTransaction }\n | { flow: 'identity'; identityId: string };\n\nexport type Cancellation =\n | { flow: 'buy'; transactionId?: string; challengeToken?: string }\n | { flow: 'identity' };\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":[]}
@@ -0,0 +1,30 @@
1
+ import { FrameTransaction } from '../models/transaction.cjs';
2
+ import { FrameError } from '../protocol.cjs';
3
+
4
+ type CompleteResult = {
5
+ flow: 'buy';
6
+ transaction: FrameTransaction;
7
+ } | {
8
+ flow: 'identity';
9
+ identityId: string;
10
+ };
11
+ type Cancellation = {
12
+ flow: 'buy';
13
+ transactionId?: string;
14
+ challengeToken?: string;
15
+ } | {
16
+ flow: 'identity';
17
+ };
18
+ /**
19
+ * The challenge frame is fully self-contained — it is driven by the
20
+ * `challengeToken` URL param. There is no parent → child message map.
21
+ */
22
+ interface MessageMap {
23
+ ready: void;
24
+ complete: CompleteResult;
25
+ /** User dismissed the challenge. Carry `transactionId` / `challengeToken` to resume. */
26
+ cancelled: Cancellation;
27
+ error: FrameError;
28
+ }
29
+
30
+ export type { Cancellation, CompleteResult, MessageMap };
@@ -0,0 +1,30 @@
1
+ import { FrameTransaction } from '../models/transaction.js';
2
+ import { FrameError } from '../protocol.js';
3
+
4
+ type CompleteResult = {
5
+ flow: 'buy';
6
+ transaction: FrameTransaction;
7
+ } | {
8
+ flow: 'identity';
9
+ identityId: string;
10
+ };
11
+ type Cancellation = {
12
+ flow: 'buy';
13
+ transactionId?: string;
14
+ challengeToken?: string;
15
+ } | {
16
+ flow: 'identity';
17
+ };
18
+ /**
19
+ * The challenge frame is fully self-contained — it is driven by the
20
+ * `challengeToken` URL param. There is no parent → child message map.
21
+ */
22
+ interface MessageMap {
23
+ ready: void;
24
+ complete: CompleteResult;
25
+ /** User dismissed the challenge. Carry `transactionId` / `challengeToken` to resume. */
26
+ cancelled: Cancellation;
27
+ error: FrameError;
28
+ }
29
+
30
+ export type { Cancellation, CompleteResult, MessageMap };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=challenge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/frames/connect.ts
17
+ var connect_exports = {};
18
+ module.exports = __toCommonJS(connect_exports);
19
+ //# sourceMappingURL=connect.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/frames/connect.ts"],"sourcesContent":["import type {\n ActiveConnection,\n ConnectionError,\n ConnectionRequired,\n FailedConnection,\n PendingConnection,\n TermsAcceptanceRequiredConnection,\n UnavailableConnection,\n} from '../models/connection.js';\n\nexport interface MessageMap {\n ready: void;\n error: ConnectionError;\n complete:\n | ConnectionRequired\n | ActiveConnection\n | UnavailableConnection\n | PendingConnection\n | FailedConnection\n | TermsAcceptanceRequiredConnection;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,9 @@
1
+ import { ConnectionError, ConnectionRequired, ActiveConnection, UnavailableConnection, PendingConnection, FailedConnection, TermsAcceptanceRequiredConnection } from '../models/connection.cjs';
2
+
3
+ interface MessageMap {
4
+ ready: void;
5
+ error: ConnectionError;
6
+ complete: ConnectionRequired | ActiveConnection | UnavailableConnection | PendingConnection | FailedConnection | TermsAcceptanceRequiredConnection;
7
+ }
8
+
9
+ export type { MessageMap };
@@ -0,0 +1,9 @@
1
+ import { ConnectionError, ConnectionRequired, ActiveConnection, UnavailableConnection, PendingConnection, FailedConnection, TermsAcceptanceRequiredConnection } from '../models/connection.js';
2
+
3
+ interface MessageMap {
4
+ ready: void;
5
+ error: ConnectionError;
6
+ complete: ConnectionRequired | ActiveConnection | UnavailableConnection | PendingConnection | FailedConnection | TermsAcceptanceRequiredConnection;
7
+ }
8
+
9
+ export type { MessageMap };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=connect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/frames/google-pay.ts
17
+ var google_pay_exports = {};
18
+ module.exports = __toCommonJS(google_pay_exports);
19
+ //# sourceMappingURL=google-pay.cjs.map
@@ -0,0 +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":[]}
@@ -0,0 +1,22 @@
1
+ import { ChallengeRequired } from '../models/challenge.cjs';
2
+ import { FrameTransaction } from '../models/transaction.cjs';
3
+ import { FrameError } from '../protocol.cjs';
4
+
5
+ interface InboundMessageMap {
6
+ ready: void;
7
+ error: FrameError<'configurationError' | 'quoteExpired' | 'invalidQuote' | 'googlePayUnavailable' | 'generic'>;
8
+ /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
9
+ challenge: ChallengeRequired;
10
+ complete: {
11
+ transaction: FrameTransaction;
12
+ };
13
+ }
14
+ interface OutboundMessageMap {
15
+ setQuote: {
16
+ quote: {
17
+ signature: string;
18
+ };
19
+ };
20
+ }
21
+
22
+ export type { InboundMessageMap, OutboundMessageMap };
@@ -0,0 +1,22 @@
1
+ import { ChallengeRequired } from '../models/challenge.js';
2
+ import { FrameTransaction } from '../models/transaction.js';
3
+ import { FrameError } from '../protocol.js';
4
+
5
+ interface InboundMessageMap {
6
+ ready: void;
7
+ error: FrameError<'configurationError' | 'quoteExpired' | 'invalidQuote' | 'googlePayUnavailable' | 'generic'>;
8
+ /** Signals that the pipeline requires a challenge step. Load `url` in a challenge frame. */
9
+ challenge: ChallengeRequired;
10
+ complete: {
11
+ transaction: FrameTransaction;
12
+ };
13
+ }
14
+ interface OutboundMessageMap {
15
+ setQuote: {
16
+ quote: {
17
+ signature: string;
18
+ };
19
+ };
20
+ }
21
+
22
+ export type { InboundMessageMap, OutboundMessageMap };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=google-pay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/frames/reset.ts
17
+ var reset_exports = {};
18
+ module.exports = __toCommonJS(reset_exports);
19
+ //# sourceMappingURL=reset.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/frames/reset.ts"],"sourcesContent":["import type { FrameError } from '../protocol.js';\n\n/**\n * The reset frame clears the customer's MoonPay connection for the partner.\n * Fully driven by the `sessionToken` URL param — no parent → child map.\n */\nexport interface MessageMap {\n complete: void;\n error: FrameError;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,12 @@
1
+ import { FrameError } from '../protocol.cjs';
2
+
3
+ /**
4
+ * The reset frame clears the customer's MoonPay connection for the partner.
5
+ * Fully driven by the `sessionToken` URL param — no parent → child map.
6
+ */
7
+ interface MessageMap {
8
+ complete: void;
9
+ error: FrameError;
10
+ }
11
+
12
+ export type { MessageMap };
@@ -0,0 +1,12 @@
1
+ import { FrameError } from '../protocol.js';
2
+
3
+ /**
4
+ * The reset frame clears the customer's MoonPay connection for the partner.
5
+ * Fully driven by the `sessionToken` URL param — no parent → child map.
6
+ */
7
+ interface MessageMap {
8
+ complete: void;
9
+ error: FrameError;
10
+ }
11
+
12
+ export type { MessageMap };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=reset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/frames/widget.ts
17
+ var widget_exports = {};
18
+ module.exports = __toCommonJS(widget_exports);
19
+ //# sourceMappingURL=widget.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/frames/widget.ts"],"sourcesContent":["import type { FrameTransaction } from '../models/transaction.js';\nimport type { FrameError } from '../protocol.js';\n\nexport interface MessageMap {\n ready: void;\n error: FrameError<'configurationError' | 'apiError' | 'generic'>;\n transactionCreated: { transaction: { id: string; status: string } };\n complete: { transaction: FrameTransaction };\n close: void;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,19 @@
1
+ import { FrameTransaction } from '../models/transaction.cjs';
2
+ import { FrameError } from '../protocol.cjs';
3
+
4
+ interface MessageMap {
5
+ ready: void;
6
+ error: FrameError<'configurationError' | 'apiError' | 'generic'>;
7
+ transactionCreated: {
8
+ transaction: {
9
+ id: string;
10
+ status: string;
11
+ };
12
+ };
13
+ complete: {
14
+ transaction: FrameTransaction;
15
+ };
16
+ close: void;
17
+ }
18
+
19
+ export type { MessageMap };
@@ -0,0 +1,19 @@
1
+ import { FrameTransaction } from '../models/transaction.js';
2
+ import { FrameError } from '../protocol.js';
3
+
4
+ interface MessageMap {
5
+ ready: void;
6
+ error: FrameError<'configurationError' | 'apiError' | 'generic'>;
7
+ transactionCreated: {
8
+ transaction: {
9
+ id: string;
10
+ status: string;
11
+ };
12
+ };
13
+ complete: {
14
+ transaction: FrameTransaction;
15
+ };
16
+ close: void;
17
+ }
18
+
19
+ export type { MessageMap };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=widget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/models/challenge.ts
17
+ var challenge_exports = {};
18
+ module.exports = __toCommonJS(challenge_exports);
19
+ //# sourceMappingURL=challenge.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/models/challenge.ts"],"sourcesContent":["/**\n * Discriminator for how a challenge should be presented to the customer.\n * Currently always `'frame'` — partners load `url` in a challenge frame.\n */\nexport type ChallengeKind = 'frame';\n\n/** Payload signalling that a frame pipeline requires a challenge step. */\nexport interface ChallengeRequired {\n kind: ChallengeKind;\n url: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Discriminator for how a challenge should be presented to the customer.
3
+ * Currently always `'frame'` — partners load `url` in a challenge frame.
4
+ */
5
+ type ChallengeKind = 'frame';
6
+ /** Payload signalling that a frame pipeline requires a challenge step. */
7
+ interface ChallengeRequired {
8
+ kind: ChallengeKind;
9
+ url: string;
10
+ }
11
+
12
+ export type { ChallengeKind, ChallengeRequired };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Discriminator for how a challenge should be presented to the customer.
3
+ * Currently always `'frame'` — partners load `url` in a challenge frame.
4
+ */
5
+ type ChallengeKind = 'frame';
6
+ /** Payload signalling that a frame pipeline requires a challenge step. */
7
+ interface ChallengeRequired {
8
+ kind: ChallengeKind;
9
+ url: string;
10
+ }
11
+
12
+ export type { ChallengeKind, ChallengeRequired };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=challenge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/models/connection.ts
21
+ var connection_exports = {};
22
+ __export(connection_exports, {
23
+ ConnectionErrorCode: () => ConnectionErrorCode,
24
+ ConnectionStatus: () => ConnectionStatus
25
+ });
26
+ module.exports = __toCommonJS(connection_exports);
27
+ var ConnectionStatus = /* @__PURE__ */ ((ConnectionStatus2) => {
28
+ ConnectionStatus2["connectionRequired"] = "connectionRequired";
29
+ ConnectionStatus2["active"] = "active";
30
+ ConnectionStatus2["unavailable"] = "unavailable";
31
+ ConnectionStatus2["pending"] = "pending";
32
+ ConnectionStatus2["failed"] = "failed";
33
+ ConnectionStatus2["termsAcceptanceRequired"] = "termsAcceptanceRequired";
34
+ return ConnectionStatus2;
35
+ })(ConnectionStatus || {});
36
+ var ConnectionErrorCode = /* @__PURE__ */ ((ConnectionErrorCode2) => {
37
+ ConnectionErrorCode2["validationError"] = "validationError";
38
+ ConnectionErrorCode2["connectionFailedGeneric"] = "generic";
39
+ return ConnectionErrorCode2;
40
+ })(ConnectionErrorCode || {});
41
+ // Annotate the CommonJS export names for ESM import in node:
42
+ 0 && (module.exports = {
43
+ ConnectionErrorCode,
44
+ ConnectionStatus
45
+ });
46
+ //# sourceMappingURL=connection.cjs.map