@lyxa.ai/core 1.0.296 → 1.0.297
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/flag.model.d.ts +4 -1
- package/dist/libraries/mongo/models/flag.model.js +12 -1
- package/dist/libraries/mongo/models/flag.model.js.map +1 -1
- package/dist/libraries/mongo/models/order.model.d.ts +1 -1
- package/dist/libraries/mongo/models/order.model.js +2 -2
- package/dist/libraries/mongo/models/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
|
@@ -6,14 +6,17 @@ import { User } from './user.model';
|
|
|
6
6
|
import { Shop } from './shop.model';
|
|
7
7
|
import { Rider } from './rider.model';
|
|
8
8
|
import { Admin } from './admin.model';
|
|
9
|
+
import { Parent } from './parent.model';
|
|
9
10
|
export declare class Flag extends TimeStamps {
|
|
10
11
|
order: Ref<Order>;
|
|
12
|
+
orderId: string;
|
|
11
13
|
user?: Ref<User>;
|
|
14
|
+
parent?: Ref<Parent>;
|
|
12
15
|
shop?: Ref<Shop>;
|
|
13
16
|
rider?: Ref<Rider>;
|
|
14
17
|
flagType: FlagType;
|
|
15
18
|
logUsers: LogUser[];
|
|
16
|
-
reasonType
|
|
19
|
+
reasonType?: FlagReasonType;
|
|
17
20
|
otherReason?: string;
|
|
18
21
|
flaggedBy?: Ref<Admin>;
|
|
19
22
|
}
|
|
@@ -18,9 +18,12 @@ const user_model_1 = require("./user.model");
|
|
|
18
18
|
const shop_model_1 = require("./shop.model");
|
|
19
19
|
const rider_model_1 = require("./rider.model");
|
|
20
20
|
const admin_model_1 = require("./admin.model");
|
|
21
|
+
const parent_model_1 = require("./parent.model");
|
|
21
22
|
let Flag = class Flag extends defaultClasses_1.TimeStamps {
|
|
22
23
|
order;
|
|
24
|
+
orderId;
|
|
23
25
|
user;
|
|
26
|
+
parent;
|
|
24
27
|
shop;
|
|
25
28
|
rider;
|
|
26
29
|
flagType;
|
|
@@ -34,10 +37,18 @@ __decorate([
|
|
|
34
37
|
(0, typegoose_1.prop)({ required: true, ref: () => order_model_1.Order }),
|
|
35
38
|
__metadata("design:type", Object)
|
|
36
39
|
], Flag.prototype, "order", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Flag.prototype, "orderId", void 0);
|
|
37
44
|
__decorate([
|
|
38
45
|
(0, typegoose_1.prop)({ ref: () => user_model_1.User }),
|
|
39
46
|
__metadata("design:type", Object)
|
|
40
47
|
], Flag.prototype, "user", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typegoose_1.prop)({ ref: () => parent_model_1.Parent }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], Flag.prototype, "parent", void 0);
|
|
41
52
|
__decorate([
|
|
42
53
|
(0, typegoose_1.prop)({ ref: () => shop_model_1.Shop }),
|
|
43
54
|
__metadata("design:type", Object)
|
|
@@ -55,7 +66,7 @@ __decorate([
|
|
|
55
66
|
__metadata("design:type", Array)
|
|
56
67
|
], Flag.prototype, "logUsers", void 0);
|
|
57
68
|
__decorate([
|
|
58
|
-
(0, typegoose_1.prop)({
|
|
69
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.FlagReasonType, default: enum_1.FlagReasonType.OTHER }),
|
|
59
70
|
__metadata("design:type", String)
|
|
60
71
|
], Flag.prototype, "reasonType", void 0);
|
|
61
72
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flag.model.js","sourceRoot":"/","sources":["libraries/mongo/models/flag.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,kDAA4E;AAC5E,4EAAqE;AACrE,+CAAsC;AACtC,6CAAoC;AACpC,6CAAoC;AACpC,+CAAsC;AACtC,+CAAsC;
|
|
1
|
+
{"version":3,"file":"flag.model.js","sourceRoot":"/","sources":["lib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,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,cAAO,EAAE,CAAC;;sCAC5B;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAc,EAAE,OAAO,EAAE,qBAAc,CAAC,KAAK,EAAE,CAAC;;wCACzC;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCACK;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;uCACG;eAhClB,IAAI;IADhB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,CAAC;GAC5C,IAAI,CAiChB","sourcesContent":["import { modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { FlagType, LogUser, FlagReasonType } from '../../../utilities/enum';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Order } from './order.model';\nimport { User } from './user.model';\nimport { Shop } from './shop.model';\nimport { Rider } from './rider.model';\nimport { Admin } from './admin.model';\nimport { Parent } from './parent.model';\n\n@modelOptions({ schemaOptions: { collection: 'flags' } })\nexport class Flag extends TimeStamps {\n\t@prop({ required: true, ref: () => Order })\n\tpublic order!: Ref<Order>;\n\n\t@prop({ required: true, type: String })\n\tpublic orderId!: string;\n\n\t@prop({ ref: () => User })\n\tpublic user?: Ref<User>;\n\n\t@prop({ ref: () => Parent })\n\tpublic parent?: Ref<Parent>;\n\n\t@prop({ ref: () => Shop })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ ref: () => Rider })\n\tpublic rider?: Ref<Rider>;\n\n\t@prop({ required: true, type: String, enum: FlagType })\n\tpublic flagType!: FlagType;\n\n\t@prop({ required: true, type: [String], enum: LogUser })\n\tpublic logUsers!: LogUser[];\n\n\t@prop({ type: String, enum: FlagReasonType, default: FlagReasonType.OTHER })\n\tpublic reasonType?: FlagReasonType;\n\n\t@prop({ type: String })\n\tpublic otherReason?: string;\n\n\t@prop({ ref: () => Admin })\n\tpublic flaggedBy?: Ref<Admin>;\n}\n"]}
|
|
@@ -27,7 +27,7 @@ export declare class Order extends TimeStamps {
|
|
|
27
27
|
isOrderReviewed?: boolean;
|
|
28
28
|
isReviewNotificationSent?: boolean;
|
|
29
29
|
pinCode: number;
|
|
30
|
-
|
|
30
|
+
isFlagged?: boolean;
|
|
31
31
|
flagTypes?: FlagType[];
|
|
32
32
|
flaggedAt?: Date;
|
|
33
33
|
flags: Ref<Flag>[];
|
|
@@ -39,7 +39,7 @@ let Order = class Order extends defaultClasses_1.TimeStamps {
|
|
|
39
39
|
isOrderReviewed;
|
|
40
40
|
isReviewNotificationSent;
|
|
41
41
|
pinCode;
|
|
42
|
-
|
|
42
|
+
isFlagged;
|
|
43
43
|
flagTypes;
|
|
44
44
|
flaggedAt;
|
|
45
45
|
flags;
|
|
@@ -146,7 +146,7 @@ __decorate([
|
|
|
146
146
|
__decorate([
|
|
147
147
|
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
148
148
|
__metadata("design:type", Boolean)
|
|
149
|
-
], Order.prototype, "
|
|
149
|
+
], Order.prototype, "isFlagged", void 0);
|
|
150
150
|
__decorate([
|
|
151
151
|
(0, typegoose_1.prop)({ type: [String], enum: enum_1.FlagType, default: [] }),
|
|
152
152
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,kDAAkG;AAClG,sEAA4D;AAC5D,+CAAsC;AACtC,kGAAqF;AACrF,iEAAuD;AACvD,6CAAoC;AAqB7B,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,2BAAU;IAE7B,OAAO,CAAS;IAGhB,SAA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S,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC;IAC5E,IAAA,iBAAK,EAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC;IAC3E,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC;IACvE,IAAA,iBAAK,EAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC;IACzE,IAAA,iBAAK,EAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC;GAC5D,KAAK,CAsGjB","sourcesContent":["import { prop, Ref, modelOptions, Severity, index } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { FlagType, LateOrderReason, OrderType, UrgentOrderReason } from '../../../utilities/enum';\nimport { OrderCancel } from './embedded/order-cancel.model';\nimport { Rider } from './rider.model';\nimport { DeliveryFeeInformation } from './embedded/order-delivery-information.model';\nimport { OrderDelivery } from './order-delivery.model';\nimport { Flag } from './flag.model';\n\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'orders',\n\t\tdiscriminatorKey: 'orderType',\n\t\ttoJSON: { virtuals: true },\n\t\ttoObject: { virtuals: true },\n\t},\n\toptions: { allowMixed: Severity.ALLOW },\n})\n@index({ 'deliveryAddress.location': '2dsphere' })\n@index({ user: 1, status: 1, processedAt: -1 })\n@index({ shop: 1, status: 1, processedAt: -1 })\n@index({ parent: 1, status: 1, processedAt: -1 })\n@index({ orderType: 1, status: 1, processedAt: -1 })\n@index({ orderType: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ itemType: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ shop: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ parent: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\n@index({ rider: 1, status: 1, isEndorseLossApplied: 1, processedAt: -1 })\nexport class Order extends TimeStamps {\n\t@prop({ required: true, type: String, unique: true })\n\tpublic orderId: string;\n\n\t@prop({ type: String, enum: OrderType, default: OrderType.REGULAR })\n\tpublic orderType?: OrderType;\n\n\t@prop({ ref: () => Rider, index: true })\n\tpublic rider?: Ref<Rider>;\n\n\t@prop({ type: () => DeliveryFeeInformation })\n\tpublic deliveryFeeInformation?: DeliveryFeeInformation;\n\n\t@prop({ type: Date })\n\tpublic estimatedDeliveredTime: Date;\n\n\t@prop({ type: Number })\n\tpublic estimatedDeliveredTimeInMinutes: number;\n\n\t@prop({ type: Date })\n\tpublic deliveredAt: Date;\n\n\t@prop({ type: Number })\n\tpublic deliveredTimeInMinutes: number;\n\n\t@prop({ type: String })\n\tpublic instruction?: string;\n\n\t@prop({ type: String })\n\tpublic note?: string;\n\n\t@prop({ type: Date })\n\tpublic scheduledFor?: Date;\n\n\t@prop({ type: () => OrderCancel })\n\tpublic orderCancel?: OrderCancel;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLateOrder?: boolean;\n\n\t@prop({\n\t\ttype: [String],\n\t\tenum: LateOrderReason,\n\t\tdefault: [],\n\t})\n\tpublic lateOrderReasons?: LateOrderReason[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isUrgentOrder?: boolean;\n\n\t@prop({\n\t\ttype: [String],\n\t\tenum: UrgentOrderReason,\n\t\tdefault: [],\n\t})\n\tpublic urgentOrderReasons?: UrgentOrderReason[];\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic processedAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isOrderReviewed?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReviewNotificationSent?: boolean;\n\n\t@prop({\n\t\ttype: Number,\n\t\trequired: true,\n\t\tmin: 1000,\n\t\tmax: 9999,\n\t\tvalidate: {\n\t\t\tvalidator: (v: number) => Number.isInteger(v),\n\t\t\tmessage: 'Pin code must be an integer',\n\t\t},\n\t})\n\tpublic pinCode!: number;\n\n\t// Flag feature\n\t@prop({ type: Boolean, default: false })\n\tpublic isFlagged?: boolean;\n\n\t@prop({ type: [String], enum: FlagType, default: [] })\n\tpublic flagTypes?: FlagType[];\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic flaggedAt?: Date;\n\n\t@prop({\n\t\tref: () => Flag,\n\t\tforeignField: 'order',\n\t\tlocalField: '_id',\n\t})\n\tpublic flags: Ref<Flag>[];\n\n\t@prop({\n\t\tref: () => OrderDelivery,\n\t\tforeignField: 'order',\n\t\tlocalField: '_id',\n\t\tjustOne: true,\n\t})\n\tpublic orderDelivery: Ref<OrderDelivery>;\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED