@managesome/eposmatic-toolkit 0.2.273 → 0.2.275
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 +2 -2
- package/lib/constants/ENUMS.js +8 -8
- package/lib/schemas/models/customer_redemptions.d.ts +53 -0
- package/lib/schemas/models/customer_redemptions.js +62 -0
- package/lib/schemas/models/gift_cards.d.ts +108 -108
- package/lib/schemas/models/halfhalf_setup.d.ts +6 -6
- package/lib/schemas/models/index.d.ts +4 -3
- package/lib/schemas/models/index.js +4 -3
- package/lib/schemas/models/item_transactions.d.ts +3 -3
- package/lib/schemas/models/offers.d.ts +136 -136
- package/lib/schemas/models/offers_fingerprints.d.ts +6 -10
- package/lib/schemas/models/offers_fingerprints.js +8 -13
- package/lib/schemas/models/order.d.ts +216 -216
- package/lib/schemas/models/purchase_orders.d.ts +216 -216
- package/lib/schemas/models/reservations.d.ts +6 -6
- package/lib/schemas/models/reviews.d.ts +6 -6
- package/lib/schemas/models/rewards_usage.d.ts +3 -3
- package/lib/schemas/models/specials.d.ts +18 -18
- package/lib/schemas/models/tenant.d.ts +3 -3
- package/lib/schemas/models/void_order_items.d.ts +3 -3
- package/lib/schemas/models/void_purchase_order_items.d.ts +3 -3
- package/lib/schemas/models/void_warehouse_invoice_items.d.ts +3 -3
- package/lib/schemas/models/vouchers.d.ts +3 -3
- package/lib/schemas/models/warehouse_invoices.d.ts +216 -216
- package/lib/schemas/models/warehouse_item_transactions.d.ts +3 -3
- package/lib/schemas/types/customer_redemptions.d.ts +13 -0
- package/lib/schemas/types/customer_redemptions.js +2 -0
- package/lib/schemas/types/index.d.ts +4 -3
- package/lib/schemas/types/index.js +4 -3
- package/lib/schemas/types/offers_fingerprints.d.ts +2 -4
- package/package.json +1 -1
|
@@ -24,6 +24,7 @@ __exportStar(require("./cash_in_out"), exports);
|
|
|
24
24
|
__exportStar(require("./category"), exports);
|
|
25
25
|
__exportStar(require("./close_dates"), exports);
|
|
26
26
|
__exportStar(require("./courses"), exports);
|
|
27
|
+
__exportStar(require("./customer_redemptions"), exports);
|
|
27
28
|
__exportStar(require("./customers"), exports);
|
|
28
29
|
__exportStar(require("./deliveries"), exports);
|
|
29
30
|
__exportStar(require("./delivery_areas"), exports);
|
|
@@ -33,6 +34,7 @@ __exportStar(require("./dinein_tables"), exports);
|
|
|
33
34
|
__exportStar(require("./discounts"), exports);
|
|
34
35
|
__exportStar(require("./expense_category"), exports);
|
|
35
36
|
__exportStar(require("./expense_details"), exports);
|
|
37
|
+
__exportStar(require("./gift_cards"), exports);
|
|
36
38
|
__exportStar(require("./halfhalf_setup"), exports);
|
|
37
39
|
__exportStar(require("./instore_shift_sessions"), exports);
|
|
38
40
|
__exportStar(require("./instore_shifts"), exports);
|
|
@@ -55,6 +57,7 @@ __exportStar(require("./public_holidays"), exports);
|
|
|
55
57
|
__exportStar(require("./purchase_orders"), exports);
|
|
56
58
|
__exportStar(require("./reservations"), exports);
|
|
57
59
|
__exportStar(require("./reviews"), exports);
|
|
60
|
+
__exportStar(require("./rewards_usage"), exports);
|
|
58
61
|
__exportStar(require("./rider"), exports);
|
|
59
62
|
__exportStar(require("./specials"), exports);
|
|
60
63
|
__exportStar(require("./staff_shifts"), exports);
|
|
@@ -66,10 +69,10 @@ __exportStar(require("./tenant_staff"), exports);
|
|
|
66
69
|
__exportStar(require("./terminal_devices"), exports);
|
|
67
70
|
__exportStar(require("./tokens"), exports);
|
|
68
71
|
__exportStar(require("./track_order_number"), exports);
|
|
69
|
-
__exportStar(require("./vouchers"), exports);
|
|
70
72
|
__exportStar(require("./void_order_items"), exports);
|
|
71
73
|
__exportStar(require("./void_purchase_order_items"), exports);
|
|
72
74
|
__exportStar(require("./void_warehouse_invoice_items"), exports);
|
|
75
|
+
__exportStar(require("./vouchers"), exports);
|
|
73
76
|
__exportStar(require("./wallet"), exports);
|
|
74
77
|
__exportStar(require("./wallet_transactions"), exports);
|
|
75
78
|
__exportStar(require("./warehouse"), exports);
|
|
@@ -83,5 +86,3 @@ __exportStar(require("./warehouse_operational_roles"), exports);
|
|
|
83
86
|
__exportStar(require("./warehouse_staff"), exports);
|
|
84
87
|
__exportStar(require("./warehouse_track_order_number"), exports);
|
|
85
88
|
__exportStar(require("./warehouse_vendors"), exports);
|
|
86
|
-
__exportStar(require("./gift_cards"), exports);
|
|
87
|
-
__exportStar(require("./rewards_usage"), exports);
|
|
@@ -15,8 +15,8 @@ export declare const ItemTransactionsSchema: Schema<any, import("mongoose").Mode
|
|
|
15
15
|
category_id: import("mongoose").Types.ObjectId;
|
|
16
16
|
transaction_type: import("../../constants").ITEM_TRANSACTION_TYPE_ENUM;
|
|
17
17
|
order_number: number;
|
|
18
|
-
item_id: import("mongoose").Types.ObjectId;
|
|
19
18
|
quantity: number;
|
|
19
|
+
item_id: import("mongoose").Types.ObjectId;
|
|
20
20
|
item_name: string;
|
|
21
21
|
category_name: string;
|
|
22
22
|
selling_price: number;
|
|
@@ -35,8 +35,8 @@ export declare const ItemTransactionsSchema: Schema<any, import("mongoose").Mode
|
|
|
35
35
|
category_id: import("mongoose").Types.ObjectId;
|
|
36
36
|
transaction_type: import("../../constants").ITEM_TRANSACTION_TYPE_ENUM;
|
|
37
37
|
order_number: number;
|
|
38
|
-
item_id: import("mongoose").Types.ObjectId;
|
|
39
38
|
quantity: number;
|
|
39
|
+
item_id: import("mongoose").Types.ObjectId;
|
|
40
40
|
item_name: string;
|
|
41
41
|
category_name: string;
|
|
42
42
|
selling_price: number;
|
|
@@ -55,8 +55,8 @@ export declare const ItemTransactionsSchema: Schema<any, import("mongoose").Mode
|
|
|
55
55
|
category_id: import("mongoose").Types.ObjectId;
|
|
56
56
|
transaction_type: import("../../constants").ITEM_TRANSACTION_TYPE_ENUM;
|
|
57
57
|
order_number: number;
|
|
58
|
-
item_id: import("mongoose").Types.ObjectId;
|
|
59
58
|
quantity: number;
|
|
59
|
+
item_id: import("mongoose").Types.ObjectId;
|
|
60
60
|
item_name: string;
|
|
61
61
|
category_name: string;
|
|
62
62
|
selling_price: number;
|
|
@@ -19,9 +19,63 @@ export declare const OfferSchema: Schema<any, import("mongoose").Model<any, any,
|
|
|
19
19
|
active: boolean;
|
|
20
20
|
sort_id: number;
|
|
21
21
|
included_platforms: import("../../constants").PLATFORMS_ENUM[];
|
|
22
|
+
reward_type: OFFER_REWARD_TYPE_ENUM;
|
|
22
23
|
auto_apply: boolean;
|
|
23
24
|
pathway_to_unlock_type: PATHWAY_TO_UNLOCK_TYPE_ENUM;
|
|
24
|
-
|
|
25
|
+
reward_discount?: {
|
|
26
|
+
is_discount_percentage: boolean;
|
|
27
|
+
excluded_refs: string[];
|
|
28
|
+
discount_value: number;
|
|
29
|
+
max_discount_amount?: number | null | undefined;
|
|
30
|
+
max_discount_percentage?: number | null | undefined;
|
|
31
|
+
} | null | undefined;
|
|
32
|
+
reward_discount_items?: {
|
|
33
|
+
is_discount_percentage: boolean;
|
|
34
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
35
|
+
num_of_items: number;
|
|
36
|
+
excluded_refs: string[];
|
|
37
|
+
exclusive_refs: string[];
|
|
38
|
+
discount_value: number;
|
|
39
|
+
allocation?: import("mongoose").Types.DocumentArray<{
|
|
40
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
41
|
+
quantity: number;
|
|
42
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
43
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
44
|
+
quantity: number;
|
|
45
|
+
}> & {
|
|
46
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
47
|
+
quantity: number;
|
|
48
|
+
}> | null | undefined;
|
|
49
|
+
} | null | undefined;
|
|
50
|
+
reward_points?: {
|
|
51
|
+
num_of_points: number;
|
|
52
|
+
once_per_order: boolean;
|
|
53
|
+
} | null | undefined;
|
|
54
|
+
reward_cashback?: {
|
|
55
|
+
excluded_refs: string[];
|
|
56
|
+
cashback_value: number;
|
|
57
|
+
is_cashback_percentage: boolean;
|
|
58
|
+
max_cashback_amount?: number | null | undefined;
|
|
59
|
+
} | null | undefined;
|
|
60
|
+
reward_items?: {
|
|
61
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
62
|
+
num_of_items: number;
|
|
63
|
+
excluded_refs: string[];
|
|
64
|
+
exclusive_refs: string[];
|
|
65
|
+
allocation?: import("mongoose").Types.DocumentArray<{
|
|
66
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
67
|
+
quantity: number;
|
|
68
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
69
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
70
|
+
quantity: number;
|
|
71
|
+
}> & {
|
|
72
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
73
|
+
quantity: number;
|
|
74
|
+
}> | null | undefined;
|
|
75
|
+
} | null | undefined;
|
|
76
|
+
reward_voucher?: {
|
|
77
|
+
voucher_ids: Map<string, number>;
|
|
78
|
+
} | null | undefined;
|
|
25
79
|
offer_special_hours?: import("mongoose").Types.DocumentArray<{
|
|
26
80
|
days_index: import("../../constants").DAY_INDEX_ENUM[];
|
|
27
81
|
disabled_outside_date_range: boolean;
|
|
@@ -309,9 +363,9 @@ export declare const OfferSchema: Schema<any, import("mongoose").Model<any, any,
|
|
|
309
363
|
} | null | undefined;
|
|
310
364
|
}> | null | undefined;
|
|
311
365
|
pathway_to_unlock_type_items?: {
|
|
366
|
+
num_of_items: number;
|
|
312
367
|
excluded_refs: string[];
|
|
313
368
|
exclusive_refs: string[];
|
|
314
|
-
num_of_items: number;
|
|
315
369
|
total_amount: number;
|
|
316
370
|
item_ids?: import("mongoose").Types.ObjectId[] | null | undefined;
|
|
317
371
|
max_claims?: number | null | undefined;
|
|
@@ -327,31 +381,36 @@ export declare const OfferSchema: Schema<any, import("mongoose").Model<any, any,
|
|
|
327
381
|
max_num_of_orders?: number | null | undefined;
|
|
328
382
|
} | null | undefined;
|
|
329
383
|
pathway_to_unlock_type_points?: {
|
|
330
|
-
total_amount: number;
|
|
331
384
|
num_of_points: number;
|
|
385
|
+
total_amount: number;
|
|
332
386
|
max_claims?: number | null | undefined;
|
|
333
387
|
} | null | undefined;
|
|
334
388
|
pathway_to_unlock_type_vouchers?: {
|
|
335
|
-
total_amount: number;
|
|
336
389
|
voucher_ids: import("mongoose").Types.ObjectId[];
|
|
390
|
+
total_amount: number;
|
|
337
391
|
max_amount?: number | null | undefined;
|
|
338
392
|
} | null | undefined;
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
excluded_refs: string[];
|
|
342
|
-
exclusive_refs: string[];
|
|
343
|
-
num_of_items: number;
|
|
344
|
-
allocation?: import("mongoose").Types.DocumentArray<{
|
|
345
|
-
item_ids: import("mongoose").Types.ObjectId[];
|
|
346
|
-
quantity: number;
|
|
347
|
-
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
348
|
-
item_ids: import("mongoose").Types.ObjectId[];
|
|
349
|
-
quantity: number;
|
|
350
|
-
}> & {
|
|
351
|
-
item_ids: import("mongoose").Types.ObjectId[];
|
|
352
|
-
quantity: number;
|
|
353
|
-
}> | null | undefined;
|
|
393
|
+
reward_gift_cards?: {
|
|
394
|
+
gift_card_ids: Map<string, number>;
|
|
354
395
|
} | null | undefined;
|
|
396
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
397
|
+
createdAt: NativeDate;
|
|
398
|
+
updatedAt: NativeDate;
|
|
399
|
+
} & {
|
|
400
|
+
_id: import("mongoose").Types.ObjectId;
|
|
401
|
+
name: string;
|
|
402
|
+
tenants: string[];
|
|
403
|
+
createdAt: NativeDate;
|
|
404
|
+
updatedAt: NativeDate;
|
|
405
|
+
image_url: string;
|
|
406
|
+
description: string;
|
|
407
|
+
brand_id: string;
|
|
408
|
+
active: boolean;
|
|
409
|
+
sort_id: number;
|
|
410
|
+
included_platforms: import("../../constants").PLATFORMS_ENUM[];
|
|
411
|
+
reward_type: OFFER_REWARD_TYPE_ENUM;
|
|
412
|
+
auto_apply: boolean;
|
|
413
|
+
pathway_to_unlock_type: PATHWAY_TO_UNLOCK_TYPE_ENUM;
|
|
355
414
|
reward_discount?: {
|
|
356
415
|
is_discount_percentage: boolean;
|
|
357
416
|
excluded_refs: string[];
|
|
@@ -362,9 +421,9 @@ export declare const OfferSchema: Schema<any, import("mongoose").Model<any, any,
|
|
|
362
421
|
reward_discount_items?: {
|
|
363
422
|
is_discount_percentage: boolean;
|
|
364
423
|
item_ids: import("mongoose").Types.ObjectId[];
|
|
424
|
+
num_of_items: number;
|
|
365
425
|
excluded_refs: string[];
|
|
366
426
|
exclusive_refs: string[];
|
|
367
|
-
num_of_items: number;
|
|
368
427
|
discount_value: number;
|
|
369
428
|
allocation?: import("mongoose").Types.DocumentArray<{
|
|
370
429
|
item_ids: import("mongoose").Types.ObjectId[];
|
|
@@ -387,30 +446,25 @@ export declare const OfferSchema: Schema<any, import("mongoose").Model<any, any,
|
|
|
387
446
|
is_cashback_percentage: boolean;
|
|
388
447
|
max_cashback_amount?: number | null | undefined;
|
|
389
448
|
} | null | undefined;
|
|
390
|
-
|
|
391
|
-
|
|
449
|
+
reward_items?: {
|
|
450
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
451
|
+
num_of_items: number;
|
|
452
|
+
excluded_refs: string[];
|
|
453
|
+
exclusive_refs: string[];
|
|
454
|
+
allocation?: import("mongoose").Types.DocumentArray<{
|
|
455
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
456
|
+
quantity: number;
|
|
457
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
458
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
459
|
+
quantity: number;
|
|
460
|
+
}> & {
|
|
461
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
462
|
+
quantity: number;
|
|
463
|
+
}> | null | undefined;
|
|
392
464
|
} | null | undefined;
|
|
393
465
|
reward_voucher?: {
|
|
394
466
|
voucher_ids: Map<string, number>;
|
|
395
467
|
} | null | undefined;
|
|
396
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
397
|
-
createdAt: NativeDate;
|
|
398
|
-
updatedAt: NativeDate;
|
|
399
|
-
} & {
|
|
400
|
-
_id: import("mongoose").Types.ObjectId;
|
|
401
|
-
name: string;
|
|
402
|
-
tenants: string[];
|
|
403
|
-
createdAt: NativeDate;
|
|
404
|
-
updatedAt: NativeDate;
|
|
405
|
-
image_url: string;
|
|
406
|
-
description: string;
|
|
407
|
-
brand_id: string;
|
|
408
|
-
active: boolean;
|
|
409
|
-
sort_id: number;
|
|
410
|
-
included_platforms: import("../../constants").PLATFORMS_ENUM[];
|
|
411
|
-
auto_apply: boolean;
|
|
412
|
-
pathway_to_unlock_type: PATHWAY_TO_UNLOCK_TYPE_ENUM;
|
|
413
|
-
reward_type: OFFER_REWARD_TYPE_ENUM;
|
|
414
468
|
offer_special_hours?: import("mongoose").Types.DocumentArray<{
|
|
415
469
|
days_index: import("../../constants").DAY_INDEX_ENUM[];
|
|
416
470
|
disabled_outside_date_range: boolean;
|
|
@@ -698,9 +752,9 @@ export declare const OfferSchema: Schema<any, import("mongoose").Model<any, any,
|
|
|
698
752
|
} | null | undefined;
|
|
699
753
|
}> | null | undefined;
|
|
700
754
|
pathway_to_unlock_type_items?: {
|
|
755
|
+
num_of_items: number;
|
|
701
756
|
excluded_refs: string[];
|
|
702
757
|
exclusive_refs: string[];
|
|
703
|
-
num_of_items: number;
|
|
704
758
|
total_amount: number;
|
|
705
759
|
item_ids?: import("mongoose").Types.ObjectId[] | null | undefined;
|
|
706
760
|
max_claims?: number | null | undefined;
|
|
@@ -716,31 +770,36 @@ export declare const OfferSchema: Schema<any, import("mongoose").Model<any, any,
|
|
|
716
770
|
max_num_of_orders?: number | null | undefined;
|
|
717
771
|
} | null | undefined;
|
|
718
772
|
pathway_to_unlock_type_points?: {
|
|
719
|
-
total_amount: number;
|
|
720
773
|
num_of_points: number;
|
|
774
|
+
total_amount: number;
|
|
721
775
|
max_claims?: number | null | undefined;
|
|
722
776
|
} | null | undefined;
|
|
723
777
|
pathway_to_unlock_type_vouchers?: {
|
|
724
|
-
total_amount: number;
|
|
725
778
|
voucher_ids: import("mongoose").Types.ObjectId[];
|
|
779
|
+
total_amount: number;
|
|
726
780
|
max_amount?: number | null | undefined;
|
|
727
781
|
} | null | undefined;
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
excluded_refs: string[];
|
|
731
|
-
exclusive_refs: string[];
|
|
732
|
-
num_of_items: number;
|
|
733
|
-
allocation?: import("mongoose").Types.DocumentArray<{
|
|
734
|
-
item_ids: import("mongoose").Types.ObjectId[];
|
|
735
|
-
quantity: number;
|
|
736
|
-
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
737
|
-
item_ids: import("mongoose").Types.ObjectId[];
|
|
738
|
-
quantity: number;
|
|
739
|
-
}> & {
|
|
740
|
-
item_ids: import("mongoose").Types.ObjectId[];
|
|
741
|
-
quantity: number;
|
|
742
|
-
}> | null | undefined;
|
|
782
|
+
reward_gift_cards?: {
|
|
783
|
+
gift_card_ids: Map<string, number>;
|
|
743
784
|
} | null | undefined;
|
|
785
|
+
}>> & import("mongoose").FlatRecord<{
|
|
786
|
+
createdAt: NativeDate;
|
|
787
|
+
updatedAt: NativeDate;
|
|
788
|
+
} & {
|
|
789
|
+
_id: import("mongoose").Types.ObjectId;
|
|
790
|
+
name: string;
|
|
791
|
+
tenants: string[];
|
|
792
|
+
createdAt: NativeDate;
|
|
793
|
+
updatedAt: NativeDate;
|
|
794
|
+
image_url: string;
|
|
795
|
+
description: string;
|
|
796
|
+
brand_id: string;
|
|
797
|
+
active: boolean;
|
|
798
|
+
sort_id: number;
|
|
799
|
+
included_platforms: import("../../constants").PLATFORMS_ENUM[];
|
|
800
|
+
reward_type: OFFER_REWARD_TYPE_ENUM;
|
|
801
|
+
auto_apply: boolean;
|
|
802
|
+
pathway_to_unlock_type: PATHWAY_TO_UNLOCK_TYPE_ENUM;
|
|
744
803
|
reward_discount?: {
|
|
745
804
|
is_discount_percentage: boolean;
|
|
746
805
|
excluded_refs: string[];
|
|
@@ -751,9 +810,9 @@ export declare const OfferSchema: Schema<any, import("mongoose").Model<any, any,
|
|
|
751
810
|
reward_discount_items?: {
|
|
752
811
|
is_discount_percentage: boolean;
|
|
753
812
|
item_ids: import("mongoose").Types.ObjectId[];
|
|
813
|
+
num_of_items: number;
|
|
754
814
|
excluded_refs: string[];
|
|
755
815
|
exclusive_refs: string[];
|
|
756
|
-
num_of_items: number;
|
|
757
816
|
discount_value: number;
|
|
758
817
|
allocation?: import("mongoose").Types.DocumentArray<{
|
|
759
818
|
item_ids: import("mongoose").Types.ObjectId[];
|
|
@@ -776,30 +835,25 @@ export declare const OfferSchema: Schema<any, import("mongoose").Model<any, any,
|
|
|
776
835
|
is_cashback_percentage: boolean;
|
|
777
836
|
max_cashback_amount?: number | null | undefined;
|
|
778
837
|
} | null | undefined;
|
|
779
|
-
|
|
780
|
-
|
|
838
|
+
reward_items?: {
|
|
839
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
840
|
+
num_of_items: number;
|
|
841
|
+
excluded_refs: string[];
|
|
842
|
+
exclusive_refs: string[];
|
|
843
|
+
allocation?: import("mongoose").Types.DocumentArray<{
|
|
844
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
845
|
+
quantity: number;
|
|
846
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
847
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
848
|
+
quantity: number;
|
|
849
|
+
}> & {
|
|
850
|
+
item_ids: import("mongoose").Types.ObjectId[];
|
|
851
|
+
quantity: number;
|
|
852
|
+
}> | null | undefined;
|
|
781
853
|
} | null | undefined;
|
|
782
854
|
reward_voucher?: {
|
|
783
855
|
voucher_ids: Map<string, number>;
|
|
784
856
|
} | null | undefined;
|
|
785
|
-
}>> & import("mongoose").FlatRecord<{
|
|
786
|
-
createdAt: NativeDate;
|
|
787
|
-
updatedAt: NativeDate;
|
|
788
|
-
} & {
|
|
789
|
-
_id: import("mongoose").Types.ObjectId;
|
|
790
|
-
name: string;
|
|
791
|
-
tenants: string[];
|
|
792
|
-
createdAt: NativeDate;
|
|
793
|
-
updatedAt: NativeDate;
|
|
794
|
-
image_url: string;
|
|
795
|
-
description: string;
|
|
796
|
-
brand_id: string;
|
|
797
|
-
active: boolean;
|
|
798
|
-
sort_id: number;
|
|
799
|
-
included_platforms: import("../../constants").PLATFORMS_ENUM[];
|
|
800
|
-
auto_apply: boolean;
|
|
801
|
-
pathway_to_unlock_type: PATHWAY_TO_UNLOCK_TYPE_ENUM;
|
|
802
|
-
reward_type: OFFER_REWARD_TYPE_ENUM;
|
|
803
857
|
offer_special_hours?: import("mongoose").Types.DocumentArray<{
|
|
804
858
|
days_index: import("../../constants").DAY_INDEX_ENUM[];
|
|
805
859
|
disabled_outside_date_range: boolean;
|
|
@@ -1087,9 +1141,9 @@ export declare const OfferSchema: Schema<any, import("mongoose").Model<any, any,
|
|
|
1087
1141
|
} | null | undefined;
|
|
1088
1142
|
}> | null | undefined;
|
|
1089
1143
|
pathway_to_unlock_type_items?: {
|
|
1144
|
+
num_of_items: number;
|
|
1090
1145
|
excluded_refs: string[];
|
|
1091
1146
|
exclusive_refs: string[];
|
|
1092
|
-
num_of_items: number;
|
|
1093
1147
|
total_amount: number;
|
|
1094
1148
|
item_ids?: import("mongoose").Types.ObjectId[] | null | undefined;
|
|
1095
1149
|
max_claims?: number | null | undefined;
|
|
@@ -1105,72 +1159,18 @@ export declare const OfferSchema: Schema<any, import("mongoose").Model<any, any,
|
|
|
1105
1159
|
max_num_of_orders?: number | null | undefined;
|
|
1106
1160
|
} | null | undefined;
|
|
1107
1161
|
pathway_to_unlock_type_points?: {
|
|
1108
|
-
total_amount: number;
|
|
1109
1162
|
num_of_points: number;
|
|
1163
|
+
total_amount: number;
|
|
1110
1164
|
max_claims?: number | null | undefined;
|
|
1111
1165
|
} | null | undefined;
|
|
1112
1166
|
pathway_to_unlock_type_vouchers?: {
|
|
1113
|
-
total_amount: number;
|
|
1114
1167
|
voucher_ids: import("mongoose").Types.ObjectId[];
|
|
1168
|
+
total_amount: number;
|
|
1115
1169
|
max_amount?: number | null | undefined;
|
|
1116
1170
|
} | null | undefined;
|
|
1117
|
-
reward_items?: {
|
|
1118
|
-
item_ids: import("mongoose").Types.ObjectId[];
|
|
1119
|
-
excluded_refs: string[];
|
|
1120
|
-
exclusive_refs: string[];
|
|
1121
|
-
num_of_items: number;
|
|
1122
|
-
allocation?: import("mongoose").Types.DocumentArray<{
|
|
1123
|
-
item_ids: import("mongoose").Types.ObjectId[];
|
|
1124
|
-
quantity: number;
|
|
1125
|
-
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
1126
|
-
item_ids: import("mongoose").Types.ObjectId[];
|
|
1127
|
-
quantity: number;
|
|
1128
|
-
}> & {
|
|
1129
|
-
item_ids: import("mongoose").Types.ObjectId[];
|
|
1130
|
-
quantity: number;
|
|
1131
|
-
}> | null | undefined;
|
|
1132
|
-
} | null | undefined;
|
|
1133
|
-
reward_discount?: {
|
|
1134
|
-
is_discount_percentage: boolean;
|
|
1135
|
-
excluded_refs: string[];
|
|
1136
|
-
discount_value: number;
|
|
1137
|
-
max_discount_amount?: number | null | undefined;
|
|
1138
|
-
max_discount_percentage?: number | null | undefined;
|
|
1139
|
-
} | null | undefined;
|
|
1140
|
-
reward_discount_items?: {
|
|
1141
|
-
is_discount_percentage: boolean;
|
|
1142
|
-
item_ids: import("mongoose").Types.ObjectId[];
|
|
1143
|
-
excluded_refs: string[];
|
|
1144
|
-
exclusive_refs: string[];
|
|
1145
|
-
num_of_items: number;
|
|
1146
|
-
discount_value: number;
|
|
1147
|
-
allocation?: import("mongoose").Types.DocumentArray<{
|
|
1148
|
-
item_ids: import("mongoose").Types.ObjectId[];
|
|
1149
|
-
quantity: number;
|
|
1150
|
-
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
1151
|
-
item_ids: import("mongoose").Types.ObjectId[];
|
|
1152
|
-
quantity: number;
|
|
1153
|
-
}> & {
|
|
1154
|
-
item_ids: import("mongoose").Types.ObjectId[];
|
|
1155
|
-
quantity: number;
|
|
1156
|
-
}> | null | undefined;
|
|
1157
|
-
} | null | undefined;
|
|
1158
|
-
reward_points?: {
|
|
1159
|
-
num_of_points: number;
|
|
1160
|
-
once_per_order: boolean;
|
|
1161
|
-
} | null | undefined;
|
|
1162
|
-
reward_cashback?: {
|
|
1163
|
-
excluded_refs: string[];
|
|
1164
|
-
cashback_value: number;
|
|
1165
|
-
is_cashback_percentage: boolean;
|
|
1166
|
-
max_cashback_amount?: number | null | undefined;
|
|
1167
|
-
} | null | undefined;
|
|
1168
1171
|
reward_gift_cards?: {
|
|
1169
1172
|
gift_card_ids: Map<string, number>;
|
|
1170
1173
|
} | null | undefined;
|
|
1171
|
-
reward_voucher?: {
|
|
1172
|
-
voucher_ids: Map<string, number>;
|
|
1173
|
-
} | null | undefined;
|
|
1174
1174
|
}> & Required<{
|
|
1175
1175
|
_id: import("mongoose").Types.ObjectId;
|
|
1176
1176
|
}> & {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Schema } from 'mongoose';
|
|
2
|
-
import { OFFER_FINGERPRINT_TYPE_ENUM } from '../../constants';
|
|
3
2
|
export declare const OfferFingerprintSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
4
3
|
timestamps: true;
|
|
5
4
|
versionKey: false;
|
|
@@ -9,46 +8,43 @@ export declare const OfferFingerprintSchema: Schema<any, import("mongoose").Mode
|
|
|
9
8
|
updatedAt: NativeDate;
|
|
10
9
|
} & {
|
|
11
10
|
_id: import("mongoose").Types.ObjectId;
|
|
12
|
-
type: OFFER_FINGERPRINT_TYPE_ENUM;
|
|
13
11
|
tenants: string[];
|
|
12
|
+
order_id: import("mongoose").Types.ObjectId;
|
|
14
13
|
createdAt_mins: number;
|
|
15
14
|
createdAt: NativeDate;
|
|
16
15
|
updatedAt: NativeDate;
|
|
17
16
|
brand_id: string;
|
|
18
17
|
customer_phone: string;
|
|
18
|
+
customer_name: string;
|
|
19
19
|
offer_id: import("mongoose").Types.ObjectId;
|
|
20
|
-
redeemed_times: number;
|
|
21
|
-
redeemed_at: NativeDate;
|
|
22
20
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
23
21
|
createdAt: NativeDate;
|
|
24
22
|
updatedAt: NativeDate;
|
|
25
23
|
} & {
|
|
26
24
|
_id: import("mongoose").Types.ObjectId;
|
|
27
|
-
type: OFFER_FINGERPRINT_TYPE_ENUM;
|
|
28
25
|
tenants: string[];
|
|
26
|
+
order_id: import("mongoose").Types.ObjectId;
|
|
29
27
|
createdAt_mins: number;
|
|
30
28
|
createdAt: NativeDate;
|
|
31
29
|
updatedAt: NativeDate;
|
|
32
30
|
brand_id: string;
|
|
33
31
|
customer_phone: string;
|
|
32
|
+
customer_name: string;
|
|
34
33
|
offer_id: import("mongoose").Types.ObjectId;
|
|
35
|
-
redeemed_times: number;
|
|
36
|
-
redeemed_at: NativeDate;
|
|
37
34
|
}>> & import("mongoose").FlatRecord<{
|
|
38
35
|
createdAt: NativeDate;
|
|
39
36
|
updatedAt: NativeDate;
|
|
40
37
|
} & {
|
|
41
38
|
_id: import("mongoose").Types.ObjectId;
|
|
42
|
-
type: OFFER_FINGERPRINT_TYPE_ENUM;
|
|
43
39
|
tenants: string[];
|
|
40
|
+
order_id: import("mongoose").Types.ObjectId;
|
|
44
41
|
createdAt_mins: number;
|
|
45
42
|
createdAt: NativeDate;
|
|
46
43
|
updatedAt: NativeDate;
|
|
47
44
|
brand_id: string;
|
|
48
45
|
customer_phone: string;
|
|
46
|
+
customer_name: string;
|
|
49
47
|
offer_id: import("mongoose").Types.ObjectId;
|
|
50
|
-
redeemed_times: number;
|
|
51
|
-
redeemed_at: NativeDate;
|
|
52
48
|
}> & Required<{
|
|
53
49
|
_id: import("mongoose").Types.ObjectId;
|
|
54
50
|
}> & {
|
|
@@ -2,7 +2,6 @@
|
|
|
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");
|
|
6
5
|
exports.OfferFingerprintSchema = new mongoose_1.Schema({
|
|
7
6
|
_id: {
|
|
8
7
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
@@ -25,25 +24,21 @@ exports.OfferFingerprintSchema = new mongoose_1.Schema({
|
|
|
25
24
|
immutable: true,
|
|
26
25
|
ref: 'offers',
|
|
27
26
|
},
|
|
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
|
-
},
|
|
34
27
|
customer_phone: {
|
|
35
28
|
type: String,
|
|
36
29
|
required: true,
|
|
37
30
|
immutable: true,
|
|
38
31
|
},
|
|
39
|
-
|
|
40
|
-
type:
|
|
41
|
-
|
|
32
|
+
customer_name: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: true,
|
|
35
|
+
default: 'N/A',
|
|
42
36
|
},
|
|
43
|
-
|
|
44
|
-
type: mongoose_1.Schema.Types.
|
|
37
|
+
order_id: {
|
|
38
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
45
39
|
required: true,
|
|
46
|
-
|
|
40
|
+
immutable: true,
|
|
41
|
+
ref: 'orders',
|
|
47
42
|
},
|
|
48
43
|
createdAt_mins: {
|
|
49
44
|
type: Number,
|