@managesome/eposmatic-toolkit 0.2.659 → 0.2.675
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/helpers/types/order-engine.d.ts +3 -0
- package/lib/helpers/utils/halfhalf-setup-helpers.d.ts +8 -5
- package/lib/helpers/utils/halfhalf-setup-helpers.js +65 -27
- package/lib/helpers/utils/order-engine.js +7 -1
- package/lib/helpers/utils/receipt-engine.js +63 -0
- package/lib/helpers/utils/specials-helpers.d.ts +13 -2
- package/lib/helpers/utils/specials-helpers.js +91 -27
- package/lib/schemas/models/halfhalf_setup.d.ts +58 -3
- package/lib/schemas/models/halfhalf_setup.js +24 -4
- package/lib/schemas/models/orders.d.ts +324 -0
- package/lib/schemas/models/orders.js +12 -0
- package/lib/schemas/models/specials.js +2 -0
- package/lib/schemas/types/halfhalf_setup.d.ts +6 -1
- package/lib/schemas/types/orders.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { Schema } from 'mongoose';
|
|
2
|
+
export declare const HalfHalfSegmentSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
3
|
+
minimize: false;
|
|
4
|
+
}, {
|
|
5
|
+
_id: import("mongoose").Types.ObjectId;
|
|
6
|
+
name: string;
|
|
7
|
+
sort_id: number;
|
|
8
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
9
|
+
_id: import("mongoose").Types.ObjectId;
|
|
10
|
+
name: string;
|
|
11
|
+
sort_id: number;
|
|
12
|
+
}>> & import("mongoose").FlatRecord<{
|
|
13
|
+
_id: import("mongoose").Types.ObjectId;
|
|
14
|
+
name: string;
|
|
15
|
+
sort_id: number;
|
|
16
|
+
}> & Required<{
|
|
17
|
+
_id: import("mongoose").Types.ObjectId;
|
|
18
|
+
}> & {
|
|
19
|
+
__v: number;
|
|
20
|
+
}>;
|
|
2
21
|
export declare const HalfHalfSetupSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
3
22
|
timestamps: true;
|
|
4
23
|
versionKey: false;
|
|
@@ -490,7 +509,19 @@ export declare const HalfHalfSetupSchema: Schema<any, import("mongoose").Model<a
|
|
|
490
509
|
}>;
|
|
491
510
|
excluded_refs: string[];
|
|
492
511
|
exclusive_refs: string[];
|
|
493
|
-
segments:
|
|
512
|
+
segments: import("mongoose").Types.DocumentArray<{
|
|
513
|
+
_id: import("mongoose").Types.ObjectId;
|
|
514
|
+
name: string;
|
|
515
|
+
sort_id: number;
|
|
516
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
517
|
+
_id: import("mongoose").Types.ObjectId;
|
|
518
|
+
name: string;
|
|
519
|
+
sort_id: number;
|
|
520
|
+
}> & {
|
|
521
|
+
_id: import("mongoose").Types.ObjectId;
|
|
522
|
+
name: string;
|
|
523
|
+
sort_id: number;
|
|
524
|
+
}>;
|
|
494
525
|
upsell_price: {
|
|
495
526
|
"POS_WALK-IN": number;
|
|
496
527
|
"POS_TAKE-AWAY": number;
|
|
@@ -1022,7 +1053,19 @@ export declare const HalfHalfSetupSchema: Schema<any, import("mongoose").Model<a
|
|
|
1022
1053
|
}>;
|
|
1023
1054
|
excluded_refs: string[];
|
|
1024
1055
|
exclusive_refs: string[];
|
|
1025
|
-
segments:
|
|
1056
|
+
segments: import("mongoose").Types.DocumentArray<{
|
|
1057
|
+
_id: import("mongoose").Types.ObjectId;
|
|
1058
|
+
name: string;
|
|
1059
|
+
sort_id: number;
|
|
1060
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
1061
|
+
_id: import("mongoose").Types.ObjectId;
|
|
1062
|
+
name: string;
|
|
1063
|
+
sort_id: number;
|
|
1064
|
+
}> & {
|
|
1065
|
+
_id: import("mongoose").Types.ObjectId;
|
|
1066
|
+
name: string;
|
|
1067
|
+
sort_id: number;
|
|
1068
|
+
}>;
|
|
1026
1069
|
upsell_price: {
|
|
1027
1070
|
"POS_WALK-IN": number;
|
|
1028
1071
|
"POS_TAKE-AWAY": number;
|
|
@@ -1554,7 +1597,19 @@ export declare const HalfHalfSetupSchema: Schema<any, import("mongoose").Model<a
|
|
|
1554
1597
|
}>;
|
|
1555
1598
|
excluded_refs: string[];
|
|
1556
1599
|
exclusive_refs: string[];
|
|
1557
|
-
segments:
|
|
1600
|
+
segments: import("mongoose").Types.DocumentArray<{
|
|
1601
|
+
_id: import("mongoose").Types.ObjectId;
|
|
1602
|
+
name: string;
|
|
1603
|
+
sort_id: number;
|
|
1604
|
+
}, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
|
|
1605
|
+
_id: import("mongoose").Types.ObjectId;
|
|
1606
|
+
name: string;
|
|
1607
|
+
sort_id: number;
|
|
1608
|
+
}> & {
|
|
1609
|
+
_id: import("mongoose").Types.ObjectId;
|
|
1610
|
+
name: string;
|
|
1611
|
+
sort_id: number;
|
|
1612
|
+
}>;
|
|
1558
1613
|
upsell_price: {
|
|
1559
1614
|
"POS_WALK-IN": number;
|
|
1560
1615
|
"POS_TAKE-AWAY": number;
|
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HALFHALF_COLLECTION_INDEXES = exports.HALFHALF_COLLECTION_NAME = exports.HalfHalfSetupSchema = void 0;
|
|
3
|
+
exports.HALFHALF_COLLECTION_INDEXES = exports.HALFHALF_COLLECTION_NAME = exports.HalfHalfSetupSchema = exports.HalfHalfSegmentSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const categories_1 = require("./categories");
|
|
6
6
|
const common_models_1 = require("./common-models");
|
|
7
7
|
const items_1 = require("./items");
|
|
8
8
|
const specials_1 = require("./specials");
|
|
9
9
|
const tenants_1 = require("./tenants");
|
|
10
|
+
exports.HalfHalfSegmentSchema = new mongoose_1.Schema({
|
|
11
|
+
_id: {
|
|
12
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
13
|
+
required: true,
|
|
14
|
+
immutable: true,
|
|
15
|
+
},
|
|
16
|
+
// `_id` is auto-generated as a BSON ObjectId by mongoose
|
|
17
|
+
name: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
sort_id: {
|
|
22
|
+
type: Number,
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
}, {
|
|
26
|
+
minimize: false,
|
|
27
|
+
});
|
|
10
28
|
exports.HalfHalfSetupSchema = new mongoose_1.Schema({
|
|
11
29
|
_id: {
|
|
12
30
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
@@ -35,10 +53,12 @@ exports.HalfHalfSetupSchema = new mongoose_1.Schema({
|
|
|
35
53
|
min: 1,
|
|
36
54
|
},
|
|
37
55
|
segments: {
|
|
38
|
-
type:
|
|
56
|
+
type: [exports.HalfHalfSegmentSchema],
|
|
39
57
|
required: true,
|
|
40
|
-
|
|
41
|
-
|
|
58
|
+
validate: {
|
|
59
|
+
validator: (value) => Array.isArray(value) && (value.length === 2 || value.length === 4),
|
|
60
|
+
message: 'segments must have a length of 2 or 4',
|
|
61
|
+
},
|
|
42
62
|
},
|
|
43
63
|
image_url: {
|
|
44
64
|
type: String,
|