@lyxa.ai/core 1.0.333 → 1.0.336-alpha.1
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/category.model.d.ts +1 -0
- package/dist/libraries/mongo/models/category.model.js +29 -1
- package/dist/libraries/mongo/models/category.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/capacity-settings.model.d.ts +5 -2
- package/dist/libraries/mongo/models/embedded/capacity-settings.model.js +15 -8
- package/dist/libraries/mongo/models/embedded/capacity-settings.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/courier-order.model.d.ts +2 -0
- package/dist/libraries/mongo/models/providers/courier-order.model.js +10 -0
- package/dist/libraries/mongo/models/providers/courier-order.model.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
|
3
3
|
import { ItemType, Status } from '../../../utilities/enum';
|
|
4
4
|
export declare class Category extends TimeStamps {
|
|
5
5
|
name: string;
|
|
6
|
+
nameNormalized: string;
|
|
6
7
|
image?: string;
|
|
7
8
|
itemType: ItemType;
|
|
8
9
|
parentCategory?: Ref<Category>;
|
|
@@ -15,6 +15,7 @@ const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
|
15
15
|
const enum_1 = require("../../../utilities/enum");
|
|
16
16
|
let Category = class Category extends defaultClasses_1.TimeStamps {
|
|
17
17
|
name;
|
|
18
|
+
nameNormalized;
|
|
18
19
|
image;
|
|
19
20
|
itemType;
|
|
20
21
|
parentCategory;
|
|
@@ -26,6 +27,10 @@ __decorate([
|
|
|
26
27
|
(0, typegoose_1.prop)({ required: true, type: String, trim: true, maxlength: 30 }),
|
|
27
28
|
__metadata("design:type", String)
|
|
28
29
|
], Category.prototype, "name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typegoose_1.prop)({ required: true, type: String, trim: true, lowercase: true, select: false }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], Category.prototype, "nameNormalized", void 0);
|
|
29
34
|
__decorate([
|
|
30
35
|
(0, typegoose_1.prop)({ type: String }),
|
|
31
36
|
__metadata("design:type", String)
|
|
@@ -48,6 +53,29 @@ __decorate([
|
|
|
48
53
|
], Category.prototype, "note", void 0);
|
|
49
54
|
exports.Category = Category = __decorate([
|
|
50
55
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'categories' } }),
|
|
51
|
-
(0, typegoose_1.
|
|
56
|
+
(0, typegoose_1.index)({ nameNormalized: 1, itemType: 1 }, {
|
|
57
|
+
unique: true,
|
|
58
|
+
partialFilterExpression: {
|
|
59
|
+
itemType: { $in: [enum_1.ItemType.GROCERY, enum_1.ItemType.PHARMACY] },
|
|
60
|
+
parentCategory: null,
|
|
61
|
+
deletedAt: null,
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
(0, typegoose_1.pre)('save', function (next) {
|
|
65
|
+
if (this.name) {
|
|
66
|
+
this.nameNormalized = this.name.toLowerCase();
|
|
67
|
+
}
|
|
68
|
+
next();
|
|
69
|
+
}),
|
|
70
|
+
(0, typegoose_1.pre)('findOneAndUpdate', function (next) {
|
|
71
|
+
const update = this.getUpdate();
|
|
72
|
+
if (update?.name) {
|
|
73
|
+
update.nameNormalized = update.name.toLowerCase();
|
|
74
|
+
}
|
|
75
|
+
if (update?.$set?.name) {
|
|
76
|
+
update.$set.nameNormalized = update.$set.name.toLowerCase();
|
|
77
|
+
}
|
|
78
|
+
next();
|
|
79
|
+
})
|
|
52
80
|
], Category);
|
|
53
81
|
//# sourceMappingURL=category.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.model.js","sourceRoot":"/","sources":["libraries/mongo/models/category.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"category.model.js","sourceRoot":"/","sources":["libra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AAE,YAAY,EAAE,EAAE,CAAC;IAC7D,IAAA,iBAAK,EACL,EAAE,cAAc,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAClC;QACC,MAAM,EAAE,IAAI;QACZ,uBAAuB,EAAE;YACxB,QAAQ,EAAE,EAAE,GAAG,EAAE,CAAC,eAAQ,CAAC,OAAO,EAAE,eAAQ,CAAC,QAAQ,CAAC,EAAE;YACxD,cAAc,EAAE,IAAI;YACpB,SAAS,EAAE,IAAI;SACf;KACD,CACD;IACA,IAAA,eAAG,EAAW,MAAM,EAAE,UAAU,IAAI;QACpC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACf,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QAC/C,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IACD,IAAA,eAAG,EAAW,kBAAkB,EAAE,UAAsC,IAAI;QAC5E,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAS,CAAC;QACvC,IAAI,MAAM,EAAE,IAAI,EAAE,CAAC;YAClB,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QACnD,CAAC;QACD,IAAI,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YACxB,MAAM,CAAC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QAC7D,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,QAAQ,CAqBpB","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ItemType, Status } from '../../../utilities/enum';\nimport { Query } from 'mongoose';\n\n@modelOptions({ schemaOptions: { collection: 'categories' } })\n@index(\n\t{ nameNormalized: 1, itemType: 1 },\n\t{\n\t\tunique: true,\n\t\tpartialFilterExpression: {\n\t\t\titemType: { $in: [ItemType.GROCERY, ItemType.PHARMACY] },\n\t\t\tparentCategory: null,\n\t\t\tdeletedAt: null,\n\t\t},\n\t}\n)\n@pre<Category>('save', function (next) {\n\tif (this.name) {\n\t\tthis.nameNormalized = this.name.toLowerCase();\n\t}\n\tnext();\n})\n@pre<Category>('findOneAndUpdate', function (this: Query<any, Category>, next) {\n\tconst update = this.getUpdate() as any;\n\tif (update?.name) {\n\t\tupdate.nameNormalized = update.name.toLowerCase();\n\t}\n\tif (update?.$set?.name) {\n\t\tupdate.$set.nameNormalized = update.$set.name.toLowerCase();\n\t}\n\tnext();\n})\nexport class Category extends TimeStamps {\n\t@prop({ required: true, type: String, trim: true, maxlength: 30 })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String, trim: true, lowercase: true, select: false })\n\tpublic nameNormalized!: string;\n\n\t@prop({ type: String })\n\tpublic image?: string;\n\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ ref: () => Category })\n\tpublic parentCategory?: Ref<Category>;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: String, maxlength: 250 })\n\tpublic note?: string;\n}\n"]}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { Ref } from '@typegoose/typegoose';
|
|
2
2
|
import { WeekDay } from '../../../../utilities/enum';
|
|
3
3
|
import { Service } from '../service.model';
|
|
4
|
-
declare class
|
|
5
|
-
day: WeekDay;
|
|
4
|
+
declare class Services {
|
|
6
5
|
service: Ref<Service>;
|
|
7
6
|
numberOfProfessionals: number;
|
|
8
7
|
}
|
|
8
|
+
declare class Capacity {
|
|
9
|
+
day: WeekDay;
|
|
10
|
+
services: Services[];
|
|
11
|
+
}
|
|
9
12
|
export declare class CapacitySettings {
|
|
10
13
|
slotBufferTime: number;
|
|
11
14
|
slotInterval: number;
|
|
@@ -12,26 +12,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CapacitySettings = void 0;
|
|
13
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
14
|
const enum_1 = require("../../../../utilities/enum");
|
|
15
|
-
class
|
|
16
|
-
day;
|
|
15
|
+
class Services {
|
|
17
16
|
service;
|
|
18
17
|
numberOfProfessionals;
|
|
19
18
|
}
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, typegoose_1.prop)({ required: true, type: Number, enum: enum_1.WeekDay }),
|
|
22
|
-
__metadata("design:type", Number)
|
|
23
|
-
], Capacity.prototype, "day", void 0);
|
|
24
19
|
__decorate([
|
|
25
20
|
(0, typegoose_1.prop)({ required: true }),
|
|
26
21
|
__metadata("design:type", Object)
|
|
27
|
-
],
|
|
22
|
+
], Services.prototype, "service", void 0);
|
|
28
23
|
__decorate([
|
|
29
24
|
(0, typegoose_1.prop)({
|
|
30
25
|
required: true,
|
|
31
26
|
type: Number,
|
|
32
27
|
}),
|
|
33
28
|
__metadata("design:type", Number)
|
|
34
|
-
],
|
|
29
|
+
], Services.prototype, "numberOfProfessionals", void 0);
|
|
30
|
+
class Capacity {
|
|
31
|
+
day;
|
|
32
|
+
services;
|
|
33
|
+
}
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typegoose_1.prop)({ required: true, type: Number, enum: enum_1.WeekDay }),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], Capacity.prototype, "day", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typegoose_1.prop)({ type: () => [Services] }),
|
|
40
|
+
__metadata("design:type", Array)
|
|
41
|
+
], Capacity.prototype, "services", void 0);
|
|
35
42
|
let CapacitySettings = class CapacitySettings {
|
|
36
43
|
slotBufferTime;
|
|
37
44
|
slotInterval;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capacity-settings.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/capacity-settings.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,qDAAqD;AAIrD,MAAM,QAAQ;IAEH,
|
|
1
|
+
{"version":3,"file":"capacity-settings.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/capacity-settings.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,qDAAqD;AAIrD,MAAM,QAAQ;IAEH,OAAO,CAAe;IAMtB,qBAAqB,CAAU;CACzC;AAPU;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACI;AAMtB;IAJN,IAAA,gBAAI,EAAC;QACF,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,MAAM;KACf,CAAC;;uDACoC;AAG1C,MAAM,QAAQ;IAEH,GAAG,CAAW;IAGd,QAAQ,CAAa;CAC/B;AAJU;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAO,EAAE,CAAC;;qCACjC;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;;0CACL;AAIzB,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAMlB,cAAc,CAAS;IAOvB,YAAY,CAAS;IAGrB,QAAQ,CAAY;CAC9B,CAAA;AAjBY,4CAAgB;AAMlB;IALN,IAAA,gBAAI,EAAC;QACF,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,EAAE;QACP,OAAO,EAAE,CAAC;KACb,CAAC;;wDAC4B;AAOvB;IALN,IAAA,gBAAI,EAAC;QACF,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,GAAG;QACR,OAAO,EAAE,EAAE;KACd,CAAC;;sDAC0B;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;;kDACN;2BAhBlB,gBAAgB;IAD5B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,kBAAkB,EAAE,EAAE,CAAC;GACvD,gBAAgB,CAiB5B","sourcesContent":["import { modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { WeekDay } from '../../../../utilities/enum';\nimport { Service } from '../service.model';\n\n\nclass Services {\n @prop({ required: true })\n public service!: Ref<Service>\n\n @prop({\n required: true,\n type: Number,\n })\n public numberOfProfessionals!: number;\n}\n\nclass Capacity {\n @prop({ required: true, type: Number, enum: WeekDay })\n public day!: WeekDay;\n\n @prop({ type: () => [Services] })\n public services!: Services[]\n}\n\n@modelOptions({ schemaOptions: { collection: 'capacitySettings' } })\nexport class CapacitySettings {\n @prop({\n min: 5,\n max: 60,\n default: 5,\n })\n public slotBufferTime: number; // minutes\n\n @prop({\n min: 30,\n max: 120,\n default: 30,\n })\n public slotInterval: number; // minutes\n\n @prop({ type: () => [Capacity] })\n public capacity: Capacity[]\n}\n"]}
|
|
@@ -24,6 +24,8 @@ export declare class CourierOrder extends Order {
|
|
|
24
24
|
pickupAddress: CourierAddress;
|
|
25
25
|
deliveryAddress: CourierAddress;
|
|
26
26
|
items?: CourierItem[];
|
|
27
|
+
receiptImage?: string;
|
|
28
|
+
receiptPrice?: number;
|
|
27
29
|
finance: CourierOrderFinance;
|
|
28
30
|
adjustedFinance?: CourierOrderFinance;
|
|
29
31
|
}
|
|
@@ -64,6 +64,8 @@ class CourierOrder extends order_model_1.Order {
|
|
|
64
64
|
pickupAddress;
|
|
65
65
|
deliveryAddress;
|
|
66
66
|
items;
|
|
67
|
+
receiptImage;
|
|
68
|
+
receiptPrice;
|
|
67
69
|
finance;
|
|
68
70
|
adjustedFinance;
|
|
69
71
|
}
|
|
@@ -100,6 +102,14 @@ __decorate([
|
|
|
100
102
|
(0, typegoose_1.prop)({ type: () => [CourierItem], default: [] }),
|
|
101
103
|
__metadata("design:type", Array)
|
|
102
104
|
], CourierOrder.prototype, "items", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
107
|
+
__metadata("design:type", String)
|
|
108
|
+
], CourierOrder.prototype, "receiptImage", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typegoose_1.prop)({ type: Number }),
|
|
111
|
+
__metadata("design:type", Number)
|
|
112
|
+
], CourierOrder.prototype, "receiptPrice", void 0);
|
|
103
113
|
__decorate([
|
|
104
114
|
(0, typegoose_1.prop)({ required: true, type: courier_order_finance_model_1.CourierOrderFinance }),
|
|
105
115
|
__metadata("design:type", courier_order_finance_model_1.CourierOrderFinance)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"courier-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/courier-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,gDAAuC;AACvC,qDAA+F;AAC/F,2DAAyD;AACzD,6EAA+E;AAC/E,yFAA8E;AAC9E,8CAAqC;AAErC,MAAM,WAAW;IAET,WAAW,CAAS;IAGpB,YAAY,CAAU;IAGtB,QAAQ,CAAS;IAGjB,SAAS,CAAU;IAGnB,kBAAkB,CAAU;IAG5B,UAAU,CAAU;IAGpB,mBAAmB,CAAU;CACpC;AAnBO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACE;AAGpB;IADN,IAAA,gBAAI,GAAE;;iDACsB;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;6CACT;AAGjB;IADN,IAAA,gBAAI,GAAE;;8CACmB;AAGnB;IADN,IAAA,gBAAI,GAAE;;uDAC4B;AAG5B;IADN,IAAA,gBAAI,GAAE;;+CACoB;AAGpB;IADN,IAAA,gBAAI,GAAE;;wDAC6B;AAGrC,MAAa,YAAa,SAAQ,mBAAK;IAC/B,SAAS,GAAG,gBAAS,CAAC,OAAgB,CAAC;IAGvC,I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,EAAE,IAAI,EAAE,IAAI,EAAE,iDAAmB,EAAE,CAAC;8BACpC,iDAAmB;6CAAC;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,iDAAmB,EAAE,CAAC;8BACX,iDAAmB;qDAAC","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { Order } from '../order.model';\nimport { CourierOrderStatus, CourierServiceType, OrderType } from '../../../../utilities/enum';\nimport { CourierAddress } from '../shared/address.model';\nimport { CourierOrderStatusTimeline } from '../embedded/status-timeline.model';\nimport { CourierOrderFinance } from '../embedded/courier-order-finance.model';\nimport { User } from '../user.model';\n\nclass CourierItem {\n\t@prop({ required: true })\n\tpublic productName: string;\n\n\t@prop()\n\tpublic productImage?: string;\n\n\t@prop({ required: true, min: 1 })\n\tpublic quantity: number;\n\n\t@prop()\n\tpublic unitPrice?: number;\n\n\t@prop()\n\tpublic secondaryUnitPrice?: number;\n\n\t@prop()\n\tpublic totalPrice?: number;\n\n\t@prop()\n\tpublic secondaryTotalPrice?: number;\n}\n\nexport class CourierOrder extends Order {\n\tpublic orderType = OrderType.COURIER as const;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user: Ref<User>;\n\n\t@prop({ type: String, enum: CourierOrderStatus, default: CourierOrderStatus.PLACED })\n\tpublic status: CourierOrderStatus;\n\n\t@prop({ type: () => [CourierOrderStatusTimeline], default: [] })\n\tpublic statusTimeline: CourierOrderStatusTimeline[];\n\n\t@prop({ type: String })\n\tpublic description: string;\n\n\t@prop({ required: true, type: String, enum: CourierServiceType })\n\tpublic courierType!: CourierServiceType;\n\n\t@prop({ required: true, type: () => CourierAddress })\n\tpublic pickupAddress!: CourierAddress;\n\n\t@prop({ required: true, type: CourierAddress })\n\tpublic deliveryAddress!: CourierAddress;\n\n\t@prop({ type: () => [CourierItem], default: [] })\n\tpublic items?: CourierItem[];\n\n\t@prop({ type: String })\n\tpublic receiptImage?: string;\n\n\t@prop({ type: Number })\n\tpublic receiptPrice?: number;\n\n\t@prop({ required: true, type: CourierOrderFinance })\n\tpublic finance: CourierOrderFinance;\n\n\t@prop({ type: CourierOrderFinance })\n\tpublic adjustedFinance?: CourierOrderFinance;\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyxa.ai/types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.336-alpha.1",
|
|
4
4
|
"description": "Lyxa type definitions and validation schemas for both frontend and backend",
|
|
5
5
|
"author": "elie <42282499+Internalizable@users.noreply.github.com>",
|
|
6
6
|
"license": "MIT",
|