@lyxa.ai/core 1.0.16 → 1.0.18
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/dist/libraries/mongo/models/base/base-review.model.d.ts +1 -1
- package/dist/libraries/mongo/models/base/base-review.model.js +2 -2
- package/dist/libraries/mongo/models/base/base-review.model.js.map +1 -1
- package/dist/libraries/mongo/models/cart-lineitem.model.d.ts +29 -0
- package/dist/libraries/mongo/models/cart-lineitem.model.js +120 -0
- package/dist/libraries/mongo/models/cart-lineitem.model.js.map +1 -0
- package/dist/libraries/mongo/models/cart-perticipant.model.d.ts +22 -0
- package/dist/libraries/mongo/models/cart-perticipant.model.js +104 -0
- package/dist/libraries/mongo/models/cart-perticipant.model.js.map +1 -0
- package/dist/libraries/mongo/models/cart.model.d.ts +19 -0
- package/dist/libraries/mongo/models/cart.model.js +117 -0
- package/dist/libraries/mongo/models/cart.model.js.map +1 -0
- package/dist/libraries/mongo/models/index.d.ts +1 -0
- package/dist/libraries/mongo/models/index.js +2 -1
- package/dist/libraries/mongo/models/index.js.map +1 -1
- package/dist/utilities/enum.d.ts +14 -0
- package/dist/utilities/enum.js +18 -1
- package/dist/utilities/enum.js.map +1 -1
- package/dist/utilities/response.d.ts +5 -0
- package/dist/utilities/response.js +10 -0
- package/dist/utilities/response.js.map +1 -0
- package/dist/utilities/validation/common-validation.d.ts +10 -0
- package/dist/utilities/validation/common-validation.js +5 -1
- package/dist/utilities/validation/common-validation.js.map +1 -1
- package/package.json +3 -1
|
@@ -20,7 +20,7 @@ class BaseReview extends defaultClasses_1.TimeStamps {
|
|
|
20
20
|
rating;
|
|
21
21
|
order;
|
|
22
22
|
tags;
|
|
23
|
-
|
|
23
|
+
isVisible;
|
|
24
24
|
deletedBy;
|
|
25
25
|
}
|
|
26
26
|
exports.BaseReview = BaseReview;
|
|
@@ -47,7 +47,7 @@ __decorate([
|
|
|
47
47
|
__decorate([
|
|
48
48
|
(0, typegoose_1.prop)({ type: Boolean, default: true }),
|
|
49
49
|
__metadata("design:type", Boolean)
|
|
50
|
-
], BaseReview.prototype, "
|
|
50
|
+
], BaseReview.prototype, "isVisible", void 0);
|
|
51
51
|
__decorate([
|
|
52
52
|
(0, typegoose_1.prop)({ type: typegoose_1.mongoose.Types.ObjectId }),
|
|
53
53
|
__metadata("design:type", typegoose_1.mongoose.Types.ObjectId)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-review.model.js","sourceRoot":"/","sources":["libraries/mongo/models/base/base-review.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2D;AAC3D,4EAAqE;AACrE,wDAA8C;AAC9C,gDAAuC;AAEvC,MAAa,UAAW,SAAQ,2BAAU;IAElC,IAAI,CAAiB;IAGrB,WAAW,CAAU;IAGrB,MAAM,CAAU;IAGhB,KAAK,CAAc;IAGnB,IAAI,CAAY;IAGhB,
|
|
1
|
+
{"version":3,"file":"base-review.model.js","sourceRoot":"/","sources":["libraries/mongo/models/base/base-review.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2D;AAC3D,4EAAqE;AACrE,wDAA8C;AAC9C,gDAAuC;AAEvC,MAAa,UAAW,SAAQ,2BAAU;IAElC,IAAI,CAAiB;IAGrB,WAAW,CAAU;IAGrB,MAAM,CAAU;IAGhB,KAAK,CAAc;IAGnB,IAAI,CAAY;IAGhB,SAAS,CAAW;IAGpB,SAAS,CAA2B;CAC3C;AArBD,gCAqBC;AAnBO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ,EAAE,CAAC;;wCAClB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CACX;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;0CAChC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;yCACjB;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;;wCACR;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;6CACZ;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,oBAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;8BACrB,oBAAQ,CAAC,KAAK,CAAC,QAAQ;6CAAC","sourcesContent":["import { mongoose, prop, Ref } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { CoreUser } from '../core-user.model';\r\nimport { Order } from '../order.model';\r\n\r\nexport class BaseReview extends TimeStamps {\r\n\t@prop({ required: true, ref: () => CoreUser })\r\n\tpublic user!: Ref<CoreUser>;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic description!: string;\r\n\r\n\t@prop({ required: true, type: Number, min: 1, max: 5 })\r\n\tpublic rating!: number;\r\n\r\n\t@prop({ required: true, ref: () => Order })\r\n\tpublic order!: Ref<Order>;\r\n\r\n\t@prop({ type: () => [String] })\r\n\tpublic tags?: string[];\r\n\r\n\t@prop({ type: Boolean, default: true })\r\n\tpublic isVisible?: boolean;\r\n\r\n\t@prop({ type: mongoose.Types.ObjectId })\r\n\tpublic deletedBy?: mongoose.Types.ObjectId;\r\n}\r\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Ref, ReturnModelType } from '@typegoose/typegoose';
|
|
2
|
+
import { CoreUser } from './core-user.model';
|
|
3
|
+
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
4
|
+
import { Cart } from './cart.model';
|
|
5
|
+
import { Product } from './product.model';
|
|
6
|
+
import { Attribute } from './attribute.model';
|
|
7
|
+
import { AttributeItem } from './embedded/attribute-item.model';
|
|
8
|
+
export declare class Portion {
|
|
9
|
+
price: number;
|
|
10
|
+
size?: string;
|
|
11
|
+
unit?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class AddOn {
|
|
14
|
+
attribute: Ref<Attribute>;
|
|
15
|
+
attributeItem: AttributeItem;
|
|
16
|
+
price: number;
|
|
17
|
+
}
|
|
18
|
+
export declare class LineItem extends TimeStamps {
|
|
19
|
+
cart: Ref<Cart>;
|
|
20
|
+
user?: Ref<CoreUser>;
|
|
21
|
+
product: Ref<Product>;
|
|
22
|
+
quantity: number;
|
|
23
|
+
unitPrice: number;
|
|
24
|
+
portion?: Portion;
|
|
25
|
+
addOns?: AddOn[];
|
|
26
|
+
removedIngredients?: string[];
|
|
27
|
+
specialInstructions?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const LineItemModel: ReturnModelType<typeof LineItem>;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LineItemModel = exports.LineItem = exports.AddOn = exports.Portion = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const core_user_model_1 = require("./core-user.model");
|
|
15
|
+
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
16
|
+
const cart_model_1 = require("./cart.model");
|
|
17
|
+
const product_model_1 = require("./product.model");
|
|
18
|
+
const attribute_model_1 = require("./attribute.model");
|
|
19
|
+
const attribute_item_model_1 = require("./embedded/attribute-item.model");
|
|
20
|
+
class Portion {
|
|
21
|
+
price;
|
|
22
|
+
size;
|
|
23
|
+
unit;
|
|
24
|
+
}
|
|
25
|
+
exports.Portion = Portion;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typegoose_1.prop)({ required: true }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], Portion.prototype, "price", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typegoose_1.prop)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], Portion.prototype, "size", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typegoose_1.prop)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Portion.prototype, "unit", void 0);
|
|
38
|
+
class AddOn {
|
|
39
|
+
attribute;
|
|
40
|
+
attributeItem;
|
|
41
|
+
price;
|
|
42
|
+
}
|
|
43
|
+
exports.AddOn = AddOn;
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typegoose_1.prop)({ required: true, ref: () => attribute_model_1.Attribute }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], AddOn.prototype, "attribute", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typegoose_1.prop)({ required: true }),
|
|
50
|
+
__metadata("design:type", attribute_item_model_1.AttributeItem)
|
|
51
|
+
], AddOn.prototype, "attributeItem", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typegoose_1.prop)({ required: true, default: 0 }),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], AddOn.prototype, "price", void 0);
|
|
56
|
+
let LineItem = class LineItem extends defaultClasses_1.TimeStamps {
|
|
57
|
+
cart;
|
|
58
|
+
user;
|
|
59
|
+
product;
|
|
60
|
+
quantity;
|
|
61
|
+
unitPrice;
|
|
62
|
+
portion;
|
|
63
|
+
addOns;
|
|
64
|
+
removedIngredients;
|
|
65
|
+
specialInstructions;
|
|
66
|
+
};
|
|
67
|
+
exports.LineItem = LineItem;
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typegoose_1.prop)({ required: true, ref: () => cart_model_1.Cart }),
|
|
70
|
+
__metadata("design:type", Object)
|
|
71
|
+
], LineItem.prototype, "cart", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typegoose_1.prop)({ required: false, ref: () => core_user_model_1.CoreUser }),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], LineItem.prototype, "user", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typegoose_1.prop)({ required: true, ref: () => product_model_1.Product }),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], LineItem.prototype, "product", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typegoose_1.prop)({ required: true, min: 1, default: 1 }),
|
|
82
|
+
__metadata("design:type", Number)
|
|
83
|
+
], LineItem.prototype, "quantity", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typegoose_1.prop)(),
|
|
86
|
+
__metadata("design:type", Number)
|
|
87
|
+
], LineItem.prototype, "unitPrice", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typegoose_1.prop)({ type: () => Portion }),
|
|
90
|
+
__metadata("design:type", Portion)
|
|
91
|
+
], LineItem.prototype, "portion", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typegoose_1.prop)({ type: () => [AddOn], default: [] }),
|
|
94
|
+
__metadata("design:type", Array)
|
|
95
|
+
], LineItem.prototype, "addOns", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typegoose_1.prop)({ type: () => [String], default: [] }),
|
|
98
|
+
__metadata("design:type", Array)
|
|
99
|
+
], LineItem.prototype, "removedIngredients", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typegoose_1.prop)(),
|
|
102
|
+
__metadata("design:type", String)
|
|
103
|
+
], LineItem.prototype, "specialInstructions", void 0);
|
|
104
|
+
exports.LineItem = LineItem = __decorate([
|
|
105
|
+
(0, typegoose_1.modelOptions)({
|
|
106
|
+
schemaOptions: {
|
|
107
|
+
collection: 'lineItems',
|
|
108
|
+
toJSON: { virtuals: true },
|
|
109
|
+
toObject: { virtuals: true },
|
|
110
|
+
},
|
|
111
|
+
options: {
|
|
112
|
+
allowMixed: typegoose_1.Severity.ALLOW,
|
|
113
|
+
},
|
|
114
|
+
}),
|
|
115
|
+
(0, typegoose_1.index)({ cart: 1 }),
|
|
116
|
+
(0, typegoose_1.index)({ cart: 1, user: 1 }),
|
|
117
|
+
(0, typegoose_1.index)({ product: 1 })
|
|
118
|
+
], LineItem);
|
|
119
|
+
exports.LineItemModel = (0, typegoose_1.getModelForClass)(LineItem);
|
|
120
|
+
//# sourceMappingURL=cart-lineitem.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cart-lineitem.model.js","sourceRoot":"/","sources":["libraries/mongo/models/cart-lineitem.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAQ8B;AAC9B,uDAA6C;AAC7C,4EAAqE;AACrE,6CAAoC;AACpC,mDAA0C;AAC1C,uDAA8C;AAC9C,0EAAgE;AAEhE,MAAa,OAAO;IAEZ,KAAK,CAAU;IAGf,IAAI,CAAU;IAGd,IAAI,CAAU;CACrB;AATD,0BASC;AAPO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACH;AAGf;IADN,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gBAAI,GAAE;;2CACmB;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;8BACb,OAAO;yCAAC;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;wCACnB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;oDACP;AAG9B;IADN,IAAA,gBAAI,GAAE;;qDAC6B;mBA1BxB,QAAQ;IAbpB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE;YACd,UAAU,EAAE,WAAW;YACvB,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC1B,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;SAC5B;QACD,OAAO,EAAE;YACR,UAAU,EAAE,oBAAQ,CAAC,KAAK;SAC1B;KACD,CAAC;IACD,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAClB,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAC3B,IAAA,iBAAK,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;GACT,QAAQ,CA2BpB;AAEY,QAAA,aAAa,GAAqC,IAAA,4BAAgB,EAAC,QAAQ,CAAC,CAAC","sourcesContent":["import {\r\n\tprop,\r\n\tgetModelForClass,\r\n\tRef,\r\n\tindex,\r\n\tmodelOptions,\r\n\tSeverity,\r\n\tReturnModelType,\r\n} from '@typegoose/typegoose';\r\nimport { CoreUser } from './core-user.model';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { Cart } from './cart.model';\r\nimport { Product } from './product.model';\r\nimport { Attribute } from './attribute.model';\r\nimport { AttributeItem } from './embedded/attribute-item.model';\r\n\r\nexport class Portion {\r\n\t@prop({ required: true })\r\n\tpublic price!: number;\r\n\r\n\t@prop()\r\n\tpublic size?: string;\r\n\r\n\t@prop()\r\n\tpublic unit?: string;\r\n}\r\n\r\nexport class AddOn {\r\n\t@prop({ required: true, ref: () => Attribute })\r\n\tpublic attribute!: Ref<Attribute>;\r\n\r\n\t@prop({ required: true })\r\n\tpublic attributeItem!: AttributeItem;\r\n\r\n\t@prop({ required: true, default: 0 })\r\n\tpublic price!: number;\r\n}\r\n\r\n/**\r\n * LineItem model - Represents individual items in a cart\r\n */\r\n@modelOptions({\r\n\tschemaOptions: {\r\n\t\tcollection: 'lineItems',\r\n\t\ttoJSON: { virtuals: true },\r\n\t\ttoObject: { virtuals: true },\r\n\t},\r\n\toptions: {\r\n\t\tallowMixed: Severity.ALLOW,\r\n\t},\r\n})\r\n@index({ cart: 1 })\r\n@index({ cart: 1, user: 1 })\r\n@index({ product: 1 })\r\nexport class LineItem extends TimeStamps {\r\n\t@prop({ required: true, ref: () => Cart })\r\n\tpublic cart!: Ref<Cart>;\r\n\r\n\t@prop({ required: false, ref: () => CoreUser })\r\n\tpublic user?: Ref<CoreUser>;\r\n\r\n\t@prop({ required: true, ref: () => Product })\r\n\tpublic product!: Ref<Product>;\r\n\r\n\t@prop({ required: true, min: 1, default: 1 })\r\n\tpublic quantity!: number;\r\n\r\n\t@prop()\r\n\tpublic unitPrice!: number;\r\n\r\n\t@prop({ type: () => Portion })\r\n\tpublic portion?: Portion;\r\n\r\n\t@prop({ type: () => [AddOn], default: [] })\r\n\tpublic addOns?: AddOn[];\r\n\r\n\t@prop({ type: () => [String], default: [] })\r\n\tpublic removedIngredients?: string[];\r\n\r\n\t@prop()\r\n\tpublic specialInstructions?: string;\r\n}\r\n\r\nexport const LineItemModel: ReturnModelType<typeof LineItem> = getModelForClass(LineItem);\r\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Ref, ReturnModelType } from '@typegoose/typegoose';
|
|
2
|
+
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
3
|
+
import { Cart } from './cart.model';
|
|
4
|
+
import { CoreUser } from './core-user.model';
|
|
5
|
+
import { PaymentGateway, PaymentMethod } from '../../../utilities/enum';
|
|
6
|
+
export declare class PaymentInformation {
|
|
7
|
+
paymentGateway: PaymentGateway;
|
|
8
|
+
referenceId?: string;
|
|
9
|
+
transactionId?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class CartParticipant extends TimeStamps {
|
|
12
|
+
cart: Ref<Cart>;
|
|
13
|
+
user: Ref<CoreUser>;
|
|
14
|
+
joinedAt: Date;
|
|
15
|
+
isReady: boolean;
|
|
16
|
+
isPaid: boolean;
|
|
17
|
+
readyAt?: Date;
|
|
18
|
+
spentAmount: number;
|
|
19
|
+
paymentMethod?: PaymentMethod;
|
|
20
|
+
paymentInformation?: PaymentInformation;
|
|
21
|
+
}
|
|
22
|
+
export declare const CartParticipantModel: ReturnModelType<typeof CartParticipant>;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CartParticipantModel = exports.CartParticipant = exports.PaymentInformation = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
|
+
const cart_model_1 = require("./cart.model");
|
|
16
|
+
const core_user_model_1 = require("./core-user.model");
|
|
17
|
+
const enum_1 = require("../../../utilities/enum");
|
|
18
|
+
class PaymentInformation {
|
|
19
|
+
paymentGateway;
|
|
20
|
+
referenceId;
|
|
21
|
+
transactionId;
|
|
22
|
+
}
|
|
23
|
+
exports.PaymentInformation = PaymentInformation;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typegoose_1.prop)({
|
|
26
|
+
required: true,
|
|
27
|
+
enum: enum_1.PaymentGateway,
|
|
28
|
+
type: String,
|
|
29
|
+
default: enum_1.PaymentGateway.AREEBA,
|
|
30
|
+
}),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], PaymentInformation.prototype, "paymentGateway", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typegoose_1.prop)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], PaymentInformation.prototype, "referenceId", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typegoose_1.prop)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], PaymentInformation.prototype, "transactionId", void 0);
|
|
41
|
+
let CartParticipant = class CartParticipant extends defaultClasses_1.TimeStamps {
|
|
42
|
+
cart;
|
|
43
|
+
user;
|
|
44
|
+
joinedAt;
|
|
45
|
+
isReady;
|
|
46
|
+
isPaid;
|
|
47
|
+
readyAt;
|
|
48
|
+
spentAmount;
|
|
49
|
+
paymentMethod;
|
|
50
|
+
paymentInformation;
|
|
51
|
+
};
|
|
52
|
+
exports.CartParticipant = CartParticipant;
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typegoose_1.prop)({ required: true, ref: () => cart_model_1.Cart }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], CartParticipant.prototype, "cart", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typegoose_1.prop)({ required: true, ref: () => core_user_model_1.CoreUser }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], CartParticipant.prototype, "user", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typegoose_1.prop)({ default: () => new Date() }),
|
|
63
|
+
__metadata("design:type", Date)
|
|
64
|
+
], CartParticipant.prototype, "joinedAt", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typegoose_1.prop)({ default: false }),
|
|
67
|
+
__metadata("design:type", Boolean)
|
|
68
|
+
], CartParticipant.prototype, "isReady", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typegoose_1.prop)({ default: false }),
|
|
71
|
+
__metadata("design:type", Boolean)
|
|
72
|
+
], CartParticipant.prototype, "isPaid", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typegoose_1.prop)(),
|
|
75
|
+
__metadata("design:type", Date)
|
|
76
|
+
], CartParticipant.prototype, "readyAt", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typegoose_1.prop)({ default: 0 }),
|
|
79
|
+
__metadata("design:type", Number)
|
|
80
|
+
], CartParticipant.prototype, "spentAmount", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typegoose_1.prop)({ enum: enum_1.PaymentMethod, type: String }),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], CartParticipant.prototype, "paymentMethod", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typegoose_1.prop)({ type: () => PaymentInformation }),
|
|
87
|
+
__metadata("design:type", PaymentInformation)
|
|
88
|
+
], CartParticipant.prototype, "paymentInformation", void 0);
|
|
89
|
+
exports.CartParticipant = CartParticipant = __decorate([
|
|
90
|
+
(0, typegoose_1.modelOptions)({
|
|
91
|
+
schemaOptions: {
|
|
92
|
+
collection: 'cartParticipants',
|
|
93
|
+
toJSON: { virtuals: true },
|
|
94
|
+
toObject: { virtuals: true },
|
|
95
|
+
},
|
|
96
|
+
options: {
|
|
97
|
+
allowMixed: typegoose_1.Severity.ALLOW,
|
|
98
|
+
},
|
|
99
|
+
}),
|
|
100
|
+
(0, typegoose_1.index)({ cart: 1, user: 1 }, { unique: true }),
|
|
101
|
+
(0, typegoose_1.index)({ cart: 1 })
|
|
102
|
+
], CartParticipant);
|
|
103
|
+
exports.CartParticipantModel = (0, typegoose_1.getModelForClass)(CartParticipant);
|
|
104
|
+
//# sourceMappingURL=cart-perticipant.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cart-perticipant.model.js","sourceRoot":"/","sources":["libraries/mongo/models/cart-perticipant.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAQ8B;AAC9B,4EAAqE;AACrE,6CAAoC;AACpC,uDAA6C;AAC7C,kDAAwE;AAExE,MAAa,kBAAkB;IAOvB,cAAc,CAAkB;IAGhC,WAAW,CAAU;IAGrB,aAAa,CAAU;CAC9B;AAdD,gDAcC;AAPO;IANN,IAAA,gBAAI,EAAC;QACL,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,qBAAc;QACpB,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,qBAAc,CAAC,MAAM;KAC9B,CAAC;;0DACqC;AAGhC;IADN,IAAA,gBAAI,GAAE;;uDACqB;AAGrB;IADN,IAAA,gBAAI,GAAE;;yDACuB;AAkBxB,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,2BAAU;IAEvC,IAAI,CAAa;IAGjB,IAAI,CAAiB;IAGrB,QAAQ,CAAQ;IAGhB,OAAO,CAAW;IAGlB,MAAM,CAAW;IAGjB,OAAO,CAAQ;IAGf,WAAW,CAAU;IAGrB,aAAa,CAAiB;IAG9B,kBAAkB,CAAsB;CAC/C,CAAA;AA3BY,0CAAe;AAEpB;IADN,IAAA,gBAAI,EAAC,EAA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,EAAE,CAAC,EAAE,CAAC;GACN,eAAe,CA2B3B;AAEY,QAAA,oBAAoB,GAChC,IAAA,4BAAgB,EAAC,eAAe,CAAC,CAAC","sourcesContent":["import {\r\n\tprop,\r\n\tgetModelForClass,\r\n\tRef,\r\n\tindex,\r\n\tmodelOptions,\r\n\tSeverity,\r\n\tReturnModelType,\r\n} from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { Cart } from './cart.model';\r\nimport { CoreUser } from './core-user.model';\r\nimport { PaymentGateway, PaymentMethod } from '../../../utilities/enum';\r\n\r\nexport class PaymentInformation {\r\n\t@prop({\r\n\t\trequired: true,\r\n\t\tenum: PaymentGateway,\r\n\t\ttype: String,\r\n\t\tdefault: PaymentGateway.AREEBA,\r\n\t})\r\n\tpublic paymentGateway!: PaymentGateway;\r\n\r\n\t@prop()\r\n\tpublic referenceId?: string;\r\n\r\n\t@prop()\r\n\tpublic transactionId?: string;\r\n}\r\n\r\n/**\r\n * CartParticipant model - Tracks users participating in a group cart\r\n */\r\n@modelOptions({\r\n\tschemaOptions: {\r\n\t\tcollection: 'cartParticipants',\r\n\t\ttoJSON: { virtuals: true },\r\n\t\ttoObject: { virtuals: true },\r\n\t},\r\n\toptions: {\r\n\t\tallowMixed: Severity.ALLOW,\r\n\t},\r\n})\r\n@index({ cart: 1, user: 1 }, { unique: true })\r\n@index({ cart: 1 })\r\nexport class CartParticipant extends TimeStamps {\r\n\t@prop({ required: true, ref: () => Cart })\r\n\tpublic cart!: Ref<Cart>;\r\n\r\n\t@prop({ required: true, ref: () => CoreUser })\r\n\tpublic user!: Ref<CoreUser>;\r\n\r\n\t@prop({ default: () => new Date() })\r\n\tpublic joinedAt!: Date;\r\n\r\n\t@prop({ default: false })\r\n\tpublic isReady!: boolean;\r\n\r\n\t@prop({ default: false })\r\n\tpublic isPaid!: boolean;\r\n\r\n\t@prop()\r\n\tpublic readyAt?: Date;\r\n\r\n\t@prop({ default: 0 })\r\n\tpublic spentAmount!: number;\r\n\r\n\t@prop({ enum: PaymentMethod, type: String })\r\n\tpublic paymentMethod?: PaymentMethod;\r\n\r\n\t@prop({ type: () => PaymentInformation })\r\n\tpublic paymentInformation?: PaymentInformation;\r\n}\r\n\r\nexport const CartParticipantModel: ReturnModelType<typeof CartParticipant> =\r\n\tgetModelForClass(CartParticipant);\r\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Ref, ReturnModelType } from '@typegoose/typegoose';
|
|
2
|
+
import { CoreUser } from './core-user.model';
|
|
3
|
+
import { Shop } from './shop.model';
|
|
4
|
+
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
5
|
+
import { CartStatus } from '../../../utilities/enum';
|
|
6
|
+
import { UserAddress } from './shared/address.model';
|
|
7
|
+
export declare class Cart extends TimeStamps {
|
|
8
|
+
title?: string;
|
|
9
|
+
slug: string;
|
|
10
|
+
user: Ref<CoreUser>;
|
|
11
|
+
shop: Ref<Shop>;
|
|
12
|
+
deliveryAddress?: UserAddress;
|
|
13
|
+
isGroupOrder?: boolean;
|
|
14
|
+
deadlineToOrder?: Date;
|
|
15
|
+
paymentPreference?: string;
|
|
16
|
+
spendingLimitForGuest?: number;
|
|
17
|
+
status: CartStatus;
|
|
18
|
+
}
|
|
19
|
+
export declare const CartModel: ReturnModelType<typeof Cart>;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CartModel = exports.Cart = void 0;
|
|
16
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
17
|
+
const core_user_model_1 = require("./core-user.model");
|
|
18
|
+
const shop_model_1 = require("./shop.model");
|
|
19
|
+
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
20
|
+
const enum_1 = require("../../../utilities/enum");
|
|
21
|
+
const address_model_1 = require("./shared/address.model");
|
|
22
|
+
const slugify_1 = __importDefault(require("slugify"));
|
|
23
|
+
const nanoid_1 = require("nanoid");
|
|
24
|
+
let Cart = class Cart extends defaultClasses_1.TimeStamps {
|
|
25
|
+
title;
|
|
26
|
+
slug;
|
|
27
|
+
user;
|
|
28
|
+
shop;
|
|
29
|
+
deliveryAddress;
|
|
30
|
+
isGroupOrder;
|
|
31
|
+
deadlineToOrder;
|
|
32
|
+
paymentPreference;
|
|
33
|
+
spendingLimitForGuest;
|
|
34
|
+
status;
|
|
35
|
+
};
|
|
36
|
+
exports.Cart = Cart;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typegoose_1.prop)({ required: false, trim: true, maxlength: 100 }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], Cart.prototype, "title", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typegoose_1.prop)({ unique: true, sparse: true }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], Cart.prototype, "slug", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typegoose_1.prop)({ required: true, ref: () => core_user_model_1.CoreUser }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], Cart.prototype, "user", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typegoose_1.prop)({ required: true, ref: () => shop_model_1.Shop }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], Cart.prototype, "shop", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typegoose_1.prop)({ required: false, type: address_model_1.UserAddress }),
|
|
55
|
+
__metadata("design:type", address_model_1.UserAddress)
|
|
56
|
+
], Cart.prototype, "deliveryAddress", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typegoose_1.prop)({ default: false }),
|
|
59
|
+
__metadata("design:type", Boolean)
|
|
60
|
+
], Cart.prototype, "isGroupOrder", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typegoose_1.prop)(),
|
|
63
|
+
__metadata("design:type", Date)
|
|
64
|
+
], Cart.prototype, "deadlineToOrder", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typegoose_1.prop)({ enum: enum_1.PaymentPreference, type: String }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], Cart.prototype, "paymentPreference", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typegoose_1.prop)({ default: 1, min: 1 }),
|
|
71
|
+
__metadata("design:type", Number)
|
|
72
|
+
], Cart.prototype, "spendingLimitForGuest", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typegoose_1.prop)({
|
|
75
|
+
enum: enum_1.CartStatus,
|
|
76
|
+
type: String,
|
|
77
|
+
default: enum_1.CartStatus.ACTIVE,
|
|
78
|
+
required: true,
|
|
79
|
+
}),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], Cart.prototype, "status", void 0);
|
|
82
|
+
exports.Cart = Cart = __decorate([
|
|
83
|
+
(0, typegoose_1.modelOptions)({
|
|
84
|
+
schemaOptions: {
|
|
85
|
+
collection: 'carts',
|
|
86
|
+
toJSON: { virtuals: true },
|
|
87
|
+
toObject: { virtuals: true },
|
|
88
|
+
},
|
|
89
|
+
options: {
|
|
90
|
+
allowMixed: typegoose_1.Severity.ALLOW,
|
|
91
|
+
},
|
|
92
|
+
}),
|
|
93
|
+
(0, typegoose_1.index)({ slug: 1 }, { unique: true }),
|
|
94
|
+
(0, typegoose_1.index)({ user: 1 }),
|
|
95
|
+
(0, typegoose_1.index)({ shop: 1 }),
|
|
96
|
+
(0, typegoose_1.index)({ status: 1 }),
|
|
97
|
+
(0, typegoose_1.pre)('save', async function (next) {
|
|
98
|
+
if (!this.slug) {
|
|
99
|
+
let baseSlug;
|
|
100
|
+
if (this.title) {
|
|
101
|
+
baseSlug = (0, slugify_1.default)(this.title, {
|
|
102
|
+
lower: true,
|
|
103
|
+
strict: true,
|
|
104
|
+
trim: true,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
baseSlug = this.isGroupOrder ? 'group-order' : 'cart';
|
|
109
|
+
}
|
|
110
|
+
const uniqueId = (0, nanoid_1.nanoid)(6);
|
|
111
|
+
this.slug = `${baseSlug}-${uniqueId}`;
|
|
112
|
+
}
|
|
113
|
+
next();
|
|
114
|
+
})
|
|
115
|
+
], Cart);
|
|
116
|
+
exports.CartModel = (0, typegoose_1.getModelForClass)(Cart);
|
|
117
|
+
//# sourceMappingURL=cart.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cart.model.js","sourceRoot":"/","sources":["libraries/mongo/models/cart.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oDAS8B;AAC9B,uDAA6C;AAC7C,6CAAoC;AACpC,4EAAqE;AACrE,kDAAwE;AACxE,0DAAqD;AACrD,sDAA8B;AAC9B,mCAAgC;AAsCzB,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,2BAAU;IAE5B,KAAK,CAAU;IAGf,IAAI,CAAU;IAGd,IAAI,CAAiB;IAGr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gB,EAAC,IAAI,CAAC,CAAC","sourcesContent":["import {\r\n\tprop,\r\n\tgetModelForClass,\r\n\tRef,\r\n\tindex,\r\n\tmodelOptions,\r\n\tSeverity,\r\n\tpre,\r\n\tReturnModelType,\r\n} from '@typegoose/typegoose';\r\nimport { CoreUser } from './core-user.model';\r\nimport { Shop } from './shop.model';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { CartStatus, PaymentPreference } from '../../../utilities/enum';\r\nimport { UserAddress } from './shared/address.model';\r\nimport slugify from 'slugify';\r\nimport { nanoid } from 'nanoid';\r\n\r\n/**\r\n * Cart configuration model using Typegoose with automatic slug generation\r\n */\r\n@modelOptions({\r\n\tschemaOptions: {\r\n\t\tcollection: 'carts',\r\n\t\ttoJSON: { virtuals: true },\r\n\t\ttoObject: { virtuals: true },\r\n\t},\r\n\toptions: {\r\n\t\tallowMixed: Severity.ALLOW,\r\n\t},\r\n})\r\n@index({ slug: 1 }, { unique: true })\r\n@index({ user: 1 })\r\n@index({ shop: 1 })\r\n@index({ status: 1 })\r\n@pre<Cart>('save', async function (next) {\r\n\tif (!this.slug) {\r\n\t\tlet baseSlug;\r\n\r\n\t\tif (this.title) {\r\n\t\t\tbaseSlug = slugify(this.title, {\r\n\t\t\t\tlower: true,\r\n\t\t\t\tstrict: true,\r\n\t\t\t\ttrim: true,\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tbaseSlug = this.isGroupOrder ? 'group-order' : 'cart';\r\n\t\t}\r\n\r\n\t\tconst uniqueId = nanoid(6);\r\n\t\tthis.slug = `${baseSlug}-${uniqueId}`;\r\n\t}\r\n\tnext();\r\n})\r\nexport class Cart extends TimeStamps {\r\n\t@prop({ required: false, trim: true, maxlength: 100 })\r\n\tpublic title?: string;\r\n\r\n\t@prop({ unique: true, sparse: true })\r\n\tpublic slug!: string;\r\n\r\n\t@prop({ required: true, ref: () => CoreUser })\r\n\tpublic user!: Ref<CoreUser>;\r\n\r\n\t@prop({ required: true, ref: () => Shop })\r\n\tpublic shop!: Ref<Shop>;\r\n\r\n\t@prop({ required: false, type: UserAddress })\r\n\tpublic deliveryAddress?: UserAddress;\r\n\r\n\t@prop({ default: false })\r\n\tpublic isGroupOrder?: boolean;\r\n\r\n\t@prop()\r\n\tpublic deadlineToOrder?: Date;\r\n\r\n\t@prop({ enum: PaymentPreference, type: String })\r\n\tpublic paymentPreference?: string;\r\n\r\n\t@prop({ default: 1, min: 1 })\r\n\tpublic spendingLimitForGuest?: number;\r\n\r\n\t@prop({\r\n\t\tenum: CartStatus,\r\n\t\ttype: String,\r\n\t\tdefault: CartStatus.ACTIVE,\r\n\t\trequired: true,\r\n\t})\r\n\tpublic status!: CartStatus;\r\n}\r\n\r\nexport const CartModel: ReturnModelType<typeof Cart> = getModelForClass(Cart);\r\n"]}
|
|
@@ -54,6 +54,7 @@ import { LoyaltyPointMarketing } from './providers/loyalty-point-marketing.model
|
|
|
54
54
|
import { PunchMarketing } from './providers/punch-marketing.model';
|
|
55
55
|
import { ReferralCodeCoupon } from './providers/referral-code-coupon.model';
|
|
56
56
|
import { ReferralRewardCoupon } from './providers/referral-reward-coupon.model';
|
|
57
|
+
import { Notification } from './notification.model';
|
|
57
58
|
export declare const ActivityLogModel: ReturnModelType<typeof ActivityLog>;
|
|
58
59
|
export * from './activity-log.model';
|
|
59
60
|
export declare const AdminModel: ReturnModelType<typeof Admin>;
|
|
@@ -74,6 +74,7 @@ const loyalty_point_marketing_model_1 = require("./providers/loyalty-point-marke
|
|
|
74
74
|
const punch_marketing_model_1 = require("./providers/punch-marketing.model");
|
|
75
75
|
const referral_code_coupon_model_1 = require("./providers/referral-code-coupon.model");
|
|
76
76
|
const referral_reward_coupon_model_1 = require("./providers/referral-reward-coupon.model");
|
|
77
|
+
const notification_model_1 = require("./notification.model");
|
|
77
78
|
exports.ActivityLogModel = (0, typegoose_1.getModelForClass)(activity_log_model_1.ActivityLog);
|
|
78
79
|
__exportStar(require("./activity-log.model"), exports);
|
|
79
80
|
exports.AdminModel = (0, typegoose_1.getModelForClass)(admin_model_1.Admin);
|
|
@@ -118,7 +119,7 @@ exports.MarketingModel = (0, typegoose_1.getModelForClass)(marketing_model_1.Mar
|
|
|
118
119
|
__exportStar(require("./marketing.model"), exports);
|
|
119
120
|
exports.MealPlanModel = (0, typegoose_1.getModelForClass)(meal_plan_model_1.MealPlan);
|
|
120
121
|
__exportStar(require("./meal-plan.model"), exports);
|
|
121
|
-
exports.NotificationModel = (0, typegoose_1.getModelForClass)(Notification);
|
|
122
|
+
exports.NotificationModel = (0, typegoose_1.getModelForClass)(notification_model_1.Notification);
|
|
122
123
|
__exportStar(require("./notification.model"), exports);
|
|
123
124
|
exports.NutritionModel = (0, typegoose_1.getModelForClass)(nutrition_model_1.Nutrition);
|
|
124
125
|
__exportStar(require("./nutrition.model"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oDAAwG;AACxG,+CAAsC;AACtC,6EAAkE;AAClE,6DAAmD;AACnD,yEAA8D;AAC9D,uDAA8C;AAC9C,iDAAwC;AACxC,2DAAiD;AACjD,+CAAsC;AACtC,qDAA4C;AAC5C,mDAA0C;AAC1C,iDAAwC;AACxC,6DAAmD;AACnD,6CAAoC;AACpC,2CAAkC;AAClC,uDAA8C;AAC9C,qEAA2D;AAC3D,qEAA2D;AAC3D,iEAAuD;AACvD,iFAAsE;AACtE,+EAAoE;AACpE,uDAA8C;AAC9C,uDAA6C;AAC7C,uDAA8C;AAC9C,iDAAwC;AACxC,uEAA6D;AAC7D,mDAA0C;AAC1C,mFAAwE;AACxE,iEAAuD;AACvD,qEAA2D;AAC3D,6DAAmD;AACnD,6DAAmD;AACnD,6CAAoC;AACpC,uCAAgD;AAChD,mDAA0C;AAC1C,2EAAgE;AAChE,+DAAqD;AACrD,iEAAsD;AACtD,6DAAmD;AACnD,2DAAiD;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yCAA6B,EAAC,sBAAc,EAAE,qDAAqB,EAAE,oBAAa,CAAC,aAAa,CAAC,CAAC;AACnG,4EAA0D;AAE7C,QAAA,mBAAmB,GAA2C,IAAA,yCAA6B,EACvG,sBAAc,EACd,sCAAc,EACd,oBAAa,CAAC,eAAe,CAC7B,CAAC;AACF,oEAAkD;AAErC,QAAA,uBAAuB,GACnC,IAAA,yCAA6B,EAAC,mBAAW,EAAE,+CAAkB,EAAE,iBAAU,CAAC,aAAa,CAAC,CAAC;AAC1F,yEAAuD;AAE1C,QAAA,yBAAyB,GACrC,IAAA,yCAA6B,EAAC,mBAAW,EAAE,mDAAoB,EAAE,iBAAU,CAAC,eAAe,CAAC,CAAC;AAC9F,2EAAyD","sourcesContent":["import { getDiscriminatorModelForClass, getModelForClass, ReturnModelType } from '@typegoose/typegoose';\r\nimport { Admin } from './admin.model';\r\nimport { AdminAccessControl } from './admin-access-control.model';\r\nimport { ActivityLog } from './activity-log.model';\r\nimport { AppScreenSetting } from './app-screen-setting.model';\r\nimport { Attribute } from './attribute.model';\r\nimport { Banner } from './banner.model';\r\nimport { BOBFinance } from './bob-finance.model';\r\nimport { Brand } from './brand.model';\r\nimport { Category } from './category.model';\r\nimport { Counter } from './counter.model';\r\nimport { Coupon } from './coupon.model';\r\nimport { DealSetting } from './deal-setting.model';\r\nimport { Dish } from './dish.model';\r\nimport { Faq } from './faq.model';\r\nimport { Favourite } from './favourite.model';\r\nimport { FeaturedSetting } from './featured-setting.model';\r\nimport { FilterContainer } from './filter-container.model';\r\nimport { ListContainer } from './list-container.model';\r\nimport { LoyaltyPointCategory } from './loyalty-point-category.model';\r\nimport { LoyaltyPointSetting } from './loyalty-point-setting.model';\r\nimport { Marketing } from './marketing.model';\r\nimport { MealPlan } from './meal-plan.model';\r\nimport { Nutrition } from './nutrition.model';\r\nimport { Parent } from './parent.model';\r\nimport { ProductMarketing } from './product-marketing.model';\r\nimport { Product } from './product.model';\r\nimport { PunchMarketingHistory } from './punch-marketing-history.model';\r\nimport { RatingSetting } from './rating-setting.model';\r\nimport { ReferralSetting } from './referral-setting.model';\r\nimport { RequestArea } from './request-area.model';\r\nimport { RiderReview } from './rider-review.model';\r\nimport { Role } from './role.model';\r\nimport { createGlobalModel } from '../../mongo';\r\nimport { Setting } from './setting.model';\r\nimport { ShopAccessControl } from './shop-access-control.model';\r\nimport { ShopCategory } from './shop-category.model';\r\nimport { ShopMealPlan } from './shop-meal-plan.model';\r\nimport { ShopProduct } from './shop-product.model';\r\nimport { ShopReview } from './shop-review.model';\r\nimport { Shop } from './shop.model';\r\nimport { SubscriptionSetting } from './subscription-setting.model';\r\nimport { Subscription } from './subscription.model';\r\nimport { Tag } from './tag.model';\r\nimport { Zone } from './zone.model';\r\nimport { Buy1Get1Marketing } from './providers/buy1-get1-marketing.model';\r\nimport { CouponType, MarketingType } from '../../../utilities/enum';\r\nimport { CustomCoupon } from './providers/custom-coupon.model';\r\nimport { DiscountMarketing } from './providers/discount-marketing.model';\r\nimport { FeaturedMarketing } from './providers/featured-marketing.model';\r\nimport { FreeDeliveryMarketing } from './providers/free-delivery-marketing.model';\r\nimport { GlobalCoupon } from './providers/global-coupon.model';\r\nimport { IndividualStoreCoupon } from './providers/individual-store-coupon.model';\r\nimport { IndividualUserCoupon } from './providers/individual-user-coupon.model';\r\nimport { LoyaltyPointMarketing } from './providers/loyalty-point-marketing.model';\r\nimport { PunchMarketing } from './providers/punch-marketing.model';\r\nimport { ReferralCodeCoupon } from './providers/referral-code-coupon.model';\r\nimport { ReferralRewardCoupon } from './providers/referral-reward-coupon.model';\r\n\r\nexport const ActivityLogModel: ReturnModelType<typeof ActivityLog> = getModelForClass(ActivityLog);\r\nexport * from './activity-log.model';\r\n\r\nexport const AdminModel: ReturnModelType<typeof Admin> = getModelForClass(Admin);\r\nexport * from './admin.model';\r\n\r\nexport const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl> =\r\n\tgetModelForClass(AdminAccessControl);\r\nexport * from './admin-access-control.model';\r\n\r\nexport const AppScreenSettingModel: ReturnModelType<typeof AppScreenSetting> =\r\n\tgetModelForClass(AppScreenSetting);\r\nexport * from './app-screen-setting.model';\r\n\r\nexport const AttributeModel: ReturnModelType<typeof Attribute> = getModelForClass(Attribute);\r\nexport * from './attribute.model';\r\n\r\nexport const BannerModel: ReturnModelType<typeof Banner> = getModelForClass(Banner);\r\nexport * from './banner.model';\r\n\r\nexport const BOBFinanceModel: ReturnModelType<typeof BOBFinance> = getModelForClass(BOBFinance);\r\nexport * from './bob-finance.model';\r\n\r\nexport const BrandModel: ReturnModelType<typeof Brand> = getModelForClass(Brand);\r\nexport * from './brand.model';\r\n\r\nexport const CategoryModel: ReturnModelType<typeof Category> = getModelForClass(Category);\r\nexport * from './category.model';\r\n\r\n// export * from './core-auth-identity.model';\r\n// export * from './core-user.model';\r\n\r\nexport const CounterModel: ReturnModelType<typeof Counter> = getModelForClass(Counter);\r\nexport * from './counter.model';\r\n\r\nexport const CouponModel: ReturnModelType<typeof Coupon> = getModelForClass(Coupon);\r\nexport * from './coupon.model';\r\n\r\nexport const DealSettingModel: ReturnModelType<typeof DealSetting> = getModelForClass(DealSetting);\r\nexport * from './deal-setting.model';\r\n\r\nexport const DishModel: ReturnModelType<typeof Dish> = getModelForClass(Dish);\r\nexport * from './dish.model';\r\n\r\nexport const FaqModel: ReturnModelType<typeof Faq> = getModelForClass(Faq);\r\nexport * from './faq.model';\r\n\r\nexport const FavouriteModel: ReturnModelType<typeof Favourite> = getModelForClass(Favourite);\r\nexport * from './favourite.model';\r\n\r\nexport const FeaturedSettingModel: ReturnModelType<typeof FeaturedSetting> =\r\n\tgetModelForClass(FeaturedSetting);\r\nexport * from './featured-setting.model';\r\n\r\nexport const FilterContainerModel: ReturnModelType<typeof FilterContainer> =\r\n\tgetModelForClass(FilterContainer);\r\nexport * from './filter-container.model';\r\n\r\nexport const ListContainerModel: ReturnModelType<typeof ListContainer> = getModelForClass(ListContainer);\r\nexport * from './list-container.model';\r\n\r\nexport const LoyaltyPointCategoryModel: ReturnModelType<typeof LoyaltyPointCategory> =\r\n\tgetModelForClass(LoyaltyPointCategory);\r\nexport * from './loyalty-point-category.model';\r\n\r\nexport const LoyaltyPointSettingModel: ReturnModelType<typeof LoyaltyPointSetting> =\r\n\tgetModelForClass(LoyaltyPointSetting);\r\nexport * from './loyalty-point-setting.model';\r\n\r\nexport const MarketingModel: ReturnModelType<typeof Marketing> = getModelForClass(Marketing);\r\nexport * from './marketing.model';\r\n\r\nexport const MealPlanModel: ReturnModelType<typeof MealPlan> = getModelForClass(MealPlan);\r\nexport * from './meal-plan.model';\r\n\r\nexport const NotificationModel: ReturnModelType<typeof Notification> = getModelForClass(Notification);\r\nexport * from './notification.model';\r\n\r\nexport const NutritionModel: ReturnModelType<typeof Nutrition> = getModelForClass(Nutrition);\r\nexport * from './nutrition.model';\r\n\r\nexport * from './order.model';\r\n\r\nexport const ParentModel: ReturnModelType<typeof Parent> = getModelForClass(Parent);\r\nexport * from './parent.model';\r\n\r\nexport * from './payout.model';\r\n\r\nexport const ProductMarketingModel: ReturnModelType<typeof ProductMarketing> =\r\n\tgetModelForClass(ProductMarketing);\r\nexport * from './product-marketing.model';\r\n\r\nexport const ProductModel: ReturnModelType<typeof Product> = getModelForClass(Product);\r\nexport * from './product.model';\r\n\r\nexport const PunchMarketingHistoryModel: ReturnModelType<typeof PunchMarketingHistory> =\r\n\tgetModelForClass(PunchMarketingHistory);\r\nexport * from './punch-marketing-history.model';\r\n\r\nexport const RatingSettingModel: ReturnModelType<typeof RatingSetting> = getModelForClass(RatingSetting);\r\nexport * from './rating-setting.model';\r\n\r\nexport const ReferralSettingModel: ReturnModelType<typeof ReferralSetting> =\r\n\tgetModelForClass(ReferralSetting);\r\nexport * from './referral-setting.model';\r\n\r\nexport const RequestAreaModel: ReturnModelType<typeof RequestArea> = getModelForClass(RequestArea);\r\nexport * from './request-area.model';\r\n\r\nexport const RiderReviewModel: ReturnModelType<typeof RiderReview> = getModelForClass(RiderReview);\r\nexport * from './rider-review.model';\r\n\r\nexport * from './rider.model';\r\n\r\nexport const RoleModel: ReturnModelType<typeof Role> = createGlobalModel(Role);\r\nexport * from './role.model';\r\n\r\nexport const SettingModel: ReturnModelType<typeof Setting> = getModelForClass(Setting);\r\nexport * from './setting.model';\r\n\r\nexport const ShopAccessControlModel: ReturnModelType<typeof ShopAccessControl> =\r\n\tgetModelForClass(ShopAccessControl);\r\nexport * from './shop-access-control.model';\r\n\r\nexport const ShopCategoryModel: ReturnModelType<typeof ShopCategory> = getModelForClass(ShopCategory);\r\nexport * from './shop-category.model';\r\n\r\nexport const ShopMealPlanModel: ReturnModelType<typeof ShopMealPlan> = getModelForClass(ShopMealPlan);\r\nexport * from './shop-meal-plan.model';\r\n\r\nexport const ShopProductModel: ReturnModelType<typeof ShopProduct> = getModelForClass(ShopProduct);\r\nexport * from './shop-product.model';\r\n\r\nexport const ShopReviewModel: ReturnModelType<typeof ShopReview> = getModelForClass(ShopReview);\r\nexport * from './shop-review.model';\r\n\r\nexport const ShopModel: ReturnModelType<typeof Shop> = getModelForClass(Shop);\r\nexport * from './shop.model';\r\n\r\nexport const SubscriptionSettingModel: ReturnModelType<typeof SubscriptionSetting> =\r\n\tgetModelForClass(SubscriptionSetting);\r\nexport * from './subscription-setting.model';\r\n\r\nexport const SubscriptionModel: ReturnModelType<typeof Subscription> = getModelForClass(Subscription);\r\nexport * from './subscription.model';\r\n\r\nexport const TagModel: ReturnModelType<typeof Tag> = getModelForClass(Tag);\r\nexport * from './tag.model';\r\n\r\nexport * from './transaction.model';\r\n\r\nexport const ZoneModel: ReturnModelType<typeof Zone> = getModelForClass(Zone);\r\nexport * from './zone.model';\r\n\r\nexport const Buy1Get1MarketingModel: ReturnModelType<typeof Buy1Get1Marketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, Buy1Get1Marketing, MarketingType.BUY1GET1);\r\nexport * from './providers/buy1-get1-marketing.model';\r\n// export * from './providers/core-apple-auth-identity.model';\r\n// export * from './providers/core-email-auth-identity.model';\r\n// export * from './providers/core-google-auth-identity.model';\r\n// export * from './providers/core-phone-auth-identity.model';\r\n\r\nexport const CustomCouponModel: ReturnModelType<typeof CustomCoupon> = getDiscriminatorModelForClass(\r\n\tCouponModel,\r\n\tCustomCoupon,\r\n\tCouponType.CUSTOM_COUPON\r\n);\r\nexport * from './providers/custom-coupon.model';\r\n\r\nexport const DiscountMarketingModel: ReturnModelType<typeof DiscountMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, DiscountMarketing, MarketingType.DISCOUNT);\r\nexport * from './providers/discount-marketing.model';\r\n\r\nexport const FeaturedMarketingModel: ReturnModelType<typeof FeaturedMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, FeaturedMarketing, MarketingType.FEATURED);\r\nexport * from './providers/featured-marketing.model';\r\n\r\nexport const FreeDeliveryMarketingModel: ReturnModelType<typeof FreeDeliveryMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, FreeDeliveryMarketing, MarketingType.FREE_DELIVERY);\r\nexport * from './providers/free-delivery-marketing.model';\r\n\r\nexport const GlobalCouponModel: ReturnModelType<typeof GlobalCoupon> = getDiscriminatorModelForClass(\r\n\tCouponModel,\r\n\tGlobalCoupon,\r\n\tCouponType.GLOBAL\r\n);\r\nexport * from './providers/global-coupon.model';\r\n\r\nexport const IndividualStoreCouponModel: ReturnModelType<typeof IndividualStoreCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, IndividualStoreCoupon, CouponType.INDIVIDUAL_STORE);\r\nexport * from './providers/individual-store-coupon.model';\r\n\r\nexport const IndividualUserCouponModel: ReturnModelType<typeof IndividualUserCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, IndividualUserCoupon, CouponType.INDIVIDUAL_USER);\r\nexport * from './providers/individual-user-coupon.model';\r\n\r\nexport const LoyaltyPointMarketingModel: ReturnModelType<typeof LoyaltyPointMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, LoyaltyPointMarketing, MarketingType.LOYALTY_POINT);\r\nexport * from './providers/loyalty-point-marketing.model';\r\n\r\nexport const PunchMarketingModel: ReturnModelType<typeof PunchMarketing> = getDiscriminatorModelForClass(\r\n\tMarketingModel,\r\n\tPunchMarketing,\r\n\tMarketingType.PUNCH_MARKETING\r\n);\r\nexport * from './providers/punch-marketing.model';\r\n\r\nexport const ReferralCodeCouponModel: ReturnModelType<typeof ReferralCodeCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, ReferralCodeCoupon, CouponType.REFERRAL_CODE);\r\nexport * from './providers/referral-code-coupon.model';\r\n\r\nexport const ReferralRewardCouponModel: ReturnModelType<typeof ReferralRewardCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, ReferralRewardCoupon, CouponType.REFERRAL_REWARD);\r\nexport * from './providers/referral-reward-coupon.model';\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/mongo/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oDAAwG;AACxG,+CAAsC;AACtC,6EAAkE;AAClE,6DAAmD;AACnD,yEAA8D;AAC9D,uDAA8C;AAC9C,iDAAwC;AACxC,2DAAiD;AACjD,+CAAsC;AACtC,qDAA4C;AAC5C,mDAA0C;AAC1C,iDAAwC;AACxC,6DAAmD;AACnD,6CAAoC;AACpC,2CAAkC;AAClC,uDAA8C;AAC9C,qEAA2D;AAC3D,qEAA2D;AAC3D,iEAAuD;AACvD,iFAAsE;AACtE,+EAAoE;AACpE,uDAA8C;AAC9C,uDAA6C;AAC7C,uDAA8C;AAC9C,iDAAwC;AACxC,uEAA6D;AAC7D,mDAA0C;AAC1C,mFAAwE;AACxE,iEAAuD;AACvD,qEAA2D;AAC3D,6DAAmD;AACnD,6DAAmD;AACnD,6CAAoC;AACpC,uCAAgD;AAChD,mDAA0C;AAC1C,2EAAgE;AAChE,+DAAqD;AACrD,iEAAsD;AACtD,6DAAmD;AACnD,2DAAiD;AACjD,6CAAoC;AACpC,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6B,EAAC,sBAAc,EAAE,qDAAqB,EAAE,oBAAa,CAAC,aAAa,CAAC,CAAC;AACnG,4EAA0D;AAE7C,QAAA,mBAAmB,GAA2C,IAAA,yCAA6B,EACvG,sBAAc,EACd,sCAAc,EACd,oBAAa,CAAC,eAAe,CAC7B,CAAC;AACF,oEAAkD;AAErC,QAAA,uBAAuB,GACnC,IAAA,yCAA6B,EAAC,mBAAW,EAAE,+CAAkB,EAAE,iBAAU,CAAC,aAAa,CAAC,CAAC;AAC1F,yEAAuD;AAE1C,QAAA,yBAAyB,GACrC,IAAA,yCAA6B,EAAC,mBAAW,EAAE,mDAAoB,EAAE,iBAAU,CAAC,eAAe,CAAC,CAAC;AAC9F,2EAAyD","sourcesContent":["import { getDiscriminatorModelForClass, getModelForClass, ReturnModelType } from '@typegoose/typegoose';\r\nimport { Admin } from './admin.model';\r\nimport { AdminAccessControl } from './admin-access-control.model';\r\nimport { ActivityLog } from './activity-log.model';\r\nimport { AppScreenSetting } from './app-screen-setting.model';\r\nimport { Attribute } from './attribute.model';\r\nimport { Banner } from './banner.model';\r\nimport { BOBFinance } from './bob-finance.model';\r\nimport { Brand } from './brand.model';\r\nimport { Category } from './category.model';\r\nimport { Counter } from './counter.model';\r\nimport { Coupon } from './coupon.model';\r\nimport { DealSetting } from './deal-setting.model';\r\nimport { Dish } from './dish.model';\r\nimport { Faq } from './faq.model';\r\nimport { Favourite } from './favourite.model';\r\nimport { FeaturedSetting } from './featured-setting.model';\r\nimport { FilterContainer } from './filter-container.model';\r\nimport { ListContainer } from './list-container.model';\r\nimport { LoyaltyPointCategory } from './loyalty-point-category.model';\r\nimport { LoyaltyPointSetting } from './loyalty-point-setting.model';\r\nimport { Marketing } from './marketing.model';\r\nimport { MealPlan } from './meal-plan.model';\r\nimport { Nutrition } from './nutrition.model';\r\nimport { Parent } from './parent.model';\r\nimport { ProductMarketing } from './product-marketing.model';\r\nimport { Product } from './product.model';\r\nimport { PunchMarketingHistory } from './punch-marketing-history.model';\r\nimport { RatingSetting } from './rating-setting.model';\r\nimport { ReferralSetting } from './referral-setting.model';\r\nimport { RequestArea } from './request-area.model';\r\nimport { RiderReview } from './rider-review.model';\r\nimport { Role } from './role.model';\r\nimport { createGlobalModel } from '../../mongo';\r\nimport { Setting } from './setting.model';\r\nimport { ShopAccessControl } from './shop-access-control.model';\r\nimport { ShopCategory } from './shop-category.model';\r\nimport { ShopMealPlan } from './shop-meal-plan.model';\r\nimport { ShopProduct } from './shop-product.model';\r\nimport { ShopReview } from './shop-review.model';\r\nimport { Shop } from './shop.model';\r\nimport { SubscriptionSetting } from './subscription-setting.model';\r\nimport { Subscription } from './subscription.model';\r\nimport { Tag } from './tag.model';\r\nimport { Zone } from './zone.model';\r\nimport { Buy1Get1Marketing } from './providers/buy1-get1-marketing.model';\r\nimport { CouponType, MarketingType } from '../../../utilities/enum';\r\nimport { CustomCoupon } from './providers/custom-coupon.model';\r\nimport { DiscountMarketing } from './providers/discount-marketing.model';\r\nimport { FeaturedMarketing } from './providers/featured-marketing.model';\r\nimport { FreeDeliveryMarketing } from './providers/free-delivery-marketing.model';\r\nimport { GlobalCoupon } from './providers/global-coupon.model';\r\nimport { IndividualStoreCoupon } from './providers/individual-store-coupon.model';\r\nimport { IndividualUserCoupon } from './providers/individual-user-coupon.model';\r\nimport { LoyaltyPointMarketing } from './providers/loyalty-point-marketing.model';\r\nimport { PunchMarketing } from './providers/punch-marketing.model';\r\nimport { ReferralCodeCoupon } from './providers/referral-code-coupon.model';\r\nimport { ReferralRewardCoupon } from './providers/referral-reward-coupon.model';\r\nimport { Notification } from './notification.model';\r\n\r\nexport const ActivityLogModel: ReturnModelType<typeof ActivityLog> = getModelForClass(ActivityLog);\r\nexport * from './activity-log.model';\r\n\r\nexport const AdminModel: ReturnModelType<typeof Admin> = getModelForClass(Admin);\r\nexport * from './admin.model';\r\n\r\nexport const AdminAccessControlModel: ReturnModelType<typeof AdminAccessControl> =\r\n\tgetModelForClass(AdminAccessControl);\r\nexport * from './admin-access-control.model';\r\n\r\nexport const AppScreenSettingModel: ReturnModelType<typeof AppScreenSetting> =\r\n\tgetModelForClass(AppScreenSetting);\r\nexport * from './app-screen-setting.model';\r\n\r\nexport const AttributeModel: ReturnModelType<typeof Attribute> = getModelForClass(Attribute);\r\nexport * from './attribute.model';\r\n\r\nexport const BannerModel: ReturnModelType<typeof Banner> = getModelForClass(Banner);\r\nexport * from './banner.model';\r\n\r\nexport const BOBFinanceModel: ReturnModelType<typeof BOBFinance> = getModelForClass(BOBFinance);\r\nexport * from './bob-finance.model';\r\n\r\nexport const BrandModel: ReturnModelType<typeof Brand> = getModelForClass(Brand);\r\nexport * from './brand.model';\r\n\r\nexport const CategoryModel: ReturnModelType<typeof Category> = getModelForClass(Category);\r\nexport * from './category.model';\r\n\r\n// export * from './core-auth-identity.model';\r\n// export * from './core-user.model';\r\n\r\nexport const CounterModel: ReturnModelType<typeof Counter> = getModelForClass(Counter);\r\nexport * from './counter.model';\r\n\r\nexport const CouponModel: ReturnModelType<typeof Coupon> = getModelForClass(Coupon);\r\nexport * from './coupon.model';\r\n\r\nexport const DealSettingModel: ReturnModelType<typeof DealSetting> = getModelForClass(DealSetting);\r\nexport * from './deal-setting.model';\r\n\r\nexport const DishModel: ReturnModelType<typeof Dish> = getModelForClass(Dish);\r\nexport * from './dish.model';\r\n\r\nexport const FaqModel: ReturnModelType<typeof Faq> = getModelForClass(Faq);\r\nexport * from './faq.model';\r\n\r\nexport const FavouriteModel: ReturnModelType<typeof Favourite> = getModelForClass(Favourite);\r\nexport * from './favourite.model';\r\n\r\nexport const FeaturedSettingModel: ReturnModelType<typeof FeaturedSetting> =\r\n\tgetModelForClass(FeaturedSetting);\r\nexport * from './featured-setting.model';\r\n\r\nexport const FilterContainerModel: ReturnModelType<typeof FilterContainer> =\r\n\tgetModelForClass(FilterContainer);\r\nexport * from './filter-container.model';\r\n\r\nexport const ListContainerModel: ReturnModelType<typeof ListContainer> = getModelForClass(ListContainer);\r\nexport * from './list-container.model';\r\n\r\nexport const LoyaltyPointCategoryModel: ReturnModelType<typeof LoyaltyPointCategory> =\r\n\tgetModelForClass(LoyaltyPointCategory);\r\nexport * from './loyalty-point-category.model';\r\n\r\nexport const LoyaltyPointSettingModel: ReturnModelType<typeof LoyaltyPointSetting> =\r\n\tgetModelForClass(LoyaltyPointSetting);\r\nexport * from './loyalty-point-setting.model';\r\n\r\nexport const MarketingModel: ReturnModelType<typeof Marketing> = getModelForClass(Marketing);\r\nexport * from './marketing.model';\r\n\r\nexport const MealPlanModel: ReturnModelType<typeof MealPlan> = getModelForClass(MealPlan);\r\nexport * from './meal-plan.model';\r\n\r\nexport const NotificationModel: ReturnModelType<typeof Notification> = getModelForClass(Notification);\r\nexport * from './notification.model';\r\n\r\nexport const NutritionModel: ReturnModelType<typeof Nutrition> = getModelForClass(Nutrition);\r\nexport * from './nutrition.model';\r\n\r\nexport * from './order.model';\r\n\r\nexport const ParentModel: ReturnModelType<typeof Parent> = getModelForClass(Parent);\r\nexport * from './parent.model';\r\n\r\nexport * from './payout.model';\r\n\r\nexport const ProductMarketingModel: ReturnModelType<typeof ProductMarketing> =\r\n\tgetModelForClass(ProductMarketing);\r\nexport * from './product-marketing.model';\r\n\r\nexport const ProductModel: ReturnModelType<typeof Product> = getModelForClass(Product);\r\nexport * from './product.model';\r\n\r\nexport const PunchMarketingHistoryModel: ReturnModelType<typeof PunchMarketingHistory> =\r\n\tgetModelForClass(PunchMarketingHistory);\r\nexport * from './punch-marketing-history.model';\r\n\r\nexport const RatingSettingModel: ReturnModelType<typeof RatingSetting> = getModelForClass(RatingSetting);\r\nexport * from './rating-setting.model';\r\n\r\nexport const ReferralSettingModel: ReturnModelType<typeof ReferralSetting> =\r\n\tgetModelForClass(ReferralSetting);\r\nexport * from './referral-setting.model';\r\n\r\nexport const RequestAreaModel: ReturnModelType<typeof RequestArea> = getModelForClass(RequestArea);\r\nexport * from './request-area.model';\r\n\r\nexport const RiderReviewModel: ReturnModelType<typeof RiderReview> = getModelForClass(RiderReview);\r\nexport * from './rider-review.model';\r\n\r\nexport * from './rider.model';\r\n\r\nexport const RoleModel: ReturnModelType<typeof Role> = createGlobalModel(Role);\r\nexport * from './role.model';\r\n\r\nexport const SettingModel: ReturnModelType<typeof Setting> = getModelForClass(Setting);\r\nexport * from './setting.model';\r\n\r\nexport const ShopAccessControlModel: ReturnModelType<typeof ShopAccessControl> =\r\n\tgetModelForClass(ShopAccessControl);\r\nexport * from './shop-access-control.model';\r\n\r\nexport const ShopCategoryModel: ReturnModelType<typeof ShopCategory> = getModelForClass(ShopCategory);\r\nexport * from './shop-category.model';\r\n\r\nexport const ShopMealPlanModel: ReturnModelType<typeof ShopMealPlan> = getModelForClass(ShopMealPlan);\r\nexport * from './shop-meal-plan.model';\r\n\r\nexport const ShopProductModel: ReturnModelType<typeof ShopProduct> = getModelForClass(ShopProduct);\r\nexport * from './shop-product.model';\r\n\r\nexport const ShopReviewModel: ReturnModelType<typeof ShopReview> = getModelForClass(ShopReview);\r\nexport * from './shop-review.model';\r\n\r\nexport const ShopModel: ReturnModelType<typeof Shop> = getModelForClass(Shop);\r\nexport * from './shop.model';\r\n\r\nexport const SubscriptionSettingModel: ReturnModelType<typeof SubscriptionSetting> =\r\n\tgetModelForClass(SubscriptionSetting);\r\nexport * from './subscription-setting.model';\r\n\r\nexport const SubscriptionModel: ReturnModelType<typeof Subscription> = getModelForClass(Subscription);\r\nexport * from './subscription.model';\r\n\r\nexport const TagModel: ReturnModelType<typeof Tag> = getModelForClass(Tag);\r\nexport * from './tag.model';\r\n\r\nexport * from './transaction.model';\r\n\r\nexport const ZoneModel: ReturnModelType<typeof Zone> = getModelForClass(Zone);\r\nexport * from './zone.model';\r\n\r\nexport const Buy1Get1MarketingModel: ReturnModelType<typeof Buy1Get1Marketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, Buy1Get1Marketing, MarketingType.BUY1GET1);\r\nexport * from './providers/buy1-get1-marketing.model';\r\n// export * from './providers/core-apple-auth-identity.model';\r\n// export * from './providers/core-email-auth-identity.model';\r\n// export * from './providers/core-google-auth-identity.model';\r\n// export * from './providers/core-phone-auth-identity.model';\r\n\r\nexport const CustomCouponModel: ReturnModelType<typeof CustomCoupon> = getDiscriminatorModelForClass(\r\n\tCouponModel,\r\n\tCustomCoupon,\r\n\tCouponType.CUSTOM_COUPON\r\n);\r\nexport * from './providers/custom-coupon.model';\r\n\r\nexport const DiscountMarketingModel: ReturnModelType<typeof DiscountMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, DiscountMarketing, MarketingType.DISCOUNT);\r\nexport * from './providers/discount-marketing.model';\r\n\r\nexport const FeaturedMarketingModel: ReturnModelType<typeof FeaturedMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, FeaturedMarketing, MarketingType.FEATURED);\r\nexport * from './providers/featured-marketing.model';\r\n\r\nexport const FreeDeliveryMarketingModel: ReturnModelType<typeof FreeDeliveryMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, FreeDeliveryMarketing, MarketingType.FREE_DELIVERY);\r\nexport * from './providers/free-delivery-marketing.model';\r\n\r\nexport const GlobalCouponModel: ReturnModelType<typeof GlobalCoupon> = getDiscriminatorModelForClass(\r\n\tCouponModel,\r\n\tGlobalCoupon,\r\n\tCouponType.GLOBAL\r\n);\r\nexport * from './providers/global-coupon.model';\r\n\r\nexport const IndividualStoreCouponModel: ReturnModelType<typeof IndividualStoreCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, IndividualStoreCoupon, CouponType.INDIVIDUAL_STORE);\r\nexport * from './providers/individual-store-coupon.model';\r\n\r\nexport const IndividualUserCouponModel: ReturnModelType<typeof IndividualUserCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, IndividualUserCoupon, CouponType.INDIVIDUAL_USER);\r\nexport * from './providers/individual-user-coupon.model';\r\n\r\nexport const LoyaltyPointMarketingModel: ReturnModelType<typeof LoyaltyPointMarketing> =\r\n\tgetDiscriminatorModelForClass(MarketingModel, LoyaltyPointMarketing, MarketingType.LOYALTY_POINT);\r\nexport * from './providers/loyalty-point-marketing.model';\r\n\r\nexport const PunchMarketingModel: ReturnModelType<typeof PunchMarketing> = getDiscriminatorModelForClass(\r\n\tMarketingModel,\r\n\tPunchMarketing,\r\n\tMarketingType.PUNCH_MARKETING\r\n);\r\nexport * from './providers/punch-marketing.model';\r\n\r\nexport const ReferralCodeCouponModel: ReturnModelType<typeof ReferralCodeCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, ReferralCodeCoupon, CouponType.REFERRAL_CODE);\r\nexport * from './providers/referral-code-coupon.model';\r\n\r\nexport const ReferralRewardCouponModel: ReturnModelType<typeof ReferralRewardCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, ReferralRewardCoupon, CouponType.REFERRAL_REWARD);\r\nexport * from './providers/referral-reward-coupon.model';\r\n"]}
|
package/dist/utilities/enum.d.ts
CHANGED
|
@@ -33,6 +33,10 @@ export declare enum ValueType {
|
|
|
33
33
|
PERCENTAGE = "percentage",
|
|
34
34
|
FIXED = "fixed"
|
|
35
35
|
}
|
|
36
|
+
export declare enum PaymentGateway {
|
|
37
|
+
AREEBA = "areeba",
|
|
38
|
+
OTHER = "other"
|
|
39
|
+
}
|
|
36
40
|
export declare enum PaymentMethod {
|
|
37
41
|
CASH = "cash",
|
|
38
42
|
CARD = "card"
|
|
@@ -267,3 +271,13 @@ export declare enum AdminRole {
|
|
|
267
271
|
ACCOUNTING = "accounting",
|
|
268
272
|
MARKETING_MANAGER = "marketing_manager"
|
|
269
273
|
}
|
|
274
|
+
export declare enum CartStatus {
|
|
275
|
+
ACTIVE = "active",
|
|
276
|
+
LOCKED = "locked",
|
|
277
|
+
SUBMITTED = "submitted",
|
|
278
|
+
DELETED = "deleted"
|
|
279
|
+
}
|
|
280
|
+
export declare enum PaymentPreference {
|
|
281
|
+
PAY_FOR_EVERYONE = "Pay for everyone",
|
|
282
|
+
PAY_FOR_THEMSELVES = "Pay for themselves"
|
|
283
|
+
}
|
package/dist/utilities/enum.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdminRole = exports.MarketingStatus = exports.MarketingType = exports.FavouriteType = exports.CouponExpirationReason = exports.CouponType = exports.BobType = exports.BobModel = exports.BobSettlementStatus = exports.BobSettlementType = exports.BobAccountType = exports.ZoneStatus = exports.FaqAccountType = exports.CounterType = exports.BannerUserType = exports.BannerLinkType = exports.BannerClickType = exports.ShopRole = exports.ShopOnlineStatus = exports.ChargeType = exports.ClickType = exports.NotificationAccountType = exports.DishCategory = exports.ProductDietaryType = exports.AttributeItemSelectionType = exports.PriceType = exports.FoodGroup = exports.CoreAuthIdentityType = exports.SectionType = exports.UpdatedField = exports.GeoLocationType = exports.RatingAccountType = exports.SubscriptionStatus = exports.SubscriptionPackage = exports.PaidCurrency = exports.PaymentStatus = exports.PaymentMethod = exports.ValueType = exports.HolidayWorkStatus = exports.WorkStatus = exports.WeekDay = exports.ItemType = exports.Status = void 0;
|
|
3
|
+
exports.PaymentPreference = exports.CartStatus = exports.AdminRole = exports.MarketingStatus = exports.MarketingType = exports.FavouriteType = exports.CouponExpirationReason = exports.CouponType = exports.BobType = exports.BobModel = exports.BobSettlementStatus = exports.BobSettlementType = exports.BobAccountType = exports.ZoneStatus = exports.FaqAccountType = exports.CounterType = exports.BannerUserType = exports.BannerLinkType = exports.BannerClickType = exports.ShopRole = exports.ShopOnlineStatus = exports.ChargeType = exports.ClickType = exports.NotificationAccountType = exports.DishCategory = exports.ProductDietaryType = exports.AttributeItemSelectionType = exports.PriceType = exports.FoodGroup = exports.CoreAuthIdentityType = exports.SectionType = exports.UpdatedField = exports.GeoLocationType = exports.RatingAccountType = exports.SubscriptionStatus = exports.SubscriptionPackage = exports.PaidCurrency = exports.PaymentStatus = exports.PaymentMethod = exports.PaymentGateway = exports.ValueType = exports.HolidayWorkStatus = exports.WorkStatus = exports.WeekDay = exports.ItemType = exports.Status = void 0;
|
|
4
4
|
var Status;
|
|
5
5
|
(function (Status) {
|
|
6
6
|
Status["ACTIVE"] = "active";
|
|
@@ -42,6 +42,11 @@ var ValueType;
|
|
|
42
42
|
ValueType["PERCENTAGE"] = "percentage";
|
|
43
43
|
ValueType["FIXED"] = "fixed";
|
|
44
44
|
})(ValueType || (exports.ValueType = ValueType = {}));
|
|
45
|
+
var PaymentGateway;
|
|
46
|
+
(function (PaymentGateway) {
|
|
47
|
+
PaymentGateway["AREEBA"] = "areeba";
|
|
48
|
+
PaymentGateway["OTHER"] = "other";
|
|
49
|
+
})(PaymentGateway || (exports.PaymentGateway = PaymentGateway = {}));
|
|
45
50
|
var PaymentMethod;
|
|
46
51
|
(function (PaymentMethod) {
|
|
47
52
|
PaymentMethod["CASH"] = "cash";
|
|
@@ -313,4 +318,16 @@ var AdminRole;
|
|
|
313
318
|
AdminRole["ACCOUNTING"] = "accounting";
|
|
314
319
|
AdminRole["MARKETING_MANAGER"] = "marketing_manager";
|
|
315
320
|
})(AdminRole || (exports.AdminRole = AdminRole = {}));
|
|
321
|
+
var CartStatus;
|
|
322
|
+
(function (CartStatus) {
|
|
323
|
+
CartStatus["ACTIVE"] = "active";
|
|
324
|
+
CartStatus["LOCKED"] = "locked";
|
|
325
|
+
CartStatus["SUBMITTED"] = "submitted";
|
|
326
|
+
CartStatus["DELETED"] = "deleted";
|
|
327
|
+
})(CartStatus || (exports.CartStatus = CartStatus = {}));
|
|
328
|
+
var PaymentPreference;
|
|
329
|
+
(function (PaymentPreference) {
|
|
330
|
+
PaymentPreference["PAY_FOR_EVERYONE"] = "Pay for everyone";
|
|
331
|
+
PaymentPreference["PAY_FOR_THEMSELVES"] = "Pay for themselves";
|
|
332
|
+
})(PaymentPreference || (exports.PaymentPreference = PaymentPreference = {}));
|
|
316
333
|
//# sourceMappingURL=enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.js","sourceRoot":"/","sources":["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AAU;IACrB,+BAAiB,CAAA;IACjB,mDAAqC,CAAA;IACrC,iDAAmC,CAAA;IACnC,6CAA+B,CAAA;IAC/B,6CAA+B,CAAA;IAC/B,iDAAmC,CAAA;AACpC,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB;AAED,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IACjC,+CAAqB,CAAA;IACrB,oDAA0B,CAAA;IAC1B,+DAAqC,CAAA;AACtC,CAAC,EAJW,sBAAsB,sCAAtB,sBAAsB,QAIjC;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACxB,oCAAmB,CAAA;IACnB,8BAAa,CAAA;AACd,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED,IAAY,aAOX;AAPD,WAAY,aAAa;IACxB,sCAAqB,CAAA;IACrB,sCAAqB,CAAA;IACrB,gDAA+B,CAAA;IAC/B,sCAAqB,CAAA;IACrB,gDAA+B,CAAA;IAC/B,oDAAmC,CAAA;AACpC,CAAC,EAPW,aAAa,6BAAb,aAAa,QAOxB;AAED,IAAY,eAKX;AALD,WAAY,eAAe;IAC1B,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;AACpB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B;AAED,IAAY,SASX;AATD,WAAY,SAAS;IACpB,wCAA2B,CAAA;IAC3B,gDAAmC,CAAA;IACnC,+DAAkD,CAAA;IAClD,8DAAiD,CAAA;IACjD,gDAAmC,CAAA;IACnC,8EAAiE,CAAA;IACjE,sCAAyB,CAAA;IACzB,oDAAuC,CAAA;AACxC,CAAC,EATW,SAAS,yBAAT,SAAS,QASpB","sourcesContent":["export enum Status {\n\tACTIVE = 'active',\n\tINACTIVE = 'inactive',\n}\n\nexport enum ItemType {\n\tFOOD = 'food',\n\tGROCERY = 'grocery',\n\tPHARMACY = 'pharmacy',\n\tCOFFEE = 'coffee',\n\tFLOWER = 'flower',\n\tPET = 'pet',\n\tHEALTHY_CORNER = 'healthy_corner',\n}\n\nexport enum WeekDay {\n\tSunday = 0,\n\tMonday = 1,\n\tTuesday = 2,\n\tWednesday = 3,\n\tThursday = 4,\n\tFriday = 5,\n\tSaturday = 6,\n}\n\nexport enum WorkStatus {\n\tOPEN = 'open',\n\tCLOSED = 'closed',\n\tFULL_DAY = 'full_day',\n}\n\nexport enum HolidayWorkStatus {\n\tCLOSED = WorkStatus.CLOSED,\n\tFULL_DAY = WorkStatus.FULL_DAY,\n}\n\nexport enum ValueType {\n\tPERCENTAGE = 'percentage',\n\tFIXED = 'fixed',\n}\n\nexport enum PaymentMethod {\n\tCASH = 'cash',\n\tCARD = 'card',\n}\n\nexport enum PaymentStatus {\n\tPAID = 'paid',\n\tPENDING = 'pending',\n\tFAILED = 'failed',\n}\n\nexport enum PaidCurrency {\n\tBASE = 'base',\n\tSECONDARY = 'secondary',\n\tMIXED = 'mixed',\n}\n\nexport enum SubscriptionPackage {\n\tMONTHLY = 'monthly',\n\tYEARLY = 'yearly',\n}\n\nexport enum SubscriptionStatus {\n\tONGOING = 'ongoing',\n\tEXPIRED = 'expired',\n}\n\nexport enum RatingAccountType {\n\tSHOP = 'shop',\n\tRIDER = 'rider',\n}\n\nexport enum GeoLocationType {\n\tPOINT = 'point',\n\tPOLYGON = 'polygon',\n}\n\nexport enum UpdatedField {\n\tMAX_TOTAL_EST_ITEMS_PRICE = 'max_total_est_items_price',\n\tMAX_DISTANCE = 'max_distance',\n\tDAILY_WORKING_HOURS = 'daily_working_hours',\n\tBOB_CASH_SETTLEMENT_LIMIT = 'bob_cash_settlement_limit',\n\tTIPS = 'tips',\n\tEQUIPMENTS = 'equipments',\n\tMONTHLY_SHOP_TARGET = 'monthly_shop_target',\n\tMONTHLY_REWARD_PRIZE = 'monthly_reward_prize',\n\tBASE_CURRENCY = 'base_currency',\n\tSECONDARY_CURRENCY = 'secondary_currency',\n\tIS_DUAL_CURRENCY_ENABLED = 'is_dual_currency_enabled',\n\tEXCHANGE_RATE = 'exchange_rate',\n\tISSUANCE_DAY = 'issuance_day',\n\tOVER_DUE_PERIODS = 'over_due_periods',\n\tPAY_LIMIT_FOR_USER = 'pay_limit_for_user',\n\tVAT_PERCENTAGE = 'vat_percentage',\n\tRIDER_SEARCH_RANGES = 'rider_search_ranges',\n\tNEAR_BY_SHOP_DISTANCE = 'near_by_shop_distance',\n\tNEAR_BY_SHOP_DISTANCE_IN_HOME_SCREEN = 'near_by_shop_distance_in_home_screen',\n\tUNITS = 'units',\n\tCURRENCY_SETTING = 'currency_setting',\n\tPAYMENT_METHODS = 'payment_methods',\n\tIS_GROUND_ORDER_ENABLED = 'is_ground_order_enabled',\n\tCUSTOMER_SUPPORT_PHONE_NUMBER = 'customer_support_phone_number',\n}\n\nexport enum SectionType {\n\tSTORE_PUNCHES = 'store_punches',\n\tNEARBY_RESTAURANT = 'nearby_restaurant',\n\tNEARBY_GROCERY = 'nearby_grocery',\n\tNEARBY_PHARMACY = 'nearby_pharmacy',\n\tDISCOUNT = 'discount',\n\tFREE_DELIVERY = 'free_delivery',\n\tCRAZY_OFFER_SHOPS = 'crazy_offer_shops',\n\tORDER_AGAIN = 'order_again',\n\tFEATURED = 'featured',\n\tLOVE = 'love',\n\tAUTHENTIC_BEIRUT = 'authentic_beirut',\n\tNEAR_ME = 'near_me',\n}\n\nexport enum CoreAuthIdentityType {\n\tEMAIL = 'email',\n\tPHONE = 'phone',\n\tGOOGLE = 'google',\n\tAPPLE = 'apple',\n}\n\nexport enum FoodGroup {\n\tMEAT = 'meat',\n\tCHICKEN = 'chicken',\n\tFISH = 'fish',\n\tVEGETARIAN = 'vegetarian',\n\tOTHER = 'other',\n}\n\nexport enum PriceType {\n\tPRICE = 'price',\n\tUNIT = 'unit',\n\tPORTION = 'portion',\n}\n\nexport enum AttributeItemSelectionType {\n\tSINGLE = 'single',\n\tMULTIPLE = 'multiple',\n}\n\nexport enum ProductDietaryType {\n\tGLUTEN_FREE = 'gluten_free',\n\tLOW_CAL = 'low_cal',\n\tVEGETARIAN = 'vegetarian',\n\tVEGAN = 'vegan',\n\tGLUE_FREE = 'glue_free',\n\tKETO = 'keto',\n\tLACTOSE_FREE = 'lactose_free',\n\tHIGH_PROTEIN = 'high_protein',\n}\n\nexport enum DishCategory {\n\tBREAKFAST = 'breakfast',\n\tLUNCH = 'lunch',\n\tDINNER = 'dinner',\n\tSNACKS = 'snacks',\n}\n\nexport enum NotificationAccountType {\n\tUSER = 'user',\n\tPARENT = 'parent',\n\tSHOP = 'shop',\n\tRIDER = 'rider',\n\tADMIN = 'admin',\n\tCUSTOMER_SERVICE = 'customer_service',\n}\n\nexport enum ClickType {\n\tCLICKABLE_URL = 'clickable_url',\n\tCLICKABLE_ORDER = 'clickable_order',\n\tCLICKABLE_SHOP = 'clickable_shop',\n\tCLICKABLE_PRODUCT = 'clickable_product',\n\tCLICKABLE_LIST_CONTAINER = 'clickable_list_container',\n\tCLICKABLE_PAYOUT = 'clickable_payout',\n\tCLICKABLE_BOB_FINANCE = 'clickable_bob_finance',\n\tCLICKABLE_REQUEST_AREA = 'clickable_request_area',\n}\n\nexport enum ChargeType {\n\tGLOBAL = 'global',\n\tCUSTOM = 'custom',\n}\n\nexport enum ShopOnlineStatus {\n\tONLINE = 'online',\n\tOFFLINE = 'offline',\n\tBUSY = 'busy',\n}\n\nexport enum ShopRole {\n\tPARENT = 'parent',\n\tPARENT_ORDER_MANAGER = 'parent_order_manager',\n\tSHOP = 'shop',\n\tSHOP_ORDER_MANAGER = 'shop_order_manager',\n}\n\nexport enum BannerClickType {\n\tLINK = 'link',\n\tSHOP = 'shop',\n\tPRODUCT = 'product',\n\tLIST_CONTAINER = 'list_container',\n\tPLUS = 'plus',\n}\n\nexport enum BannerLinkType {\n\tURL = 'url',\n\tAPP_ROUTE = 'app-route',\n}\n\nexport enum BannerUserType {\n\tALL = 'all',\n\tPLUS = 'plus',\n\tNORMAL = 'normal',\n}\n\nexport enum CounterType {\n\tORDER = 'order',\n\tCRM_NUMBER = 'crm_number',\n\tshop = 'shop',\n}\n\nexport enum FaqAccountType {\n\tUSER = 'user',\n\tSHOP = 'shop',\n\tRIDER = 'rider',\n}\n\nexport enum ZoneStatus {\n\tACTIVE = 'active',\n\tINACTIVE = 'inactive',\n\tBUSY = 'busy',\n}\n\nexport enum BobAccountType {\n\tRIDER = 'rider',\n\tSHOP = 'shop',\n}\n\nexport enum BobSettlementType {\n\tSETTLE_CASH = 'settle_cash',\n\tSETTLE_PAYOUT = 'settle_Payout',\n}\n\nexport enum BobSettlementStatus {\n\tNOT_PAID = 'not_paid',\n\tPAID = 'paid',\n\tREVOKED = 'revoked',\n}\n\nexport enum BobModel {\n\tC2B = 'C2B',\n\tB2C = 'B2C',\n}\n\nexport enum BobType {\n\tINWARD = 'inward',\n\tOUTWARD = 'outward',\n}\n\nexport enum CouponType {\n\tGLOBAL = 'global',\n\tINDIVIDUAL_STORE = 'individual_store',\n\tINDIVIDUAL_USER = 'individual_user',\n\tCUSTOM_COUPON = 'custom_coupon',\n\tREFERRAL_CODE = 'referral_code',\n\tREFERRAL_REWARD = 'referral_reward',\n}\n\nexport enum CouponExpirationReason {\n\tDURATION = 'duration',\n\tSPEND_LIMIT = 'spendLimit',\n\tTOTAL_ORDER_LIMIT = 'totalOrderLimit',\n}\n\nexport enum FavouriteType {\n\tPRODUCT = 'product',\n\tSHOP = 'shop',\n}\n\nexport enum MarketingType {\n\tDISCOUNT = 'discount',\n\tBUY1GET1 = 'buy1get1',\n\tFREE_DELIVERY = 'free_delivery',\n\tFEATURED = 'featured',\n\tLOYALTY_POINT = 'loyalty_point',\n\tPUNCH_MARKETING = 'punch_marketing',\n}\n\nexport enum MarketingStatus {\n\tACTIVE = 'active',\n\tPAUSED = 'paused',\n\tEXPIRED = 'expired',\n\tDELETED = 'deleted',\n}\n\nexport enum AdminRole {\n\tSUPER_ADMIN = 'super_admin',\n\tGENERAL_MANAGER = 'general_manager',\n\tORDER_MANAGEMENT_MANAGER = 'order_management_lead',\n\tORDER_MANAGEMENT_AGENT = 'order_management_agent',\n\tACCOUNT_MANAGER = 'account_manager',\n\tBUSINESS_DEVELOPMENT_EXECUTIVE = 'business_development_executive',\n\tACCOUNTING = 'accounting',\n\tMARKETING_MANAGER = 'marketing_manager',\n}\n"]}
|
|
1
|
+
{"version":3,"file":"enum.js","sourceRoot":"/","sources":["utilities/enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,MAGX;AAHD,WAAY,MAAM;IACjB,2BAAiB,CAAA;IACjB,+BAAqB,CAAA;AACtB,CAAC,EAHW,MAAM,sBAAN,MAAM,QAGjB;AAED,IAAY,QAQX;AARD,WAAY,QAAQ;IACnB,yBAAa,CAAA;IACb,+BAAmB,CAAA;IACnB,iCAAqB,CAAA;IACrB,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,uBAAW,CAAA;IACX,6CAAiC,CAAA;AAClC,CAAC,EARW,QAAQ,wBAAR,QAAQ,QAQnB;AAED,IAAY,OAQX;AARD,WAAY,OAAO;IAClB,yCAAU,CAAA;IACV,yCAAU,CAAA;IACV,2CAAW,CAAA;IACX,+CAAa,CAAA;IACb,6CAAY,CAAA;IACZ,yCAAU,CAAA;IACV,6CAAY,CAAA;AACb,CAAC,EARW,OAAO,uBAAP,OAAO,QAQlB;AAED,IAAY,UAIX;AAJD,WAAY,UAAU;IACrB,2BAAa,CAAA;IACb,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;AACtB,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC5B,sCAA0B,CAAA;IAC1B,0CAA8B,CAAA;AAC/B,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAED,IAAY,SAGX;AAHD,WAAY,SAAS;IACpB,sCAAyB,CAAA;IACzB,4BAAe,CAAA;AAChB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACzB,mCAAiB,CA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CAAA;IAClD,8DAAiD,CAAA;IACjD,gDAAmC,CAAA;IACnC,8EAAiE,CAAA;IACjE,sCAAyB,CAAA;IACzB,oDAAuC,CAAA;AACxC,CAAC,EATW,SAAS,yBAAT,SAAS,QASpB;AAED,IAAY,UAKX;AALD,WAAY,UAAU;IACrB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,qCAAuB,CAAA;IACvB,iCAAmB,CAAA;AACpB,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC5B,0DAAqC,CAAA;IACrC,8DAAyC,CAAA;AAC1C,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B","sourcesContent":["export enum Status {\n\tACTIVE = 'active',\n\tINACTIVE = 'inactive',\n}\n\nexport enum ItemType {\n\tFOOD = 'food',\n\tGROCERY = 'grocery',\n\tPHARMACY = 'pharmacy',\n\tCOFFEE = 'coffee',\n\tFLOWER = 'flower',\n\tPET = 'pet',\n\tHEALTHY_CORNER = 'healthy_corner',\n}\n\nexport enum WeekDay {\n\tSunday = 0,\n\tMonday = 1,\n\tTuesday = 2,\n\tWednesday = 3,\n\tThursday = 4,\n\tFriday = 5,\n\tSaturday = 6,\n}\n\nexport enum WorkStatus {\n\tOPEN = 'open',\n\tCLOSED = 'closed',\n\tFULL_DAY = 'full_day',\n}\n\nexport enum HolidayWorkStatus {\n\tCLOSED = WorkStatus.CLOSED,\n\tFULL_DAY = WorkStatus.FULL_DAY,\n}\n\nexport enum ValueType {\n\tPERCENTAGE = 'percentage',\n\tFIXED = 'fixed',\n}\n\nexport enum PaymentGateway {\n\tAREEBA = 'areeba',\n\tOTHER = 'other',\n}\n\nexport enum PaymentMethod {\n\tCASH = 'cash',\n\tCARD = 'card',\n}\n\nexport enum PaymentStatus {\n\tPAID = 'paid',\n\tPENDING = 'pending',\n\tFAILED = 'failed',\n}\n\nexport enum PaidCurrency {\n\tBASE = 'base',\n\tSECONDARY = 'secondary',\n\tMIXED = 'mixed',\n}\n\nexport enum SubscriptionPackage {\n\tMONTHLY = 'monthly',\n\tYEARLY = 'yearly',\n}\n\nexport enum SubscriptionStatus {\n\tONGOING = 'ongoing',\n\tEXPIRED = 'expired',\n}\n\nexport enum RatingAccountType {\n\tSHOP = 'shop',\n\tRIDER = 'rider',\n}\n\nexport enum GeoLocationType {\n\tPOINT = 'point',\n\tPOLYGON = 'polygon',\n}\n\nexport enum UpdatedField {\n\tMAX_TOTAL_EST_ITEMS_PRICE = 'max_total_est_items_price',\n\tMAX_DISTANCE = 'max_distance',\n\tDAILY_WORKING_HOURS = 'daily_working_hours',\n\tBOB_CASH_SETTLEMENT_LIMIT = 'bob_cash_settlement_limit',\n\tTIPS = 'tips',\n\tEQUIPMENTS = 'equipments',\n\tMONTHLY_SHOP_TARGET = 'monthly_shop_target',\n\tMONTHLY_REWARD_PRIZE = 'monthly_reward_prize',\n\tBASE_CURRENCY = 'base_currency',\n\tSECONDARY_CURRENCY = 'secondary_currency',\n\tIS_DUAL_CURRENCY_ENABLED = 'is_dual_currency_enabled',\n\tEXCHANGE_RATE = 'exchange_rate',\n\tISSUANCE_DAY = 'issuance_day',\n\tOVER_DUE_PERIODS = 'over_due_periods',\n\tPAY_LIMIT_FOR_USER = 'pay_limit_for_user',\n\tVAT_PERCENTAGE = 'vat_percentage',\n\tRIDER_SEARCH_RANGES = 'rider_search_ranges',\n\tNEAR_BY_SHOP_DISTANCE = 'near_by_shop_distance',\n\tNEAR_BY_SHOP_DISTANCE_IN_HOME_SCREEN = 'near_by_shop_distance_in_home_screen',\n\tUNITS = 'units',\n\tCURRENCY_SETTING = 'currency_setting',\n\tPAYMENT_METHODS = 'payment_methods',\n\tIS_GROUND_ORDER_ENABLED = 'is_ground_order_enabled',\n\tCUSTOMER_SUPPORT_PHONE_NUMBER = 'customer_support_phone_number',\n}\n\nexport enum SectionType {\n\tSTORE_PUNCHES = 'store_punches',\n\tNEARBY_RESTAURANT = 'nearby_restaurant',\n\tNEARBY_GROCERY = 'nearby_grocery',\n\tNEARBY_PHARMACY = 'nearby_pharmacy',\n\tDISCOUNT = 'discount',\n\tFREE_DELIVERY = 'free_delivery',\n\tCRAZY_OFFER_SHOPS = 'crazy_offer_shops',\n\tORDER_AGAIN = 'order_again',\n\tFEATURED = 'featured',\n\tLOVE = 'love',\n\tAUTHENTIC_BEIRUT = 'authentic_beirut',\n\tNEAR_ME = 'near_me',\n}\n\nexport enum CoreAuthIdentityType {\n\tEMAIL = 'email',\n\tPHONE = 'phone',\n\tGOOGLE = 'google',\n\tAPPLE = 'apple',\n}\n\nexport enum FoodGroup {\n\tMEAT = 'meat',\n\tCHICKEN = 'chicken',\n\tFISH = 'fish',\n\tVEGETARIAN = 'vegetarian',\n\tOTHER = 'other',\n}\n\nexport enum PriceType {\n\tPRICE = 'price',\n\tUNIT = 'unit',\n\tPORTION = 'portion',\n}\n\nexport enum AttributeItemSelectionType {\n\tSINGLE = 'single',\n\tMULTIPLE = 'multiple',\n}\n\nexport enum ProductDietaryType {\n\tGLUTEN_FREE = 'gluten_free',\n\tLOW_CAL = 'low_cal',\n\tVEGETARIAN = 'vegetarian',\n\tVEGAN = 'vegan',\n\tGLUE_FREE = 'glue_free',\n\tKETO = 'keto',\n\tLACTOSE_FREE = 'lactose_free',\n\tHIGH_PROTEIN = 'high_protein',\n}\n\nexport enum DishCategory {\n\tBREAKFAST = 'breakfast',\n\tLUNCH = 'lunch',\n\tDINNER = 'dinner',\n\tSNACKS = 'snacks',\n}\n\nexport enum NotificationAccountType {\n\tUSER = 'user',\n\tPARENT = 'parent',\n\tSHOP = 'shop',\n\tRIDER = 'rider',\n\tADMIN = 'admin',\n\tCUSTOMER_SERVICE = 'customer_service',\n}\n\nexport enum ClickType {\n\tCLICKABLE_URL = 'clickable_url',\n\tCLICKABLE_ORDER = 'clickable_order',\n\tCLICKABLE_SHOP = 'clickable_shop',\n\tCLICKABLE_PRODUCT = 'clickable_product',\n\tCLICKABLE_LIST_CONTAINER = 'clickable_list_container',\n\tCLICKABLE_PAYOUT = 'clickable_payout',\n\tCLICKABLE_BOB_FINANCE = 'clickable_bob_finance',\n\tCLICKABLE_REQUEST_AREA = 'clickable_request_area',\n}\n\nexport enum ChargeType {\n\tGLOBAL = 'global',\n\tCUSTOM = 'custom',\n}\n\nexport enum ShopOnlineStatus {\n\tONLINE = 'online',\n\tOFFLINE = 'offline',\n\tBUSY = 'busy',\n}\n\nexport enum ShopRole {\n\tPARENT = 'parent',\n\tPARENT_ORDER_MANAGER = 'parent_order_manager',\n\tSHOP = 'shop',\n\tSHOP_ORDER_MANAGER = 'shop_order_manager',\n}\n\nexport enum BannerClickType {\n\tLINK = 'link',\n\tSHOP = 'shop',\n\tPRODUCT = 'product',\n\tLIST_CONTAINER = 'list_container',\n\tPLUS = 'plus',\n}\n\nexport enum BannerLinkType {\n\tURL = 'url',\n\tAPP_ROUTE = 'app-route',\n}\n\nexport enum BannerUserType {\n\tALL = 'all',\n\tPLUS = 'plus',\n\tNORMAL = 'normal',\n}\n\nexport enum CounterType {\n\tORDER = 'order',\n\tCRM_NUMBER = 'crm_number',\n\tshop = 'shop',\n}\n\nexport enum FaqAccountType {\n\tUSER = 'user',\n\tSHOP = 'shop',\n\tRIDER = 'rider',\n}\n\nexport enum ZoneStatus {\n\tACTIVE = 'active',\n\tINACTIVE = 'inactive',\n\tBUSY = 'busy',\n}\n\nexport enum BobAccountType {\n\tRIDER = 'rider',\n\tSHOP = 'shop',\n}\n\nexport enum BobSettlementType {\n\tSETTLE_CASH = 'settle_cash',\n\tSETTLE_PAYOUT = 'settle_Payout',\n}\n\nexport enum BobSettlementStatus {\n\tNOT_PAID = 'not_paid',\n\tPAID = 'paid',\n\tREVOKED = 'revoked',\n}\n\nexport enum BobModel {\n\tC2B = 'C2B',\n\tB2C = 'B2C',\n}\n\nexport enum BobType {\n\tINWARD = 'inward',\n\tOUTWARD = 'outward',\n}\n\nexport enum CouponType {\n\tGLOBAL = 'global',\n\tINDIVIDUAL_STORE = 'individual_store',\n\tINDIVIDUAL_USER = 'individual_user',\n\tCUSTOM_COUPON = 'custom_coupon',\n\tREFERRAL_CODE = 'referral_code',\n\tREFERRAL_REWARD = 'referral_reward',\n}\n\nexport enum CouponExpirationReason {\n\tDURATION = 'duration',\n\tSPEND_LIMIT = 'spendLimit',\n\tTOTAL_ORDER_LIMIT = 'totalOrderLimit',\n}\n\nexport enum FavouriteType {\n\tPRODUCT = 'product',\n\tSHOP = 'shop',\n}\n\nexport enum MarketingType {\n\tDISCOUNT = 'discount',\n\tBUY1GET1 = 'buy1get1',\n\tFREE_DELIVERY = 'free_delivery',\n\tFEATURED = 'featured',\n\tLOYALTY_POINT = 'loyalty_point',\n\tPUNCH_MARKETING = 'punch_marketing',\n}\n\nexport enum MarketingStatus {\n\tACTIVE = 'active',\n\tPAUSED = 'paused',\n\tEXPIRED = 'expired',\n\tDELETED = 'deleted',\n}\n\nexport enum AdminRole {\n\tSUPER_ADMIN = 'super_admin',\n\tGENERAL_MANAGER = 'general_manager',\n\tORDER_MANAGEMENT_MANAGER = 'order_management_lead',\n\tORDER_MANAGEMENT_AGENT = 'order_management_agent',\n\tACCOUNT_MANAGER = 'account_manager',\n\tBUSINESS_DEVELOPMENT_EXECUTIVE = 'business_development_executive',\n\tACCOUNTING = 'accounting',\n\tMARKETING_MANAGER = 'marketing_manager',\n}\n\nexport enum CartStatus {\n\tACTIVE = 'active',\n\tLOCKED = 'locked',\n\tSUBMITTED = 'submitted',\n\tDELETED = 'deleted',\n}\n\nexport enum PaymentPreference {\n\tPAY_FOR_EVERYONE = 'Pay for everyone',\n\tPAY_FOR_THEMSELVES = 'Pay for themselves',\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"/","sources":["utilities/response.ts"],"names":[],"mappings":";;;AAAO,MAAM,QAAQ,GAAG,CAAI,OAAe,EAAE,IAAQ,EAAE,EAAE,CAAC,CAAC;IACvD,OAAO,EAAE,IAAI;IACb,OAAO;IACP,IAAI;CACL,CAAC,CAAC;AAJQ,QAAA,QAAQ,YAIhB","sourcesContent":["export const response = <T>(message: string, data?: T) => ({\r\n success: true,\r\n message,\r\n data\r\n });"]}
|
|
@@ -280,3 +280,13 @@ export declare const TokenSchema: z.ZodObject<{
|
|
|
280
280
|
refreshToken: string;
|
|
281
281
|
accessToken: string;
|
|
282
282
|
}>;
|
|
283
|
+
export declare const UpdateSortingOrderSchema: z.ZodObject<{
|
|
284
|
+
startIndex: z.ZodDefault<z.ZodNumber>;
|
|
285
|
+
list: z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">;
|
|
286
|
+
}, "strip", z.ZodTypeAny, {
|
|
287
|
+
list: import("mongoose").Types.ObjectId[];
|
|
288
|
+
startIndex: number;
|
|
289
|
+
}, {
|
|
290
|
+
list: (string | import("mongoose").Types.ObjectId)[];
|
|
291
|
+
startIndex?: number | undefined;
|
|
292
|
+
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TokenSchema = exports.LoginSchema = exports.WorkHourSettingSchema = exports.HolidayHourSchema = exports.NormalHourSchema = exports.DurationSchema = exports.UserAddressSchema = exports.AddressSchema = exports.StringSchema = exports.FilterSchema = void 0;
|
|
3
|
+
exports.UpdateSortingOrderSchema = exports.TokenSchema = exports.LoginSchema = exports.WorkHourSettingSchema = exports.HolidayHourSchema = exports.NormalHourSchema = exports.DurationSchema = exports.UserAddressSchema = exports.AddressSchema = exports.StringSchema = exports.FilterSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const global_validation_1 = require("./global-validation");
|
|
6
6
|
const enum_1 = require("../enum");
|
|
@@ -85,4 +85,8 @@ exports.TokenSchema = zod_1.z.object({
|
|
|
85
85
|
accessToken: global_validation_1.ZodValidation.string('AccessToken'),
|
|
86
86
|
refreshToken: global_validation_1.ZodValidation.string('RefreshToken'),
|
|
87
87
|
});
|
|
88
|
+
exports.UpdateSortingOrderSchema = zod_1.z.object({
|
|
89
|
+
startIndex: global_validation_1.ZodValidation.number('StartIndex').default(1),
|
|
90
|
+
list: global_validation_1.ZodValidation.array(global_validation_1.ZodValidation.objectId('_id'), 'List', 1),
|
|
91
|
+
});
|
|
88
92
|
//# sourceMappingURL=common-validation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-validation.js","sourceRoot":"/","sources":["utilities/validation/common-validation.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,2DAAoD;AACpD,kCAAkF;AAKlF,MAAM,eAAe,GAAG,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAKpG,MAAM,gBAAgB,GAAmC,OAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACpE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,GAAG,EAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAClD,CAAC;AAKF,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,GAAG,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvB,GAAG,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvB,GAAG,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvB,IAAI,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACxB,G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AAE,iCAAa,CAAC,KAAK,CAAC,wBAAgB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC9D,YAAY,EAAE,iCAAa,CAAC,KAAK,CAAC,yBAAiB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAChE,CAAC,CAAC;AAcU,QAAA,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,KAAK,EAAE,iCAAa,CAAC,KAAK,CAAC,OAAO,CAAC;IACnC,QAAQ,EAAE,iCAAa,CAAC,MAAM,CAAC,UAAU,CAAC;CAC1C,CAAC,CAAC;AAcU,QAAA,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,WAAW,EAAE,iCAAa,CAAC,MAAM,CAAC,aAAa,CAAC;IAChD,YAAY,EAAE,iCAAa,CAAC,MAAM,CAAC,cAAc,CAAC;CAClD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { ZodValidation } from './global-validation';\nimport { GeoLocationType, HolidayWorkStatus, WeekDay, WorkStatus } from '../enum';\n\n/**\n * Define allowed MongoDB sort orders\n */\nconst SortOrderSchema = z.union([z.literal(1), z.literal(-1), z.literal('asc'), z.literal('desc')]);\n\n/**\n * Define MongoDB query schema (fields + operators) using lazy evaluation to avoid circular dependency\n */\nconst MongoQuerySchema: z.ZodType<Record<string, any>> = z.lazy(() =>\n\tz.record(z.union([z.any(), MongoOperatorsSchema]))\n);\n\n/**\n * Define allowed MongoDB query operators\n */\nconst MongoOperatorsSchema = z.object({\n\t$eq: z.any().optional(),\n\t$ne: z.any().optional(),\n\t$gt: z.any().optional(),\n\t$gte: z.any().optional(),\n\t$lt: z.any().optional(),\n\t$lte: z.any().optional(),\n\t$in: z.array(z.any()).optional(),\n\t$nin: z.array(z.any()).optional(),\n\t$exists: z.boolean().optional(),\n\t$regex: z.string().optional(),\n\t$and: z.array(MongoQuerySchema).optional(),\n\t$or: z.array(MongoQuerySchema).optional(),\n\t$not: MongoQuerySchema.optional(),\n\t$nor: z.array(MongoQuerySchema).optional(),\n});\n\n/**\n * Define the filter schema using MongoQuerySchema\n */\nexport const FilterSchema = z\n\t.object({\n\t\tlimit: z\n\t\t\t.number()\n\t\t\t.min(1, { message: 'Limit must be greater than 0.' })\n\t\t\t.max(100, { message: 'Limit cannot exceed 100.' })\n\t\t\t.default(10),\n\t\tskip: z.number().min(0, { message: 'Skip cannot be negative.' }).default(0),\n\t\tsort: z.record(z.string(), SortOrderSchema).optional(),\n\t\tquery: MongoQuerySchema.optional(),\n\t\tselect: z.array(z.string()).optional(),\n\t\tpopulate: z.array(z.string()).optional(),\n\t})\n\t.optional();\n\n/**\n * Infer TypeScript type from Zod schema\n */\nexport type FilterDTO = z.infer<typeof FilterSchema>;\n\n/**\n * Define String schema\n */\nexport const StringSchema = z.string().min(1, 'String cannot be empty').max(255, 'String is too long');\n\n/**\n * Common address validation schema that can be reused across models.\n * Provides validation for address-related fields.\n *\n * @example\n * ```typescript\n * const userSchema = z.object({\n * name: z.string(),\n * address: AddressSchema\n * });\n * ```\n */\nexport const AddressSchema = z.object({\n\taddress: ZodValidation.string('Address'),\n\tdescription: ZodValidation.string('Description').optional(),\n\tcity: ZodValidation.string('City'),\n\tstate: ZodValidation.string('State'),\n\tcountry: ZodValidation.string('Country'),\n\tgeoLocationType: ZodValidation.enumType(GeoLocationType, 'GeoLocationType').default(GeoLocationType.POINT),\n\tcoordinates: ZodValidation.array(ZodValidation.number('Coordinate'), 'Coordinates', 2, 2),\n\tlatitude: ZodValidation.number('Latitude'),\n\tlongitude: ZodValidation.number('Longitude'),\n});\n\n/**\n * Common user address validation schema that can be reused across models.\n * Provides validation for address-related fields.\n *\n * @example\n * ```typescript\n * const userSchema = z.object({\n * name: z.string(),\n * address: UserAddressSchema\n * });\n * ```\n */\nexport const UserAddressSchema = AddressSchema.extend({\n\taddressLabel: ZodValidation.string('Address Label'),\n\tapartment: ZodValidation.string('Apartment'),\n\tbuildingName: ZodValidation.string('Building Name'),\n\tdeliveryOption: ZodValidation.string('Delivery Option').optional(),\n\tinstructions: ZodValidation.string('Instructions').optional(),\n});\n\n/**\n * Common duration validation schema that can be reused across models.\n * Provides validation for duration fields.\n *\n * @example\n * ```typescript\n * const subscriptionSchema = z.object({\n * fee: z.number(),\n * duration: DurationSchema\n * });\n * ```\n */\nexport const DurationSchema = z.object({\n\tstart: ZodValidation.date('Start'),\n\tend: ZodValidation.date('End').optional(),\n});\n\n/**\n * Common Work Hour validation schema that can be reused across models.\n * Provides validation for workHourSetting fields.\n *\n * @example\n * ```typescript\n * const settingSchema = z.object({\n * vat: z.number(),\n * workHourSetting: WorkHourSettingSchema\n * });\n * ```\n */\nconst StartEndTimeSchema = z.object({\n\tstart: ZodValidation.string('Start'),\n\tend: ZodValidation.string('End'),\n});\n\nexport const NormalHourSchema = z.object({\n\tday: ZodValidation.enumType(WeekDay, 'Day'),\n\tstatus: ZodValidation.enumType(WorkStatus, 'Status'),\n\topeningHours: ZodValidation.array(StartEndTimeSchema).default([]),\n});\n\nexport const HolidayHourSchema = z.object({\n\tdate: ZodValidation.date('Date'),\n\tstatus: ZodValidation.enumType(HolidayWorkStatus, 'Status'),\n\tclosingHour: StartEndTimeSchema,\n});\n\nexport const WorkHourSettingSchema = z.object({\n\tnormalHours: ZodValidation.array(NormalHourSchema).default([]),\n\tholidayHours: ZodValidation.array(HolidayHourSchema).default([]),\n});\n\n/**\n * Schema for validating user login credentials.\n * This schema ensures that the provided email and password meet the required validation rules.\n *\n * @example\n * ```typescript\n * const credentials = {\n * email: 'user@example.com',\n * password: 'securePassword123',\n * };\n * ```\n */\nexport const LoginSchema = z.object({\n\temail: ZodValidation.email('Email'),\n\tpassword: ZodValidation.string('Password'),\n});\n\n/**\n * Schema for validating token data, typically used for authentication.\n * This schema ensures that the provided access token and refresh token are valid strings.\n *\n * @example\n * ```typescript\n * const tokens = {\n * accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',\n * refreshToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',\n * };\n * ```\n */\nexport const TokenSchema = z.object({\n\taccessToken: ZodValidation.string('AccessToken'),\n\trefreshToken: ZodValidation.string('RefreshToken'),\n});\n"]}
|
|
1
|
+
{"version":3,"file":"common-validation.js","sourceRoot":"/","sources":["utilities/validation/common-validation.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,2DAAoD;AACpD,kCAAkF;AAKlF,MAAM,eAAe,GAAG,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAKpG,MAAM,gBAAgB,GAAmC,OAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACpE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,GAAG,EAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAClD,CAAC;AAKF,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,GAAG,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvB,GAAG,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvB,GAAG,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvB,IAAI,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACxB,GAAG,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvB,IAAI,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACxB,GAAG,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IAChC,IAAI,EAAE,OAAC,CAAC,KAAK,CA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E,iCAAa,CAAC,KAAK,CAAC,OAAO,CAAC;IACnC,QAAQ,EAAE,iCAAa,CAAC,MAAM,CAAC,UAAU,CAAC;CAC1C,CAAC,CAAC;AAcU,QAAA,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,WAAW,EAAE,iCAAa,CAAC,MAAM,CAAC,aAAa,CAAC;IAChD,YAAY,EAAE,iCAAa,CAAC,MAAM,CAAC,cAAc,CAAC;CAClD,CAAC,CAAC;AAMU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,UAAU,EAAE,iCAAa,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,IAAI,EAAE,iCAAa,CAAC,KAAK,CAAC,iCAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;CACnE,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\r\nimport { ZodValidation } from './global-validation';\r\nimport { GeoLocationType, HolidayWorkStatus, WeekDay, WorkStatus } from '../enum';\r\n\r\n/**\r\n * Define allowed MongoDB sort orders\r\n */\r\nconst SortOrderSchema = z.union([z.literal(1), z.literal(-1), z.literal('asc'), z.literal('desc')]);\r\n\r\n/**\r\n * Define MongoDB query schema (fields + operators) using lazy evaluation to avoid circular dependency\r\n */\r\nconst MongoQuerySchema: z.ZodType<Record<string, any>> = z.lazy(() =>\r\n\tz.record(z.union([z.any(), MongoOperatorsSchema]))\r\n);\r\n\r\n/**\r\n * Define allowed MongoDB query operators\r\n */\r\nconst MongoOperatorsSchema = z.object({\r\n\t$eq: z.any().optional(),\r\n\t$ne: z.any().optional(),\r\n\t$gt: z.any().optional(),\r\n\t$gte: z.any().optional(),\r\n\t$lt: z.any().optional(),\r\n\t$lte: z.any().optional(),\r\n\t$in: z.array(z.any()).optional(),\r\n\t$nin: z.array(z.any()).optional(),\r\n\t$exists: z.boolean().optional(),\r\n\t$regex: z.string().optional(),\r\n\t$and: z.array(MongoQuerySchema).optional(),\r\n\t$or: z.array(MongoQuerySchema).optional(),\r\n\t$not: MongoQuerySchema.optional(),\r\n\t$nor: z.array(MongoQuerySchema).optional(),\r\n});\r\n\r\n/**\r\n * Define the filter schema using MongoQuerySchema\r\n */\r\nexport const FilterSchema = z\r\n\t.object({\r\n\t\tlimit: z\r\n\t\t\t.number()\r\n\t\t\t.min(1, { message: 'Limit must be greater than 0.' })\r\n\t\t\t.max(100, { message: 'Limit cannot exceed 100.' })\r\n\t\t\t.default(10),\r\n\t\tskip: z.number().min(0, { message: 'Skip cannot be negative.' }).default(0),\r\n\t\tsort: z.record(z.string(), SortOrderSchema).optional(),\r\n\t\tquery: MongoQuerySchema.optional(),\r\n\t\tselect: z.array(z.string()).optional(),\r\n\t\tpopulate: z.array(z.string()).optional(),\r\n\t})\r\n\t.optional();\r\n\r\n/**\r\n * Infer TypeScript type from Zod schema\r\n */\r\nexport type FilterDTO = z.infer<typeof FilterSchema>;\r\n\r\n/**\r\n * Define String schema\r\n */\r\nexport const StringSchema = z.string().min(1, 'String cannot be empty').max(255, 'String is too long');\r\n\r\n/**\r\n * Common address validation schema that can be reused across models.\r\n * Provides validation for address-related fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const userSchema = z.object({\r\n * name: z.string(),\r\n * address: AddressSchema\r\n * });\r\n * ```\r\n */\r\nexport const AddressSchema = z.object({\r\n\taddress: ZodValidation.string('Address'),\r\n\tdescription: ZodValidation.string('Description').optional(),\r\n\tcity: ZodValidation.string('City'),\r\n\tstate: ZodValidation.string('State'),\r\n\tcountry: ZodValidation.string('Country'),\r\n\tgeoLocationType: ZodValidation.enumType(GeoLocationType, 'GeoLocationType').default(GeoLocationType.POINT),\r\n\tcoordinates: ZodValidation.array(ZodValidation.number('Coordinate'), 'Coordinates', 2, 2),\r\n\tlatitude: ZodValidation.number('Latitude'),\r\n\tlongitude: ZodValidation.number('Longitude'),\r\n});\r\n\r\n/**\r\n * Common user address validation schema that can be reused across models.\r\n * Provides validation for address-related fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const userSchema = z.object({\r\n * name: z.string(),\r\n * address: UserAddressSchema\r\n * });\r\n * ```\r\n */\r\nexport const UserAddressSchema = AddressSchema.extend({\r\n\taddressLabel: ZodValidation.string('Address Label'),\r\n\tapartment: ZodValidation.string('Apartment'),\r\n\tbuildingName: ZodValidation.string('Building Name'),\r\n\tdeliveryOption: ZodValidation.string('Delivery Option').optional(),\r\n\tinstructions: ZodValidation.string('Instructions').optional(),\r\n});\r\n\r\n/**\r\n * Common duration validation schema that can be reused across models.\r\n * Provides validation for duration fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const subscriptionSchema = z.object({\r\n * fee: z.number(),\r\n * duration: DurationSchema\r\n * });\r\n * ```\r\n */\r\nexport const DurationSchema = z.object({\r\n\tstart: ZodValidation.date('Start'),\r\n\tend: ZodValidation.date('End').optional(),\r\n});\r\n\r\n/**\r\n * Common Work Hour validation schema that can be reused across models.\r\n * Provides validation for workHourSetting fields.\r\n *\r\n * @example\r\n * ```typescript\r\n * const settingSchema = z.object({\r\n * vat: z.number(),\r\n * workHourSetting: WorkHourSettingSchema\r\n * });\r\n * ```\r\n */\r\nconst StartEndTimeSchema = z.object({\r\n\tstart: ZodValidation.string('Start'),\r\n\tend: ZodValidation.string('End'),\r\n});\r\n\r\nexport const NormalHourSchema = z.object({\r\n\tday: ZodValidation.enumType(WeekDay, 'Day'),\r\n\tstatus: ZodValidation.enumType(WorkStatus, 'Status'),\r\n\topeningHours: ZodValidation.array(StartEndTimeSchema).default([]),\r\n});\r\n\r\nexport const HolidayHourSchema = z.object({\r\n\tdate: ZodValidation.date('Date'),\r\n\tstatus: ZodValidation.enumType(HolidayWorkStatus, 'Status'),\r\n\tclosingHour: StartEndTimeSchema,\r\n});\r\n\r\nexport const WorkHourSettingSchema = z.object({\r\n\tnormalHours: ZodValidation.array(NormalHourSchema).default([]),\r\n\tholidayHours: ZodValidation.array(HolidayHourSchema).default([]),\r\n});\r\n\r\n/**\r\n * Schema for validating user login credentials.\r\n * This schema ensures that the provided email and password meet the required validation rules.\r\n *\r\n * @example\r\n * ```typescript\r\n * const credentials = {\r\n * email: 'user@example.com',\r\n * password: 'securePassword123',\r\n * };\r\n * ```\r\n */\r\nexport const LoginSchema = z.object({\r\n\temail: ZodValidation.email('Email'),\r\n\tpassword: ZodValidation.string('Password'),\r\n});\r\n\r\n/**\r\n * Schema for validating token data, typically used for authentication.\r\n * This schema ensures that the provided access token and refresh token are valid strings.\r\n *\r\n * @example\r\n * ```typescript\r\n * const tokens = {\r\n * accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',\r\n * refreshToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',\r\n * };\r\n * ```\r\n */\r\nexport const TokenSchema = z.object({\r\n\taccessToken: ZodValidation.string('AccessToken'),\r\n\trefreshToken: ZodValidation.string('RefreshToken'),\r\n});\r\n\r\n\r\n/**\r\n * Schema validation for sorting order\r\n */\r\nexport const UpdateSortingOrderSchema = z.object({\r\n\tstartIndex: ZodValidation.number('StartIndex').default(1),\r\n\tlist: ZodValidation.array(ZodValidation.objectId('_id'), 'List', 1),\r\n});"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyxa.ai/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "The Core system of the Lyxa services.",
|
|
5
5
|
"author": "elie <42282499+Internalizable@users.noreply.github.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,10 +31,12 @@
|
|
|
31
31
|
"jsonwebtoken": "^9.0.2",
|
|
32
32
|
"moment": "^2.30.1",
|
|
33
33
|
"mongoose": "^8.9.1",
|
|
34
|
+
"nanoid": "^5.1.4",
|
|
34
35
|
"pino": "^9.5.0",
|
|
35
36
|
"pino-mongodb": "^4.3.0",
|
|
36
37
|
"pino-pretty": "^13.0.0",
|
|
37
38
|
"sharp": "^0.33.5",
|
|
39
|
+
"slugify": "^1.6.6",
|
|
38
40
|
"twilio": "^5.4.0",
|
|
39
41
|
"typedi": "^0.10.0",
|
|
40
42
|
"typescript": "^5.7.2",
|