@managesome/eposmatic-toolkit 0.2.271 → 0.2.273

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.
@@ -410,6 +410,12 @@ export declare enum OFFER_REWARD_TYPE_ENUM {
410
410
  VOUCHER = "VOUCHER"
411
411
  }
412
412
  export declare const ALL_OFFER_REWARD_TYPES: OFFER_REWARD_TYPE_ENUM[];
413
+ export declare enum OFFER_FINGERPRINT_TYPE_ENUM {
414
+ OFFER = "OFFER",
415
+ VOUCHER = "VOUCHER",
416
+ GIFT_CARD = "GIFT_CARD"
417
+ }
418
+ export declare const ALL_OFFER_FINGERPRINT_TYPES: OFFER_FINGERPRINT_TYPE_ENUM[];
413
419
  export declare enum GIFT_CARD_REWARD_TYPE_ENUM {
414
420
  DISCOUNT = "DISCOUNT",
415
421
  DISCOUNT_ITEMS = "DISCOUNT_ITEMS",
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ALL_CATEGORY_DISPLAY_TYPES = exports.CATEGORY_DISPLAY_TYPE_ENUM = exports.ALL_PAYMENT_METHOD_EXPECTED = exports.PAYMENT_METHOD_EXPECTED_ENUM = exports.ALL_WEB_UNPAID_PAYMENT_TYPES = exports.WEB_UNPAID_PAYMENT_TYPE_ENUM = exports.ALL_COUNTRY_FLAG_TYPES = exports.COUNTRY_FLAG_ENUM = exports.ALL_COUNTRY_NAME_TYPES = exports.COUNTRY_NAME_ENUM = exports.ALL_COUNTRY_ALPHA_3_TYPES = exports.COUNTRY_ALPHA_3_ENUM = exports.ALL_COUNTRY_ALPHA_2_TYPES = exports.COUNTRY_ALPHA_2_ENUM = exports.ALL_COUNTRY_CODES = exports.COUNTRY_CODE_ENUM = exports.ALL_CURRENCY_SYMBOLS = exports.CURRENCY_SYMBOL_ENUM = exports.ALL_CURRENCY_NAMES = exports.CURRENCY_NAME_ENUM = exports.ALL_CURRENCY_CODES = exports.CURRENCY_CODE_ENUM = exports.ALL_DAY_INDEX = exports.DAY_INDEX_ENUM = exports.ALL_INVENTORY_UNIT_TYPES = exports.INVENTORY_ITEM_UNIT_ENUM = exports.ALL_DIETARY_PREFERENCES = exports.ITEM_DIETARY_PREFERENCE_ENUM = exports.ALL_CAVEATS = exports.ITEM_CAVEATS_ENUM = exports.ALL_PAYMENT_STATUS = exports.PAYMENT_STATUS_ENUM = exports.ALL_ORDER_STATUS_NAMES = exports.ORDER_STATUS_ENUM = exports.ALL_PAYMENT_TYPE_NAMES = exports.PaymentTypeDescriptions = exports.PAYMENT_TYPE_ENUM = exports.ALL_API_STATUS_NAMES = exports.API_STATUS_ENUM = exports.ALL_INTEGRATIONS = exports.INTEGRATIONS_ENUM = exports.PLATFORM_NAMES = exports.PLATFORMS_BY_ORDER_FROM = exports.PLATFORMS_BY_ORDER_TYPE = exports.ALL_PLATFORMS = exports.PLATFORMS_ENUM = exports.ALL_ORDER_TYPE_NAMES = exports.ORDER_TYPE_ENUM = exports.ALL_ORDER_FROM_NAMES = exports.ORDER_FROM_ENUM = void 0;
4
- exports.ORDER_ITEM_TYPE_ENUM = exports.ALL_PLATFORM_PROVIDER_IDS = exports.PLATFORM_PROVIDER_IDS_ENUM = exports.ALL_MARKETING_RECEIPIENT_TYPES = exports.MARKETING_RECEIPIENT_ENUM = exports.ALL_MARKETING_TYPES = exports.MARKETING_TYPE_ENUM = exports.ALL_TOKEN_TYPES = exports.TOKEN_TYPE_ENUM = exports.ALL_EMAIL_PROCESSING_PROVIDERS = exports.EMAIL_PROCESSING_PROVIDERS_ENUM = exports.ALL_SMS_PROCESSING_PROVIDERS = exports.SMS_PROCESSING_PROVIDERS_ENUM = exports.ALL_TERMINAL_TYPES = exports.TERMINAL_TYPE_ENUM = exports.ALL_TERMINAL_PROCESSING_PROVIDERS = exports.TERMINAL_PROCESSING_PROVIDERS_ENUM = exports.TRANSACTION_TYPE_ENUM = exports.ALL_CARD_PROCESSING_PROVIDERS = exports.CARD_PROCESSING_PROVIDERS_ENUM = exports.ALL_PAYMENT_PROVIDERS = exports.PAYMENT_PROVIDERS_ENUM = exports.ALL_SUPPORT_SPECIALIST_PERMISSIONS = exports.ALL_MODERATOR_PERMISSIONS = exports.ALL_USER_PERMISSIONS = exports.USER_PERMISSIONS_ENUM = exports.ALL_REWARDS_USAGE_REF_TYPES = exports.REWARDS_USAGE_REF_TYPE_ENUM = exports.ALL_PATHWAY_TO_UNLOCK_TYPE_ORDERS_SCOPES = exports.PATHWAY_TO_UNLOCK_TYPE_ORDERS_SCOPE_ENUM = exports.ALL_PATHWAY_TO_UNLOCK_TYPES = exports.PATHWAY_TO_UNLOCK_TYPE_ENUM = exports.ALL_MYSTERY_GIFT_POPUP_TYPES = exports.MYSTERY_GIFT_POPUP_TYPE_ENUM = exports.ALL_MYSTERY_GIFT_TYPES = exports.MYSTERY_GIFT_TYPE_ENUM = exports.ALL_GIFT_CARD_REWARD_TYPES = exports.GIFT_CARD_REWARD_TYPE_ENUM = exports.ALL_OFFER_REWARD_TYPES = exports.OFFER_REWARD_TYPE_ENUM = exports.ALL_USER_ROLES = exports.USER_ROLES_ENUM = exports.ALL_PLATFORM_TYPES = exports.PLATFORM_TYPE_ENUM = exports.ALL_ORDER_NUMBER_GROUPING_TYPES = exports.ORDER_NUMBER_GROUPING_TYPE_ENUM = exports.ALL_TRACK_ORDER_NUMBER_TYPES = exports.TRACK_ORDER_NUMBER_ENUM = exports.ALL_TABLE_TYPES = exports.TABLE_TYPE_ENUM = void 0;
5
- exports.ALL_ITEM_TRANSACTION_TYPES = exports.ITEM_TRANSACTION_TYPE_ENUM = exports.INVENTORY_OUTBOUND_TRANSACTIONS = exports.INVENTORY_INBOUND_TRANSACTIONS = exports.ALL_INVENTORY_TRANSACTION_CATEGORIES = exports.INVENTORY_TRANSACTION_CATEGORY_ENUM = exports.ALL_INVENTORY_TRANSACTION_TYPES = exports.INVENTORY_TRANSACTION_TYPE_ENUM = exports.ALL_GST_TYPES = exports.GST_TYPE_ENUM = exports.ALL_EXPENSE_REACCURING_TYPES = exports.EXPENSE_REACCURING_TYPE_ENUM = exports.PAYMENT_EXTENSION_ENUM = exports.ALL_PRINTER_INTERFACES = exports.PRINTER_INTERFACE_ENUM = exports.RECEIPT_WIDTHS = exports.ALL_NUM_OF_COLUMNS = exports.NUM_OF_COLUMNS_ENUM = exports.SPLIT_SYNC_SOURCE_ENUM = exports.ALL_SPLIT_BILL_TYPES = exports.SPLIT_BILL_TYPE_ENUM = exports.ALL_RIDER_FEE_TYPES = exports.RIDER_FEE_TYPE_ENUM = exports.ALL_DELIVERY_AREAS_SEARCH_TYPES = exports.DELIVERY_AREAS_SEARCH_TYPE_ENUM = exports.ALL_WEB_AUTH_TYPES = exports.WEB_AUTH_TYPE_ENUM = exports.KITCHEN_RECEIPT_TYPE_ENUM = exports.PRINTER_EVENT_TYPE_ENUM = exports.SORT_TYPE_ENUM = exports.BLACKLISTED_SMS_COUNTRY_CODES = exports.ALL_OTP_TYPES = exports.OTP_TYPE_ENUM = exports.ALL_TAX_INVOICE_PROVIDERS = exports.TAX_INVOICE_PROVIDER_ENUM = exports.ALL_RESERVATION_STATUS_TYPES = exports.RESERVATION_STATUS_ENUM = exports.TENANT_AMOUNT_DUE_TYPE_ENUM = exports.ALL_KITCHEN_DOCKET_FONT_TYPES = exports.KITCHEN_DOCKET_FONT_TYPE_ENUM = exports.ALL_SORT_ORDER_BY_TYPES = exports.SORT_ORDER_BY_ENUM = exports.RECEIPT_IMAGE_TYPE_ENUM = exports.ALL_RECEIPT_TYPES = exports.RECEIPT_TYPE_ENUM = exports.ALL_PRINTING_PREFERENCES = exports.PRINTING_PREFERENCE_ENUM = exports.ALL_PRINTER_BRAND_TYPES = exports.PRINTER_BRAND_TYPE_ENUM = exports.ALL_ORDER_ITEM_TYPES = void 0;
6
- exports.ALL_WAREHOUSE_CLIENT_TYPES = exports.WAREHOUSE_CLIENT_TYPE_ENUM = exports.ALL_ONLINE_ORDERING_DESIGN_TYPES = exports.ONLINE_ORDERING_DESIGN_TYPE_ENUM = exports.ALL_NOTIFICATION_PROVIDERS = exports.NOTIFICATION_PROVIDER_ENUM = exports.ALL_ORDER_COMPLETION_TYPES = exports.ORDER_COMPLETION_TYPE_ENUM = exports.ITEM_COMPARISON_FIELD_ENUM = exports.VOID_ITEM_STAFF_REPORT_ENUM = exports.ALL_DISCOUNT_APPLICABILITY_TYPES = exports.DISCOUNT_APPLICABILITY_ENUM = exports.ALL_DISCOUNT_TYPES = exports.DISCOUNT_TYPE_ENUM = exports.EMAIL_TEMPLATES_TYPE_ENUM = exports.ALL_ALERT_NOTIFICATIONS_TYPES = exports.ALERT_NOTIFICATIONS_TYPE_ENUM = exports.ALL_WALLET_TRANSACTION_STATUS = exports.WALLET_TRANSACTION_STATUS_ENUM = exports.ALL_WALLET_TRANSACTION_CATEGORIES = exports.WALLET_TRANSACTION_CATEGORY_ENUM = exports.ALL_WALLET_TRANSACTION_TYPES = exports.WALLET_TRANSACTION_TYPE_ENUM = exports.ALL_WAREHOUSE_SUPPORT_SPECIALIST_PERMISSIONS = exports.ALL_WAREHOUSE_MODERATOR_PERMISSIONS = exports.ALL_WAREHOUSE_USER_PERMISSIONS = exports.WAREHOUSE_USER_PERMISSIONS_ENUM = exports.ALL_WAREHOUSE_INVOICE_STATUS_NAMES = exports.WAREHOUSE_INVOICE_STATUS_ENUM = exports.ALL_PURCHASE_ORDER_STATUS_NAMES = exports.PURCHASE_ORDER_STATUS_ENUM = exports.ALL_DELIVERY_STATUS = exports.DELIVERY_STATUS_ENUM = exports.ALL_INVENTORY_ITEM_TYPES = exports.INVENTORY_ITEM_TYPE_ENUM = exports.ALL_RATING_TYPES = exports.RATING_TYPE_ENUM = exports.ALL_SUBSCRIPTION_STATUS = exports.SUBSCRIPTION_STATUS_ENUM = exports.ALL_VOID_WAREHOUSE_INVOICE_ITEM_TYPES = exports.VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM = exports.ALL_VOID_PURCHASE_ORDER_ITEM_TYPES = exports.VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM = exports.ALL_VOID_ORDER_ITEM_TYPES = exports.VOID_ORDER_ITEM_TYPE_ENUM = exports.COMPARISON_REPORT_TYPE_ENUM = exports.ALL_MULTI_TENANT_WEBSITE_TYPES = exports.MULTI_TENANT_WEBSITE_TYPE_ENUM = exports.ALL_TIME_RANGE_ENUMS = exports.TIME_RANGE_ENUM = void 0;
7
- exports.ALL_RECEIPT_QR_CODE_TYPES = exports.RECEIPT_QR_CODE_TYPE_ENUM = exports.ALL_INTERNAL_LEAD_STATUS = exports.INTERNAL_LEAD_STATUS_ENUM = exports.ALL_INTERNAL_LEAD_SOURCES = exports.INTERNAL_LEAD_SOURCE_ENUM = exports.ALL_CASH_DRAWER_STATUS = exports.CASH_DRAWER_STATUS_ENUM = exports.ALL_CASH_IN_HAND_TRANSACTION_CATEGORIES = exports.CASH_IN_HAND_TRANSACTION_CATEGORY_ENUM = exports.ALL_CASH_IN_HAND_TRANSACTION_TYPES = exports.CASH_IN_HAND_TRANSACTION_TYPE_ENUM = exports.ALL_CASH_IN_OUT_TYPES = exports.CASH_IN_OUT_TYPE_ENUM = exports.ALL_POS_SHIFT_STATUS = exports.POS_SHIFT_STATUS_ENUM = exports.ALL_POS_DAY_STATUS = exports.POS_DAY_STATUS_ENUM = exports.ALL_MODIFIER_OPTION_REF_TYPES = exports.MODIFIER_OPTION_REF_TYPE_ENUM = void 0;
4
+ exports.PLATFORM_PROVIDER_IDS_ENUM = exports.ALL_MARKETING_RECEIPIENT_TYPES = exports.MARKETING_RECEIPIENT_ENUM = exports.ALL_MARKETING_TYPES = exports.MARKETING_TYPE_ENUM = exports.ALL_TOKEN_TYPES = exports.TOKEN_TYPE_ENUM = exports.ALL_EMAIL_PROCESSING_PROVIDERS = exports.EMAIL_PROCESSING_PROVIDERS_ENUM = exports.ALL_SMS_PROCESSING_PROVIDERS = exports.SMS_PROCESSING_PROVIDERS_ENUM = exports.ALL_TERMINAL_TYPES = exports.TERMINAL_TYPE_ENUM = exports.ALL_TERMINAL_PROCESSING_PROVIDERS = exports.TERMINAL_PROCESSING_PROVIDERS_ENUM = exports.TRANSACTION_TYPE_ENUM = exports.ALL_CARD_PROCESSING_PROVIDERS = exports.CARD_PROCESSING_PROVIDERS_ENUM = exports.ALL_PAYMENT_PROVIDERS = exports.PAYMENT_PROVIDERS_ENUM = exports.ALL_SUPPORT_SPECIALIST_PERMISSIONS = exports.ALL_MODERATOR_PERMISSIONS = exports.ALL_USER_PERMISSIONS = exports.USER_PERMISSIONS_ENUM = exports.ALL_REWARDS_USAGE_REF_TYPES = exports.REWARDS_USAGE_REF_TYPE_ENUM = exports.ALL_PATHWAY_TO_UNLOCK_TYPE_ORDERS_SCOPES = exports.PATHWAY_TO_UNLOCK_TYPE_ORDERS_SCOPE_ENUM = exports.ALL_PATHWAY_TO_UNLOCK_TYPES = exports.PATHWAY_TO_UNLOCK_TYPE_ENUM = exports.ALL_MYSTERY_GIFT_POPUP_TYPES = exports.MYSTERY_GIFT_POPUP_TYPE_ENUM = exports.ALL_MYSTERY_GIFT_TYPES = exports.MYSTERY_GIFT_TYPE_ENUM = exports.ALL_GIFT_CARD_REWARD_TYPES = exports.GIFT_CARD_REWARD_TYPE_ENUM = exports.ALL_OFFER_FINGERPRINT_TYPES = exports.OFFER_FINGERPRINT_TYPE_ENUM = exports.ALL_OFFER_REWARD_TYPES = exports.OFFER_REWARD_TYPE_ENUM = exports.ALL_USER_ROLES = exports.USER_ROLES_ENUM = exports.ALL_PLATFORM_TYPES = exports.PLATFORM_TYPE_ENUM = exports.ALL_ORDER_NUMBER_GROUPING_TYPES = exports.ORDER_NUMBER_GROUPING_TYPE_ENUM = exports.ALL_TRACK_ORDER_NUMBER_TYPES = exports.TRACK_ORDER_NUMBER_ENUM = exports.ALL_TABLE_TYPES = exports.TABLE_TYPE_ENUM = void 0;
5
+ exports.INVENTORY_OUTBOUND_TRANSACTIONS = exports.INVENTORY_INBOUND_TRANSACTIONS = exports.ALL_INVENTORY_TRANSACTION_CATEGORIES = exports.INVENTORY_TRANSACTION_CATEGORY_ENUM = exports.ALL_INVENTORY_TRANSACTION_TYPES = exports.INVENTORY_TRANSACTION_TYPE_ENUM = exports.ALL_GST_TYPES = exports.GST_TYPE_ENUM = exports.ALL_EXPENSE_REACCURING_TYPES = exports.EXPENSE_REACCURING_TYPE_ENUM = exports.PAYMENT_EXTENSION_ENUM = exports.ALL_PRINTER_INTERFACES = exports.PRINTER_INTERFACE_ENUM = exports.RECEIPT_WIDTHS = exports.ALL_NUM_OF_COLUMNS = exports.NUM_OF_COLUMNS_ENUM = exports.SPLIT_SYNC_SOURCE_ENUM = exports.ALL_SPLIT_BILL_TYPES = exports.SPLIT_BILL_TYPE_ENUM = exports.ALL_RIDER_FEE_TYPES = exports.RIDER_FEE_TYPE_ENUM = exports.ALL_DELIVERY_AREAS_SEARCH_TYPES = exports.DELIVERY_AREAS_SEARCH_TYPE_ENUM = exports.ALL_WEB_AUTH_TYPES = exports.WEB_AUTH_TYPE_ENUM = exports.KITCHEN_RECEIPT_TYPE_ENUM = exports.PRINTER_EVENT_TYPE_ENUM = exports.SORT_TYPE_ENUM = exports.BLACKLISTED_SMS_COUNTRY_CODES = exports.ALL_OTP_TYPES = exports.OTP_TYPE_ENUM = exports.ALL_TAX_INVOICE_PROVIDERS = exports.TAX_INVOICE_PROVIDER_ENUM = exports.ALL_RESERVATION_STATUS_TYPES = exports.RESERVATION_STATUS_ENUM = exports.TENANT_AMOUNT_DUE_TYPE_ENUM = exports.ALL_KITCHEN_DOCKET_FONT_TYPES = exports.KITCHEN_DOCKET_FONT_TYPE_ENUM = exports.ALL_SORT_ORDER_BY_TYPES = exports.SORT_ORDER_BY_ENUM = exports.RECEIPT_IMAGE_TYPE_ENUM = exports.ALL_RECEIPT_TYPES = exports.RECEIPT_TYPE_ENUM = exports.ALL_PRINTING_PREFERENCES = exports.PRINTING_PREFERENCE_ENUM = exports.ALL_PRINTER_BRAND_TYPES = exports.PRINTER_BRAND_TYPE_ENUM = exports.ALL_ORDER_ITEM_TYPES = exports.ORDER_ITEM_TYPE_ENUM = exports.ALL_PLATFORM_PROVIDER_IDS = void 0;
6
+ exports.ALL_ONLINE_ORDERING_DESIGN_TYPES = exports.ONLINE_ORDERING_DESIGN_TYPE_ENUM = exports.ALL_NOTIFICATION_PROVIDERS = exports.NOTIFICATION_PROVIDER_ENUM = exports.ALL_ORDER_COMPLETION_TYPES = exports.ORDER_COMPLETION_TYPE_ENUM = exports.ITEM_COMPARISON_FIELD_ENUM = exports.VOID_ITEM_STAFF_REPORT_ENUM = exports.ALL_DISCOUNT_APPLICABILITY_TYPES = exports.DISCOUNT_APPLICABILITY_ENUM = exports.ALL_DISCOUNT_TYPES = exports.DISCOUNT_TYPE_ENUM = exports.EMAIL_TEMPLATES_TYPE_ENUM = exports.ALL_ALERT_NOTIFICATIONS_TYPES = exports.ALERT_NOTIFICATIONS_TYPE_ENUM = exports.ALL_WALLET_TRANSACTION_STATUS = exports.WALLET_TRANSACTION_STATUS_ENUM = exports.ALL_WALLET_TRANSACTION_CATEGORIES = exports.WALLET_TRANSACTION_CATEGORY_ENUM = exports.ALL_WALLET_TRANSACTION_TYPES = exports.WALLET_TRANSACTION_TYPE_ENUM = exports.ALL_WAREHOUSE_SUPPORT_SPECIALIST_PERMISSIONS = exports.ALL_WAREHOUSE_MODERATOR_PERMISSIONS = exports.ALL_WAREHOUSE_USER_PERMISSIONS = exports.WAREHOUSE_USER_PERMISSIONS_ENUM = exports.ALL_WAREHOUSE_INVOICE_STATUS_NAMES = exports.WAREHOUSE_INVOICE_STATUS_ENUM = exports.ALL_PURCHASE_ORDER_STATUS_NAMES = exports.PURCHASE_ORDER_STATUS_ENUM = exports.ALL_DELIVERY_STATUS = exports.DELIVERY_STATUS_ENUM = exports.ALL_INVENTORY_ITEM_TYPES = exports.INVENTORY_ITEM_TYPE_ENUM = exports.ALL_RATING_TYPES = exports.RATING_TYPE_ENUM = exports.ALL_SUBSCRIPTION_STATUS = exports.SUBSCRIPTION_STATUS_ENUM = exports.ALL_VOID_WAREHOUSE_INVOICE_ITEM_TYPES = exports.VOID_WAREHOUSE_INVOICE_ITEM_TYPE_ENUM = exports.ALL_VOID_PURCHASE_ORDER_ITEM_TYPES = exports.VOID_PURCHASE_ORDER_ITEM_TYPE_ENUM = exports.ALL_VOID_ORDER_ITEM_TYPES = exports.VOID_ORDER_ITEM_TYPE_ENUM = exports.COMPARISON_REPORT_TYPE_ENUM = exports.ALL_MULTI_TENANT_WEBSITE_TYPES = exports.MULTI_TENANT_WEBSITE_TYPE_ENUM = exports.ALL_TIME_RANGE_ENUMS = exports.TIME_RANGE_ENUM = exports.ALL_ITEM_TRANSACTION_TYPES = exports.ITEM_TRANSACTION_TYPE_ENUM = void 0;
7
+ exports.ALL_RECEIPT_QR_CODE_TYPES = exports.RECEIPT_QR_CODE_TYPE_ENUM = exports.ALL_INTERNAL_LEAD_STATUS = exports.INTERNAL_LEAD_STATUS_ENUM = exports.ALL_INTERNAL_LEAD_SOURCES = exports.INTERNAL_LEAD_SOURCE_ENUM = exports.ALL_CASH_DRAWER_STATUS = exports.CASH_DRAWER_STATUS_ENUM = exports.ALL_CASH_IN_HAND_TRANSACTION_CATEGORIES = exports.CASH_IN_HAND_TRANSACTION_CATEGORY_ENUM = exports.ALL_CASH_IN_HAND_TRANSACTION_TYPES = exports.CASH_IN_HAND_TRANSACTION_TYPE_ENUM = exports.ALL_CASH_IN_OUT_TYPES = exports.CASH_IN_OUT_TYPE_ENUM = exports.ALL_POS_SHIFT_STATUS = exports.POS_SHIFT_STATUS_ENUM = exports.ALL_POS_DAY_STATUS = exports.POS_DAY_STATUS_ENUM = exports.ALL_MODIFIER_OPTION_REF_TYPES = exports.MODIFIER_OPTION_REF_TYPE_ENUM = exports.ALL_WAREHOUSE_CLIENT_TYPES = exports.WAREHOUSE_CLIENT_TYPE_ENUM = void 0;
8
8
  var ORDER_FROM_ENUM;
9
9
  (function (ORDER_FROM_ENUM) {
10
10
  ORDER_FROM_ENUM["WEB"] = "WEB";
@@ -590,6 +590,14 @@ var OFFER_REWARD_TYPE_ENUM;
590
590
  })(OFFER_REWARD_TYPE_ENUM || (exports.OFFER_REWARD_TYPE_ENUM = OFFER_REWARD_TYPE_ENUM = {}));
591
591
  exports.ALL_OFFER_REWARD_TYPES = Object.values(OFFER_REWARD_TYPE_ENUM);
592
592
  /* ================><================= */
593
+ var OFFER_FINGERPRINT_TYPE_ENUM;
594
+ (function (OFFER_FINGERPRINT_TYPE_ENUM) {
595
+ OFFER_FINGERPRINT_TYPE_ENUM["OFFER"] = "OFFER";
596
+ OFFER_FINGERPRINT_TYPE_ENUM["VOUCHER"] = "VOUCHER";
597
+ OFFER_FINGERPRINT_TYPE_ENUM["GIFT_CARD"] = "GIFT_CARD";
598
+ })(OFFER_FINGERPRINT_TYPE_ENUM || (exports.OFFER_FINGERPRINT_TYPE_ENUM = OFFER_FINGERPRINT_TYPE_ENUM = {}));
599
+ exports.ALL_OFFER_FINGERPRINT_TYPES = Object.values(OFFER_FINGERPRINT_TYPE_ENUM);
600
+ /* ================><================= */
593
601
  var GIFT_CARD_REWARD_TYPE_ENUM;
594
602
  (function (GIFT_CARD_REWARD_TYPE_ENUM) {
595
603
  GIFT_CARD_REWARD_TYPE_ENUM["DISCOUNT"] = "DISCOUNT";
@@ -1,5 +1,5 @@
1
1
  import { OFFER_REWARD_TYPE_ENUM, PLATFORMS_ENUM } from '../../constants';
2
- import { ICustomer, IDiscountDetails, IOffer, IOrder, IOrderCategory, ITenant, IVoucher } from '../../schemas';
2
+ import { ICustomer, IDiscountDetails, IGiftCard, IOffer, IOrder, IOrderCategory, ITenant, IVoucher } from '../../schemas';
3
3
  export declare function getOfferWithPrice<T extends Partial<IOffer> | IOffer>(offer: T, writeable?: boolean): T;
4
4
  export declare function convertOffersToWorkableOffers(offers: IOffer[], platform: PLATFORMS_ENUM): IOffer[];
5
5
  export declare function calculatePointsRedeemedForOffer(redeemedOffer: IOffer, totalOrderPrice: number, categories: IOrderCategory[] | undefined): number;
@@ -50,8 +50,8 @@ interface IGetOffersWithStats {
50
50
  offers: IOffer[];
51
51
  customer: Partial<ICustomer> | null;
52
52
  vouchers: IVoucher[] | undefined;
53
- customerVoucherUsage: Record<string, number> | undefined;
54
- customerGiftCardsUsage: Record<string, number> | undefined;
53
+ giftCards: IGiftCard[] | undefined;
54
+ customerOfferRedemptionCounts: Record<string, number> | undefined;
55
55
  redeemed_offers: IOrder['redeemed_offers'] | null | undefined;
56
56
  platform: PLATFORMS_ENUM | undefined;
57
57
  currency_symbol: ITenant['currency_symbol'] | undefined;
@@ -60,7 +60,7 @@ interface IGetOffersWithStats {
60
60
  currentItemsPrice: number | undefined;
61
61
  order_discount_details: IDiscountDetails | null | undefined;
62
62
  }
63
- export declare function getOffersWithStats({ offers, customer, vouchers, customerVoucherUsage, customerGiftCardsUsage, redeemed_offers, platform, currency_symbol, currentItemsPrice, totalDiscountApplied, categories, order_discount_details, }: IGetOffersWithStats): {
63
+ export declare function getOffersWithStats({ offers, customer, vouchers, giftCards, customerOfferRedemptionCounts, redeemed_offers, platform, currency_symbol, currentItemsPrice, totalDiscountApplied, categories, order_discount_details, }: IGetOffersWithStats): {
64
64
  offersWithStats: IOfferWithStats[];
65
65
  totalClaimableOffers: number;
66
66
  unlockedOffersApplicableTimes: Record<string, number>;
@@ -672,7 +672,7 @@ function getOffersWithStatsHashKey(offersWithStats, totalClaimableOffers) {
672
672
  }
673
673
  return result;
674
674
  }
675
- function getOffersWithStats({ offers, customer, vouchers, customerVoucherUsage, customerGiftCardsUsage, redeemed_offers, platform, currency_symbol, currentItemsPrice, totalDiscountApplied, categories, order_discount_details, }) {
675
+ function getOffersWithStats({ offers, customer, vouchers, giftCards, customerOfferRedemptionCounts, redeemed_offers, platform, currency_symbol, currentItemsPrice, totalDiscountApplied, categories, order_discount_details, }) {
676
676
  const offersWithStats = [];
677
677
  const orderPrice = currentItemsPrice ?? 0;
678
678
  const totalDiscount = totalDiscountApplied ?? 0;
@@ -699,28 +699,6 @@ function getOffersWithStats({ offers, customer, vouchers, customerVoucherUsage,
699
699
  (customerOwnedVoucherCountByCode[normalizedCode] ?? 0) + parsedCount;
700
700
  }
701
701
  }
702
- const customerVoucherUsageById = {};
703
- if (customerVoucherUsage != null) {
704
- const voucherUsageEntries = Object.entries(customerVoucherUsage);
705
- for (let i = 0; i < voucherUsageEntries.length; i++) {
706
- const [voucherId, count] = voucherUsageEntries[i];
707
- const parsedCount = Number(count);
708
- if (!Number.isFinite(parsedCount) || parsedCount <= 0)
709
- continue;
710
- customerVoucherUsageById[voucherId] = (customerVoucherUsageById[voucherId] ?? 0) + parsedCount;
711
- }
712
- }
713
- const customerGiftCardsUsageById = {};
714
- if (customerGiftCardsUsage != null) {
715
- const giftCardUsageEntries = Object.entries(customerGiftCardsUsage);
716
- for (let i = 0; i < giftCardUsageEntries.length; i++) {
717
- const [giftCardId, count] = giftCardUsageEntries[i];
718
- const parsedCount = Number(count);
719
- if (!Number.isFinite(parsedCount) || parsedCount <= 0)
720
- continue;
721
- customerGiftCardsUsageById[giftCardId] = (customerGiftCardsUsageById[giftCardId] ?? 0) + parsedCount;
722
- }
723
- }
724
702
  const redeemedOffersById = redeemed_offers ?? null;
725
703
  const vouchersById = new Map();
726
704
  if (vouchers != null) {
@@ -734,6 +712,18 @@ function getOffersWithStats({ offers, customer, vouchers, customerVoucherUsage,
734
712
  vouchersById.set(voucher._id, voucher);
735
713
  }
736
714
  }
715
+ const giftCardsById = new Map();
716
+ if (giftCards != null) {
717
+ for (let i = 0; i < giftCards.length; i++) {
718
+ const giftCard = giftCards[i];
719
+ const giftCardIsExpired = giftCard.expire_at != null && new Date(giftCard.expire_at).getTime() <= nowTs;
720
+ const giftCardUsesExhausted = giftCard.max_uses != null && giftCard.used_count >= giftCard.max_uses;
721
+ if (!giftCard.active || giftCardIsExpired || giftCardUsesExhausted) {
722
+ continue;
723
+ }
724
+ giftCardsById.set(giftCard._id, giftCard);
725
+ }
726
+ }
737
727
  const getOfferRedeemedTimes = (offerId) => {
738
728
  const redeemedTimes = Number(redeemedOffersById?.[offerId]);
739
729
  if (Number.isFinite(redeemedTimes) && redeemedTimes > 0) {
@@ -805,6 +795,21 @@ function getOffersWithStats({ offers, customer, vouchers, customerVoucherUsage,
805
795
  action_hint: null,
806
796
  auto_apply: offer.auto_apply ?? false,
807
797
  };
798
+ // Lifetime per-customer max_claims check (from pathway items/points).
799
+ const pathwayMaxClaims = offer.pathway_to_unlock_type === constants_1.PATHWAY_TO_UNLOCK_TYPE_ENUM.ITEMS
800
+ ? offer.pathway_to_unlock_type_items?.max_claims
801
+ : offer.pathway_to_unlock_type === constants_1.PATHWAY_TO_UNLOCK_TYPE_ENUM.POINTS
802
+ ? offer.pathway_to_unlock_type_points?.max_claims
803
+ : undefined;
804
+ if (pathwayMaxClaims != null && customerOfferRedemptionCounts != null) {
805
+ const lifetimeRedemptions = customerOfferRedemptionCounts[offer._id] ?? 0;
806
+ if (lifetimeRedemptions >= pathwayMaxClaims) {
807
+ stats.progress = 0;
808
+ stats.message = `⛔️ You have reached the maximum redemptions for this offer ⛔️`;
809
+ offersWithStats.push({ offer, stats });
810
+ continue;
811
+ }
812
+ }
808
813
  if (offer.pathway_to_unlock_type === constants_1.PATHWAY_TO_UNLOCK_TYPE_ENUM.ORDERS) {
809
814
  if (offer.pathway_to_unlock_type_orders == null) {
810
815
  stats.invalid_offer = true;
@@ -942,11 +947,28 @@ function getOffersWithStats({ offers, customer, vouchers, customerVoucherUsage,
942
947
  else if (offer.reward_type === constants_1.OFFER_REWARD_TYPE_ENUM.VOUCHER) {
943
948
  if (offer.reward_voucher == null)
944
949
  continue;
950
+ let rewardVoucherLimitExhausted = false;
951
+ if (customerOfferRedemptionCounts != null) {
952
+ const vIds = Object.keys(offer.reward_voucher.voucher_ids);
953
+ for (let vIdx = 0; vIdx < vIds.length; vIdx++) {
954
+ const rewardVoucher = vouchersById.get(vIds[vIdx]);
955
+ if (rewardVoucher != null &&
956
+ rewardVoucher.max_uses_per_customer != null &&
957
+ (customerOfferRedemptionCounts[rewardVoucher._id] ?? 0) >= rewardVoucher.max_uses_per_customer) {
958
+ rewardVoucherLimitExhausted = true;
959
+ break;
960
+ }
961
+ }
962
+ }
945
963
  const redeemedTimes = getOfferRedeemedTimes(offer._id);
946
964
  const isRedeemed = redeemedTimes > 0;
947
965
  stats.redeemed_times = redeemedTimes;
948
966
  stats.applicable_quantity = 1;
949
- if (isRedeemed) {
967
+ if (rewardVoucherLimitExhausted) {
968
+ stats.claimable = false;
969
+ stats.message = '⛔️ You have reached your personal limit for this reward ⛔️';
970
+ }
971
+ else if (isRedeemed) {
950
972
  stats.claimable = false;
951
973
  stats.message = 'This offer is redeemed ✅';
952
974
  }
@@ -986,11 +1008,28 @@ function getOffersWithStats({ offers, customer, vouchers, customerVoucherUsage,
986
1008
  else if (offer.reward_type === constants_1.OFFER_REWARD_TYPE_ENUM.GIFT_CARDS) {
987
1009
  if (offer.reward_gift_cards == null)
988
1010
  continue;
1011
+ let rewardGiftCardLimitExhausted = false;
1012
+ if (customerOfferRedemptionCounts != null) {
1013
+ const gcIds = Object.keys(offer.reward_gift_cards.gift_card_ids);
1014
+ for (let gcIdx = 0; gcIdx < gcIds.length; gcIdx++) {
1015
+ const giftCard = giftCardsById.get(gcIds[gcIdx]);
1016
+ if (giftCard != null &&
1017
+ giftCard.max_uses_per_customer != null &&
1018
+ (customerOfferRedemptionCounts[giftCard._id] ?? 0) >= giftCard.max_uses_per_customer) {
1019
+ rewardGiftCardLimitExhausted = true;
1020
+ break;
1021
+ }
1022
+ }
1023
+ }
989
1024
  const redeemedTimes = getOfferRedeemedTimes(offer._id);
990
1025
  const isRedeemed = redeemedTimes > 0;
991
1026
  stats.redeemed_times = redeemedTimes;
992
1027
  stats.applicable_quantity = 1;
993
- if (isRedeemed) {
1028
+ if (rewardGiftCardLimitExhausted) {
1029
+ stats.claimable = false;
1030
+ stats.message = '⛔️ You have reached your personal limit for this reward ⛔️';
1031
+ }
1032
+ else if (isRedeemed) {
994
1033
  stats.claimable = false;
995
1034
  stats.message = 'This offer is redeemed ✅';
996
1035
  }
@@ -1152,12 +1191,28 @@ function getOffersWithStats({ offers, customer, vouchers, customerVoucherUsage,
1152
1191
  else if (offer.reward_type === constants_1.OFFER_REWARD_TYPE_ENUM.VOUCHER) {
1153
1192
  if (offer.reward_voucher == null)
1154
1193
  continue;
1194
+ let rewardVoucherLimitExhausted = false;
1195
+ if (customerOfferRedemptionCounts != null) {
1196
+ const vIds = Object.keys(offer.reward_voucher.voucher_ids);
1197
+ for (let vIdx = 0; vIdx < vIds.length; vIdx++) {
1198
+ const rewardVoucher = vouchersById.get(vIds[vIdx]);
1199
+ if (rewardVoucher != null &&
1200
+ rewardVoucher.max_uses_per_customer != null &&
1201
+ (customerOfferRedemptionCounts[rewardVoucher._id] ?? 0) >= rewardVoucher.max_uses_per_customer) {
1202
+ rewardVoucherLimitExhausted = true;
1203
+ break;
1204
+ }
1205
+ }
1206
+ }
1155
1207
  const redeemedTimes = getOfferRedeemedTimes(offer._id);
1156
1208
  const isRedeemed = redeemedTimes > 0;
1157
1209
  stats.redeemed_times = redeemedTimes;
1158
1210
  stats.applicable_quantity = 1;
1159
- stats.claimable = !isRedeemed;
1160
- if (isRedeemed) {
1211
+ stats.claimable = !isRedeemed && !rewardVoucherLimitExhausted;
1212
+ if (rewardVoucherLimitExhausted) {
1213
+ stats.message = '⛔️ You have reached your personal limit for this reward ⛔️';
1214
+ }
1215
+ else if (isRedeemed) {
1161
1216
  stats.message = 'This offer is redeemed ✅';
1162
1217
  }
1163
1218
  else {
@@ -1194,12 +1249,28 @@ function getOffersWithStats({ offers, customer, vouchers, customerVoucherUsage,
1194
1249
  else if (offer.reward_type === constants_1.OFFER_REWARD_TYPE_ENUM.GIFT_CARDS) {
1195
1250
  if (offer.reward_gift_cards == null)
1196
1251
  continue;
1252
+ let rewardGiftCardLimitExhausted = false;
1253
+ if (customerOfferRedemptionCounts != null) {
1254
+ const gcIds = Object.keys(offer.reward_gift_cards.gift_card_ids);
1255
+ for (let gcIdx = 0; gcIdx < gcIds.length; gcIdx++) {
1256
+ const giftCard = giftCardsById.get(gcIds[gcIdx]);
1257
+ if (giftCard != null &&
1258
+ giftCard.max_uses_per_customer != null &&
1259
+ (customerOfferRedemptionCounts[giftCard._id] ?? 0) >= giftCard.max_uses_per_customer) {
1260
+ rewardGiftCardLimitExhausted = true;
1261
+ break;
1262
+ }
1263
+ }
1264
+ }
1197
1265
  const redeemedTimes = getOfferRedeemedTimes(offer._id);
1198
1266
  const isRedeemed = redeemedTimes > 0;
1199
1267
  stats.redeemed_times = redeemedTimes;
1200
1268
  stats.applicable_quantity = 1;
1201
- stats.claimable = !isRedeemed;
1202
- if (isRedeemed) {
1269
+ stats.claimable = !isRedeemed && !rewardGiftCardLimitExhausted;
1270
+ if (rewardGiftCardLimitExhausted) {
1271
+ stats.message = '⛔️ You have reached your personal limit for this reward ⛔️';
1272
+ }
1273
+ else if (isRedeemed) {
1203
1274
  stats.message = 'This offer is redeemed ✅';
1204
1275
  }
1205
1276
  else {
@@ -1363,12 +1434,28 @@ function getOffersWithStats({ offers, customer, vouchers, customerVoucherUsage,
1363
1434
  else if (offer.reward_type === constants_1.OFFER_REWARD_TYPE_ENUM.VOUCHER) {
1364
1435
  if (offer.reward_voucher == null)
1365
1436
  continue;
1437
+ let rewardVoucherLimitExhausted = false;
1438
+ if (customerOfferRedemptionCounts != null) {
1439
+ const vIds = Object.keys(offer.reward_voucher.voucher_ids);
1440
+ for (let vIdx = 0; vIdx < vIds.length; vIdx++) {
1441
+ const rewardVoucher = vouchersById.get(vIds[vIdx]);
1442
+ if (rewardVoucher != null &&
1443
+ rewardVoucher.max_uses_per_customer != null &&
1444
+ (customerOfferRedemptionCounts[rewardVoucher._id] ?? 0) >= rewardVoucher.max_uses_per_customer) {
1445
+ rewardVoucherLimitExhausted = true;
1446
+ break;
1447
+ }
1448
+ }
1449
+ }
1366
1450
  const redeemedTimes = getOfferRedeemedTimes(offer._id);
1367
1451
  const isRedeemed = redeemedTimes > 0;
1368
1452
  stats.redeemed_times = redeemedTimes;
1369
1453
  stats.applicable_quantity = 1;
1370
- stats.claimable = !isRedeemed;
1371
- if (isRedeemed) {
1454
+ stats.claimable = !isRedeemed && !rewardVoucherLimitExhausted;
1455
+ if (rewardVoucherLimitExhausted) {
1456
+ stats.message = '⛔️ You have reached your personal limit for this reward ⛔️';
1457
+ }
1458
+ else if (isRedeemed) {
1372
1459
  stats.message = 'This offer is redeemed ✅';
1373
1460
  }
1374
1461
  else {
@@ -1405,12 +1492,28 @@ function getOffersWithStats({ offers, customer, vouchers, customerVoucherUsage,
1405
1492
  else if (offer.reward_type === constants_1.OFFER_REWARD_TYPE_ENUM.GIFT_CARDS) {
1406
1493
  if (offer.reward_gift_cards == null)
1407
1494
  continue;
1495
+ let rewardGiftCardLimitExhausted = false;
1496
+ if (customerOfferRedemptionCounts != null) {
1497
+ const gcIds = Object.keys(offer.reward_gift_cards.gift_card_ids);
1498
+ for (let gcIdx = 0; gcIdx < gcIds.length; gcIdx++) {
1499
+ const giftCard = giftCardsById.get(gcIds[gcIdx]);
1500
+ if (giftCard != null &&
1501
+ giftCard.max_uses_per_customer != null &&
1502
+ (customerOfferRedemptionCounts[giftCard._id] ?? 0) >= giftCard.max_uses_per_customer) {
1503
+ rewardGiftCardLimitExhausted = true;
1504
+ break;
1505
+ }
1506
+ }
1507
+ }
1408
1508
  const redeemedTimes = getOfferRedeemedTimes(offer._id);
1409
1509
  const isRedeemed = redeemedTimes > 0;
1410
1510
  stats.redeemed_times = redeemedTimes;
1411
1511
  stats.applicable_quantity = 1;
1412
- stats.claimable = !isRedeemed;
1413
- if (isRedeemed) {
1512
+ stats.claimable = !isRedeemed && !rewardGiftCardLimitExhausted;
1513
+ if (rewardGiftCardLimitExhausted) {
1514
+ stats.message = '⛔️ You have reached your personal limit for this reward ⛔️';
1515
+ }
1516
+ else if (isRedeemed) {
1414
1517
  stats.message = 'This offer is redeemed ✅';
1415
1518
  }
1416
1519
  else {
@@ -1473,7 +1576,7 @@ function getOffersWithStats({ offers, customer, vouchers, customerVoucherUsage,
1473
1576
  const hasMatchingVoucher = matchedVoucher != null;
1474
1577
  const normalizedMatchedVoucherCode = matchedVoucher?.code.trim().toUpperCase() ?? null;
1475
1578
  const customerOwnedVoucherCount = normalizedMatchedVoucherCode == null ? 0 : (customerOwnedVoucherCountByCode[normalizedMatchedVoucherCode] ?? 0);
1476
- const customerVoucherUsageCount = matchedVoucher == null ? 0 : (customerVoucherUsageById[matchedVoucher._id] ?? 0);
1579
+ const customerVoucherUsageCount = matchedVoucher == null ? 0 : (customerOfferRedemptionCounts?.[matchedVoucher._id] ?? 0);
1477
1580
  const voucherUsesPerCustomerExhausted = matchedVoucher?.max_uses_per_customer != null &&
1478
1581
  customerVoucherUsageCount >= matchedVoucher.max_uses_per_customer;
1479
1582
  const hasVoucherAccess = matchedVoucher != null && (matchedVoucher.is_public || customerOwnedVoucherCount > 0);
@@ -1575,12 +1678,28 @@ function getOffersWithStats({ offers, customer, vouchers, customerVoucherUsage,
1575
1678
  else if (offer.reward_type === constants_1.OFFER_REWARD_TYPE_ENUM.VOUCHER) {
1576
1679
  if (offer.reward_voucher == null)
1577
1680
  continue;
1681
+ let rewardVoucherLimitExhausted = false;
1682
+ if (customerOfferRedemptionCounts != null) {
1683
+ const vIds = Object.keys(offer.reward_voucher.voucher_ids);
1684
+ for (let vIdx = 0; vIdx < vIds.length; vIdx++) {
1685
+ const rewardVoucher = vouchersById.get(vIds[vIdx]);
1686
+ if (rewardVoucher != null &&
1687
+ rewardVoucher.max_uses_per_customer != null &&
1688
+ (customerOfferRedemptionCounts[rewardVoucher._id] ?? 0) >= rewardVoucher.max_uses_per_customer) {
1689
+ rewardVoucherLimitExhausted = true;
1690
+ break;
1691
+ }
1692
+ }
1693
+ }
1578
1694
  const redeemedTimes = getOfferRedeemedTimes(offer._id);
1579
1695
  const isRedeemed = redeemedTimes > 0;
1580
1696
  stats.redeemed_times = redeemedTimes;
1581
1697
  stats.applicable_quantity = 1;
1582
- stats.claimable = !isRedeemed;
1583
- if (isRedeemed) {
1698
+ stats.claimable = !isRedeemed && !rewardVoucherLimitExhausted;
1699
+ if (rewardVoucherLimitExhausted) {
1700
+ stats.message = '⛔️ You have reached your personal limit for this reward ⛔️';
1701
+ }
1702
+ else if (isRedeemed) {
1584
1703
  stats.message = 'This offer is redeemed ✅';
1585
1704
  }
1586
1705
  else {
@@ -1617,12 +1736,28 @@ function getOffersWithStats({ offers, customer, vouchers, customerVoucherUsage,
1617
1736
  else if (offer.reward_type === constants_1.OFFER_REWARD_TYPE_ENUM.GIFT_CARDS) {
1618
1737
  if (offer.reward_gift_cards == null)
1619
1738
  continue;
1739
+ let rewardGiftCardLimitExhausted = false;
1740
+ if (customerOfferRedemptionCounts != null) {
1741
+ const gcIds = Object.keys(offer.reward_gift_cards.gift_card_ids);
1742
+ for (let gcIdx = 0; gcIdx < gcIds.length; gcIdx++) {
1743
+ const giftCard = giftCardsById.get(gcIds[gcIdx]);
1744
+ if (giftCard != null &&
1745
+ giftCard.max_uses_per_customer != null &&
1746
+ (customerOfferRedemptionCounts[giftCard._id] ?? 0) >= giftCard.max_uses_per_customer) {
1747
+ rewardGiftCardLimitExhausted = true;
1748
+ break;
1749
+ }
1750
+ }
1751
+ }
1620
1752
  const redeemedTimes = getOfferRedeemedTimes(offer._id);
1621
1753
  const isRedeemed = redeemedTimes > 0;
1622
1754
  stats.redeemed_times = redeemedTimes;
1623
1755
  stats.applicable_quantity = 1;
1624
- stats.claimable = !isRedeemed;
1625
- if (isRedeemed) {
1756
+ stats.claimable = !isRedeemed && !rewardGiftCardLimitExhausted;
1757
+ if (rewardGiftCardLimitExhausted) {
1758
+ stats.message = '⛔️ You have reached your personal limit for this reward ⛔️';
1759
+ }
1760
+ else if (isRedeemed) {
1626
1761
  stats.message = 'This offer is redeemed ✅';
1627
1762
  }
1628
1763
  else {
@@ -1,4 +1,5 @@
1
1
  import { Schema } from 'mongoose';
2
+ import { OFFER_FINGERPRINT_TYPE_ENUM } from '../../constants';
2
3
  export declare const OfferFingerprintSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
3
4
  timestamps: true;
4
5
  versionKey: false;
@@ -8,6 +9,7 @@ export declare const OfferFingerprintSchema: Schema<any, import("mongoose").Mode
8
9
  updatedAt: NativeDate;
9
10
  } & {
10
11
  _id: import("mongoose").Types.ObjectId;
12
+ type: OFFER_FINGERPRINT_TYPE_ENUM;
11
13
  tenants: string[];
12
14
  createdAt_mins: number;
13
15
  createdAt: NativeDate;
@@ -22,6 +24,7 @@ export declare const OfferFingerprintSchema: Schema<any, import("mongoose").Mode
22
24
  updatedAt: NativeDate;
23
25
  } & {
24
26
  _id: import("mongoose").Types.ObjectId;
27
+ type: OFFER_FINGERPRINT_TYPE_ENUM;
25
28
  tenants: string[];
26
29
  createdAt_mins: number;
27
30
  createdAt: NativeDate;
@@ -36,6 +39,7 @@ export declare const OfferFingerprintSchema: Schema<any, import("mongoose").Mode
36
39
  updatedAt: NativeDate;
37
40
  } & {
38
41
  _id: import("mongoose").Types.ObjectId;
42
+ type: OFFER_FINGERPRINT_TYPE_ENUM;
39
43
  tenants: string[];
40
44
  createdAt_mins: number;
41
45
  createdAt: NativeDate;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OFFER_FINGERPRINT_COLLECTION_NAME = exports.OfferFingerprintSchema = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const constants_1 = require("../../constants");
5
6
  exports.OfferFingerprintSchema = new mongoose_1.Schema({
6
7
  _id: {
7
8
  type: mongoose_1.Schema.Types.ObjectId,
@@ -24,6 +25,12 @@ exports.OfferFingerprintSchema = new mongoose_1.Schema({
24
25
  immutable: true,
25
26
  ref: 'offers',
26
27
  },
28
+ type: {
29
+ type: String,
30
+ required: true,
31
+ enum: constants_1.ALL_OFFER_FINGERPRINT_TYPES,
32
+ default: constants_1.OFFER_FINGERPRINT_TYPE_ENUM.OFFER,
33
+ },
27
34
  customer_phone: {
28
35
  type: String,
29
36
  required: true,
@@ -1,8 +1,10 @@
1
+ import { OFFER_FINGERPRINT_TYPE_ENUM } from '../../constants';
1
2
  export interface IOfferFingerprint {
2
3
  _id: string;
3
4
  brand_id: string;
4
5
  tenants: string[];
5
6
  offer_id: string;
7
+ type: OFFER_FINGERPRINT_TYPE_ENUM;
6
8
  customer_phone: string;
7
9
  redeemed_times: number;
8
10
  redeemed_at: Date | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.271",
3
+ "version": "0.2.273",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",