@lyxa.ai/core 1.0.27 → 1.0.28
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/embedded/charge.model.d.ts +1 -1
- package/dist/libraries/mongo/models/embedded/charge.model.js.map +1 -1
- package/dist/libraries/mongo/models/gallery.model.d.ts +2 -1
- package/dist/libraries/mongo/models/gallery.model.js +7 -2
- package/dist/libraries/mongo/models/gallery.model.js.map +1 -1
- package/dist/libraries/mongo/models/parent.model.d.ts +3 -1
- package/dist/libraries/mongo/models/parent.model.js +9 -8
- package/dist/libraries/mongo/models/parent.model.js.map +1 -1
- package/dist/libraries/mongo/models/product.model.d.ts +1 -0
- package/dist/libraries/mongo/models/product.model.js +5 -0
- package/dist/libraries/mongo/models/product.model.js.map +1 -1
- package/dist/libraries/mongo/models/shared/address.model.d.ts +1 -1
- package/dist/libraries/mongo/models/shared/address.model.js +2 -2
- package/dist/libraries/mongo/models/shared/address.model.js.map +1 -1
- package/dist/libraries/mongo/models/shared/geo-location.model.d.ts +1 -1
- package/dist/libraries/mongo/models/shared/geo-location.model.js +1 -1
- package/dist/libraries/mongo/models/shared/geo-location.model.js.map +1 -1
- package/dist/libraries/mongo/models/shared/work-hour.model.d.ts +1 -2
- package/dist/libraries/mongo/models/shared/work-hour.model.js +2 -1
- package/dist/libraries/mongo/models/shared/work-hour.model.js.map +1 -1
- package/dist/libraries/mongo/models/shop-access-control.model.d.ts +3 -2
- package/dist/libraries/mongo/models/shop-access-control.model.js +9 -3
- package/dist/libraries/mongo/models/shop-access-control.model.js.map +1 -1
- package/dist/libraries/mongo/models/shop.model.d.ts +2 -1
- package/dist/libraries/mongo/models/shop.model.js +5 -0
- package/dist/libraries/mongo/models/shop.model.js.map +1 -1
- package/dist/utilities/enum.d.ts +2 -1
- package/dist/utilities/enum.js +2 -1
- package/dist/utilities/enum.js.map +1 -1
- package/dist/utilities/search.d.ts +1 -0
- package/dist/utilities/search.js +16 -0
- package/dist/utilities/search.js.map +1 -0
- package/dist/utilities/validation/common-validation.d.ts +66 -21
- package/dist/utilities/validation/common-validation.js +6 -3
- package/dist/utilities/validation/common-validation.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charge.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/charge.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,qDAAuD;AAEvD,MAAa,MAAM;IAEX,SAAS,CAAa;IAGtB,KAAK,CAAU;CACtB;AAND,wBAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAS,EAAE,OAAO,EAAE,gBAAS,CAAC,UAAU,EAAE,CAAC;;yCAC1C;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;qCACzB","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { ValueType } from '../../../../utilities/enum';\n\nexport class Charge {\n\t@prop({ type: String, enum: ValueType, default: ValueType.PERCENTAGE })\n\tpublic valueType?: ValueType;\n\n\t@prop({ required: true, type: Number, min: 0 })\n\tpublic value
|
|
1
|
+
{"version":3,"file":"charge.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/charge.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,qDAAuD;AAEvD,MAAa,MAAM;IAEX,SAAS,CAAa;IAGtB,KAAK,CAAU;CACtB;AAND,wBAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAS,EAAE,OAAO,EAAE,gBAAS,CAAC,UAAU,EAAE,CAAC;;yCAC1C;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;qCACzB","sourcesContent":["import { prop } from '@typegoose/typegoose';\r\nimport { ValueType } from '../../../../utilities/enum';\r\n\r\nexport class Charge {\r\n\t@prop({ type: String, enum: ValueType, default: ValueType.PERCENTAGE })\r\n\tpublic valueType?: ValueType;\r\n\r\n\t@prop({ required: true, type: Number, min: 0 })\r\n\tpublic value!: number;\r\n}\r\n"]}
|
|
@@ -16,7 +16,8 @@ const enum_1 = require("../../../utilities/enum");
|
|
|
16
16
|
let Gallery = class Gallery extends defaultClasses_1.TimeStamps {
|
|
17
17
|
title;
|
|
18
18
|
mediaType;
|
|
19
|
-
|
|
19
|
+
mediaUrls;
|
|
20
|
+
logo;
|
|
20
21
|
tags;
|
|
21
22
|
brands;
|
|
22
23
|
};
|
|
@@ -29,10 +30,14 @@ __decorate([
|
|
|
29
30
|
(0, typegoose_1.prop)({ type: String, enum: enum_1.MediaType, default: enum_1.MediaType.IMAGE }),
|
|
30
31
|
__metadata("design:type", String)
|
|
31
32
|
], Gallery.prototype, "mediaType", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typegoose_1.prop)({ required: true, type: [String] }),
|
|
35
|
+
__metadata("design:type", Array)
|
|
36
|
+
], Gallery.prototype, "mediaUrls", void 0);
|
|
32
37
|
__decorate([
|
|
33
38
|
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
34
39
|
__metadata("design:type", String)
|
|
35
|
-
], Gallery.prototype, "
|
|
40
|
+
], Gallery.prototype, "logo", void 0);
|
|
36
41
|
__decorate([
|
|
37
42
|
(0, typegoose_1.prop)({ type: [String], default: [] }),
|
|
38
43
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gallery.model.js","sourceRoot":"/","sources":["libraries/mongo/models/gallery.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AACrE,kDAAoD;AAG7C,IAAM,OAAO,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CAAC;GAChD,OAAO,CAkBnB","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { MediaType } from '../../../utilities/enum';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'galleries' } })\r\nexport class Gallery extends TimeStamps {\r\n\t@prop({ required: true, unique: true, type: String, maxlength: 50 })\r\n\tpublic title!: string;\r\n\r\n\t@prop({ type: String, enum: MediaType, default: MediaType.IMAGE })\r\n\tpublic mediaType?: MediaType;\r\n\r\n\t@prop({ required: true, type: [String] })\r\n\tpublic mediaUrls!: string[];\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic logo?: string;\r\n\r\n\t@prop({ type: [String], default: [] })\r\n\tpublic tags?: string[];\r\n\r\n\t@prop({ type: [String], default: [] })\r\n\tpublic brands?: string[];\r\n}\r\n"]}
|
|
@@ -5,13 +5,15 @@ import { Admin } from './admin.model';
|
|
|
5
5
|
import { Charge } from './embedded/charge.model';
|
|
6
6
|
import { ParentDocument } from './embedded/parent-document.model';
|
|
7
7
|
import { Address } from './shared/address.model';
|
|
8
|
+
import { Duration } from './shared/duration.model';
|
|
8
9
|
export declare class Parent extends TimeStamps {
|
|
9
10
|
name: string;
|
|
10
11
|
email: string;
|
|
11
12
|
phoneNumber: string;
|
|
12
13
|
address: Address;
|
|
13
14
|
chargeType: ChargeType;
|
|
14
|
-
charge
|
|
15
|
+
charge: Charge;
|
|
16
|
+
commissionDuration: Duration;
|
|
15
17
|
itemType: ItemType;
|
|
16
18
|
isServiceFeeCharged: boolean;
|
|
17
19
|
businessDevExecutive?: Ref<Admin>;
|
|
@@ -17,6 +17,7 @@ const admin_model_1 = require("./admin.model");
|
|
|
17
17
|
const charge_model_1 = require("./embedded/charge.model");
|
|
18
18
|
const parent_document_model_1 = require("./embedded/parent-document.model");
|
|
19
19
|
const address_model_1 = require("./shared/address.model");
|
|
20
|
+
const duration_model_1 = require("./shared/duration.model");
|
|
20
21
|
let Parent = class Parent extends defaultClasses_1.TimeStamps {
|
|
21
22
|
name;
|
|
22
23
|
email;
|
|
@@ -24,6 +25,7 @@ let Parent = class Parent extends defaultClasses_1.TimeStamps {
|
|
|
24
25
|
address;
|
|
25
26
|
chargeType;
|
|
26
27
|
charge;
|
|
28
|
+
commissionDuration;
|
|
27
29
|
itemType;
|
|
28
30
|
isServiceFeeCharged;
|
|
29
31
|
businessDevExecutive;
|
|
@@ -33,7 +35,7 @@ let Parent = class Parent extends defaultClasses_1.TimeStamps {
|
|
|
33
35
|
};
|
|
34
36
|
exports.Parent = Parent;
|
|
35
37
|
__decorate([
|
|
36
|
-
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
38
|
+
(0, typegoose_1.prop)({ required: true, type: String, maxlength: 50 }),
|
|
37
39
|
__metadata("design:type", String)
|
|
38
40
|
], Parent.prototype, "name", void 0);
|
|
39
41
|
__decorate([
|
|
@@ -49,13 +51,17 @@ __decorate([
|
|
|
49
51
|
__metadata("design:type", address_model_1.Address)
|
|
50
52
|
], Parent.prototype, "address", void 0);
|
|
51
53
|
__decorate([
|
|
52
|
-
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ChargeType }),
|
|
54
|
+
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ChargeType, default: enum_1.ChargeType.CUSTOM }),
|
|
53
55
|
__metadata("design:type", String)
|
|
54
56
|
], Parent.prototype, "chargeType", void 0);
|
|
55
57
|
__decorate([
|
|
56
|
-
(0, typegoose_1.prop)({ type: charge_model_1.Charge }),
|
|
58
|
+
(0, typegoose_1.prop)({ required: true, type: charge_model_1.Charge }),
|
|
57
59
|
__metadata("design:type", charge_model_1.Charge)
|
|
58
60
|
], Parent.prototype, "charge", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typegoose_1.prop)({ required: true, type: duration_model_1.Duration }),
|
|
63
|
+
__metadata("design:type", duration_model_1.Duration)
|
|
64
|
+
], Parent.prototype, "commissionDuration", void 0);
|
|
59
65
|
__decorate([
|
|
60
66
|
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ItemType }),
|
|
61
67
|
__metadata("design:type", String)
|
|
@@ -81,11 +87,6 @@ __decorate([
|
|
|
81
87
|
__metadata("design:type", parent_document_model_1.ParentDocument)
|
|
82
88
|
], Parent.prototype, "document", void 0);
|
|
83
89
|
exports.Parent = Parent = __decorate([
|
|
84
|
-
(0, typegoose_1.index)({ name: 1, itemType: 1 }, {
|
|
85
|
-
unique: true,
|
|
86
|
-
partialFilterExpression: { deletedAt: null },
|
|
87
|
-
name: 'companyName_itemType_unique',
|
|
88
|
-
}),
|
|
89
90
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'parents' } })
|
|
90
91
|
], Parent);
|
|
91
92
|
//# sourceMappingURL=parent.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parent.model.js","sourceRoot":"/","sources":["libraries/mongo/models/parent.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,kDAAuE;AACvE,+CAAsC;AACtC,0DAAiD;AACjD,4EAAkE;AAClE,0DAAiD;
|
|
1
|
+
{"version":3,"file":"parent.model.js","sourceRoot":"/","sources":["libraries/mongo/models/parent.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,kDAAuE;AACvE,+CAAsC;AACtC,0DAAiD;AACjD,4EAAkE;AAClE,0DAAiD;AACjD,4DAAmD;AAG5C,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,2BAAU;IAE9B,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,WAAW,CAAU;IAGrB,OAAO,CAAW;IAGlB,UAAU,CAAc;IAGxB,MAAM,CAAU;IAGhB,kBAAkB,CAAY;IAG9B,QAAQ,CAAY;IAGpB,mBAAmB,CAAW;IAG9B,oBAAoB,CAAc;IAGlC,MAAM,CAAU;IAGhB,YAAY,CAAU;IAG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IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAM,EAAE,OAAO,EAAE,aAAM,CAAC,MAAM,EAAE,CAAC;;sCACtC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CACV;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,sCAAc,EAAE,CAAC;8BAC7B,sCAAc;wCAAC;iBAtCrB,MAAM;IADlB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,CAAC;GAC9C,MAAM,CAuClB","sourcesContent":["import { index, modelOptions, prop, Ref } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { ChargeType, ItemType, Status } from '../../../utilities/enum';\r\nimport { Admin } from './admin.model';\r\nimport { Charge } from './embedded/charge.model';\r\nimport { ParentDocument } from './embedded/parent-document.model';\r\nimport { Address } from './shared/address.model';\r\nimport { Duration } from './shared/duration.model';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'parents' } })\r\nexport class Parent extends TimeStamps {\r\n\t@prop({ required: true, type: String, maxlength: 50 })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic email!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic phoneNumber!: string;\r\n\r\n\t@prop({ required: true, type: Address })\r\n\tpublic address!: Address;\r\n\r\n\t@prop({ required: true, type: String, enum: ChargeType, default: ChargeType.CUSTOM })\r\n\tpublic chargeType!: ChargeType;\r\n\r\n\t@prop({ required: true, type: Charge })\r\n\tpublic charge!: Charge;\r\n\r\n\t@prop({ required: true, type: Duration })\r\n\tpublic commissionDuration!: Duration;\r\n\r\n\t@prop({ required: true, type: String, enum: ItemType })\r\n\tpublic itemType!: ItemType;\r\n\r\n\t@prop({ required: true, type: Boolean, default: true })\r\n\tpublic isServiceFeeCharged!: boolean;\r\n\r\n\t@prop({ ref: () => Admin })\r\n\tpublic businessDevExecutive?: Ref<Admin>;\r\n\r\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\r\n\tpublic status?: Status;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic profilePhoto!: string;\r\n\r\n\t@prop({ required: true, type: ParentDocument })\r\n\tpublic document!: ParentDocument;\r\n}\r\n"]}
|
|
@@ -25,6 +25,7 @@ let Product = class Product extends defaultClasses_1.TimeStamps {
|
|
|
25
25
|
shopCategory;
|
|
26
26
|
itemType;
|
|
27
27
|
productType;
|
|
28
|
+
logo;
|
|
28
29
|
images;
|
|
29
30
|
priceOption;
|
|
30
31
|
priceBreakdowns;
|
|
@@ -71,6 +72,10 @@ __decorate([
|
|
|
71
72
|
(0, typegoose_1.prop)({ type: String, enum: enum_1.ProductType, default: enum_1.ProductType.OTHER }),
|
|
72
73
|
__metadata("design:type", String)
|
|
73
74
|
], Product.prototype, "productType", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], Product.prototype, "logo", void 0);
|
|
74
79
|
__decorate([
|
|
75
80
|
(0, typegoose_1.prop)({ required: true, type: [String] }),
|
|
76
81
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.model.js","sourceRoot":"/","sources":["libraries/mongo/models/product.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,kDAAyG;AACzG,gFAAsE;AACtE,6CAAoC;AACpC,4EAAkE;AAClE,wEAA8D;AAC9D,+DAAqD;AAW9C,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,2BAAU;IAE/B,IAAI,CAAa;IAGjB,IAAI,CAAU;IAGd,OAAO,CAAU;IAGjB,YA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oose/typegoose/lib/defaultClasses';\r\nimport { ProductType, ItemType, ProductDietaryType, Status, PriceOption } from '../../../utilities/enum';\r\nimport { ProductNutrition } from './embedded/product-nutrition.model';\r\nimport { Shop } from './shop.model';\r\nimport { PriceBreakdown } from './embedded/price-breakdown.model';\r\nimport { AttributeMap } from './embedded/attribute-map.model';\r\nimport { ShopCategory } from './shop-category.model';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'products' } })\r\n@Index({ name: 1, shop: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\r\n@Index(\r\n\t{ barcode: 1, shop: 1 },\r\n\t{\r\n\t\tunique: true,\r\n\t\tpartialFilterExpression: { barcode: { $exists: true, $nin: [null, '0000000'] }, deletedAt: null },\r\n\t}\r\n)\r\nexport class Product extends TimeStamps {\r\n\t@prop({ required: true, ref: () => Shop })\r\n\tpublic shop!: Ref<Shop>;\r\n\r\n\t@prop({ required: true, type: String, maxlength: 50 })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ type: String, default: '0000000' })\r\n\tpublic barcode?: string;\r\n\r\n\t@prop({ required: true, ref: () => ShopCategory })\r\n\tpublic shopCategory!: Ref<ShopCategory>;\r\n\r\n\t@prop({ required: true, type: String, enum: ItemType })\r\n\tpublic itemType!: ItemType;\r\n\r\n\t@prop({ type: String, enum: ProductType, default: ProductType.OTHER })\r\n\tpublic productType?: ProductType;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic logo!: string;\r\n\r\n\t@prop({ required: true, type: [String] })\r\n\tpublic images!: string[];\r\n\r\n\t@prop({ type: String, enum: PriceOption, default: PriceOption.SINGLE_PRICE })\r\n\tpublic priceOption?: PriceOption;\r\n\r\n\t@prop({ required: true, type: [PriceBreakdown], min: 1 })\r\n\tpublic priceBreakdowns?: PriceBreakdown[];\r\n\r\n\t@prop({ type: String, maxlength: 250 })\r\n\tpublic description?: string;\r\n\r\n\t@prop({ type: [AttributeMap], default: [] })\r\n\tpublic attributeMaps?: AttributeMap[];\r\n\r\n\t@prop({ ref: () => Product, default: [] })\r\n\tpublic addons?: Ref<Product>[];\r\n\r\n\t@prop({ type: Number, min: 0 })\r\n\tpublic nutritionPackSize?: number;\r\n\r\n\t@prop({ type: String })\r\n\tpublic nutritionPackSizeUnit?: string;\r\n\r\n\t@prop({ type: Number, min: 0 })\r\n\tpublic nutritionServingSize?: number;\r\n\r\n\t@prop({ type: Number, min: 0 })\r\n\tpublic nutritionCalories?: number;\r\n\r\n\t@prop({ type: [ProductNutrition], default: [] })\r\n\tpublic nutritions?: ProductNutrition[];\r\n\r\n\t@prop({ type: [String], enum: ProductDietaryType, default: [] })\r\n\tpublic dietaryTypes?: ProductDietaryType[];\r\n\r\n\t@prop({ type: Number, max: 999999999 })\r\n\tpublic storedTemperature?: number;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isStockEnabled?: boolean;\r\n\r\n\t@prop({ type: Number })\r\n\tpublic stockQuantity?: number;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isDrinkIncluded?: boolean;\r\n\r\n\t@prop({ type: Number, default: Infinity, min: 0, max: 999999999 })\r\n\tpublic orderQuantityLimit?: number;\r\n\r\n\t@prop({ type: String })\r\n\tpublic note?: string;\r\n\r\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\r\n\tpublic status?: Status;\r\n\r\n\t@prop({ type: Number, default: 0 })\r\n\tpublic sortingOrder?: number;\r\n}\r\n"]}
|
|
@@ -94,7 +94,7 @@ __decorate([
|
|
|
94
94
|
], UserAddress.prototype, "instructions", void 0);
|
|
95
95
|
class CourierAddress extends UserAddress {
|
|
96
96
|
name;
|
|
97
|
-
|
|
97
|
+
phoneNumber;
|
|
98
98
|
}
|
|
99
99
|
exports.CourierAddress = CourierAddress;
|
|
100
100
|
__decorate([
|
|
@@ -104,5 +104,5 @@ __decorate([
|
|
|
104
104
|
__decorate([
|
|
105
105
|
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
106
106
|
__metadata("design:type", String)
|
|
107
|
-
], CourierAddress.prototype, "
|
|
107
|
+
], CourierAddress.prototype, "phoneNumber", void 0);
|
|
108
108
|
//# sourceMappingURL=address.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shared/address.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAqC;AACrC,6DAAiD;AACjD,oDAAsD;AAG/C,IAAM,OAAO,GAAb,MAAM,OAAO;IAEZ,OAAO,CAAU;IAGjB,WAAW,CAAU;IAGrB,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,OAAO,CAAU;IAGjB,QAAQ,CAAe;IAGvB,QAAQ,CAAU;IAGlB,SAAS,CAAU;IAGnB,IAAI,CAAa;CACxB,CAAA;AA3BY,0BAAO;AAEZ;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wCACf;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CACK;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qCAClB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sCACjB;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wCACf;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,gCAAW,EAAE,CAAC;8BACV,gCAAW;yCAAC;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCACd;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0CACb;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;qCACF;kBA1BZ,OAAO;IADnB,IAAA,iBAAK,EAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;GACnB,OAAO,CA2BnB;AAED,MAAa,WAAY,SAAQ,OAAO;IAEhC,YAAY,CAAU;IAGtB,SAAS,CAAU;IAGnB,YAAY,CAAU;IAGtB,cAAc,CAAU;IAGxB,YAAY,CAAU;CAC7B;AAfD,kCAeC;AAbO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACV;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CACb;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACV;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACQ;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACM;AAG9B,MAAa,cAAe,SAAQ,WAAW;IAEvC,IAAI,CAAS;IAGb,WAAW,CAAS;CAC3B;AAND,wCAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CACH;AAGb;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACZ","sourcesContent":["import { Zone } from '../zone.model';\r\nimport {GeoLocation} from \"./geo-location.model\";\r\nimport {index, prop, Ref} from '@typegoose/typegoose';\r\n\r\n@index({ location: '2dsphere' })\r\nexport class Address {\r\n\t@prop({ required: true, type: String })\r\n\tpublic address!: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic description?: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic city!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic state!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic country!: string;\r\n\r\n\t@prop({ type: GeoLocation })\r\n\tpublic location!: GeoLocation;\r\n\r\n\t@prop({ required: true, type: Number })\r\n\tpublic latitude!: number;\r\n\r\n\t@prop({ required: true, type: Number })\r\n\tpublic longitude!: number;\r\n\r\n\t@prop({ ref: () => Zone })\r\n\tpublic zone?: Ref<Zone>;\r\n}\r\n\r\nexport class UserAddress extends Address {\r\n\t@prop({ required: true, type: String })\r\n\tpublic addressLabel!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic apartment!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic buildingName!: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic deliveryOption?: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic instructions?: string;\r\n}\r\n\r\nexport class CourierAddress extends UserAddress {\r\n\t@prop({ type: String })\r\n\tpublic name: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic
|
|
1
|
+
{"version":3,"file":"address.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shared/address.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAqC;AACrC,6DAAiD;AACjD,oDAAsD;AAG/C,IAAM,OAAO,GAAb,MAAM,OAAO;IAEZ,OAAO,CAAU;IAGjB,WAAW,CAAU;IAGrB,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,OAAO,CAAU;IAGjB,QAAQ,CAAe;IAGvB,QAAQ,CAAU;IAGlB,SAAS,CAAU;IAGnB,IAAI,CAAa;CACxB,CAAA;AA3BY,0BAAO;AAEZ;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAA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A,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACV;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACQ;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACM;AAG9B,MAAa,cAAe,SAAQ,WAAW;IAEvC,IAAI,CAAS;IAGb,WAAW,CAAS;CAC3B;AAND,wCAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CACH;AAGb;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACZ","sourcesContent":["import { Zone } from '../zone.model';\r\nimport {GeoLocation} from \"./geo-location.model\";\r\nimport {index, prop, Ref} from '@typegoose/typegoose';\r\n\r\n@index({ location: '2dsphere' })\r\nexport class Address {\r\n\t@prop({ required: true, type: String })\r\n\tpublic address!: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic description?: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic city!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic state!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic country!: string;\r\n\r\n\t@prop({ type: GeoLocation })\r\n\tpublic location!: GeoLocation;\r\n\r\n\t@prop({ required: true, type: Number })\r\n\tpublic latitude!: number;\r\n\r\n\t@prop({ required: true, type: Number })\r\n\tpublic longitude!: number;\r\n\r\n\t@prop({ ref: () => Zone })\r\n\tpublic zone?: Ref<Zone>;\r\n}\r\n\r\nexport class UserAddress extends Address {\r\n\t@prop({ required: true, type: String })\r\n\tpublic addressLabel!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic apartment!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic buildingName!: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic deliveryOption?: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic instructions?: string;\r\n}\r\n\r\nexport class CourierAddress extends UserAddress {\r\n\t@prop({ type: String })\r\n\tpublic name: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic phoneNumber: string;\r\n}\r\n"]}
|
|
@@ -21,7 +21,7 @@ __decorate([
|
|
|
21
21
|
__metadata("design:type", String)
|
|
22
22
|
], GeoLocation.prototype, "type", void 0);
|
|
23
23
|
__decorate([
|
|
24
|
-
(0, typegoose_1.prop)({ type: [Number], default: [0, 0] }),
|
|
24
|
+
(0, typegoose_1.prop)({ required: true, type: [Number], default: [0, 0] }),
|
|
25
25
|
__metadata("design:type", Array)
|
|
26
26
|
], GeoLocation.prototype, "coordinates", void 0);
|
|
27
27
|
//# sourceMappingURL=geo-location.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geo-location.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shared/geo-location.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"geo-location.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shared/geo-location.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,WAAW;IAEhB,IAAI,CAAU;IAGd,WAAW,CAAY;CAC9B;AAND,kCAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;;yCACrC;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;;gDAC5B","sourcesContent":["import { prop } from '@typegoose/typegoose';\r\n\r\nexport class GeoLocation {\r\n\t@prop({ type: String, enum: ['Point'], default: 'Point' })\r\n\tpublic type?: string;\r\n\r\n\t@prop({ required: true, type: [Number], default: [0, 0] })\r\n\tpublic coordinates!: number[];\r\n}\r\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HolidayWorkStatus, WeekDay, WorkStatus } from '../../../../utilities/enum';
|
|
2
|
-
declare class StartEndTime {
|
|
2
|
+
export declare class StartEndTime {
|
|
3
3
|
start: string;
|
|
4
4
|
end: string;
|
|
5
5
|
}
|
|
@@ -17,4 +17,3 @@ export declare class WorkHourSetting {
|
|
|
17
17
|
normalHours?: NormalHour[];
|
|
18
18
|
holidayHours?: HolidayHour[];
|
|
19
19
|
}
|
|
20
|
-
export {};
|
|
@@ -9,13 +9,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.WorkHourSetting = exports.HolidayHour = exports.NormalHour = void 0;
|
|
12
|
+
exports.WorkHourSetting = exports.HolidayHour = exports.NormalHour = exports.StartEndTime = void 0;
|
|
13
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
14
|
const enum_1 = require("../../../../utilities/enum");
|
|
15
15
|
class StartEndTime {
|
|
16
16
|
start;
|
|
17
17
|
end;
|
|
18
18
|
}
|
|
19
|
+
exports.StartEndTime = StartEndTime;
|
|
19
20
|
__decorate([
|
|
20
21
|
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
21
22
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-hour.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shared/work-hour.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,qDAAoF;AAEpF,
|
|
1
|
+
{"version":3,"file":"work-hour.model.js","sourceRoot":"/","sources":["libraries/m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ACR,YAAY;gDAAC;AAGnC,MAAa,eAAe;IAEpB,WAAW,CAAgB;IAG3B,YAAY,CAAiB;CACpC;AAND,0CAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;oDACd;AAG3B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;qDACb","sourcesContent":["import { prop } from '@typegoose/typegoose';\r\nimport { HolidayWorkStatus, WeekDay, WorkStatus } from '../../../../utilities/enum';\r\n\r\nexport class StartEndTime {\r\n\t@prop({ required: true, type: String })\r\n\tpublic start!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic end!: string;\r\n}\r\n\r\nexport class NormalHour {\r\n\t@prop({ required: true, type: Number, enum: WeekDay })\r\n\tpublic day!: WeekDay;\r\n\r\n\t@prop({ required: true, type: String, enum: WorkStatus })\r\n\tpublic status!: WorkStatus;\r\n\r\n\t@prop({ type: () => [StartEndTime], default: [] })\r\n\tpublic openingHours?: StartEndTime[];\r\n}\r\n\r\nexport class HolidayHour {\r\n\t@prop({ required: true, type: Date })\r\n\tpublic date?: Date;\r\n\r\n\t@prop({\r\n\t\trequired: true,\r\n\t\ttype: String,\r\n\t\tenum: HolidayWorkStatus,\r\n\t})\r\n\tpublic status!: HolidayWorkStatus;\r\n\r\n\t@prop({ type: StartEndTime })\r\n\tpublic closingHour?: StartEndTime;\r\n}\r\n\r\nexport class WorkHourSetting {\r\n\t@prop({ type: () => [NormalHour], default: [] })\r\n\tpublic normalHours?: NormalHour[];\r\n\r\n\t@prop({ type: () => [HolidayHour], default: [] })\r\n\tpublic holidayHours?: HolidayHour[];\r\n}\r\n"]}
|
|
@@ -4,9 +4,10 @@ import { ShopRole } from '../../../utilities/enum';
|
|
|
4
4
|
import { Parent } from './parent.model';
|
|
5
5
|
import { Shop } from './shop.model';
|
|
6
6
|
export declare class ShopAccessControl extends TimeStamps {
|
|
7
|
+
name: string;
|
|
7
8
|
email: string;
|
|
8
9
|
password: string;
|
|
9
|
-
parent
|
|
10
|
-
shops
|
|
10
|
+
parent?: Ref<Parent>;
|
|
11
|
+
shops?: Ref<Shop>[];
|
|
11
12
|
role: ShopRole;
|
|
12
13
|
}
|
|
@@ -17,6 +17,7 @@ const parent_model_1 = require("./parent.model");
|
|
|
17
17
|
const shop_model_1 = require("./shop.model");
|
|
18
18
|
const password_1 = require("../../../utilities/common/password");
|
|
19
19
|
let ShopAccessControl = class ShopAccessControl extends defaultClasses_1.TimeStamps {
|
|
20
|
+
name;
|
|
20
21
|
email;
|
|
21
22
|
password;
|
|
22
23
|
parent;
|
|
@@ -25,19 +26,23 @@ let ShopAccessControl = class ShopAccessControl extends defaultClasses_1.TimeSta
|
|
|
25
26
|
};
|
|
26
27
|
exports.ShopAccessControl = ShopAccessControl;
|
|
27
28
|
__decorate([
|
|
28
|
-
(0, typegoose_1.prop)({ required: true, type: String,
|
|
29
|
+
(0, typegoose_1.prop)({ required: true, type: String, maxlength: 50 }),
|
|
29
30
|
__metadata("design:type", String)
|
|
30
|
-
], ShopAccessControl.prototype, "
|
|
31
|
+
], ShopAccessControl.prototype, "name", void 0);
|
|
31
32
|
__decorate([
|
|
32
33
|
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
33
34
|
__metadata("design:type", String)
|
|
35
|
+
], ShopAccessControl.prototype, "email", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typegoose_1.prop)({ required: true, type: String, minlength: 8 }),
|
|
38
|
+
__metadata("design:type", String)
|
|
34
39
|
], ShopAccessControl.prototype, "password", void 0);
|
|
35
40
|
__decorate([
|
|
36
41
|
(0, typegoose_1.prop)({ required: true, ref: () => parent_model_1.Parent }),
|
|
37
42
|
__metadata("design:type", Object)
|
|
38
43
|
], ShopAccessControl.prototype, "parent", void 0);
|
|
39
44
|
__decorate([
|
|
40
|
-
(0, typegoose_1.prop)({
|
|
45
|
+
(0, typegoose_1.prop)({ ref: () => shop_model_1.Shop, default: [] }),
|
|
41
46
|
__metadata("design:type", Array)
|
|
42
47
|
], ShopAccessControl.prototype, "shops", void 0);
|
|
43
48
|
__decorate([
|
|
@@ -59,6 +64,7 @@ exports.ShopAccessControl = ShopAccessControl = __decorate([
|
|
|
59
64
|
}
|
|
60
65
|
next();
|
|
61
66
|
}),
|
|
67
|
+
(0, typegoose_1.index)({ email: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } }),
|
|
62
68
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'shopAccessControls' } })
|
|
63
69
|
], ShopAccessControl);
|
|
64
70
|
//# sourceMappingURL=shop-access-control.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop-access-control.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shop-access-control.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"shop-access-control.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shop-access-control.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AAErE,kDAAmD;AACnD,iDAAwC;AACxC,6CAAoC;AACpC,iEAAkE;AAkB3D,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,2BAAU;IAEzC,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,QAAQ,CAAU;IAGlB,MAAM,CAAe;IAGrB,KAAK,CAAe;IAGpB,IAAI,CAAY;CACvB,CAAA;AAlBY,8CAAiB;AAEtB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;;+CACjC;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE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uB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;IACnF,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,oBAAoB,EAAE,EAAE,CAAC;GACzD,iBAAiB,CAkB7B","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { Query } from 'mongoose';\r\nimport { ShopRole } from '../../../utilities/enum';\r\nimport { Parent } from './parent.model';\r\nimport { Shop } from './shop.model';\r\nimport { hashPassword } from '../../../utilities/common/password';\r\n\r\n@pre<ShopAccessControl>('save', async function (next) {\r\n\tif (this.isModified('password')) {\r\n\t\tthis.password = await hashPassword(this.password);\r\n\t}\r\n\tnext();\r\n})\r\n@pre<Query<any, ShopAccessControl>>('findOneAndUpdate', async function (next) {\r\n\tconst update = this.getUpdate() as Record<string, any>;\r\n\tif (update?.password) {\r\n\t\tupdate.password = await hashPassword(update.password);\r\n\t\tthis.setUpdate(update);\r\n\t}\r\n\tnext();\r\n})\r\n@index({ email: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\r\n@modelOptions({ schemaOptions: { collection: 'shopAccessControls' } })\r\nexport class ShopAccessControl extends TimeStamps {\r\n\t@prop({ required: true, type: String, maxlength: 50 })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic email!: string;\r\n\r\n\t@prop({ required: true, type: String, minlength: 8 })\r\n\tpublic password!: string;\r\n\r\n\t@prop({ required: true, ref: () => Parent })\r\n\tpublic parent?: Ref<Parent>;\r\n\r\n\t@prop({ ref: () => Shop, default: [] })\r\n\tpublic shops?: Ref<Shop>[];\r\n\r\n\t@prop({ required: true, type: String, enum: ShopRole })\r\n\tpublic role!: ShopRole;\r\n}\r\n"]}
|
|
@@ -5,7 +5,7 @@ import { Brand } from './brand.model';
|
|
|
5
5
|
import { ShopDocument } from './embedded/shop-document.model';
|
|
6
6
|
import { Parent } from './parent.model';
|
|
7
7
|
import { Address } from './shared/address.model';
|
|
8
|
-
import { WorkHourSetting } from './shared/work-hour.model';
|
|
8
|
+
import { StartEndTime, WorkHourSetting } from './shared/work-hour.model';
|
|
9
9
|
import { Tag } from './tag.model';
|
|
10
10
|
import { Zone } from './zone.model';
|
|
11
11
|
export declare class Shop extends TimeStamps {
|
|
@@ -41,6 +41,7 @@ export declare class Shop extends TimeStamps {
|
|
|
41
41
|
defaultPreparationTime?: number;
|
|
42
42
|
exchangeRate?: number;
|
|
43
43
|
workHourSetting?: WorkHourSetting;
|
|
44
|
+
shopActiveTimingsOfCurrentDate?: StartEndTime[];
|
|
44
45
|
isFavouriteCategoryVisible?: boolean;
|
|
45
46
|
favouriteCategoryTitle?: string;
|
|
46
47
|
isBestSellerCategoryVisible?: boolean;
|
|
@@ -53,6 +53,7 @@ let Shop = class Shop extends defaultClasses_1.TimeStamps {
|
|
|
53
53
|
defaultPreparationTime;
|
|
54
54
|
exchangeRate;
|
|
55
55
|
workHourSetting;
|
|
56
|
+
shopActiveTimingsOfCurrentDate;
|
|
56
57
|
isFavouriteCategoryVisible;
|
|
57
58
|
favouriteCategoryTitle;
|
|
58
59
|
isBestSellerCategoryVisible;
|
|
@@ -192,6 +193,10 @@ __decorate([
|
|
|
192
193
|
(0, typegoose_1.prop)({ type: work_hour_model_1.WorkHourSetting }),
|
|
193
194
|
__metadata("design:type", work_hour_model_1.WorkHourSetting)
|
|
194
195
|
], Shop.prototype, "workHourSetting", void 0);
|
|
196
|
+
__decorate([
|
|
197
|
+
(0, typegoose_1.prop)({ type: () => [work_hour_model_1.StartEndTime], default: [] }),
|
|
198
|
+
__metadata("design:type", Array)
|
|
199
|
+
], Shop.prototype, "shopActiveTimingsOfCurrentDate", void 0);
|
|
195
200
|
__decorate([
|
|
196
201
|
(0, typegoose_1.prop)({ required: false, type: () => Boolean }),
|
|
197
202
|
__metadata("design:type", Boolean)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shop.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAyE;AACzE,4EAAqE;AACrE,kDAA6E;AAC7E,+CAAsC;AACtC,wEAA8D;AAC9D,iDAAwC;AACxC,0DAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"shop.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shop.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAyE;AACzE,4EAAqE;AACrE,kDAA6E;AAC7E,+CAAsC;AACtC,wEAA8D;AAC9D,iDAAwC;AACxC,0DAAiD;AACjD,8DAAyE;AACzE,2CAAkC;AAClC,6CAAoC;AAO7B,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,2BAAU;IAE5B,IAAI,CAAU;IAGd,MAAM,CAAc;IAGpB,QAAQ,CAAY;IAGpB,IAAI,CAAU;IAGd,KAAK,CAAa;IAGlB,SAAS,CAAU;IAGnB,KAAK,CAAU;IAGf,WAAW,CAAU;IAGrB,eAAe,CAAU;IAGzB,sBAAsB,CAAY;IAGlC,OAAO,CAAW;IAGlB,IAAI,CAAa;IAGjB,IAAI,CAAU;IAGd,MAAM,CAAU;IAGhB,QAAQ,CAAgB;IAGxB,iBAAiB,CAAW;IAG5B,eAAe,CAAW;IAG1B,MAAM,CAAU;IAOhB,YAAY,CAAoB;IAIhC,wBAAwB,CAAW;IAGnC,kBAAkB,CAAW;IAG7B,SAAS,CAAU;IAGnB,UAAU,CAAU;IAGpB,SAAS,CAAY;IAGrB,IAAI,CAAc;IAGlB,cAAc,CAAW;IAGzB,WAAW,CAAU;IAGrB,kBAAkB,CAAU;IAG5B,aAAa,CAAU;IAGvB,sBAAsB,CAAU;IAGvC,YAAY,CAAU;IAGf,eAAe,CAAmB;IAGlC,8BAA8B,CAAkB;IAGhD,0BAA0B,CAAW;IAGrC,sBAAsB,CAAU;IAGhC,2BAA2B,CAAW;IAGtC,uBAAuB,CAAU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BAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;;wDACH;AAGrC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC;;oDACP;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;;yDACF;AAGtC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC;;qDACN;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;0CACN;eAtHjB,IAAI;IAJhB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE;QACtC,OAAO,EAAE,EAAE,UAAU,EAAE,oBAAQ,CAAC,KAAK,EAAE;KACvC,CAAC;GACW,IAAI,CAuHhB","sourcesContent":["import { modelOptions, prop, Ref, Severity } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { ItemType, ShopOnlineStatus, Status } from '../../../utilities/enum';\r\nimport { Brand } from './brand.model';\r\nimport { ShopDocument } from './embedded/shop-document.model';\r\nimport { Parent } from './parent.model';\r\nimport { Address } from './shared/address.model';\r\nimport { StartEndTime, WorkHourSetting } from './shared/work-hour.model';\r\nimport { Tag } from './tag.model';\r\nimport { Zone } from './zone.model';\r\n\r\n\r\n@modelOptions({\r\n\tschemaOptions: { collection: 'shops' },\r\n\toptions: { allowMixed: Severity.ALLOW },\r\n})\r\nexport class Shop extends TimeStamps {\r\n\t@prop({ required: true, unique: true, type: String })\r\n\tpublic slug!: string;\r\n\r\n\t@prop({ required: true, ref: () => Parent })\r\n\tpublic parent: Ref<Parent>;\r\n\r\n\t@prop({ required: true, type: String, enum: ItemType })\r\n\tpublic itemType!: ItemType;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ required: true, ref: () => Brand })\r\n\tpublic brand: Ref<Brand>;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic ownerName!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic email!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic phoneNumber!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic userPhoneNumber!: string;\r\n\r\n\t@prop({ type: () => [String], default: [] })\r\n\tpublic additionalPhoneNumbers?: string[];\r\n\r\n\t@prop({ required: true, type: Address })\r\n\tpublic address!: Address;\r\n\r\n\t@prop({ required: true, ref: () => Zone })\r\n\tpublic zone!: Ref<Zone>;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic logo!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic banner!: string;\r\n\r\n\t@prop({ required: true, type: ShopDocument })\r\n\tpublic document!: ShopDocument;\r\n\r\n\t@prop({ required: true, type: Boolean })\r\n\tpublic isBeirutAuthentic!: boolean;\r\n\r\n\t@prop({ required: true, type: Boolean })\r\n\tpublic isVisibleToUser!: boolean;\r\n\r\n\t@prop({ required: true, type: String, enum: Status, default: Status.ACTIVE })\r\n\tpublic status!: Status;\r\n\r\n\t@prop({\r\n\t\ttype: String,\r\n\t\tenum: ShopOnlineStatus,\r\n\t\tdefault: ShopOnlineStatus.OFFLINE,\r\n\t})\r\n\tpublic onlineStatus?: ShopOnlineStatus;\r\n\r\n\t// Setting\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic allowSpecialInstructions?: boolean;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isRiderNoteVisible?: boolean;\r\n\r\n\t@prop({ type: String })\r\n\tpublic riderNote?: string;\r\n\r\n\t@prop({ type: Number, default: 1, min: 1, max: 4 })\r\n\tpublic priceRange?: number;\r\n\r\n\t@prop({ type: () => [String], default: [] })\r\n\tpublic dietaries?: string[];\r\n\r\n\t@prop({ ref: () => Tag, default: [] })\r\n\tpublic tags?: Ref<Tag>[];\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isShopDelivery?: boolean;\r\n\r\n\t@prop({ type: Number })\r\n\tpublic deliveryFee?: number;\r\n\r\n\t@prop({ type: Number, default: 0 })\r\n\tpublic minimumOrderAmount?: number;\r\n\r\n\t@prop({ type: Number, default: Infinity })\r\n\tpublic orderCapacity?: number;\r\n\r\n\t@prop({ type: Number, default: 10 })\r\n\tpublic defaultPreparationTime?: number;\r\n\r\n\t@prop({ type: Number, default: null })\r\n\texchangeRate?: number;\r\n\r\n\t@prop({ type: WorkHourSetting })\r\n\tpublic workHourSetting?: WorkHourSetting;\r\n\r\n\t@prop({ type: () => [StartEndTime], default: []})\r\n\tpublic shopActiveTimingsOfCurrentDate?: StartEndTime[];\r\n\r\n\t@prop({ required: false, type: () => Boolean })\r\n\tpublic isFavouriteCategoryVisible?: boolean;\r\n\r\n\t@prop({ required: false, type: () => String })\r\n\tpublic favouriteCategoryTitle?: string;\r\n\r\n\t@prop({ required: false, type: () => Boolean })\r\n\tpublic isBestSellerCategoryVisible?: boolean;\r\n\r\n\t@prop({ required: false, type: () => String })\r\n\tpublic bestSellerCategoryTitle?: string;\r\n\r\n\t@prop({ type: Number, default: 0 })\r\n\tpublic sortingOrder?: number;\r\n}"]}
|
package/dist/utilities/enum.d.ts
CHANGED
|
@@ -161,7 +161,6 @@ export declare enum ClickType {
|
|
|
161
161
|
CLICKABLE_REQUEST_AREA = "clickable_request_area"
|
|
162
162
|
}
|
|
163
163
|
export declare enum ChargeType {
|
|
164
|
-
GLOBAL = "global",
|
|
165
164
|
CUSTOM = "custom"
|
|
166
165
|
}
|
|
167
166
|
export declare enum ShopOnlineStatus {
|
|
@@ -171,8 +170,10 @@ export declare enum ShopOnlineStatus {
|
|
|
171
170
|
}
|
|
172
171
|
export declare enum ShopRole {
|
|
173
172
|
PARENT = "parent",
|
|
173
|
+
PARENT_MANAGER = "parent_manager",
|
|
174
174
|
PARENT_ORDER_MANAGER = "parent_order_manager",
|
|
175
175
|
SHOP = "shop",
|
|
176
|
+
SHOP_MANAGER = "shop_manager",
|
|
176
177
|
SHOP_ORDER_MANAGER = "shop_order_manager"
|
|
177
178
|
}
|
|
178
179
|
export declare enum BannerClickType {
|
package/dist/utilities/enum.js
CHANGED
|
@@ -189,7 +189,6 @@ var ClickType;
|
|
|
189
189
|
})(ClickType || (exports.ClickType = ClickType = {}));
|
|
190
190
|
var ChargeType;
|
|
191
191
|
(function (ChargeType) {
|
|
192
|
-
ChargeType["GLOBAL"] = "global";
|
|
193
192
|
ChargeType["CUSTOM"] = "custom";
|
|
194
193
|
})(ChargeType || (exports.ChargeType = ChargeType = {}));
|
|
195
194
|
var ShopOnlineStatus;
|
|
@@ -201,8 +200,10 @@ var ShopOnlineStatus;
|
|
|
201
200
|
var ShopRole;
|
|
202
201
|
(function (ShopRole) {
|
|
203
202
|
ShopRole["PARENT"] = "parent";
|
|
203
|
+
ShopRole["PARENT_MANAGER"] = "parent_manager";
|
|
204
204
|
ShopRole["PARENT_ORDER_MANAGER"] = "parent_order_manager";
|
|
205
205
|
ShopRole["SHOP"] = "shop";
|
|
206
|
+
ShopRole["SHOP_MANAGER"] = "shop_manager";
|
|
206
207
|
ShopRole["SHOP_ORDER_MANAGER"] = "shop_order_manager";
|
|
207
208
|
})(ShopRole || (exports.ShopRole = ShopRole = {}));
|
|
208
209
|
var BannerClickType;
|
|
@@ -1 +1 @@
|
|
|
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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AAA;AAChB,CAAC,EAFW,SAAS,yBAAT,SAAS,QAEpB","sourcesContent":["export enum Status {\r\n\tACTIVE = 'active',\r\n\tINACTIVE = 'inactive',\r\n}\r\n\r\nexport enum ItemType {\r\n\tFOOD = 'food',\r\n\tGROCERY = 'grocery',\r\n\tPHARMACY = 'pharmacy',\r\n\tCOFFEE = 'coffee',\r\n\tFLOWER = 'flower',\r\n\tPET = 'pet',\r\n\tHEALTHY_CORNER = 'healthy_corner',\r\n}\r\n\r\nexport enum WeekDay {\r\n\tSunday = 0,\r\n\tMonday = 1,\r\n\tTuesday = 2,\r\n\tWednesday = 3,\r\n\tThursday = 4,\r\n\tFriday = 5,\r\n\tSaturday = 6,\r\n}\r\n\r\nexport enum WorkStatus {\r\n\tOPEN = 'open',\r\n\tCLOSED = 'closed',\r\n\tFULL_DAY = 'full_day',\r\n}\r\n\r\nexport enum HolidayWorkStatus {\r\n\tCLOSED = WorkStatus.CLOSED,\r\n\tFULL_DAY = WorkStatus.FULL_DAY,\r\n}\r\n\r\nexport enum ValueType {\r\n\tPERCENTAGE = 'percentage',\r\n\tFIXED = 'fixed',\r\n}\r\n\r\nexport enum PaymentMethod {\r\n\tCASH = 'cash',\r\n\tCARD = 'card',\r\n}\r\n\r\nexport enum PaymentStatus {\r\n\tPAID = 'paid',\r\n\tPENDING = 'pending',\r\n\tFAILED = 'failed',\r\n\tREFUNDED = 'refunded',\r\n\tPARTIALLY_REFUNDED = 'partially_refunded',\r\n}\r\n\r\nexport enum PaidCurrency {\r\n\tBASE = 'base',\r\n\tSECONDARY = 'secondary',\r\n\tMIXED = 'mixed',\r\n}\r\n\r\nexport enum SubscriptionPackage {\r\n\tMONTHLY = 'monthly',\r\n\tYEARLY = 'yearly',\r\n}\r\n\r\nexport enum SubscriptionStatus {\r\n\tONGOING = 'ongoing',\r\n\tEXPIRED = 'expired',\r\n}\r\n\r\nexport enum RatingAccountType {\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n}\r\n\r\nexport enum GeoLocationType {\r\n\tPOINT = 'point',\r\n\tPOLYGON = 'polygon',\r\n}\r\n\r\nexport enum UpdatedField {\r\n\tMAX_TOTAL_EST_ITEMS_PRICE = 'max_total_est_items_price',\r\n\tMAX_DISTANCE = 'max_distance',\r\n\tDAILY_WORKING_HOURS = 'daily_working_hours',\r\n\tBOB_CASH_SETTLEMENT_LIMIT = 'bob_cash_settlement_limit',\r\n\tTIPS = 'tips',\r\n\tEQUIPMENTS = 'equipments',\r\n\tMONTHLY_SHOP_TARGET = 'monthly_shop_target',\r\n\tMONTHLY_REWARD_PRIZE = 'monthly_reward_prize',\r\n\tBASE_CURRENCY = 'base_currency',\r\n\tSECONDARY_CURRENCY = 'secondary_currency',\r\n\tIS_DUAL_CURRENCY_ENABLED = 'is_dual_currency_enabled',\r\n\tEXCHANGE_RATE = 'exchange_rate',\r\n\tISSUANCE_DAY = 'issuance_day',\r\n\tOVER_DUE_PERIODS = 'over_due_periods',\r\n\tPAY_LIMIT_FOR_USER = 'pay_limit_for_user',\r\n\tVAT_PERCENTAGE = 'vat_percentage',\r\n\tRIDER_SEARCH_RANGES = 'rider_search_ranges',\r\n\tNEAR_BY_SHOP_DISTANCE = 'near_by_shop_distance',\r\n\tNEAR_BY_SHOP_DISTANCE_IN_HOME_SCREEN = 'near_by_shop_distance_in_home_screen',\r\n\tUNITS = 'units',\r\n\tCURRENCY_SETTING = 'currency_setting',\r\n\tPAYMENT_METHODS = 'payment_methods',\r\n\tIS_GROUND_ORDER_ENABLED = 'is_ground_order_enabled',\r\n\tCUSTOMER_SUPPORT_PHONE_NUMBER = 'customer_support_phone_number',\r\n}\r\n\r\nexport enum SectionType {\r\n\tSTORE_PUNCHES = 'store_punches',\r\n\tNEARBY_RESTAURANT = 'nearby_restaurant',\r\n\tNEARBY_GROCERY = 'nearby_grocery',\r\n\tNEARBY_PHARMACY = 'nearby_pharmacy',\r\n\tDISCOUNT = 'discount',\r\n\tFREE_DELIVERY = 'free_delivery',\r\n\tCRAZY_OFFER_SHOPS = 'crazy_offer_shops',\r\n\tORDER_AGAIN = 'order_again',\r\n\tFEATURED = 'featured',\r\n\tLOVE = 'love',\r\n\tAUTHENTIC_BEIRUT = 'authentic_beirut',\r\n\tNEAR_ME = 'near_me',\r\n}\r\n\r\nexport enum CoreAuthIdentityType {\r\n\tEMAIL = 'email',\r\n\tPHONE = 'phone',\r\n\tGOOGLE = 'google',\r\n\tAPPLE = 'apple',\r\n}\r\n\r\nexport enum ProductType {\r\n\tMEAT = 'meat',\r\n\tCHICKEN = 'chicken',\r\n\tFISH = 'fish',\r\n\tVEGETARIAN = 'vegetarian',\r\n\tOTHER = 'other',\r\n}\r\n\r\nexport enum PriceOption {\r\n\tSINGLE_PRICE = 'single_price',\r\n\tPRICE_PER_UNIT = 'price_per_unit',\r\n\tPRICE_PER_PORTION = 'price_per_portion',\r\n}\r\n\r\nexport enum AttributeItemSelectionType {\r\n\tSINGLE = 'single',\r\n\tMULTIPLE = 'multiple',\r\n}\r\n\r\nexport enum ProductDietaryType {\r\n\tGLUTEN_FREE = 'gluten_free',\r\n\tLOW_CAL = 'low_cal',\r\n\tVEGETARIAN = 'vegetarian',\r\n\tVEGAN = 'vegan',\r\n\tKETO = 'keto',\r\n\tLACTOSE_FREE = 'lactose_free',\r\n\tHIGH_PROTEIN = 'high_protein',\r\n}\r\n\r\nexport enum DishCategory {\r\n\tBREAKFAST = 'breakfast',\r\n\tLUNCH = 'lunch',\r\n\tDINNER = 'dinner',\r\n\tSNACKS = 'snacks',\r\n}\r\n\r\nexport enum NotificationAccountType {\r\n\tUSER = 'user',\r\n\tPARENT = 'parent',\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n\tADMIN = 'admin',\r\n\tCUSTOMER_SERVICE = 'customer_service',\r\n}\r\n\r\nexport enum ClickType {\r\n\tCLICKABLE_URL = 'clickable_url',\r\n\tCLICKABLE_ORDER = 'clickable_order',\r\n\tCLICKABLE_SHOP = 'clickable_shop',\r\n\tCLICKABLE_PRODUCT = 'clickable_product',\r\n\tCLICKABLE_LIST_CONTAINER = 'clickable_list_container',\r\n\tCLICKABLE_PAYOUT = 'clickable_payout',\r\n\tCLICKABLE_BOB_FINANCE = 'clickable_bob_finance',\r\n\tCLICKABLE_REQUEST_AREA = 'clickable_request_area',\r\n}\r\n\r\nexport enum ChargeType {\r\n\tGLOBAL = 'global',\r\n\tCUSTOM = 'custom',\r\n}\r\n\r\nexport enum ShopOnlineStatus {\r\n\tONLINE = 'online',\r\n\tOFFLINE = 'offline',\r\n\tBUSY = 'busy',\r\n}\r\n\r\nexport enum ShopRole {\r\n\tPARENT = 'parent',\r\n\tPARENT_ORDER_MANAGER = 'parent_order_manager',\r\n\tSHOP = 'shop',\r\n\tSHOP_ORDER_MANAGER = 'shop_order_manager',\r\n}\r\n\r\nexport enum BannerClickType {\r\n\tLINK = 'link',\r\n\tSHOP = 'shop',\r\n\tPRODUCT = 'product',\r\n\tLIST_CONTAINER = 'list_container',\r\n\tPLUS = 'plus',\r\n}\r\n\r\nexport enum BannerLinkType {\r\n\tURL = 'url',\r\n\tAPP_ROUTE = 'app-route',\r\n}\r\n\r\nexport enum BannerUserType {\r\n\tALL = 'all',\r\n\tPLUS = 'plus',\r\n\tNORMAL = 'normal',\r\n}\r\n\r\nexport enum CounterType {\r\n\tORDER = 'order',\r\n\tCRM_NUMBER = 'crm_number',\r\n\tshop = 'shop',\r\n}\r\n\r\nexport enum FaqAccountType {\r\n\tUSER = 'user',\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n}\r\n\r\nexport enum ZoneStatus {\r\n\tACTIVE = 'active',\r\n\tINACTIVE = 'inactive',\r\n\tBUSY = 'busy',\r\n}\r\n\r\nexport enum BobAccountType {\r\n\tRIDER = 'rider',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum BobSettlementType {\r\n\tSETTLE_CASH = 'settle_cash',\r\n\tSETTLE_PAYOUT = 'settle_Payout',\r\n}\r\n\r\nexport enum BobSettlementStatus {\r\n\tNOT_PAID = 'not_paid',\r\n\tPAID = 'paid',\r\n\tREVOKED = 'revoked',\r\n}\r\n\r\nexport enum BobModel {\r\n\tC2B = 'C2B',\r\n\tB2C = 'B2C',\r\n}\r\n\r\nexport enum BobType {\r\n\tINWARD = 'inward',\r\n\tOUTWARD = 'outward',\r\n}\r\n\r\nexport enum CouponType {\r\n\tGLOBAL = 'global',\r\n\tINDIVIDUAL_STORE = 'individual_store',\r\n\tINDIVIDUAL_USER = 'individual_user',\r\n\tCUSTOM_COUPON = 'custom_coupon',\r\n\tREFERRAL_CODE = 'referral_code',\r\n\tREFERRAL_REWARD = 'referral_reward',\r\n}\r\n\r\nexport enum CouponExpirationReason {\r\n\tDURATION = 'duration',\r\n\tSPEND_LIMIT = 'spendLimit',\r\n\tTOTAL_ORDER_LIMIT = 'totalOrderLimit',\r\n}\r\n\r\nexport enum FavouriteType {\r\n\tPRODUCT = 'product',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum MarketingType {\r\n\tDISCOUNT = 'discount',\r\n\tBUY1GET1 = 'buy1get1',\r\n\tFREE_DELIVERY = 'free_delivery',\r\n\tFEATURED = 'featured',\r\n\tLOYALTY_POINT = 'loyalty_point',\r\n\tPUNCH_MARKETING = 'punch_marketing',\r\n}\r\n\r\nexport enum MarketingStatus {\r\n\tACTIVE = 'active',\r\n\tPAUSED = 'paused',\r\n\tEXPIRED = 'expired',\r\n\tDELETED = 'deleted',\r\n}\r\n\r\nexport enum AdminRole {\r\n\tSUPER_ADMIN = 'super_admin',\r\n\tGENERAL_MANAGER = 'general_manager',\r\n\tORDER_MANAGEMENT_MANAGER = 'order_management_lead',\r\n\tORDER_MANAGEMENT_AGENT = 'order_management_agent',\r\n\tACCOUNT_MANAGER = 'account_manager',\r\n\tBUSINESS_DEVELOPMENT_EXECUTIVE = 'business_development_executive',\r\n\tACCOUNTING = 'accounting',\r\n\tMARKETING_MANAGER = 'marketing_manager',\r\n}\r\n\r\nexport enum CartStatus {\r\n\tACTIVE = 'active',\r\n\tLOCKED = 'locked',\r\n\tSUBMITTED = 'submitted',\r\n}\r\n\r\nexport enum PaymentPreference {\r\n\tPAY_FOR_EVERYONE = 'pay_for_everyone',\r\n\tPAY_FOR_THEMSELVES = 'pay_for_themselves',\r\n}\r\n\r\nexport enum CardType {\r\n\tAREEBA = 'areeba',\r\n}\r\n\r\nexport enum CardUserType {\r\n\tPARENT = 'parent',\r\n\tADMIN = 'admin',\r\n\tUSER = 'user',\r\n}\r\n\r\nexport enum AreebaCardStatus {\r\n\tPENDING = 'pending',\r\n\tACTIVE = 'active',\r\n}\r\n\r\nexport enum LiveStatus {\r\n\tONLINE = 'online',\r\n\tOFFLINE = 'offline',\r\n}\r\n\r\nexport enum CreatedBy {\r\n\tADMIN = 'admin',\r\n\tRIDER = 'rider',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum ShiftType {\r\n\tDAY = 'day',\r\n\tNIGHT = 'night',\r\n}\r\n\r\nexport enum RiderType {\r\n\tSHOP_RIDER = 'shop_rider',\r\n\tLYXA_RIDER = 'lyxa_rider',\r\n}\r\n\r\nexport enum Language {\r\n\tEN = 'en',\r\n\tAR = 'ar',\r\n}\r\n\r\nexport enum OrderType {\r\n\tREGULAR = 'regular',\r\n\tCOURIER = 'courier',\r\n}\r\n\r\nexport enum RegularOrderStatus {\r\n\tSCHEDULED = 'schedule',\r\n\tPLACED = 'placed',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tPREPARING = 'preparing',\r\n\tREADY_FOR_PICKUP = 'ready_to_pickup',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum CourierOrderStatus {\r\n\tSCHEDULED = 'schedule',\r\n\tPLACED = 'placed',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum DeliveryStatus {\r\n\tPENDING = 'pending',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tREADY_FOR_PICKUP = 'ready_to_pickup',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum OrderCancelBy {\r\n\tUSER = 'user',\r\n\tADMIN = 'admin',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum CourierServiceType {\r\n\tDELIVERY_ONLY = 'delivery_only',\r\n\tPURCHASE_AND_DELIVER = 'purchase_and_deliver',\r\n}\r\n\r\nexport enum RiderAssignmentStatus {\r\n\tREQUESTED = 'requested',\r\n\tASSIGNED = 'assigned',\r\n\tREJECTED = 'rejected',\r\n\tCANCELED = 'canceled',\r\n}\r\n\r\nexport enum ZoneGeometryType {\r\n\tPOLYGON = 'Polygon',\r\n}\r\n\r\nexport enum WorkingHourSettingsType {\r\n\tGLOBAL = 'Global',\r\n\tSHOP = 'Shop',\r\n}\r\n\r\nexport enum MediaType {\r\n\tIMAGE = 'image',\r\n}\r\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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7B;AAED,IAAY,cAOX;AAPD,WAAY,cAAc;IACzB,qCAAmB,CAAA;IACnB,yDAAuC,CAAA;IACvC,sDAAoC,CAAA;IACpC,2CAAyB,CAAA;IACzB,yCAAuB,CAAA;IACvB,yCAAuB,CAAA;AACxB,CAAC,EAPW,cAAc,8BAAd,cAAc,QAOzB;AAED,IAAY,aAIX;AAJD,WAAY,aAAa;IACxB,8BAAa,CAAA;IACb,gCAAe,CAAA;IACf,8BAAa,CAAA;AACd,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC7B,qDAA+B,CAAA;IAC/B,mEAA6C,CAAA;AAC9C,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAED,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAChC,gDAAuB,CAAA;IACvB,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;AACtB,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC;AAED,IAAY,gBAEX;AAFD,WAAY,gBAAgB;IAC3B,uCAAmB,CAAA;AACpB,CAAC,EAFW,gBAAgB,gCAAhB,gBAAgB,QAE3B;AAED,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IAClC,4CAAiB,CAAA;IACjB,wCAAa,CAAA;AACd,CAAC,EAHW,uBAAuB,uCAAvB,uBAAuB,QAGlC;AAED,IAAY,SAEX;AAFD,WAAY,SAAS;IACpB,4BAAe,CAAA;AAChB,CAAC,EAFW,SAAS,yBAAT,SAAS,QAEpB","sourcesContent":["export enum Status {\r\n\tACTIVE = 'active',\r\n\tINACTIVE = 'inactive',\r\n}\r\n\r\nexport enum ItemType {\r\n\tFOOD = 'food',\r\n\tGROCERY = 'grocery',\r\n\tPHARMACY = 'pharmacy',\r\n\tCOFFEE = 'coffee',\r\n\tFLOWER = 'flower',\r\n\tPET = 'pet',\r\n\tHEALTHY_CORNER = 'healthy_corner',\r\n}\r\n\r\nexport enum WeekDay {\r\n\tSunday = 0,\r\n\tMonday = 1,\r\n\tTuesday = 2,\r\n\tWednesday = 3,\r\n\tThursday = 4,\r\n\tFriday = 5,\r\n\tSaturday = 6,\r\n}\r\n\r\nexport enum WorkStatus {\r\n\tOPEN = 'open',\r\n\tCLOSED = 'closed',\r\n\tFULL_DAY = 'full_day',\r\n}\r\n\r\nexport enum HolidayWorkStatus {\r\n\tCLOSED = WorkStatus.CLOSED,\r\n\tFULL_DAY = WorkStatus.FULL_DAY,\r\n}\r\n\r\nexport enum ValueType {\r\n\tPERCENTAGE = 'percentage',\r\n\tFIXED = 'fixed',\r\n}\r\n\r\nexport enum PaymentMethod {\r\n\tCASH = 'cash',\r\n\tCARD = 'card',\r\n}\r\n\r\nexport enum PaymentStatus {\r\n\tPAID = 'paid',\r\n\tPENDING = 'pending',\r\n\tFAILED = 'failed',\r\n\tREFUNDED = 'refunded',\r\n\tPARTIALLY_REFUNDED = 'partially_refunded',\r\n}\r\n\r\nexport enum PaidCurrency {\r\n\tBASE = 'base',\r\n\tSECONDARY = 'secondary',\r\n\tMIXED = 'mixed',\r\n}\r\n\r\nexport enum SubscriptionPackage {\r\n\tMONTHLY = 'monthly',\r\n\tYEARLY = 'yearly',\r\n}\r\n\r\nexport enum SubscriptionStatus {\r\n\tONGOING = 'ongoing',\r\n\tEXPIRED = 'expired',\r\n}\r\n\r\nexport enum RatingAccountType {\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n}\r\n\r\nexport enum GeoLocationType {\r\n\tPOINT = 'point',\r\n\tPOLYGON = 'polygon',\r\n}\r\n\r\nexport enum UpdatedField {\r\n\tMAX_TOTAL_EST_ITEMS_PRICE = 'max_total_est_items_price',\r\n\tMAX_DISTANCE = 'max_distance',\r\n\tDAILY_WORKING_HOURS = 'daily_working_hours',\r\n\tBOB_CASH_SETTLEMENT_LIMIT = 'bob_cash_settlement_limit',\r\n\tTIPS = 'tips',\r\n\tEQUIPMENTS = 'equipments',\r\n\tMONTHLY_SHOP_TARGET = 'monthly_shop_target',\r\n\tMONTHLY_REWARD_PRIZE = 'monthly_reward_prize',\r\n\tBASE_CURRENCY = 'base_currency',\r\n\tSECONDARY_CURRENCY = 'secondary_currency',\r\n\tIS_DUAL_CURRENCY_ENABLED = 'is_dual_currency_enabled',\r\n\tEXCHANGE_RATE = 'exchange_rate',\r\n\tISSUANCE_DAY = 'issuance_day',\r\n\tOVER_DUE_PERIODS = 'over_due_periods',\r\n\tPAY_LIMIT_FOR_USER = 'pay_limit_for_user',\r\n\tVAT_PERCENTAGE = 'vat_percentage',\r\n\tRIDER_SEARCH_RANGES = 'rider_search_ranges',\r\n\tNEAR_BY_SHOP_DISTANCE = 'near_by_shop_distance',\r\n\tNEAR_BY_SHOP_DISTANCE_IN_HOME_SCREEN = 'near_by_shop_distance_in_home_screen',\r\n\tUNITS = 'units',\r\n\tCURRENCY_SETTING = 'currency_setting',\r\n\tPAYMENT_METHODS = 'payment_methods',\r\n\tIS_GROUND_ORDER_ENABLED = 'is_ground_order_enabled',\r\n\tCUSTOMER_SUPPORT_PHONE_NUMBER = 'customer_support_phone_number',\r\n}\r\n\r\nexport enum SectionType {\r\n\tSTORE_PUNCHES = 'store_punches',\r\n\tNEARBY_RESTAURANT = 'nearby_restaurant',\r\n\tNEARBY_GROCERY = 'nearby_grocery',\r\n\tNEARBY_PHARMACY = 'nearby_pharmacy',\r\n\tDISCOUNT = 'discount',\r\n\tFREE_DELIVERY = 'free_delivery',\r\n\tCRAZY_OFFER_SHOPS = 'crazy_offer_shops',\r\n\tORDER_AGAIN = 'order_again',\r\n\tFEATURED = 'featured',\r\n\tLOVE = 'love',\r\n\tAUTHENTIC_BEIRUT = 'authentic_beirut',\r\n\tNEAR_ME = 'near_me',\r\n}\r\n\r\nexport enum CoreAuthIdentityType {\r\n\tEMAIL = 'email',\r\n\tPHONE = 'phone',\r\n\tGOOGLE = 'google',\r\n\tAPPLE = 'apple',\r\n}\r\n\r\nexport enum ProductType {\r\n\tMEAT = 'meat',\r\n\tCHICKEN = 'chicken',\r\n\tFISH = 'fish',\r\n\tVEGETARIAN = 'vegetarian',\r\n\tOTHER = 'other',\r\n}\r\n\r\nexport enum PriceOption {\r\n\tSINGLE_PRICE = 'single_price',\r\n\tPRICE_PER_UNIT = 'price_per_unit',\r\n\tPRICE_PER_PORTION = 'price_per_portion',\r\n}\r\n\r\nexport enum AttributeItemSelectionType {\r\n\tSINGLE = 'single',\r\n\tMULTIPLE = 'multiple',\r\n}\r\n\r\nexport enum ProductDietaryType {\r\n\tGLUTEN_FREE = 'gluten_free',\r\n\tLOW_CAL = 'low_cal',\r\n\tVEGETARIAN = 'vegetarian',\r\n\tVEGAN = 'vegan',\r\n\tKETO = 'keto',\r\n\tLACTOSE_FREE = 'lactose_free',\r\n\tHIGH_PROTEIN = 'high_protein',\r\n}\r\n\r\nexport enum DishCategory {\r\n\tBREAKFAST = 'breakfast',\r\n\tLUNCH = 'lunch',\r\n\tDINNER = 'dinner',\r\n\tSNACKS = 'snacks',\r\n}\r\n\r\nexport enum NotificationAccountType {\r\n\tUSER = 'user',\r\n\tPARENT = 'parent',\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n\tADMIN = 'admin',\r\n\tCUSTOMER_SERVICE = 'customer_service',\r\n}\r\n\r\nexport enum ClickType {\r\n\tCLICKABLE_URL = 'clickable_url',\r\n\tCLICKABLE_ORDER = 'clickable_order',\r\n\tCLICKABLE_SHOP = 'clickable_shop',\r\n\tCLICKABLE_PRODUCT = 'clickable_product',\r\n\tCLICKABLE_LIST_CONTAINER = 'clickable_list_container',\r\n\tCLICKABLE_PAYOUT = 'clickable_payout',\r\n\tCLICKABLE_BOB_FINANCE = 'clickable_bob_finance',\r\n\tCLICKABLE_REQUEST_AREA = 'clickable_request_area',\r\n}\r\n\r\nexport enum ChargeType {\r\n\tCUSTOM = 'custom',\r\n}\r\n\r\nexport enum ShopOnlineStatus {\r\n\tONLINE = 'online',\r\n\tOFFLINE = 'offline',\r\n\tBUSY = 'busy',\r\n}\r\n\r\nexport enum ShopRole {\r\n\tPARENT = 'parent',\r\n\tPARENT_MANAGER = 'parent_manager',\r\n\tPARENT_ORDER_MANAGER = 'parent_order_manager',\r\n\tSHOP = 'shop',\r\n\tSHOP_MANAGER = 'shop_manager',\r\n\tSHOP_ORDER_MANAGER = 'shop_order_manager',\r\n}\r\n\r\nexport enum BannerClickType {\r\n\tLINK = 'link',\r\n\tSHOP = 'shop',\r\n\tPRODUCT = 'product',\r\n\tLIST_CONTAINER = 'list_container',\r\n\tPLUS = 'plus',\r\n}\r\n\r\nexport enum BannerLinkType {\r\n\tURL = 'url',\r\n\tAPP_ROUTE = 'app-route',\r\n}\r\n\r\nexport enum BannerUserType {\r\n\tALL = 'all',\r\n\tPLUS = 'plus',\r\n\tNORMAL = 'normal',\r\n}\r\n\r\nexport enum CounterType {\r\n\tORDER = 'order',\r\n\tCRM_NUMBER = 'crm_number',\r\n\tshop = 'shop',\r\n}\r\n\r\nexport enum FaqAccountType {\r\n\tUSER = 'user',\r\n\tSHOP = 'shop',\r\n\tRIDER = 'rider',\r\n}\r\n\r\nexport enum ZoneStatus {\r\n\tACTIVE = 'active',\r\n\tINACTIVE = 'inactive',\r\n\tBUSY = 'busy',\r\n}\r\n\r\nexport enum BobAccountType {\r\n\tRIDER = 'rider',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum BobSettlementType {\r\n\tSETTLE_CASH = 'settle_cash',\r\n\tSETTLE_PAYOUT = 'settle_Payout',\r\n}\r\n\r\nexport enum BobSettlementStatus {\r\n\tNOT_PAID = 'not_paid',\r\n\tPAID = 'paid',\r\n\tREVOKED = 'revoked',\r\n}\r\n\r\nexport enum BobModel {\r\n\tC2B = 'C2B',\r\n\tB2C = 'B2C',\r\n}\r\n\r\nexport enum BobType {\r\n\tINWARD = 'inward',\r\n\tOUTWARD = 'outward',\r\n}\r\n\r\nexport enum CouponType {\r\n\tGLOBAL = 'global',\r\n\tINDIVIDUAL_STORE = 'individual_store',\r\n\tINDIVIDUAL_USER = 'individual_user',\r\n\tCUSTOM_COUPON = 'custom_coupon',\r\n\tREFERRAL_CODE = 'referral_code',\r\n\tREFERRAL_REWARD = 'referral_reward',\r\n}\r\n\r\nexport enum CouponExpirationReason {\r\n\tDURATION = 'duration',\r\n\tSPEND_LIMIT = 'spendLimit',\r\n\tTOTAL_ORDER_LIMIT = 'totalOrderLimit',\r\n}\r\n\r\nexport enum FavouriteType {\r\n\tPRODUCT = 'product',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum MarketingType {\r\n\tDISCOUNT = 'discount',\r\n\tBUY1GET1 = 'buy1get1',\r\n\tFREE_DELIVERY = 'free_delivery',\r\n\tFEATURED = 'featured',\r\n\tLOYALTY_POINT = 'loyalty_point',\r\n\tPUNCH_MARKETING = 'punch_marketing',\r\n}\r\n\r\nexport enum MarketingStatus {\r\n\tACTIVE = 'active',\r\n\tPAUSED = 'paused',\r\n\tEXPIRED = 'expired',\r\n\tDELETED = 'deleted',\r\n}\r\n\r\nexport enum AdminRole {\r\n\tSUPER_ADMIN = 'super_admin',\r\n\tGENERAL_MANAGER = 'general_manager',\r\n\tORDER_MANAGEMENT_MANAGER = 'order_management_lead',\r\n\tORDER_MANAGEMENT_AGENT = 'order_management_agent',\r\n\tACCOUNT_MANAGER = 'account_manager',\r\n\tBUSINESS_DEVELOPMENT_EXECUTIVE = 'business_development_executive',\r\n\tACCOUNTING = 'accounting',\r\n\tMARKETING_MANAGER = 'marketing_manager',\r\n}\r\n\r\nexport enum CartStatus {\r\n\tACTIVE = 'active',\r\n\tLOCKED = 'locked',\r\n\tSUBMITTED = 'submitted',\r\n}\r\n\r\nexport enum PaymentPreference {\r\n\tPAY_FOR_EVERYONE = 'pay_for_everyone',\r\n\tPAY_FOR_THEMSELVES = 'pay_for_themselves',\r\n}\r\n\r\nexport enum CardType {\r\n\tAREEBA = 'areeba',\r\n}\r\n\r\nexport enum CardUserType {\r\n\tPARENT = 'parent',\r\n\tADMIN = 'admin',\r\n\tUSER = 'user',\r\n}\r\n\r\nexport enum AreebaCardStatus {\r\n\tPENDING = 'pending',\r\n\tACTIVE = 'active',\r\n}\r\n\r\nexport enum LiveStatus {\r\n\tONLINE = 'online',\r\n\tOFFLINE = 'offline',\r\n}\r\n\r\nexport enum CreatedBy {\r\n\tADMIN = 'admin',\r\n\tRIDER = 'rider',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum ShiftType {\r\n\tDAY = 'day',\r\n\tNIGHT = 'night',\r\n}\r\n\r\nexport enum RiderType {\r\n\tSHOP_RIDER = 'shop_rider',\r\n\tLYXA_RIDER = 'lyxa_rider',\r\n}\r\n\r\nexport enum Language {\r\n\tEN = 'en',\r\n\tAR = 'ar',\r\n}\r\n\r\nexport enum OrderType {\r\n\tREGULAR = 'regular',\r\n\tCOURIER = 'courier',\r\n}\r\n\r\nexport enum RegularOrderStatus {\r\n\tSCHEDULED = 'schedule',\r\n\tPLACED = 'placed',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tPREPARING = 'preparing',\r\n\tREADY_FOR_PICKUP = 'ready_to_pickup',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum CourierOrderStatus {\r\n\tSCHEDULED = 'schedule',\r\n\tPLACED = 'placed',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum DeliveryStatus {\r\n\tPENDING = 'pending',\r\n\tACCEPTED_BY_RIDER = 'accepted_by_rider',\r\n\tREADY_FOR_PICKUP = 'ready_to_pickup',\r\n\tON_THE_WAY = 'on_the_way',\r\n\tDELIVERED = 'delivered',\r\n\tCANCELLED = 'cancelled',\r\n}\r\n\r\nexport enum OrderCancelBy {\r\n\tUSER = 'user',\r\n\tADMIN = 'admin',\r\n\tSHOP = 'shop',\r\n}\r\n\r\nexport enum CourierServiceType {\r\n\tDELIVERY_ONLY = 'delivery_only',\r\n\tPURCHASE_AND_DELIVER = 'purchase_and_deliver',\r\n}\r\n\r\nexport enum RiderAssignmentStatus {\r\n\tREQUESTED = 'requested',\r\n\tASSIGNED = 'assigned',\r\n\tREJECTED = 'rejected',\r\n\tCANCELED = 'canceled',\r\n}\r\n\r\nexport enum ZoneGeometryType {\r\n\tPOLYGON = 'Polygon',\r\n}\r\n\r\nexport enum WorkingHourSettingsType {\r\n\tGLOBAL = 'Global',\r\n\tSHOP = 'Shop',\r\n}\r\n\r\nexport enum MediaType {\r\n\tIMAGE = 'image',\r\n}\r\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function buildSearchQuery(searchKey: string, fields: string[]): Record<string, any>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildSearchQuery = buildSearchQuery;
|
|
4
|
+
function buildSearchQuery(searchKey, fields) {
|
|
5
|
+
if (!searchKey?.trim())
|
|
6
|
+
return {};
|
|
7
|
+
const searchTerms = searchKey.split(/[ ,]+/).filter(term => term.trim() !== '');
|
|
8
|
+
return {
|
|
9
|
+
$and: searchTerms.map(term => ({
|
|
10
|
+
$or: fields.map(field => ({
|
|
11
|
+
[field]: new RegExp(term, 'i'),
|
|
12
|
+
})),
|
|
13
|
+
})),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"/","sources":["utilities/search.ts"],"names":[],"mappings":";;AAqBA,4CAYC;AAZD,SAAgB,gBAAgB,CAAC,SAAiB,EAAE,MAAgB;IACnE,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE;QAAE,OAAO,EAAE,CAAC;IAElC,MAAM,WAAW,GAAG,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAEhF,OAAO;QACN,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC9B,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACzB,CAAC,KAAK,CAAC,EAAE,IAAI,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC;aAC9B,CAAC,CAAC;SACH,CAAC,CAAC;KACH,CAAC;AACH,CAAC","sourcesContent":["/**\r\n * Builds a MongoDB/Mongoose search query that searches across multiple fields\r\n *\r\n * @param searchKey - The search string to parse (space or comma separated terms)\r\n * @param fields - Array of field names to search against (default: ['name', 'email', 'phoneNumber'])\r\n * @returns A MongoDB query object that requires ALL terms to match in ANY of the specified fields\r\n *\r\n * @example\r\n * // Basic usage\r\n * const query = buildSearchQuery('john doe');\r\n * // Returns: {\r\n * // $and: [\r\n * // { $or: [{ name: /john/i }, { email: /john/i }, { phoneNumber: /john/i }] },\r\n * // { $or: [{ name: /doe/i }, { email: /doe/i }, { phoneNumber: /doe/i }] }\r\n * // ]\r\n * // }\r\n *\r\n * @example\r\n * // Custom fields\r\n * const query = buildSearchQuery('example', ['name', 'email']);\r\n */\r\nexport function buildSearchQuery(searchKey: string, fields: string[]): Record<string, any> {\r\n\tif (!searchKey?.trim()) return {};\r\n\r\n\tconst searchTerms = searchKey.split(/[ ,]+/).filter(term => term.trim() !== '');\r\n\r\n\treturn {\r\n\t\t$and: searchTerms.map(term => ({\r\n\t\t\t$or: fields.map(field => ({\r\n\t\t\t\t[field]: new RegExp(term, 'i'),\r\n\t\t\t})),\r\n\t\t})),\r\n\t};\r\n}\r\n"]}
|
|
@@ -137,22 +137,37 @@ export declare const AddressSchema: z.ZodObject<{
|
|
|
137
137
|
city: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
138
138
|
state: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
139
139
|
country: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
location: z.ZodObject<{
|
|
141
|
+
type: z.ZodDefault<z.ZodNativeEnum<typeof GeoLocationType>>;
|
|
142
|
+
coordinates: z.ZodArray<z.ZodNumber, "many">;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
type: GeoLocationType;
|
|
145
|
+
coordinates: number[];
|
|
146
|
+
}, {
|
|
147
|
+
coordinates: number[];
|
|
148
|
+
type?: GeoLocationType | undefined;
|
|
149
|
+
}>;
|
|
142
150
|
latitude: z.ZodNumber;
|
|
143
151
|
longitude: z.ZodNumber;
|
|
152
|
+
zone: z.ZodOptional<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>]>>;
|
|
144
153
|
}, "strip", z.ZodTypeAny, {
|
|
145
|
-
|
|
154
|
+
location: {
|
|
155
|
+
type: GeoLocationType;
|
|
156
|
+
coordinates: number[];
|
|
157
|
+
};
|
|
146
158
|
latitude: number;
|
|
147
159
|
longitude: number;
|
|
148
|
-
geoLocationType: GeoLocationType;
|
|
149
160
|
state?: string | null | undefined;
|
|
150
161
|
address?: string | null | undefined;
|
|
151
162
|
country?: string | null | undefined;
|
|
152
163
|
description?: string | null | undefined;
|
|
153
164
|
city?: string | null | undefined;
|
|
165
|
+
zone?: import("mongoose").Types.ObjectId | undefined;
|
|
154
166
|
}, {
|
|
155
|
-
|
|
167
|
+
location: {
|
|
168
|
+
coordinates: number[];
|
|
169
|
+
type?: GeoLocationType | undefined;
|
|
170
|
+
};
|
|
156
171
|
latitude: number;
|
|
157
172
|
longitude: number;
|
|
158
173
|
state?: string | null | undefined;
|
|
@@ -160,7 +175,7 @@ export declare const AddressSchema: z.ZodObject<{
|
|
|
160
175
|
country?: string | null | undefined;
|
|
161
176
|
description?: string | null | undefined;
|
|
162
177
|
city?: string | null | undefined;
|
|
163
|
-
|
|
178
|
+
zone?: string | import("mongoose").Types.ObjectId | undefined;
|
|
164
179
|
}>;
|
|
165
180
|
export declare const UserAddressSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
166
181
|
address: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -168,10 +183,19 @@ export declare const UserAddressSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
168
183
|
city: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
169
184
|
state: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
170
185
|
country: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
171
|
-
|
|
172
|
-
|
|
186
|
+
location: z.ZodObject<{
|
|
187
|
+
type: z.ZodDefault<z.ZodNativeEnum<typeof GeoLocationType>>;
|
|
188
|
+
coordinates: z.ZodArray<z.ZodNumber, "many">;
|
|
189
|
+
}, "strip", z.ZodTypeAny, {
|
|
190
|
+
type: GeoLocationType;
|
|
191
|
+
coordinates: number[];
|
|
192
|
+
}, {
|
|
193
|
+
coordinates: number[];
|
|
194
|
+
type?: GeoLocationType | undefined;
|
|
195
|
+
}>;
|
|
173
196
|
latitude: z.ZodNumber;
|
|
174
197
|
longitude: z.ZodNumber;
|
|
198
|
+
zone: z.ZodOptional<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>]>>;
|
|
175
199
|
}, {
|
|
176
200
|
addressLabel: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
177
201
|
apartment: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -179,22 +203,28 @@ export declare const UserAddressSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
179
203
|
deliveryOption: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>> | z.ZodOptional<z.ZodOptional<z.ZodString>> | z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
180
204
|
instructions: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>> | z.ZodOptional<z.ZodOptional<z.ZodString>> | z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
181
205
|
}>, "strip", z.ZodTypeAny, {
|
|
182
|
-
|
|
206
|
+
location: {
|
|
207
|
+
type: GeoLocationType;
|
|
208
|
+
coordinates: number[];
|
|
209
|
+
};
|
|
183
210
|
latitude: number;
|
|
184
211
|
longitude: number;
|
|
185
|
-
geoLocationType: GeoLocationType;
|
|
186
212
|
state?: string | null | undefined;
|
|
187
213
|
address?: string | null | undefined;
|
|
188
214
|
country?: string | null | undefined;
|
|
189
215
|
description?: string | null | undefined;
|
|
190
216
|
city?: string | null | undefined;
|
|
217
|
+
zone?: import("mongoose").Types.ObjectId | undefined;
|
|
191
218
|
addressLabel?: string | null | undefined;
|
|
192
219
|
apartment?: string | null | undefined;
|
|
193
220
|
buildingName?: string | null | undefined;
|
|
194
221
|
deliveryOption?: string | null | undefined;
|
|
195
222
|
instructions?: string | null | undefined;
|
|
196
223
|
}, {
|
|
197
|
-
|
|
224
|
+
location: {
|
|
225
|
+
coordinates: number[];
|
|
226
|
+
type?: GeoLocationType | undefined;
|
|
227
|
+
};
|
|
198
228
|
latitude: number;
|
|
199
229
|
longitude: number;
|
|
200
230
|
state?: string | null | undefined;
|
|
@@ -202,12 +232,12 @@ export declare const UserAddressSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
202
232
|
country?: string | null | undefined;
|
|
203
233
|
description?: string | null | undefined;
|
|
204
234
|
city?: string | null | undefined;
|
|
235
|
+
zone?: string | import("mongoose").Types.ObjectId | undefined;
|
|
205
236
|
addressLabel?: string | null | undefined;
|
|
206
237
|
apartment?: string | null | undefined;
|
|
207
238
|
buildingName?: string | null | undefined;
|
|
208
239
|
deliveryOption?: string | null | undefined;
|
|
209
240
|
instructions?: string | null | undefined;
|
|
210
|
-
geoLocationType?: GeoLocationType | undefined;
|
|
211
241
|
}>;
|
|
212
242
|
export declare const CourierAddressSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
213
243
|
address: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -215,10 +245,19 @@ export declare const CourierAddressSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
215
245
|
city: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
216
246
|
state: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
217
247
|
country: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
218
|
-
|
|
219
|
-
|
|
248
|
+
location: z.ZodObject<{
|
|
249
|
+
type: z.ZodDefault<z.ZodNativeEnum<typeof GeoLocationType>>;
|
|
250
|
+
coordinates: z.ZodArray<z.ZodNumber, "many">;
|
|
251
|
+
}, "strip", z.ZodTypeAny, {
|
|
252
|
+
type: GeoLocationType;
|
|
253
|
+
coordinates: number[];
|
|
254
|
+
}, {
|
|
255
|
+
coordinates: number[];
|
|
256
|
+
type?: GeoLocationType | undefined;
|
|
257
|
+
}>;
|
|
220
258
|
latitude: z.ZodNumber;
|
|
221
259
|
longitude: z.ZodNumber;
|
|
260
|
+
zone: z.ZodOptional<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>]>>;
|
|
222
261
|
}, {
|
|
223
262
|
addressLabel: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
224
263
|
apartment: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -227,26 +266,32 @@ export declare const CourierAddressSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
227
266
|
instructions: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>> | z.ZodOptional<z.ZodOptional<z.ZodString>> | z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
228
267
|
}>, {
|
|
229
268
|
name: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
-
|
|
269
|
+
phoneNumber: z.ZodString | z.ZodOptional<z.ZodString> | z.ZodNullable<z.ZodString> | z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
231
270
|
}>, "strip", z.ZodTypeAny, {
|
|
232
|
-
|
|
271
|
+
location: {
|
|
272
|
+
type: GeoLocationType;
|
|
273
|
+
coordinates: number[];
|
|
274
|
+
};
|
|
233
275
|
latitude: number;
|
|
234
276
|
longitude: number;
|
|
235
|
-
geoLocationType: GeoLocationType;
|
|
236
277
|
name?: string | null | undefined;
|
|
237
278
|
state?: string | null | undefined;
|
|
238
279
|
address?: string | null | undefined;
|
|
239
280
|
country?: string | null | undefined;
|
|
240
281
|
description?: string | null | undefined;
|
|
282
|
+
phoneNumber?: string | null | undefined;
|
|
241
283
|
city?: string | null | undefined;
|
|
284
|
+
zone?: import("mongoose").Types.ObjectId | undefined;
|
|
242
285
|
addressLabel?: string | null | undefined;
|
|
243
286
|
apartment?: string | null | undefined;
|
|
244
287
|
buildingName?: string | null | undefined;
|
|
245
288
|
deliveryOption?: string | null | undefined;
|
|
246
289
|
instructions?: string | null | undefined;
|
|
247
|
-
phonenumber?: string | null | undefined;
|
|
248
290
|
}, {
|
|
249
|
-
|
|
291
|
+
location: {
|
|
292
|
+
coordinates: number[];
|
|
293
|
+
type?: GeoLocationType | undefined;
|
|
294
|
+
};
|
|
250
295
|
latitude: number;
|
|
251
296
|
longitude: number;
|
|
252
297
|
name?: string | null | undefined;
|
|
@@ -254,14 +299,14 @@ export declare const CourierAddressSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
254
299
|
address?: string | null | undefined;
|
|
255
300
|
country?: string | null | undefined;
|
|
256
301
|
description?: string | null | undefined;
|
|
302
|
+
phoneNumber?: string | null | undefined;
|
|
257
303
|
city?: string | null | undefined;
|
|
304
|
+
zone?: string | import("mongoose").Types.ObjectId | undefined;
|
|
258
305
|
addressLabel?: string | null | undefined;
|
|
259
306
|
apartment?: string | null | undefined;
|
|
260
307
|
buildingName?: string | null | undefined;
|
|
261
308
|
deliveryOption?: string | null | undefined;
|
|
262
309
|
instructions?: string | null | undefined;
|
|
263
|
-
phonenumber?: string | null | undefined;
|
|
264
|
-
geoLocationType?: GeoLocationType | undefined;
|
|
265
310
|
}>;
|
|
266
311
|
export declare const DurationSchema: z.ZodObject<{
|
|
267
312
|
start: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
@@ -56,10 +56,13 @@ exports.AddressSchema = zod_1.z.object({
|
|
|
56
56
|
city: global_validation_1.ZodValidation.string('City'),
|
|
57
57
|
state: global_validation_1.ZodValidation.string('State'),
|
|
58
58
|
country: global_validation_1.ZodValidation.string('Country'),
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
location: zod_1.z.object({
|
|
60
|
+
type: global_validation_1.ZodValidation.enumType(enum_1.GeoLocationType, 'GeoLocationType').default(enum_1.GeoLocationType.POINT),
|
|
61
|
+
coordinates: global_validation_1.ZodValidation.array(global_validation_1.ZodValidation.number('Coordinate'), 'Coordinates', 2, 2),
|
|
62
|
+
}),
|
|
61
63
|
latitude: global_validation_1.ZodValidation.number('Latitude'),
|
|
62
64
|
longitude: global_validation_1.ZodValidation.number('Longitude'),
|
|
65
|
+
zone: global_validation_1.ZodValidation.objectId('Zone').optional(),
|
|
63
66
|
});
|
|
64
67
|
exports.UserAddressSchema = exports.AddressSchema.extend({
|
|
65
68
|
addressLabel: global_validation_1.ZodValidation.string('Address Label'),
|
|
@@ -70,7 +73,7 @@ exports.UserAddressSchema = exports.AddressSchema.extend({
|
|
|
70
73
|
});
|
|
71
74
|
exports.CourierAddressSchema = exports.UserAddressSchema.extend({
|
|
72
75
|
name: global_validation_1.ZodValidation.string('Name'),
|
|
73
|
-
|
|
76
|
+
phoneNumber: global_validation_1.ZodValidation.string('Phone Number'),
|
|
74
77
|
});
|
|
75
78
|
exports.DurationSchema = zod_1.z.object({
|
|
76
79
|
start: global_validation_1.ZodValidation.date('Start'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-validation.js","sourceRoot":"/","sources":["utilities/validation/common-validation.ts"],"names":[],"mappings":";;;AAAA,6BAAmC;AACnC,2DAAyD;AACz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,CAAC,QAAQ,EAAE,CAAC","sourcesContent":["import { z, ZodSchema } from 'zod';\r\nimport { DTO, ZodValidation } from './global-validation';\r\nimport { GeoLocationType, HolidayWorkStatus, WeekDay, WorkStatus } from '../enum';\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\nconst sortSchema = z.record(z.string(), z.union([z.literal(1), z.literal(-1)]));\r\n\r\nconst populateSchema = z.object({\r\n\tpath: z.string(), // required\r\n\tselect: z.record(z.string(), z.union([z.literal(0), z.literal(1)])).optional(),\r\n\tmatch: z.record(z.string(), z.any()).optional(),\r\n\toptions: z\r\n\t\t.object({\r\n\t\t\tsort: sortSchema.optional(),\r\n\t\t\tlimit: z.number().optional(),\r\n\t\t\tskip: z.number().optional(),\r\n\t\t})\r\n\t\t.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\tsize: z\r\n\t\t\t.number()\r\n\t\t\t.min(1, { message: 'Size must be greater than 0.' })\r\n\t\t\t.max(100, { message: 'Size cannot exceed 100.' })\r\n\t\t\t.optional()\r\n\t\t\t.default(10),\r\n\t\tpage: z.number().min(1, { message: 'Page number must be at least 1.' }).optional().default(1),\r\n\t\tsort: sortSchema.optional(),\r\n\t\tquery: MongoQuerySchema.optional(),\r\n\t\tselect: z.record(z.string(), z.union([z.literal(0), z.literal(1)])).optional(),\r\n\t\tpopulate: z.union([populateSchema, z.array(populateSchema)]).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 courier 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 courierAddressSchema = z.object({\r\n * name: z.string(),\r\n * address: courierAddressSchema\r\n * });\r\n * ```\r\n */\r\nexport const CourierAddressSchema = UserAddressSchema.extend({\r\n\tname: ZodValidation.string('Name'),\r\n\tphonenumber: ZodValidation.string('Phonenumber'),\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\t\trequiredMessage: 'Please enter a valid email address.',\r\n\t\tinvalidMessage: 'Please enter a valid email address.',\r\n\t}),\r\n\tpassword: ZodValidation.string('Password', { requiredMessage: 'Please enter password' }),\r\n});\r\nconst metadataSchema = z.object({\r\n\tpage: ZodValidation.number(),\r\n\tsize: ZodValidation.number(),\r\n\ttotalElements: ZodValidation.number(),\r\n\ttotalPages: ZodValidation.number(),\r\n});\r\n\r\nexport const createPaginatedSchema = <T>(documentSchema: z.ZodSchema<T>) =>\r\n\tz.object({\r\n\t\tmetadata: metadataSchema.optional(),\r\n\t\tdocuments: ZodValidation.array(documentSchema),\r\n\t});\r\n\r\nexport const createResponseSchema = <T>(schema: z.ZodSchema<T>) =>\r\n\tz.object({\r\n\t\tsuccess: ZodValidation.boolean(),\r\n\t\tmessage: ZodValidation.string(),\r\n\t\tdata: z.union([createPaginatedSchema(schema), schema]).optional(),\r\n\t});\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 * 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});\r\nexport type UpdateSortingOrderDTO = DTO<typeof UpdateSortingOrderSchema>;\r\n\r\n/**\r\n * Schema validation for delete\r\n */\r\nexport const DeleteSchema = z.object({\r\n\t_id: ZodValidation.objectId('_id'),\r\n\tsoftDelete: ZodValidation.boolean('Soft Delete').default(true),\r\n});\r\nexport type DeleteDTO = DTO<typeof DeleteSchema>;\r\n\r\n/**\r\n * Schema validation for Id\r\n */\r\nexport const IdSchema = ZodValidation.objectId();\r\n"]}
|
|
1
|
+
{"version":3,"file":"common-validation.js","sourceRoot":"/","sources":["utilities/validation/common-validation.ts"],"names":[],"mappings":";;;AAAA,6BAAmC;AACnC,2DAAyD;AACzD,kCAAkF;AAKlF,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,CAAC,OAAC,CAAC,G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,aAAa,CAAC;IAChD,YAAY,EAAE,iCAAa,CAAC,MAAM,CAAC,cAAc,CAAC;CAClD,CAAC,CAAC;AAKU,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;AAMU,QAAA,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,GAAG,EAAE,iCAAa,CAAC,QAAQ,CAAC,KAAK,CAAC;IAClC,UAAU,EAAE,iCAAa,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;CAC9D,CAAC,CAAC;AAMU,QAAA,QAAQ,GAAG,iCAAa,CAAC,QAAQ,EAAE,CAAC","sourcesContent":["import { z, ZodSchema } from 'zod';\r\nimport { DTO, ZodValidation } from './global-validation';\r\nimport { GeoLocationType, HolidayWorkStatus, WeekDay, WorkStatus } from '../enum';\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\nconst sortSchema = z.record(z.string(), z.union([z.literal(1), z.literal(-1)]));\r\n\r\nconst populateSchema = z.object({\r\n\tpath: z.string(), // required\r\n\tselect: z.record(z.string(), z.union([z.literal(0), z.literal(1)])).optional(),\r\n\tmatch: z.record(z.string(), z.any()).optional(),\r\n\toptions: z\r\n\t\t.object({\r\n\t\t\tsort: sortSchema.optional(),\r\n\t\t\tlimit: z.number().optional(),\r\n\t\t\tskip: z.number().optional(),\r\n\t\t})\r\n\t\t.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\tsize: z\r\n\t\t\t.number()\r\n\t\t\t.min(1, { message: 'Size must be greater than 0.' })\r\n\t\t\t.max(100, { message: 'Size cannot exceed 100.' })\r\n\t\t\t.optional()\r\n\t\t\t.default(10),\r\n\t\tpage: z.number().min(1, { message: 'Page number must be at least 1.' }).optional().default(1),\r\n\t\tsort: sortSchema.optional(),\r\n\t\tquery: MongoQuerySchema.optional(),\r\n\t\tselect: z.record(z.string(), z.union([z.literal(0), z.literal(1)])).optional(),\r\n\t\tpopulate: z.union([populateSchema, z.array(populateSchema)]).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\tlocation: z.object({\r\n\t\ttype: ZodValidation.enumType(GeoLocationType, 'GeoLocationType').default(GeoLocationType.POINT),\r\n\t\tcoordinates: ZodValidation.array(ZodValidation.number('Coordinate'), 'Coordinates', 2, 2),\r\n\t}),\r\n\tlatitude: ZodValidation.number('Latitude'),\r\n\tlongitude: ZodValidation.number('Longitude'),\r\n\tzone: ZodValidation.objectId('Zone').optional(),\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 courier 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 courierAddressSchema = z.object({\r\n * name: z.string(),\r\n * address: courierAddressSchema\r\n * });\r\n * ```\r\n */\r\nexport const CourierAddressSchema = UserAddressSchema.extend({\r\n\tname: ZodValidation.string('Name'),\r\n\tphoneNumber: ZodValidation.string('Phone Number'),\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\t\trequiredMessage: 'Please enter a valid email address.',\r\n\t\tinvalidMessage: 'Please enter a valid email address.',\r\n\t}),\r\n\tpassword: ZodValidation.string('Password', { requiredMessage: 'Please enter password' }),\r\n});\r\nconst metadataSchema = z.object({\r\n\tpage: ZodValidation.number(),\r\n\tsize: ZodValidation.number(),\r\n\ttotalElements: ZodValidation.number(),\r\n\ttotalPages: ZodValidation.number(),\r\n});\r\n\r\nexport const createPaginatedSchema = <T>(documentSchema: z.ZodSchema<T>) =>\r\n\tz.object({\r\n\t\tmetadata: metadataSchema.optional(),\r\n\t\tdocuments: ZodValidation.array(documentSchema),\r\n\t});\r\n\r\nexport const createResponseSchema = <T>(schema: z.ZodSchema<T>) =>\r\n\tz.object({\r\n\t\tsuccess: ZodValidation.boolean(),\r\n\t\tmessage: ZodValidation.string(),\r\n\t\tdata: z.union([createPaginatedSchema(schema), schema]).optional(),\r\n\t});\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 * 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});\r\nexport type UpdateSortingOrderDTO = DTO<typeof UpdateSortingOrderSchema>;\r\n\r\n/**\r\n * Schema validation for delete\r\n */\r\nexport const DeleteSchema = z.object({\r\n\t_id: ZodValidation.objectId('_id'),\r\n\tsoftDelete: ZodValidation.boolean('Soft Delete').default(true),\r\n});\r\nexport type DeleteDTO = DTO<typeof DeleteSchema>;\r\n\r\n/**\r\n * Schema validation for Id\r\n */\r\nexport const IdSchema = ZodValidation.objectId();\r\n"]}
|