@moonpay/platform-protocol 1.12.0 → 1.13.1

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.
@@ -1171,6 +1171,44 @@ type Requirements = {
1171
1171
  */
1172
1172
  questionnaires?: RequirementEntry;
1173
1173
  };
1174
+ /**
1175
+ * The bank-transfer settlement outcome to simulate. Sandbox only.
1176
+ */
1177
+ type SimulateBankTransferOutcome = 'settled' | 'timeout';
1178
+ /**
1179
+ * Request body for simulating bank-transfer settlement.
1180
+ */
1181
+ type SimulateBankTransferRequest = {
1182
+ /**
1183
+ * Which settlement outcome to simulate.
1184
+ */
1185
+ outcome: SimulateBankTransferOutcome;
1186
+ /**
1187
+ * Optional sender bank account used to create the customer's bank account when settling. Defaults are synthesized per currency when omitted.
1188
+ */
1189
+ senderBankAccount?: SimulateSenderBankAccount;
1190
+ };
1191
+ /**
1192
+ * The sender's bank account, used to model the incoming deposit. When omitted, a default matching the transaction's currency is used.
1193
+ */
1194
+ type SimulateSenderBankAccount = {
1195
+ /**
1196
+ * The name on the sender's bank account.
1197
+ */
1198
+ accountHolderName: string;
1199
+ /**
1200
+ * The sender's IBAN. Used for SEPA (EUR) transfers.
1201
+ */
1202
+ iban?: string;
1203
+ /**
1204
+ * The sender's account number. Used for Faster Payments (GBP) transfers.
1205
+ */
1206
+ accountNumber?: string;
1207
+ /**
1208
+ * The sender's sort code. Used for Faster Payments (GBP) transfers.
1209
+ */
1210
+ sortCode?: string;
1211
+ };
1174
1212
  /**
1175
1213
  * Source of wealth a proof-of-income file evidences.
1176
1214
  */
@@ -1226,7 +1264,7 @@ type Transaction = {
1226
1264
  updatedAt: string;
1227
1265
  status: TransactionStatus;
1228
1266
  /**
1229
- * Source amount and asset (fiat currency) the customer paid.
1267
+ * Total source amount and asset (fiat currency) the customer pays, including all fees. Matches the quote's `source.amount`. For bank-transfer payment methods this is the exact amount the customer must transfer.
1230
1268
  */
1231
1269
  source: {
1232
1270
  /**
@@ -1335,4 +1373,4 @@ type AssetControllerListAssetsResponses = {
1335
1373
  };
1336
1374
  type AssetControllerListAssetsResponse = AssetControllerListAssetsResponses[keyof AssetControllerListAssetsResponses];
1337
1375
 
1338
- export type { Stage as $, Asset as A, BankTransferDepositInfo as B, CapabilityProduct as C, Customer, CustomerExportBasicDetails, CustomerExportFile, CustomerExportFileSide, CustomerExportFileType, CustomerExportIdentity, CustomerExportPhoneNumber, CustomerExportResidentialAddress, CustomerExportTaxIdentifier, CustomerExportTaxIdentifierType, CustomerKyc, CustomerKycStatus, CreateSessionTokenRequestBody as D, CreateSessionTokenResponse as E, ExchangeRateType as F, FeeBehavior as G, Fees as H, Identity as I, GetQuoteBody as J, AssetControllerListAssetsResponse as K, LimitWithAsset as L, MoonPayPaymentsListPaymentMethodsResponse as M, MonetaryFeeAmount as N, MoonPayCorePaginationInfo as O, MoonPayPaymentsPaymentMethodAvailability as P, MoonPayPaymentsPaymentMethodCapabilities as Q, RequirementEntry as R, SubmitIdentityFilesRequestBody as S, MoonPayPaymentsPaymentMethod as T, UpdateIdentityRequestBody as U, PaymentMethodType as V, PlatformAsset as W, GetQuoteResponse as X, QuoteLimitEntry as Y, QuoteLimits as Z, QuotePaymentMethod as _, CreateIdentityRequestBody as a, StageKind as a0, StageStatus as a1, MoonPayPaymentsStoredCardPaymentMethod as a2, MoonPayPaymentsStoredPaymentMethod as a3, Transaction as a4, TransactionCustomer as a5, TransactionPaymentMethod as a6, TransactionStatus as a7, TransactionWithStages as a8, Wallet as a9, CreateIdentityResidentialAddress as b, IdentityBasicDetailsSubmission as c, IdentityCapability as d, IdentityFileMimeType as e, IdentityFileSide as f, IdentityFileSubmission as g, IdentityFileType as h, IdentityFileUploadUrl as i, IdentityFileUploadUrlHeaders as j, IdentityFileUploadUrlRequestBody as k, IdentityPhoneNumberSubmission as l, IdentityQuestionnaireSubmission as m, IdentityResidentialAddressSubmission as n, IdentityStatus as o, IdentityTaxIdentifierGenericSubmission as p, IdentityTaxIdentifierSchemeSubmission as q, IdentityTaxIdentifierSubmission as r, IdentityVerificationChallenge as s, IdentityVerificationResponse as t, IdentityVerificationStatus as u, RequirementFieldName as v, RequirementItemStatus as w, Requirements as x, AssetBase as y, AssetStatus as z };
1376
+ export type { SimulateBankTransferOutcome as $, Asset as A, BankTransferDepositInfo as B, CapabilityProduct as C, Customer, CustomerExportBasicDetails, CustomerExportFile, CustomerExportFileSide, CustomerExportFileType, CustomerExportIdentity, CustomerExportPhoneNumber, CustomerExportResidentialAddress, CustomerExportTaxIdentifier, CustomerExportTaxIdentifierType, CustomerKyc, CustomerKycStatus, CreateSessionTokenRequestBody as D, CreateSessionTokenResponse as E, ExchangeRateType as F, FeeBehavior as G, Fees as H, Identity as I, GetQuoteBody as J, AssetControllerListAssetsResponse as K, LimitWithAsset as L, MoonPayPaymentsListPaymentMethodsResponse as M, MonetaryFeeAmount as N, MoonPayCorePaginationInfo as O, MoonPayPaymentsPaymentMethodAvailability as P, MoonPayPaymentsPaymentMethodCapabilities as Q, RequirementEntry as R, SubmitIdentityFilesRequestBody as S, MoonPayPaymentsPaymentMethod as T, UpdateIdentityRequestBody as U, PaymentMethodType as V, PlatformAsset as W, GetQuoteResponse as X, QuoteLimitEntry as Y, QuoteLimits as Z, QuotePaymentMethod as _, CreateIdentityRequestBody as a, SimulateBankTransferRequest as a0, SimulateSenderBankAccount as a1, Stage as a2, StageKind as a3, StageStatus as a4, MoonPayPaymentsStoredCardPaymentMethod as a5, MoonPayPaymentsStoredPaymentMethod as a6, Transaction as a7, TransactionCustomer as a8, TransactionPaymentMethod as a9, TransactionStatus as aa, TransactionWithStages as ab, Wallet as ac, CreateIdentityResidentialAddress as b, IdentityBasicDetailsSubmission as c, IdentityCapability as d, IdentityFileMimeType as e, IdentityFileSide as f, IdentityFileSubmission as g, IdentityFileType as h, IdentityFileUploadUrl as i, IdentityFileUploadUrlHeaders as j, IdentityFileUploadUrlRequestBody as k, IdentityPhoneNumberSubmission as l, IdentityQuestionnaireSubmission as m, IdentityResidentialAddressSubmission as n, IdentityStatus as o, IdentityTaxIdentifierGenericSubmission as p, IdentityTaxIdentifierSchemeSubmission as q, IdentityTaxIdentifierSubmission as r, IdentityVerificationChallenge as s, IdentityVerificationResponse as t, IdentityVerificationStatus as u, RequirementFieldName as v, RequirementItemStatus as w, Requirements as x, AssetBase as y, AssetStatus as z };
@@ -1171,6 +1171,44 @@ type Requirements = {
1171
1171
  */
1172
1172
  questionnaires?: RequirementEntry;
1173
1173
  };
1174
+ /**
1175
+ * The bank-transfer settlement outcome to simulate. Sandbox only.
1176
+ */
1177
+ type SimulateBankTransferOutcome = 'settled' | 'timeout';
1178
+ /**
1179
+ * Request body for simulating bank-transfer settlement.
1180
+ */
1181
+ type SimulateBankTransferRequest = {
1182
+ /**
1183
+ * Which settlement outcome to simulate.
1184
+ */
1185
+ outcome: SimulateBankTransferOutcome;
1186
+ /**
1187
+ * Optional sender bank account used to create the customer's bank account when settling. Defaults are synthesized per currency when omitted.
1188
+ */
1189
+ senderBankAccount?: SimulateSenderBankAccount;
1190
+ };
1191
+ /**
1192
+ * The sender's bank account, used to model the incoming deposit. When omitted, a default matching the transaction's currency is used.
1193
+ */
1194
+ type SimulateSenderBankAccount = {
1195
+ /**
1196
+ * The name on the sender's bank account.
1197
+ */
1198
+ accountHolderName: string;
1199
+ /**
1200
+ * The sender's IBAN. Used for SEPA (EUR) transfers.
1201
+ */
1202
+ iban?: string;
1203
+ /**
1204
+ * The sender's account number. Used for Faster Payments (GBP) transfers.
1205
+ */
1206
+ accountNumber?: string;
1207
+ /**
1208
+ * The sender's sort code. Used for Faster Payments (GBP) transfers.
1209
+ */
1210
+ sortCode?: string;
1211
+ };
1174
1212
  /**
1175
1213
  * Source of wealth a proof-of-income file evidences.
1176
1214
  */
@@ -1226,7 +1264,7 @@ type Transaction = {
1226
1264
  updatedAt: string;
1227
1265
  status: TransactionStatus;
1228
1266
  /**
1229
- * Source amount and asset (fiat currency) the customer paid.
1267
+ * Total source amount and asset (fiat currency) the customer pays, including all fees. Matches the quote's `source.amount`. For bank-transfer payment methods this is the exact amount the customer must transfer.
1230
1268
  */
1231
1269
  source: {
1232
1270
  /**
@@ -1335,4 +1373,4 @@ type AssetControllerListAssetsResponses = {
1335
1373
  };
1336
1374
  type AssetControllerListAssetsResponse = AssetControllerListAssetsResponses[keyof AssetControllerListAssetsResponses];
1337
1375
 
1338
- export type { Stage as $, Asset as A, BankTransferDepositInfo as B, CapabilityProduct as C, Customer, CustomerExportBasicDetails, CustomerExportFile, CustomerExportFileSide, CustomerExportFileType, CustomerExportIdentity, CustomerExportPhoneNumber, CustomerExportResidentialAddress, CustomerExportTaxIdentifier, CustomerExportTaxIdentifierType, CustomerKyc, CustomerKycStatus, CreateSessionTokenRequestBody as D, CreateSessionTokenResponse as E, ExchangeRateType as F, FeeBehavior as G, Fees as H, Identity as I, GetQuoteBody as J, AssetControllerListAssetsResponse as K, LimitWithAsset as L, MoonPayPaymentsListPaymentMethodsResponse as M, MonetaryFeeAmount as N, MoonPayCorePaginationInfo as O, MoonPayPaymentsPaymentMethodAvailability as P, MoonPayPaymentsPaymentMethodCapabilities as Q, RequirementEntry as R, SubmitIdentityFilesRequestBody as S, MoonPayPaymentsPaymentMethod as T, UpdateIdentityRequestBody as U, PaymentMethodType as V, PlatformAsset as W, GetQuoteResponse as X, QuoteLimitEntry as Y, QuoteLimits as Z, QuotePaymentMethod as _, CreateIdentityRequestBody as a, StageKind as a0, StageStatus as a1, MoonPayPaymentsStoredCardPaymentMethod as a2, MoonPayPaymentsStoredPaymentMethod as a3, Transaction as a4, TransactionCustomer as a5, TransactionPaymentMethod as a6, TransactionStatus as a7, TransactionWithStages as a8, Wallet as a9, CreateIdentityResidentialAddress as b, IdentityBasicDetailsSubmission as c, IdentityCapability as d, IdentityFileMimeType as e, IdentityFileSide as f, IdentityFileSubmission as g, IdentityFileType as h, IdentityFileUploadUrl as i, IdentityFileUploadUrlHeaders as j, IdentityFileUploadUrlRequestBody as k, IdentityPhoneNumberSubmission as l, IdentityQuestionnaireSubmission as m, IdentityResidentialAddressSubmission as n, IdentityStatus as o, IdentityTaxIdentifierGenericSubmission as p, IdentityTaxIdentifierSchemeSubmission as q, IdentityTaxIdentifierSubmission as r, IdentityVerificationChallenge as s, IdentityVerificationResponse as t, IdentityVerificationStatus as u, RequirementFieldName as v, RequirementItemStatus as w, Requirements as x, AssetBase as y, AssetStatus as z };
1376
+ export type { SimulateBankTransferOutcome as $, Asset as A, BankTransferDepositInfo as B, CapabilityProduct as C, Customer, CustomerExportBasicDetails, CustomerExportFile, CustomerExportFileSide, CustomerExportFileType, CustomerExportIdentity, CustomerExportPhoneNumber, CustomerExportResidentialAddress, CustomerExportTaxIdentifier, CustomerExportTaxIdentifierType, CustomerKyc, CustomerKycStatus, CreateSessionTokenRequestBody as D, CreateSessionTokenResponse as E, ExchangeRateType as F, FeeBehavior as G, Fees as H, Identity as I, GetQuoteBody as J, AssetControllerListAssetsResponse as K, LimitWithAsset as L, MoonPayPaymentsListPaymentMethodsResponse as M, MonetaryFeeAmount as N, MoonPayCorePaginationInfo as O, MoonPayPaymentsPaymentMethodAvailability as P, MoonPayPaymentsPaymentMethodCapabilities as Q, RequirementEntry as R, SubmitIdentityFilesRequestBody as S, MoonPayPaymentsPaymentMethod as T, UpdateIdentityRequestBody as U, PaymentMethodType as V, PlatformAsset as W, GetQuoteResponse as X, QuoteLimitEntry as Y, QuoteLimits as Z, QuotePaymentMethod as _, CreateIdentityRequestBody as a, SimulateBankTransferRequest as a0, SimulateSenderBankAccount as a1, Stage as a2, StageKind as a3, StageStatus as a4, MoonPayPaymentsStoredCardPaymentMethod as a5, MoonPayPaymentsStoredPaymentMethod as a6, Transaction as a7, TransactionCustomer as a8, TransactionPaymentMethod as a9, TransactionStatus as aa, TransactionWithStages as ab, Wallet as ac, CreateIdentityResidentialAddress as b, IdentityBasicDetailsSubmission as c, IdentityCapability as d, IdentityFileMimeType as e, IdentityFileSide as f, IdentityFileSubmission as g, IdentityFileType as h, IdentityFileUploadUrl as i, IdentityFileUploadUrlHeaders as j, IdentityFileUploadUrlRequestBody as k, IdentityPhoneNumberSubmission as l, IdentityQuestionnaireSubmission as m, IdentityResidentialAddressSubmission as n, IdentityStatus as o, IdentityTaxIdentifierGenericSubmission as p, IdentityTaxIdentifierSchemeSubmission as q, IdentityTaxIdentifierSubmission as r, IdentityVerificationChallenge as s, IdentityVerificationResponse as t, IdentityVerificationStatus as u, RequirementFieldName as v, RequirementItemStatus as w, Requirements as x, AssetBase as y, AssetStatus as z };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/api/errors.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// API errors\n// ---------------------------------------------------------------------------\n\nexport const DevPlatformApiErrorCodes = {\n unknownError: 'unknown_error',\n unauthorized: 'unauthorized',\n forbidden: 'forbidden',\n notFound: 'not_found',\n invalidRequest: 'invalid_request',\n notImplemented: 'not_implemented',\n tooManyRequests: 'too_many_requests',\n notAllowed: 'not_allowed',\n conflict: 'conflict',\n unprocessableEntity: 'unprocessable_entity',\n sseTimeout: 'sse_timeout',\n sseError: 'sse_error',\n connectionRequired: 'connection_required',\n connectionPending: 'connection_pending',\n connectionUnavailable: 'connection_unavailable',\n serviceUnavailable: 'service_unavailable',\n requirementsIncomplete: 'requirements_incomplete',\n verificationRejected: 'verification_rejected',\n countryMismatch: 'country_mismatch',\n unsupportedCountry: 'unsupported_country',\n} as const;\n\nexport type DevPlatformApiErrorCode =\n (typeof DevPlatformApiErrorCodes)[keyof typeof DevPlatformApiErrorCodes];\n\nexport interface DevPlatformApiErrorDetail {\n field?: string;\n message: string;\n}\n\n/** Shape returned by the MoonPay Platform API on error responses. */\nexport interface DevPlatformApiError {\n code: DevPlatformApiErrorCode;\n message: string;\n errors?: DevPlatformApiErrorDetail[];\n}\n\n// ---------------------------------------------------------------------------\n// API call result errors (all alias DevPlatformApiError)\n// ---------------------------------------------------------------------------\n\nexport type GetQuoteError = DevPlatformApiError;\nexport type GetAssetsError = DevPlatformApiError;\nexport type GetPaymentMethodsError = DevPlatformApiError;\nexport type GetTransactionsError = DevPlatformApiError;\nexport type CreateSessionError = DevPlatformApiError;\nexport type RevokeSessionError = DevPlatformApiError;\n/** @deprecated Use the Customer API errors below instead. */\nexport type CreateIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link GetCustomerError} instead. */\nexport type GetIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link SubmitCustomerKycError} instead. */\nexport type UpdateIdentityError = DevPlatformApiError;\n/** @deprecated No longer needed — Customer API verification has no direct replacement call. */\nexport type VerifyIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link GetCustomerUploadUrlError} instead. */\nexport type GetIdentityUploadUrlError = DevPlatformApiError;\n/** @deprecated Use {@link SubmitCustomerFilesError} instead. */\nexport type SubmitIdentityFilesError = DevPlatformApiError;\n\nexport type GetCustomerError = DevPlatformApiError;\nexport type SubmitCustomerKycError = DevPlatformApiError;\nexport type GetCustomerUploadUrlError = DevPlatformApiError;\nexport type SubmitCustomerFilesError = DevPlatformApiError;\nexport type ExportCustomerError = DevPlatformApiError;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,2BAA2B;AAAA,EACtC,cAAc;AAAA,EACd,cAAc;AAAA,EACd,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,oBAAoB;AACtB;","names":[]}
1
+ {"version":3,"sources":["../../src/api/errors.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// API errors\n// ---------------------------------------------------------------------------\n\nexport const DevPlatformApiErrorCodes = {\n unknownError: 'unknown_error',\n unauthorized: 'unauthorized',\n forbidden: 'forbidden',\n notFound: 'not_found',\n invalidRequest: 'invalid_request',\n notImplemented: 'not_implemented',\n tooManyRequests: 'too_many_requests',\n notAllowed: 'not_allowed',\n conflict: 'conflict',\n unprocessableEntity: 'unprocessable_entity',\n sseTimeout: 'sse_timeout',\n sseError: 'sse_error',\n connectionRequired: 'connection_required',\n connectionPending: 'connection_pending',\n connectionUnavailable: 'connection_unavailable',\n serviceUnavailable: 'service_unavailable',\n requirementsIncomplete: 'requirements_incomplete',\n verificationRejected: 'verification_rejected',\n countryMismatch: 'country_mismatch',\n unsupportedCountry: 'unsupported_country',\n} as const;\n\nexport type DevPlatformApiErrorCode =\n (typeof DevPlatformApiErrorCodes)[keyof typeof DevPlatformApiErrorCodes];\n\nexport interface DevPlatformApiErrorDetail {\n field?: string;\n message: string;\n}\n\n/** Shape returned by the MoonPay Platform API on error responses. */\nexport interface DevPlatformApiError {\n code: DevPlatformApiErrorCode;\n message: string;\n errors?: DevPlatformApiErrorDetail[];\n}\n\n// ---------------------------------------------------------------------------\n// API call result errors (all alias DevPlatformApiError)\n// ---------------------------------------------------------------------------\n\nexport type GetQuoteError = DevPlatformApiError;\nexport type GetAssetsError = DevPlatformApiError;\nexport type GetPaymentMethodsError = DevPlatformApiError;\nexport type GetTransactionsError = DevPlatformApiError;\nexport type SimulateBankTransferError = DevPlatformApiError;\nexport type CreateSessionError = DevPlatformApiError;\nexport type RevokeSessionError = DevPlatformApiError;\n/** @deprecated Use the Customer API errors below instead. */\nexport type CreateIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link GetCustomerError} instead. */\nexport type GetIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link SubmitCustomerKycError} instead. */\nexport type UpdateIdentityError = DevPlatformApiError;\n/** @deprecated No longer needed — Customer API verification has no direct replacement call. */\nexport type VerifyIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link GetCustomerUploadUrlError} instead. */\nexport type GetIdentityUploadUrlError = DevPlatformApiError;\n/** @deprecated Use {@link SubmitCustomerFilesError} instead. */\nexport type SubmitIdentityFilesError = DevPlatformApiError;\n\nexport type GetCustomerError = DevPlatformApiError;\nexport type SubmitCustomerKycError = DevPlatformApiError;\nexport type GetCustomerUploadUrlError = DevPlatformApiError;\nexport type SubmitCustomerFilesError = DevPlatformApiError;\nexport type ExportCustomerError = DevPlatformApiError;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,2BAA2B;AAAA,EACtC,cAAc;AAAA,EACd,cAAc;AAAA,EACd,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,oBAAoB;AACtB;","names":[]}
@@ -35,6 +35,7 @@ type GetQuoteError = DevPlatformApiError;
35
35
  type GetAssetsError = DevPlatformApiError;
36
36
  type GetPaymentMethodsError = DevPlatformApiError;
37
37
  type GetTransactionsError = DevPlatformApiError;
38
+ type SimulateBankTransferError = DevPlatformApiError;
38
39
  type CreateSessionError = DevPlatformApiError;
39
40
  type RevokeSessionError = DevPlatformApiError;
40
41
  /** @deprecated Use the Customer API errors below instead. */
@@ -55,4 +56,4 @@ type GetCustomerUploadUrlError = DevPlatformApiError;
55
56
  type SubmitCustomerFilesError = DevPlatformApiError;
56
57
  type ExportCustomerError = DevPlatformApiError;
57
58
 
58
- export { type CreateIdentityError, type CreateSessionError, type DevPlatformApiError, type DevPlatformApiErrorCode, DevPlatformApiErrorCodes, type DevPlatformApiErrorDetail, type ExportCustomerError, type GetAssetsError, type GetCustomerError, type GetCustomerUploadUrlError, type GetIdentityError, type GetIdentityUploadUrlError, type GetPaymentMethodsError, type GetQuoteError, type GetTransactionsError, type RevokeSessionError, type SubmitCustomerFilesError, type SubmitCustomerKycError, type SubmitIdentityFilesError, type UpdateIdentityError, type VerifyIdentityError };
59
+ export { type CreateIdentityError, type CreateSessionError, type DevPlatformApiError, type DevPlatformApiErrorCode, DevPlatformApiErrorCodes, type DevPlatformApiErrorDetail, type ExportCustomerError, type GetAssetsError, type GetCustomerError, type GetCustomerUploadUrlError, type GetIdentityError, type GetIdentityUploadUrlError, type GetPaymentMethodsError, type GetQuoteError, type GetTransactionsError, type RevokeSessionError, type SimulateBankTransferError, type SubmitCustomerFilesError, type SubmitCustomerKycError, type SubmitIdentityFilesError, type UpdateIdentityError, type VerifyIdentityError };
@@ -35,6 +35,7 @@ type GetQuoteError = DevPlatformApiError;
35
35
  type GetAssetsError = DevPlatformApiError;
36
36
  type GetPaymentMethodsError = DevPlatformApiError;
37
37
  type GetTransactionsError = DevPlatformApiError;
38
+ type SimulateBankTransferError = DevPlatformApiError;
38
39
  type CreateSessionError = DevPlatformApiError;
39
40
  type RevokeSessionError = DevPlatformApiError;
40
41
  /** @deprecated Use the Customer API errors below instead. */
@@ -55,4 +56,4 @@ type GetCustomerUploadUrlError = DevPlatformApiError;
55
56
  type SubmitCustomerFilesError = DevPlatformApiError;
56
57
  type ExportCustomerError = DevPlatformApiError;
57
58
 
58
- export { type CreateIdentityError, type CreateSessionError, type DevPlatformApiError, type DevPlatformApiErrorCode, DevPlatformApiErrorCodes, type DevPlatformApiErrorDetail, type ExportCustomerError, type GetAssetsError, type GetCustomerError, type GetCustomerUploadUrlError, type GetIdentityError, type GetIdentityUploadUrlError, type GetPaymentMethodsError, type GetQuoteError, type GetTransactionsError, type RevokeSessionError, type SubmitCustomerFilesError, type SubmitCustomerKycError, type SubmitIdentityFilesError, type UpdateIdentityError, type VerifyIdentityError };
59
+ export { type CreateIdentityError, type CreateSessionError, type DevPlatformApiError, type DevPlatformApiErrorCode, DevPlatformApiErrorCodes, type DevPlatformApiErrorDetail, type ExportCustomerError, type GetAssetsError, type GetCustomerError, type GetCustomerUploadUrlError, type GetIdentityError, type GetIdentityUploadUrlError, type GetPaymentMethodsError, type GetQuoteError, type GetTransactionsError, type RevokeSessionError, type SimulateBankTransferError, type SubmitCustomerFilesError, type SubmitCustomerKycError, type SubmitIdentityFilesError, type UpdateIdentityError, type VerifyIdentityError };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/api/errors.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// API errors\n// ---------------------------------------------------------------------------\n\nexport const DevPlatformApiErrorCodes = {\n unknownError: 'unknown_error',\n unauthorized: 'unauthorized',\n forbidden: 'forbidden',\n notFound: 'not_found',\n invalidRequest: 'invalid_request',\n notImplemented: 'not_implemented',\n tooManyRequests: 'too_many_requests',\n notAllowed: 'not_allowed',\n conflict: 'conflict',\n unprocessableEntity: 'unprocessable_entity',\n sseTimeout: 'sse_timeout',\n sseError: 'sse_error',\n connectionRequired: 'connection_required',\n connectionPending: 'connection_pending',\n connectionUnavailable: 'connection_unavailable',\n serviceUnavailable: 'service_unavailable',\n requirementsIncomplete: 'requirements_incomplete',\n verificationRejected: 'verification_rejected',\n countryMismatch: 'country_mismatch',\n unsupportedCountry: 'unsupported_country',\n} as const;\n\nexport type DevPlatformApiErrorCode =\n (typeof DevPlatformApiErrorCodes)[keyof typeof DevPlatformApiErrorCodes];\n\nexport interface DevPlatformApiErrorDetail {\n field?: string;\n message: string;\n}\n\n/** Shape returned by the MoonPay Platform API on error responses. */\nexport interface DevPlatformApiError {\n code: DevPlatformApiErrorCode;\n message: string;\n errors?: DevPlatformApiErrorDetail[];\n}\n\n// ---------------------------------------------------------------------------\n// API call result errors (all alias DevPlatformApiError)\n// ---------------------------------------------------------------------------\n\nexport type GetQuoteError = DevPlatformApiError;\nexport type GetAssetsError = DevPlatformApiError;\nexport type GetPaymentMethodsError = DevPlatformApiError;\nexport type GetTransactionsError = DevPlatformApiError;\nexport type CreateSessionError = DevPlatformApiError;\nexport type RevokeSessionError = DevPlatformApiError;\n/** @deprecated Use the Customer API errors below instead. */\nexport type CreateIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link GetCustomerError} instead. */\nexport type GetIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link SubmitCustomerKycError} instead. */\nexport type UpdateIdentityError = DevPlatformApiError;\n/** @deprecated No longer needed — Customer API verification has no direct replacement call. */\nexport type VerifyIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link GetCustomerUploadUrlError} instead. */\nexport type GetIdentityUploadUrlError = DevPlatformApiError;\n/** @deprecated Use {@link SubmitCustomerFilesError} instead. */\nexport type SubmitIdentityFilesError = DevPlatformApiError;\n\nexport type GetCustomerError = DevPlatformApiError;\nexport type SubmitCustomerKycError = DevPlatformApiError;\nexport type GetCustomerUploadUrlError = DevPlatformApiError;\nexport type SubmitCustomerFilesError = DevPlatformApiError;\nexport type ExportCustomerError = DevPlatformApiError;\n"],"mappings":";AAIO,IAAM,2BAA2B;AAAA,EACtC,cAAc;AAAA,EACd,cAAc;AAAA,EACd,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,oBAAoB;AACtB;","names":[]}
1
+ {"version":3,"sources":["../../src/api/errors.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// API errors\n// ---------------------------------------------------------------------------\n\nexport const DevPlatformApiErrorCodes = {\n unknownError: 'unknown_error',\n unauthorized: 'unauthorized',\n forbidden: 'forbidden',\n notFound: 'not_found',\n invalidRequest: 'invalid_request',\n notImplemented: 'not_implemented',\n tooManyRequests: 'too_many_requests',\n notAllowed: 'not_allowed',\n conflict: 'conflict',\n unprocessableEntity: 'unprocessable_entity',\n sseTimeout: 'sse_timeout',\n sseError: 'sse_error',\n connectionRequired: 'connection_required',\n connectionPending: 'connection_pending',\n connectionUnavailable: 'connection_unavailable',\n serviceUnavailable: 'service_unavailable',\n requirementsIncomplete: 'requirements_incomplete',\n verificationRejected: 'verification_rejected',\n countryMismatch: 'country_mismatch',\n unsupportedCountry: 'unsupported_country',\n} as const;\n\nexport type DevPlatformApiErrorCode =\n (typeof DevPlatformApiErrorCodes)[keyof typeof DevPlatformApiErrorCodes];\n\nexport interface DevPlatformApiErrorDetail {\n field?: string;\n message: string;\n}\n\n/** Shape returned by the MoonPay Platform API on error responses. */\nexport interface DevPlatformApiError {\n code: DevPlatformApiErrorCode;\n message: string;\n errors?: DevPlatformApiErrorDetail[];\n}\n\n// ---------------------------------------------------------------------------\n// API call result errors (all alias DevPlatformApiError)\n// ---------------------------------------------------------------------------\n\nexport type GetQuoteError = DevPlatformApiError;\nexport type GetAssetsError = DevPlatformApiError;\nexport type GetPaymentMethodsError = DevPlatformApiError;\nexport type GetTransactionsError = DevPlatformApiError;\nexport type SimulateBankTransferError = DevPlatformApiError;\nexport type CreateSessionError = DevPlatformApiError;\nexport type RevokeSessionError = DevPlatformApiError;\n/** @deprecated Use the Customer API errors below instead. */\nexport type CreateIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link GetCustomerError} instead. */\nexport type GetIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link SubmitCustomerKycError} instead. */\nexport type UpdateIdentityError = DevPlatformApiError;\n/** @deprecated No longer needed — Customer API verification has no direct replacement call. */\nexport type VerifyIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link GetCustomerUploadUrlError} instead. */\nexport type GetIdentityUploadUrlError = DevPlatformApiError;\n/** @deprecated Use {@link SubmitCustomerFilesError} instead. */\nexport type SubmitIdentityFilesError = DevPlatformApiError;\n\nexport type GetCustomerError = DevPlatformApiError;\nexport type SubmitCustomerKycError = DevPlatformApiError;\nexport type GetCustomerUploadUrlError = DevPlatformApiError;\nexport type SubmitCustomerFilesError = DevPlatformApiError;\nexport type ExportCustomerError = DevPlatformApiError;\n"],"mappings":";AAIO,IAAM,2BAA2B;AAAA,EACtC,cAAc;AAAA,EACd,cAAc;AAAA,EACd,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,oBAAoB;AACtB;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/api/index.ts"],"sourcesContent":["/**\n * Partner-friendly type aliases re-exported from the generated OpenAPI types.\n * These drop namespace prefixes and provide consistent names across SDK versions.\n */\nexport type {\n // Assets\n Asset,\n AssetBase,\n AssetControllerListAssetsResponse as ListAssetsResponse,\n AssetStatus,\n // Transactions — bank transfer deposit info\n BankTransferDepositInfo,\n // Session\n CreateSessionTokenRequestBody,\n CreateSessionTokenResponse as CreateSessionTokenReturnType,\n // Quotes — exchange rate type\n ExchangeRateType,\n // Fees / wallet\n FeeBehavior,\n Fees,\n // Quotes\n GetQuoteBody as GetQuoteParams,\n GetQuoteResponse as Quote,\n LimitWithAsset,\n MonetaryFeeAmount,\n MoonPayCorePaginationInfo as PaginationInfo,\n // Payment methods — config catalog\n MoonPayPaymentsListPaymentMethodsResponse as ListPaymentMethodsResponse,\n MoonPayPaymentsPaymentMethod as PaymentMethodConfig,\n MoonPayPaymentsPaymentMethodAvailability as PaymentMethodAvailability,\n MoonPayPaymentsPaymentMethodCapabilities as PaymentMethodCapabilities,\n MoonPayPaymentsStoredCardPaymentMethod as StoredCardPaymentMethod,\n // Payment methods — stored cards\n MoonPayPaymentsStoredPaymentMethod as StoredPaymentMethod,\n PaymentMethodType,\n PlatformAsset,\n QuoteLimitEntry,\n QuoteLimits,\n QuotePaymentMethod,\n // Stages\n Stage,\n StageKind,\n StageStatus,\n // Transactions\n Transaction,\n TransactionCustomer,\n TransactionPaymentMethod,\n TransactionStatus,\n TransactionWithStages,\n Wallet,\n} from './gen/index.js';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/api/index.ts"],"sourcesContent":["/**\n * Partner-friendly type aliases re-exported from the generated OpenAPI types.\n * These drop namespace prefixes and provide consistent names across SDK versions.\n */\nexport type {\n // Assets\n Asset,\n AssetBase,\n AssetControllerListAssetsResponse as ListAssetsResponse,\n AssetStatus,\n // Transactions — bank transfer deposit info\n BankTransferDepositInfo,\n // Session\n CreateSessionTokenRequestBody,\n CreateSessionTokenResponse as CreateSessionTokenReturnType,\n // Quotes — exchange rate type\n ExchangeRateType,\n // Fees / wallet\n FeeBehavior,\n Fees,\n // Quotes\n GetQuoteBody as GetQuoteParams,\n GetQuoteResponse as Quote,\n LimitWithAsset,\n MonetaryFeeAmount,\n MoonPayCorePaginationInfo as PaginationInfo,\n // Payment methods — config catalog\n MoonPayPaymentsListPaymentMethodsResponse as ListPaymentMethodsResponse,\n MoonPayPaymentsPaymentMethod as PaymentMethodConfig,\n MoonPayPaymentsPaymentMethodAvailability as PaymentMethodAvailability,\n MoonPayPaymentsPaymentMethodCapabilities as PaymentMethodCapabilities,\n MoonPayPaymentsStoredCardPaymentMethod as StoredCardPaymentMethod,\n // Payment methods — stored cards\n MoonPayPaymentsStoredPaymentMethod as StoredPaymentMethod,\n PaymentMethodType,\n PlatformAsset,\n QuoteLimitEntry,\n QuoteLimits,\n QuotePaymentMethod,\n // Transactions — simulate bank transfer (sandbox)\n SimulateBankTransferOutcome,\n SimulateBankTransferRequest as SimulateBankTransferParams,\n SimulateSenderBankAccount,\n // Stages\n Stage,\n StageKind,\n StageStatus,\n // Transactions\n Transaction,\n TransactionCustomer,\n TransactionPaymentMethod,\n TransactionStatus,\n TransactionWithStages,\n Wallet,\n} from './gen/index.js';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1 +1 @@
1
- export { A as Asset, y as AssetBase, z as AssetStatus, B as BankTransferDepositInfo, D as CreateSessionTokenRequestBody, E as CreateSessionTokenReturnType, F as ExchangeRateType, G as FeeBehavior, H as Fees, J as GetQuoteParams, L as LimitWithAsset, K as ListAssetsResponse, M as ListPaymentMethodsResponse, N as MonetaryFeeAmount, O as PaginationInfo, P as PaymentMethodAvailability, Q as PaymentMethodCapabilities, T as PaymentMethodConfig, V as PaymentMethodType, W as PlatformAsset, X as Quote, Y as QuoteLimitEntry, Z as QuoteLimits, _ as QuotePaymentMethod, $ as Stage, a0 as StageKind, a1 as StageStatus, a2 as StoredCardPaymentMethod, a3 as StoredPaymentMethod, a4 as Transaction, a5 as TransactionCustomer, a6 as TransactionPaymentMethod, a7 as TransactionStatus, a8 as TransactionWithStages, a9 as Wallet } from './customer.cjs';
1
+ export { A as Asset, y as AssetBase, z as AssetStatus, B as BankTransferDepositInfo, D as CreateSessionTokenRequestBody, E as CreateSessionTokenReturnType, F as ExchangeRateType, G as FeeBehavior, H as Fees, J as GetQuoteParams, L as LimitWithAsset, K as ListAssetsResponse, M as ListPaymentMethodsResponse, N as MonetaryFeeAmount, O as PaginationInfo, P as PaymentMethodAvailability, Q as PaymentMethodCapabilities, T as PaymentMethodConfig, V as PaymentMethodType, W as PlatformAsset, X as Quote, Y as QuoteLimitEntry, Z as QuoteLimits, _ as QuotePaymentMethod, $ as SimulateBankTransferOutcome, a0 as SimulateBankTransferParams, a1 as SimulateSenderBankAccount, a2 as Stage, a3 as StageKind, a4 as StageStatus, a5 as StoredCardPaymentMethod, a6 as StoredPaymentMethod, a7 as Transaction, a8 as TransactionCustomer, a9 as TransactionPaymentMethod, aa as TransactionStatus, ab as TransactionWithStages, ac as Wallet } from './customer.cjs';
@@ -1 +1 @@
1
- export { A as Asset, y as AssetBase, z as AssetStatus, B as BankTransferDepositInfo, D as CreateSessionTokenRequestBody, E as CreateSessionTokenReturnType, F as ExchangeRateType, G as FeeBehavior, H as Fees, J as GetQuoteParams, L as LimitWithAsset, K as ListAssetsResponse, M as ListPaymentMethodsResponse, N as MonetaryFeeAmount, O as PaginationInfo, P as PaymentMethodAvailability, Q as PaymentMethodCapabilities, T as PaymentMethodConfig, V as PaymentMethodType, W as PlatformAsset, X as Quote, Y as QuoteLimitEntry, Z as QuoteLimits, _ as QuotePaymentMethod, $ as Stage, a0 as StageKind, a1 as StageStatus, a2 as StoredCardPaymentMethod, a3 as StoredPaymentMethod, a4 as Transaction, a5 as TransactionCustomer, a6 as TransactionPaymentMethod, a7 as TransactionStatus, a8 as TransactionWithStages, a9 as Wallet } from './customer.js';
1
+ export { A as Asset, y as AssetBase, z as AssetStatus, B as BankTransferDepositInfo, D as CreateSessionTokenRequestBody, E as CreateSessionTokenReturnType, F as ExchangeRateType, G as FeeBehavior, H as Fees, J as GetQuoteParams, L as LimitWithAsset, K as ListAssetsResponse, M as ListPaymentMethodsResponse, N as MonetaryFeeAmount, O as PaginationInfo, P as PaymentMethodAvailability, Q as PaymentMethodCapabilities, T as PaymentMethodConfig, V as PaymentMethodType, W as PlatformAsset, X as Quote, Y as QuoteLimitEntry, Z as QuoteLimits, _ as QuotePaymentMethod, $ as SimulateBankTransferOutcome, a0 as SimulateBankTransferParams, a1 as SimulateSenderBankAccount, a2 as Stage, a3 as StageKind, a4 as StageStatus, a5 as StoredCardPaymentMethod, a6 as StoredPaymentMethod, a7 as Transaction, a8 as TransactionCustomer, a9 as TransactionPaymentMethod, aa as TransactionStatus, ab as TransactionWithStages, ac as Wallet } from './customer.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/models/connection.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Connection statuses\n// ---------------------------------------------------------------------------\n\nexport enum ConnectionStatus {\n /**\n * New or expired user — needs the full connect flow.\n */\n connectionRequired = 'connectionRequired',\n\n /**\n * Valid connection — encrypted credentials are included.\n */\n active = 'active',\n\n /**\n * Restricted location — connection cannot be used.\n */\n unavailable = 'unavailable',\n\n /**\n * KYC decision delayed — may resolve on a subsequent visit.\n */\n pending = 'pending',\n\n /**\n * Terminal failure — KYC fail, rejection, etc.\n */\n failed = 'failed',\n\n /**\n * Customer has no valid Terms of Use attestation on file (headless/Identity API partners).\n * Display Terms of Use in your own UI, capture acceptance, call\n * `POST /platform/v1/terms/attestations`, then retry the connection.\n */\n termsAcceptanceRequired = 'termsAcceptanceRequired',\n}\n\nexport interface ConnectionRequired {\n status: ConnectionStatus.connectionRequired;\n /**\n * Base64-encoded, X25519+AES-GCM encrypted anonymous token payload.\n * These are frame-internal tokens used by the connect frame — they cannot be\n * used to call MoonPay APIs directly. Decrypt via `decryptCredentials()` only\n * if you need the `clientToken` to bootstrap the connect frame manually.\n */\n credentials: string;\n /**\n * Capabilities and regulatory requirements available before authentication, if any.\n * Present when guest checkout is enabled for the partner.\n */\n capabilities?: CustomerCapabilities;\n /**\n * Set when the session's email and phone number resolve to two different\n * MoonPay customers (a conflict). Partners should route the customer\n * through Connect proactively before rendering payment UI (e.g. Apple Pay).\n *\n * Note: the check-connection frame does not emit this field yet — treat\n * it as absent until frame support ships.\n */\n mismatch?: boolean;\n}\n\nexport interface ActiveConnection {\n status: ConnectionStatus.active;\n /** The authenticated MoonPay customer. */\n customer: {\n /** The MoonPay customer ID. */\n id: string;\n /** ISO 3166-1 alpha-3 country code for the customer's jurisdiction. */\n country?: string;\n /** State or province code within the country (e.g. `'NY'` for New York). Present for US customers only. */\n administrativeArea?: string;\n /** Supra-national regulatory area code (e.g. `'EEA'`, `'EFTA'`). Present when the customer is in a regulated area. */\n area?: string;\n };\n /**\n * Base64-encoded, X25519+AES-GCM encrypted JSON containing:\n * ```json\n * {\n * \"accessToken\": \"<token>\",\n * \"clientToken\": \"<token>\",\n * \"expiresAt\": \"<iso8601>\"\n * }\n * ```\n *\n * - `accessToken`: A token that can be used to make API requests from the client.\n * - `clientToken`: A token that can be used to initialize sensitive frames such as Apple Pay.\n * - `expiresAt`: An ISO 8601 formatted string indicating when the tokens expire.\n */\n credentials: string;\n /**\n * Capabilities and regulatory requirements for the authenticated customer.\n */\n capabilities: CustomerCapabilities;\n}\n\nexport interface UnavailableConnection {\n status: ConnectionStatus.unavailable;\n}\n\nexport interface PendingConnection {\n status: ConnectionStatus.pending;\n}\n\nexport interface FailedConnection {\n status: ConnectionStatus.failed;\n reason: string;\n}\n\nexport interface TermsAcceptanceRequiredConnection {\n status: ConnectionStatus.termsAcceptanceRequired;\n}\n\n/** Discriminated union of all connection result statuses. */\nexport type Connection =\n | ConnectionRequired\n | ActiveConnection\n | UnavailableConnection\n | PendingConnection\n | FailedConnection\n | TermsAcceptanceRequiredConnection;\n\n// ---------------------------------------------------------------------------\n// Decrypted credentials (what the SDK exposes after decryption)\n// ---------------------------------------------------------------------------\n\nexport interface DecryptedCredentials {\n accessToken: string;\n clientToken: string;\n expiresAt: string;\n}\n\n// ---------------------------------------------------------------------------\n// Customer capabilities\n// ---------------------------------------------------------------------------\n\n/**\n * Capabilities and regulatory requirements for the authenticated customer.\n */\nexport interface CustomerCapabilities {\n /** Capabilities for the ramps (buy and sell) product. */\n ramps?: RampsCapability;\n /** Capabilities for the guest checkout flow. Present when guest checkout is enabled for the partner and the session is a guest-checkout session. */\n guestCheckout?: RampsCapability;\n}\n\n/**\n * Capabilities and requirements for the ramps (buy and sell) product.\n */\nexport interface RampsCapability {\n /** Regulatory requirements for ramps operations in the customer's jurisdiction. */\n requirements: RampsRequirements;\n}\n\n/**\n * Regulatory requirements that apply to ramps operations for the customer.\n */\nexport interface RampsRequirements {\n /**\n * Present when the customer's jurisdiction requires payment disclosures\n * before a ramps transaction. Omitted when no disclosures are required.\n *\n * @deprecated Use `customer.country`, `customer.administrativeArea`, and `customer.area`\n * from the active connection instead. This field will be removed in a future release.\n */\n paymentDisclosures?: PaymentDisclosuresRequirement;\n}\n\n/**\n * A jurisdiction that requires payment disclosures before a ramps transaction.\n */\nexport interface PaymentDisclosuresRequirement {\n /** The ISO 3166-1 alpha-3 country code for the jurisdiction. */\n country: string;\n /** The state or province code within the country (e.g. `'NY'` for New York). Present for US customers only. */\n administrativeArea?: string;\n /** Supra-national regulatory area code (e.g. `'EEA'`, `'EFTA'`). */\n area?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Connection errors\n// ---------------------------------------------------------------------------\n\nexport enum ConnectionErrorCode {\n validationError = 'validationError',\n /** Wire value is `'generic'`. */\n connectionFailedGeneric = 'generic',\n}\n\nexport interface ConfigValidationFieldError {\n code: 'invalidSessionToken' | 'invalidClientToken' | 'invalidPublicKey';\n message: string;\n}\n\nexport type ConnectionError =\n | {\n code: ConnectionErrorCode.validationError;\n errors: ConfigValidationFieldError[];\n }\n | {\n code: ConnectionErrorCode.connectionFailedGeneric;\n message?: string;\n };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAK,mBAAL,kBAAKA,sBAAL;AAIL,EAAAA,kBAAA,wBAAqB;AAKrB,EAAAA,kBAAA,YAAS;AAKT,EAAAA,kBAAA,iBAAc;AAKd,EAAAA,kBAAA,aAAU;AAKV,EAAAA,kBAAA,YAAS;AAOT,EAAAA,kBAAA,6BAA0B;AA/BhB,SAAAA;AAAA,GAAA;AAqLL,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,qBAAkB;AAElB,EAAAA,qBAAA,6BAA0B;AAHhB,SAAAA;AAAA,GAAA;","names":["ConnectionStatus","ConnectionErrorCode"]}
1
+ {"version":3,"sources":["../../src/models/connection.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Connection statuses\n// ---------------------------------------------------------------------------\n\nexport enum ConnectionStatus {\n /**\n * New or expired user — needs the full connect flow.\n */\n connectionRequired = 'connectionRequired',\n\n /**\n * Valid connection — encrypted credentials are included.\n */\n active = 'active',\n\n /**\n * Restricted location — connection cannot be used.\n */\n unavailable = 'unavailable',\n\n /**\n * KYC decision delayed — may resolve on a subsequent visit.\n */\n pending = 'pending',\n\n /**\n * Terminal failure — KYC fail, rejection, etc.\n */\n failed = 'failed',\n\n /**\n * Customer has no valid Terms of Use attestation on file (headless/Identity API partners).\n * Display Terms of Use in your own UI, capture acceptance, call\n * `POST /platform/v1/terms/attestations`, then retry the connection.\n */\n termsAcceptanceRequired = 'termsAcceptanceRequired',\n}\n\nexport interface ConnectionRequired {\n status: ConnectionStatus.connectionRequired;\n /**\n * Base64-encoded, X25519+AES-GCM encrypted anonymous token payload.\n * These are frame-internal tokens used by the connect frame — they cannot be\n * used to call MoonPay APIs directly. Decrypt via `decryptCredentials()` only\n * if you need the `clientToken` to bootstrap the connect frame manually.\n */\n credentials: string;\n /**\n * Capabilities and regulatory requirements available before authentication, if any.\n * Present when guest checkout is enabled for the partner.\n */\n capabilities?: CustomerCapabilities;\n /**\n * Set when the session's email and phone number resolve to two different\n * MoonPay customers (a conflict). Partners should route the customer\n * through Connect proactively before rendering payment UI (e.g. Apple Pay or Google Pay).\n *\n * Note: the check-connection frame does not emit this field yet — treat\n * it as absent until frame support ships.\n */\n mismatch?: boolean;\n}\n\nexport interface ActiveConnection {\n status: ConnectionStatus.active;\n /** The authenticated MoonPay customer. */\n customer: {\n /** The MoonPay customer ID. */\n id: string;\n /** ISO 3166-1 alpha-3 country code for the customer's jurisdiction. */\n country?: string;\n /** State or province code within the country (e.g. `'NY'` for New York). Present for US customers only. */\n administrativeArea?: string;\n /** Supra-national regulatory area code (e.g. `'EEA'`, `'EFTA'`). Present when the customer is in a regulated area. */\n area?: string;\n };\n /**\n * Base64-encoded, X25519+AES-GCM encrypted JSON containing:\n * ```json\n * {\n * \"accessToken\": \"<token>\",\n * \"clientToken\": \"<token>\",\n * \"expiresAt\": \"<iso8601>\"\n * }\n * ```\n *\n * - `accessToken`: A token that can be used to make API requests from the client.\n * - `clientToken`: A token that can be used to initialize sensitive frames such as Apple Pay or Google Pay.\n * - `expiresAt`: An ISO 8601 formatted string indicating when the tokens expire.\n */\n credentials: string;\n /**\n * Capabilities and regulatory requirements for the authenticated customer.\n */\n capabilities: CustomerCapabilities;\n}\n\nexport interface UnavailableConnection {\n status: ConnectionStatus.unavailable;\n}\n\nexport interface PendingConnection {\n status: ConnectionStatus.pending;\n}\n\nexport interface FailedConnection {\n status: ConnectionStatus.failed;\n reason: string;\n}\n\nexport interface TermsAcceptanceRequiredConnection {\n status: ConnectionStatus.termsAcceptanceRequired;\n}\n\n/** Discriminated union of all connection result statuses. */\nexport type Connection =\n | ConnectionRequired\n | ActiveConnection\n | UnavailableConnection\n | PendingConnection\n | FailedConnection\n | TermsAcceptanceRequiredConnection;\n\n// ---------------------------------------------------------------------------\n// Decrypted credentials (what the SDK exposes after decryption)\n// ---------------------------------------------------------------------------\n\nexport interface DecryptedCredentials {\n accessToken: string;\n clientToken: string;\n expiresAt: string;\n}\n\n// ---------------------------------------------------------------------------\n// Customer capabilities\n// ---------------------------------------------------------------------------\n\n/**\n * Capabilities and regulatory requirements for the authenticated customer.\n */\nexport interface CustomerCapabilities {\n /** Capabilities for the ramps (buy and sell) product. */\n ramps?: RampsCapability;\n /** Capabilities for the guest checkout flow. Present when guest checkout is enabled for the partner and the session is a guest-checkout session. */\n guestCheckout?: RampsCapability;\n}\n\n/**\n * Capabilities and requirements for the ramps (buy and sell) product.\n */\nexport interface RampsCapability {\n /** Regulatory requirements for ramps operations in the customer's jurisdiction. */\n requirements: RampsRequirements;\n}\n\n/**\n * Regulatory requirements that apply to ramps operations for the customer.\n */\nexport interface RampsRequirements {\n /**\n * Present when the customer's jurisdiction requires payment disclosures\n * before a ramps transaction. Omitted when no disclosures are required.\n *\n * @deprecated Use `customer.country`, `customer.administrativeArea`, and `customer.area`\n * from the active connection instead. This field will be removed in a future release.\n */\n paymentDisclosures?: PaymentDisclosuresRequirement;\n}\n\n/**\n * A jurisdiction that requires payment disclosures before a ramps transaction.\n */\nexport interface PaymentDisclosuresRequirement {\n /** The ISO 3166-1 alpha-3 country code for the jurisdiction. */\n country: string;\n /** The state or province code within the country (e.g. `'NY'` for New York). Present for US customers only. */\n administrativeArea?: string;\n /** Supra-national regulatory area code (e.g. `'EEA'`, `'EFTA'`). */\n area?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Connection errors\n// ---------------------------------------------------------------------------\n\nexport enum ConnectionErrorCode {\n validationError = 'validationError',\n /** Wire value is `'generic'`. */\n connectionFailedGeneric = 'generic',\n}\n\nexport interface ConfigValidationFieldError {\n code: 'invalidSessionToken' | 'invalidClientToken' | 'invalidPublicKey';\n message: string;\n}\n\nexport type ConnectionError =\n | {\n code: ConnectionErrorCode.validationError;\n errors: ConfigValidationFieldError[];\n }\n | {\n code: ConnectionErrorCode.connectionFailedGeneric;\n message?: string;\n };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAK,mBAAL,kBAAKA,sBAAL;AAIL,EAAAA,kBAAA,wBAAqB;AAKrB,EAAAA,kBAAA,YAAS;AAKT,EAAAA,kBAAA,iBAAc;AAKd,EAAAA,kBAAA,aAAU;AAKV,EAAAA,kBAAA,YAAS;AAOT,EAAAA,kBAAA,6BAA0B;AA/BhB,SAAAA;AAAA,GAAA;AAqLL,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,qBAAkB;AAElB,EAAAA,qBAAA,6BAA0B;AAHhB,SAAAA;AAAA,GAAA;","names":["ConnectionStatus","ConnectionErrorCode"]}
@@ -43,7 +43,7 @@ interface ConnectionRequired {
43
43
  /**
44
44
  * Set when the session's email and phone number resolve to two different
45
45
  * MoonPay customers (a conflict). Partners should route the customer
46
- * through Connect proactively before rendering payment UI (e.g. Apple Pay).
46
+ * through Connect proactively before rendering payment UI (e.g. Apple Pay or Google Pay).
47
47
  *
48
48
  * Note: the check-connection frame does not emit this field yet — treat
49
49
  * it as absent until frame support ships.
@@ -74,7 +74,7 @@ interface ActiveConnection {
74
74
  * ```
75
75
  *
76
76
  * - `accessToken`: A token that can be used to make API requests from the client.
77
- * - `clientToken`: A token that can be used to initialize sensitive frames such as Apple Pay.
77
+ * - `clientToken`: A token that can be used to initialize sensitive frames such as Apple Pay or Google Pay.
78
78
  * - `expiresAt`: An ISO 8601 formatted string indicating when the tokens expire.
79
79
  */
80
80
  credentials: string;
@@ -43,7 +43,7 @@ interface ConnectionRequired {
43
43
  /**
44
44
  * Set when the session's email and phone number resolve to two different
45
45
  * MoonPay customers (a conflict). Partners should route the customer
46
- * through Connect proactively before rendering payment UI (e.g. Apple Pay).
46
+ * through Connect proactively before rendering payment UI (e.g. Apple Pay or Google Pay).
47
47
  *
48
48
  * Note: the check-connection frame does not emit this field yet — treat
49
49
  * it as absent until frame support ships.
@@ -74,7 +74,7 @@ interface ActiveConnection {
74
74
  * ```
75
75
  *
76
76
  * - `accessToken`: A token that can be used to make API requests from the client.
77
- * - `clientToken`: A token that can be used to initialize sensitive frames such as Apple Pay.
77
+ * - `clientToken`: A token that can be used to initialize sensitive frames such as Apple Pay or Google Pay.
78
78
  * - `expiresAt`: An ISO 8601 formatted string indicating when the tokens expire.
79
79
  */
80
80
  credentials: string;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/models/connection.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Connection statuses\n// ---------------------------------------------------------------------------\n\nexport enum ConnectionStatus {\n /**\n * New or expired user — needs the full connect flow.\n */\n connectionRequired = 'connectionRequired',\n\n /**\n * Valid connection — encrypted credentials are included.\n */\n active = 'active',\n\n /**\n * Restricted location — connection cannot be used.\n */\n unavailable = 'unavailable',\n\n /**\n * KYC decision delayed — may resolve on a subsequent visit.\n */\n pending = 'pending',\n\n /**\n * Terminal failure — KYC fail, rejection, etc.\n */\n failed = 'failed',\n\n /**\n * Customer has no valid Terms of Use attestation on file (headless/Identity API partners).\n * Display Terms of Use in your own UI, capture acceptance, call\n * `POST /platform/v1/terms/attestations`, then retry the connection.\n */\n termsAcceptanceRequired = 'termsAcceptanceRequired',\n}\n\nexport interface ConnectionRequired {\n status: ConnectionStatus.connectionRequired;\n /**\n * Base64-encoded, X25519+AES-GCM encrypted anonymous token payload.\n * These are frame-internal tokens used by the connect frame — they cannot be\n * used to call MoonPay APIs directly. Decrypt via `decryptCredentials()` only\n * if you need the `clientToken` to bootstrap the connect frame manually.\n */\n credentials: string;\n /**\n * Capabilities and regulatory requirements available before authentication, if any.\n * Present when guest checkout is enabled for the partner.\n */\n capabilities?: CustomerCapabilities;\n /**\n * Set when the session's email and phone number resolve to two different\n * MoonPay customers (a conflict). Partners should route the customer\n * through Connect proactively before rendering payment UI (e.g. Apple Pay).\n *\n * Note: the check-connection frame does not emit this field yet — treat\n * it as absent until frame support ships.\n */\n mismatch?: boolean;\n}\n\nexport interface ActiveConnection {\n status: ConnectionStatus.active;\n /** The authenticated MoonPay customer. */\n customer: {\n /** The MoonPay customer ID. */\n id: string;\n /** ISO 3166-1 alpha-3 country code for the customer's jurisdiction. */\n country?: string;\n /** State or province code within the country (e.g. `'NY'` for New York). Present for US customers only. */\n administrativeArea?: string;\n /** Supra-national regulatory area code (e.g. `'EEA'`, `'EFTA'`). Present when the customer is in a regulated area. */\n area?: string;\n };\n /**\n * Base64-encoded, X25519+AES-GCM encrypted JSON containing:\n * ```json\n * {\n * \"accessToken\": \"<token>\",\n * \"clientToken\": \"<token>\",\n * \"expiresAt\": \"<iso8601>\"\n * }\n * ```\n *\n * - `accessToken`: A token that can be used to make API requests from the client.\n * - `clientToken`: A token that can be used to initialize sensitive frames such as Apple Pay.\n * - `expiresAt`: An ISO 8601 formatted string indicating when the tokens expire.\n */\n credentials: string;\n /**\n * Capabilities and regulatory requirements for the authenticated customer.\n */\n capabilities: CustomerCapabilities;\n}\n\nexport interface UnavailableConnection {\n status: ConnectionStatus.unavailable;\n}\n\nexport interface PendingConnection {\n status: ConnectionStatus.pending;\n}\n\nexport interface FailedConnection {\n status: ConnectionStatus.failed;\n reason: string;\n}\n\nexport interface TermsAcceptanceRequiredConnection {\n status: ConnectionStatus.termsAcceptanceRequired;\n}\n\n/** Discriminated union of all connection result statuses. */\nexport type Connection =\n | ConnectionRequired\n | ActiveConnection\n | UnavailableConnection\n | PendingConnection\n | FailedConnection\n | TermsAcceptanceRequiredConnection;\n\n// ---------------------------------------------------------------------------\n// Decrypted credentials (what the SDK exposes after decryption)\n// ---------------------------------------------------------------------------\n\nexport interface DecryptedCredentials {\n accessToken: string;\n clientToken: string;\n expiresAt: string;\n}\n\n// ---------------------------------------------------------------------------\n// Customer capabilities\n// ---------------------------------------------------------------------------\n\n/**\n * Capabilities and regulatory requirements for the authenticated customer.\n */\nexport interface CustomerCapabilities {\n /** Capabilities for the ramps (buy and sell) product. */\n ramps?: RampsCapability;\n /** Capabilities for the guest checkout flow. Present when guest checkout is enabled for the partner and the session is a guest-checkout session. */\n guestCheckout?: RampsCapability;\n}\n\n/**\n * Capabilities and requirements for the ramps (buy and sell) product.\n */\nexport interface RampsCapability {\n /** Regulatory requirements for ramps operations in the customer's jurisdiction. */\n requirements: RampsRequirements;\n}\n\n/**\n * Regulatory requirements that apply to ramps operations for the customer.\n */\nexport interface RampsRequirements {\n /**\n * Present when the customer's jurisdiction requires payment disclosures\n * before a ramps transaction. Omitted when no disclosures are required.\n *\n * @deprecated Use `customer.country`, `customer.administrativeArea`, and `customer.area`\n * from the active connection instead. This field will be removed in a future release.\n */\n paymentDisclosures?: PaymentDisclosuresRequirement;\n}\n\n/**\n * A jurisdiction that requires payment disclosures before a ramps transaction.\n */\nexport interface PaymentDisclosuresRequirement {\n /** The ISO 3166-1 alpha-3 country code for the jurisdiction. */\n country: string;\n /** The state or province code within the country (e.g. `'NY'` for New York). Present for US customers only. */\n administrativeArea?: string;\n /** Supra-national regulatory area code (e.g. `'EEA'`, `'EFTA'`). */\n area?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Connection errors\n// ---------------------------------------------------------------------------\n\nexport enum ConnectionErrorCode {\n validationError = 'validationError',\n /** Wire value is `'generic'`. */\n connectionFailedGeneric = 'generic',\n}\n\nexport interface ConfigValidationFieldError {\n code: 'invalidSessionToken' | 'invalidClientToken' | 'invalidPublicKey';\n message: string;\n}\n\nexport type ConnectionError =\n | {\n code: ConnectionErrorCode.validationError;\n errors: ConfigValidationFieldError[];\n }\n | {\n code: ConnectionErrorCode.connectionFailedGeneric;\n message?: string;\n };\n"],"mappings":";AAIO,IAAK,mBAAL,kBAAKA,sBAAL;AAIL,EAAAA,kBAAA,wBAAqB;AAKrB,EAAAA,kBAAA,YAAS;AAKT,EAAAA,kBAAA,iBAAc;AAKd,EAAAA,kBAAA,aAAU;AAKV,EAAAA,kBAAA,YAAS;AAOT,EAAAA,kBAAA,6BAA0B;AA/BhB,SAAAA;AAAA,GAAA;AAqLL,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,qBAAkB;AAElB,EAAAA,qBAAA,6BAA0B;AAHhB,SAAAA;AAAA,GAAA;","names":["ConnectionStatus","ConnectionErrorCode"]}
1
+ {"version":3,"sources":["../../src/models/connection.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Connection statuses\n// ---------------------------------------------------------------------------\n\nexport enum ConnectionStatus {\n /**\n * New or expired user — needs the full connect flow.\n */\n connectionRequired = 'connectionRequired',\n\n /**\n * Valid connection — encrypted credentials are included.\n */\n active = 'active',\n\n /**\n * Restricted location — connection cannot be used.\n */\n unavailable = 'unavailable',\n\n /**\n * KYC decision delayed — may resolve on a subsequent visit.\n */\n pending = 'pending',\n\n /**\n * Terminal failure — KYC fail, rejection, etc.\n */\n failed = 'failed',\n\n /**\n * Customer has no valid Terms of Use attestation on file (headless/Identity API partners).\n * Display Terms of Use in your own UI, capture acceptance, call\n * `POST /platform/v1/terms/attestations`, then retry the connection.\n */\n termsAcceptanceRequired = 'termsAcceptanceRequired',\n}\n\nexport interface ConnectionRequired {\n status: ConnectionStatus.connectionRequired;\n /**\n * Base64-encoded, X25519+AES-GCM encrypted anonymous token payload.\n * These are frame-internal tokens used by the connect frame — they cannot be\n * used to call MoonPay APIs directly. Decrypt via `decryptCredentials()` only\n * if you need the `clientToken` to bootstrap the connect frame manually.\n */\n credentials: string;\n /**\n * Capabilities and regulatory requirements available before authentication, if any.\n * Present when guest checkout is enabled for the partner.\n */\n capabilities?: CustomerCapabilities;\n /**\n * Set when the session's email and phone number resolve to two different\n * MoonPay customers (a conflict). Partners should route the customer\n * through Connect proactively before rendering payment UI (e.g. Apple Pay or Google Pay).\n *\n * Note: the check-connection frame does not emit this field yet — treat\n * it as absent until frame support ships.\n */\n mismatch?: boolean;\n}\n\nexport interface ActiveConnection {\n status: ConnectionStatus.active;\n /** The authenticated MoonPay customer. */\n customer: {\n /** The MoonPay customer ID. */\n id: string;\n /** ISO 3166-1 alpha-3 country code for the customer's jurisdiction. */\n country?: string;\n /** State or province code within the country (e.g. `'NY'` for New York). Present for US customers only. */\n administrativeArea?: string;\n /** Supra-national regulatory area code (e.g. `'EEA'`, `'EFTA'`). Present when the customer is in a regulated area. */\n area?: string;\n };\n /**\n * Base64-encoded, X25519+AES-GCM encrypted JSON containing:\n * ```json\n * {\n * \"accessToken\": \"<token>\",\n * \"clientToken\": \"<token>\",\n * \"expiresAt\": \"<iso8601>\"\n * }\n * ```\n *\n * - `accessToken`: A token that can be used to make API requests from the client.\n * - `clientToken`: A token that can be used to initialize sensitive frames such as Apple Pay or Google Pay.\n * - `expiresAt`: An ISO 8601 formatted string indicating when the tokens expire.\n */\n credentials: string;\n /**\n * Capabilities and regulatory requirements for the authenticated customer.\n */\n capabilities: CustomerCapabilities;\n}\n\nexport interface UnavailableConnection {\n status: ConnectionStatus.unavailable;\n}\n\nexport interface PendingConnection {\n status: ConnectionStatus.pending;\n}\n\nexport interface FailedConnection {\n status: ConnectionStatus.failed;\n reason: string;\n}\n\nexport interface TermsAcceptanceRequiredConnection {\n status: ConnectionStatus.termsAcceptanceRequired;\n}\n\n/** Discriminated union of all connection result statuses. */\nexport type Connection =\n | ConnectionRequired\n | ActiveConnection\n | UnavailableConnection\n | PendingConnection\n | FailedConnection\n | TermsAcceptanceRequiredConnection;\n\n// ---------------------------------------------------------------------------\n// Decrypted credentials (what the SDK exposes after decryption)\n// ---------------------------------------------------------------------------\n\nexport interface DecryptedCredentials {\n accessToken: string;\n clientToken: string;\n expiresAt: string;\n}\n\n// ---------------------------------------------------------------------------\n// Customer capabilities\n// ---------------------------------------------------------------------------\n\n/**\n * Capabilities and regulatory requirements for the authenticated customer.\n */\nexport interface CustomerCapabilities {\n /** Capabilities for the ramps (buy and sell) product. */\n ramps?: RampsCapability;\n /** Capabilities for the guest checkout flow. Present when guest checkout is enabled for the partner and the session is a guest-checkout session. */\n guestCheckout?: RampsCapability;\n}\n\n/**\n * Capabilities and requirements for the ramps (buy and sell) product.\n */\nexport interface RampsCapability {\n /** Regulatory requirements for ramps operations in the customer's jurisdiction. */\n requirements: RampsRequirements;\n}\n\n/**\n * Regulatory requirements that apply to ramps operations for the customer.\n */\nexport interface RampsRequirements {\n /**\n * Present when the customer's jurisdiction requires payment disclosures\n * before a ramps transaction. Omitted when no disclosures are required.\n *\n * @deprecated Use `customer.country`, `customer.administrativeArea`, and `customer.area`\n * from the active connection instead. This field will be removed in a future release.\n */\n paymentDisclosures?: PaymentDisclosuresRequirement;\n}\n\n/**\n * A jurisdiction that requires payment disclosures before a ramps transaction.\n */\nexport interface PaymentDisclosuresRequirement {\n /** The ISO 3166-1 alpha-3 country code for the jurisdiction. */\n country: string;\n /** The state or province code within the country (e.g. `'NY'` for New York). Present for US customers only. */\n administrativeArea?: string;\n /** Supra-national regulatory area code (e.g. `'EEA'`, `'EFTA'`). */\n area?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Connection errors\n// ---------------------------------------------------------------------------\n\nexport enum ConnectionErrorCode {\n validationError = 'validationError',\n /** Wire value is `'generic'`. */\n connectionFailedGeneric = 'generic',\n}\n\nexport interface ConfigValidationFieldError {\n code: 'invalidSessionToken' | 'invalidClientToken' | 'invalidPublicKey';\n message: string;\n}\n\nexport type ConnectionError =\n | {\n code: ConnectionErrorCode.validationError;\n errors: ConfigValidationFieldError[];\n }\n | {\n code: ConnectionErrorCode.connectionFailedGeneric;\n message?: string;\n };\n"],"mappings":";AAIO,IAAK,mBAAL,kBAAKA,sBAAL;AAIL,EAAAA,kBAAA,wBAAqB;AAKrB,EAAAA,kBAAA,YAAS;AAKT,EAAAA,kBAAA,iBAAc;AAKd,EAAAA,kBAAA,aAAU;AAKV,EAAAA,kBAAA,YAAS;AAOT,EAAAA,kBAAA,6BAA0B;AA/BhB,SAAAA;AAAA,GAAA;AAqLL,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,qBAAkB;AAElB,EAAAA,qBAAA,6BAA0B;AAHhB,SAAAA;AAAA,GAAA;","names":["ConnectionStatus","ConnectionErrorCode"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moonpay/platform-protocol",
3
- "version": "1.12.0",
3
+ "version": "1.13.1",
4
4
  "description": "Shared protocol types for the MoonPay Developer Platform",
5
5
  "type": "module",
6
6
  "exports": {