@managesome/eposmatic-toolkit 0.2.316 → 0.2.318
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.
|
@@ -69,7 +69,7 @@ export declare const SUBSCRIPTION_STATUS_COLOR: {
|
|
|
69
69
|
};
|
|
70
70
|
export declare const SPECIALS_CATEGORY_ID = "680437e050ad8ba788150b32";
|
|
71
71
|
export declare const SPECIALS_CATEGORY_NAME = "Specials";
|
|
72
|
-
export declare const
|
|
73
|
-
export declare const
|
|
74
|
-
export declare const
|
|
72
|
+
export declare const WALLET_CASHBACK_LOYALTY_DISCOUNT_ID = "wallet_cashback_redemption";
|
|
73
|
+
export declare const WALLET_CASHBACK_LOYALTY_DISCOUNT_NAME = "Wallet Cashback";
|
|
74
|
+
export declare const WALLET_CASHBACK_LOYALTY_REFERENCE = "WALLET_CASHBACK";
|
|
75
75
|
export {};
|
package/lib/constants/COMMON.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.WALLET_CASHBACK_LOYALTY_REFERENCE = exports.WALLET_CASHBACK_LOYALTY_DISCOUNT_NAME = exports.WALLET_CASHBACK_LOYALTY_DISCOUNT_ID = exports.SPECIALS_CATEGORY_NAME = exports.SPECIALS_CATEGORY_ID = exports.SUBSCRIPTION_STATUS_COLOR = exports.AUTO_DELIVERY_CHARGES_PLATFORMS = exports.TAX_INVOICE_PROVIDER_CHARGES_MAP = exports.PAYMENT_CHARGES_MAP = exports.NOTIFICATION_CHARGES_MAP = exports.WHATSAPP_CHARGES_MAP = exports.SMS_CHARGES_MAP = exports.SMS_UNIT_LENGTH = exports.PROVIDER_OPERATIONAL_COUNTRIES = exports.ALL_PLAFORMS_OBJ = exports.LOW_VALUE_CURRENCY_COUNTRIES = void 0;
|
|
4
4
|
const ENUMS_1 = require("./ENUMS");
|
|
5
5
|
/**
|
|
6
6
|
* Countries with low-value currencies that should have:
|
|
@@ -342,6 +342,6 @@ exports.SUBSCRIPTION_STATUS_COLOR = {
|
|
|
342
342
|
};
|
|
343
343
|
exports.SPECIALS_CATEGORY_ID = '680437e050ad8ba788150b32';
|
|
344
344
|
exports.SPECIALS_CATEGORY_NAME = 'Specials';
|
|
345
|
-
exports.
|
|
346
|
-
exports.
|
|
347
|
-
exports.
|
|
345
|
+
exports.WALLET_CASHBACK_LOYALTY_DISCOUNT_ID = 'wallet_cashback_redemption';
|
|
346
|
+
exports.WALLET_CASHBACK_LOYALTY_DISCOUNT_NAME = 'Wallet Cashback';
|
|
347
|
+
exports.WALLET_CASHBACK_LOYALTY_REFERENCE = 'WALLET_CASHBACK';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ORDER_STATUS_ENUM, PLATFORMS_ENUM, SORT_TYPE_ENUM } from '../../constants';
|
|
2
|
-
import { ICourse, IDiscountDetails, IGeneralItem, IItem, IModifier, IOrder, IOrderCategory, IOrderCourse, IOrderDeliveryDetails, IOrderItem, IOrderIteration } from '../../schemas';
|
|
1
|
+
import { GIFT_CARD_REWARD_TYPE_ENUM, ORDER_STATUS_ENUM, PLATFORMS_ENUM, SORT_TYPE_ENUM } from '../../constants';
|
|
2
|
+
import { ICourse, IDiscountDetails, IGeneralItem, IItem, IModifier, IOffer, IOrder, IOrderCategory, IOrderCourse, IOrderDeliveryDetails, IOrderItem, IOrderIteration } from '../../schemas';
|
|
3
3
|
import { ICartListnerSettings } from '../types';
|
|
4
4
|
import { ICartItemsObj } from '../types/cart-actions';
|
|
5
5
|
interface IGetItemQuantityChangeResultsParams {
|
|
@@ -38,13 +38,21 @@ interface ICalculateGstForItem {
|
|
|
38
38
|
apply_service_fee_on_original_price: boolean | undefined;
|
|
39
39
|
}
|
|
40
40
|
export declare function calculateGstForItem({ subtotal, totalOrderDiscount, applyGSTOnOriginalPrice, is_gst_inclusive, gst, totalItemsDiscount, grossAmount, netAmount, payablePrice, originalItemsPrice, surcharge, is_surcharge_taxable, is_surcharge_percentage, service_fee, is_service_fee_taxable, is_service_fee_percentage, apply_service_fee_on_original_price, }: ICalculateGstForItem): number;
|
|
41
|
-
export
|
|
41
|
+
export interface ICartOfferSyncContext {
|
|
42
|
+
unlockedOffersApplicableTimes: Record<string, number>;
|
|
43
|
+
offers: IOffer[];
|
|
44
|
+
}
|
|
45
|
+
export declare function calculateCartOrderInfoAndSyncData<T extends IOrder | Partial<IOrder>>(data: T, courses?: ICourse[], listnerSettings?: ICartListnerSettings, calculateItemMetadata?: boolean, syncContext?: ICartOfferSyncContext): T;
|
|
42
46
|
export interface ISetAddItemToCartActionPayload {
|
|
43
47
|
name: string;
|
|
44
48
|
category_id: string;
|
|
45
49
|
item: IOrderItem;
|
|
46
50
|
chosen_course_id: string | null;
|
|
47
51
|
replace_id?: string;
|
|
52
|
+
walletGiftCardClaim?: {
|
|
53
|
+
giftCardId: string;
|
|
54
|
+
mysteryGiftType?: GIFT_CARD_REWARD_TYPE_ENUM | null;
|
|
55
|
+
};
|
|
48
56
|
}
|
|
49
57
|
export declare const getOrderItemComaparableData: (item: IOrderItem) => Partial<IOrderItem>;
|
|
50
58
|
export declare function getAddItemToCartData(data: Partial<IOrder>, payload: ISetAddItemToCartActionPayload, courses: ICourse[], listnerSettings: ICartListnerSettings): Partial<IOrder>;
|
|
@@ -152,6 +160,7 @@ export interface IGetCartItemsObjPayload {
|
|
|
152
160
|
export declare function getCartItemsObj({ currentIterationCategories, currentDineinCourses, previousIterationCategories, previousDineinCourses, mappedItems, shouldSortItemsViaId, platform, isAnEdit, sortType, }: IGetCartItemsObjPayload): ICartItemsObj;
|
|
153
161
|
export declare function getRemoveOfferFromCartData(data: Partial<IOrder>, offer_id: string, courses: ICourse[], listnerSettings: ICartListnerSettings): Partial<IOrder>;
|
|
154
162
|
export declare function getRemoveAllOffersFromCartData(data: Partial<IOrder>, courses: ICourse[], listnerSettings: ICartListnerSettings, offerIds: string[] | undefined): Partial<IOrder>;
|
|
163
|
+
export declare function getClearVoucherCodeAndOffersFromCartData(data: Partial<IOrder>, courses: ICourse[], listnerSettings: ICartListnerSettings, offerIds: string[] | undefined): Partial<IOrder>;
|
|
155
164
|
/**
|
|
156
165
|
* Calculate the eligible subtotal by excluding items/categories in excluded_refs
|
|
157
166
|
*/
|