@lyxa.ai/core 1.0.66 → 1.0.67-debug.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.
Files changed (53) hide show
  1. package/dist/libraries/mongo/models/app-screen-setting.model.d.ts +9 -0
  2. package/dist/libraries/mongo/models/app-screen-setting.model.js +72 -0
  3. package/dist/libraries/mongo/models/app-screen-setting.model.js.map +1 -0
  4. package/dist/libraries/mongo/models/embedded/cash-settlement.model.d.ts +8 -0
  5. package/dist/libraries/mongo/models/embedded/cash-settlement.model.js +47 -0
  6. package/dist/libraries/mongo/models/embedded/cash-settlement.model.js.map +1 -0
  7. package/dist/libraries/mongo/models/embedded/courier-order-finance.model.d.ts +5 -0
  8. package/dist/libraries/mongo/models/embedded/courier-order-finance.model.js +24 -0
  9. package/dist/libraries/mongo/models/embedded/courier-order-finance.model.js.map +1 -0
  10. package/dist/libraries/mongo/models/embedded/order-finance.model.d.ts +13 -0
  11. package/dist/libraries/mongo/models/embedded/order-finance.model.js +52 -0
  12. package/dist/libraries/mongo/models/embedded/order-finance.model.js.map +1 -0
  13. package/dist/libraries/mongo/models/embedded/regular-order-finance.model.d.ts +16 -0
  14. package/dist/libraries/mongo/models/embedded/regular-order-finance.model.js +71 -0
  15. package/dist/libraries/mongo/models/embedded/regular-order-finance.model.js.map +1 -0
  16. package/dist/libraries/mongo/models/embedded/rider-assignment-model.d.ts +8 -0
  17. package/dist/libraries/mongo/models/embedded/rider-assignment-model.js +44 -0
  18. package/dist/libraries/mongo/models/embedded/rider-assignment-model.js.map +1 -0
  19. package/dist/libraries/mongo/models/embedded/trip-leg.mode.d.ts +25 -0
  20. package/dist/libraries/mongo/models/embedded/trip-leg.mode.js +121 -0
  21. package/dist/libraries/mongo/models/embedded/trip-leg.mode.js.map +1 -0
  22. package/dist/libraries/mongo/models/index.d.ts +2 -9
  23. package/dist/libraries/mongo/models/index.js +3 -10
  24. package/dist/libraries/mongo/models/index.js.map +1 -1
  25. package/dist/libraries/mongo/models/order-delivery.model.d.ts +5 -30
  26. package/dist/libraries/mongo/models/order-delivery.model.js +15 -136
  27. package/dist/libraries/mongo/models/order-delivery.model.js.map +1 -1
  28. package/dist/libraries/mongo/models/order-finance.model.d.ts +2 -0
  29. package/dist/libraries/mongo/models/order-finance.model.js +6 -0
  30. package/dist/libraries/mongo/models/order-finance.model.js.map +1 -1
  31. package/dist/libraries/mongo/models/order-payment.model.d.ts +17 -0
  32. package/dist/libraries/mongo/models/order-payment.model.js +84 -0
  33. package/dist/libraries/mongo/models/order-payment.model.js.map +1 -0
  34. package/dist/libraries/mongo/models/order.model.d.ts +2 -0
  35. package/dist/libraries/mongo/models/order.model.js +6 -1
  36. package/dist/libraries/mongo/models/order.model.js.map +1 -1
  37. package/dist/libraries/mongo/models/providers/courier-order.model.d.ts +2 -0
  38. package/dist/libraries/mongo/models/providers/courier-order.model.js +6 -0
  39. package/dist/libraries/mongo/models/providers/courier-order.model.js.map +1 -1
  40. package/dist/libraries/mongo/models/providers/regular-order.model.d.ts +2 -0
  41. package/dist/libraries/mongo/models/providers/regular-order.model.js +6 -0
  42. package/dist/libraries/mongo/models/providers/regular-order.model.js.map +1 -1
  43. package/dist/libraries/mongo/models/rider.model.js +1 -1
  44. package/dist/libraries/mongo/models/rider.model.js.map +1 -1
  45. package/dist/libraries/mongo/models/shop.model.js.map +1 -1
  46. package/dist/libraries/mongo/models/zone.model.d.ts +2 -0
  47. package/dist/libraries/mongo/models/zone.model.js +10 -0
  48. package/dist/libraries/mongo/models/zone.model.js.map +1 -1
  49. package/dist/utilities/validation/common-validation.d.ts +146 -146
  50. package/dist/utilities/validation/global-validation.d.ts +2 -6
  51. package/dist/utilities/validation/global-validation.js +1 -19
  52. package/dist/utilities/validation/global-validation.js.map +1 -1
  53. package/package.json +1 -1
@@ -0,0 +1,9 @@
1
+ import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
2
+ import { ItemType, SectionType, Status } from '../../../utilities/enum';
3
+ export declare class AppScreenSetting extends TimeStamps {
4
+ itemType: ItemType;
5
+ section: SectionType;
6
+ alias: string;
7
+ status?: Status;
8
+ sortingOrder?: number;
9
+ }
@@ -0,0 +1,72 @@
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.AppScreenSetting = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
15
+ const enum_1 = require("../../../utilities/enum");
16
+ const _1 = require(".");
17
+ let AppScreenSetting = class AppScreenSetting extends defaultClasses_1.TimeStamps {
18
+ itemType;
19
+ section;
20
+ alias;
21
+ status;
22
+ sortingOrder;
23
+ };
24
+ exports.AppScreenSetting = AppScreenSetting;
25
+ __decorate([
26
+ (0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ItemType }),
27
+ __metadata("design:type", String)
28
+ ], AppScreenSetting.prototype, "itemType", void 0);
29
+ __decorate([
30
+ (0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.SectionType }),
31
+ __metadata("design:type", String)
32
+ ], AppScreenSetting.prototype, "section", void 0);
33
+ __decorate([
34
+ (0, typegoose_1.prop)({ required: true, type: String }),
35
+ __metadata("design:type", String)
36
+ ], AppScreenSetting.prototype, "alias", void 0);
37
+ __decorate([
38
+ (0, typegoose_1.prop)({ type: String, enum: enum_1.Status, default: enum_1.Status.ACTIVE }),
39
+ __metadata("design:type", String)
40
+ ], AppScreenSetting.prototype, "status", void 0);
41
+ __decorate([
42
+ (0, typegoose_1.prop)({ type: Number }),
43
+ __metadata("design:type", Number)
44
+ ], AppScreenSetting.prototype, "sortingOrder", void 0);
45
+ exports.AppScreenSetting = AppScreenSetting = __decorate([
46
+ (0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'appScreenSettings' } }),
47
+ (0, typegoose_1.pre)('save', async function (next) {
48
+ if (this.isNew || typeof this.sortingOrder === 'undefined') {
49
+ try {
50
+ const maxSortingOrder = await _1.AppScreenSettingModel.aggregate([
51
+ {
52
+ $match: {
53
+ deletedAt: null,
54
+ },
55
+ },
56
+ {
57
+ $group: {
58
+ _id: null,
59
+ maxSortingOrder: { $max: '$sortingOrder' },
60
+ },
61
+ },
62
+ ]).exec();
63
+ this.sortingOrder = (maxSortingOrder[0]?.maxSortingOrder ?? -1) + 1;
64
+ }
65
+ catch (error) {
66
+ return next(error);
67
+ }
68
+ }
69
+ next();
70
+ })
71
+ ], AppScreenSetting);
72
+ //# sourceMappingURL=app-screen-setting.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-screen-setting.model.js","sourceRoot":"/","sources":["libraries/mongo/models/app-screen-setting.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,4EAAqE;AACrE,kDAAwE;AACxE,wBAA0C;AA8BnC,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,2BAAU;IAExC,QAAQ,CAAY;IAGpB,OAAO,CAAe;IAGtB,KAAK,CAAU;IAGf,MAAM,CAAU;IAGhB,YAAY,CAAU;CAC7B,CAAA;AAfY,4CAAgB;AAErB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAQ,EAAE,CAAC;;kDAC5B;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAW,EAAE,CAAC;;iDAC7B;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CACjB;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAM,EAAE,OAAO,EAAE,aAAM,CAAC,MAAM,EAAE,CAAC;;gDACtC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDACM;2BAdjB,gBAAgB;IA5B5B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,EAAE,CAAC;IACpE,IAAA,eAAG,EAAmB,MAAM,EAAE,KAAK,WAAW,IAAI;QAElD,IAAI,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,YAAY,KAAK,WAAW,EAAE,CAAC;YAC5D,IAAI,CAAC;gBAEJ,MAAM,eAAe,GAAG,MAAM,wBAAqB,CAAC,SAAS,CAA8B;oBAC1F;wBACC,MAAM,EAAE;4BACP,SAAS,EAAE,IAAI;yBACf;qBACD;oBACD;wBACC,MAAM,EAAE;4BACP,GAAG,EAAE,IAAI;4BACT,eAAe,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE;yBAC1C;qBACD;iBACD,CAAC,CAAC,IAAI,EAAE,CAAC;gBAGV,IAAI,CAAC,YAAY,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,eAAe,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YACrE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,OAAO,IAAI,CAAC,KAAc,CAAC,CAAC;YAC7B,CAAC;QACF,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,gBAAgB,CAe5B","sourcesContent":["import { modelOptions, pre, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ItemType, SectionType, Status } from '../../../utilities/enum';\nimport { AppScreenSettingModel } from '.';\n\n@modelOptions({ schemaOptions: { collection: 'appScreenSettings' } })\n@pre<AppScreenSetting>('save', async function (next) {\n\t// Only set sortingOrder if it's a new document or sortingOrder is not set\n\tif (this.isNew || typeof this.sortingOrder === 'undefined') {\n\t\ttry {\n\t\t\t// Find the maximum sortingOrder that aren't deleted\n\t\t\tconst maxSortingOrder = await AppScreenSettingModel.aggregate<{ maxSortingOrder: number }>([\n\t\t\t\t{\n\t\t\t\t\t$match: {\n\t\t\t\t\t\tdeletedAt: null,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t$group: {\n\t\t\t\t\t\t_id: null,\n\t\t\t\t\t\tmaxSortingOrder: { $max: '$sortingOrder' },\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t]).exec();\n\n\t\t\t// Set the new sortingOrder to max + 1 (or 0 if no items found)\n\t\t\tthis.sortingOrder = (maxSortingOrder[0]?.maxSortingOrder ?? -1) + 1;\n\t\t} catch (error) {\n\t\t\treturn next(error as Error);\n\t\t}\n\t}\n\tnext();\n})\nexport class AppScreenSetting extends TimeStamps {\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ required: true, type: String, enum: SectionType })\n\tpublic section!: SectionType;\n\n\t@prop({ required: true, type: String })\n\tpublic alias!: string;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n}\n"]}
@@ -0,0 +1,8 @@
1
+ export declare class CashSettlement {
2
+ settlementAmount?: number;
3
+ secondarySettlementAmount?: number;
4
+ receivedAmount?: number;
5
+ secondaryReceivedAmount?: number;
6
+ returnedAmount?: number;
7
+ secondaryReturnedAmount?: number;
8
+ }
@@ -0,0 +1,47 @@
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.CashSettlement = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ class CashSettlement {
15
+ settlementAmount;
16
+ secondarySettlementAmount;
17
+ receivedAmount;
18
+ secondaryReceivedAmount;
19
+ returnedAmount;
20
+ secondaryReturnedAmount;
21
+ }
22
+ exports.CashSettlement = CashSettlement;
23
+ __decorate([
24
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
25
+ __metadata("design:type", Number)
26
+ ], CashSettlement.prototype, "settlementAmount", void 0);
27
+ __decorate([
28
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
29
+ __metadata("design:type", Number)
30
+ ], CashSettlement.prototype, "secondarySettlementAmount", void 0);
31
+ __decorate([
32
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
33
+ __metadata("design:type", Number)
34
+ ], CashSettlement.prototype, "receivedAmount", void 0);
35
+ __decorate([
36
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
37
+ __metadata("design:type", Number)
38
+ ], CashSettlement.prototype, "secondaryReceivedAmount", void 0);
39
+ __decorate([
40
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
41
+ __metadata("design:type", Number)
42
+ ], CashSettlement.prototype, "returnedAmount", void 0);
43
+ __decorate([
44
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
45
+ __metadata("design:type", Number)
46
+ ], CashSettlement.prototype, "secondaryReturnedAmount", void 0);
47
+ //# sourceMappingURL=cash-settlement.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cash-settlement.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/cash-settlement.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,cAAc;IAE1B,gBAAgB,CAAU;IAG1B,yBAAyB,CAAU;IAGnC,cAAc,CAAU;IAGxB,uBAAuB,CAAU;IAGjC,cAAc,CAAU;IAGxB,uBAAuB,CAAU;CACjC;AAlBD,wCAkBC;AAhBA;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;wDACT;AAG1B;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;iEACA;AAGnC;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;sDACX;AAGxB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+DACF;AAGjC;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;sDACX;AAGxB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+DACF","sourcesContent":["import { prop } from '@typegoose/typegoose';\n\nexport class CashSettlement {\n\t@prop({ type: Number, default: 0 })\n\tsettlementAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondarySettlementAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\treceivedAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryReceivedAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\treturnedAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tsecondaryReturnedAmount?: number;\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { OrderFinance } from './order-finance.model';
2
+ import { CourierOrderProfit } from '../embedded/profit.model';
3
+ export declare class CourierOrderFinance extends OrderFinance {
4
+ companyProfit?: CourierOrderProfit;
5
+ }
@@ -0,0 +1,24 @@
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.CourierOrderFinance = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ const order_finance_model_1 = require("./order-finance.model");
15
+ const profit_model_1 = require("../embedded/profit.model");
16
+ class CourierOrderFinance extends order_finance_model_1.OrderFinance {
17
+ companyProfit;
18
+ }
19
+ exports.CourierOrderFinance = CourierOrderFinance;
20
+ __decorate([
21
+ (0, typegoose_1.prop)({ type: () => profit_model_1.CourierOrderProfit }),
22
+ __metadata("design:type", profit_model_1.CourierOrderProfit)
23
+ ], CourierOrderFinance.prototype, "companyProfit", void 0);
24
+ //# sourceMappingURL=courier-order-finance.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"courier-order-finance.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/courier-order-finance.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,+DAAqD;AACrD,2DAA8D;AAE9D,MAAa,mBAAoB,SAAQ,kCAAY;IAE7C,aAAa,CAAsB;CAC1C;AAHD,kDAGC;AADO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,iCAAkB,EAAE,CAAC;8BAClB,iCAAkB;0DAAC","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { OrderFinance } from './order-finance.model';\nimport { CourierOrderProfit } from '../embedded/profit.model';\n\nexport class CourierOrderFinance extends OrderFinance {\n\t@prop({ type: () => CourierOrderProfit })\n\tpublic companyProfit?: CourierOrderProfit;\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
2
+ import { OrderPricing } from './order-pricing.model';
3
+ import { PaymentInformation } from './payment-infromation.model';
4
+ import { PaymentMethod } from '../../../../utilities/enum';
5
+ import { RiderProfit } from './profit.model';
6
+ export declare class OrderFinance extends TimeStamps {
7
+ exchangeRate?: number;
8
+ paymentMethod?: PaymentMethod;
9
+ paymentInformation?: PaymentInformation;
10
+ pricing?: OrderPricing;
11
+ riderProfit?: RiderProfit;
12
+ processedAt?: Date;
13
+ }
@@ -0,0 +1,52 @@
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.OrderFinance = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
15
+ const order_pricing_model_1 = require("./order-pricing.model");
16
+ const payment_infromation_model_1 = require("./payment-infromation.model");
17
+ const enum_1 = require("../../../../utilities/enum");
18
+ const profit_model_1 = require("./profit.model");
19
+ class OrderFinance extends defaultClasses_1.TimeStamps {
20
+ exchangeRate;
21
+ paymentMethod;
22
+ paymentInformation;
23
+ pricing;
24
+ riderProfit;
25
+ processedAt;
26
+ }
27
+ exports.OrderFinance = OrderFinance;
28
+ __decorate([
29
+ (0, typegoose_1.prop)({ type: Number, default: 1 }),
30
+ __metadata("design:type", Number)
31
+ ], OrderFinance.prototype, "exchangeRate", void 0);
32
+ __decorate([
33
+ (0, typegoose_1.prop)({ type: String, enum: enum_1.PaymentMethod, default: enum_1.PaymentMethod.CASH }),
34
+ __metadata("design:type", String)
35
+ ], OrderFinance.prototype, "paymentMethod", void 0);
36
+ __decorate([
37
+ (0, typegoose_1.prop)({ type: () => payment_infromation_model_1.PaymentInformation }),
38
+ __metadata("design:type", payment_infromation_model_1.PaymentInformation)
39
+ ], OrderFinance.prototype, "paymentInformation", void 0);
40
+ __decorate([
41
+ (0, typegoose_1.prop)({ type: () => order_pricing_model_1.OrderPricing }),
42
+ __metadata("design:type", order_pricing_model_1.OrderPricing)
43
+ ], OrderFinance.prototype, "pricing", void 0);
44
+ __decorate([
45
+ (0, typegoose_1.prop)({ type: () => profit_model_1.RiderProfit }),
46
+ __metadata("design:type", profit_model_1.RiderProfit)
47
+ ], OrderFinance.prototype, "riderProfit", void 0);
48
+ __decorate([
49
+ (0, typegoose_1.prop)({ type: Date }),
50
+ __metadata("design:type", Date)
51
+ ], OrderFinance.prototype, "processedAt", void 0);
52
+ //# sourceMappingURL=order-finance.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order-finance.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/order-finance.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,4EAAqE;AACrE,+DAAqD;AACrD,2EAAiE;AACjE,qDAA2D;AAC3D,iDAA6C;AAE7C,MAAa,YAAa,SAAQ,2BAAU;IAEpC,YAAY,CAAU;IAGtB,aAAa,CAAiB;IAGrC,kBAAkB,CAAsB;IAGjC,OAAO,CAAgB;IAGvB,WAAW,CAAe;IAG1B,WAAW,CAAQ;CAC1B;AAlBD,oCAkBC;AAhBO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;kDACN;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAa,EAAE,OAAO,EAAE,oBAAa,CAAC,IAAI,EAAE,CAAC;;mDACpC;AAGrC;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,8CAAkB,EAAE,CAAC;8BACpB,8CAAkB;wDAAC;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;8BAClB,kCAAY;6CAAC;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,0BAAW,EAAE,CAAC;8BACb,0BAAW;iDAAC;AAG1B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACA,IAAI;iDAAC","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { OrderPricing } from './order-pricing.model';\nimport { PaymentInformation } from './payment-infromation.model';\nimport { PaymentMethod } from '../../../../utilities/enum';\nimport { RiderProfit } from './profit.model';\n\nexport class OrderFinance extends TimeStamps {\n\t@prop({ type: Number, default: 1 })\n\tpublic exchangeRate?: number;\n\n\t@prop({ type: String, enum: PaymentMethod, default: PaymentMethod.CASH })\n\tpublic paymentMethod?: PaymentMethod;\n\n\t@prop({ type: () => PaymentInformation })\n\tpaymentInformation?: PaymentInformation;\n\n\t@prop({ type: () => OrderPricing })\n\tpublic pricing?: OrderPricing;\n\n\t@prop({ type: () => RiderProfit })\n\tpublic riderProfit?: RiderProfit;\n\n\t@prop({ type: Date })\n\tpublic processedAt?: Date;\n}\n"]}
@@ -0,0 +1,16 @@
1
+ import { OrderFinance } from './order-finance.model';
2
+ import { RegularOrderProfit } from '../embedded/profit.model';
3
+ import { Vat } from '../embedded/vat.model';
4
+ import { CouponDetails, LoyaltyPoint, MarketingCut } from '../embedded/marketing-cut.model';
5
+ export declare class RegularOrderFinance extends OrderFinance {
6
+ companyProfit?: RegularOrderProfit;
7
+ shopProfit?: RegularOrderProfit;
8
+ vat?: Vat;
9
+ discount?: MarketingCut;
10
+ buy1get1?: MarketingCut;
11
+ loyaltyPoint?: LoyaltyPoint;
12
+ coupon?: CouponDetails;
13
+ freeDelivery?: MarketingCut;
14
+ replacementOrder?: MarketingCut;
15
+ endorseLoss?: MarketingCut;
16
+ }
@@ -0,0 +1,71 @@
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.RegularOrderFinance = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ const order_finance_model_1 = require("./order-finance.model");
15
+ const profit_model_1 = require("../embedded/profit.model");
16
+ const vat_model_1 = require("../embedded/vat.model");
17
+ const marketing_cut_model_1 = require("../embedded/marketing-cut.model");
18
+ class RegularOrderFinance extends order_finance_model_1.OrderFinance {
19
+ companyProfit;
20
+ shopProfit;
21
+ vat;
22
+ discount;
23
+ buy1get1;
24
+ loyaltyPoint;
25
+ coupon;
26
+ freeDelivery;
27
+ replacementOrder;
28
+ endorseLoss;
29
+ }
30
+ exports.RegularOrderFinance = RegularOrderFinance;
31
+ __decorate([
32
+ (0, typegoose_1.prop)({ type: () => profit_model_1.RegularOrderProfit }),
33
+ __metadata("design:type", profit_model_1.RegularOrderProfit)
34
+ ], RegularOrderFinance.prototype, "companyProfit", void 0);
35
+ __decorate([
36
+ (0, typegoose_1.prop)({ type: () => profit_model_1.RegularOrderProfit }),
37
+ __metadata("design:type", profit_model_1.RegularOrderProfit)
38
+ ], RegularOrderFinance.prototype, "shopProfit", void 0);
39
+ __decorate([
40
+ (0, typegoose_1.prop)({ type: () => vat_model_1.Vat }),
41
+ __metadata("design:type", vat_model_1.Vat)
42
+ ], RegularOrderFinance.prototype, "vat", void 0);
43
+ __decorate([
44
+ (0, typegoose_1.prop)({ type: () => marketing_cut_model_1.MarketingCut }),
45
+ __metadata("design:type", marketing_cut_model_1.MarketingCut)
46
+ ], RegularOrderFinance.prototype, "discount", void 0);
47
+ __decorate([
48
+ (0, typegoose_1.prop)({ type: () => marketing_cut_model_1.MarketingCut }),
49
+ __metadata("design:type", marketing_cut_model_1.MarketingCut)
50
+ ], RegularOrderFinance.prototype, "buy1get1", void 0);
51
+ __decorate([
52
+ (0, typegoose_1.prop)({ type: () => marketing_cut_model_1.LoyaltyPoint }),
53
+ __metadata("design:type", marketing_cut_model_1.LoyaltyPoint)
54
+ ], RegularOrderFinance.prototype, "loyaltyPoint", void 0);
55
+ __decorate([
56
+ (0, typegoose_1.prop)({ type: () => marketing_cut_model_1.CouponDetails }),
57
+ __metadata("design:type", marketing_cut_model_1.CouponDetails)
58
+ ], RegularOrderFinance.prototype, "coupon", void 0);
59
+ __decorate([
60
+ (0, typegoose_1.prop)({ type: () => marketing_cut_model_1.MarketingCut }),
61
+ __metadata("design:type", marketing_cut_model_1.MarketingCut)
62
+ ], RegularOrderFinance.prototype, "freeDelivery", void 0);
63
+ __decorate([
64
+ (0, typegoose_1.prop)({ type: () => marketing_cut_model_1.MarketingCut }),
65
+ __metadata("design:type", marketing_cut_model_1.MarketingCut)
66
+ ], RegularOrderFinance.prototype, "replacementOrder", void 0);
67
+ __decorate([
68
+ (0, typegoose_1.prop)({ type: () => marketing_cut_model_1.MarketingCut }),
69
+ __metadata("design:type", marketing_cut_model_1.MarketingCut)
70
+ ], RegularOrderFinance.prototype, "endorseLoss", void 0);
71
+ //# sourceMappingURL=regular-order-finance.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regular-order-finance.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/regular-order-finance.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,+DAAqD;AACrD,2DAA8D;AAC9D,qDAA4C;AAC5C,yEAA4F;AAE5F,MAAa,mBAAoB,SAAQ,kCAAY;IAE7C,aAAa,CAAsB;IAGnC,UAAU,CAAsB;IAGhC,GAAG,CAAO;IAGV,QAAQ,CAAgB;IAGxB,QAAQ,CAAgB;IAGxB,YAAY,CAAgB;IAG5B,MAAM,CAAiB;IAGvB,YAAY,CAAgB;IAG5B,gBAAgB,CAAgB;IAGhC,WAAW,CAAgB;CAClC;AA9BD,kDA8BC;AA5BO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,iCAAkB,EAAE,CAAC;8BAClB,iCAAkB;0DAAC;AAGnC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,iCAAkB,EAAE,CAAC;8BACrB,iCAAkB;uDAAC;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,eAAG,EAAE,CAAC;8BACb,eAAG;gDAAC;AAGV;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;8BACjB,kCAAY;qDAAC;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;8BACjB,kCAAY;qDAAC;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;8BACb,kCAAY;yDAAC;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,mCAAa,EAAE,CAAC;8BACpB,mCAAa;mDAAC;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;8BACb,kCAAY;yDAAC;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;8BACT,kCAAY;6DAAC;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;8BACd,kCAAY;wDAAC","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { OrderFinance } from './order-finance.model';\nimport { RegularOrderProfit } from '../embedded/profit.model';\nimport { Vat } from '../embedded/vat.model';\nimport { CouponDetails, LoyaltyPoint, MarketingCut } from '../embedded/marketing-cut.model';\n\nexport class RegularOrderFinance extends OrderFinance {\n\t@prop({ type: () => RegularOrderProfit })\n\tpublic companyProfit?: RegularOrderProfit;\n\n\t@prop({ type: () => RegularOrderProfit })\n\tpublic shopProfit?: RegularOrderProfit;\n\n\t@prop({ type: () => Vat })\n\tpublic vat?: Vat;\n\n\t@prop({ type: () => MarketingCut })\n\tpublic discount?: MarketingCut;\n\n\t@prop({ type: () => MarketingCut })\n\tpublic buy1get1?: MarketingCut;\n\n\t@prop({ type: () => LoyaltyPoint })\n\tpublic loyaltyPoint?: LoyaltyPoint;\n\n\t@prop({ type: () => CouponDetails })\n\tpublic coupon?: CouponDetails;\n\n\t@prop({ type: () => MarketingCut })\n\tpublic freeDelivery?: MarketingCut;\n\n\t@prop({ type: () => MarketingCut })\n\tpublic replacementOrder?: MarketingCut;\n\n\t@prop({ type: () => MarketingCut })\n\tpublic endorseLoss?: MarketingCut;\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import { mongoose } from '@typegoose/typegoose';
2
+ import { RiderAssignmentStatus } from '../../../../utilities/enum';
3
+ export declare class RiderAssignment {
4
+ rider: mongoose.Types.ObjectId;
5
+ status: RiderAssignmentStatus;
6
+ timestamp: Date;
7
+ reason?: string;
8
+ }
@@ -0,0 +1,44 @@
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.RiderAssignment = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ const rider_model_1 = require("../rider.model");
15
+ const enum_1 = require("../../../../utilities/enum");
16
+ class RiderAssignment {
17
+ rider;
18
+ status;
19
+ timestamp;
20
+ reason;
21
+ }
22
+ exports.RiderAssignment = RiderAssignment;
23
+ __decorate([
24
+ (0, typegoose_1.prop)({ ref: () => rider_model_1.Rider, required: true }),
25
+ __metadata("design:type", typegoose_1.mongoose.Types.ObjectId)
26
+ ], RiderAssignment.prototype, "rider", void 0);
27
+ __decorate([
28
+ (0, typegoose_1.prop)({
29
+ type: String,
30
+ enum: enum_1.RiderAssignmentStatus,
31
+ default: enum_1.RiderAssignmentStatus.REQUESTED,
32
+ required: true,
33
+ }),
34
+ __metadata("design:type", String)
35
+ ], RiderAssignment.prototype, "status", void 0);
36
+ __decorate([
37
+ (0, typegoose_1.prop)({ required: true, default: Date.now }),
38
+ __metadata("design:type", Date)
39
+ ], RiderAssignment.prototype, "timestamp", void 0);
40
+ __decorate([
41
+ (0, typegoose_1.prop)(),
42
+ __metadata("design:type", String)
43
+ ], RiderAssignment.prototype, "reason", void 0);
44
+ //# sourceMappingURL=rider-assignment-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rider-assignment-model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/rider-assignment-model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsD;AACtD,gDAAuC;AACvC,qDAAmE;AAEnE,MAAa,eAAe;IAE3B,KAAK,CAA0B;IAQ/B,MAAM,CAAwB;IAG9B,SAAS,CAAO;IAGhB,MAAM,CAAU;CAChB;AAjBD,0CAiBC;AAfA;IADC,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACpC,oBAAQ,CAAC,KAAK,CAAC,QAAQ;8CAAC;AAQ/B;IANC,IAAA,gBAAI,EAAC;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,4BAAqB;QAC3B,OAAO,EAAE,4BAAqB,CAAC,SAAS;QACxC,QAAQ,EAAE,IAAI;KACd,CAAC;;+CAC4B;AAG9B;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;8BACjC,IAAI;kDAAC;AAGhB;IADC,IAAA,gBAAI,GAAE;;+CACS","sourcesContent":["import { prop, mongoose } from '@typegoose/typegoose';\nimport { Rider } from '../rider.model';\nimport { RiderAssignmentStatus } from '../../../../utilities/enum';\n\nexport class RiderAssignment {\n\t@prop({ ref: () => Rider, required: true })\n\trider: mongoose.Types.ObjectId;\n\n\t@prop({\n\t\ttype: String,\n\t\tenum: RiderAssignmentStatus,\n\t\tdefault: RiderAssignmentStatus.REQUESTED,\n\t\trequired: true,\n\t})\n\tstatus: RiderAssignmentStatus;\n\n\t@prop({ required: true, default: Date.now })\n\ttimestamp: Date;\n\n\t@prop()\n\treason?: string;\n}\n"]}
@@ -0,0 +1,25 @@
1
+ import { Ref, mongoose } from '@typegoose/typegoose';
2
+ import { Rider } from '../rider.model';
3
+ import { FaqAccountType, ItemType, DeliveryStatus } from '../../../../utilities/enum';
4
+ import { User } from '../user.model';
5
+ import { Shop } from '../shop.model';
6
+ import { IDistance, IDuration } from '../../../map/interfaces/IMapService';
7
+ export declare class TripLeg {
8
+ name?: string;
9
+ address?: string;
10
+ latitude?: number;
11
+ longitude?: number;
12
+ type?: FaqAccountType;
13
+ rider?: Ref<Rider>;
14
+ orders?: mongoose.Types.ObjectId[];
15
+ user?: Ref<User>;
16
+ shop?: Ref<Shop>;
17
+ shopType?: ItemType;
18
+ status?: DeliveryStatus;
19
+ totalDistance?: IDistance;
20
+ totalDuration?: IDuration;
21
+ totalOverviewPolyline?: number[][];
22
+ distance?: IDistance;
23
+ duration?: IDuration;
24
+ overviewPolyline?: number[][];
25
+ }
@@ -0,0 +1,121 @@
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.TripLeg = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ const order_model_1 = require("../order.model");
15
+ const rider_model_1 = require("../rider.model");
16
+ const enum_1 = require("../../../../utilities/enum");
17
+ const user_model_1 = require("../user.model");
18
+ const shop_model_1 = require("../shop.model");
19
+ class TripLeg {
20
+ name;
21
+ address;
22
+ latitude;
23
+ longitude;
24
+ type;
25
+ rider;
26
+ orders;
27
+ user;
28
+ shop;
29
+ shopType;
30
+ status;
31
+ totalDistance;
32
+ totalDuration;
33
+ totalOverviewPolyline;
34
+ distance;
35
+ duration;
36
+ overviewPolyline;
37
+ }
38
+ exports.TripLeg = TripLeg;
39
+ __decorate([
40
+ (0, typegoose_1.prop)({ type: String }),
41
+ __metadata("design:type", String)
42
+ ], TripLeg.prototype, "name", void 0);
43
+ __decorate([
44
+ (0, typegoose_1.prop)({ type: String }),
45
+ __metadata("design:type", String)
46
+ ], TripLeg.prototype, "address", void 0);
47
+ __decorate([
48
+ (0, typegoose_1.prop)({ required: true, type: Number }),
49
+ __metadata("design:type", Number)
50
+ ], TripLeg.prototype, "latitude", void 0);
51
+ __decorate([
52
+ (0, typegoose_1.prop)({ required: true, type: Number }),
53
+ __metadata("design:type", Number)
54
+ ], TripLeg.prototype, "longitude", void 0);
55
+ __decorate([
56
+ (0, typegoose_1.prop)({
57
+ type: String,
58
+ enum: enum_1.FaqAccountType,
59
+ default: enum_1.FaqAccountType.RIDER,
60
+ }),
61
+ __metadata("design:type", String)
62
+ ], TripLeg.prototype, "type", void 0);
63
+ __decorate([
64
+ (0, typegoose_1.prop)({ ref: () => rider_model_1.Rider }),
65
+ __metadata("design:type", Object)
66
+ ], TripLeg.prototype, "rider", void 0);
67
+ __decorate([
68
+ (0, typegoose_1.prop)({ ref: () => order_model_1.Order }),
69
+ __metadata("design:type", Array)
70
+ ], TripLeg.prototype, "orders", void 0);
71
+ __decorate([
72
+ (0, typegoose_1.prop)({ ref: () => user_model_1.User }),
73
+ __metadata("design:type", Object)
74
+ ], TripLeg.prototype, "user", void 0);
75
+ __decorate([
76
+ (0, typegoose_1.prop)({ ref: () => shop_model_1.Shop }),
77
+ __metadata("design:type", Object)
78
+ ], TripLeg.prototype, "shop", void 0);
79
+ __decorate([
80
+ (0, typegoose_1.prop)({
81
+ type: String,
82
+ enum: enum_1.ItemType,
83
+ }),
84
+ __metadata("design:type", String)
85
+ ], TripLeg.prototype, "shopType", void 0);
86
+ __decorate([
87
+ (0, typegoose_1.prop)({
88
+ type: String,
89
+ enum: enum_1.DeliveryStatus,
90
+ default: enum_1.DeliveryStatus.PENDING,
91
+ required: true,
92
+ }),
93
+ __metadata("design:type", String)
94
+ ], TripLeg.prototype, "status", void 0);
95
+ __decorate([
96
+ (0, typegoose_1.prop)(),
97
+ __metadata("design:type", Object)
98
+ ], TripLeg.prototype, "totalDistance", void 0);
99
+ __decorate([
100
+ (0, typegoose_1.prop)(),
101
+ __metadata("design:type", Object)
102
+ ], TripLeg.prototype, "totalDuration", void 0);
103
+ __decorate([
104
+ (0, typegoose_1.prop)({ type: [[Number]] }),
105
+ __metadata("design:type", Array)
106
+ ], TripLeg.prototype, "totalOverviewPolyline", void 0);
107
+ __decorate([
108
+ (0, typegoose_1.prop)(),
109
+ __metadata("design:type", Object)
110
+ ], TripLeg.prototype, "distance", void 0);
111
+ __decorate([
112
+ (0, typegoose_1.prop)(),
113
+ __metadata("design:type", Object)
114
+ ], TripLeg.prototype, "duration", void 0);
115
+ __decorate([
116
+ (0, typegoose_1.prop)({
117
+ type: [[Number]],
118
+ }),
119
+ __metadata("design:type", Array)
120
+ ], TripLeg.prototype, "overviewPolyline", void 0);
121
+ //# sourceMappingURL=trip-leg.mode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trip-leg.mode.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/trip-leg.mode.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2D;AAC3D,gDAAuC;AACvC,gDAAuC;AACvC,qDAAsF;AACtF,8CAAqC;AACrC,8CAAqC;AAGrC,MAAa,OAAO;IAEnB,IAAI,CAAU;IAGd,OAAO,CAAU;IAGjB,QAAQ,CAAU;IAGlB,SAAS,CAAU;IAOnB,IAAI,CAAkB;IAGtB,KAAK,CAAc;IAGnB,MAAM,CAA6B;IAGnC,IAAI,CAAa;IAGjB,IAAI,CAAa;IAMjB,QAAQ,CAAY;IAQpB,MAAM,CAAkB;IAGxB,aAAa,CAAa;IAG1B,aAAa,CAAa;IAG1B,qBAAqB,CAAc;IAGnC,QAAQ,CAAa;IAGrB,QAAQ,CAAa;IAKrB,gBAAgB,CAAc;CAC9B;AAjED,0BAiEC;AA/DA;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qCACT;AAGd;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wCACN;AAGjB;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCACrB;AAGlB;IADC,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0CACpB;AAOnB;IALC,IAAA,gBAAI,EAAC;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,qBAAc;QACpB,OAAO,EAAE,qBAAc,CAAC,KAAK;KAC7B,CAAC;;qCACoB;AAGtB;IADC,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;sCACR;AAGnB;IADC,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;uCACQ;AAGnC;IADC,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;qCACT;AAGjB;IADC,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;qCACT;AAMjB;IAJC,IAAA,gBAAI,EAAC;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,eAAQ;KACd,CAAC;;yCACkB;AAQpB;IANC,IAAA,gBAAI,EAAC;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,qBAAc;QACpB,OAAO,EAAE,qBAAc,CAAC,OAAO;QAC/B,QAAQ,EAAE,IAAI;KACd,CAAC;;uCACsB;AAGxB;IADC,IAAA,gBAAI,GAAE;;8CACmB;AAG1B;IADC,IAAA,gBAAI,GAAE;;8CACmB;AAG1B;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;;sDACQ;AAGnC;IADC,IAAA,gBAAI,GAAE;;yCACc;AAGrB;IADC,IAAA,gBAAI,GAAE;;yCACc;AAKrB;IAHC,IAAA,gBAAI,EAAC;QACL,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;KAChB,CAAC;;iDAC4B","sourcesContent":["import { Ref, prop, mongoose } from '@typegoose/typegoose';\nimport { Order } from '../order.model';\nimport { Rider } from '../rider.model';\nimport { FaqAccountType, ItemType, DeliveryStatus } from '../../../../utilities/enum';\nimport { User } from '../user.model';\nimport { Shop } from '../shop.model';\nimport { IDistance, IDuration } from '../../../map/interfaces/IMapService';\n\nexport class TripLeg {\n\t@prop({ type: String })\n\tname?: string;\n\n\t@prop({ type: String })\n\taddress?: string;\n\n\t@prop({ required: true, type: Number })\n\tlatitude?: number;\n\n\t@prop({ required: true, type: Number })\n\tlongitude?: number;\n\n\t@prop({\n\t\ttype: String,\n\t\tenum: FaqAccountType,\n\t\tdefault: FaqAccountType.RIDER,\n\t})\n\ttype?: FaqAccountType;\n\n\t@prop({ ref: () => Rider })\n\trider?: Ref<Rider>;\n\n\t@prop({ ref: () => Order })\n\torders?: mongoose.Types.ObjectId[];\n\n\t@prop({ ref: () => User })\n\tuser?: Ref<User>;\n\n\t@prop({ ref: () => Shop })\n\tshop?: Ref<Shop>;\n\n\t@prop({\n\t\ttype: String,\n\t\tenum: ItemType,\n\t})\n\tshopType?: ItemType;\n\n\t@prop({\n\t\ttype: String,\n\t\tenum: DeliveryStatus,\n\t\tdefault: DeliveryStatus.PENDING,\n\t\trequired: true,\n\t})\n\tstatus?: DeliveryStatus;\n\n\t@prop()\n\ttotalDistance?: IDistance;\n\n\t@prop()\n\ttotalDuration?: IDuration;\n\n\t@prop({ type: [[Number]] })\n\ttotalOverviewPolyline?: number[][];\n\n\t@prop()\n\tdistance?: IDistance;\n\n\t@prop()\n\tduration?: IDuration;\n\n\t@prop({\n\t\ttype: [[Number]],\n\t})\n\toverviewPolyline?: number[][];\n}\n"]}
@@ -74,9 +74,6 @@ import { Order } from './order.model';
74
74
  import { RegularOrder } from './providers/regular-order.model';
75
75
  import { CourierOrder } from './providers/courier-order.model';
76
76
  import { OrderDelivery } from './order-delivery.model';
77
- import { OrderFinance } from './order-finance.model';
78
- import { RegularOrderFinance } from './providers/regular-order-finance.model';
79
- import { CourierOrderFinance } from './providers/courier-order-finance.model';
80
77
  import { FinanceSettlement } from './finance-settlement.model';
81
78
  import { DefaultChat } from './default-chat.model';
82
79
  import { TermsAndConditions } from './terms-and-conditions.model';
@@ -188,12 +185,6 @@ export * from './providers/regular-order.model';
188
185
  export * from './providers/courier-order.model';
189
186
  export declare const OrderDeliveryModel: ReturnModelType<typeof OrderDelivery>;
190
187
  export * from './order-delivery.model';
191
- export declare const OrderFinanceModel: ReturnModelType<typeof OrderFinance>;
192
- export declare const RegularOrderFinanceModel: ReturnModelType<typeof RegularOrderFinance>;
193
- export declare const CourierOrderFinanceModel: ReturnModelType<typeof CourierOrderFinance>;
194
- export * from './order-finance.model';
195
- export * from './providers/regular-order-finance.model';
196
- export * from './providers/courier-order-finance.model';
197
188
  export declare const ParentModel: ReturnModelType<typeof Parent>;
198
189
  export * from './parent.model';
199
190
  export declare const ProductMarketingModel: ReturnModelType<typeof ProductMarketing>;
@@ -248,3 +239,5 @@ export declare const SupportReasonModel: ReturnModelType<typeof SupportReason>;
248
239
  export * from './support-reason.model';
249
240
  export declare const CancellationReasonModel: ReturnModelType<typeof CancellationReason>;
250
241
  export * from './cancellation-reason.model';
242
+ export * from './embedded/trip-leg.mode';
243
+ export * from './embedded/rider-assignment-model';