@ancon/wildcat-utils 1.38.2 → 1.38.4
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/index.d.ts +2 -1
- package/checkout/index.js +1 -1
- package/checkout/index.mjs +17 -15
- package/checkout/isDeletingCheckoutAllowed.d.ts +5 -0
- package/checkout/isDeletingCheckoutAllowed.js +1 -0
- package/checkout/isDeletingCheckoutAllowed.mjs +14 -0
- package/error/isSerializedAPIError.d.ts +2 -1
- package/error/isSerializedAPIError.js +1 -1
- package/error/isSerializedAPIError.mjs +7 -7
- package/error/isSerializedCodedError.d.ts +2 -1
- package/error/isSerializedCodedError.js +1 -1
- package/error/isSerializedCodedError.mjs +5 -5
- package/error/types.d.ts +2 -0
- package/index.js +1 -1
- package/index.mjs +68 -66
- package/package.json +6 -1
package/checkout/index.d.ts
CHANGED
|
@@ -14,4 +14,5 @@ import isPreOrderCheckout from './isPreOrderCheckout';
|
|
|
14
14
|
import isUpdatingCheckoutAllowed from './isUpdatingCheckoutAllowed';
|
|
15
15
|
import isCheckoutAlreadyPaidStatus from './isCheckoutAlreadyPaidStatus';
|
|
16
16
|
import getCheckoutPaymentErrorTranslationTexts, { CheckoutPaymentErrorTranslationKey } from './getCheckoutPaymentErrorTranslationTexts';
|
|
17
|
-
|
|
17
|
+
import isDeletingCheckoutAllowed from './isDeletingCheckoutAllowed';
|
|
18
|
+
export { TranslationKey, getCheckoutGroupedModifications, getCheckoutProductName, getCheckoutOrderStatusTexts, getCheckoutItemsMappedByTicketItemStatus, isCheckoutOrderSummary, buildCheckoutRequestItem, getCheckoutGrandTotalAmount, getCheckoutRequestItemFromCheckoutItem, isCheckoutItemsAreEqual, checkoutHasWallet, getWalletMetaFromCheckout, isPreOrderCheckout, isPreOrderServiceTime, isUpdatingCheckoutAllowed, isCheckoutAlreadyPaidStatus, CheckoutPaymentErrorTranslationKey, getCheckoutPaymentErrorTranslationTexts, isDeletingCheckoutAllowed, };
|
package/checkout/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./getCheckoutItemModifications.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./getCheckoutItemModifications.js"),o=require("./getCheckoutProductName.js"),e=require("./getCheckoutOrderStatusTexts.js"),u=require("./getCheckoutItemsMappedByTicketItemStatus.js"),c=require("./isCheckoutOrderSummary.js"),i=require("./buildCheckoutRequestItem.js"),s=require("./getCheckoutGrandTotalAmount.js"),k=require("./getCheckoutRequestItemFromCheckoutItem.js"),a=require("./isCheckoutItemsAreEqual.js"),h=require("./checkoutHasWallet.js"),n=require("./getWalletMetaFromCheckout.js"),l=require("./isPreOrderServiceTime.js"),C=require("./isPreOrderCheckout.js"),d=require("./isUpdatingCheckoutAllowed.js"),m=require("./isCheckoutAlreadyPaidStatus.js"),t=require("./getCheckoutPaymentErrorTranslationTexts.js"),q=require("./isDeletingCheckoutAllowed.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/isSerializedAPIError.js");exports.getCheckoutGroupedModifications=r;exports.getCheckoutProductName=o;exports.TranslationKey=e.TranslationKey;exports.getCheckoutOrderStatusTexts=e.default;exports.getCheckoutItemsMappedByTicketItemStatus=u;exports.isCheckoutOrderSummary=c;exports.buildCheckoutRequestItem=i;exports.getCheckoutGrandTotalAmount=s;exports.getCheckoutRequestItemFromCheckoutItem=k;exports.isCheckoutItemsAreEqual=a;exports.checkoutHasWallet=h;exports.getWalletMetaFromCheckout=n;exports.isPreOrderServiceTime=l;exports.isPreOrderCheckout=C;exports.isUpdatingCheckoutAllowed=d;exports.isCheckoutAlreadyPaidStatus=m;exports.CheckoutPaymentErrorTranslationKey=t.CheckoutPaymentErrorTranslationKey;exports.getCheckoutPaymentErrorTranslationTexts=t.default;exports.isDeletingCheckoutAllowed=q;
|
package/checkout/index.mjs
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { default as
|
|
1
|
+
import { default as l } from "./getCheckoutItemModifications.mjs";
|
|
2
2
|
import { default as p } from "./getCheckoutProductName.mjs";
|
|
3
3
|
import { TranslationKey as c, default as k } from "./getCheckoutOrderStatusTexts.mjs";
|
|
4
4
|
import { default as h } from "./getCheckoutItemsMappedByTicketItemStatus.mjs";
|
|
5
5
|
import { default as n } from "./isCheckoutOrderSummary.mjs";
|
|
6
6
|
import { default as T } from "./buildCheckoutRequestItem.mjs";
|
|
7
7
|
import { default as I } from "./getCheckoutGrandTotalAmount.mjs";
|
|
8
|
-
import { default as
|
|
8
|
+
import { default as A } from "./getCheckoutRequestItemFromCheckoutItem.mjs";
|
|
9
9
|
import { default as O } from "./isCheckoutItemsAreEqual.mjs";
|
|
10
10
|
import { default as E } from "./checkoutHasWallet.mjs";
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
11
|
+
import { default as w } from "./getWalletMetaFromCheckout.mjs";
|
|
12
|
+
import { default as G } from "./isPreOrderServiceTime.mjs";
|
|
13
|
+
import { default as R } from "./isPreOrderCheckout.mjs";
|
|
14
|
+
import { default as b } from "./isUpdatingCheckoutAllowed.mjs";
|
|
15
15
|
import { default as B } from "./isCheckoutAlreadyPaidStatus.mjs";
|
|
16
|
-
import { CheckoutPaymentErrorTranslationKey as
|
|
16
|
+
import { CheckoutPaymentErrorTranslationKey as H, default as N } from "./getCheckoutPaymentErrorTranslationTexts.mjs";
|
|
17
|
+
import { default as j } from "./isDeletingCheckoutAllowed.mjs";
|
|
17
18
|
import "@ancon/wildcat-types";
|
|
18
19
|
import "../currency/getFormattedCurrency.mjs";
|
|
19
20
|
import "../currency/getFormattedCurrencyPostfix.mjs";
|
|
@@ -22,22 +23,23 @@ import "../isObjectLike-7895e9dd.mjs";
|
|
|
22
23
|
import "axios";
|
|
23
24
|
import "../error/isSerializedAPIError.mjs";
|
|
24
25
|
export {
|
|
25
|
-
|
|
26
|
+
H as CheckoutPaymentErrorTranslationKey,
|
|
26
27
|
c as TranslationKey,
|
|
27
28
|
T as buildCheckoutRequestItem,
|
|
28
29
|
E as checkoutHasWallet,
|
|
29
30
|
I as getCheckoutGrandTotalAmount,
|
|
30
|
-
|
|
31
|
+
l as getCheckoutGroupedModifications,
|
|
31
32
|
h as getCheckoutItemsMappedByTicketItemStatus,
|
|
32
33
|
k as getCheckoutOrderStatusTexts,
|
|
33
|
-
|
|
34
|
+
N as getCheckoutPaymentErrorTranslationTexts,
|
|
34
35
|
p as getCheckoutProductName,
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
A as getCheckoutRequestItemFromCheckoutItem,
|
|
37
|
+
w as getWalletMetaFromCheckout,
|
|
37
38
|
B as isCheckoutAlreadyPaidStatus,
|
|
38
39
|
O as isCheckoutItemsAreEqual,
|
|
39
40
|
n as isCheckoutOrderSummary,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
j as isDeletingCheckoutAllowed,
|
|
42
|
+
R as isPreOrderCheckout,
|
|
43
|
+
G as isPreOrderServiceTime,
|
|
44
|
+
b as isUpdatingCheckoutAllowed
|
|
43
45
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("@ancon/wildcat-types");function e(t){switch(t==null?void 0:t.status){case s.CheckoutStatus.Processing:case s.CheckoutStatus.Authorized:case s.CheckoutStatus.Captured:return!1;default:return!0}}module.exports=e;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CheckoutStatus as s } from "@ancon/wildcat-types";
|
|
2
|
+
function r(t) {
|
|
3
|
+
switch (t == null ? void 0 : t.status) {
|
|
4
|
+
case s.Processing:
|
|
5
|
+
case s.Authorized:
|
|
6
|
+
case s.Captured:
|
|
7
|
+
return !1;
|
|
8
|
+
default:
|
|
9
|
+
return !0;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
r as default
|
|
14
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ErrorCode } from '@ancon/wildcat-types';
|
|
1
2
|
import { SerializedAPIError } from './types';
|
|
2
|
-
declare function isSerializedAPIError(error: unknown): error is SerializedAPIError;
|
|
3
|
+
declare function isSerializedAPIError(error: unknown, errorCode?: ErrorCode): error is SerializedAPIError;
|
|
3
4
|
export default isSerializedAPIError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const u=require("axios"),l=require("@ancon/wildcat-types");function a(r,s){var o,t,i,n;const e=r;return s!=null?a(r)&&((t=(o=r.response)==null?void 0:o.data)==null?void 0:t.errorCode)===s:u.isAxiosError(e)||!((n=(i=e==null?void 0:e.response)==null?void 0:i.data)!=null&&n.errorCode)?!1:Object.values(l.ErrorCode).includes(e.response.data.errorCode)}module.exports=a;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { isAxiosError as
|
|
2
|
-
import { ErrorCode as
|
|
3
|
-
function
|
|
4
|
-
var
|
|
5
|
-
const r =
|
|
6
|
-
return t(r) || !((
|
|
1
|
+
import { isAxiosError as i } from "axios";
|
|
2
|
+
import { ErrorCode as u } from "@ancon/wildcat-types";
|
|
3
|
+
function l(e, o) {
|
|
4
|
+
var s, t, a, n;
|
|
5
|
+
const r = e;
|
|
6
|
+
return o != null ? l(e) && ((t = (s = e.response) == null ? void 0 : s.data) == null ? void 0 : t.errorCode) === o : i(r) || !((n = (a = r == null ? void 0 : r.response) == null ? void 0 : a.data) != null && n.errorCode) ? !1 : Object.values(u).includes(r.response.data.errorCode);
|
|
7
7
|
}
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
l as default
|
|
10
10
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ErrorCode } from '@ancon/wildcat-types';
|
|
1
2
|
import { SerializedCodedError } from './types';
|
|
2
|
-
declare function isSerializedCodedError(error: unknown): error is SerializedCodedError;
|
|
3
|
+
declare function isSerializedCodedError(error: unknown, errorCode?: ErrorCode): error is SerializedCodedError;
|
|
3
4
|
export default isSerializedCodedError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const r=require("axios"),u=require("@ancon/wildcat-types");function t(s,i){const e=s;return i!=null?t(s)&&s.code===i:r.isAxiosError(e)||!(e!=null&&e.code)?!1:Object.values(u.ErrorCode).includes(e.code)}module.exports=t;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { isAxiosError as
|
|
1
|
+
import { isAxiosError as r } from "axios";
|
|
2
2
|
import { ErrorCode as s } from "@ancon/wildcat-types";
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
return o(
|
|
3
|
+
function t(o, i) {
|
|
4
|
+
const e = o;
|
|
5
|
+
return i != null ? t(o) && o.code === i : r(e) || !(e != null && e.code) ? !1 : Object.values(s).includes(e.code);
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
t as default
|
|
9
9
|
};
|
package/error/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { APIGenericError, ErrorCode } from '@ancon/wildcat-types';
|
|
2
2
|
export declare type SerializedAxiosError = {
|
|
3
3
|
message: string;
|
|
4
|
+
/** NOTE: HTTP status code */
|
|
4
5
|
code?: string;
|
|
5
6
|
response?: {
|
|
6
7
|
status?: number;
|
|
@@ -9,6 +10,7 @@ export declare type SerializedAxiosError = {
|
|
|
9
10
|
};
|
|
10
11
|
export declare type SerializedAPIError<T = unknown> = {
|
|
11
12
|
message: string;
|
|
13
|
+
/** NOTE: HTTP status code */
|
|
12
14
|
code?: string;
|
|
13
15
|
response: {
|
|
14
16
|
status?: number;
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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"),
|
|
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"),C=require("./outlet/getOutletFormattedAddress.js"),P=require("./outlet/getPartitionedOutletsList.js"),p=require("./outlet/getOutletPickerTimesForWeek.js"),S=require("./outlet/getOutletOrderPrepTime.js"),T=require("./outlet/getStructuredOutletAddress.js"),F=require("./outlet/getOutletNextOpeningTimeText.js"),f=require("./outlet/getOutletCurrentClosingTimeText.js"),y=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("./string/getRandomAlphaNumericCode.js"),x=require("./color/lighten.js"),H=require("./color/brighten.js"),L=require("./color/darken.js"),W=require("./color/isDarkBackground.js"),w=require("./user/getFullName.js"),B=require("./user/getFullAddressString.js"),U=require("./user/getCustomerAddressFromGeocoderResult.js"),G=require("./user/getFormattedPhoneNumber.js"),z=require("./user/getStructuredCustomerAddress.js"),K=require("./logger/Logger.js"),J=require("./logger/types.js"),Q=require("./logger/sanitizeAsStringDict.js"),j=require("./logger/pascalCaseFormatter.js"),X=require("./printing/getPrinterType.js"),Y=require("./printing/isValidPrinter.js"),Z=require("./printing/isValidNetworkPrinter.js"),$=require("./printing/isValidStarCloudPrinter.js"),ee=require("./printing/isTerminalPrinter.js"),re=require("./printing/isCloudPrintModeEnabled.js"),te=require("./number/randomIntFromInterval.js"),oe=require("./tables/decodeTableQRPayload.js"),ie=require("./checkout/getCheckoutItemModifications.js"),ue=require("./checkout/getCheckoutProductName.js"),e=require("./checkout/getCheckoutOrderStatusTexts.js"),se=require("./checkout/getCheckoutItemsMappedByTicketItemStatus.js"),ne=require("./checkout/isCheckoutOrderSummary.js"),ce=require("./checkout/buildCheckoutRequestItem.js"),ae=require("./checkout/getCheckoutGrandTotalAmount.js"),le=require("./checkout/getCheckoutRequestItemFromCheckoutItem.js"),de=require("./checkout/isCheckoutItemsAreEqual.js"),ge=require("./checkout/checkoutHasWallet.js"),qe=require("./checkout/getWalletMetaFromCheckout.js"),_e=require("./checkout/isPreOrderServiceTime.js"),ke=require("./checkout/isPreOrderCheckout.js"),Oe=require("./checkout/isUpdatingCheckoutAllowed.js"),me=require("./checkout/isCheckoutAlreadyPaidStatus.js"),r=require("./checkout/getCheckoutPaymentErrorTranslationTexts.js"),he=require("./checkout/isDeletingCheckoutAllowed.js"),Ce=require("./currency/getFormattedCurrency.js"),Pe=require("./inventory/isDetailedProductOutOfStock.js"),pe=require("./inventory/isDetailedProductVariantOutOfStocks.js"),Se=require("./inventory/isMenuTreeProductOutOfStock.js"),Te=require("./inventory/isDetailedProductUpSellsOutOfStock.js"),Fe=require("./inventory/isUpSellProductOutStock.js"),fe=require("./inventory/isDetailedProductOutletStockOutOfStock.js"),ye=require("./inventory/getDetailedProductVariantStock.js"),Ae=require("./signalr/createUseSignalRHook.js"),Ie=require("./signalr/SignalR.js"),ve=require("./error/createCodedError.js"),Ee=require("./error/isCodedError.js"),Re=require("./error/isNetworkError.js"),De=require("./error/isLockedError.js"),be=require("./error/isNotFoundError.js"),Ne=require("./error/isAPIError.js"),Ve=require("./error/isSerializedAPIError.js"),Me=require("./error/isSerializedCodedError.js"),xe=require("./error/serializeError.js"),He=require("./error/getErrorCode.js"),Le=require("./hangfire/isHangfireResponse.js"),We=require("./hangfire/createHangfirePoller.js"),we=require("./hangfire/createMakeHangfireRequest.js"),Be=require("./product/extractProductsFromMenuTree.js"),Ue=require("./product/calculateIngredientsCost.js"),Ge=require("./product/calculateAddonGroupCost.js"),ze=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("./noop-7ea3b37b.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=C;exports.getPartitionedOutletsList=P;exports.getOutletPickerTimesForWeek=p;exports.getOutletOrderPreparationTime=S;exports.getStructuredOutletAddress=T;exports.getOutletNextOpeningTimeText=F;exports.getOutletCurrentClosingTimeText=f;exports.getOutletNextReadyToOrderTime=y;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.getRandomAlphaNumericCode=M;exports.lighten=x;exports.brighten=H;exports.darken=L;exports.isDarkBackground=W;exports.getFullName=w;exports.getFullAddressString=B;exports.getCustomerAddressFromGeocoderResult=U;exports.getFormattedPhoneNumber=G;exports.getStructuredCustomerAddress=z;exports.Logger=K;exports.LogLevel=J.LogLevel;exports.sanitizeAsStringDict=Q;exports.pascalCaseFormatter=j;exports.getPrinterType=X;exports.isValidPrinter=Y;exports.isValidNetworkPrinter=Z;exports.isValidStarCloudPrinter=$;exports.isTerminalPrinter=ee;exports.isCloudPrintModeEnabled=re;exports.randomIntFromInterval=te;exports.decodeTableQRPayload=oe;exports.getCheckoutGroupedModifications=ie;exports.getCheckoutProductName=ue;exports.TranslationKey=e.TranslationKey;exports.getCheckoutOrderStatusTexts=e.default;exports.getCheckoutItemsMappedByTicketItemStatus=se;exports.isCheckoutOrderSummary=ne;exports.buildCheckoutRequestItem=ce;exports.getCheckoutGrandTotalAmount=ae;exports.getCheckoutRequestItemFromCheckoutItem=le;exports.isCheckoutItemsAreEqual=de;exports.checkoutHasWallet=ge;exports.getWalletMetaFromCheckout=qe;exports.isPreOrderServiceTime=_e;exports.isPreOrderCheckout=ke;exports.isUpdatingCheckoutAllowed=Oe;exports.isCheckoutAlreadyPaidStatus=me;exports.CheckoutPaymentErrorTranslationKey=r.CheckoutPaymentErrorTranslationKey;exports.getCheckoutPaymentErrorTranslationTexts=r.default;exports.isDeletingCheckoutAllowed=he;exports.getFormattedCurrency=Ce;exports.isDetailedProductOutOfStock=Pe;exports.isDetailedProductVariantOutOfStocks=pe;exports.isMenuTreeProductOutOfStock=Se;exports.isDetailedProductUpSellsOutOfStock=Te;exports.isUpSellProductOutOfStock=Fe;exports.isDetailedProductOutletStockOutOfStock=fe;exports.getDetailedProductVariantStock=ye;exports.createUseSignalRHook=Ae;exports.SignalR=Ie;exports.createCodedError=ve;exports.isCodedError=Ee;exports.isNetworkError=Re;exports.isLockedError=De;exports.isNotFoundError=be;exports.isAPIError=Ne;exports.isSerializedAPIError=Ve;exports.isSerializedCodedError=Me;exports.serializeError=xe;exports.getErrorCode=He;exports.isHangfireResponse=Le;exports.createHangfirePoller=We.default;exports.createMakeHangfireRequest=we;exports.extractProductsFromMenuTree=Be;exports.calculateIngredientsCost=Ue;exports.calculateAddonGroupsCost=Ge;exports.getAddonGroupInfoBySettings=ze.default;
|
package/index.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import { default as b } from "./shared/generateId.mjs";
|
|
|
3
3
|
import { default as H } from "./shared/wait.mjs";
|
|
4
4
|
import { default as M } from "./outlet/getListOutletOpeningHoursTable.mjs";
|
|
5
5
|
import { default as q } from "./outlet/getOutletTagInformation.mjs";
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
6
|
+
import { default as B } from "./outlet/getOutletAvailabilityInfo.mjs";
|
|
7
|
+
import { default as U } from "./outlet/getOutletOfflineOrderFormats.mjs";
|
|
8
8
|
import { default as K } from "./outlet/getOutletAvailableOrderFormats.mjs";
|
|
9
9
|
import { default as Q } from "./outlet/getOutletFormattedDistance.mjs";
|
|
10
10
|
import { default as X } from "./outlet/isOutletAcceptingPreOrders.mjs";
|
|
@@ -30,8 +30,8 @@ import { default as be } from "./api/getEndpointWithVersion.mjs";
|
|
|
30
30
|
import { default as He } from "./api/generateBackoffWithEqualJitter.mjs";
|
|
31
31
|
import { default as Me } from "./api/isAcceptedResponse.mjs";
|
|
32
32
|
import { default as qe } from "./api/isNoContentResponse.mjs";
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
33
|
+
import { default as Be } from "./string/slugify.mjs";
|
|
34
|
+
import { default as Ue } from "./string/truncate.mjs";
|
|
35
35
|
import { default as Ke } from "./string/getRandomAlphaNumericCode.mjs";
|
|
36
36
|
import { default as Qe } from "./color/lighten.mjs";
|
|
37
37
|
import { default as Xe } from "./color/brighten.mjs";
|
|
@@ -56,8 +56,8 @@ import { default as Dt } from "./number/randomIntFromInterval.mjs";
|
|
|
56
56
|
import { default as bt } from "./tables/decodeTableQRPayload.mjs";
|
|
57
57
|
import { default as Ht } from "./checkout/getCheckoutItemModifications.mjs";
|
|
58
58
|
import { default as Mt } from "./checkout/getCheckoutProductName.mjs";
|
|
59
|
-
import { TranslationKey as qt, default as
|
|
60
|
-
import { default as
|
|
59
|
+
import { TranslationKey as qt, default as wt } from "./checkout/getCheckoutOrderStatusTexts.mjs";
|
|
60
|
+
import { default as Gt } from "./checkout/getCheckoutItemsMappedByTicketItemStatus.mjs";
|
|
61
61
|
import { default as zt } from "./checkout/isCheckoutOrderSummary.mjs";
|
|
62
62
|
import { default as Jt } from "./checkout/buildCheckoutRequestItem.mjs";
|
|
63
63
|
import { default as jt } from "./checkout/getCheckoutGrandTotalAmount.mjs";
|
|
@@ -70,33 +70,34 @@ import { default as sr } from "./checkout/isPreOrderCheckout.mjs";
|
|
|
70
70
|
import { default as dr } from "./checkout/isUpdatingCheckoutAllowed.mjs";
|
|
71
71
|
import { default as mr } from "./checkout/isCheckoutAlreadyPaidStatus.mjs";
|
|
72
72
|
import { CheckoutPaymentErrorTranslationKey as pr, default as xr } from "./checkout/getCheckoutPaymentErrorTranslationTexts.mjs";
|
|
73
|
-
import { default as cr } from "./
|
|
74
|
-
import { default as Or } from "./
|
|
75
|
-
import { default as Cr } from "./inventory/
|
|
76
|
-
import { default as Sr } from "./inventory/
|
|
77
|
-
import { default as hr } from "./inventory/
|
|
78
|
-
import { default as Ar } from "./inventory/
|
|
79
|
-
import { default as yr } from "./inventory/
|
|
80
|
-
import { default as Rr } from "./inventory/
|
|
81
|
-
import { default as Dr } from "./
|
|
82
|
-
import { default as br } from "./signalr/
|
|
83
|
-
import { default as Hr } from "./
|
|
84
|
-
import { default as Mr } from "./error/
|
|
85
|
-
import { default as qr } from "./error/
|
|
86
|
-
import { default as
|
|
87
|
-
import { default as
|
|
88
|
-
import { default as Kr } from "./error/
|
|
89
|
-
import { default as Qr } from "./error/
|
|
90
|
-
import { default as Xr } from "./error/
|
|
91
|
-
import { default as Zr } from "./error/
|
|
92
|
-
import { default as $r } from "./error/
|
|
93
|
-
import { default as to } from "./
|
|
94
|
-
import { default as oo } from "./hangfire/
|
|
95
|
-
import { default as fo } from "./hangfire/
|
|
96
|
-
import { default as uo } from "./
|
|
97
|
-
import { default as mo } from "./product/
|
|
98
|
-
import { default as po } from "./product/
|
|
99
|
-
import { default as no } from "./product/
|
|
73
|
+
import { default as cr } from "./checkout/isDeletingCheckoutAllowed.mjs";
|
|
74
|
+
import { default as Or } from "./currency/getFormattedCurrency.mjs";
|
|
75
|
+
import { default as Cr } from "./inventory/isDetailedProductOutOfStock.mjs";
|
|
76
|
+
import { default as Sr } from "./inventory/isDetailedProductVariantOutOfStocks.mjs";
|
|
77
|
+
import { default as hr } from "./inventory/isMenuTreeProductOutOfStock.mjs";
|
|
78
|
+
import { default as Ar } from "./inventory/isDetailedProductUpSellsOutOfStock.mjs";
|
|
79
|
+
import { default as yr } from "./inventory/isUpSellProductOutStock.mjs";
|
|
80
|
+
import { default as Rr } from "./inventory/isDetailedProductOutletStockOutOfStock.mjs";
|
|
81
|
+
import { default as Dr } from "./inventory/getDetailedProductVariantStock.mjs";
|
|
82
|
+
import { default as br } from "./signalr/createUseSignalRHook.mjs";
|
|
83
|
+
import { default as Hr } from "./signalr/SignalR.mjs";
|
|
84
|
+
import { default as Mr } from "./error/createCodedError.mjs";
|
|
85
|
+
import { default as qr } from "./error/isCodedError.mjs";
|
|
86
|
+
import { default as Br } from "./error/isNetworkError.mjs";
|
|
87
|
+
import { default as Ur } from "./error/isLockedError.mjs";
|
|
88
|
+
import { default as Kr } from "./error/isNotFoundError.mjs";
|
|
89
|
+
import { default as Qr } from "./error/isAPIError.mjs";
|
|
90
|
+
import { default as Xr } from "./error/isSerializedAPIError.mjs";
|
|
91
|
+
import { default as Zr } from "./error/isSerializedCodedError.mjs";
|
|
92
|
+
import { default as $r } from "./error/serializeError.mjs";
|
|
93
|
+
import { default as to } from "./error/getErrorCode.mjs";
|
|
94
|
+
import { default as oo } from "./hangfire/isHangfireResponse.mjs";
|
|
95
|
+
import { default as fo } from "./hangfire/createHangfirePoller.mjs";
|
|
96
|
+
import { default as uo } from "./hangfire/createMakeHangfireRequest.mjs";
|
|
97
|
+
import { default as mo } from "./product/extractProductsFromMenuTree.mjs";
|
|
98
|
+
import { default as po } from "./product/calculateIngredientsCost.mjs";
|
|
99
|
+
import { default as no } from "./product/calculateAddonGroupCost.mjs";
|
|
100
|
+
import { default as go } from "./product/getAddonGroupInfoBySettings.mjs";
|
|
100
101
|
import "moment";
|
|
101
102
|
import "@ancon/wildcat-types";
|
|
102
103
|
import "./outlet/constants.mjs";
|
|
@@ -130,41 +131,41 @@ export {
|
|
|
130
131
|
pr as CheckoutPaymentErrorTranslationKey,
|
|
131
132
|
xt as LogLevel,
|
|
132
133
|
it as Logger,
|
|
133
|
-
|
|
134
|
+
Hr as SignalR,
|
|
134
135
|
qt as TranslationKey,
|
|
135
136
|
Xe as brighten,
|
|
136
137
|
Jt as buildCheckoutRequestItem,
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
no as calculateAddonGroupsCost,
|
|
139
|
+
po as calculateIngredientsCost,
|
|
139
140
|
er as checkoutHasWallet,
|
|
140
141
|
Re as cleanVersionString,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
Mr as createCodedError,
|
|
143
|
+
fo as createHangfirePoller,
|
|
144
|
+
uo as createMakeHangfireRequest,
|
|
145
|
+
br as createUseSignalRHook,
|
|
145
146
|
Ze as darken,
|
|
146
147
|
bt as decodeTableQRPayload,
|
|
147
|
-
|
|
148
|
+
mo as extractProductsFromMenuTree,
|
|
148
149
|
He as generateBackoffWithEqualJitter,
|
|
149
150
|
b as generateId,
|
|
150
|
-
|
|
151
|
+
go as getAddonGroupInfoBySettings,
|
|
151
152
|
jt as getCheckoutGrandTotalAmount,
|
|
152
153
|
Ht as getCheckoutGroupedModifications,
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
Gt as getCheckoutItemsMappedByTicketItemStatus,
|
|
155
|
+
wt as getCheckoutOrderStatusTexts,
|
|
155
156
|
xr as getCheckoutPaymentErrorTranslationTexts,
|
|
156
157
|
Mt as getCheckoutProductName,
|
|
157
158
|
Yt as getCheckoutRequestItemFromCheckoutItem,
|
|
158
159
|
ft as getCustomerAddressFromGeocoderResult,
|
|
159
|
-
|
|
160
|
+
Dr as getDetailedProductVariantStock,
|
|
160
161
|
be as getEndpointWithVersion,
|
|
161
|
-
|
|
162
|
-
|
|
162
|
+
to as getErrorCode,
|
|
163
|
+
Or as getFormattedCurrency,
|
|
163
164
|
ut as getFormattedPhoneNumber,
|
|
164
165
|
ot as getFullAddressString,
|
|
165
166
|
tt as getFullName,
|
|
166
167
|
M as getListOutletOpeningHoursTable,
|
|
167
|
-
|
|
168
|
+
B as getOutletAvailabilityInfo,
|
|
168
169
|
K as getOutletAvailableOrderFormats,
|
|
169
170
|
he as getOutletCurrentClosingTimeText,
|
|
170
171
|
Z as getOutletDeliveryFee,
|
|
@@ -172,7 +173,7 @@ export {
|
|
|
172
173
|
Q as getOutletFormattedDistance,
|
|
173
174
|
Se as getOutletNextOpeningTimeText,
|
|
174
175
|
Ae as getOutletNextReadyToOrderTime,
|
|
175
|
-
|
|
176
|
+
U as getOutletOfflineOrderFormats,
|
|
176
177
|
te as getOutletOrderFormats,
|
|
177
178
|
Oe as getOutletOrderPreparationTime,
|
|
178
179
|
ce as getOutletPickerTimesForWeek,
|
|
@@ -188,31 +189,32 @@ export {
|
|
|
188
189
|
Ce as getStructuredOutletAddress,
|
|
189
190
|
De as getUrlAndParams,
|
|
190
191
|
rr as getWalletMetaFromCheckout,
|
|
191
|
-
|
|
192
|
+
Qr as isAPIError,
|
|
192
193
|
Me as isAcceptedResponse,
|
|
193
194
|
mr as isCheckoutAlreadyPaidStatus,
|
|
194
195
|
_t as isCheckoutItemsAreEqual,
|
|
195
196
|
zt as isCheckoutOrderSummary,
|
|
196
197
|
Rt as isCloudPrintModeEnabled,
|
|
197
|
-
|
|
198
|
+
qr as isCodedError,
|
|
198
199
|
$e as isDarkBackground,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
200
|
+
cr as isDeletingCheckoutAllowed,
|
|
201
|
+
Cr as isDetailedProductOutOfStock,
|
|
202
|
+
Rr as isDetailedProductOutletStockOutOfStock,
|
|
203
|
+
Ar as isDetailedProductUpSellsOutOfStock,
|
|
204
|
+
Sr as isDetailedProductVariantOutOfStocks,
|
|
205
|
+
oo as isHangfireResponse,
|
|
206
|
+
Ur as isLockedError,
|
|
207
|
+
hr as isMenuTreeProductOutOfStock,
|
|
208
|
+
Br as isNetworkError,
|
|
207
209
|
qe as isNoContentResponse,
|
|
208
|
-
|
|
210
|
+
Kr as isNotFoundError,
|
|
209
211
|
X as isOutletAcceptingPreOrders,
|
|
210
212
|
sr as isPreOrderCheckout,
|
|
211
213
|
ar as isPreOrderServiceTime,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
+
Xr as isSerializedAPIError,
|
|
215
|
+
Zr as isSerializedCodedError,
|
|
214
216
|
yt as isTerminalPrinter,
|
|
215
|
-
|
|
217
|
+
yr as isUpSellProductOutOfStock,
|
|
216
218
|
dr as isUpdatingCheckoutAllowed,
|
|
217
219
|
ht as isValidNetworkPrinter,
|
|
218
220
|
St as isValidPrinter,
|
|
@@ -223,9 +225,9 @@ export {
|
|
|
223
225
|
Ot as pascalCaseFormatter,
|
|
224
226
|
Dt as randomIntFromInterval,
|
|
225
227
|
ct as sanitizeAsStringDict,
|
|
226
|
-
|
|
228
|
+
$r as serializeError,
|
|
227
229
|
oe as serviceDateTimesFromOpeningHours,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
+
Be as slugify,
|
|
231
|
+
Ue as truncate,
|
|
230
232
|
H as wait
|
|
231
233
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ancon/wildcat-utils",
|
|
3
|
-
"version": "1.38.
|
|
3
|
+
"version": "1.38.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -131,6 +131,11 @@
|
|
|
131
131
|
"require": "./checkout/isCheckoutOrderSummary.js",
|
|
132
132
|
"types": "./checkout/isCheckoutOrderSummary.d.ts"
|
|
133
133
|
},
|
|
134
|
+
"./checkout/isDeletingCheckoutAllowed": {
|
|
135
|
+
"import": "./checkout/isDeletingCheckoutAllowed.mjs",
|
|
136
|
+
"require": "./checkout/isDeletingCheckoutAllowed.js",
|
|
137
|
+
"types": "./checkout/isDeletingCheckoutAllowed.d.ts"
|
|
138
|
+
},
|
|
134
139
|
"./checkout/isPreOrderCheckout": {
|
|
135
140
|
"import": "./checkout/isPreOrderCheckout.mjs",
|
|
136
141
|
"require": "./checkout/isPreOrderCheckout.js",
|