@lyxa.ai/core 1.3.46 → 1.3.47
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/address-change-history.model.d.ts +25 -0
- package/dist/libraries/mongo/models/embedded/address-change-history.model.js +112 -0
- package/dist/libraries/mongo/models/embedded/address-change-history.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/courier-order.model.d.ts +2 -0
- package/dist/libraries/mongo/models/providers/courier-order.model.js +6 -0
- package/dist/libraries/mongo/models/providers/courier-order.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/regular-order.model.d.ts +2 -0
- package/dist/libraries/mongo/models/providers/regular-order.model.js +6 -0
- package/dist/libraries/mongo/models/providers/regular-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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Ref } from '@typegoose/typegoose';
|
|
2
|
+
import { CourierAddress, RegularOrderAddress } from '../shared/address.model';
|
|
3
|
+
import { Admin } from '../admin.model';
|
|
4
|
+
export declare class RegularOrderAddressChangeHistory {
|
|
5
|
+
timestamp?: Date;
|
|
6
|
+
updatedBy?: Ref<Admin>;
|
|
7
|
+
oldAddress: RegularOrderAddress;
|
|
8
|
+
newAddress: RegularOrderAddress;
|
|
9
|
+
oldFee: number;
|
|
10
|
+
secondaryOldFee: number;
|
|
11
|
+
newFee: number;
|
|
12
|
+
secondaryNewFee: number;
|
|
13
|
+
}
|
|
14
|
+
export declare class CourierOrderAddressChangeHistory {
|
|
15
|
+
timestamp?: Date;
|
|
16
|
+
updatedBy?: Ref<Admin>;
|
|
17
|
+
oldPickupAddress: CourierAddress;
|
|
18
|
+
newPickupAddress: CourierAddress;
|
|
19
|
+
oldDeliveryAddress: CourierAddress;
|
|
20
|
+
newDeliveryAddress: CourierAddress;
|
|
21
|
+
oldFee: number;
|
|
22
|
+
secondaryOldFee: number;
|
|
23
|
+
newFee: number;
|
|
24
|
+
secondaryNewFee: number;
|
|
25
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CourierOrderAddressChangeHistory = exports.RegularOrderAddressChangeHistory = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const address_model_1 = require("../shared/address.model");
|
|
15
|
+
const admin_model_1 = require("../admin.model");
|
|
16
|
+
class RegularOrderAddressChangeHistory {
|
|
17
|
+
timestamp;
|
|
18
|
+
updatedBy;
|
|
19
|
+
oldAddress;
|
|
20
|
+
newAddress;
|
|
21
|
+
oldFee;
|
|
22
|
+
secondaryOldFee;
|
|
23
|
+
newFee;
|
|
24
|
+
secondaryNewFee;
|
|
25
|
+
}
|
|
26
|
+
exports.RegularOrderAddressChangeHistory = RegularOrderAddressChangeHistory;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typegoose_1.prop)({ type: Date, default: new Date() }),
|
|
29
|
+
__metadata("design:type", Date)
|
|
30
|
+
], RegularOrderAddressChangeHistory.prototype, "timestamp", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typegoose_1.prop)({ ref: () => admin_model_1.Admin }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], RegularOrderAddressChangeHistory.prototype, "updatedBy", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typegoose_1.prop)({ required: true, type: address_model_1.RegularOrderAddress }),
|
|
37
|
+
__metadata("design:type", address_model_1.RegularOrderAddress)
|
|
38
|
+
], RegularOrderAddressChangeHistory.prototype, "oldAddress", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typegoose_1.prop)({ required: true, type: address_model_1.RegularOrderAddress }),
|
|
41
|
+
__metadata("design:type", address_model_1.RegularOrderAddress)
|
|
42
|
+
], RegularOrderAddressChangeHistory.prototype, "newAddress", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typegoose_1.prop)({ required: true, type: Number }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], RegularOrderAddressChangeHistory.prototype, "oldFee", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typegoose_1.prop)({ required: true, type: Number }),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], RegularOrderAddressChangeHistory.prototype, "secondaryOldFee", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typegoose_1.prop)({ required: true, type: Number }),
|
|
53
|
+
__metadata("design:type", Number)
|
|
54
|
+
], RegularOrderAddressChangeHistory.prototype, "newFee", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typegoose_1.prop)({ required: true, type: Number }),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], RegularOrderAddressChangeHistory.prototype, "secondaryNewFee", void 0);
|
|
59
|
+
class CourierOrderAddressChangeHistory {
|
|
60
|
+
timestamp;
|
|
61
|
+
updatedBy;
|
|
62
|
+
oldPickupAddress;
|
|
63
|
+
newPickupAddress;
|
|
64
|
+
oldDeliveryAddress;
|
|
65
|
+
newDeliveryAddress;
|
|
66
|
+
oldFee;
|
|
67
|
+
secondaryOldFee;
|
|
68
|
+
newFee;
|
|
69
|
+
secondaryNewFee;
|
|
70
|
+
}
|
|
71
|
+
exports.CourierOrderAddressChangeHistory = CourierOrderAddressChangeHistory;
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typegoose_1.prop)({ type: Date, default: new Date() }),
|
|
74
|
+
__metadata("design:type", Date)
|
|
75
|
+
], CourierOrderAddressChangeHistory.prototype, "timestamp", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typegoose_1.prop)({ ref: () => admin_model_1.Admin }),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], CourierOrderAddressChangeHistory.prototype, "updatedBy", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typegoose_1.prop)({ type: address_model_1.CourierAddress }),
|
|
82
|
+
__metadata("design:type", address_model_1.CourierAddress)
|
|
83
|
+
], CourierOrderAddressChangeHistory.prototype, "oldPickupAddress", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typegoose_1.prop)({ type: address_model_1.CourierAddress }),
|
|
86
|
+
__metadata("design:type", address_model_1.CourierAddress)
|
|
87
|
+
], CourierOrderAddressChangeHistory.prototype, "newPickupAddress", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typegoose_1.prop)({ type: address_model_1.CourierAddress }),
|
|
90
|
+
__metadata("design:type", address_model_1.CourierAddress)
|
|
91
|
+
], CourierOrderAddressChangeHistory.prototype, "oldDeliveryAddress", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typegoose_1.prop)({ type: address_model_1.CourierAddress }),
|
|
94
|
+
__metadata("design:type", address_model_1.CourierAddress)
|
|
95
|
+
], CourierOrderAddressChangeHistory.prototype, "newDeliveryAddress", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typegoose_1.prop)({ required: true, type: Number }),
|
|
98
|
+
__metadata("design:type", Number)
|
|
99
|
+
], CourierOrderAddressChangeHistory.prototype, "oldFee", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typegoose_1.prop)({ required: true, type: Number }),
|
|
102
|
+
__metadata("design:type", Number)
|
|
103
|
+
], CourierOrderAddressChangeHistory.prototype, "secondaryOldFee", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, typegoose_1.prop)({ required: true, type: Number }),
|
|
106
|
+
__metadata("design:type", Number)
|
|
107
|
+
], CourierOrderAddressChangeHistory.prototype, "newFee", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, typegoose_1.prop)({ required: true, type: Number }),
|
|
110
|
+
__metadata("design:type", Number)
|
|
111
|
+
], CourierOrderAddressChangeHistory.prototype, "secondaryNewFee", void 0);
|
|
112
|
+
//# sourceMappingURL=address-change-history.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address-change-history.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/address-change-history.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,2DAA8E;AAC9E,gDAAuC;AAEvC,MAAa,gCAAgC;IAErC,SAAS,CAAQ;IAGjB,SAAS,CAAc;IAGvB,UAAU,CAAsB;IAGhC,UAAU,CAAsB;IAGhC,MAAM,CAAS;IAGf,eAAe,CAAS;IAGxB,MAAM,CAAS;IAGf,eAAe,CAAS;CAC/B;AAxBD,4EAwBC;AAtBO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC;8BACvB,IAAI;mEAAC;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;mEACG;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,mCAAmB,EAAE,CAAC;8BACjC,mCAAmB;oEAAC;AAGhC;IADN,IAAA,gBAAI,EAAC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N,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,8BAAc,EAAE,CAAC;8BACJ,8BAAc;4EAAC;AAGnC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gEACjB;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yEACR;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gEACjB;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yEACR","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { CourierAddress, RegularOrderAddress } from '../shared/address.model';\nimport { Admin } from '../admin.model';\n\nexport class RegularOrderAddressChangeHistory {\n\t@prop({ type: Date, default: new Date() })\n\tpublic timestamp?: Date;\n\n\t@prop({ ref: () => Admin })\n\tpublic updatedBy?: Ref<Admin>;\n\n\t@prop({ required: true, type: RegularOrderAddress })\n\tpublic oldAddress: RegularOrderAddress;\n\n\t@prop({ required: true, type: RegularOrderAddress })\n\tpublic newAddress: RegularOrderAddress;\n\n\t@prop({ required: true, type: Number })\n\tpublic oldFee: number;\n\n\t@prop({ required: true, type: Number })\n\tpublic secondaryOldFee: number;\n\n\t@prop({ required: true, type: Number })\n\tpublic newFee: number;\n\n\t@prop({ required: true, type: Number })\n\tpublic secondaryNewFee: number;\n}\n\nexport class CourierOrderAddressChangeHistory {\n\t@prop({ type: Date, default: new Date() })\n\tpublic timestamp?: Date;\n\n\t@prop({ ref: () => Admin })\n\tpublic updatedBy?: Ref<Admin>;\n\n\t@prop({ type: CourierAddress })\n\tpublic oldPickupAddress: CourierAddress;\n\n\t@prop({ type: CourierAddress })\n\tpublic newPickupAddress: CourierAddress;\n\n\t@prop({ type: CourierAddress })\n\tpublic oldDeliveryAddress: CourierAddress;\n\n\t@prop({ type: CourierAddress })\n\tpublic newDeliveryAddress: CourierAddress;\n\n\t@prop({ required: true, type: Number })\n\tpublic oldFee: number;\n\n\t@prop({ required: true, type: Number })\n\tpublic secondaryOldFee: number;\n\n\t@prop({ required: true, type: Number })\n\tpublic newFee: number;\n\n\t@prop({ required: true, type: Number })\n\tpublic secondaryNewFee: number;\n}\n"]}
|
|
@@ -5,6 +5,7 @@ import { CourierAddress } from '../shared/address.model';
|
|
|
5
5
|
import { CourierOrderStatusTimeline } from '../embedded/status-timeline.model';
|
|
6
6
|
import { CourierOrderFinance } from '../embedded/courier-order-finance.model';
|
|
7
7
|
import { User } from '../user.model';
|
|
8
|
+
import { CourierOrderAddressChangeHistory } from '../embedded/address-change-history.model';
|
|
8
9
|
declare class CourierItem {
|
|
9
10
|
productName: string;
|
|
10
11
|
productImage?: string;
|
|
@@ -23,6 +24,7 @@ export declare class CourierOrder extends Order {
|
|
|
23
24
|
courierType: CourierServiceType;
|
|
24
25
|
pickupAddress: CourierAddress;
|
|
25
26
|
deliveryAddress: CourierAddress;
|
|
27
|
+
addressChangeHistory?: CourierOrderAddressChangeHistory[];
|
|
26
28
|
items?: CourierItem[];
|
|
27
29
|
receiptImage?: string;
|
|
28
30
|
receiptPrice?: number;
|
|
@@ -17,6 +17,7 @@ const address_model_1 = require("../shared/address.model");
|
|
|
17
17
|
const status_timeline_model_1 = require("../embedded/status-timeline.model");
|
|
18
18
|
const courier_order_finance_model_1 = require("../embedded/courier-order-finance.model");
|
|
19
19
|
const user_model_1 = require("../user.model");
|
|
20
|
+
const address_change_history_model_1 = require("../embedded/address-change-history.model");
|
|
20
21
|
class CourierItem {
|
|
21
22
|
productName;
|
|
22
23
|
productImage;
|
|
@@ -63,6 +64,7 @@ class CourierOrder extends order_model_1.Order {
|
|
|
63
64
|
courierType;
|
|
64
65
|
pickupAddress;
|
|
65
66
|
deliveryAddress;
|
|
67
|
+
addressChangeHistory;
|
|
66
68
|
items;
|
|
67
69
|
receiptImage;
|
|
68
70
|
receiptPrice;
|
|
@@ -98,6 +100,10 @@ __decorate([
|
|
|
98
100
|
(0, typegoose_1.prop)({ required: true, type: address_model_1.CourierAddress }),
|
|
99
101
|
__metadata("design:type", address_model_1.CourierAddress)
|
|
100
102
|
], CourierOrder.prototype, "deliveryAddress", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, typegoose_1.prop)({ type: [address_change_history_model_1.CourierOrderAddressChangeHistory] }),
|
|
105
|
+
__metadata("design:type", Array)
|
|
106
|
+
], CourierOrder.prototype, "addressChangeHistory", void 0);
|
|
101
107
|
__decorate([
|
|
102
108
|
(0, typegoose_1.prop)({ type: () => [CourierItem], default: [] }),
|
|
103
109
|
__metadata("design:type", Array)
|
|
@@ -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;
|
|
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;AACrC,2FAA4F;AAE5F,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;;i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C;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,8BAAc,EAAE,CAAC;8BAC9B,8BAAc;mDAAC;AAG/B;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,8BAAc,EAAE,CAAC;8BACtB,8BAAc;qDAAC;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,CAAC,+DAAgC,CAAC,EAAE,CAAC;;0DACc;AAG1D;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;2CACpB;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDACM;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDACM;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,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';\nimport { CourierOrderAddressChangeHistory } from '../embedded/address-change-history.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: [CourierOrderAddressChangeHistory] })\n\tpublic addressChangeHistory?: CourierOrderAddressChangeHistory[];\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"]}
|
|
@@ -15,6 +15,7 @@ import { User } from '../user.model';
|
|
|
15
15
|
import { Rider } from '../rider.model';
|
|
16
16
|
import { CartParticipant } from '../cart-participant.model';
|
|
17
17
|
import { AdjustmentHistory, AdjustmentInformation } from '../embedded/adjustment-information.model';
|
|
18
|
+
import { RegularOrderAddressChangeHistory } from '../embedded/address-change-history.model';
|
|
18
19
|
export declare class RegularOrder extends Order {
|
|
19
20
|
orderType: OrderType.REGULAR;
|
|
20
21
|
user: Ref<User>;
|
|
@@ -24,6 +25,7 @@ export declare class RegularOrder extends Order {
|
|
|
24
25
|
itemType?: string;
|
|
25
26
|
pickupAddress: Address;
|
|
26
27
|
deliveryAddress: RegularOrderAddress;
|
|
28
|
+
addressChangeHistory?: RegularOrderAddressChangeHistory[];
|
|
27
29
|
parent: Ref<Parent>;
|
|
28
30
|
shop: Ref<Shop>;
|
|
29
31
|
cart: Ref<Cart>;
|
|
@@ -27,6 +27,7 @@ const user_model_1 = require("../user.model");
|
|
|
27
27
|
const rider_model_1 = require("../rider.model");
|
|
28
28
|
const cart_participant_model_1 = require("../cart-participant.model");
|
|
29
29
|
const adjustment_information_model_1 = require("../embedded/adjustment-information.model");
|
|
30
|
+
const address_change_history_model_1 = require("../embedded/address-change-history.model");
|
|
30
31
|
class RegularOrder extends order_model_1.Order {
|
|
31
32
|
orderType = enum_1.OrderType.REGULAR;
|
|
32
33
|
user;
|
|
@@ -36,6 +37,7 @@ class RegularOrder extends order_model_1.Order {
|
|
|
36
37
|
itemType;
|
|
37
38
|
pickupAddress;
|
|
38
39
|
deliveryAddress;
|
|
40
|
+
addressChangeHistory;
|
|
39
41
|
parent;
|
|
40
42
|
shop;
|
|
41
43
|
cart;
|
|
@@ -87,6 +89,10 @@ __decorate([
|
|
|
87
89
|
(0, typegoose_1.prop)({ required: true, type: address_model_1.RegularOrderAddress }),
|
|
88
90
|
__metadata("design:type", address_model_1.RegularOrderAddress)
|
|
89
91
|
], RegularOrder.prototype, "deliveryAddress", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typegoose_1.prop)({ type: [address_change_history_model_1.RegularOrderAddressChangeHistory] }),
|
|
94
|
+
__metadata("design:type", Array)
|
|
95
|
+
], RegularOrder.prototype, "addressChangeHistory", void 0);
|
|
90
96
|
__decorate([
|
|
91
97
|
(0, typegoose_1.prop)({ required: true, ref: () => parent_model_1.Parent }),
|
|
92
98
|
__metadata("design:type", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regular-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/regular-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,gDAAuC;AACvC,qDAAuG;AACvG,kDAAyC;AACzC,8CAAqC;AACrC,8CAAqC;AACrC,2DAAuE;AACvE,6EAA+E;AAC/E,uEAA6D;AAC7D,yFAA8E;AAC9E,uEAA6D;AAC7D,iFAAuE;AACvE,wDAA8C;AAC9C,8CAAqC;AACrC,gDAAuC;AACvC,sEAA4D;AAC5D,2FAAoG;
|
|
1
|
+
{"version":3,"file":"regular-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/regular-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,gDAAuC;AACvC,qDAAuG;AACvG,kDAAyC;AACzC,8CAAqC;AACrC,8CAAqC;AACrC,2DAAuE;AACvE,6EAA+E;AAC/E,uEAA6D;AAC7D,yFAA8E;AAC9E,uEAA6D;AAC7D,iFAAuE;AACvE,wDAA8C;AAC9C,8CAAqC;AACrC,gDAAuC;AACvC,sEAA4D;AAC5D,2FAAoG;AACpG,2FAA4F;AAE5F,MAAa,YAAa,SAAQ,mBAAK;IAC/B,SAAS,GAAG,gBAAS,CAAC,OAAgB,CAAC;IAGvC,IAAI,CAAY;IAGhB,aAAa,CAAgB;IAG7B,MAAM,CAAqB;IAG3B,cAAc,CAA+B;IAG7C,QAAQ,CAAU;IAGlB,aAAa,CAAU;IAGvB,eAAe,CAAsB;IAGrC,oBAAoB,CAAsC;IAG1D,MAAM,CAAe;IAGrB,IAAI,CAAa;IAGjB,IAAI,CAAa;IAGjB,cAAc,CAAW;IAGzB,sBAAsB,CAAU;IAGhC,kBAAkB,CAAW;IAG7B,2BAA2B,CAAoB;IAG/C,gBAAgB,CAAc;IAG9B,UAAU,CAAW;IAGrB,iBAAiB,CAAe;IAGhC,oBAAoB,CAAW;IAG/B,sBAAsB,CAAe;IAGrC,UAAU,CAAW;IAGrB,gBAAgB,CAAmB;IAGnC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AE,KAAK,EAAE,CAAC;;gDACZ;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAgB,EAAE,OAAO,EAAE,uBAAgB,CAAC,IAAI,EAAE,CAAC;;sDACrC;AAGnC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,oDAAqB,EAAE,CAAC;8BACb,oDAAqB;2DAAC;AAG9C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,gDAAiB,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;uDACR;AAGxC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,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;AAGtC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;kDACV;AAOvB;IALN,IAAA,gBAAI,EAAC;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ;QACnB,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,MAAM;KAClB,CAAC;;+CACgC;AAO3B;IALN,IAAA,gBAAI,EAAC;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,wCAAe;QAC1B,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,MAAM;KAClB,CAAC;;sDAC8C","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { Order } from '../order.model';\nimport { AdjustmentStatus, ItemType, OrderType, RegularOrderStatus } from '../../../../utilities/enum';\nimport { Parent } from '../parent.model';\nimport { Shop } from '../shop.model';\nimport { Cart } from '../cart.model';\nimport { Address, RegularOrderAddress } from '../shared/address.model';\nimport { RegularOrderStatusTimeline } from '../embedded/status-timeline.model';\nimport { OrderRefund } from '../embedded/order-refund.model';\nimport { RegularOrderFinance } from '../embedded/regular-order-finance.model';\nimport { EndorseLoss } from '../embedded/order-cancel.model';\nimport { ReplacementOrder } from '../embedded/replacement-order.model';\nimport { LineItem } from '../line-item.model';\nimport { User } from '../user.model';\nimport { Rider } from '../rider.model';\nimport { CartParticipant } from '../cart-participant.model';\nimport { AdjustmentHistory, AdjustmentInformation } from '../embedded/adjustment-information.model';\nimport { RegularOrderAddressChangeHistory } from '../embedded/address-change-history.model';\n\nexport class RegularOrder extends Order {\n\tpublic orderType = OrderType.REGULAR as const;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user: Ref<User>;\n\n\t@prop({ ref: () => Rider })\n\tpublic supportRiders?: Ref<Rider>[];\n\n\t@prop({ type: String, enum: RegularOrderStatus, default: RegularOrderStatus.PLACED })\n\tpublic status: RegularOrderStatus;\n\n\t@prop({ type: () => [RegularOrderStatusTimeline], default: [] })\n\tpublic statusTimeline: RegularOrderStatusTimeline[];\n\n\t@prop({ type: String, enum: ItemType, default: ItemType.FOOD })\n\tpublic itemType?: string;\n\n\t@prop({ required: true, type: Address })\n\tpublic pickupAddress: Address;\n\n\t@prop({ required: true, type: RegularOrderAddress })\n\tpublic deliveryAddress: RegularOrderAddress;\n\n\t@prop({ type: [RegularOrderAddressChangeHistory] })\n\tpublic addressChangeHistory?: RegularOrderAddressChangeHistory[];\n\n\t@prop({ required: true, ref: () => Parent })\n\tpublic parent!: Ref<Parent>;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, ref: () => Cart, unique: true })\n\tpublic cart!: Ref<Cart>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isShopDelivery?: boolean;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic preparingTimeInMinutes?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReplacementOrder?: boolean;\n\n\t@prop({ type: () => ReplacementOrder })\n\tpublic replacementOrderInformation?: ReplacementOrder;\n\n\t@prop({ ref: () => Order })\n\tpublic replacementOrder?: Ref<Order>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRefunded?: boolean;\n\n\t@prop({ type: OrderRefund })\n\tpublic refundInformation?: OrderRefund;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isEndorseLossApplied?: boolean;\n\n\t@prop({ type: () => EndorseLoss })\n\tpublic endorseLossInformation?: EndorseLoss;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAdjusted?: boolean;\n\n\t@prop({ type: String, enum: AdjustmentStatus, default: AdjustmentStatus.NONE })\n\tpublic adjustmentStatus: AdjustmentStatus;\n\n\t@prop({ type: () => AdjustmentInformation })\n\tpublic adjustmentInformation?: AdjustmentInformation;\n\n\t@prop({ type: () => [AdjustmentHistory], default: [] })\n\tpublic adjustmentHistory?: AdjustmentHistory[];\n\n\t@prop({ required: true, type: RegularOrderFinance })\n\tpublic finance: RegularOrderFinance;\n\n\t@prop({ type: RegularOrderFinance })\n\tpublic adjustedFinance?: RegularOrderFinance;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isGroupOrder?: boolean;\n\n\t@prop({\n\t\tref: () => LineItem,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t})\n\tpublic lineItems: Ref<LineItem>[];\n\n\t@prop({\n\t\tref: () => CartParticipant,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t})\n\tpublic cartParticipants: Ref<CartParticipant>[];\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED