@moonpay/platform-protocol 1.12.0 → 1.13.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.
@@ -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' | 'mismatch';
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 (settled) and as the deposit payer (mismatch). 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' | 'mismatch';
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 (settled) and as the deposit payer (mismatch). 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';
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.0",
4
4
  "description": "Shared protocol types for the MoonPay Developer Platform",
5
5
  "type": "module",
6
6
  "exports": {