@ancon/wildcat-utils 1.36.3 → 1.37.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.
- package/checkout/getCheckoutOrderStatusTexts.d.ts +6 -2
- package/checkout/getCheckoutPaymentErrorTranslationTexts.d.ts +69 -0
- package/checkout/getCheckoutPaymentErrorTranslationTexts.js +1 -0
- package/checkout/getCheckoutPaymentErrorTranslationTexts.mjs +365 -0
- package/checkout/index.d.ts +4 -1
- package/checkout/index.js +1 -1
- package/checkout/index.mjs +37 -27
- package/checkout/isCheckoutAlreadyPaidError.d.ts +6 -0
- package/checkout/isCheckoutAlreadyPaidError.js +1 -0
- package/checkout/isCheckoutAlreadyPaidError.mjs +21 -0
- package/checkout/isCheckoutAlreadyPaidStatus.d.ts +5 -0
- package/checkout/isCheckoutAlreadyPaidStatus.js +1 -0
- package/checkout/isCheckoutAlreadyPaidStatus.mjs +27 -0
- package/error/getErrorCode.d.ts +5 -0
- package/error/getErrorCode.js +1 -0
- package/error/getErrorCode.mjs +15 -0
- package/error/index.d.ts +3 -1
- package/error/index.js +1 -1
- package/error/index.mjs +10 -6
- package/error/isSerializedCodedError.d.ts +3 -0
- package/error/isSerializedCodedError.js +1 -0
- package/error/isSerializedCodedError.mjs +9 -0
- package/index.js +1 -1
- package/index.mjs +92 -81
- package/package.json +26 -1
|
@@ -16,10 +16,12 @@ declare type Options = {
|
|
|
16
16
|
checkoutStatus?: CheckoutStatus;
|
|
17
17
|
ticketStatus?: TicketStatus;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
/** TODO: Rename to CheckoutOrderStatusTranslation */
|
|
20
|
+
declare type Translation = {
|
|
20
21
|
title: string;
|
|
21
22
|
message?: string;
|
|
22
23
|
};
|
|
24
|
+
/** TODO: Rename to CheckoutOrderStatusTranslationKey */
|
|
23
25
|
declare enum TranslationKey {
|
|
24
26
|
YourOrderIsBeingProcessed = "yourOrderIsBeingProcessed",
|
|
25
27
|
YourOrderWasCancelled = "yourOrderWasCancelled",
|
|
@@ -55,9 +57,11 @@ declare type TranslationsWithMeta = {
|
|
|
55
57
|
};
|
|
56
58
|
}) => Translation;
|
|
57
59
|
};
|
|
58
|
-
|
|
60
|
+
/** TODO: Rename to CheckoutOrderStatusTranslatedTexts */
|
|
61
|
+
declare type TranslatedTexts = Record<Exclude<TranslationKey, keyof TranslationsWithMeta>, ({ key }: {
|
|
59
62
|
key: TranslationKey;
|
|
60
63
|
}) => Translation> & TranslationsWithMeta;
|
|
61
64
|
declare function getOrderStatusTexts(checkout: CheckoutSummary | null | undefined, options: Options, texts?: TranslatedTexts): [Translation, TranslationKey];
|
|
65
|
+
export type { Translation, TranslatedTexts };
|
|
62
66
|
export { TranslationKey };
|
|
63
67
|
export default getOrderStatusTexts;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { APIError, CheckoutAdyenPaymentResponse } from '@ancon/wildcat-types';
|
|
2
|
+
import { SerializedAPIError } from '../error';
|
|
3
|
+
declare enum CheckoutPaymentErrorTranslationKey {
|
|
4
|
+
PaymentRefusalGeneral = "paymentRefusalGeneral",
|
|
5
|
+
PaymentRefusalTransactionRefused = "paymentRefusalTransactionRefused",
|
|
6
|
+
PaymentRefusalReferral = "paymentRefusalReferral",
|
|
7
|
+
PaymentRefusalAcquirer = "paymentRefusalAcquirer",
|
|
8
|
+
PaymentRefusalBlockedCard = "paymentRefusalBlockedCard",
|
|
9
|
+
PaymentRefusalExpiredCard = "paymentRefusalExpiredCard",
|
|
10
|
+
PaymentRefusalInvalidAmount = "paymentRefusalInvalidAmount",
|
|
11
|
+
PaymentRefusalInvalidCardnumber = "paymentRefusalInvalidCardnumber",
|
|
12
|
+
PaymentRefusalIssuerUnavailable = "paymentRefusalIssuerUnavailable",
|
|
13
|
+
PaymentRefusalBankNotSupported = "paymentRefusalBankNotSupported",
|
|
14
|
+
PaymentRefusal3dsecureAuthFailed = "paymentRefusal3dsecureAuthFailed",
|
|
15
|
+
PaymentRefusalNoEnoughBalance = "paymentRefusalNoEnoughBalance",
|
|
16
|
+
PaymentRefusalFraudDetected = "paymentRefusalFraudDetected",
|
|
17
|
+
PaymentRefusalCancelled = "paymentRefusalCancelled",
|
|
18
|
+
PaymentRefusalInvalidPin = "paymentRefusalInvalidPin",
|
|
19
|
+
PaymentRefusalPinRetryExceeded = "paymentRefusalPinRetryExceeded",
|
|
20
|
+
PaymentRefusalUnableValidatePin = "paymentRefusalUnableValidatePin",
|
|
21
|
+
PaymentRefusalSubmmissionAdyen = "paymentRefusalSubmmissionAdyen",
|
|
22
|
+
PaymentRefusalCvcDeclined = "paymentRefusalCvcDeclined",
|
|
23
|
+
PaymentRefusalRestrictedCard = "paymentRefusalRestrictedCard",
|
|
24
|
+
PaymentRefusalDoNotHonor = "paymentRefusalDoNotHonor",
|
|
25
|
+
PaymentRefusalWdrwAmountExceeded = "paymentRefusalWdrwAmountExceeded",
|
|
26
|
+
PaymentRefusalWdrwCountExceeded = "paymentRefusalWdrwCountExceeded",
|
|
27
|
+
PaymentRefusalAvsDeclined = "paymentRefusalAvsDeclined",
|
|
28
|
+
PaymentRefusalCardOnlinePin = "paymentRefusalCardOnlinePin",
|
|
29
|
+
PaymentRefusalNoAcctAtchdCard = "paymentRefusalNoAcctAtchdCard",
|
|
30
|
+
PaymentRefusalMobilePin = "paymentRefusalMobilePin",
|
|
31
|
+
PaymentRefusalContactlessFallback = "paymentRefusalContactlessFallback",
|
|
32
|
+
PaymentRefusalAuthRequired = "paymentRefusalAuthRequired",
|
|
33
|
+
PaymentResultCancelled = "paymentResultCancelled",
|
|
34
|
+
PaymentResultError = "paymentResultError",
|
|
35
|
+
PaymentResultRefused = "paymentResultRefused",
|
|
36
|
+
PaymentAuthorizeDataNotValid = "paymentAuthorizeDataNotValid",
|
|
37
|
+
PaymentAuthorizeErrorUnknownReason = "paymentAuthorizeErrorUnknownReason",
|
|
38
|
+
PaymentAuthorizeCheckoutCaptured = "paymentAuthorizeCheckoutCaptured",
|
|
39
|
+
PaymentAuthorizeCheckoutAuthorized = "paymentAuthorizeCheckoutAuthorized",
|
|
40
|
+
PaymentAuthorizeCaptureFailure = "paymentAuthorizeCaptureFailure",
|
|
41
|
+
PaymentAuthorizeCancelOrRefund = "paymentAuthorizeCancelOrRefund",
|
|
42
|
+
PaymentActionErrorUnknownReason = "paymentActionErrorUnknownReason",
|
|
43
|
+
PaymentActionInvalidData = "paymentActionInvalidData",
|
|
44
|
+
PaymentActionCaptureFailure = "paymentActionCaptureFailure",
|
|
45
|
+
PaymentActionCancelOrRefund = "paymentActionCancelOrRefund",
|
|
46
|
+
PaymentPaymentAppNotFound = "paymentPaymentAppNotFound",
|
|
47
|
+
PaymentPaymentCheckoutCreated = "paymentPaymentCheckoutCreated",
|
|
48
|
+
PaymentCheckoutPaymentFailure = "paymentCheckoutPaymentFailure",
|
|
49
|
+
PaymentDetailsNotSupported = "paymentDetailsNotSupported"
|
|
50
|
+
}
|
|
51
|
+
declare type CheckoutPaymentErrorTranslation = {
|
|
52
|
+
title: string;
|
|
53
|
+
message: string;
|
|
54
|
+
};
|
|
55
|
+
declare type TranslationsWithMeta = Record<CheckoutPaymentErrorTranslationKey.PaymentRefusalReferral | CheckoutPaymentErrorTranslationKey.PaymentRefusalAcquirer | CheckoutPaymentErrorTranslationKey.PaymentRefusalSubmmissionAdyen | CheckoutPaymentErrorTranslationKey.PaymentRefusalDoNotHonor | CheckoutPaymentErrorTranslationKey.PaymentResultError | CheckoutPaymentErrorTranslationKey.PaymentAuthorizeDataNotValid | CheckoutPaymentErrorTranslationKey.PaymentAuthorizeErrorUnknownReason | CheckoutPaymentErrorTranslationKey.PaymentAuthorizeCheckoutCaptured | CheckoutPaymentErrorTranslationKey.PaymentAuthorizeCheckoutAuthorized | CheckoutPaymentErrorTranslationKey.PaymentAuthorizeCaptureFailure | CheckoutPaymentErrorTranslationKey.PaymentActionErrorUnknownReason | CheckoutPaymentErrorTranslationKey.PaymentActionInvalidData | CheckoutPaymentErrorTranslationKey.PaymentActionCaptureFailure | CheckoutPaymentErrorTranslationKey.PaymentPaymentCheckoutCreated | CheckoutPaymentErrorTranslationKey.PaymentCheckoutPaymentFailure, ({ meta, }: {
|
|
56
|
+
key: CheckoutPaymentErrorTranslationKey;
|
|
57
|
+
meta: {
|
|
58
|
+
checkoutId: string;
|
|
59
|
+
};
|
|
60
|
+
}) => CheckoutPaymentErrorTranslation>;
|
|
61
|
+
declare type CheckoutPaymentErrorTranslatedTexts = Record<Exclude<CheckoutPaymentErrorTranslationKey, keyof TranslationsWithMeta>, ({ key, }: {
|
|
62
|
+
key: CheckoutPaymentErrorTranslationKey;
|
|
63
|
+
}) => CheckoutPaymentErrorTranslation> & TranslationsWithMeta;
|
|
64
|
+
declare function getCheckoutPaymentErrorTexts(result: CheckoutAdyenPaymentResponse | SerializedAPIError | APIError,
|
|
65
|
+
/** Shown to user if obscure error, for troubleshooting help */
|
|
66
|
+
checkoutId: string, texts?: CheckoutPaymentErrorTranslatedTexts): [CheckoutPaymentErrorTranslation, CheckoutPaymentErrorTranslationKey];
|
|
67
|
+
export type { CheckoutPaymentErrorTranslation, CheckoutPaymentErrorTranslatedTexts, };
|
|
68
|
+
export { CheckoutPaymentErrorTranslationKey };
|
|
69
|
+
export default getCheckoutPaymentErrorTexts;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("@ancon/wildcat-types");require("axios");const i=require("../error/isSerializedAPIError.js");var l=(e=>(e.PaymentRefusalGeneral="paymentRefusalGeneral",e.PaymentRefusalTransactionRefused="paymentRefusalTransactionRefused",e.PaymentRefusalReferral="paymentRefusalReferral",e.PaymentRefusalAcquirer="paymentRefusalAcquirer",e.PaymentRefusalBlockedCard="paymentRefusalBlockedCard",e.PaymentRefusalExpiredCard="paymentRefusalExpiredCard",e.PaymentRefusalInvalidAmount="paymentRefusalInvalidAmount",e.PaymentRefusalInvalidCardnumber="paymentRefusalInvalidCardnumber",e.PaymentRefusalIssuerUnavailable="paymentRefusalIssuerUnavailable",e.PaymentRefusalBankNotSupported="paymentRefusalBankNotSupported",e.PaymentRefusal3dsecureAuthFailed="paymentRefusal3dsecureAuthFailed",e.PaymentRefusalNoEnoughBalance="paymentRefusalNoEnoughBalance",e.PaymentRefusalFraudDetected="paymentRefusalFraudDetected",e.PaymentRefusalCancelled="paymentRefusalCancelled",e.PaymentRefusalInvalidPin="paymentRefusalInvalidPin",e.PaymentRefusalPinRetryExceeded="paymentRefusalPinRetryExceeded",e.PaymentRefusalUnableValidatePin="paymentRefusalUnableValidatePin",e.PaymentRefusalSubmmissionAdyen="paymentRefusalSubmmissionAdyen",e.PaymentRefusalCvcDeclined="paymentRefusalCvcDeclined",e.PaymentRefusalRestrictedCard="paymentRefusalRestrictedCard",e.PaymentRefusalDoNotHonor="paymentRefusalDoNotHonor",e.PaymentRefusalWdrwAmountExceeded="paymentRefusalWdrwAmountExceeded",e.PaymentRefusalWdrwCountExceeded="paymentRefusalWdrwCountExceeded",e.PaymentRefusalAvsDeclined="paymentRefusalAvsDeclined",e.PaymentRefusalCardOnlinePin="paymentRefusalCardOnlinePin",e.PaymentRefusalNoAcctAtchdCard="paymentRefusalNoAcctAtchdCard",e.PaymentRefusalMobilePin="paymentRefusalMobilePin",e.PaymentRefusalContactlessFallback="paymentRefusalContactlessFallback",e.PaymentRefusalAuthRequired="paymentRefusalAuthRequired",e.PaymentResultCancelled="paymentResultCancelled",e.PaymentResultError="paymentResultError",e.PaymentResultRefused="paymentResultRefused",e.PaymentAuthorizeDataNotValid="paymentAuthorizeDataNotValid",e.PaymentAuthorizeErrorUnknownReason="paymentAuthorizeErrorUnknownReason",e.PaymentAuthorizeCheckoutCaptured="paymentAuthorizeCheckoutCaptured",e.PaymentAuthorizeCheckoutAuthorized="paymentAuthorizeCheckoutAuthorized",e.PaymentAuthorizeCaptureFailure="paymentAuthorizeCaptureFailure",e.PaymentAuthorizeCancelOrRefund="paymentAuthorizeCancelOrRefund",e.PaymentActionErrorUnknownReason="paymentActionErrorUnknownReason",e.PaymentActionInvalidData="paymentActionInvalidData",e.PaymentActionCaptureFailure="paymentActionCaptureFailure",e.PaymentActionCancelOrRefund="paymentActionCancelOrRefund",e.PaymentPaymentAppNotFound="paymentPaymentAppNotFound",e.PaymentPaymentCheckoutCreated="paymentPaymentCheckoutCreated",e.PaymentCheckoutPaymentFailure="paymentCheckoutPaymentFailure",e.PaymentDetailsNotSupported="paymentDetailsNotSupported",e))(l||{});const d={paymentRefusalGeneral:()=>({title:"Payment failure",message:"The transaction was refused."}),paymentRefusalTransactionRefused:()=>({title:"Payment failure",message:"The transaction was refused."}),paymentRefusalReferral:({meta:e})=>({title:"Payment failure",message:`A referral error occurred. (${e.checkoutId})`}),paymentRefusalAcquirer:({meta:e})=>({title:"Payment failure",message:`An acquirer error occurred. (${e.checkoutId})`}),paymentRefusalBlockedCard:()=>({title:"Payment failure",message:"The provided card is blocked."}),paymentRefusalExpiredCard:()=>({title:"Payment failure",message:"The provided card is expired."}),paymentRefusalInvalidAmount:()=>({title:"Payment failure",message:"An invalid payment amount was provided."}),paymentRefusalInvalidCardnumber:()=>({title:"Payment failure",message:"An invalid card number was provided."}),paymentRefusalIssuerUnavailable:()=>({title:"Payment failure",message:"Card issuer not available."}),paymentRefusalBankNotSupported:()=>({title:"Payment failure",message:"CVC declined."}),paymentRefusal3dsecureAuthFailed:()=>({title:"Payment failure",message:"3D Secure was not authenticated."}),paymentRefusalNoEnoughBalance:()=>({title:"Payment failure",message:"Not enough balance."}),paymentRefusalFraudDetected:()=>({title:"Payment failure",message:"The provided card is not allowed."}),paymentRefusalCancelled:()=>({title:"Payment cancelled",message:"The payment was cancelled."}),paymentRefusalInvalidPin:()=>({title:"Payment failure",message:"Invalid PIN."}),paymentRefusalPinRetryExceeded:()=>({title:"Payment failure",message:"PIN tries exceeded."}),paymentRefusalUnableValidatePin:()=>({title:"Payment failure",message:"PIN validation was not possible."}),paymentRefusalSubmmissionAdyen:({meta:e})=>({title:"Payment failure",message:`Submission error. (${e.checkoutId})`}),paymentRefusalCvcDeclined:()=>({title:"Payment failure",message:"CVC declined."}),paymentRefusalRestrictedCard:()=>({title:"Payment failure",message:"Restricted card."}),paymentRefusalDoNotHonor:({meta:e})=>({title:"Payment failure",message:`The transaction was refused (do not honor). (${e.checkoutId})`}),paymentRefusalWdrwAmountExceeded:()=>({title:"Payment failure",message:"Withdrawal amount exceeded."}),paymentRefusalWdrwCountExceeded:()=>({title:"Payment failure",message:"Withdrawal count exceeded."}),paymentRefusalAvsDeclined:()=>({title:"Payment failure",message:"AVS declined."}),paymentRefusalCardOnlinePin:()=>({title:"Payment failure",message:"The provided card requires online PIN."}),paymentRefusalNoAcctAtchdCard:()=>({title:"Payment failure",message:"No account attached to the provided card."}),paymentRefusalMobilePin:()=>({title:"Payment failure",message:"Mobile PIN required."}),paymentRefusalContactlessFallback:()=>({title:"Payment failure",message:"Contactless fallback."}),paymentRefusalAuthRequired:()=>({title:"Payment failure",message:"Authentication required"}),paymentResultCancelled:()=>({title:"Payment cancelled",message:"The payment was cancelled."}),paymentResultError:({meta:e})=>({title:"Payment error",message:`There was an error processing your payment. (${e.checkoutId})`}),paymentResultRefused:()=>({title:"Payment refused",message:"The payment was refused."}),paymentAuthorizeDataNotValid:({meta:e})=>({title:"Authorization failed",message:`The provided data was invalid. (${e.checkoutId})`}),paymentAuthorizeErrorUnknownReason:({meta:e})=>({title:"Authorization failed",message:`Authorization failed because of an unknown error. (${e.checkoutId})`}),paymentAuthorizeCheckoutCaptured:({meta:e})=>({title:"Authorization failed",message:`The checkout has already been captured. (${e.checkoutId})`}),paymentAuthorizeCheckoutAuthorized:({meta:e})=>({title:"Authorization failed",message:`The checkout has already been authorized. (${e.checkoutId})`}),paymentAuthorizeCaptureFailure:({meta:e})=>({title:"Authorization failed",message:`Failed to capture checkout. (${e.checkoutId})`}),paymentAuthorizeCancelOrRefund:()=>({title:"Authorization failed",message:"The checkout has already been cancelled or refunded."}),paymentActionErrorUnknownReason:({meta:e})=>({title:"Action failed",message:`The action failed because of an unknown error. (${e.checkoutId})`}),paymentActionInvalidData:({meta:e})=>({title:"Action failed",message:`The provided data was invalid. (${e.checkoutId})`}),paymentActionCaptureFailure:({meta:e})=>({title:"Action failed",message:`Failed to capture checkout. (${e.checkoutId})`}),paymentActionCancelOrRefund:()=>({title:"Action failed",message:"The checkout has already been cancelled or refunded."}),paymentPaymentAppNotFound:()=>({title:"Payment failure",message:"The chosen payment method requires an app which is not installed."}),paymentPaymentCheckoutCreated:({meta:e})=>({title:"Payment failure",message:`The checkout is created, cannot make payment, make sure the customer is connected to this checkout. (${e.checkoutId})`}),paymentCheckoutPaymentFailure:({meta:e})=>({title:"Payment failure",message:`Unfortunately an error has occurred and your payment cannot be processed. (${e.checkoutId})`}),paymentDetailsNotSupported:()=>({title:"Payment failure",message:"The payment provider is not supported by this outlet."})};function m(e){switch(e){case"0":return"paymentRefusalGeneral";case"2":case"23":return"paymentRefusalTransactionRefused";case"3":return"paymentRefusalReferral";case"4":return"paymentRefusalAcquirer";case"5":return"paymentRefusalBlockedCard";case"6":return"paymentRefusalExpiredCard";case"7":return"paymentRefusalInvalidAmount";case"8":return"paymentRefusalInvalidCardnumber";case"9":return"paymentRefusalIssuerUnavailable";case"10":return"paymentRefusalBankNotSupported";case"11":return"paymentRefusal3dsecureAuthFailed";case"12":return"paymentRefusalNoEnoughBalance";case"14":case"20":case"31":return"paymentRefusalFraudDetected";case"15":case"16":return"paymentRefusalCancelled";case"17":return"paymentRefusalInvalidPin";case"18":return"paymentRefusalPinRetryExceeded";case"19":return"paymentRefusalUnableValidatePin";case"21":return"paymentRefusalSubmmissionAdyen";case"24":return"paymentRefusalCvcDeclined";case"25":return"paymentRefusalRestrictedCard";case"27":return"paymentRefusalDoNotHonor";case"28":return"paymentRefusalWdrwAmountExceeded";case"29":return"paymentRefusalWdrwCountExceeded";case"32":return"paymentRefusalAvsDeclined";case"33":return"paymentRefusalCardOnlinePin";case"34":case"35":return"paymentRefusalNoAcctAtchdCard";case"36":return"paymentRefusalMobilePin";case"37":return"paymentRefusalContactlessFallback";case"38":return"paymentRefusalAuthRequired";default:return null}}function c(e){switch(e){case"Cancelled":return"paymentResultCancelled";case"Error":return"paymentResultError";case"Refused":return"paymentResultRefused";default:return null}}function o(e,a){if(i(e))switch(e.response.data.errorCode){case t.ErrorCode.AuthorizeDataNotValid:return["paymentAuthorizeDataNotValid",{checkoutId:a}];case t.ErrorCode.AuthorizeErrorUnknownReason:return["paymentAuthorizeErrorUnknownReason",{checkoutId:a}];case t.ErrorCode.AuthorizeCheckoutCaptured:return["paymentAuthorizeCheckoutCaptured",{checkoutId:a}];case t.ErrorCode.AuthorizeCheckoutAuthorized:return["paymentAuthorizeCheckoutAuthorized",{checkoutId:a}];case t.ErrorCode.AuthorizeCaptureFailure:return["paymentAuthorizeCaptureFailure",{checkoutId:a}];case t.ErrorCode.AuthorizeCancelOrRefund:return["paymentAuthorizeCancelOrRefund",{checkoutId:a}];case t.ErrorCode.ActionErrorUnknownReason:return["paymentActionErrorUnknownReason",{checkoutId:a}];case t.ErrorCode.ActionInvalidData:return["paymentActionInvalidData",{checkoutId:a}];case t.ErrorCode.ActionCaptureFailure:return["paymentActionCaptureFailure",{checkoutId:a}];case t.ErrorCode.ActionCancelOrRefund:return["paymentActionCancelOrRefund",{checkoutId:a}];case t.ErrorCode.AppNotFound:return["paymentPaymentAppNotFound",{checkoutId:a}];case t.ErrorCode.PaymentCheckoutCreated:return["paymentPaymentCheckoutCreated",{checkoutId:a}]}else{const u=m(e==null?void 0:e.refusalReasonCode);if(u)return[u,{checkoutId:a}];const n=c(e==null?void 0:e.resultCode);if(n)return[n,{checkoutId:a}]}return["paymentCheckoutPaymentFailure",{checkoutId:a}]}function p(e,a,u=d){const[n,r]=o(e,a),s=u[n]({key:n,meta:r});if(!s)throw new Error("Could not resolve translation in getCheckoutPaymentErrorTexts()");return[s,n]}exports.CheckoutPaymentErrorTranslationKey=l;exports.default=p;
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import { ErrorCode as t } from "@ancon/wildcat-types";
|
|
2
|
+
import "axios";
|
|
3
|
+
import i from "../error/isSerializedAPIError.mjs";
|
|
4
|
+
var r = /* @__PURE__ */ ((e) => (e.PaymentRefusalGeneral = "paymentRefusalGeneral", e.PaymentRefusalTransactionRefused = "paymentRefusalTransactionRefused", e.PaymentRefusalReferral = "paymentRefusalReferral", e.PaymentRefusalAcquirer = "paymentRefusalAcquirer", e.PaymentRefusalBlockedCard = "paymentRefusalBlockedCard", e.PaymentRefusalExpiredCard = "paymentRefusalExpiredCard", e.PaymentRefusalInvalidAmount = "paymentRefusalInvalidAmount", e.PaymentRefusalInvalidCardnumber = "paymentRefusalInvalidCardnumber", e.PaymentRefusalIssuerUnavailable = "paymentRefusalIssuerUnavailable", e.PaymentRefusalBankNotSupported = "paymentRefusalBankNotSupported", e.PaymentRefusal3dsecureAuthFailed = "paymentRefusal3dsecureAuthFailed", e.PaymentRefusalNoEnoughBalance = "paymentRefusalNoEnoughBalance", e.PaymentRefusalFraudDetected = "paymentRefusalFraudDetected", e.PaymentRefusalCancelled = "paymentRefusalCancelled", e.PaymentRefusalInvalidPin = "paymentRefusalInvalidPin", e.PaymentRefusalPinRetryExceeded = "paymentRefusalPinRetryExceeded", e.PaymentRefusalUnableValidatePin = "paymentRefusalUnableValidatePin", e.PaymentRefusalSubmmissionAdyen = "paymentRefusalSubmmissionAdyen", e.PaymentRefusalCvcDeclined = "paymentRefusalCvcDeclined", e.PaymentRefusalRestrictedCard = "paymentRefusalRestrictedCard", e.PaymentRefusalDoNotHonor = "paymentRefusalDoNotHonor", e.PaymentRefusalWdrwAmountExceeded = "paymentRefusalWdrwAmountExceeded", e.PaymentRefusalWdrwCountExceeded = "paymentRefusalWdrwCountExceeded", e.PaymentRefusalAvsDeclined = "paymentRefusalAvsDeclined", e.PaymentRefusalCardOnlinePin = "paymentRefusalCardOnlinePin", e.PaymentRefusalNoAcctAtchdCard = "paymentRefusalNoAcctAtchdCard", e.PaymentRefusalMobilePin = "paymentRefusalMobilePin", e.PaymentRefusalContactlessFallback = "paymentRefusalContactlessFallback", e.PaymentRefusalAuthRequired = "paymentRefusalAuthRequired", e.PaymentResultCancelled = "paymentResultCancelled", e.PaymentResultError = "paymentResultError", e.PaymentResultRefused = "paymentResultRefused", e.PaymentAuthorizeDataNotValid = "paymentAuthorizeDataNotValid", e.PaymentAuthorizeErrorUnknownReason = "paymentAuthorizeErrorUnknownReason", e.PaymentAuthorizeCheckoutCaptured = "paymentAuthorizeCheckoutCaptured", e.PaymentAuthorizeCheckoutAuthorized = "paymentAuthorizeCheckoutAuthorized", e.PaymentAuthorizeCaptureFailure = "paymentAuthorizeCaptureFailure", e.PaymentAuthorizeCancelOrRefund = "paymentAuthorizeCancelOrRefund", e.PaymentActionErrorUnknownReason = "paymentActionErrorUnknownReason", e.PaymentActionInvalidData = "paymentActionInvalidData", e.PaymentActionCaptureFailure = "paymentActionCaptureFailure", e.PaymentActionCancelOrRefund = "paymentActionCancelOrRefund", e.PaymentPaymentAppNotFound = "paymentPaymentAppNotFound", e.PaymentPaymentCheckoutCreated = "paymentPaymentCheckoutCreated", e.PaymentCheckoutPaymentFailure = "paymentCheckoutPaymentFailure", e.PaymentDetailsNotSupported = "paymentDetailsNotSupported", e))(r || {});
|
|
5
|
+
const d = {
|
|
6
|
+
paymentRefusalGeneral: () => ({
|
|
7
|
+
title: "Payment failure",
|
|
8
|
+
message: "The transaction was refused."
|
|
9
|
+
}),
|
|
10
|
+
paymentRefusalTransactionRefused: () => ({
|
|
11
|
+
title: "Payment failure",
|
|
12
|
+
message: "The transaction was refused."
|
|
13
|
+
}),
|
|
14
|
+
paymentRefusalReferral: ({ meta: e }) => ({
|
|
15
|
+
title: "Payment failure",
|
|
16
|
+
message: `A referral error occurred. (${e.checkoutId})`
|
|
17
|
+
}),
|
|
18
|
+
paymentRefusalAcquirer: ({ meta: e }) => ({
|
|
19
|
+
title: "Payment failure",
|
|
20
|
+
message: `An acquirer error occurred. (${e.checkoutId})`
|
|
21
|
+
}),
|
|
22
|
+
paymentRefusalBlockedCard: () => ({
|
|
23
|
+
title: "Payment failure",
|
|
24
|
+
message: "The provided card is blocked."
|
|
25
|
+
}),
|
|
26
|
+
paymentRefusalExpiredCard: () => ({
|
|
27
|
+
title: "Payment failure",
|
|
28
|
+
message: "The provided card is expired."
|
|
29
|
+
}),
|
|
30
|
+
paymentRefusalInvalidAmount: () => ({
|
|
31
|
+
title: "Payment failure",
|
|
32
|
+
message: "An invalid payment amount was provided."
|
|
33
|
+
}),
|
|
34
|
+
paymentRefusalInvalidCardnumber: () => ({
|
|
35
|
+
title: "Payment failure",
|
|
36
|
+
message: "An invalid card number was provided."
|
|
37
|
+
}),
|
|
38
|
+
paymentRefusalIssuerUnavailable: () => ({
|
|
39
|
+
title: "Payment failure",
|
|
40
|
+
message: "Card issuer not available."
|
|
41
|
+
}),
|
|
42
|
+
paymentRefusalBankNotSupported: () => ({
|
|
43
|
+
title: "Payment failure",
|
|
44
|
+
message: "CVC declined."
|
|
45
|
+
}),
|
|
46
|
+
paymentRefusal3dsecureAuthFailed: () => ({
|
|
47
|
+
title: "Payment failure",
|
|
48
|
+
message: "3D Secure was not authenticated."
|
|
49
|
+
}),
|
|
50
|
+
paymentRefusalNoEnoughBalance: () => ({
|
|
51
|
+
title: "Payment failure",
|
|
52
|
+
message: "Not enough balance."
|
|
53
|
+
}),
|
|
54
|
+
paymentRefusalFraudDetected: () => ({
|
|
55
|
+
title: "Payment failure",
|
|
56
|
+
message: "The provided card is not allowed."
|
|
57
|
+
}),
|
|
58
|
+
paymentRefusalCancelled: () => ({
|
|
59
|
+
title: "Payment cancelled",
|
|
60
|
+
message: "The payment was cancelled."
|
|
61
|
+
}),
|
|
62
|
+
paymentRefusalInvalidPin: () => ({
|
|
63
|
+
title: "Payment failure",
|
|
64
|
+
message: "Invalid PIN."
|
|
65
|
+
}),
|
|
66
|
+
paymentRefusalPinRetryExceeded: () => ({
|
|
67
|
+
title: "Payment failure",
|
|
68
|
+
message: "PIN tries exceeded."
|
|
69
|
+
}),
|
|
70
|
+
paymentRefusalUnableValidatePin: () => ({
|
|
71
|
+
title: "Payment failure",
|
|
72
|
+
message: "PIN validation was not possible."
|
|
73
|
+
}),
|
|
74
|
+
paymentRefusalSubmmissionAdyen: ({ meta: e }) => ({
|
|
75
|
+
title: "Payment failure",
|
|
76
|
+
message: `Submission error. (${e.checkoutId})`
|
|
77
|
+
}),
|
|
78
|
+
paymentRefusalCvcDeclined: () => ({
|
|
79
|
+
title: "Payment failure",
|
|
80
|
+
message: "CVC declined."
|
|
81
|
+
}),
|
|
82
|
+
paymentRefusalRestrictedCard: () => ({
|
|
83
|
+
title: "Payment failure",
|
|
84
|
+
message: "Restricted card."
|
|
85
|
+
}),
|
|
86
|
+
paymentRefusalDoNotHonor: ({ meta: e }) => ({
|
|
87
|
+
title: "Payment failure",
|
|
88
|
+
message: `The transaction was refused (do not honor). (${e.checkoutId})`
|
|
89
|
+
}),
|
|
90
|
+
paymentRefusalWdrwAmountExceeded: () => ({
|
|
91
|
+
title: "Payment failure",
|
|
92
|
+
message: "Withdrawal amount exceeded."
|
|
93
|
+
}),
|
|
94
|
+
paymentRefusalWdrwCountExceeded: () => ({
|
|
95
|
+
title: "Payment failure",
|
|
96
|
+
message: "Withdrawal count exceeded."
|
|
97
|
+
}),
|
|
98
|
+
paymentRefusalAvsDeclined: () => ({
|
|
99
|
+
title: "Payment failure",
|
|
100
|
+
message: "AVS declined."
|
|
101
|
+
}),
|
|
102
|
+
paymentRefusalCardOnlinePin: () => ({
|
|
103
|
+
title: "Payment failure",
|
|
104
|
+
message: "The provided card requires online PIN."
|
|
105
|
+
}),
|
|
106
|
+
paymentRefusalNoAcctAtchdCard: () => ({
|
|
107
|
+
title: "Payment failure",
|
|
108
|
+
message: "No account attached to the provided card."
|
|
109
|
+
}),
|
|
110
|
+
paymentRefusalMobilePin: () => ({
|
|
111
|
+
title: "Payment failure",
|
|
112
|
+
message: "Mobile PIN required."
|
|
113
|
+
}),
|
|
114
|
+
paymentRefusalContactlessFallback: () => ({
|
|
115
|
+
title: "Payment failure",
|
|
116
|
+
message: "Contactless fallback."
|
|
117
|
+
}),
|
|
118
|
+
paymentRefusalAuthRequired: () => ({
|
|
119
|
+
title: "Payment failure",
|
|
120
|
+
message: "Authentication required"
|
|
121
|
+
}),
|
|
122
|
+
paymentResultCancelled: () => ({
|
|
123
|
+
title: "Payment cancelled",
|
|
124
|
+
message: "The payment was cancelled."
|
|
125
|
+
}),
|
|
126
|
+
paymentResultError: ({ meta: e }) => ({
|
|
127
|
+
title: "Payment error",
|
|
128
|
+
message: `There was an error processing your payment. (${e.checkoutId})`
|
|
129
|
+
}),
|
|
130
|
+
paymentResultRefused: () => ({
|
|
131
|
+
title: "Payment refused",
|
|
132
|
+
message: "The payment was refused."
|
|
133
|
+
}),
|
|
134
|
+
paymentAuthorizeDataNotValid: ({ meta: e }) => ({
|
|
135
|
+
title: "Authorization failed",
|
|
136
|
+
message: `The provided data was invalid. (${e.checkoutId})`
|
|
137
|
+
}),
|
|
138
|
+
paymentAuthorizeErrorUnknownReason: ({ meta: e }) => ({
|
|
139
|
+
title: "Authorization failed",
|
|
140
|
+
message: `Authorization failed because of an unknown error. (${e.checkoutId})`
|
|
141
|
+
}),
|
|
142
|
+
paymentAuthorizeCheckoutCaptured: ({ meta: e }) => ({
|
|
143
|
+
title: "Authorization failed",
|
|
144
|
+
message: `The checkout has already been captured. (${e.checkoutId})`
|
|
145
|
+
}),
|
|
146
|
+
paymentAuthorizeCheckoutAuthorized: ({ meta: e }) => ({
|
|
147
|
+
title: "Authorization failed",
|
|
148
|
+
message: `The checkout has already been authorized. (${e.checkoutId})`
|
|
149
|
+
}),
|
|
150
|
+
paymentAuthorizeCaptureFailure: ({ meta: e }) => ({
|
|
151
|
+
title: "Authorization failed",
|
|
152
|
+
message: `Failed to capture checkout. (${e.checkoutId})`
|
|
153
|
+
}),
|
|
154
|
+
paymentAuthorizeCancelOrRefund: () => ({
|
|
155
|
+
title: "Authorization failed",
|
|
156
|
+
message: "The checkout has already been cancelled or refunded."
|
|
157
|
+
}),
|
|
158
|
+
paymentActionErrorUnknownReason: ({ meta: e }) => ({
|
|
159
|
+
title: "Action failed",
|
|
160
|
+
message: `The action failed because of an unknown error. (${e.checkoutId})`
|
|
161
|
+
}),
|
|
162
|
+
paymentActionInvalidData: ({ meta: e }) => ({
|
|
163
|
+
title: "Action failed",
|
|
164
|
+
message: `The provided data was invalid. (${e.checkoutId})`
|
|
165
|
+
}),
|
|
166
|
+
paymentActionCaptureFailure: ({ meta: e }) => ({
|
|
167
|
+
title: "Action failed",
|
|
168
|
+
message: `Failed to capture checkout. (${e.checkoutId})`
|
|
169
|
+
}),
|
|
170
|
+
paymentActionCancelOrRefund: () => ({
|
|
171
|
+
title: "Action failed",
|
|
172
|
+
message: "The checkout has already been cancelled or refunded."
|
|
173
|
+
}),
|
|
174
|
+
paymentPaymentAppNotFound: () => ({
|
|
175
|
+
title: "Payment failure",
|
|
176
|
+
message: "The chosen payment method requires an app which is not installed."
|
|
177
|
+
}),
|
|
178
|
+
paymentPaymentCheckoutCreated: ({ meta: e }) => ({
|
|
179
|
+
title: "Payment failure",
|
|
180
|
+
message: `The checkout is created, cannot make payment, make sure the customer is connected to this checkout. (${e.checkoutId})`
|
|
181
|
+
}),
|
|
182
|
+
paymentCheckoutPaymentFailure: ({ meta: e }) => ({
|
|
183
|
+
title: "Payment failure",
|
|
184
|
+
message: `Unfortunately an error has occurred and your payment cannot be processed. (${e.checkoutId})`
|
|
185
|
+
}),
|
|
186
|
+
paymentDetailsNotSupported: () => ({
|
|
187
|
+
title: "Payment failure",
|
|
188
|
+
message: "The payment provider is not supported by this outlet."
|
|
189
|
+
})
|
|
190
|
+
};
|
|
191
|
+
function m(e) {
|
|
192
|
+
switch (e) {
|
|
193
|
+
case "0":
|
|
194
|
+
return "paymentRefusalGeneral";
|
|
195
|
+
case "2":
|
|
196
|
+
case "23":
|
|
197
|
+
return "paymentRefusalTransactionRefused";
|
|
198
|
+
case "3":
|
|
199
|
+
return "paymentRefusalReferral";
|
|
200
|
+
case "4":
|
|
201
|
+
return "paymentRefusalAcquirer";
|
|
202
|
+
case "5":
|
|
203
|
+
return "paymentRefusalBlockedCard";
|
|
204
|
+
case "6":
|
|
205
|
+
return "paymentRefusalExpiredCard";
|
|
206
|
+
case "7":
|
|
207
|
+
return "paymentRefusalInvalidAmount";
|
|
208
|
+
case "8":
|
|
209
|
+
return "paymentRefusalInvalidCardnumber";
|
|
210
|
+
case "9":
|
|
211
|
+
return "paymentRefusalIssuerUnavailable";
|
|
212
|
+
case "10":
|
|
213
|
+
return "paymentRefusalBankNotSupported";
|
|
214
|
+
case "11":
|
|
215
|
+
return "paymentRefusal3dsecureAuthFailed";
|
|
216
|
+
case "12":
|
|
217
|
+
return "paymentRefusalNoEnoughBalance";
|
|
218
|
+
case "14":
|
|
219
|
+
case "20":
|
|
220
|
+
case "31":
|
|
221
|
+
return "paymentRefusalFraudDetected";
|
|
222
|
+
case "15":
|
|
223
|
+
case "16":
|
|
224
|
+
return "paymentRefusalCancelled";
|
|
225
|
+
case "17":
|
|
226
|
+
return "paymentRefusalInvalidPin";
|
|
227
|
+
case "18":
|
|
228
|
+
return "paymentRefusalPinRetryExceeded";
|
|
229
|
+
case "19":
|
|
230
|
+
return "paymentRefusalUnableValidatePin";
|
|
231
|
+
case "21":
|
|
232
|
+
return "paymentRefusalSubmmissionAdyen";
|
|
233
|
+
case "24":
|
|
234
|
+
return "paymentRefusalCvcDeclined";
|
|
235
|
+
case "25":
|
|
236
|
+
return "paymentRefusalRestrictedCard";
|
|
237
|
+
case "27":
|
|
238
|
+
return "paymentRefusalDoNotHonor";
|
|
239
|
+
case "28":
|
|
240
|
+
return "paymentRefusalWdrwAmountExceeded";
|
|
241
|
+
case "29":
|
|
242
|
+
return "paymentRefusalWdrwCountExceeded";
|
|
243
|
+
case "32":
|
|
244
|
+
return "paymentRefusalAvsDeclined";
|
|
245
|
+
case "33":
|
|
246
|
+
return "paymentRefusalCardOnlinePin";
|
|
247
|
+
case "34":
|
|
248
|
+
case "35":
|
|
249
|
+
return "paymentRefusalNoAcctAtchdCard";
|
|
250
|
+
case "36":
|
|
251
|
+
return "paymentRefusalMobilePin";
|
|
252
|
+
case "37":
|
|
253
|
+
return "paymentRefusalContactlessFallback";
|
|
254
|
+
case "38":
|
|
255
|
+
return "paymentRefusalAuthRequired";
|
|
256
|
+
default:
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
function c(e) {
|
|
261
|
+
switch (e) {
|
|
262
|
+
case "Cancelled":
|
|
263
|
+
return "paymentResultCancelled";
|
|
264
|
+
case "Error":
|
|
265
|
+
return "paymentResultError";
|
|
266
|
+
case "Refused":
|
|
267
|
+
return "paymentResultRefused";
|
|
268
|
+
default:
|
|
269
|
+
return null;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
function p(e, a) {
|
|
273
|
+
if (i(e))
|
|
274
|
+
switch (e.response.data.errorCode) {
|
|
275
|
+
case t.AuthorizeDataNotValid:
|
|
276
|
+
return [
|
|
277
|
+
"paymentAuthorizeDataNotValid",
|
|
278
|
+
{ checkoutId: a }
|
|
279
|
+
];
|
|
280
|
+
case t.AuthorizeErrorUnknownReason:
|
|
281
|
+
return [
|
|
282
|
+
"paymentAuthorizeErrorUnknownReason",
|
|
283
|
+
{ checkoutId: a }
|
|
284
|
+
];
|
|
285
|
+
case t.AuthorizeCheckoutCaptured:
|
|
286
|
+
return [
|
|
287
|
+
"paymentAuthorizeCheckoutCaptured",
|
|
288
|
+
{ checkoutId: a }
|
|
289
|
+
];
|
|
290
|
+
case t.AuthorizeCheckoutAuthorized:
|
|
291
|
+
return [
|
|
292
|
+
"paymentAuthorizeCheckoutAuthorized",
|
|
293
|
+
{ checkoutId: a }
|
|
294
|
+
];
|
|
295
|
+
case t.AuthorizeCaptureFailure:
|
|
296
|
+
return [
|
|
297
|
+
"paymentAuthorizeCaptureFailure",
|
|
298
|
+
{ checkoutId: a }
|
|
299
|
+
];
|
|
300
|
+
case t.AuthorizeCancelOrRefund:
|
|
301
|
+
return [
|
|
302
|
+
"paymentAuthorizeCancelOrRefund",
|
|
303
|
+
{ checkoutId: a }
|
|
304
|
+
];
|
|
305
|
+
case t.ActionErrorUnknownReason:
|
|
306
|
+
return [
|
|
307
|
+
"paymentActionErrorUnknownReason",
|
|
308
|
+
{ checkoutId: a }
|
|
309
|
+
];
|
|
310
|
+
case t.ActionInvalidData:
|
|
311
|
+
return [
|
|
312
|
+
"paymentActionInvalidData",
|
|
313
|
+
{ checkoutId: a }
|
|
314
|
+
];
|
|
315
|
+
case t.ActionCaptureFailure:
|
|
316
|
+
return [
|
|
317
|
+
"paymentActionCaptureFailure",
|
|
318
|
+
{ checkoutId: a }
|
|
319
|
+
];
|
|
320
|
+
case t.ActionCancelOrRefund:
|
|
321
|
+
return [
|
|
322
|
+
"paymentActionCancelOrRefund",
|
|
323
|
+
{ checkoutId: a }
|
|
324
|
+
];
|
|
325
|
+
case t.AppNotFound:
|
|
326
|
+
return [
|
|
327
|
+
"paymentPaymentAppNotFound",
|
|
328
|
+
{ checkoutId: a }
|
|
329
|
+
];
|
|
330
|
+
case t.PaymentCheckoutCreated:
|
|
331
|
+
return [
|
|
332
|
+
"paymentPaymentCheckoutCreated",
|
|
333
|
+
{ checkoutId: a }
|
|
334
|
+
];
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
const u = m(
|
|
338
|
+
// refusalReasonCode is not available for all payment methods
|
|
339
|
+
e == null ? void 0 : e.refusalReasonCode
|
|
340
|
+
);
|
|
341
|
+
if (u)
|
|
342
|
+
return [u, { checkoutId: a }];
|
|
343
|
+
const n = c(
|
|
344
|
+
e == null ? void 0 : e.resultCode
|
|
345
|
+
);
|
|
346
|
+
if (n)
|
|
347
|
+
return [n, { checkoutId: a }];
|
|
348
|
+
}
|
|
349
|
+
return [
|
|
350
|
+
"paymentCheckoutPaymentFailure",
|
|
351
|
+
{ checkoutId: a }
|
|
352
|
+
];
|
|
353
|
+
}
|
|
354
|
+
function y(e, a, u = d) {
|
|
355
|
+
const [n, l] = p(e, a), s = u[n]({ key: n, meta: l });
|
|
356
|
+
if (!s)
|
|
357
|
+
throw new Error(
|
|
358
|
+
"Could not resolve translation in getCheckoutPaymentErrorTexts()"
|
|
359
|
+
);
|
|
360
|
+
return [s, n];
|
|
361
|
+
}
|
|
362
|
+
export {
|
|
363
|
+
r as CheckoutPaymentErrorTranslationKey,
|
|
364
|
+
y as default
|
|
365
|
+
};
|
package/checkout/index.d.ts
CHANGED
|
@@ -12,4 +12,7 @@ import getWalletMetaFromCheckout from './getWalletMetaFromCheckout';
|
|
|
12
12
|
import isPreOrderServiceTime from './isPreOrderServiceTime';
|
|
13
13
|
import isPreOrderCheckout from './isPreOrderCheckout';
|
|
14
14
|
import isUpdatingCheckoutAllowed from './isUpdatingCheckoutAllowed';
|
|
15
|
-
|
|
15
|
+
import isCheckoutAlreadyPaidError from './isCheckoutAlreadyPaidError';
|
|
16
|
+
import isCheckoutAlreadyPaidStatus from './isCheckoutAlreadyPaidStatus';
|
|
17
|
+
import getCheckoutPaymentErrorTranslationTexts, { CheckoutPaymentErrorTranslationKey } from './getCheckoutPaymentErrorTranslationTexts';
|
|
18
|
+
export { TranslationKey, getCheckoutGroupedModifications, getCheckoutProductName, getCheckoutOrderStatusTexts, getCheckoutItemsMappedByTicketItemStatus, isCheckoutOrderSummary, buildCheckoutRequestItem, getCheckoutGrandTotalAmount, getCheckoutRequestItemFromCheckoutItem, isCheckoutItemsAreEqual, checkoutHasWallet, getWalletMetaFromCheckout, isPreOrderCheckout, isPreOrderServiceTime, isUpdatingCheckoutAllowed, isCheckoutAlreadyPaidError, isCheckoutAlreadyPaidStatus, CheckoutPaymentErrorTranslationKey, getCheckoutPaymentErrorTranslationTexts, };
|
package/checkout/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./getCheckoutItemModifications.js"),u=require("./getCheckoutProductName.js"),e=require("./getCheckoutOrderStatusTexts.js"),o=require("./getCheckoutItemsMappedByTicketItemStatus.js"),c=require("./isCheckoutOrderSummary.js"),i=require("./buildCheckoutRequestItem.js"),s=require("./getCheckoutGrandTotalAmount.js"),a=require("./getCheckoutRequestItemFromCheckoutItem.js"),k=require("./isCheckoutItemsAreEqual.js"),h=require("./checkoutHasWallet.js"),n=require("./getWalletMetaFromCheckout.js"),d=require("./isPreOrderServiceTime.js"),C=require("./isPreOrderCheckout.js"),l=require("./isUpdatingCheckoutAllowed.js"),m=require("./isCheckoutAlreadyPaidError.js"),q=require("./isCheckoutAlreadyPaidStatus.js"),t=require("./getCheckoutPaymentErrorTranslationTexts.js");require("@ancon/wildcat-types");require("../currency/getFormattedCurrency.js");require("../currency/getFormattedCurrencyPostfix.js");require("../_baseIsEqual-a66350f1.js");require("../isObjectLike-0cc89d64.js");require("axios");require("../error/isAPIError.js");require("../error/isSerializedAPIError.js");exports.getCheckoutGroupedModifications=r;exports.getCheckoutProductName=u;exports.TranslationKey=e.TranslationKey;exports.getCheckoutOrderStatusTexts=e.default;exports.getCheckoutItemsMappedByTicketItemStatus=o;exports.isCheckoutOrderSummary=c;exports.buildCheckoutRequestItem=i;exports.getCheckoutGrandTotalAmount=s;exports.getCheckoutRequestItemFromCheckoutItem=a;exports.isCheckoutItemsAreEqual=k;exports.checkoutHasWallet=h;exports.getWalletMetaFromCheckout=n;exports.isPreOrderServiceTime=d;exports.isPreOrderCheckout=C;exports.isUpdatingCheckoutAllowed=l;exports.isCheckoutAlreadyPaidError=m;exports.isCheckoutAlreadyPaidStatus=q;exports.CheckoutPaymentErrorTranslationKey=t.CheckoutPaymentErrorTranslationKey;exports.getCheckoutPaymentErrorTranslationTexts=t.default;
|
package/checkout/index.mjs
CHANGED
|
@@ -1,36 +1,46 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
3
|
-
import { TranslationKey as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
1
|
+
import { default as l } from "./getCheckoutItemModifications.mjs";
|
|
2
|
+
import { default as i } from "./getCheckoutProductName.mjs";
|
|
3
|
+
import { TranslationKey as k, default as x } from "./getCheckoutOrderStatusTexts.mjs";
|
|
4
|
+
import { default as C } from "./getCheckoutItemsMappedByTicketItemStatus.mjs";
|
|
5
|
+
import { default as g } from "./isCheckoutOrderSummary.mjs";
|
|
6
|
+
import { default as T } from "./buildCheckoutRequestItem.mjs";
|
|
7
7
|
import { default as I } from "./getCheckoutGrandTotalAmount.mjs";
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
8
|
+
import { default as S } from "./getCheckoutRequestItemFromCheckoutItem.mjs";
|
|
9
|
+
import { default as O } from "./isCheckoutItemsAreEqual.mjs";
|
|
10
|
+
import { default as M } from "./checkoutHasWallet.mjs";
|
|
11
|
+
import { default as G } from "./getWalletMetaFromCheckout.mjs";
|
|
12
|
+
import { default as R } from "./isPreOrderServiceTime.mjs";
|
|
13
|
+
import { default as b } from "./isPreOrderCheckout.mjs";
|
|
14
|
+
import { default as w } from "./isUpdatingCheckoutAllowed.mjs";
|
|
15
|
+
import { default as H } from "./isCheckoutAlreadyPaidError.mjs";
|
|
16
|
+
import { default as U } from "./isCheckoutAlreadyPaidStatus.mjs";
|
|
17
|
+
import { CheckoutPaymentErrorTranslationKey as z, default as D } from "./getCheckoutPaymentErrorTranslationTexts.mjs";
|
|
15
18
|
import "@ancon/wildcat-types";
|
|
16
19
|
import "../currency/getFormattedCurrency.mjs";
|
|
17
20
|
import "../currency/getFormattedCurrencyPostfix.mjs";
|
|
18
21
|
import "../_baseIsEqual-f66441d7.mjs";
|
|
19
22
|
import "../isObjectLike-7895e9dd.mjs";
|
|
23
|
+
import "axios";
|
|
24
|
+
import "../error/isAPIError.mjs";
|
|
25
|
+
import "../error/isSerializedAPIError.mjs";
|
|
20
26
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
z as CheckoutPaymentErrorTranslationKey,
|
|
28
|
+
k as TranslationKey,
|
|
29
|
+
T as buildCheckoutRequestItem,
|
|
30
|
+
M as checkoutHasWallet,
|
|
24
31
|
I as getCheckoutGrandTotalAmount,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
l as getCheckoutGroupedModifications,
|
|
33
|
+
C as getCheckoutItemsMappedByTicketItemStatus,
|
|
34
|
+
x as getCheckoutOrderStatusTexts,
|
|
35
|
+
D as getCheckoutPaymentErrorTranslationTexts,
|
|
36
|
+
i as getCheckoutProductName,
|
|
37
|
+
S as getCheckoutRequestItemFromCheckoutItem,
|
|
38
|
+
G as getWalletMetaFromCheckout,
|
|
39
|
+
H as isCheckoutAlreadyPaidError,
|
|
40
|
+
U as isCheckoutAlreadyPaidStatus,
|
|
41
|
+
O as isCheckoutItemsAreEqual,
|
|
42
|
+
g as isCheckoutOrderSummary,
|
|
43
|
+
b as isPreOrderCheckout,
|
|
44
|
+
R as isPreOrderServiceTime,
|
|
45
|
+
w as isUpdatingCheckoutAllowed
|
|
36
46
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { APIError } from '@ancon/wildcat-types';
|
|
2
|
+
import { SerializedAPIError } from '../error';
|
|
3
|
+
declare function isCheckoutAlreadyPaidError(error: APIError): boolean;
|
|
4
|
+
declare function isCheckoutAlreadyPaidError(error: SerializedAPIError): boolean;
|
|
5
|
+
declare function isCheckoutAlreadyPaidError(error: unknown): boolean;
|
|
6
|
+
export default isCheckoutAlreadyPaidError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("@ancon/wildcat-types");require("axios");const s=require("../error/isAPIError.js"),u=require("../error/isSerializedAPIError.js");function i(e){var t,o;if(!u(e)&&!s(e))return!1;switch((o=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:o.errorCode){case r.ErrorCode.AuthorizeCheckoutAuthorized:case r.ErrorCode.AuthorizeCheckoutCaptured:case r.ErrorCode.PaymentCheckoutAlreadyInProgress:case r.ErrorCode.PaymentActionPaymentNotFound:return!0;default:return!1}}module.exports=i;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ErrorCode as t } from "@ancon/wildcat-types";
|
|
2
|
+
import "axios";
|
|
3
|
+
import a from "../error/isAPIError.mjs";
|
|
4
|
+
import i from "../error/isSerializedAPIError.mjs";
|
|
5
|
+
function c(e) {
|
|
6
|
+
var o, r;
|
|
7
|
+
if (!i(e) && !a(e))
|
|
8
|
+
return !1;
|
|
9
|
+
switch ((r = (o = e == null ? void 0 : e.response) == null ? void 0 : o.data) == null ? void 0 : r.errorCode) {
|
|
10
|
+
case t.AuthorizeCheckoutAuthorized:
|
|
11
|
+
case t.AuthorizeCheckoutCaptured:
|
|
12
|
+
case t.PaymentCheckoutAlreadyInProgress:
|
|
13
|
+
case t.PaymentActionPaymentNotFound:
|
|
14
|
+
return !0;
|
|
15
|
+
default:
|
|
16
|
+
return !1;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
c as default
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("@ancon/wildcat-types");function s(e){throw new Error(`Unhandled checkout status: ${e}`)}function a(e){switch(e==null?void 0:e.status){case t.CheckoutStatus.Error:case t.CheckoutStatus.Canceled:return!0;case t.CheckoutStatus.Created:case t.CheckoutStatus.Ready:case t.CheckoutStatus.Processing:return!1;case t.CheckoutStatus.Authorized:case t.CheckoutStatus.Captured:case t.CheckoutStatus.InProgress:case t.CheckoutStatus.Done:case t.CheckoutStatus.Received:case t.CheckoutStatus.ReadyToCollect:return!0;default:return s(e==null?void 0:e.status)}}module.exports=a;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CheckoutStatus as e } from "@ancon/wildcat-types";
|
|
2
|
+
function s(a) {
|
|
3
|
+
throw new Error(`Unhandled checkout status: ${a}`);
|
|
4
|
+
}
|
|
5
|
+
function t(a) {
|
|
6
|
+
switch (a == null ? void 0 : a.status) {
|
|
7
|
+
case e.Error:
|
|
8
|
+
case e.Canceled:
|
|
9
|
+
return !0;
|
|
10
|
+
case e.Created:
|
|
11
|
+
case e.Ready:
|
|
12
|
+
case e.Processing:
|
|
13
|
+
return !1;
|
|
14
|
+
case e.Authorized:
|
|
15
|
+
case e.Captured:
|
|
16
|
+
case e.InProgress:
|
|
17
|
+
case e.Done:
|
|
18
|
+
case e.Received:
|
|
19
|
+
case e.ReadyToCollect:
|
|
20
|
+
return !0;
|
|
21
|
+
default:
|
|
22
|
+
return s(a == null ? void 0 : a.status);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
t as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { APIError, ErrorCode } from '@ancon/wildcat-types';
|
|
2
|
+
import { SerializedAPIError, SerializedCodedError } from './types';
|
|
3
|
+
import { CodedError } from './createCodedError';
|
|
4
|
+
declare function getErrorCode(error: SerializedAPIError | APIError | SerializedCodedError | CodedError): ErrorCode;
|
|
5
|
+
export default getErrorCode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./isSerializedAPIError.js"),o=require("./isCodedError.js"),i=require("./isSerializedCodedError.js");require("axios");require("@ancon/wildcat-types");function t(r){if(e(r)||e(r))return r.response.data.errorCode;if(o(r)||i(r))return r.code;throw new Error("Could not resolve error code")}module.exports=t;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import o from "./isSerializedAPIError.mjs";
|
|
2
|
+
import e from "./isCodedError.mjs";
|
|
3
|
+
import i from "./isSerializedCodedError.mjs";
|
|
4
|
+
import "axios";
|
|
5
|
+
import "@ancon/wildcat-types";
|
|
6
|
+
function p(r) {
|
|
7
|
+
if (o(r) || o(r))
|
|
8
|
+
return r.response.data.errorCode;
|
|
9
|
+
if (e(r) || i(r))
|
|
10
|
+
return r.code;
|
|
11
|
+
throw new Error("Could not resolve error code");
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
p as default
|
|
15
|
+
};
|
package/error/index.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ import isLockedError from './isLockedError';
|
|
|
5
5
|
import isNotFoundError from './isNotFoundError';
|
|
6
6
|
import isAPIError from './isAPIError';
|
|
7
7
|
import isSerializedAPIError from './isSerializedAPIError';
|
|
8
|
+
import isSerializedCodedError from './isSerializedCodedError';
|
|
8
9
|
import serializeError from './serializeError';
|
|
10
|
+
import getErrorCode from './getErrorCode';
|
|
9
11
|
import { SerializedAPIError, SerializedAxiosError, SerializedCodedError, SerializedGenericError } from './types';
|
|
10
12
|
export type { CodedError, SerializedAPIError, SerializedAxiosError, SerializedCodedError, SerializedGenericError, };
|
|
11
|
-
export { createCodedError, isCodedError, isNetworkError, isLockedError, isNotFoundError, serializeError, isAPIError, isSerializedAPIError, };
|
|
13
|
+
export { createCodedError, isCodedError, isNetworkError, isLockedError, isNotFoundError, serializeError, isAPIError, isSerializedAPIError, isSerializedCodedError, getErrorCode, };
|
package/error/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./createCodedError.js"),e=require("./isCodedError.js"),o=require("./isNetworkError.js"),i=require("./isLockedError.js"),s=require("./isNotFoundError.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./createCodedError.js"),e=require("./isCodedError.js"),o=require("./isNetworkError.js"),i=require("./isLockedError.js"),s=require("./isNotFoundError.js"),d=require("./isAPIError.js"),t=require("./isSerializedAPIError.js"),E=require("./isSerializedCodedError.js"),u=require("./serializeError.js"),c=require("./getErrorCode.js");require("axios");require("@ancon/wildcat-types");exports.createCodedError=r;exports.isCodedError=e;exports.isNetworkError=o;exports.isLockedError=i;exports.isNotFoundError=s;exports.isAPIError=d;exports.isSerializedAPIError=t;exports.isSerializedCodedError=E;exports.serializeError=u;exports.getErrorCode=c;
|
package/error/index.mjs
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { default as a } from "./createCodedError.mjs";
|
|
2
|
-
import { default as
|
|
2
|
+
import { default as f } from "./isCodedError.mjs";
|
|
3
3
|
import { default as i } from "./isNetworkError.mjs";
|
|
4
4
|
import { default as m } from "./isLockedError.mjs";
|
|
5
5
|
import { default as u } from "./isNotFoundError.mjs";
|
|
6
6
|
import { default as E } from "./isAPIError.mjs";
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
7
|
+
import { default as z } from "./isSerializedAPIError.mjs";
|
|
8
|
+
import { default as k } from "./isSerializedCodedError.mjs";
|
|
9
|
+
import { default as I } from "./serializeError.mjs";
|
|
10
|
+
import { default as P } from "./getErrorCode.mjs";
|
|
9
11
|
import "axios";
|
|
10
12
|
import "@ancon/wildcat-types";
|
|
11
13
|
export {
|
|
12
14
|
a as createCodedError,
|
|
15
|
+
P as getErrorCode,
|
|
13
16
|
E as isAPIError,
|
|
14
|
-
|
|
17
|
+
f as isCodedError,
|
|
15
18
|
m as isLockedError,
|
|
16
19
|
i as isNetworkError,
|
|
17
20
|
u as isNotFoundError,
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
z as isSerializedAPIError,
|
|
22
|
+
k as isSerializedCodedError,
|
|
23
|
+
I as serializeError
|
|
20
24
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("axios"),o=require("@ancon/wildcat-types");function i(r){const e=r;return s.isAxiosError(e)||!(e!=null&&e.code)?!1:Object.values(o.ErrorCode).includes(e.code)}module.exports=i;
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./shared/isWithinFlag.js"),o=require("./shared/generateId.js"),i=require("./shared/wait.js"),u=require("./outlet/getListOutletOpeningHoursTable.js"),s=require("./outlet/getOutletTagInformation.js"),n=require("./outlet/getOutletAvailabilityInfo.js"),c=require("./outlet/getOutletOfflineOrderFormats.js"),a=require("./outlet/getOutletAvailableOrderFormats.js"),l=require("./outlet/getOutletFormattedDistance.js"),d=require("./outlet/isOutletAcceptingPreOrders.js"),g=require("./outlet/getOutletDeliveryFee.js"),q=require("./outlet/getOutletTodayOpeningTimes.js"),_=require("./outlet/getOutletOrderFormats.js"),k=require("./outlet/serviceDateTimesFromOpeningHours.js"),O=require("./outlet/getPickerIntervalsForDay.js"),m=require("./outlet/getServiceIntervalRange.js"),h=require("./outlet/getServiceIntervalsForOrderFormat.js"),P=require("./outlet/getOutletFormattedAddress.js"),C=require("./outlet/getPartitionedOutletsList.js"),p=require("./outlet/getOutletPickerTimesForWeek.js"),S=require("./outlet/getOutletOrderPrepTime.js"),T=require("./outlet/getStructuredOutletAddress.js"),y=require("./outlet/getOutletNextOpeningTimeText.js"),F=require("./outlet/getOutletCurrentClosingTimeText.js"),f=require("./outlet/getOutletNextReadyToOrderTime.js"),A=require("./versioning/isVersionALessThanB.js"),I=require("./versioning/cleanVersionString.js"),v=require("./api/getUrlAndParams.js"),E=require("./api/getEndpointWithVersion.js"),R=require("./api/generateBackoffWithEqualJitter.js"),D=require("./api/isAcceptedResponse.js"),b=require("./api/isNoContentResponse.js"),N=require("./string/slugify.js"),V=require("./string/truncate.js"),M=require("./color/lighten.js"),x=require("./color/brighten.js"),H=require("./color/darken.js"),L=require("./color/isDarkBackground.js"),W=require("./user/getFullName.js"),B=require("./user/getFullAddressString.js"),U=require("./user/getCustomerAddressFromGeocoderResult.js"),G=require("./user/getFormattedPhoneNumber.js"),w=require("./user/getStructuredCustomerAddress.js"),z=require("./logger/Logger.js"),K=require("./logger/types.js"),J=require("./logger/sanitizeAsStringDict.js"),Q=require("./logger/pascalCaseFormatter.js"),j=require("./printing/getPrinterType.js"),X=require("./printing/isValidPrinter.js"),Y=require("./printing/isValidNetworkPrinter.js"),Z=require("./printing/isValidStarCloudPrinter.js"),$=require("./printing/isTerminalPrinter.js"),ee=require("./printing/isCloudPrintModeEnabled.js"),re=require("./number/randomIntFromInterval.js"),te=require("./tables/decodeTableQRPayload.js"),oe=require("./checkout/getCheckoutItemModifications.js"),ie=require("./checkout/getCheckoutProductName.js"),e=require("./checkout/getCheckoutOrderStatusTexts.js"),ue=require("./checkout/getCheckoutItemsMappedByTicketItemStatus.js"),se=require("./checkout/isCheckoutOrderSummary.js"),ne=require("./checkout/buildCheckoutRequestItem.js"),ce=require("./checkout/getCheckoutGrandTotalAmount.js"),ae=require("./checkout/getCheckoutRequestItemFromCheckoutItem.js"),le=require("./checkout/isCheckoutItemsAreEqual.js"),de=require("./checkout/checkoutHasWallet.js"),ge=require("./checkout/getWalletMetaFromCheckout.js"),qe=require("./checkout/isPreOrderServiceTime.js"),_e=require("./checkout/isPreOrderCheckout.js"),ke=require("./checkout/isUpdatingCheckoutAllowed.js"),Oe=require("./checkout/isCheckoutAlreadyPaidError.js"),me=require("./checkout/isCheckoutAlreadyPaidStatus.js"),r=require("./checkout/getCheckoutPaymentErrorTranslationTexts.js"),he=require("./currency/getFormattedCurrency.js"),Pe=require("./inventory/isDetailedProductOutOfStock.js"),Ce=require("./inventory/isDetailedProductVariantOutOfStocks.js"),pe=require("./inventory/isMenuTreeProductOutOfStock.js"),Se=require("./inventory/isDetailedProductUpSellsOutOfStock.js"),Te=require("./inventory/isUpSellProductOutStock.js"),ye=require("./inventory/isDetailedProductOutletStockOutOfStock.js"),Fe=require("./inventory/getDetailedProductVariantStock.js"),fe=require("./signalr/createUseSignalRHook.js"),Ae=require("./signalr/SignalR.js"),Ie=require("./error/createCodedError.js"),ve=require("./error/isCodedError.js"),Ee=require("./error/isNetworkError.js"),Re=require("./error/isLockedError.js"),De=require("./error/isNotFoundError.js"),be=require("./error/isAPIError.js"),Ne=require("./error/isSerializedAPIError.js"),Ve=require("./error/isSerializedCodedError.js"),Me=require("./error/serializeError.js"),xe=require("./error/getErrorCode.js"),He=require("./hangfire/isHangfireResponse.js"),Le=require("./hangfire/createHangfirePoller.js"),We=require("./hangfire/createMakeHangfireRequest.js"),Be=require("./product/extractProductsFromMenuTree.js"),Ue=require("./product/calculateIngredientsCost.js"),Ge=require("./product/calculateAddonGroupCost.js"),we=require("./product/getAddonGroupInfoBySettings.js");require("moment");require("@ancon/wildcat-types");require("./outlet/constants.js");require("./outlet/getOutletCurrentActiveOperatingHour.js");require("./outlet/getMomentFromDateAndTimeString.js");require("./outlet/searchNextOpeningMoment.js");require("./_baseIsEqual-a66350f1.js");require("./isObjectLike-0cc89d64.js");require("./toString-c005c116.js");require("./shared/constants.js");require("./time/toMinutes.js");require("./time/getNextTenthMinute.js");require("./outlet/types.js");require("./outlet/getSettingsForOrderFormat.js");require("./outlet/getServiceIntervalStart.js");require("./outlet/getNextTenthMinute.js");require("./outlet/generatePickerTimesForDay.js");require("./outlet/getServiceIntervalEnd.js");require("./outlet/hoursAndMinutesToMinutes.js");require("compare-versions");require("tinycolor2");require("google-libphonenumber");require("@ancon/wildcat-printing");require("axios");require("./currency/getFormattedCurrencyPostfix.js");require("react");require("react-redux");require("@microsoft/signalr");exports.isWithinFlag=t;exports.generateId=o;exports.wait=i;exports.getListOutletOpeningHoursTable=u;exports.getOutletTagInformation=s.default;exports.getOutletAvailabilityInfo=n.default;exports.getOutletOfflineOrderFormats=c;exports.getOutletAvailableOrderFormats=a;exports.getOutletFormattedDistance=l;exports.isOutletAcceptingPreOrders=d;exports.getOutletDeliveryFee=g;exports.getOutletTodayOpeningTimes=q;exports.getOutletOrderFormats=_;exports.serviceDateTimesFromOpeningHours=k;exports.getPickerIntervalsForDay=O;exports.getServiceIntervalRange=m;exports.getServiceIntervalsForOrderFormat=h;exports.getOutletFormattedAddress=P;exports.getPartitionedOutletsList=C;exports.getOutletPickerTimesForWeek=p;exports.getOutletOrderPreparationTime=S;exports.getStructuredOutletAddress=T;exports.getOutletNextOpeningTimeText=y;exports.getOutletCurrentClosingTimeText=F;exports.getOutletNextReadyToOrderTime=f;exports.isVersionALessThanB=A;exports.cleanVersionString=I;exports.getUrlAndParams=v;exports.getEndpointWithVersion=E;exports.generateBackoffWithEqualJitter=R;exports.isAcceptedResponse=D;exports.isNoContentResponse=b;exports.slugify=N;exports.truncate=V;exports.lighten=M;exports.brighten=x;exports.darken=H;exports.isDarkBackground=L;exports.getFullName=W;exports.getFullAddressString=B;exports.getCustomerAddressFromGeocoderResult=U;exports.getFormattedPhoneNumber=G;exports.getStructuredCustomerAddress=w;exports.Logger=z;exports.LogLevel=K.LogLevel;exports.sanitizeAsStringDict=J;exports.pascalCaseFormatter=Q;exports.getPrinterType=j;exports.isValidPrinter=X;exports.isValidNetworkPrinter=Y;exports.isValidStarCloudPrinter=Z;exports.isTerminalPrinter=$;exports.isCloudPrintModeEnabled=ee;exports.randomIntFromInterval=re;exports.decodeTableQRPayload=te;exports.getCheckoutGroupedModifications=oe;exports.getCheckoutProductName=ie;exports.TranslationKey=e.TranslationKey;exports.getCheckoutOrderStatusTexts=e.default;exports.getCheckoutItemsMappedByTicketItemStatus=ue;exports.isCheckoutOrderSummary=se;exports.buildCheckoutRequestItem=ne;exports.getCheckoutGrandTotalAmount=ce;exports.getCheckoutRequestItemFromCheckoutItem=ae;exports.isCheckoutItemsAreEqual=le;exports.checkoutHasWallet=de;exports.getWalletMetaFromCheckout=ge;exports.isPreOrderServiceTime=qe;exports.isPreOrderCheckout=_e;exports.isUpdatingCheckoutAllowed=ke;exports.isCheckoutAlreadyPaidError=Oe;exports.isCheckoutAlreadyPaidStatus=me;exports.CheckoutPaymentErrorTranslationKey=r.CheckoutPaymentErrorTranslationKey;exports.getCheckoutPaymentErrorTranslationTexts=r.default;exports.getFormattedCurrency=he;exports.isDetailedProductOutOfStock=Pe;exports.isDetailedProductVariantOutOfStocks=Ce;exports.isMenuTreeProductOutOfStock=pe;exports.isDetailedProductUpSellsOutOfStock=Se;exports.isUpSellProductOutOfStock=Te;exports.isDetailedProductOutletStockOutOfStock=ye;exports.getDetailedProductVariantStock=Fe;exports.createUseSignalRHook=fe;exports.SignalR=Ae;exports.createCodedError=Ie;exports.isCodedError=ve;exports.isNetworkError=Ee;exports.isLockedError=Re;exports.isNotFoundError=De;exports.isAPIError=be;exports.isSerializedAPIError=Ne;exports.isSerializedCodedError=Ve;exports.serializeError=Me;exports.getErrorCode=xe;exports.isHangfireResponse=He;exports.createHangfirePoller=Le.default;exports.createMakeHangfireRequest=We;exports.extractProductsFromMenuTree=Be;exports.calculateIngredientsCost=Ue;exports.calculateAddonGroupsCost=Ge;exports.getAddonGroupInfoBySettings=we.default;
|
package/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { default as W } from "./outlet/getOutletTagInformation.mjs";
|
|
|
6
6
|
import { default as B } from "./outlet/getOutletAvailabilityInfo.mjs";
|
|
7
7
|
import { default as U } from "./outlet/getOutletOfflineOrderFormats.mjs";
|
|
8
8
|
import { default as z } from "./outlet/getOutletAvailableOrderFormats.mjs";
|
|
9
|
-
import { default as
|
|
9
|
+
import { default as J } from "./outlet/getOutletFormattedDistance.mjs";
|
|
10
10
|
import { default as j } from "./outlet/isOutletAcceptingPreOrders.mjs";
|
|
11
11
|
import { default as Y } from "./outlet/getOutletDeliveryFee.mjs";
|
|
12
12
|
import { default as _ } from "./outlet/getOutletTodayOpeningTimes.mjs";
|
|
@@ -14,17 +14,17 @@ import { default as ee } from "./outlet/getOutletOrderFormats.mjs";
|
|
|
14
14
|
import { default as re } from "./outlet/serviceDateTimesFromOpeningHours.mjs";
|
|
15
15
|
import { default as ae } from "./outlet/getPickerIntervalsForDay.mjs";
|
|
16
16
|
import { default as se } from "./outlet/getServiceIntervalRange.mjs";
|
|
17
|
-
import { default as
|
|
17
|
+
import { default as de } from "./outlet/getServiceIntervalsForOrderFormat.mjs";
|
|
18
18
|
import { default as me } from "./outlet/getOutletFormattedAddress.mjs";
|
|
19
19
|
import { default as pe } from "./outlet/getPartitionedOutletsList.mjs";
|
|
20
20
|
import { default as ne } from "./outlet/getOutletPickerTimesForWeek.mjs";
|
|
21
|
-
import { default as
|
|
21
|
+
import { default as ge } from "./outlet/getOutletOrderPrepTime.mjs";
|
|
22
22
|
import { default as ke } from "./outlet/getStructuredOutletAddress.mjs";
|
|
23
|
-
import { default as
|
|
23
|
+
import { default as Pe } from "./outlet/getOutletNextOpeningTimeText.mjs";
|
|
24
24
|
import { default as Te } from "./outlet/getOutletCurrentClosingTimeText.mjs";
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
25
|
+
import { default as Fe } from "./outlet/getOutletNextReadyToOrderTime.mjs";
|
|
26
|
+
import { default as ye } from "./versioning/isVersionALessThanB.mjs";
|
|
27
|
+
import { default as Ee } from "./versioning/cleanVersionString.mjs";
|
|
28
28
|
import { default as Re } from "./api/getUrlAndParams.mjs";
|
|
29
29
|
import { default as Ne } from "./api/getEndpointWithVersion.mjs";
|
|
30
30
|
import { default as Ve } from "./api/generateBackoffWithEqualJitter.mjs";
|
|
@@ -33,7 +33,7 @@ import { default as We } from "./api/isNoContentResponse.mjs";
|
|
|
33
33
|
import { default as Be } from "./string/slugify.mjs";
|
|
34
34
|
import { default as Ue } from "./string/truncate.mjs";
|
|
35
35
|
import { default as ze } from "./color/lighten.mjs";
|
|
36
|
-
import { default as
|
|
36
|
+
import { default as Je } from "./color/brighten.mjs";
|
|
37
37
|
import { default as je } from "./color/darken.mjs";
|
|
38
38
|
import { default as Ye } from "./color/isDarkBackground.mjs";
|
|
39
39
|
import { default as _e } from "./user/getFullName.mjs";
|
|
@@ -41,17 +41,17 @@ import { default as et } from "./user/getFullAddressString.mjs";
|
|
|
41
41
|
import { default as rt } from "./user/getCustomerAddressFromGeocoderResult.mjs";
|
|
42
42
|
import { default as at } from "./user/getFormattedPhoneNumber.mjs";
|
|
43
43
|
import { default as st } from "./user/getStructuredCustomerAddress.mjs";
|
|
44
|
-
import { default as
|
|
44
|
+
import { default as dt } from "./logger/Logger.mjs";
|
|
45
45
|
import { LogLevel as mt } from "./logger/types.mjs";
|
|
46
46
|
import { default as pt } from "./logger/sanitizeAsStringDict.mjs";
|
|
47
47
|
import { default as nt } from "./logger/pascalCaseFormatter.mjs";
|
|
48
|
-
import { default as
|
|
48
|
+
import { default as gt } from "./printing/getPrinterType.mjs";
|
|
49
49
|
import { default as kt } from "./printing/isValidPrinter.mjs";
|
|
50
|
-
import { default as
|
|
50
|
+
import { default as Pt } from "./printing/isValidNetworkPrinter.mjs";
|
|
51
51
|
import { default as Tt } from "./printing/isValidStarCloudPrinter.mjs";
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import { default as
|
|
52
|
+
import { default as Ft } from "./printing/isTerminalPrinter.mjs";
|
|
53
|
+
import { default as yt } from "./printing/isCloudPrintModeEnabled.mjs";
|
|
54
|
+
import { default as Et } from "./number/randomIntFromInterval.mjs";
|
|
55
55
|
import { default as Rt } from "./tables/decodeTableQRPayload.mjs";
|
|
56
56
|
import { default as Nt } from "./checkout/getCheckoutItemModifications.mjs";
|
|
57
57
|
import { default as Vt } from "./checkout/getCheckoutProductName.mjs";
|
|
@@ -59,7 +59,7 @@ import { TranslationKey as Lt, default as Mt } from "./checkout/getCheckoutOrder
|
|
|
59
59
|
import { default as qt } from "./checkout/getCheckoutItemsMappedByTicketItemStatus.mjs";
|
|
60
60
|
import { default as Gt } from "./checkout/isCheckoutOrderSummary.mjs";
|
|
61
61
|
import { default as wt } from "./checkout/buildCheckoutRequestItem.mjs";
|
|
62
|
-
import { default as
|
|
62
|
+
import { default as Kt } from "./checkout/getCheckoutGrandTotalAmount.mjs";
|
|
63
63
|
import { default as Qt } from "./checkout/getCheckoutRequestItemFromCheckoutItem.mjs";
|
|
64
64
|
import { default as Xt } from "./checkout/isCheckoutItemsAreEqual.mjs";
|
|
65
65
|
import { default as Zt } from "./checkout/checkoutHasWallet.mjs";
|
|
@@ -67,31 +67,36 @@ import { default as $t } from "./checkout/getWalletMetaFromCheckout.mjs";
|
|
|
67
67
|
import { default as tr } from "./checkout/isPreOrderServiceTime.mjs";
|
|
68
68
|
import { default as or } from "./checkout/isPreOrderCheckout.mjs";
|
|
69
69
|
import { default as fr } from "./checkout/isUpdatingCheckoutAllowed.mjs";
|
|
70
|
-
import { default as ur } from "./
|
|
71
|
-
import { default as
|
|
72
|
-
import {
|
|
73
|
-
import { default as
|
|
74
|
-
import { default as gr } from "./inventory/
|
|
75
|
-
import { default as
|
|
76
|
-
import { default as Pr } from "./inventory/
|
|
77
|
-
import { default as
|
|
78
|
-
import { default as Fr } from "./
|
|
79
|
-
import { default as
|
|
80
|
-
import { default as
|
|
81
|
-
import { default as
|
|
82
|
-
import { default as
|
|
83
|
-
import { default as
|
|
84
|
-
import { default as
|
|
85
|
-
import { default as
|
|
86
|
-
import { default as
|
|
87
|
-
import { default as
|
|
88
|
-
import { default as
|
|
89
|
-
import { default as Jr } from "./
|
|
90
|
-
import { default as
|
|
91
|
-
import { default as
|
|
92
|
-
import { default as
|
|
93
|
-
import { default as
|
|
94
|
-
import { default as
|
|
70
|
+
import { default as ur } from "./checkout/isCheckoutAlreadyPaidError.mjs";
|
|
71
|
+
import { default as lr } from "./checkout/isCheckoutAlreadyPaidStatus.mjs";
|
|
72
|
+
import { CheckoutPaymentErrorTranslationKey as ir, default as pr } from "./checkout/getCheckoutPaymentErrorTranslationTexts.mjs";
|
|
73
|
+
import { default as nr } from "./currency/getFormattedCurrency.mjs";
|
|
74
|
+
import { default as gr } from "./inventory/isDetailedProductOutOfStock.mjs";
|
|
75
|
+
import { default as kr } from "./inventory/isDetailedProductVariantOutOfStocks.mjs";
|
|
76
|
+
import { default as Pr } from "./inventory/isMenuTreeProductOutOfStock.mjs";
|
|
77
|
+
import { default as Tr } from "./inventory/isDetailedProductUpSellsOutOfStock.mjs";
|
|
78
|
+
import { default as Fr } from "./inventory/isUpSellProductOutStock.mjs";
|
|
79
|
+
import { default as yr } from "./inventory/isDetailedProductOutletStockOutOfStock.mjs";
|
|
80
|
+
import { default as Er } from "./inventory/getDetailedProductVariantStock.mjs";
|
|
81
|
+
import { default as Rr } from "./signalr/createUseSignalRHook.mjs";
|
|
82
|
+
import { default as Nr } from "./signalr/SignalR.mjs";
|
|
83
|
+
import { default as Vr } from "./error/createCodedError.mjs";
|
|
84
|
+
import { default as Lr } from "./error/isCodedError.mjs";
|
|
85
|
+
import { default as Wr } from "./error/isNetworkError.mjs";
|
|
86
|
+
import { default as Br } from "./error/isLockedError.mjs";
|
|
87
|
+
import { default as Ur } from "./error/isNotFoundError.mjs";
|
|
88
|
+
import { default as zr } from "./error/isAPIError.mjs";
|
|
89
|
+
import { default as Jr } from "./error/isSerializedAPIError.mjs";
|
|
90
|
+
import { default as jr } from "./error/isSerializedCodedError.mjs";
|
|
91
|
+
import { default as Yr } from "./error/serializeError.mjs";
|
|
92
|
+
import { default as _r } from "./error/getErrorCode.mjs";
|
|
93
|
+
import { default as eo } from "./hangfire/isHangfireResponse.mjs";
|
|
94
|
+
import { default as ro } from "./hangfire/createHangfirePoller.mjs";
|
|
95
|
+
import { default as ao } from "./hangfire/createMakeHangfireRequest.mjs";
|
|
96
|
+
import { default as so } from "./product/extractProductsFromMenuTree.mjs";
|
|
97
|
+
import { default as lo } from "./product/calculateIngredientsCost.mjs";
|
|
98
|
+
import { default as io } from "./product/calculateAddonGroupCost.mjs";
|
|
99
|
+
import { default as xo } from "./product/getAddonGroupInfoBySettings.mjs";
|
|
95
100
|
import "moment";
|
|
96
101
|
import "@ancon/wildcat-types";
|
|
97
102
|
import "./outlet/constants.mjs";
|
|
@@ -115,42 +120,45 @@ import "compare-versions";
|
|
|
115
120
|
import "tinycolor2";
|
|
116
121
|
import "google-libphonenumber";
|
|
117
122
|
import "@ancon/wildcat-printing";
|
|
123
|
+
import "axios";
|
|
118
124
|
import "./currency/getFormattedCurrencyPostfix.mjs";
|
|
119
125
|
import "react";
|
|
120
126
|
import "react-redux";
|
|
121
127
|
import "@microsoft/signalr";
|
|
122
|
-
import "axios";
|
|
123
128
|
export {
|
|
129
|
+
ir as CheckoutPaymentErrorTranslationKey,
|
|
124
130
|
mt as LogLevel,
|
|
125
|
-
|
|
126
|
-
|
|
131
|
+
dt as Logger,
|
|
132
|
+
Nr as SignalR,
|
|
127
133
|
Lt as TranslationKey,
|
|
128
|
-
|
|
134
|
+
Je as brighten,
|
|
129
135
|
wt as buildCheckoutRequestItem,
|
|
130
|
-
|
|
131
|
-
|
|
136
|
+
io as calculateAddonGroupsCost,
|
|
137
|
+
lo as calculateIngredientsCost,
|
|
132
138
|
Zt as checkoutHasWallet,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
139
|
+
Ee as cleanVersionString,
|
|
140
|
+
Vr as createCodedError,
|
|
141
|
+
ro as createHangfirePoller,
|
|
142
|
+
ao as createMakeHangfireRequest,
|
|
143
|
+
Rr as createUseSignalRHook,
|
|
138
144
|
je as darken,
|
|
139
145
|
Rt as decodeTableQRPayload,
|
|
140
|
-
|
|
146
|
+
so as extractProductsFromMenuTree,
|
|
141
147
|
Ve as generateBackoffWithEqualJitter,
|
|
142
148
|
N as generateId,
|
|
143
|
-
|
|
144
|
-
|
|
149
|
+
xo as getAddonGroupInfoBySettings,
|
|
150
|
+
Kt as getCheckoutGrandTotalAmount,
|
|
145
151
|
Nt as getCheckoutGroupedModifications,
|
|
146
152
|
qt as getCheckoutItemsMappedByTicketItemStatus,
|
|
147
153
|
Mt as getCheckoutOrderStatusTexts,
|
|
154
|
+
pr as getCheckoutPaymentErrorTranslationTexts,
|
|
148
155
|
Vt as getCheckoutProductName,
|
|
149
156
|
Qt as getCheckoutRequestItemFromCheckoutItem,
|
|
150
157
|
rt as getCustomerAddressFromGeocoderResult,
|
|
151
|
-
|
|
158
|
+
Er as getDetailedProductVariantStock,
|
|
152
159
|
Ne as getEndpointWithVersion,
|
|
153
|
-
|
|
160
|
+
_r as getErrorCode,
|
|
161
|
+
nr as getFormattedCurrency,
|
|
154
162
|
at as getFormattedPhoneNumber,
|
|
155
163
|
et as getFullAddressString,
|
|
156
164
|
_e as getFullName,
|
|
@@ -160,58 +168,61 @@ export {
|
|
|
160
168
|
Te as getOutletCurrentClosingTimeText,
|
|
161
169
|
Y as getOutletDeliveryFee,
|
|
162
170
|
me as getOutletFormattedAddress,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
171
|
+
J as getOutletFormattedDistance,
|
|
172
|
+
Pe as getOutletNextOpeningTimeText,
|
|
173
|
+
Fe as getOutletNextReadyToOrderTime,
|
|
166
174
|
U as getOutletOfflineOrderFormats,
|
|
167
175
|
ee as getOutletOrderFormats,
|
|
168
|
-
|
|
176
|
+
ge as getOutletOrderPreparationTime,
|
|
169
177
|
ne as getOutletPickerTimesForWeek,
|
|
170
178
|
W as getOutletTagInformation,
|
|
171
179
|
_ as getOutletTodayOpeningTimes,
|
|
172
180
|
pe as getPartitionedOutletsList,
|
|
173
181
|
ae as getPickerIntervalsForDay,
|
|
174
|
-
|
|
182
|
+
gt as getPrinterType,
|
|
175
183
|
se as getServiceIntervalRange,
|
|
176
|
-
|
|
184
|
+
de as getServiceIntervalsForOrderFormat,
|
|
177
185
|
st as getStructuredCustomerAddress,
|
|
178
186
|
ke as getStructuredOutletAddress,
|
|
179
187
|
Re as getUrlAndParams,
|
|
180
188
|
$t as getWalletMetaFromCheckout,
|
|
181
|
-
|
|
189
|
+
zr as isAPIError,
|
|
182
190
|
Le as isAcceptedResponse,
|
|
191
|
+
ur as isCheckoutAlreadyPaidError,
|
|
192
|
+
lr as isCheckoutAlreadyPaidStatus,
|
|
183
193
|
Xt as isCheckoutItemsAreEqual,
|
|
184
194
|
Gt as isCheckoutOrderSummary,
|
|
185
|
-
|
|
186
|
-
|
|
195
|
+
yt as isCloudPrintModeEnabled,
|
|
196
|
+
Lr as isCodedError,
|
|
187
197
|
Ye as isDarkBackground,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
198
|
+
gr as isDetailedProductOutOfStock,
|
|
199
|
+
yr as isDetailedProductOutletStockOutOfStock,
|
|
200
|
+
Tr as isDetailedProductUpSellsOutOfStock,
|
|
201
|
+
kr as isDetailedProductVariantOutOfStocks,
|
|
202
|
+
eo as isHangfireResponse,
|
|
203
|
+
Br as isLockedError,
|
|
204
|
+
Pr as isMenuTreeProductOutOfStock,
|
|
205
|
+
Wr as isNetworkError,
|
|
196
206
|
We as isNoContentResponse,
|
|
197
|
-
|
|
207
|
+
Ur as isNotFoundError,
|
|
198
208
|
j as isOutletAcceptingPreOrders,
|
|
199
209
|
or as isPreOrderCheckout,
|
|
200
210
|
tr as isPreOrderServiceTime,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
211
|
+
Jr as isSerializedAPIError,
|
|
212
|
+
jr as isSerializedCodedError,
|
|
213
|
+
Ft as isTerminalPrinter,
|
|
214
|
+
Fr as isUpSellProductOutOfStock,
|
|
204
215
|
fr as isUpdatingCheckoutAllowed,
|
|
205
|
-
|
|
216
|
+
Pt as isValidNetworkPrinter,
|
|
206
217
|
kt as isValidPrinter,
|
|
207
218
|
Tt as isValidStarCloudPrinter,
|
|
208
|
-
|
|
219
|
+
ye as isVersionALessThanB,
|
|
209
220
|
R as isWithinFlag,
|
|
210
221
|
ze as lighten,
|
|
211
222
|
nt as pascalCaseFormatter,
|
|
212
|
-
|
|
223
|
+
Et as randomIntFromInterval,
|
|
213
224
|
pt as sanitizeAsStringDict,
|
|
214
|
-
|
|
225
|
+
Yr as serializeError,
|
|
215
226
|
re as serviceDateTimesFromOpeningHours,
|
|
216
227
|
Be as slugify,
|
|
217
228
|
Ue as truncate,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ancon/wildcat-utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.37.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -91,6 +91,11 @@
|
|
|
91
91
|
"require": "./checkout/getCheckoutOrderStatusTexts.js",
|
|
92
92
|
"types": "./checkout/getCheckoutOrderStatusTexts.d.ts"
|
|
93
93
|
},
|
|
94
|
+
"./checkout/getCheckoutPaymentErrorTranslationTexts": {
|
|
95
|
+
"import": "./checkout/getCheckoutPaymentErrorTranslationTexts.mjs",
|
|
96
|
+
"require": "./checkout/getCheckoutPaymentErrorTranslationTexts.js",
|
|
97
|
+
"types": "./checkout/getCheckoutPaymentErrorTranslationTexts.d.ts"
|
|
98
|
+
},
|
|
94
99
|
"./checkout/getCheckoutProductName": {
|
|
95
100
|
"import": "./checkout/getCheckoutProductName.mjs",
|
|
96
101
|
"require": "./checkout/getCheckoutProductName.js",
|
|
@@ -111,6 +116,16 @@
|
|
|
111
116
|
"require": "./checkout/index.js",
|
|
112
117
|
"types": "./checkout/index.d.ts"
|
|
113
118
|
},
|
|
119
|
+
"./checkout/isCheckoutAlreadyPaidError": {
|
|
120
|
+
"import": "./checkout/isCheckoutAlreadyPaidError.mjs",
|
|
121
|
+
"require": "./checkout/isCheckoutAlreadyPaidError.js",
|
|
122
|
+
"types": "./checkout/isCheckoutAlreadyPaidError.d.ts"
|
|
123
|
+
},
|
|
124
|
+
"./checkout/isCheckoutAlreadyPaidStatus": {
|
|
125
|
+
"import": "./checkout/isCheckoutAlreadyPaidStatus.mjs",
|
|
126
|
+
"require": "./checkout/isCheckoutAlreadyPaidStatus.js",
|
|
127
|
+
"types": "./checkout/isCheckoutAlreadyPaidStatus.d.ts"
|
|
128
|
+
},
|
|
114
129
|
"./checkout/isCheckoutItemsAreEqual": {
|
|
115
130
|
"import": "./checkout/isCheckoutItemsAreEqual.mjs",
|
|
116
131
|
"require": "./checkout/isCheckoutItemsAreEqual.js",
|
|
@@ -186,6 +201,11 @@
|
|
|
186
201
|
"require": "./error/createCodedError.js",
|
|
187
202
|
"types": "./error/createCodedError.d.ts"
|
|
188
203
|
},
|
|
204
|
+
"./error/getErrorCode": {
|
|
205
|
+
"import": "./error/getErrorCode.mjs",
|
|
206
|
+
"require": "./error/getErrorCode.js",
|
|
207
|
+
"types": "./error/getErrorCode.d.ts"
|
|
208
|
+
},
|
|
189
209
|
"./error": {
|
|
190
210
|
"import": "./error/index.mjs",
|
|
191
211
|
"require": "./error/index.js",
|
|
@@ -221,6 +241,11 @@
|
|
|
221
241
|
"require": "./error/isSerializedAPIError.js",
|
|
222
242
|
"types": "./error/isSerializedAPIError.d.ts"
|
|
223
243
|
},
|
|
244
|
+
"./error/isSerializedCodedError": {
|
|
245
|
+
"import": "./error/isSerializedCodedError.mjs",
|
|
246
|
+
"require": "./error/isSerializedCodedError.js",
|
|
247
|
+
"types": "./error/isSerializedCodedError.d.ts"
|
|
248
|
+
},
|
|
224
249
|
"./error/serializeError": {
|
|
225
250
|
"import": "./error/serializeError.mjs",
|
|
226
251
|
"require": "./error/serializeError.js",
|