@lyxa.ai/core 1.0.218 → 1.0.220
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/service-order-finance.model.d.ts +12 -0
- package/dist/libraries/mongo/models/embedded/service-order-finance.model.js +47 -0
- package/dist/libraries/mongo/models/embedded/service-order-finance.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/service-order-pricing.model.d.ts +11 -0
- package/dist/libraries/mongo/models/embedded/service-order-pricing.model.js +58 -0
- package/dist/libraries/mongo/models/embedded/service-order-pricing.model.js.map +1 -0
- package/dist/libraries/mongo/models/order-delivery.model.d.ts +0 -3
- package/dist/libraries/mongo/models/order-delivery.model.js +0 -15
- package/dist/libraries/mongo/models/order-delivery.model.js.map +1 -1
- package/dist/libraries/mongo/models/order.model.d.ts +2 -0
- package/dist/libraries/mongo/models/order.model.js +10 -0
- package/dist/libraries/mongo/models/order.model.js.map +1 -1
- package/dist/libraries/mongo/models/parent.model.js +1 -1
- package/dist/libraries/mongo/models/parent.model.js.map +1 -1
- package/dist/libraries/mongo/models/professional.model.js +1 -1
- package/dist/libraries/mongo/models/professional.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/regular-order.model.d.ts +0 -1
- package/dist/libraries/mongo/models/providers/regular-order.model.js +0 -5
- package/dist/libraries/mongo/models/providers/regular-order.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/shop-courier.model.d.ts +0 -1
- package/dist/libraries/mongo/models/providers/shop-courier.model.js +0 -5
- package/dist/libraries/mongo/models/providers/shop-courier.model.js.map +1 -1
- package/dist/libraries/mongo/models/rider.model.js +1 -1
- package/dist/libraries/mongo/models/rider.model.js.map +1 -1
- package/dist/libraries/mongo/models/service-cart.model.d.ts +2 -1
- package/dist/libraries/mongo/models/service-cart.model.js +7 -2
- package/dist/libraries/mongo/models/service-cart.model.js.map +1 -1
- package/dist/libraries/mongo/models/service-order.model.d.ts +4 -1
- package/dist/libraries/mongo/models/service-order.model.js +13 -2
- package/dist/libraries/mongo/models/service-order.model.js.map +1 -1
- package/dist/libraries/mongo/models/shop-access-control.model.js +1 -1
- package/dist/libraries/mongo/models/shop-access-control.model.js.map +1 -1
- package/dist/libraries/mongo/models/vendor-access-control.model.js +1 -1
- package/dist/libraries/mongo/models/vendor-access-control.model.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/dist/utilities/{common/events-common-methods.d.ts → events-common-methods.d.ts} +1 -1
- package/dist/utilities/{common/events-common-methods.js → events-common-methods.js} +3 -3
- package/dist/utilities/events-common-methods.js.map +1 -0
- package/dist/utilities/password.js.map +1 -0
- package/dist/utilities/phone-number-validations.d.ts +7 -0
- package/dist/utilities/phone-number-validations.js +44 -0
- package/dist/utilities/phone-number-validations.js.map +1 -0
- package/dist/utilities/url-validations.d.ts +2 -0
- package/dist/utilities/url-validations.js +20 -0
- package/dist/utilities/url-validations.js.map +1 -0
- package/dist/utilities/week.js.map +1 -0
- package/package.json +1 -1
- package/dist/utilities/common/events-common-methods.js.map +0 -1
- package/dist/utilities/common/password.js.map +0 -1
- package/dist/utilities/common/week.js.map +0 -1
- /package/dist/utilities/{common/password.d.ts → password.d.ts} +0 -0
- /package/dist/utilities/{common/password.js → password.js} +0 -0
- /package/dist/utilities/{common/week.d.ts → week.d.ts} +0 -0
- /package/dist/utilities/{common/week.js → week.js} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Vat } from '../embedded/vat.model';
|
|
2
|
+
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
3
|
+
import { ServiceOrderPricing } from './service-order-pricing.model';
|
|
4
|
+
import { PaymentMethod } from '../../../../utilities/enum';
|
|
5
|
+
import { PaymentInformation } from './payment-infromation.model';
|
|
6
|
+
export declare class ServiceOrderFinance extends TimeStamps {
|
|
7
|
+
pricing: ServiceOrderPricing;
|
|
8
|
+
exchangeRate?: number;
|
|
9
|
+
paymentMethod?: PaymentMethod;
|
|
10
|
+
paymentInformation?: PaymentInformation;
|
|
11
|
+
vat?: Vat;
|
|
12
|
+
}
|
|
@@ -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.ServiceOrderFinance = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const vat_model_1 = require("../embedded/vat.model");
|
|
15
|
+
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
16
|
+
const service_order_pricing_model_1 = require("./service-order-pricing.model");
|
|
17
|
+
const enum_1 = require("../../../../utilities/enum");
|
|
18
|
+
const payment_infromation_model_1 = require("./payment-infromation.model");
|
|
19
|
+
class ServiceOrderFinance extends defaultClasses_1.TimeStamps {
|
|
20
|
+
pricing;
|
|
21
|
+
exchangeRate;
|
|
22
|
+
paymentMethod;
|
|
23
|
+
paymentInformation;
|
|
24
|
+
vat;
|
|
25
|
+
}
|
|
26
|
+
exports.ServiceOrderFinance = ServiceOrderFinance;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typegoose_1.prop)({ required: true, type: () => service_order_pricing_model_1.ServiceOrderPricing }),
|
|
29
|
+
__metadata("design:type", service_order_pricing_model_1.ServiceOrderPricing)
|
|
30
|
+
], ServiceOrderFinance.prototype, "pricing", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typegoose_1.prop)({ type: Number, default: 1 }),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], ServiceOrderFinance.prototype, "exchangeRate", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.PaymentMethod, default: enum_1.PaymentMethod.CASH }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], ServiceOrderFinance.prototype, "paymentMethod", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typegoose_1.prop)({ type: () => payment_infromation_model_1.PaymentInformation }),
|
|
41
|
+
__metadata("design:type", payment_infromation_model_1.PaymentInformation)
|
|
42
|
+
], ServiceOrderFinance.prototype, "paymentInformation", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typegoose_1.prop)({ type: () => vat_model_1.Vat }),
|
|
45
|
+
__metadata("design:type", vat_model_1.Vat)
|
|
46
|
+
], ServiceOrderFinance.prototype, "vat", void 0);
|
|
47
|
+
//# sourceMappingURL=service-order-finance.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-order-finance.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/service-order-finance.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,qDAA4C;AAC5C,4EAAqE;AACrE,+EAAoE;AACpE,qDAA2D;AAC3D,2EAAiE;AAGjE,MAAa,mBAAoB,SAAQ,2BAAU;IAExC,OAAO,CAAsB;IAG7B,YAAY,CAAU;IAGtB,aAAa,CAAiB;IAG9B,kBAAkB,CAAsB;IAGxC,GAAG,CAAO;CAEpB;AAhBD,kDAgBC;AAdU;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,iDAAmB,EAAE,CAAC;8BAC1C,iDAAmB;oDAAC;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;yDACN;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAa,EAAE,OAAO,EAAE,oBAAa,CAAC,IAAI,EAAE,CAAC;;0DACpC;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,8CAAkB,EAAE,CAAC;8BACb,8CAAkB;+DAAC;AAGxC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,eAAG,EAAE,CAAC;8BACb,eAAG;gDAAC","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { Vat } from '../embedded/vat.model';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ServiceOrderPricing } from './service-order-pricing.model';\nimport { PaymentMethod } from '../../../../utilities/enum';\nimport { PaymentInformation } from './payment-infromation.model';\n\n\nexport class ServiceOrderFinance extends TimeStamps {\n @prop({ required: true, type: () => ServiceOrderPricing })\n public pricing: ServiceOrderPricing;\n\n @prop({ type: Number, default: 1 })\n public exchangeRate?: number;\n\n @prop({ type: String, enum: PaymentMethod, default: PaymentMethod.CASH })\n public paymentMethod?: PaymentMethod;\n\n @prop({ type: () => PaymentInformation })\n public paymentInformation?: PaymentInformation;\n\n @prop({ type: () => Vat })\n public vat?: Vat;\n\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
2
|
+
export declare class ServiceOrderPricing extends TimeStamps {
|
|
3
|
+
subtotal: number;
|
|
4
|
+
secondarySubtotal?: number;
|
|
5
|
+
total: number;
|
|
6
|
+
secondaryTotal?: number;
|
|
7
|
+
paidAmount?: number;
|
|
8
|
+
secondaryPaidAmount?: number;
|
|
9
|
+
discount?: number;
|
|
10
|
+
secondaryDiscount?: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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.ServiceOrderPricing = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
|
+
class ServiceOrderPricing extends defaultClasses_1.TimeStamps {
|
|
16
|
+
subtotal;
|
|
17
|
+
secondarySubtotal;
|
|
18
|
+
total;
|
|
19
|
+
secondaryTotal;
|
|
20
|
+
paidAmount;
|
|
21
|
+
secondaryPaidAmount;
|
|
22
|
+
discount;
|
|
23
|
+
secondaryDiscount;
|
|
24
|
+
}
|
|
25
|
+
exports.ServiceOrderPricing = ServiceOrderPricing;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], ServiceOrderPricing.prototype, "subtotal", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], ServiceOrderPricing.prototype, "secondarySubtotal", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], ServiceOrderPricing.prototype, "total", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], ServiceOrderPricing.prototype, "secondaryTotal", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], ServiceOrderPricing.prototype, "paidAmount", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], ServiceOrderPricing.prototype, "secondaryPaidAmount", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], ServiceOrderPricing.prototype, "discount", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], ServiceOrderPricing.prototype, "secondaryDiscount", void 0);
|
|
58
|
+
//# sourceMappingURL=service-order-pricing.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-order-pricing.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/service-order-pricing.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,4EAAqE;AAGrE,MAAa,mBAAoB,SAAQ,2BAAU;IAE/C,QAAQ,CAAS;IAGjB,iBAAiB,CAAU;IAG3B,KAAK,CAAS;IAGd,cAAc,CAAU;IAGxB,UAAU,CAAU;IAGpB,mBAAmB,CAAU;IAG7B,QAAQ,CAAU;IAGlB,iBAAiB,CAAU;CAE9B;AAzBD,kDAyBC;AAvBG;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;qDAClB;AAGjB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;8DACR;AAG3B;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;kDACrB;AAGd;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;2DACX;AAGxB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;uDACf;AAGpB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;gEACN;AAG7B;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;qDACjB;AAGlB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;8DACR","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\n\n\nexport class ServiceOrderPricing extends TimeStamps {\n @prop({ type: Number, default: 0 })\n subtotal: number;\n\n @prop({ type: Number, default: 0 })\n secondarySubtotal?: number;\n\n @prop({ type: Number, default: 0 })\n total: number;\n\n @prop({ type: Number, default: 0 })\n secondaryTotal?: number;\n\n @prop({ type: Number, default: 0 })\n paidAmount?: number;\n\n @prop({ type: Number, default: 0 })\n secondaryPaidAmount?: number;\n\n @prop({ type: Number, default: 0 })\n discount?: number;\n\n @prop({ type: Number, default: 0 })\n secondaryDiscount?: number;\n\n}\n"]}
|
|
@@ -10,13 +10,10 @@ export declare class OrderDelivery extends TimeStamps {
|
|
|
10
10
|
riderAssignments: RiderAssignment[];
|
|
11
11
|
estimatedPickupTime?: Date;
|
|
12
12
|
actualPickupTime?: Date;
|
|
13
|
-
estimatedDeliveryTime?: Date;
|
|
14
|
-
actualDeliveryTime?: Date;
|
|
15
13
|
searchingStartTime?: Date;
|
|
16
14
|
totalSearchAttempts?: number;
|
|
17
15
|
lastSearchRadiusInKm?: number;
|
|
18
16
|
note?: string;
|
|
19
17
|
tripSummary: TripLeg[];
|
|
20
18
|
image?: string;
|
|
21
|
-
pin?: string;
|
|
22
19
|
}
|
|
@@ -22,15 +22,12 @@ let OrderDelivery = class OrderDelivery extends defaultClasses_1.TimeStamps {
|
|
|
22
22
|
riderAssignments;
|
|
23
23
|
estimatedPickupTime;
|
|
24
24
|
actualPickupTime;
|
|
25
|
-
estimatedDeliveryTime;
|
|
26
|
-
actualDeliveryTime;
|
|
27
25
|
searchingStartTime;
|
|
28
26
|
totalSearchAttempts;
|
|
29
27
|
lastSearchRadiusInKm;
|
|
30
28
|
note;
|
|
31
29
|
tripSummary;
|
|
32
30
|
image;
|
|
33
|
-
pin;
|
|
34
31
|
};
|
|
35
32
|
exports.OrderDelivery = OrderDelivery;
|
|
36
33
|
__decorate([
|
|
@@ -53,14 +50,6 @@ __decorate([
|
|
|
53
50
|
(0, typegoose_1.prop)(),
|
|
54
51
|
__metadata("design:type", Date)
|
|
55
52
|
], OrderDelivery.prototype, "actualPickupTime", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, typegoose_1.prop)(),
|
|
58
|
-
__metadata("design:type", Date)
|
|
59
|
-
], OrderDelivery.prototype, "estimatedDeliveryTime", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, typegoose_1.prop)(),
|
|
62
|
-
__metadata("design:type", Date)
|
|
63
|
-
], OrderDelivery.prototype, "actualDeliveryTime", void 0);
|
|
64
53
|
__decorate([
|
|
65
54
|
(0, typegoose_1.prop)({ default: Date.now }),
|
|
66
55
|
__metadata("design:type", Date)
|
|
@@ -85,10 +74,6 @@ __decorate([
|
|
|
85
74
|
(0, typegoose_1.prop)({ type: String }),
|
|
86
75
|
__metadata("design:type", String)
|
|
87
76
|
], OrderDelivery.prototype, "image", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
(0, typegoose_1.prop)({ type: String }),
|
|
90
|
-
__metadata("design:type", String)
|
|
91
|
-
], OrderDelivery.prototype, "pin", void 0);
|
|
92
77
|
exports.OrderDelivery = OrderDelivery = __decorate([
|
|
93
78
|
(0, typegoose_1.modelOptions)({
|
|
94
79
|
schemaOptions: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-delivery.model.js","sourceRoot":"/","sources":["libraries/mongo/models/order-delivery.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAyE;AACzE,4EAAqE;AACrE,+CAAsC;AACtC,+CAAsC;AACtC,8EAAoE;AACpE,4DAAmD;AAU5C,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,2BAAU;IAE5C,KAAK,CAAa;IAGlB,KAAK,CAAc;IAGnB,gBAAgB,CAAoB;IAGpC,mBAAmB,CAAQ;IAG3B,gBAAgB,CAAQ;IAGxB,
|
|
1
|
+
{"version":3,"file":"order-delivery.model.js","sourceRoot":"/","sources":["libraries/mongo/models/order-delivery.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAyE;AACzE,4EAAqE;AACrE,+CAAsC;AACtC,+CAAsC;AACtC,8EAAoE;AACpE,4DAAmD;AAU5C,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,2BAAU;IAE5C,KAAK,CAAa;IAGlB,KAAK,CAAc;IAGnB,gB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,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CACR;wBAhCH,aAAa;IARzB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE;YACd,UAAU,EAAE,IAAI;YAChB,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC1B,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC5B,UAAU,EAAE,iBAAiB;SAC7B;KACD,CAAC;GACW,aAAa,CAiCzB","sourcesContent":["import { modelOptions, mongoose, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Order } from './order.model';\nimport { Rider } from './rider.model';\nimport { RiderAssignment } from './embedded/rider-assignment-model';\nimport { TripLeg } from './embedded/trip-leg.mode';\n\n@modelOptions({\n\tschemaOptions: {\n\t\ttimestamps: true,\n\t\ttoJSON: { virtuals: true },\n\t\ttoObject: { virtuals: true },\n\t\tcollection: 'orderDeliveries',\n\t},\n})\nexport class OrderDelivery extends TimeStamps {\n\t@prop({ ref: () => Order, required: true, index: true, unique: true })\n\torder: Ref<Order>;\n\n\t@prop({ ref: () => Rider })\n\trider?: Ref<Rider>;\n\n\t@prop({ type: () => [RiderAssignment], default: [] })\n\triderAssignments: RiderAssignment[];\n\n\t@prop()\n\testimatedPickupTime?: Date;\n\n\t@prop()\n\tactualPickupTime?: Date;\n\n\t@prop({ default: Date.now })\n\tsearchingStartTime?: Date;\n\n\t@prop({ type: Number, default: 0 })\n\ttotalSearchAttempts?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tlastSearchRadiusInKm?: number;\n\n\t@prop({ type: String })\n\tnote?: string;\n\n\t@prop({ type: () => [TripLeg], default: [] })\n\ttripSummary: TripLeg[];\n\n\t@prop({ type: String })\n\timage?: string;\n}\n"]}
|
|
@@ -9,7 +9,9 @@ export declare class Order extends TimeStamps {
|
|
|
9
9
|
orderType?: OrderType;
|
|
10
10
|
rider?: Ref<Rider>;
|
|
11
11
|
deliveryFeeInformation?: DeliveryFeeInformation;
|
|
12
|
+
estimatedDeliveredTime: Date;
|
|
12
13
|
estimatedDeliveredTimeInMinutes: number;
|
|
14
|
+
deliveredAt: number;
|
|
13
15
|
deliveredTimeInMinutes: number;
|
|
14
16
|
instruction?: string;
|
|
15
17
|
note?: string;
|
|
@@ -21,7 +21,9 @@ let Order = class Order extends defaultClasses_1.TimeStamps {
|
|
|
21
21
|
orderType;
|
|
22
22
|
rider;
|
|
23
23
|
deliveryFeeInformation;
|
|
24
|
+
estimatedDeliveredTime;
|
|
24
25
|
estimatedDeliveredTimeInMinutes;
|
|
26
|
+
deliveredAt;
|
|
25
27
|
deliveredTimeInMinutes;
|
|
26
28
|
instruction;
|
|
27
29
|
note;
|
|
@@ -53,10 +55,18 @@ __decorate([
|
|
|
53
55
|
(0, typegoose_1.prop)({ type: () => order_delivery_information_model_1.DeliveryFeeInformation }),
|
|
54
56
|
__metadata("design:type", order_delivery_information_model_1.DeliveryFeeInformation)
|
|
55
57
|
], Order.prototype, "deliveryFeeInformation", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typegoose_1.prop)({ type: Date }),
|
|
60
|
+
__metadata("design:type", Date)
|
|
61
|
+
], Order.prototype, "estimatedDeliveredTime", void 0);
|
|
56
62
|
__decorate([
|
|
57
63
|
(0, typegoose_1.prop)({ type: Number }),
|
|
58
64
|
__metadata("design:type", Number)
|
|
59
65
|
], Order.prototype, "estimatedDeliveredTimeInMinutes", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typegoose_1.prop)({ type: Number }),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], Order.prototype, "deliveredAt", void 0);
|
|
60
70
|
__decorate([
|
|
61
71
|
(0, typegoose_1.prop)({ type: Number }),
|
|
62
72
|
__metadata("design:type", Number)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/order.model.ts"],"names":[],"mappings":";;;;;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CAAC,EAAE,CAAC;GAC5D,KAAK,CA6EjB","sourcesContent":["import { prop, Ref, modelOptions, Severity, index } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { LateOrderReason, OrderType, UrgentOrderReason } from '../../../utilities/enum';\nimport { OrderCancel } from './embedded/order-cancel.model';\nimport { User } from './user.model';\nimport { Rider } from './rider.model';\nimport { DeliveryFeeInformation } from './embedded/order-delivery-information.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: Number })\n\tpublic deliveredAt: number;\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"]}
|
|
@@ -47,7 +47,7 @@ __decorate([
|
|
|
47
47
|
__metadata("design:type", String)
|
|
48
48
|
], Parent.prototype, "email", void 0);
|
|
49
49
|
__decorate([
|
|
50
|
-
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
50
|
+
(0, typegoose_1.prop)({ required: true, type: String, unique: true }),
|
|
51
51
|
__metadata("design:type", String)
|
|
52
52
|
], Parent.prototype, "phoneNumber", void 0);
|
|
53
53
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parent.model.js","sourceRoot":"/","sources":["libraries/mongo/models/parent.model.ts"],"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oBAAQ,CAAC,KAAK;SAC1B;KACD,CAAC;GACW,MAAM,CAsDlB","sourcesContent":["import { index, modelOptions, prop, Ref, Severity } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ChargeType, ItemType, Status } from '../../../utilities/enum';\nimport { Admin } from './admin.model';\nimport { Charge } from './embedded/charge.model';\nimport { ParentDocument } from './embedded/parent-document.model';\nimport { Address } from './shared/address.model';\nimport { Duration } from './shared/duration.model';\nimport { Shop } from './shop.model';\n\n@modelOptions({\n\tschemaOptions: { collection: 'parents', toJSON: { virtuals: true }, toObject: { virtuals: true } },\n\toptions: {\n\t\tallowMixed: Severity.ALLOW,\n\t},\n})\nexport class Parent extends TimeStamps {\n\t@prop({ required: true, type: String, maxlength: 50, unique: true })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic email!: string;\n\n\t@prop({ required: true, type: String, unique: true })\n\tpublic phoneNumber!: string;\n\n\t@prop({ required: true, type: Address })\n\tpublic address!: Address;\n\n\t@prop({ required: true, type: String, enum: ChargeType, default: ChargeType.CUSTOM })\n\tpublic chargeType!: ChargeType;\n\n\t@prop({ required: true, type: Charge })\n\tpublic charge!: Charge;\n\n\t@prop({ required: true, type: Duration })\n\tpublic commissionDuration!: Duration;\n\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ required: true, type: Boolean, default: true })\n\tpublic isServiceFeeCharged!: boolean;\n\n\t@prop({ ref: () => Admin })\n\tpublic businessDevExecutive?: Ref<Admin>;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: String })\n\tpublic profilePhoto?: string;\n\n\t@prop({ type: ParentDocument })\n\tpublic document?: ParentDocument;\n\n\t@prop({\n\t\tref: () => Shop,\n\t\tforeignField: 'parent',\n\t\tlocalField: '_id',\n\t\tcount: true,\n\t\tmatch: { deletedAt: null },\n\t})\n\tpublic shopCount?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic allowTakingOrders?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic showCustomerNumber?: boolean;\n}\n"]}
|
|
@@ -14,7 +14,7 @@ const typegoose_1 = require("@typegoose/typegoose");
|
|
|
14
14
|
const vendor_model_1 = require("./vendor.model");
|
|
15
15
|
const service_package_model_1 = require("./service-package.model");
|
|
16
16
|
const enum_1 = require("../../../utilities/enum");
|
|
17
|
-
const password_1 = require("../../../utilities/
|
|
17
|
+
const password_1 = require("../../../utilities/password");
|
|
18
18
|
let Professional = class Professional {
|
|
19
19
|
name;
|
|
20
20
|
image;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"professional.model.js","sourceRoot":"/","sources":["libraries/mongo/models/professional.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoE;AACpE,iDAAwC;AACxC,mEAAyD;AACzD,kDAAqE;AACrE,
|
|
1
|
+
{"version":3,"file":"professional.model.js","sourceRoot":"/","sources":["libraries/mongo/models/professional.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoE;AACpE,iDAAwC;AACxC,mEAAyD;AACzD,kDAAqE;AACrE,0DAA2D;AAWpD,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEhB,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,WAAW,CAAU;IAGrB,KAAK,CAAU;IAGf,QAAQ,CAAU;IAGlB,WAAW,CAAU;IAGrB,MAAM,CAAe;IAGrB,OAAO,CAAyB;IAGhC,aAAa,CAAU;IAGvB,MAAM,CAAU;CACxB,CAAA;AA9BY,oCAAY;AAEhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;0CAChB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACH;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;iDACX;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;2CACjB;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CACE;AAGlB;IADN,IAAA,gBAAI,GAAE;;iDACqB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAChB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,sCAAc,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;6CACV;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;mDACS;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAM,EAAE,OAAO,EAAE,aAAM,CAAC,MAAM,EAAE,CAAC;;4CACtD;uBA7BZ,YAAY;IARxB,IAAA,eAAG,EAAe,MAAM,EAAE,KAAK,WAAW,IAAI;QAC7C,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAChC,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAA,uBAAY,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QACnD,CAAC;QACD,IAAI,EAAE,CAAA;IACR,CAAC,CAAC;IAED,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;GACtE,YAAY,CA8BxB","sourcesContent":["import { prop, Ref, modelOptions, pre } from '@typegoose/typegoose';\nimport { Vendor } from './vendor.model';\nimport { ServicePackage } from './service-package.model';\nimport { ProfessionalStatus, Status } from '../../../utilities/enum';\nimport { hashPassword } from '../../../utilities/password';\n\n\n@pre<Professional>('save', async function (next) {\n if (this.isModified('password')) {\n this.password = await hashPassword(this.password)\n }\n next()\n})\n\n@modelOptions({ schemaOptions: { collection: 'professionals', timestamps: true } })\nexport class Professional {\n @prop({ required: true, trim: true })\n public name!: string;\n\n @prop({ required: true })\n public image!: string;\n\n @prop({ required: true, unique: true })\n public phoneNumber!: string;\n\n @prop({ required: true, unique: true })\n public email!: string;\n\n @prop({ type: String })\n public password!: string;\n\n @prop()\n public nationality?: string;\n\n @prop({ ref: () => Vendor, required: true })\n public vendor!: Ref<Vendor>;\n\n @prop({ ref: () => ServicePackage, default: [] })\n public worksOn!: Ref<ServicePackage>[];\n\n @prop({ default: 0 })\n public averageRating?: number;\n\n @prop({ required: true, type: String, enum: Status, default: Status.ACTIVE })\n public status!: Status;\n}\n"]}
|
|
@@ -17,7 +17,6 @@ export declare class RegularOrder extends Order {
|
|
|
17
17
|
orderType: OrderType.REGULAR;
|
|
18
18
|
user: Ref<User>;
|
|
19
19
|
supportRiders?: Ref<Rider>[];
|
|
20
|
-
supportRidersRequested?: number;
|
|
21
20
|
status: RegularOrderStatus;
|
|
22
21
|
statusTimeline: RegularOrderStatusTimeline[];
|
|
23
22
|
itemType?: string;
|
|
@@ -29,7 +29,6 @@ class RegularOrder extends order_model_1.Order {
|
|
|
29
29
|
orderType = enum_1.OrderType.REGULAR;
|
|
30
30
|
user;
|
|
31
31
|
supportRiders;
|
|
32
|
-
supportRidersRequested;
|
|
33
32
|
status;
|
|
34
33
|
statusTimeline;
|
|
35
34
|
itemType;
|
|
@@ -61,10 +60,6 @@ __decorate([
|
|
|
61
60
|
(0, typegoose_1.prop)({ ref: () => rider_model_1.Rider }),
|
|
62
61
|
__metadata("design:type", Array)
|
|
63
62
|
], RegularOrder.prototype, "supportRiders", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
66
|
-
__metadata("design:type", Number)
|
|
67
|
-
], RegularOrder.prototype, "supportRidersRequested", void 0);
|
|
68
63
|
__decorate([
|
|
69
64
|
(0, typegoose_1.prop)({ type: String, enum: enum_1.RegularOrderStatus, default: enum_1.RegularOrderStatus.PLACED }),
|
|
70
65
|
__metadata("design:type", String)
|
|
@@ -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,qDAAqF;AACrF,kDAAyC;AACzC,8CAAqC;AACrC,8CAAqC;AACrC,2DAA+D;AAC/D,6EAA+E;AAC/E,uEAA6D;AAC7D,yFAA8E;AAC9E,uEAA6D;AAC7D,iFAAuE;AACvE,wDAA8C;AAC9C,8CAAqC;AACrC,gDAAuC;AAEvC,MAAa,YAAa,SAAQ,mBAAK;IAC/B,SAAS,GAAG,gBAAS,CAAC,OAAgB,CAAC;IAGvC,IAAI,CAAY;IAGhB,aAAa,CAAgB;IAG7B,
|
|
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,qDAAqF;AACrF,kDAAyC;AACzC,8CAAqC;AACrC,8CAAqC;AACrC,2DAA+D;AAC/D,6EAA+E;AAC/E,uEAA6D;AAC7D,yFAA8E;AAC9E,uEAA6D;AAC7D,iFAAuE;AACvE,wDAA8C;AAC9C,8CAAqC;AACrC,gDAAuC;AAEvC,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,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gCAAW,EAAE,CAAC;8BACF,gCAAW;4DAAC;AAGrC;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,MAAM,EAAE,CAAC;;yDACa;AAO7B;IALN,IAAA,gBAAI,EAAC;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ;QACnB,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,MAAM;KAClB,CAAC;;+CACgC","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { Order } from '../order.model';\nimport { ItemType, OrderType, RegularOrderStatus } from '../../../../utilities/enum';\nimport { Parent } from '../parent.model';\nimport { Shop } from '../shop.model';\nimport { Cart } from '../cart.model';\nimport { Address, UserAddress } 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';\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: UserAddress })\n\tpublic deliveryAddress: UserAddress;\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({ ref: () => Order })\n\tpublic originalOrderForReplacement?: Ref<Order>;\n\n\t@prop({ type: () => ReplacementOrder })\n\tpublic replacementOrderInformation?: ReplacementOrder;\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({ required: true, type: RegularOrderFinance })\n\tpublic finance: RegularOrderFinance;\n\n\t@prop({ type: RegularOrderFinance })\n\tpublic adjustedFinance?: RegularOrderFinance;\n\n\t@prop({ type: Number })\n\tpublic earnedLoyaltyPoints?: number;\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"]}
|
|
@@ -35,7 +35,6 @@ class ShopCourierOrder extends order_model_1.Order {
|
|
|
35
35
|
orderType = enum_1.OrderType.SHOP_COURIER;
|
|
36
36
|
shop;
|
|
37
37
|
supportRiders;
|
|
38
|
-
supportRidersRequested;
|
|
39
38
|
status;
|
|
40
39
|
amount;
|
|
41
40
|
size;
|
|
@@ -55,10 +54,6 @@ __decorate([
|
|
|
55
54
|
(0, typegoose_1.prop)({ ref: () => rider_model_1.Rider }),
|
|
56
55
|
__metadata("design:type", Array)
|
|
57
56
|
], ShopCourierOrder.prototype, "supportRiders", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
60
|
-
__metadata("design:type", Number)
|
|
61
|
-
], ShopCourierOrder.prototype, "supportRidersRequested", void 0);
|
|
62
57
|
__decorate([
|
|
63
58
|
(0, typegoose_1.prop)({ type: String, enum: enum_1.ShopCourierOrderStatus, default: enum_1.ShopCourierOrderStatus.PLACED }),
|
|
64
59
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop-courier.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/shop-courier.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AAEjD,gDAAuC;AACvC,qDAA0F;AAC1F,2DAAyD;AACzD,6EAA+E;AAC/E,yFAA8E;AAC9E,8CAAqC;AACrC,gDAAuC;AAEvC,MAAa,QAAQ;IAEb,IAAI,CAAU;IAGd,WAAW,CAAU;CAC5B;AAND,4BAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sCAClB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CACX;AAG7B,MAAa,gBAAiB,SAAQ,mBAAK;IACnC,SAAS,GAAG,gBAAS,CAAC,YAAqB,CAAC;IAG5C,IAAI,CAAa;IAGjB,aAAa,CAAgB;IAG7B,
|
|
1
|
+
{"version":3,"file":"shop-courier.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/shop-courier.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD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E,MAAM,EAAE,IAAI,EAAE,gBAAS,EAAE,CAAC;;8CAChB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;8BACzC,QAAQ;kDAAC;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,kDAA0B,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;wDACZ;AAG7C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDACK;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,8BAAc,EAAE,CAAC;8BACtB,8BAAc;yDAAC;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,iDAAmB,EAAE,CAAC;8BACnC,iDAAmB;iDAAC;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,iDAAmB,EAAE,CAAC;8BACX,iDAAmB;yDAAC","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\n\nimport { Order } from '../order.model';\nimport { ShopCourierOrderStatus, OrderType, OrderSize } 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 { Shop } from '../shop.model';\nimport { Rider } from '../rider.model';\n\nexport class Customer {\n\t@prop({ required: true, type: String })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic phoneNumber!: string;\n}\n\nexport class ShopCourierOrder extends Order {\n\tpublic orderType = OrderType.SHOP_COURIER as const;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ ref: () => Rider })\n\tpublic supportRiders?: Ref<Rider>[];\n\n\t@prop({ type: String, enum: ShopCourierOrderStatus, default: ShopCourierOrderStatus.PLACED })\n\tpublic status: ShopCourierOrderStatus;\n\n\t@prop({ required: true, type: Number, min: 0 })\n\tpublic amount!: number;\n\n\t@prop({ type: String, enum: OrderSize })\n\tpublic size?: OrderSize;\n\n\t@prop({ required: true, _id: false, type: () => Customer })\n\tpublic customer!: Customer;\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: CourierAddress })\n\tpublic deliveryAddress!: CourierAddress;\n\n\t@prop({ required: true, type: CourierOrderFinance })\n\tpublic finance!: CourierOrderFinance;\n\n\t@prop({ type: CourierOrderFinance })\n\tpublic adjustedFinance?: CourierOrderFinance;\n}\n"]}
|
|
@@ -18,7 +18,7 @@ const zone_model_1 = require("./zone.model");
|
|
|
18
18
|
const shop_model_1 = require("./shop.model");
|
|
19
19
|
const enum_1 = require("../../../utilities/enum");
|
|
20
20
|
const rider_equipment_model_1 = require("./embedded/rider-equipment.model");
|
|
21
|
-
const password_1 = require("../../../utilities/
|
|
21
|
+
const password_1 = require("../../../utilities/password");
|
|
22
22
|
class CashInHand {
|
|
23
23
|
amount;
|
|
24
24
|
secondaryAmount;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rider.model.js","sourceRoot":"/","sources":["libraries/mongo/models/rider.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAE3E,4EAAqE;AACrE,oEAA0D;AAC1D,6DAAmD;AACnD,6CAAoC;AACpC,6CAAoC;AACpC,kDAA2G;AAC3G,4EAAkE;AAElE,iEAAkE;AAElE,MAAa,UAAU;IAEf,MAAM,CAAU;IAGhB,eAAe,CAAU;CAChC;AAND,gCAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE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AE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;GACrF,KAAK,CAuIjB","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport bcrypt from 'bcryptjs';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { GeoLocation } from './shared/geo-location.model';\nimport { RiderReview } from './rider-review.model';\nimport { Zone } from './zone.model';\nimport { Shop } from './shop.model';\nimport { CreatedBy, Language, LiveStatus, RiderBagSize, ShiftType, Status } from '../../../utilities/enum';\nimport { RiderEquipment } from './embedded/rider-equipment.model';\nimport { Query } from 'mongoose';\nimport { hashPassword } from '../../../utilities/common/password';\n\nexport class CashInHand {\n\t@prop({ type: Number, default: 0 })\n\tpublic amount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmount?: number;\n}\n\n@pre<Rider>('save', async function (next) {\n\tif (this.isModified('password')) {\n\t\tthis.password = await hashPassword(this.password);\n\t}\n\tnext();\n})\n@pre<Query<any, Rider>>('findOneAndUpdate', async function (next) {\n\tconst update = this.getUpdate() as Record<string, any>;\n\tif (update?.password) {\n\t\tupdate.password = await hashPassword(update.password);\n\t\tthis.setUpdate(update);\n\t}\n\tnext();\n})\n@modelOptions({ schemaOptions: { collection: 'riders', timestamps: true } })\n@index({ location: '2dsphere' })\n@index({ status: 1, createdAt: 1, location: 1 }, { partialFilterExpression: { deletedAt: null } })\nexport class Rider extends TimeStamps {\n\t@prop({ type: String, required: true })\n\tpublic name!: string;\n\n\t@prop({ type: String })\n\tpublic image?: string;\n\n\t@prop({ type: String, required: true })\n\tpublic email!: string;\n\n\t@prop({ type: String })\n\tpublic password!: string;\n\n\t@prop({ type: String })\n\tpublic countryCode?: string;\n\n\t@prop({ type: String, enum: Language, default: Language.EN })\n\tpublic language?: Language;\n\n\t@prop({ type: String })\n\tpublic number?: string;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Date })\n\tpublic dob?: Date;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic totalOrder?: number;\n\n\t@prop({ type: String, enum: LiveStatus, default: LiveStatus.OFFLINE })\n\tpublic liveStatus?: LiveStatus;\n\n\t@prop({ type: () => String })\n\tpublic fcmToken?: string;\n\n\t@prop({ type: Date })\n\tpublic lastLogin?: Date;\n\n\t@prop({ type: Date })\n\tpublic lastOnline?: Date;\n\n\t@prop({ type: Date })\n\tpublic lastActive?: Date;\n\n\t@prop({ type: String })\n\tpublic nationalIdDocument?: string;\n\n\t@prop({ type: String })\n\tpublic vehicleRegistrationDocument?: string;\n\n\t@prop({ type: String })\n\tpublic vehicleType?: string;\n\n\t@prop({ type: String })\n\tpublic vehicleNumber?: string;\n\n\t@prop({ type: String })\n\tpublic address?: string;\n\n\t@prop({ type: GeoLocation })\n\tpublic location?: GeoLocation;\n\n\t@prop({ type: String })\n\tpublic forgetToken?: string;\n\n\t@prop({ type: Date })\n\tpublic forgetExpired?: Date;\n\n\t@prop({ type: Date })\n\tpublic lastLocationUpdateAt?: Date;\n\n\t@prop({ type: String })\n\tpublic contractImage?: string;\n\n\t@prop({ type: String, enum: CreatedBy, default: CreatedBy.ADMIN })\n\tpublic createdBy?: CreatedBy;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLogin?: boolean;\n\n\t@prop({ type: String })\n\tpublic lastLoginDeviceId?: string;\n\n\t@prop({ type: () => [String], ref: () => RiderReview, default: [] })\n\tpublic reviews?: Ref<RiderReview>[];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic avgRating?: number;\n\n\t@prop({ type: String, enum: ShiftType, default: ShiftType.DAY })\n\tpublic shift?: ShiftType;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic fullTimeEmployee: boolean;\n\n\t@prop({ ref: () => Zone })\n\tpublic zone?: Ref<Zone>;\n\n\t@prop({ type: String, enum: RiderBagSize, default: RiderBagSize.REGULAR })\n\tpublic bagSize?: RiderBagSize;\n\n\t@prop({ type: String, ref: () => Shop })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ type: String })\n\tpublic riderNationality?: string;\n\n\t@prop({\n\t\ttype: CashInHand,\n\t\tdefault: () => ({\n\t\t\tamount: 0,\n\t\t\tsecondaryAmount: 0,\n\t\t}),\n\t})\n\tpublic cashInHand?: CashInHand;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isCashSettlementLimitReached?: boolean;\n\n\t@prop({ type: Date, default: null })\n\tpublic firstActiveAt?: Date | null;\n\n\t@prop({ type: () => [RiderEquipment], default: [] })\n\tpublic riderEquipments?: RiderEquipment[];\n\n\t@prop({ type: String })\n\tpublic insurance?: string;\n\n\t@prop({ type: String })\n\tpublic powerOfAttorney?: string;\n\n\t@prop({ type: String })\n\tpublic proofOfResidence?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"rider.model.js","sourceRoot":"/","sources":["libraries/mongo/models/rider.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAE3E,4EAAqE;AACrE,oEAA0D;AAC1D,6DAAmD;AACnD,6CAAoC;AACpC,6CAAoC;AACpC,kDAA2G;AAC3G,4EAAkE;AAElE,0DAA2D;AAE3D,MAAa,UAAU;IAEf,MAAM,CAAU;IAGhB,eAAe,CAAU;CAChC;AAND,gCAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;0CACZ;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;mDACH;AAoB1B,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,2BAAU;IAE7B,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,KAAK,CAAU;IAGf,QAAQ,CAAU;IAGlB,WAAW,CAAU;IAGrB,QAAQ,CAAY;IAGpB,MAAM,CAAU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AE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CACU;gBAtIrB,KAAK;IAjBjB,IAAA,eAAG,EAAQ,MAAM,EAAE,KAAK,WAAW,IAAI;QACvC,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAA,uBAAY,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnD,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IACD,IAAA,eAAG,EAAoB,kBAAkB,EAAE,KAAK,WAAW,IAAI;QAC/D,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAyB,CAAC;QACvD,IAAI,MAAM,EAAE,QAAQ,EAAE,CAAC;YACtB,MAAM,CAAC,QAAQ,GAAG,MAAM,IAAA,uBAAY,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACtD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IACD,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;IAC3E,IAAA,iBAAK,EAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAC/B,IAAA,iBAAK,EAAC,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;GACrF,KAAK,CAuIjB","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport bcrypt from 'bcryptjs';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { GeoLocation } from './shared/geo-location.model';\nimport { RiderReview } from './rider-review.model';\nimport { Zone } from './zone.model';\nimport { Shop } from './shop.model';\nimport { CreatedBy, Language, LiveStatus, RiderBagSize, ShiftType, Status } from '../../../utilities/enum';\nimport { RiderEquipment } from './embedded/rider-equipment.model';\nimport { Query } from 'mongoose';\nimport { hashPassword } from '../../../utilities/password';\n\nexport class CashInHand {\n\t@prop({ type: Number, default: 0 })\n\tpublic amount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmount?: number;\n}\n\n@pre<Rider>('save', async function (next) {\n\tif (this.isModified('password')) {\n\t\tthis.password = await hashPassword(this.password);\n\t}\n\tnext();\n})\n@pre<Query<any, Rider>>('findOneAndUpdate', async function (next) {\n\tconst update = this.getUpdate() as Record<string, any>;\n\tif (update?.password) {\n\t\tupdate.password = await hashPassword(update.password);\n\t\tthis.setUpdate(update);\n\t}\n\tnext();\n})\n@modelOptions({ schemaOptions: { collection: 'riders', timestamps: true } })\n@index({ location: '2dsphere' })\n@index({ status: 1, createdAt: 1, location: 1 }, { partialFilterExpression: { deletedAt: null } })\nexport class Rider extends TimeStamps {\n\t@prop({ type: String, required: true })\n\tpublic name!: string;\n\n\t@prop({ type: String })\n\tpublic image?: string;\n\n\t@prop({ type: String, required: true })\n\tpublic email!: string;\n\n\t@prop({ type: String })\n\tpublic password!: string;\n\n\t@prop({ type: String })\n\tpublic countryCode?: string;\n\n\t@prop({ type: String, enum: Language, default: Language.EN })\n\tpublic language?: Language;\n\n\t@prop({ type: String })\n\tpublic number?: string;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Date })\n\tpublic dob?: Date;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic totalOrder?: number;\n\n\t@prop({ type: String, enum: LiveStatus, default: LiveStatus.OFFLINE })\n\tpublic liveStatus?: LiveStatus;\n\n\t@prop({ type: () => String })\n\tpublic fcmToken?: string;\n\n\t@prop({ type: Date })\n\tpublic lastLogin?: Date;\n\n\t@prop({ type: Date })\n\tpublic lastOnline?: Date;\n\n\t@prop({ type: Date })\n\tpublic lastActive?: Date;\n\n\t@prop({ type: String })\n\tpublic nationalIdDocument?: string;\n\n\t@prop({ type: String })\n\tpublic vehicleRegistrationDocument?: string;\n\n\t@prop({ type: String })\n\tpublic vehicleType?: string;\n\n\t@prop({ type: String })\n\tpublic vehicleNumber?: string;\n\n\t@prop({ type: String })\n\tpublic address?: string;\n\n\t@prop({ type: GeoLocation })\n\tpublic location?: GeoLocation;\n\n\t@prop({ type: String })\n\tpublic forgetToken?: string;\n\n\t@prop({ type: Date })\n\tpublic forgetExpired?: Date;\n\n\t@prop({ type: Date })\n\tpublic lastLocationUpdateAt?: Date;\n\n\t@prop({ type: String })\n\tpublic contractImage?: string;\n\n\t@prop({ type: String, enum: CreatedBy, default: CreatedBy.ADMIN })\n\tpublic createdBy?: CreatedBy;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLogin?: boolean;\n\n\t@prop({ type: String })\n\tpublic lastLoginDeviceId?: string;\n\n\t@prop({ type: () => [String], ref: () => RiderReview, default: [] })\n\tpublic reviews?: Ref<RiderReview>[];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic avgRating?: number;\n\n\t@prop({ type: String, enum: ShiftType, default: ShiftType.DAY })\n\tpublic shift?: ShiftType;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic fullTimeEmployee: boolean;\n\n\t@prop({ ref: () => Zone })\n\tpublic zone?: Ref<Zone>;\n\n\t@prop({ type: String, enum: RiderBagSize, default: RiderBagSize.REGULAR })\n\tpublic bagSize?: RiderBagSize;\n\n\t@prop({ type: String, ref: () => Shop })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ type: String })\n\tpublic riderNationality?: string;\n\n\t@prop({\n\t\ttype: CashInHand,\n\t\tdefault: () => ({\n\t\t\tamount: 0,\n\t\t\tsecondaryAmount: 0,\n\t\t}),\n\t})\n\tpublic cashInHand?: CashInHand;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isCashSettlementLimitReached?: boolean;\n\n\t@prop({ type: Date, default: null })\n\tpublic firstActiveAt?: Date | null;\n\n\t@prop({ type: () => [RiderEquipment], default: [] })\n\tpublic riderEquipments?: RiderEquipment[];\n\n\t@prop({ type: String })\n\tpublic insurance?: string;\n\n\t@prop({ type: String })\n\tpublic powerOfAttorney?: string;\n\n\t@prop({ type: String })\n\tpublic proofOfResidence?: string;\n}\n"]}
|
|
@@ -9,7 +9,8 @@ export declare class ServiceCart extends TimeStamps {
|
|
|
9
9
|
user: Ref<User>;
|
|
10
10
|
vendor: Ref<Vendor>;
|
|
11
11
|
serviceLocation?: UserAddress;
|
|
12
|
-
|
|
12
|
+
timeFrom: Date;
|
|
13
|
+
timeTo: Date;
|
|
13
14
|
recurrencePattern?: OrderRecurrencePattern;
|
|
14
15
|
status: ServiceCartStatus;
|
|
15
16
|
serviceLineItems: Ref<ServiceLineItem>[];
|
|
@@ -21,7 +21,8 @@ let ServiceCart = class ServiceCart extends defaultClasses_1.TimeStamps {
|
|
|
21
21
|
user;
|
|
22
22
|
vendor;
|
|
23
23
|
serviceLocation;
|
|
24
|
-
|
|
24
|
+
timeFrom;
|
|
25
|
+
timeTo;
|
|
25
26
|
recurrencePattern;
|
|
26
27
|
status;
|
|
27
28
|
serviceLineItems;
|
|
@@ -42,7 +43,11 @@ __decorate([
|
|
|
42
43
|
__decorate([
|
|
43
44
|
(0, typegoose_1.prop)({ required: true }),
|
|
44
45
|
__metadata("design:type", Date)
|
|
45
|
-
], ServiceCart.prototype, "
|
|
46
|
+
], ServiceCart.prototype, "timeFrom", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typegoose_1.prop)({ required: true }),
|
|
49
|
+
__metadata("design:type", Date)
|
|
50
|
+
], ServiceCart.prototype, "timeTo", void 0);
|
|
46
51
|
__decorate([
|
|
47
52
|
(0, typegoose_1.prop)({ enum: enum_1.OrderRecurrencePattern, default: enum_1.OrderRecurrencePattern.ONETIME }),
|
|
48
53
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-cart.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-cart.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,6CAAoC;AACpC,iDAAwC;AACxC,kDAAoF;AACpF,uEAA4D;AAC5D,0DAAqD;AAyB9C,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,2BAAU;IAEnC,IAAI,CAAa;IAGjB,MAAM,CAAe;IAGrB,eAAe,CAAe;IAG9B,
|
|
1
|
+
{"version":3,"file":"service-cart.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-cart.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAgF;AAChF,4EAAqE;AACrE,6CAAoC;AACpC,iDAAwC;AACxC,kDAAoF;AACpF,uEAA4D;AAC5D,0DAAqD;AAyB9C,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,2BAAU;IAEnC,IAAI,CAAa;IAGjB,MAAM,CAAe;IAGrB,eAAe,CAAe;IAG9B,QAAQ,CAAO;IAGf,MAAM,CAAO;IAIb,iBAAiB,CAAyB;IAQ1C,MAAM,CAAqB;IAO3B,gBAAgB,CAAyB;CAChD,CAAA;AAlCY,kCAAW;AAEhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;yCAClB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,CAAC;;2CAChB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,2BAAW,EAAE,CAAC;8BACpB,2BAAW;oDAAC;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACP,IAAI;6CAAA;AAGf;IADN,IAAA,gBAAI,EA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Index, modelOptions, prop, Ref, Severity } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { User } from './user.model';\nimport { Vendor } from './vendor.model';\nimport { OrderRecurrencePattern, ServiceCartStatus } from '../../../utilities/enum';\nimport { ServiceLineItem } from './service-line-item.model';\nimport { UserAddress } from './shared/address.model';\n\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'serviceCarts',\n\t\ttoJSON: { virtuals: true },\n\t\ttoObject: { virtuals: true },\n\t},\n\toptions: {\n\t\tallowMixed: Severity.ALLOW,\n\t},\n})\n@Index({ user: 1 })\n@Index({ vendor: 1 })\n@Index({ status: 1 })\n@Index(\n\t{ user: 1, vendor: 1 },\n\t{\n\t\tunique: true,\n\t\tpartialFilterExpression: {\n\t\t\tstatus: { $in: [ServiceCartStatus.ACTIVE, ServiceCartStatus.LOCKED] },\n\t\t\tdeletedAt: null,\n\t\t},\n\t}\n)\nexport class ServiceCart extends TimeStamps {\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, ref: () => Vendor })\n\tpublic vendor!: Ref<Vendor>;\n\n\t@prop({ required: false, type: UserAddress })\n\tpublic serviceLocation?: UserAddress;\n\n\t@prop({ required: true })\n\tpublic timeFrom!: Date\n\n\t@prop({ required: true })\n\tpublic timeTo!: Date\n\n\n\t@prop({ enum: OrderRecurrencePattern, default: OrderRecurrencePattern.ONETIME })\n\tpublic recurrencePattern?: OrderRecurrencePattern\n\n\t@prop({\n\t\tenum: ServiceCartStatus,\n\t\ttype: String,\n\t\tdefault: ServiceCartStatus.ACTIVE,\n\t\trequired: true,\n\t})\n\tpublic status!: ServiceCartStatus;\n\n\t@prop({\n\t\tref: () => ServiceLineItem,\n\t\tforeignField: 'cart',\n\t\tlocalField: '_id',\n\t})\n\tpublic serviceLineItems: Ref<ServiceLineItem>[];\n}\n"]}
|
|
@@ -8,6 +8,7 @@ import { ServiceTimer } from "./embedded/service-timer.model";
|
|
|
8
8
|
import { ServiceOrderFlag } from "./embedded/service-order-flag.model";
|
|
9
9
|
import { ServiceCart } from "./service-cart.model";
|
|
10
10
|
import { PaymentInformation } from "./embedded/payment-infromation.model";
|
|
11
|
+
import { ServiceOrderFinance } from "./embedded/service-order-finance.model";
|
|
11
12
|
export declare class ServiceOrder {
|
|
12
13
|
orderId: string;
|
|
13
14
|
user: Ref<User>;
|
|
@@ -16,7 +17,8 @@ export declare class ServiceOrder {
|
|
|
16
17
|
package: Ref<ServicePackage>;
|
|
17
18
|
status: ServiceOrderStatus;
|
|
18
19
|
priority: ServiceOrderPriority;
|
|
19
|
-
|
|
20
|
+
timeFrom: Date;
|
|
21
|
+
timeTo: Date;
|
|
20
22
|
hoursRequired?: number;
|
|
21
23
|
userNotes?: string;
|
|
22
24
|
vendorNotes?: string;
|
|
@@ -29,6 +31,7 @@ export declare class ServiceOrder {
|
|
|
29
31
|
urgentAt?: Date;
|
|
30
32
|
isOverdue: boolean;
|
|
31
33
|
overdueAt?: Date;
|
|
34
|
+
finance: ServiceOrderFinance;
|
|
32
35
|
recurrencePattern?: OrderRecurrencePattern;
|
|
33
36
|
isPaid: boolean;
|
|
34
37
|
paymentMethod?: PaymentMethod;
|
|
@@ -20,6 +20,7 @@ const service_timer_model_1 = require("./embedded/service-timer.model");
|
|
|
20
20
|
const service_order_flag_model_1 = require("./embedded/service-order-flag.model");
|
|
21
21
|
const service_cart_model_1 = require("./service-cart.model");
|
|
22
22
|
const payment_infromation_model_1 = require("./embedded/payment-infromation.model");
|
|
23
|
+
const service_order_finance_model_1 = require("./embedded/service-order-finance.model");
|
|
23
24
|
let ServiceOrder = class ServiceOrder {
|
|
24
25
|
orderId;
|
|
25
26
|
user;
|
|
@@ -28,7 +29,8 @@ let ServiceOrder = class ServiceOrder {
|
|
|
28
29
|
package;
|
|
29
30
|
status;
|
|
30
31
|
priority;
|
|
31
|
-
|
|
32
|
+
timeFrom;
|
|
33
|
+
timeTo;
|
|
32
34
|
hoursRequired;
|
|
33
35
|
userNotes;
|
|
34
36
|
vendorNotes;
|
|
@@ -41,6 +43,7 @@ let ServiceOrder = class ServiceOrder {
|
|
|
41
43
|
urgentAt;
|
|
42
44
|
isOverdue;
|
|
43
45
|
overdueAt;
|
|
46
|
+
finance;
|
|
44
47
|
recurrencePattern;
|
|
45
48
|
isPaid;
|
|
46
49
|
paymentMethod;
|
|
@@ -78,7 +81,11 @@ __decorate([
|
|
|
78
81
|
__decorate([
|
|
79
82
|
(0, typegoose_1.prop)({ required: true }),
|
|
80
83
|
__metadata("design:type", Date)
|
|
81
|
-
], ServiceOrder.prototype, "
|
|
84
|
+
], ServiceOrder.prototype, "timeFrom", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typegoose_1.prop)({ required: true }),
|
|
87
|
+
__metadata("design:type", Date)
|
|
88
|
+
], ServiceOrder.prototype, "timeTo", void 0);
|
|
82
89
|
__decorate([
|
|
83
90
|
(0, typegoose_1.prop)({ type: Number }),
|
|
84
91
|
__metadata("design:type", Number)
|
|
@@ -127,6 +134,10 @@ __decorate([
|
|
|
127
134
|
(0, typegoose_1.prop)(),
|
|
128
135
|
__metadata("design:type", Date)
|
|
129
136
|
], ServiceOrder.prototype, "overdueAt", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, typegoose_1.prop)({ required: true, type: service_order_finance_model_1.ServiceOrderFinance }),
|
|
139
|
+
__metadata("design:type", service_order_finance_model_1.ServiceOrderFinance)
|
|
140
|
+
], ServiceOrder.prototype, "finance", void 0);
|
|
130
141
|
__decorate([
|
|
131
142
|
(0, typegoose_1.prop)({ enum: enum_1.OrderRecurrencePattern, default: enum_1.OrderRecurrencePattern.ONETIME }),
|
|
132
143
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,6CAAoC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GAAG,EAAE,CAAC,2CAAgB,EAAE,CAAC;8BACzB,2CAAgB;0CAAA;AAGvB;IADN,IAAA,gBAAI,GAAE;8BACc,IAAI;iDAAC;AAGnB;IADN,IAAA,gBAAI,GAAE;8BACkB,IAAI;qDAAC;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8CACC;AAGnB;IADN,IAAA,gBAAI,GAAE;8BACW,IAAI;8CAAC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;+CACE;AAGpB;IADN,IAAA,gBAAI,GAAE;8BACY,IAAI;+CAAC;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,iDAAmB,EAAE,CAAC;8BACnC,iDAAmB;6CAAA;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,6BAAsB,EAAE,OAAO,EAAE,6BAAsB,CAAC,OAAO,EAAE,CAAC;;uDAC/B;AAG1C;IADN,IAAA,gBAAI,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;4CACD;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,oBAAa,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACP;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,8CAAkB,EAAE,CAAC;8BACb,8CAAkB;wDAAC;uBA7EtC,YAAY;IALxB,IAAA,wBAAY,EAAC;QACV,aAAa,EAAE;YACX,UAAU,EAAE,cAAc;SAC7B;KACJ,CAAC;GACW,YAAY,CA+ExB","sourcesContent":["import { modelOptions, prop, Ref } from \"@typegoose/typegoose\";\nimport { User } from \"./user.model\";\nimport { Vendor } from \"./vendor.model\";\nimport { ServicePackage } from \"./service-package.model\";\nimport { OrderRecurrencePattern, PaymentMethod, ServiceOrderPriority, ServiceOrderStatus } from \"../../../utilities/enum\";\nimport { Professional } from \"./professional.model\";\nimport { ServiceTimer } from \"./embedded/service-timer.model\";\nimport { ServiceOrderFlag } from \"./embedded/service-order-flag.model\";\nimport { ServiceCart } from \"./service-cart.model\";\nimport { PaymentInformation } from \"./embedded/payment-infromation.model\";\nimport { ServiceOrderFinance } from \"./embedded/service-order-finance.model\";\n\n@modelOptions({\n schemaOptions: {\n collection: \"serviceOrder\"\n }\n})\nexport class ServiceOrder {\n @prop({ type: String, required: true, unique: true })\n public orderId!: string\n\n @prop({ ref: () => User, required: true })\n public user!: Ref<User>\n\n @prop({ ref: () => Vendor, required: true })\n public vendor!: Ref<Vendor>\n\n @prop({ ref: () => ServiceCart, required: true })\n public cart!: Ref<ServiceCart>\n\n @prop({ ref: () => ServicePackage, required: true })\n public package!: Ref<ServicePackage>\n\n @prop({ enum: ServiceOrderStatus, default: ServiceOrderStatus.PENDING })\n status!: ServiceOrderStatus\n\n @prop({ enum: ServiceOrderPriority, default: ServiceOrderPriority.NORMAL })\n public priority!: ServiceOrderPriority\n\n @prop({ required: true })\n public timeFrom!: Date\n\n @prop({ required: true })\n public timeTo!: Date\n\n @prop({ type: Number })\n public hoursRequired?: number;\n\n @prop({ type: String })\n public userNotes?: string;\n\n @prop({ type: String })\n public vendorNotes?: string;\n\n @prop({ ref: () => Professional })\n public assignedProfessional?: Ref<Professional>\n\n @prop({ type: () => ServiceTimer })\n public serviceTimer?: ServiceTimer\n\n @prop({ type: () => ServiceOrderFlag })\n public flag?: ServiceOrderFlag\n\n @prop()\n public confirmedAt?: Date;\n\n @prop()\n public autoConfirmedAt?: Date;\n\n @prop({ default: false })\n public isUrgent!: boolean;\n\n @prop()\n public urgentAt?: Date;\n\n @prop({ default: false })\n public isOverdue!: boolean;\n\n @prop()\n public overdueAt?: Date;\n\n @prop({required: true, type: ServiceOrderFinance })\n public finance: ServiceOrderFinance\n\n @prop({ enum: OrderRecurrencePattern, default: OrderRecurrencePattern.ONETIME })\n public recurrencePattern?: OrderRecurrencePattern\n\n @prop({ default: false })\n public isPaid!: boolean;\n\n @prop({ enum: PaymentMethod, type: String })\n public paymentMethod?: PaymentMethod;\n\n @prop({ type: () => PaymentInformation })\n public paymentInformation?: PaymentInformation;\n\n}"]}
|
|
@@ -15,7 +15,7 @@ const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
|
15
15
|
const enum_1 = require("../../../utilities/enum");
|
|
16
16
|
const parent_model_1 = require("./parent.model");
|
|
17
17
|
const shop_model_1 = require("./shop.model");
|
|
18
|
-
const password_1 = require("../../../utilities/
|
|
18
|
+
const password_1 = require("../../../utilities/password");
|
|
19
19
|
let ShopAccessControl = class ShopAccessControl extends defaultClasses_1.TimeStamps {
|
|
20
20
|
name;
|
|
21
21
|
email;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop-access-control.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shop-access-control.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AAErE,kDAAmD;AACnD,iDAAwC;AACxC,6CAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"shop-access-control.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shop-access-control.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AAErE,kDAAmD;AACnD,iDAAwC;AACxC,6CAAoC;AACpC,0DAA2D;AAkBpD,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,2BAAU;IAEzC,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,QAAQ,CAAU;IAGlB,MAAM,CAAe;IAGrB,KAAK,CAAe;IAGpB,IAAI,CAAY;CACvB,CAAA;AAlBY,8CAAiB;AAEtB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;;+CACjC;AAGd;IADN,IAAA,gBAA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AC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;IACnF,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,oBAAoB,EAAE,EAAE,CAAC;GACzD,iBAAiB,CAkB7B","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Query } from 'mongoose';\nimport { ShopRole } from '../../../utilities/enum';\nimport { Parent } from './parent.model';\nimport { Shop } from './shop.model';\nimport { hashPassword } from '../../../utilities/password';\n\n@pre<ShopAccessControl>('save', async function (next) {\n\tif (this.isModified('password')) {\n\t\tthis.password = await hashPassword(this.password);\n\t}\n\tnext();\n})\n@pre<Query<any, ShopAccessControl>>('findOneAndUpdate', async function (next) {\n\tconst update = this.getUpdate() as Record<string, any>;\n\tif (update?.password) {\n\t\tupdate.password = await hashPassword(update.password);\n\t\tthis.setUpdate(update);\n\t}\n\tnext();\n})\n@index({ email: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\n@modelOptions({ schemaOptions: { collection: 'shopAccessControls' } })\nexport class ShopAccessControl extends TimeStamps {\n\t@prop({ required: true, type: String, maxlength: 50 })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic email!: string;\n\n\t@prop({ required: true, type: String, minlength: 8 })\n\tpublic password!: string;\n\n\t@prop({ required: true, ref: () => Parent })\n\tpublic parent?: Ref<Parent>;\n\n\t@prop({ ref: () => Shop, default: [] })\n\tpublic shops?: Ref<Shop>[];\n\n\t@prop({ required: true, type: String, enum: ShopRole })\n\tpublic role!: ShopRole;\n}\n"]}
|
|
@@ -14,7 +14,7 @@ const typegoose_1 = require("@typegoose/typegoose");
|
|
|
14
14
|
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
15
|
const vendor_model_1 = require("./vendor.model");
|
|
16
16
|
const enum_1 = require("../../../utilities/enum");
|
|
17
|
-
const password_1 = require("../../../utilities/
|
|
17
|
+
const password_1 = require("../../../utilities/password");
|
|
18
18
|
const service_parent_model_1 = require("./service-parent.model");
|
|
19
19
|
let VendorAccessControl = class VendorAccessControl extends defaultClasses_1.TimeStamps {
|
|
20
20
|
name;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendor-access-control.model.js","sourceRoot":"/","sources":["libraries/mongo/models/vendor-access-control.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AACrE,iDAAwC;AACxC,kDAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"vendor-access-control.model.js","sourceRoot":"/","sources":["libraries/mongo/models/vendor-access-control.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AACrE,iDAAwC;AACxC,kDAAqD;AACrD,0DAA2D;AAE3D,iEAAuD;AAkBhD,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,2BAAU;IAExC,IAAI,CAAS;IAGb,KAAK,CAAS;IAGd,QAAQ,CAAS;IAGjB,MAAM,CAAqB;IAG3B,OAAO,CAAgB;IAGvB,IAAI,CAAa;CAC3B,CAAA;AAlBY,kDAAmB;AAErB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAC,CAAC;;iDACjC;AAGb;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDAClB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;;qDAC7B;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,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ps } from \"@typegoose/typegoose/lib/defaultClasses\";\nimport { Vendor } from \"./vendor.model\";\nimport { VendorRole } from \"../../../utilities/enum\";\nimport { hashPassword } from \"../../../utilities/password\";\nimport { Query } from \"mongoose\";\nimport { ServiceParent } from \"./service-parent.model\";\n\n@pre<VendorAccessControl>('save', async function (next) {\n if (this.isModified('password')) {\n this.password = await hashPassword(this.password)\n }\n next()\n})\n@pre<Query<any, VendorAccessControl>>('findOneAndUpdate', async function (next) {\n const update = this.getUpdate() as Record<string, any>\n if(update?.password) {\n update.password = await hashPassword(update.password)\n this.setUpdate(update)\n }\n next()\n})\n@index({ email: 1 }, { unique: true, partialFilterExpression: { deletedAt: null }})\n@modelOptions({ schemaOptions: { collection: 'vendorAccessControls'}})\nexport class VendorAccessControl extends TimeStamps {\n @prop({ required: true, type: String, maxlength: 50})\n public name!: string\n\n @prop({ required: true, type: String })\n public email!: string\n\n @prop({ required: true, type: String, minlength: 8 })\n public password!: string\n\n @prop({ required: true, ref: () => ServiceParent })\n public parent?: Ref<ServiceParent>\n\n @prop({ ref: () => Vendor, default: []})\n public vendors?: Ref<Vendor>[]\n\n @prop({ required: true, type: String, enum: VendorRole }) \n public role!: VendorRole\n}"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mongoose } from "@typegoose/typegoose";
|
|
2
|
-
import { AdminLogsUpdatedFieldsType } from "
|
|
2
|
+
import { AdminLogsUpdatedFieldsType } from "./enum";
|
|
3
3
|
export declare function getChangedFields<T extends Record<string, any>>(oldDoc: T, newDoc: T, payload?: Partial<T>): Record<keyof T, {
|
|
4
4
|
old: any;
|
|
5
5
|
new: any;
|
|
@@ -5,9 +5,9 @@ exports.filterRelevantChanges = filterRelevantChanges;
|
|
|
5
5
|
exports.extractChangedDocument = extractChangedDocument;
|
|
6
6
|
exports.publishAdminLogsEvent = publishAdminLogsEvent;
|
|
7
7
|
exports.publishShopActiveBatchProcessEvent = publishShopActiveBatchProcessEvent;
|
|
8
|
-
const event_1 = require("
|
|
9
|
-
const admin_logs_event_1 = require("
|
|
10
|
-
const shop_active_timings_batch_process_event_1 = require("
|
|
8
|
+
const event_1 = require("../libraries/event");
|
|
9
|
+
const admin_logs_event_1 = require("../libraries/event/events/admin-logs-event");
|
|
10
|
+
const shop_active_timings_batch_process_event_1 = require("../libraries/event/events/shop-active-timings-batch-process-event");
|
|
11
11
|
function getChangedFields(oldDoc, newDoc, payload) {
|
|
12
12
|
const changes = {};
|
|
13
13
|
const oldObj = typeof oldDoc.toObject === 'function' ? oldDoc.toObject() : oldDoc;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events-common-methods.js","sourceRoot":"/","sources":["utilities/events-common-methods.ts"],"names":[],"mappings":";;AAUA,4CAwBC;AAMD,sDAUC;AAKD,wDAOC;AAED,sDAcC;AAED,gFAGC;AAlFD,8CAAkD;AAElD,iFAAoF;AAEpF,+HAAuH;AAKvH,SAAgB,gBAAgB,CAC/B,MAAS,EACT,MAAS,EACT,OAAoB;IAEpB,MAAM,OAAO,GAAG,EAA6C,CAAC;IAE9D,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;IAClF,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;IAElF,MAAM,WAAW,GAAG,OAAO;QAC1B,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;QACtB,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC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B,CAAC;QAC7F,KAAK,EAAE,KAAK;QACZ,YAAY,EAAE,YAAY;QAC1B,WAAW,EAAE,MAAM;QACnB,WAAW,EAAE,MAAM;KACnB,CAAC,CAAC;IACH,MAAM,IAAA,oBAAY,EAAC,sBAAsB,CAAC,CAAC;AAC5C,CAAC;AAEM,KAAK,UAAU,kCAAkC;IACvD,MAAM,kCAAkC,GAAuC,IAAI,4EAAkC,CAAC,EAAE,CAAC,CAAC;IAC1H,MAAM,IAAA,oBAAY,EAAC,kCAAkC,CAAC,CAAC;AACxD,CAAC","sourcesContent":["import { mongoose } from \"@typegoose/typegoose\";\nimport { publishEvent } from \"../libraries/event\";\nimport { BaseEvent } from \"../libraries/event/BaseEvent\";\nimport { AdminActivityLogsEvent } from \"../libraries/event/events/admin-logs-event\";\nimport { AdminLogsUpdatedFieldsType } from \"./enum\";\nimport { ShopActiveTimingsBatchProcessEvent } from \"../libraries/event/events/shop-active-timings-batch-process-event\";\n\n/**\n\t * Returns changed fields between two objects (shallow comparison).\n\t */\nexport function getChangedFields<T extends Record<string, any>>(\n\toldDoc: T,\n\tnewDoc: T,\n\tpayload?: Partial<T>\n): Record<keyof T, { old: any; new: any }> {\n\tconst changes = {} as Record<keyof T, { old: any; new: any }>;\n\n\tconst oldObj = typeof oldDoc.toObject === 'function' ? oldDoc.toObject() : oldDoc;\n\tconst newObj = typeof newDoc.toObject === 'function' ? newDoc.toObject() : newDoc;\n\n\tconst keysToCheck = payload\n\t\t? Object.keys(payload)\n\t\t: Array.from(new Set([...Object.keys(oldObj), ...Object.keys(newObj)]));\n\n\tfor (const key of keysToCheck) {\n\t\tconst oldValue = oldObj[key];\n\t\tconst newValue = newObj[key];\n\n\t\tif (payload || JSON.stringify(oldValue) !== JSON.stringify(newValue)) {\n\t\t\tchanges[key as keyof T] = { old: oldValue, new: newValue };\n\t\t}\n\t}\n\n\treturn changes;\n}\n\n\n/**\n * Filters changed fields to only those that exist in the payload.\n */\nexport function filterRelevantChanges<T>(\n\tallChanges: Record<string, { old: any; new: any }>,\n\tpayload: Partial<T>\n): Record<string, { old: any; new: any }> {\n\treturn Object.keys(payload).reduce((acc, key) => {\n\t\tif (allChanges[key]) {\n\t\t\tacc[key] = allChanges[key];\n\t\t}\n\t\treturn acc;\n\t}, {} as Record<string, { old: any; new: any }>);\n}\n\n/**\n * Extracts either 'old' or 'new' values from the changes object.\n */\nexport function extractChangedDocument(\n\tchanges: Record<string, { old: any; new: any }>,\n\ttype: 'old' | 'new'\n): Record<string, any> {\n\treturn Object.fromEntries(\n\t\tObject.entries(changes).map(([key, value]) => [key, value[type]])\n\t);\n}\n\nexport async function publishAdminLogsEvent(payload: {\n\tadmin: mongoose.Types.ObjectId;\n\tupdatedField: AdminLogsUpdatedFieldsType;\n\toldDoc: any;\n\tnewDoc: any;\n}) {\n\tconst { admin, updatedField, oldDoc, newDoc } = payload;\n\tconst adminActivityLogsEvent: BaseEvent<Record<string, unknown>> = new AdminActivityLogsEvent({\n\t\tadmin: admin,\n\t\tupdatedField: updatedField,\n\t\toldDocument: oldDoc,\n\t\tnewDocument: newDoc,\n\t});\n\tawait publishEvent(adminActivityLogsEvent);\n}\n\nexport async function publishShopActiveBatchProcessEvent() {\n\tconst shopActiveTimingsBatchProcessEvent: BaseEvent<Record<string, unknown>> = new ShopActiveTimingsBatchProcessEvent({});\n\tawait publishEvent(shopActiveTimingsBatchProcessEvent);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password.js","sourceRoot":"/","sources":["utilities/password.ts"],"names":[],"mappings":";;;;;AAGA,oCAGC;AAED,wCAQC;AAhBD,yCAAyC;AACzC,wDAA8B;AAEvB,KAAK,UAAU,YAAY,CAAC,QAAgB;IAClD,MAAM,IAAI,GAAG,MAAM,kBAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACtC,OAAO,kBAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AAEM,KAAK,UAAU,cAAc,CAAC,aAAqB,EAAE,cAAsB;IACjF,MAAM,eAAe,GAAG,MAAM,kBAAM,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IAC5E,IAAI,CAAC,eAAe,EAAE,CAAC;QACtB,MAAM,IAAI,kBAAS,CAAC;YACnB,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,8BAA8B;SACvC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC","sourcesContent":["import { TRPCError } from '@trpc/server';\nimport bcrypt from 'bcryptjs';\n\nexport async function hashPassword(password: string): Promise<string> {\n\tconst salt = await bcrypt.genSalt(10);\n\treturn bcrypt.hash(password, salt);\n}\n\nexport async function verifyPassword(inputPassword: string, hashedPassword: string) {\n\tconst isPasswordValid = await bcrypt.compare(inputPassword, hashedPassword);\n\tif (!isPasswordValid) {\n\t\tthrow new TRPCError({\n\t\t\tcode: 'UNAUTHORIZED',\n\t\t\tmessage: 'Incorrect email or password.',\n\t\t});\n\t}\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const phoneNumberLengthMap: Record<string, number | {
|
|
3
|
+
min: number;
|
|
4
|
+
max: number;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const PhoneNumberSchema: (countryCode: keyof typeof phoneNumberLengthMap, countryName: string, fieldName: string) => z.ZodEffects<z.ZodString, string, string>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PhoneNumberSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const allowedPhoneCharsRegex = /^[\d\s()+-]+$/;
|
|
6
|
+
const phoneNumberLengthMap = {
|
|
7
|
+
US: 10,
|
|
8
|
+
BD: 11,
|
|
9
|
+
UK: 10,
|
|
10
|
+
LB: { min: 4, max: 8 },
|
|
11
|
+
};
|
|
12
|
+
const PhoneNumberSchema = (countryCode, countryName, fieldName) => zod_1.z
|
|
13
|
+
.string({
|
|
14
|
+
required_error: `${fieldName} is required. Please enter a valid phone number.`,
|
|
15
|
+
invalid_type_error: `${fieldName} must be a string.`,
|
|
16
|
+
})
|
|
17
|
+
.min(1, {
|
|
18
|
+
message: `${fieldName} is required. Please enter a valid phone number.`,
|
|
19
|
+
})
|
|
20
|
+
.regex(allowedPhoneCharsRegex, {
|
|
21
|
+
message: `${fieldName} must only contain digits, spaces, and allowed symbols like +, -, (, )`,
|
|
22
|
+
})
|
|
23
|
+
.refine((val) => {
|
|
24
|
+
const digitsOnly = val.replace(/\D/g, '');
|
|
25
|
+
const expected = phoneNumberLengthMap[countryCode];
|
|
26
|
+
if (typeof expected === 'number') {
|
|
27
|
+
return digitsOnly.length === expected;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return digitsOnly.length >= expected.min && digitsOnly.length <= expected.max;
|
|
31
|
+
}
|
|
32
|
+
}, {
|
|
33
|
+
message: (() => {
|
|
34
|
+
const expected = phoneNumberLengthMap[countryCode];
|
|
35
|
+
if (typeof expected === 'number') {
|
|
36
|
+
return `Invalid ${fieldName} length. For ${countryName}, the phone number must contain ${expected} digits. Please correct your input.`;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
return `Invalid ${fieldName} length. For ${countryName}, the phone number must contain between ${expected.min} and ${expected.max} digits. Please correct your input.`;
|
|
40
|
+
}
|
|
41
|
+
})(),
|
|
42
|
+
});
|
|
43
|
+
exports.PhoneNumberSchema = PhoneNumberSchema;
|
|
44
|
+
//# sourceMappingURL=phone-number-validations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-number-validations.js","sourceRoot":"/","sources":["utilities/phone-number-validations.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,sBAAsB,GAAG,eAAe,CAAC;AAE/C,MAAM,oBAAoB,GAA0D;IACnF,EAAE,EAAE,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G,QAAQ,QAAQ,CAAC,GAAG,qCAAqC,CAAC;QACxK,CAAC;IACF,CAAC,CAAC,EAAE;CACJ,CAAC,CAAC;AA9BQ,QAAA,iBAAiB,qBA8BzB","sourcesContent":["import { z } from 'zod';\n\nconst allowedPhoneCharsRegex = /^[\\d\\s()+-]+$/;\n\nconst phoneNumberLengthMap: Record<string, number | { min: number; max: number }> = {\n\tUS: 10,\n\tBD: 11,\n\tUK: 10,\n\tLB: { min: 4, max: 8 },\n};\n\nexport const PhoneNumberSchema = (countryCode: keyof typeof phoneNumberLengthMap, countryName: string, fieldName: string) =>\n\tz\n\t\t.string({\n\t\t\trequired_error: `${fieldName} is required. Please enter a valid phone number.`,\n\t\t\tinvalid_type_error: `${fieldName} must be a string.`,\n\t\t})\n\t\t.min(1, {\n\t\t\tmessage: `${fieldName} is required. Please enter a valid phone number.`,\n\t\t})\n\t\t.regex(allowedPhoneCharsRegex, {\n\t\t\tmessage:\n\t\t\t\t`${fieldName} must only contain digits, spaces, and allowed symbols like +, -, (, )`,\n\t\t})\n\t\t.refine((val) => {\n\t\t\tconst digitsOnly = val.replace(/\\D/g, '');\n\t\t\tconst expected = phoneNumberLengthMap[countryCode];\n\t\t\tif (typeof expected === 'number') {\n\t\t\t\treturn digitsOnly.length === expected;\n\t\t\t} else {\n\t\t\t\treturn digitsOnly.length >= expected.min && digitsOnly.length <= expected.max;\n\t\t\t}\n\t\t}, {\n\t\t\tmessage: (() => {\n\t\t\t\tconst expected = phoneNumberLengthMap[countryCode];\n\t\t\t\tif (typeof expected === 'number') {\n\t\t\t\t\treturn `Invalid ${fieldName} length. For ${countryName}, the phone number must contain ${expected} digits. Please correct your input.`;\n\t\t\t\t} else {\n\t\t\t\t\treturn `Invalid ${fieldName} length. For ${countryName}, the phone number must contain between ${expected.min} and ${expected.max} digits. Please correct your input.`;\n\t\t\t\t}\n\t\t\t})(),\n\t\t});"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShopUrlValdiations = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const ShopUrlValdiations = (fieldName) => zod_1.z
|
|
6
|
+
.string({ required_error: `${fieldName} is required.` })
|
|
7
|
+
.url(`${fieldName} must be a valid URL.`)
|
|
8
|
+
.refine((url) => {
|
|
9
|
+
try {
|
|
10
|
+
const parsed = new URL(url);
|
|
11
|
+
return /\.[a-z]{2,}$/i.test(parsed.hostname);
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
}, {
|
|
17
|
+
message: `${fieldName} must be a valid URL with a proper domain (e.g., .com, .net).`,
|
|
18
|
+
});
|
|
19
|
+
exports.ShopUrlValdiations = ShopUrlValdiations;
|
|
20
|
+
//# sourceMappingURL=url-validations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-validations.js","sourceRoot":"/","sources":["utilities/url-validations.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEjB,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAE,EAAE,CACvD,OAAC;KACC,MAAM,CAAC,EAAE,cAAc,EAAE,GAAG,SAAS,eAAe,EAAE,CAAC;KACvD,GAAG,CAAC,GAAG,SAAS,uBAAuB,CAAC;KACxC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE;IACf,IAAI,CAAC;QACJ,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5B,OAAO,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAC;IACd,CAAC;AACF,CAAC,EAAE;IACF,OAAO,EAAE,GAAG,SAAS,+DAA+D;CACpF,CAAC,CAAC;AAbQ,QAAA,kBAAkB,sBAa1B","sourcesContent":["import { z } from 'zod';\n\nexport const ShopUrlValdiations = (fieldName: string) =>\n\tz\n\t\t.string({ required_error: `${fieldName} is required.` })\n\t\t.url(`${fieldName} must be a valid URL.`)\n\t\t.refine((url) => {\n\t\t\ttry {\n\t\t\t\tconst parsed = new URL(url);\n\t\t\t\treturn /\\.[a-z]{2,}$/i.test(parsed.hostname); // ensures domain has a TLD like .com, .net, etc.\n\t\t\t} catch {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}, {\n\t\t\tmessage: `${fieldName} must be a valid URL with a proper domain (e.g., .com, .net).`,\n\t\t});"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"week.js","sourceRoot":"/","sources":["utilities/week.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACzD,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CACzF,CAAC","sourcesContent":["export const daysOfWeek = Array.from({ length: 7 }, (_, i) =>\n new Intl.DateTimeFormat('en-US', { weekday: 'long' }).format(new Date(1970, 0, 4 + i))\n);"]}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events-common-methods.js","sourceRoot":"/","sources":["utilities/common/events-common-methods.ts"],"names":[],"mappings":";;AAUA,4CAwBC;AAMD,sDAUC;AAKD,wDAOC;AAED,sDAcC;AAED,gFAGC;AAlFD,iDAAqD;AAErD,oFAAuF;AAEvF,kIAA0H;AAK1H,SAAgB,gBAAgB,CAC/B,MAAS,EACT,MAAS,EACT,OAAoB;IAEpB,MAAM,OAAO,GAAG,EAA6C,CAAC;IAE9D,MAAM,MAAM,GAAG,OAAO,MAAM,CAA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AAC;IACZ,CAAC,EAAE,EAA4C,CAAC,CAAC;AAClD,CAAC;AAKD,SAAgB,sBAAsB,CACrC,OAA+C,EAC/C,IAAmB;IAEnB,OAAO,MAAM,CAAC,WAAW,CACxB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CACjE,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,qBAAqB,CAAC,OAK3C;IACA,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IACxD,MAAM,sBAAsB,GAAuC,IAAI,yCAAsB,CAAC;QAC7F,KAAK,EAAE,KAAK;QACZ,YAAY,EAAE,YAAY;QAC1B,WAAW,EAAE,MAAM;QACnB,WAAW,EAAE,MAAM;KACnB,CAAC,CAAC;IACH,MAAM,IAAA,oBAAY,EAAC,sBAAsB,CAAC,CAAC;AAC5C,CAAC;AAEM,KAAK,UAAU,kCAAkC;IACvD,MAAM,kCAAkC,GAAuC,IAAI,4EAAkC,CAAC,EAAE,CAAC,CAAC;IAC1H,MAAM,IAAA,oBAAY,EAAC,kCAAkC,CAAC,CAAC;AACxD,CAAC","sourcesContent":["import { mongoose } from \"@typegoose/typegoose\";\nimport { publishEvent } from \"../../libraries/event\";\nimport { BaseEvent } from \"../../libraries/event/BaseEvent\";\nimport { AdminActivityLogsEvent } from \"../../libraries/event/events/admin-logs-event\";\nimport { AdminLogsUpdatedFieldsType } from \"../enum\";\nimport { ShopActiveTimingsBatchProcessEvent } from \"../../libraries/event/events/shop-active-timings-batch-process-event\";\n\n/**\n\t * Returns changed fields between two objects (shallow comparison).\n\t */\nexport function getChangedFields<T extends Record<string, any>>(\n\toldDoc: T,\n\tnewDoc: T,\n\tpayload?: Partial<T>\n): Record<keyof T, { old: any; new: any }> {\n\tconst changes = {} as Record<keyof T, { old: any; new: any }>;\n\n\tconst oldObj = typeof oldDoc.toObject === 'function' ? oldDoc.toObject() : oldDoc;\n\tconst newObj = typeof newDoc.toObject === 'function' ? newDoc.toObject() : newDoc;\n\n\tconst keysToCheck = payload\n\t\t? Object.keys(payload)\n\t\t: Array.from(new Set([...Object.keys(oldObj), ...Object.keys(newObj)]));\n\n\tfor (const key of keysToCheck) {\n\t\tconst oldValue = oldObj[key];\n\t\tconst newValue = newObj[key];\n\n\t\tif (payload || JSON.stringify(oldValue) !== JSON.stringify(newValue)) {\n\t\t\tchanges[key as keyof T] = { old: oldValue, new: newValue };\n\t\t}\n\t}\n\n\treturn changes;\n}\n\n\n/**\n * Filters changed fields to only those that exist in the payload.\n */\nexport function filterRelevantChanges<T>(\n\tallChanges: Record<string, { old: any; new: any }>,\n\tpayload: Partial<T>\n): Record<string, { old: any; new: any }> {\n\treturn Object.keys(payload).reduce((acc, key) => {\n\t\tif (allChanges[key]) {\n\t\t\tacc[key] = allChanges[key];\n\t\t}\n\t\treturn acc;\n\t}, {} as Record<string, { old: any; new: any }>);\n}\n\n/**\n * Extracts either 'old' or 'new' values from the changes object.\n */\nexport function extractChangedDocument(\n\tchanges: Record<string, { old: any; new: any }>,\n\ttype: 'old' | 'new'\n): Record<string, any> {\n\treturn Object.fromEntries(\n\t\tObject.entries(changes).map(([key, value]) => [key, value[type]])\n\t);\n}\n\nexport async function publishAdminLogsEvent(payload: {\n\tadmin: mongoose.Types.ObjectId;\n\tupdatedField: AdminLogsUpdatedFieldsType;\n\toldDoc: any;\n\tnewDoc: any;\n}) {\n\tconst { admin, updatedField, oldDoc, newDoc } = payload;\n\tconst adminActivityLogsEvent: BaseEvent<Record<string, unknown>> = new AdminActivityLogsEvent({\n\t\tadmin: admin,\n\t\tupdatedField: updatedField,\n\t\toldDocument: oldDoc,\n\t\tnewDocument: newDoc,\n\t});\n\tawait publishEvent(adminActivityLogsEvent);\n}\n\nexport async function publishShopActiveBatchProcessEvent() {\n\tconst shopActiveTimingsBatchProcessEvent: BaseEvent<Record<string, unknown>> = new ShopActiveTimingsBatchProcessEvent({});\n\tawait publishEvent(shopActiveTimingsBatchProcessEvent);\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"password.js","sourceRoot":"/","sources":["utilities/common/password.ts"],"names":[],"mappings":";;;;;AAGA,oCAGC;AAED,wCAQC;AAhBD,yCAAyC;AACzC,wDAA8B;AAEvB,KAAK,UAAU,YAAY,CAAC,QAAgB;IAClD,MAAM,IAAI,GAAG,MAAM,kBAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACtC,OAAO,kBAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AAEM,KAAK,UAAU,cAAc,CAAC,aAAqB,EAAE,cAAsB;IACjF,MAAM,eAAe,GAAG,MAAM,kBAAM,CAAC,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IAC5E,IAAI,CAAC,eAAe,EAAE,CAAC;QACtB,MAAM,IAAI,kBAAS,CAAC;YACnB,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,8BAA8B;SACvC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC","sourcesContent":["import { TRPCError } from '@trpc/server';\nimport bcrypt from 'bcryptjs';\n\nexport async function hashPassword(password: string): Promise<string> {\n\tconst salt = await bcrypt.genSalt(10);\n\treturn bcrypt.hash(password, salt);\n}\n\nexport async function verifyPassword(inputPassword: string, hashedPassword: string) {\n\tconst isPasswordValid = await bcrypt.compare(inputPassword, hashedPassword);\n\tif (!isPasswordValid) {\n\t\tthrow new TRPCError({\n\t\t\tcode: 'UNAUTHORIZED',\n\t\t\tmessage: 'Incorrect email or password.',\n\t\t});\n\t}\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"week.js","sourceRoot":"/","sources":["utilities/common/week.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACzD,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CACzF,CAAC","sourcesContent":["export const daysOfWeek = Array.from({ length: 7 }, (_, i) =>\n new Intl.DateTimeFormat('en-US', { weekday: 'long' }).format(new Date(1970, 0, 4 + i))\n);"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|