@managesome/eposmatic-toolkit 0.2.335 → 0.2.337
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/lib/constants/ENUMS.d.ts +6 -1
- package/lib/constants/ENUMS.js +15 -7
- package/lib/schemas/models/customer_redemptions.d.ts +3 -0
- package/lib/schemas/models/customer_redemptions.js +6 -0
- package/lib/schemas/models/gift_cards.d.ts +12 -0
- package/lib/schemas/models/gift_cards.js +20 -0
- package/lib/schemas/models/rewards_usage.d.ts +3 -3
- package/lib/schemas/models/vouchers.d.ts +12 -0
- package/lib/schemas/models/vouchers.js +20 -0
- package/lib/schemas/types/customer_redemptions.d.ts +2 -1
- package/lib/schemas/types/gift_cards.d.ts +6 -2
- package/lib/schemas/types/vouchers.d.ts +6 -2
- package/package.json +1 -1
package/lib/constants/ENUMS.d.ts
CHANGED
|
@@ -410,11 +410,16 @@ 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
|
|
413
|
+
export declare enum CUSTOMER_REDEMPTION_SOURCE_ENUM {
|
|
414
414
|
OFFER = "OFFER",
|
|
415
415
|
VOUCHER = "VOUCHER",
|
|
416
416
|
GIFT_CARD = "GIFT_CARD"
|
|
417
417
|
}
|
|
418
|
+
export declare const ALL_CUSTOMER_REDEMPTION_SOURCE_TYPES: CUSTOMER_REDEMPTION_SOURCE_ENUM[];
|
|
419
|
+
export declare enum CUSTOMER_REDEMPTION_TYPE_ENUM {
|
|
420
|
+
ASSIGNED = "ASSIGNED",
|
|
421
|
+
USED = "USED"
|
|
422
|
+
}
|
|
418
423
|
export declare const ALL_CUSTOMER_REDEMPTION_TYPES: CUSTOMER_REDEMPTION_TYPE_ENUM[];
|
|
419
424
|
export declare enum GIFT_CARD_REWARD_TYPE_ENUM {
|
|
420
425
|
DISCOUNT = "DISCOUNT",
|
package/lib/constants/ENUMS.js
CHANGED
|
@@ -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.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.ALL_CUSTOMER_TARGET_MODES = exports.CUSTOMER_TARGET_MODE_ENUM = exports.ALL_WALLET_ASSIGNMENT_BEHAVIORS = exports.WALLET_ASSIGNMENT_BEHAVIOR_ENUM = exports.ALL_WALLET_ASSET_TYPES = exports.WALLET_ASSET_TYPE_ENUM = 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;
|
|
4
|
+
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_CUSTOMER_REDEMPTION_TYPES = exports.CUSTOMER_REDEMPTION_TYPE_ENUM = exports.ALL_CUSTOMER_REDEMPTION_SOURCE_TYPES = exports.CUSTOMER_REDEMPTION_SOURCE_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_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 = exports.PLATFORM_PROVIDER_IDS_ENUM = exports.ALL_MARKETING_RECEIPIENT_TYPES = void 0;
|
|
6
|
+
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 = exports.INVENTORY_OUTBOUND_TRANSACTIONS = exports.INVENTORY_INBOUND_TRANSACTIONS = void 0;
|
|
7
|
+
exports.ALL_CUSTOMER_TARGET_MODES = exports.CUSTOMER_TARGET_MODE_ENUM = exports.ALL_WALLET_ASSIGNMENT_BEHAVIORS = exports.WALLET_ASSIGNMENT_BEHAVIOR_ENUM = exports.ALL_WALLET_ASSET_TYPES = exports.WALLET_ASSET_TYPE_ENUM = 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 = exports.ALL_ONLINE_ORDERING_DESIGN_TYPES = exports.ONLINE_ORDERING_DESIGN_TYPE_ENUM = void 0;
|
|
8
8
|
var ORDER_FROM_ENUM;
|
|
9
9
|
(function (ORDER_FROM_ENUM) {
|
|
10
10
|
ORDER_FROM_ENUM["WEB"] = "WEB";
|
|
@@ -590,11 +590,18 @@ 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 CUSTOMER_REDEMPTION_SOURCE_ENUM;
|
|
594
|
+
(function (CUSTOMER_REDEMPTION_SOURCE_ENUM) {
|
|
595
|
+
CUSTOMER_REDEMPTION_SOURCE_ENUM["OFFER"] = "OFFER";
|
|
596
|
+
CUSTOMER_REDEMPTION_SOURCE_ENUM["VOUCHER"] = "VOUCHER";
|
|
597
|
+
CUSTOMER_REDEMPTION_SOURCE_ENUM["GIFT_CARD"] = "GIFT_CARD";
|
|
598
|
+
})(CUSTOMER_REDEMPTION_SOURCE_ENUM || (exports.CUSTOMER_REDEMPTION_SOURCE_ENUM = CUSTOMER_REDEMPTION_SOURCE_ENUM = {}));
|
|
599
|
+
exports.ALL_CUSTOMER_REDEMPTION_SOURCE_TYPES = Object.values(CUSTOMER_REDEMPTION_SOURCE_ENUM);
|
|
600
|
+
/* ================><================= */
|
|
593
601
|
var CUSTOMER_REDEMPTION_TYPE_ENUM;
|
|
594
602
|
(function (CUSTOMER_REDEMPTION_TYPE_ENUM) {
|
|
595
|
-
CUSTOMER_REDEMPTION_TYPE_ENUM["
|
|
596
|
-
CUSTOMER_REDEMPTION_TYPE_ENUM["
|
|
597
|
-
CUSTOMER_REDEMPTION_TYPE_ENUM["GIFT_CARD"] = "GIFT_CARD";
|
|
603
|
+
CUSTOMER_REDEMPTION_TYPE_ENUM["ASSIGNED"] = "ASSIGNED";
|
|
604
|
+
CUSTOMER_REDEMPTION_TYPE_ENUM["USED"] = "USED";
|
|
598
605
|
})(CUSTOMER_REDEMPTION_TYPE_ENUM || (exports.CUSTOMER_REDEMPTION_TYPE_ENUM = CUSTOMER_REDEMPTION_TYPE_ENUM = {}));
|
|
599
606
|
exports.ALL_CUSTOMER_REDEMPTION_TYPES = Object.values(CUSTOMER_REDEMPTION_TYPE_ENUM);
|
|
600
607
|
/* ================><================= */
|
|
@@ -1820,3 +1827,4 @@ var CUSTOMER_TARGET_MODE_ENUM;
|
|
|
1820
1827
|
CUSTOMER_TARGET_MODE_ENUM["TOP_DELIVERY_CUSTOMERS_BY_ORDERS"] = "TOP_DELIVERY_CUSTOMERS_BY_ORDERS";
|
|
1821
1828
|
})(CUSTOMER_TARGET_MODE_ENUM || (exports.CUSTOMER_TARGET_MODE_ENUM = CUSTOMER_TARGET_MODE_ENUM = {}));
|
|
1822
1829
|
exports.ALL_CUSTOMER_TARGET_MODES = Object.values(CUSTOMER_TARGET_MODE_ENUM);
|
|
1830
|
+
// ====================>> <<====================== //
|
|
@@ -12,6 +12,7 @@ export declare const CustomerRedemptionSchema: Schema<any, import("mongoose").Mo
|
|
|
12
12
|
createdAt_mins: number;
|
|
13
13
|
createdAt: NativeDate;
|
|
14
14
|
updatedAt: NativeDate;
|
|
15
|
+
source: import("../../constants").CUSTOMER_REDEMPTION_SOURCE_ENUM;
|
|
15
16
|
brand_id: string;
|
|
16
17
|
ref_id: import("mongoose").Types.ObjectId;
|
|
17
18
|
customer_phone: string;
|
|
@@ -26,6 +27,7 @@ export declare const CustomerRedemptionSchema: Schema<any, import("mongoose").Mo
|
|
|
26
27
|
createdAt_mins: number;
|
|
27
28
|
createdAt: NativeDate;
|
|
28
29
|
updatedAt: NativeDate;
|
|
30
|
+
source: import("../../constants").CUSTOMER_REDEMPTION_SOURCE_ENUM;
|
|
29
31
|
brand_id: string;
|
|
30
32
|
ref_id: import("mongoose").Types.ObjectId;
|
|
31
33
|
customer_phone: string;
|
|
@@ -40,6 +42,7 @@ export declare const CustomerRedemptionSchema: Schema<any, import("mongoose").Mo
|
|
|
40
42
|
createdAt_mins: number;
|
|
41
43
|
createdAt: NativeDate;
|
|
42
44
|
updatedAt: NativeDate;
|
|
45
|
+
source: import("../../constants").CUSTOMER_REDEMPTION_SOURCE_ENUM;
|
|
43
46
|
brand_id: string;
|
|
44
47
|
ref_id: import("mongoose").Types.ObjectId;
|
|
45
48
|
customer_phone: string;
|
|
@@ -20,6 +20,12 @@ exports.CustomerRedemptionSchema = new mongoose_1.Schema({
|
|
|
20
20
|
required: true,
|
|
21
21
|
immutable: true,
|
|
22
22
|
},
|
|
23
|
+
source: {
|
|
24
|
+
type: String,
|
|
25
|
+
enum: constants_1.ALL_CUSTOMER_REDEMPTION_SOURCE_TYPES,
|
|
26
|
+
required: true,
|
|
27
|
+
immutable: true,
|
|
28
|
+
},
|
|
23
29
|
type: {
|
|
24
30
|
type: String,
|
|
25
31
|
enum: constants_1.ALL_CUSTOMER_REDEMPTION_TYPES,
|
|
@@ -18,6 +18,7 @@ export declare const GiftCardsSchema: Schema<any, import("mongoose").Model<any,
|
|
|
18
18
|
active: boolean;
|
|
19
19
|
code: string;
|
|
20
20
|
used_count: number;
|
|
21
|
+
assigned_count: number;
|
|
21
22
|
reward_type: GIFT_CARD_REWARD_TYPE_ENUM;
|
|
22
23
|
reward_discount?: {
|
|
23
24
|
is_discount_percentage: boolean;
|
|
@@ -76,6 +77,9 @@ export declare const GiftCardsSchema: Schema<any, import("mongoose").Model<any,
|
|
|
76
77
|
max_uses?: number | null | undefined;
|
|
77
78
|
max_uses_per_customer?: number | null | undefined;
|
|
78
79
|
last_used_at?: NativeDate | null | undefined;
|
|
80
|
+
max_assignments?: number | null | undefined;
|
|
81
|
+
max_assignments_per_customer?: number | null | undefined;
|
|
82
|
+
last_assigned_at?: NativeDate | null | undefined;
|
|
79
83
|
reward_mystery_gift?: {
|
|
80
84
|
choice_of_rewards: string[];
|
|
81
85
|
reward_discount?: {
|
|
@@ -148,6 +152,7 @@ export declare const GiftCardsSchema: Schema<any, import("mongoose").Model<any,
|
|
|
148
152
|
active: boolean;
|
|
149
153
|
code: string;
|
|
150
154
|
used_count: number;
|
|
155
|
+
assigned_count: number;
|
|
151
156
|
reward_type: GIFT_CARD_REWARD_TYPE_ENUM;
|
|
152
157
|
reward_discount?: {
|
|
153
158
|
is_discount_percentage: boolean;
|
|
@@ -206,6 +211,9 @@ export declare const GiftCardsSchema: Schema<any, import("mongoose").Model<any,
|
|
|
206
211
|
max_uses?: number | null | undefined;
|
|
207
212
|
max_uses_per_customer?: number | null | undefined;
|
|
208
213
|
last_used_at?: NativeDate | null | undefined;
|
|
214
|
+
max_assignments?: number | null | undefined;
|
|
215
|
+
max_assignments_per_customer?: number | null | undefined;
|
|
216
|
+
last_assigned_at?: NativeDate | null | undefined;
|
|
209
217
|
reward_mystery_gift?: {
|
|
210
218
|
choice_of_rewards: string[];
|
|
211
219
|
reward_discount?: {
|
|
@@ -278,6 +286,7 @@ export declare const GiftCardsSchema: Schema<any, import("mongoose").Model<any,
|
|
|
278
286
|
active: boolean;
|
|
279
287
|
code: string;
|
|
280
288
|
used_count: number;
|
|
289
|
+
assigned_count: number;
|
|
281
290
|
reward_type: GIFT_CARD_REWARD_TYPE_ENUM;
|
|
282
291
|
reward_discount?: {
|
|
283
292
|
is_discount_percentage: boolean;
|
|
@@ -336,6 +345,9 @@ export declare const GiftCardsSchema: Schema<any, import("mongoose").Model<any,
|
|
|
336
345
|
max_uses?: number | null | undefined;
|
|
337
346
|
max_uses_per_customer?: number | null | undefined;
|
|
338
347
|
last_used_at?: NativeDate | null | undefined;
|
|
348
|
+
max_assignments?: number | null | undefined;
|
|
349
|
+
max_assignments_per_customer?: number | null | undefined;
|
|
350
|
+
last_assigned_at?: NativeDate | null | undefined;
|
|
339
351
|
reward_mystery_gift?: {
|
|
340
352
|
choice_of_rewards: string[];
|
|
341
353
|
reward_discount?: {
|
|
@@ -254,6 +254,26 @@ exports.GiftCardsSchema = new mongoose_1.Schema({
|
|
|
254
254
|
required: false,
|
|
255
255
|
default: null,
|
|
256
256
|
},
|
|
257
|
+
max_assignments: {
|
|
258
|
+
type: Number,
|
|
259
|
+
required: false,
|
|
260
|
+
default: null,
|
|
261
|
+
},
|
|
262
|
+
max_assignments_per_customer: {
|
|
263
|
+
type: Number,
|
|
264
|
+
required: false,
|
|
265
|
+
default: null,
|
|
266
|
+
},
|
|
267
|
+
assigned_count: {
|
|
268
|
+
type: Number,
|
|
269
|
+
required: true,
|
|
270
|
+
default: 0,
|
|
271
|
+
},
|
|
272
|
+
last_assigned_at: {
|
|
273
|
+
type: mongoose_1.Schema.Types.Date,
|
|
274
|
+
required: false,
|
|
275
|
+
default: null,
|
|
276
|
+
},
|
|
257
277
|
reward_type: {
|
|
258
278
|
type: String,
|
|
259
279
|
enum: constants_1.ALL_GIFT_CARD_REWARD_TYPES,
|
|
@@ -14,9 +14,9 @@ export declare const RewardsUsageSchema: Schema<any, import("mongoose").Model<an
|
|
|
14
14
|
customer_phone: string;
|
|
15
15
|
used_count: number;
|
|
16
16
|
last_used_at: NativeDate;
|
|
17
|
-
ref_type: import("../../constants").REWARDS_USAGE_REF_TYPE_ENUM;
|
|
18
17
|
assigned_count: number;
|
|
19
18
|
last_assigned_at: NativeDate;
|
|
19
|
+
ref_type: import("../../constants").REWARDS_USAGE_REF_TYPE_ENUM;
|
|
20
20
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
21
21
|
createdAt: NativeDate;
|
|
22
22
|
updatedAt: NativeDate;
|
|
@@ -28,9 +28,9 @@ export declare const RewardsUsageSchema: Schema<any, import("mongoose").Model<an
|
|
|
28
28
|
customer_phone: string;
|
|
29
29
|
used_count: number;
|
|
30
30
|
last_used_at: NativeDate;
|
|
31
|
-
ref_type: import("../../constants").REWARDS_USAGE_REF_TYPE_ENUM;
|
|
32
31
|
assigned_count: number;
|
|
33
32
|
last_assigned_at: NativeDate;
|
|
33
|
+
ref_type: import("../../constants").REWARDS_USAGE_REF_TYPE_ENUM;
|
|
34
34
|
}>> & import("mongoose").FlatRecord<{
|
|
35
35
|
createdAt: NativeDate;
|
|
36
36
|
updatedAt: NativeDate;
|
|
@@ -42,9 +42,9 @@ export declare const RewardsUsageSchema: Schema<any, import("mongoose").Model<an
|
|
|
42
42
|
customer_phone: string;
|
|
43
43
|
used_count: number;
|
|
44
44
|
last_used_at: NativeDate;
|
|
45
|
-
ref_type: import("../../constants").REWARDS_USAGE_REF_TYPE_ENUM;
|
|
46
45
|
assigned_count: number;
|
|
47
46
|
last_assigned_at: NativeDate;
|
|
47
|
+
ref_type: import("../../constants").REWARDS_USAGE_REF_TYPE_ENUM;
|
|
48
48
|
}> & Required<{
|
|
49
49
|
_id: import("mongoose").Types.ObjectId;
|
|
50
50
|
}> & {
|
|
@@ -17,10 +17,14 @@ export declare const VouchersSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
17
17
|
active: boolean;
|
|
18
18
|
code: string;
|
|
19
19
|
used_count: number;
|
|
20
|
+
assigned_count: number;
|
|
20
21
|
is_public: boolean;
|
|
21
22
|
max_uses?: number | null | undefined;
|
|
22
23
|
max_uses_per_customer?: number | null | undefined;
|
|
23
24
|
last_used_at?: NativeDate | null | undefined;
|
|
25
|
+
max_assignments?: number | null | undefined;
|
|
26
|
+
max_assignments_per_customer?: number | null | undefined;
|
|
27
|
+
last_assigned_at?: NativeDate | null | undefined;
|
|
24
28
|
expire_at?: NativeDate | null | undefined;
|
|
25
29
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
26
30
|
createdAt: NativeDate;
|
|
@@ -36,10 +40,14 @@ export declare const VouchersSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
36
40
|
active: boolean;
|
|
37
41
|
code: string;
|
|
38
42
|
used_count: number;
|
|
43
|
+
assigned_count: number;
|
|
39
44
|
is_public: boolean;
|
|
40
45
|
max_uses?: number | null | undefined;
|
|
41
46
|
max_uses_per_customer?: number | null | undefined;
|
|
42
47
|
last_used_at?: NativeDate | null | undefined;
|
|
48
|
+
max_assignments?: number | null | undefined;
|
|
49
|
+
max_assignments_per_customer?: number | null | undefined;
|
|
50
|
+
last_assigned_at?: NativeDate | null | undefined;
|
|
43
51
|
expire_at?: NativeDate | null | undefined;
|
|
44
52
|
}>> & import("mongoose").FlatRecord<{
|
|
45
53
|
createdAt: NativeDate;
|
|
@@ -55,10 +63,14 @@ export declare const VouchersSchema: Schema<any, import("mongoose").Model<any, a
|
|
|
55
63
|
active: boolean;
|
|
56
64
|
code: string;
|
|
57
65
|
used_count: number;
|
|
66
|
+
assigned_count: number;
|
|
58
67
|
is_public: boolean;
|
|
59
68
|
max_uses?: number | null | undefined;
|
|
60
69
|
max_uses_per_customer?: number | null | undefined;
|
|
61
70
|
last_used_at?: NativeDate | null | undefined;
|
|
71
|
+
max_assignments?: number | null | undefined;
|
|
72
|
+
max_assignments_per_customer?: number | null | undefined;
|
|
73
|
+
last_assigned_at?: NativeDate | null | undefined;
|
|
62
74
|
expire_at?: NativeDate | null | undefined;
|
|
63
75
|
}> & Required<{
|
|
64
76
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -60,6 +60,26 @@ exports.VouchersSchema = new mongoose_1.Schema({
|
|
|
60
60
|
required: false,
|
|
61
61
|
default: null,
|
|
62
62
|
},
|
|
63
|
+
max_assignments: {
|
|
64
|
+
type: Number,
|
|
65
|
+
required: false,
|
|
66
|
+
default: null,
|
|
67
|
+
},
|
|
68
|
+
max_assignments_per_customer: {
|
|
69
|
+
type: Number,
|
|
70
|
+
required: false,
|
|
71
|
+
default: null,
|
|
72
|
+
},
|
|
73
|
+
assigned_count: {
|
|
74
|
+
type: Number,
|
|
75
|
+
required: true,
|
|
76
|
+
default: 0,
|
|
77
|
+
},
|
|
78
|
+
last_assigned_at: {
|
|
79
|
+
type: mongoose_1.Schema.Types.Date,
|
|
80
|
+
required: false,
|
|
81
|
+
default: null,
|
|
82
|
+
},
|
|
63
83
|
expire_at: {
|
|
64
84
|
type: mongoose_1.Schema.Types.Date,
|
|
65
85
|
required: false,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { CUSTOMER_REDEMPTION_TYPE_ENUM } from '../../constants';
|
|
1
|
+
import { CUSTOMER_REDEMPTION_SOURCE_ENUM, CUSTOMER_REDEMPTION_TYPE_ENUM } from '../../constants';
|
|
2
2
|
export interface ICustomerRedemption {
|
|
3
3
|
_id: string;
|
|
4
4
|
brand_id: string;
|
|
5
5
|
ref_id: string;
|
|
6
|
+
source: CUSTOMER_REDEMPTION_SOURCE_ENUM;
|
|
6
7
|
type: CUSTOMER_REDEMPTION_TYPE_ENUM;
|
|
7
8
|
customer_phone: string;
|
|
8
9
|
customer_name: string;
|
|
@@ -79,10 +79,14 @@ interface IBaseGiftCard {
|
|
|
79
79
|
name: string;
|
|
80
80
|
description: string;
|
|
81
81
|
active: boolean;
|
|
82
|
+
last_used_at: Date | null;
|
|
82
83
|
max_uses: number | null;
|
|
83
|
-
max_uses_per_customer: number | null;
|
|
84
84
|
used_count: number;
|
|
85
|
-
|
|
85
|
+
max_uses_per_customer: number | null;
|
|
86
|
+
max_assignments: number | null;
|
|
87
|
+
max_assignments_per_customer: number | null;
|
|
88
|
+
assigned_count: number;
|
|
89
|
+
last_assigned_at: Date | null;
|
|
86
90
|
expire_at: Date | null;
|
|
87
91
|
updatedAt: Date;
|
|
88
92
|
createdAt: Date;
|
|
@@ -7,10 +7,14 @@ export interface IVoucher {
|
|
|
7
7
|
description: string;
|
|
8
8
|
active: boolean;
|
|
9
9
|
is_public: boolean;
|
|
10
|
+
last_used_at: Date | null;
|
|
10
11
|
max_uses: number | null;
|
|
11
|
-
max_uses_per_customer: number | null;
|
|
12
12
|
used_count: number;
|
|
13
|
-
|
|
13
|
+
max_uses_per_customer: number | null;
|
|
14
|
+
max_assignments: number | null;
|
|
15
|
+
max_assignments_per_customer: number | null;
|
|
16
|
+
assigned_count: number;
|
|
17
|
+
last_assigned_at: Date | null;
|
|
14
18
|
expire_at: Date | null;
|
|
15
19
|
updatedAt: Date;
|
|
16
20
|
createdAt: Date;
|