@lyxa.ai/core 1.4.305-alpha.1 → 1.4.305
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-line-item.model.d.ts +6 -4
- package/dist/libraries/mongo/models/embedded/service-line-item.model.js +18 -8
- package/dist/libraries/mongo/models/embedded/service-line-item.model.js.map +1 -1
- package/dist/libraries/mongo/models/service-booking.model.d.ts +1 -0
- package/dist/libraries/mongo/models/service-booking.model.js +5 -0
- package/dist/libraries/mongo/models/service-booking.model.js.map +1 -1
- package/dist/libraries/socket/events/chatlist-message-send.socket.event.d.ts +24 -24
- package/dist/libraries/socket/events/chatroom-message-send.socket.event.d.ts +70 -70
- package/dist/libraries/socket/events/order-actions.socket.event.d.ts +70 -70
- package/dist/libraries/socket/events/rider-location-update.socket.event.d.ts +8 -8
- package/dist/libraries/socket/events/ticket-actions.socket.event.d.ts +13 -13
- package/dist/libraries/socket/events/ticket-assign.socket.event.d.ts +16 -16
- package/dist/libraries/trpc/middlewares/auth.js +0 -2
- package/dist/libraries/trpc/middlewares/auth.js.map +1 -1
- package/dist/libraries/trpc/middlewares/publicUserDecoder.d.ts +2 -2
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/dist/types/utilities/validation/common-validation.d.ts +12 -12
- package/dist/utilities/pagination.d.ts +3 -3
- package/dist/utilities/validation/common-validation.d.ts +72 -72
- package/package.json +1 -1
|
@@ -28,11 +28,13 @@ export declare class ServiceLineItem {
|
|
|
28
28
|
price: number;
|
|
29
29
|
quantity: number;
|
|
30
30
|
lineItemSnap?: LineItemSnap;
|
|
31
|
+
totalPrice?: number;
|
|
31
32
|
secondaryPrice?: number;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
totalSecondaryPrice?: number;
|
|
34
|
+
totalDiscountedPrice?: number;
|
|
35
|
+
totalSecondaryDiscountedPrice?: number;
|
|
36
|
+
totalDiscountAmount?: number;
|
|
37
|
+
totalSecondaryDiscountAmount?: number;
|
|
36
38
|
promotionSnaps?: PromotionSnap[];
|
|
37
39
|
discount?: ServicePromotionCut;
|
|
38
40
|
}
|
|
@@ -90,11 +90,13 @@ class ServiceLineItem {
|
|
|
90
90
|
price;
|
|
91
91
|
quantity;
|
|
92
92
|
lineItemSnap;
|
|
93
|
+
totalPrice;
|
|
93
94
|
secondaryPrice;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
totalSecondaryPrice;
|
|
96
|
+
totalDiscountedPrice;
|
|
97
|
+
totalSecondaryDiscountedPrice;
|
|
98
|
+
totalDiscountAmount;
|
|
99
|
+
totalSecondaryDiscountAmount;
|
|
98
100
|
promotionSnaps;
|
|
99
101
|
discount;
|
|
100
102
|
}
|
|
@@ -123,6 +125,10 @@ __decorate([
|
|
|
123
125
|
(0, typegoose_1.prop)({ type: LineItemSnap, _id: false }),
|
|
124
126
|
__metadata("design:type", LineItemSnap)
|
|
125
127
|
], ServiceLineItem.prototype, "lineItemSnap", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, typegoose_1.prop)({ type: Number }),
|
|
130
|
+
__metadata("design:type", Number)
|
|
131
|
+
], ServiceLineItem.prototype, "totalPrice", void 0);
|
|
126
132
|
__decorate([
|
|
127
133
|
(0, typegoose_1.prop)({ type: Number }),
|
|
128
134
|
__metadata("design:type", Number)
|
|
@@ -130,19 +136,23 @@ __decorate([
|
|
|
130
136
|
__decorate([
|
|
131
137
|
(0, typegoose_1.prop)({ type: Number }),
|
|
132
138
|
__metadata("design:type", Number)
|
|
133
|
-
], ServiceLineItem.prototype, "
|
|
139
|
+
], ServiceLineItem.prototype, "totalSecondaryPrice", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, typegoose_1.prop)({ type: Number }),
|
|
142
|
+
__metadata("design:type", Number)
|
|
143
|
+
], ServiceLineItem.prototype, "totalDiscountedPrice", void 0);
|
|
134
144
|
__decorate([
|
|
135
145
|
(0, typegoose_1.prop)({ type: Number }),
|
|
136
146
|
__metadata("design:type", Number)
|
|
137
|
-
], ServiceLineItem.prototype, "
|
|
147
|
+
], ServiceLineItem.prototype, "totalSecondaryDiscountedPrice", void 0);
|
|
138
148
|
__decorate([
|
|
139
149
|
(0, typegoose_1.prop)({ type: Number }),
|
|
140
150
|
__metadata("design:type", Number)
|
|
141
|
-
], ServiceLineItem.prototype, "
|
|
151
|
+
], ServiceLineItem.prototype, "totalDiscountAmount", void 0);
|
|
142
152
|
__decorate([
|
|
143
153
|
(0, typegoose_1.prop)({ type: Number }),
|
|
144
154
|
__metadata("design:type", Number)
|
|
145
|
-
], ServiceLineItem.prototype, "
|
|
155
|
+
], ServiceLineItem.prototype, "totalSecondaryDiscountAmount", void 0);
|
|
146
156
|
__decorate([
|
|
147
157
|
(0, typegoose_1.prop)({ type: [PromotionSnap], _id: false }),
|
|
148
158
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-line-item.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/service-line-item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAA4E;AAC5E,oEAA0D;AAC1D,gEAAsD;AACtD,iEAAuD;AACvD,wEAA8D;AAC9D,+DAA4D;AAE5D,MAAa,YAAY;IAEjB,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,WAAW,CAAU;IAGrB,QAAQ,CAAiB;IAGzB,YAAY,CAAU;IAGtB,qBAAqB,CAAU;CACtC;AAlBD,oCAkBC;AAhBO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0CACF;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CACD;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACK;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,oCAAa,EAAE,CAAC;8BACZ,oCAAa;8CAAC;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDACM;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2DACe;AAGvC,MAAa,aAAa;IAElB,gBAAgB,CAAyB;IAGzC,kBAAkB,CAAW;IAG7B,4BAA4B,CAAW;IAGvC,mBAAmB,CAAU;IAG7B,SAAS,CAAa;IAGtB,KAAK,CAAU;CACtB;AAlBD,sCAkBC;AAhBO;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,0CAAgB,EAAE,CAAC;;uDACU;AAGzC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;yDACY;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;mEACM;AAGvC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0DACa;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAS,EAAE,OAAO,EAAE,gBAAS,CAAC,UAAU,EAAE,CAAC;;gDAC1C;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CACD;AAevB,MAAa,eAAe;IAEpB,YAAY,CAAuB;IAGnC,cAAc,CAAuB;IAGrC,KAAK,CAAqB;IAG1B,KAAK,CAAU;IAGf,QAAQ,CAAU;IAIlB,YAAY,CAAgB;IAG5B,cAAc,CAAU;IAGxB,
|
|
1
|
+
{"version":3,"file":"service-line-item.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/service-line-item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDA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,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACI;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDACQ;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4DACa;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6DACc;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sEACuB;AAGvC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4DACa;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qEACsB;AAGtC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,CAAC,aAAa,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;;uDACJ;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,yCAAmB,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;8BACpC,yCAAmB;iDAAC","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { ServiceLineItemType, ValueType } from '../../../../utilities/enum';\nimport { ServicePackage } from '../service-package.model';\nimport { ServiceAddon } from '../service-addon.model';\nimport { PreparingTime } from './preparing-time.model';\nimport { ServicePromotion } from '../service-promotion.model';\nimport { ServicePromotionCut } from './marketing-cut.model';\n\nexport class LineItemSnap {\n\t@prop({ type: String })\n\tpublic name?: string;\n\n\t@prop({ type: String })\n\tpublic image?: string;\n\n\t@prop({ type: String })\n\tpublic description?: string;\n\n\t@prop({ type: PreparingTime })\n\tpublic duration?: PreparingTime;\n\n\t@prop({ type: Number })\n\tpublic materialCost?: number;\n\n\t@prop({ type: Number })\n\tpublic secondaryMaterialCost?: number;\n}\n\nexport class PromotionSnap {\n\t@prop({ ref: () => ServicePromotion })\n\tpublic servicePromotion?: Ref<ServicePromotion>;\n\n\t@prop({ type: Boolean })\n\tpublic isAppliedByCompany?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isMaxDiscountPerOrderEnabled?: boolean;\n\n\t@prop({ type: Number })\n\tpublic maxDiscountPerOrder?: number;\n\n\t@prop({ type: String, enum: ValueType, default: ValueType.PERCENTAGE })\n\tpublic valueType?: ValueType;\n\n\t@prop({ type: Number })\n\tpublic value?: number;\n}\n\n/**\n * A single line item in the service cart.\n *\n * Each line item is either a PACKAGE or an ADDON — never both.\n * The `lineItemType` field is the discriminator:\n *\n * - lineItemType = PACKAGE → `servicePackage` + `lineItemSnap` are set; addon field is absent.\n * - lineItemType = ADDON → `addon` + `lineItemSnap` are set; servicePackage field is absent.\n *\n * `price` — unit price of the item (package price or addon price).\n * `quantity` — how many units of this item are being booked.\n */\nexport class ServiceLineItem {\n\t@prop({ required: true, type: String, enum: ServiceLineItemType })\n\tpublic lineItemType!: ServiceLineItemType;\n\n\t@prop({ ref: () => ServicePackage })\n\tpublic servicePackage?: Ref<ServicePackage>;\n\n\t@prop({ ref: () => ServiceAddon })\n\tpublic addon?: Ref<ServiceAddon>;\n\n\t@prop({ required: true, type: Number })\n\tpublic price!: number;\n\n\t@prop({ required: true, type: Number, min: 1 })\n\tpublic quantity!: number;\n\n\t// Add these fields when cart will be submitted\n\t@prop({ type: LineItemSnap, _id: false })\n\tpublic lineItemSnap?: LineItemSnap;\n\n\t@prop({ type: Number })\n\tpublic totalPrice?: number;\n\n\t@prop({ type: Number })\n\tpublic secondaryPrice?: number;\n\n\t@prop({ type: Number })\n\tpublic totalSecondaryPrice?: number;\n\n\t@prop({ type: Number })\n\tpublic totalDiscountedPrice?: number;\n\n\t@prop({ type: Number })\n\tpublic totalSecondaryDiscountedPrice?: number;\n\n\t@prop({ type: Number })\n\tpublic totalDiscountAmount?: number;\n\n\t@prop({ type: Number })\n\tpublic totalSecondaryDiscountAmount?: number;\n\n\t@prop({ type: [PromotionSnap], _id: false })\n\tpublic promotionSnaps?: PromotionSnap[];\n\n\t@prop({ type: () => ServicePromotionCut, _id: false })\n\tpublic discount?: ServicePromotionCut;\n}\n"]}
|
|
@@ -58,6 +58,7 @@ export declare class ServiceBooking extends TimeStamps {
|
|
|
58
58
|
isReviewNotificationSent?: boolean;
|
|
59
59
|
isLowRated?: boolean;
|
|
60
60
|
servicePromotions?: Ref<ServicePromotion>[];
|
|
61
|
+
maxDiscountPerOrder?: number | null;
|
|
61
62
|
onlinePaymentStatus?: OnlinePaymentStatus;
|
|
62
63
|
specialInstructions?: string;
|
|
63
64
|
professionalStartNotificationSentAt?: Date;
|
|
@@ -71,6 +71,7 @@ let ServiceBooking = class ServiceBooking extends defaultClasses_1.TimeStamps {
|
|
|
71
71
|
isReviewNotificationSent;
|
|
72
72
|
isLowRated;
|
|
73
73
|
servicePromotions;
|
|
74
|
+
maxDiscountPerOrder;
|
|
74
75
|
onlinePaymentStatus;
|
|
75
76
|
specialInstructions;
|
|
76
77
|
professionalStartNotificationSentAt;
|
|
@@ -248,6 +249,10 @@ __decorate([
|
|
|
248
249
|
(0, typegoose_1.prop)({ ref: () => service_promotion_model_1.ServicePromotion }),
|
|
249
250
|
__metadata("design:type", Array)
|
|
250
251
|
], ServiceBooking.prototype, "servicePromotions", void 0);
|
|
252
|
+
__decorate([
|
|
253
|
+
(0, typegoose_1.prop)({ type: Number }),
|
|
254
|
+
__metadata("design:type", Object)
|
|
255
|
+
], ServiceBooking.prototype, "maxDiscountPerOrder", void 0);
|
|
251
256
|
__decorate([
|
|
252
257
|
(0, typegoose_1.prop)({ type: String, enum: enum_1.OnlinePaymentStatus }),
|
|
253
258
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-booking.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-booking.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA8E;AAC9E,6CAAoC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AG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAC3B,CAAC;YAEF,IAAI,CAAC,OAAO,GAAG,GAAG,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;QACvE,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,cAAc,CA4J1B","sourcesContent":["import { modelOptions, pre, prop, Ref, Severity } from '@typegoose/typegoose';\nimport { User } from './user.model';\nimport { Vendor } from './vendor.model';\nimport {\n\tServiceBookingStatus,\n\tCounterType,\n\tServiceType,\n\tSubServiceType,\n\tAdjustmentStatus,\n\tOnlinePaymentStatus,\n} from '../../../utilities/enum';\nimport { Professional } from './professional.model';\nimport { ServiceCart } from './service-cart.model';\nimport { ServiceBookingFinance } from './embedded/service-booking-finance.model';\nimport {\n\tServiceBookingCancellationDetails,\n\tServiceBookingEndorseLoss,\n} from './embedded/service-booking-cancellation-details.model';\nimport { ServiceBookingStatusTimeline } from './embedded/status-timeline.model';\nimport { CounterModel, Review, VendorParent } from '.';\nimport { ServicePromotion } from './service-promotion.model';\nimport { RegularOrderAddress } from './shared/address.model';\nimport { OrderSlotRange } from './shared/duration.model';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ServiceBookingRefundInformation } from './embedded/service-booking-refund-information.model';\nimport { ServiceBookingReplacementInformation } from './embedded/service-booking-replacement-information.model';\nimport { ServiceFlag } from './service-flag.model';\nimport { dayjs } from '../../../utilities/dayjs';\n@modelOptions({\n\tschemaOptions: { collection: 'serviceBookings', timestamps: true },\n\toptions: { allowMixed: Severity.ALLOW },\n})\n@pre<ServiceBooking>('validate', async function (next) {\n\tif (this.isNew) {\n\t\tconst today = dayjs().format('DDMMYY');\n\n\t\tconst counter = await CounterModel.findOneAndUpdate(\n\t\t\t{ counterType: CounterType.ORDER },\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\t$set: {\n\t\t\t\t\t\tvalue: {\n\t\t\t\t\t\t\t$cond: [{ $eq: ['$today', today] }, { $add: ['$value', 1] }, 1],\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttoday: today,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t\t{ new: true, upsert: true }\n\t\t);\n\n\t\tthis.orderId = `${today}${counter.value.toString().padStart(6, '0')}`;\n\t}\n\tnext();\n})\nexport class ServiceBooking extends TimeStamps {\n\t@prop({ type: String, unique: true })\n\tpublic orderId?: string;\n\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: true, ref: () => VendorParent })\n\tpublic vendorParent!: Ref<VendorParent>;\n\n\t@prop({ required: true, type: String, enum: ServiceType })\n\tpublic serviceType!: ServiceType;\n\n\t@prop({ type: String, enum: SubServiceType })\n\tpublic subServiceType?: SubServiceType;\n\n\t@prop({ required: true, ref: () => ServiceCart })\n\tpublic cart!: Ref<ServiceCart>;\n\n\t@prop({ required: true, type: () => RegularOrderAddress })\n\tpublic userAddress!: RegularOrderAddress;\n\n\t@prop({ required: true, type: OrderSlotRange, _id: false })\n\tpublic slotRange!: OrderSlotRange;\n\n\t@prop({ type: String, enum: ServiceBookingStatus, default: ServiceBookingStatus.PENDING })\n\tpublic status!: ServiceBookingStatus;\n\n\t@prop({ ref: () => Professional })\n\tpublic professionals?: Ref<Professional>[];\n\n\t@prop({ ref: () => Professional })\n\tpublic responsibleProfessional?: Ref<Professional>;\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic processedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic placedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic startedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic estimatedCompletionAt?: Date;\n\n\t@prop({ type: Number })\n\tpublic estimatedCompletionInMinutes?: number;\n\n\t@prop({ type: Date })\n\tpublic completedAt?: Date;\n\n\t@prop({ type: Number })\n\tpublic actualCompletionInMinutes?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isUrgent?: boolean;\n\n\t@prop({ type: Date })\n\tpublic urgentAt?: Date;\n\n\t@prop({ required: true, type: ServiceBookingFinance, _id: false })\n\tpublic finance!: ServiceBookingFinance;\n\n\t@prop({ required: true, type: ServiceBookingFinance, _id: false })\n\tpublic adjustedFinance!: ServiceBookingFinance;\n\n\t@prop({ type: () => ServiceBookingCancellationDetails, _id: false })\n\tpublic cancellationDetails?: ServiceBookingCancellationDetails;\n\n\t@prop({ type: Date })\n\tpublic cancelledAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isEndorseLossApplied?: boolean;\n\n\t@prop({ type: () => ServiceBookingEndorseLoss, _id: false })\n\tpublic endorseLossInformation?: ServiceBookingEndorseLoss;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAdjusted?: boolean;\n\n\t@prop({ type: String, enum: AdjustmentStatus, default: AdjustmentStatus.NONE })\n\tpublic adjustmentStatus?: AdjustmentStatus;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isFlagged?: boolean;\n\n\t@prop({ type: Date })\n\tpublic flaggedAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRefunded?: boolean;\n\n\t@prop({ type: ServiceBookingRefundInformation, _id: false })\n\tpublic refundInformation?: ServiceBookingRefundInformation;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReplacement?: boolean;\n\n\t@prop({ type: () => ServiceBookingReplacementInformation, _id: false })\n\tpublic replacementInformation?: ServiceBookingReplacementInformation;\n\n\t@prop({ ref: () => ServiceBooking })\n\tpublic replacementBooking?: Ref<ServiceBooking>;\n\n\t@prop({ type: () => [ServiceBookingStatusTimeline], default: [] })\n\tpublic statusTimeline?: ServiceBookingStatusTimeline[];\n\n\t@prop({ type: Number })\n\tpublic bufferTime?: number; // minutes\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReviewed?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReviewNotificationSent?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLowRated?: boolean;\n\n\t@prop({ ref: () => ServicePromotion })\n\tpublic servicePromotions?: Ref<ServicePromotion>[];\n\n\t@prop({ type: String, enum: OnlinePaymentStatus })\n\tpublic onlinePaymentStatus?: OnlinePaymentStatus;\n\n\t@prop({ type: String })\n\tpublic specialInstructions?: string;\n\n\t@prop({ type: Date, default: null })\n\tpublic professionalStartNotificationSentAt?: Date;\n\n\t@prop({ type: Date, default: null })\n\tpublic professionalEndNotificationSentAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLate?: boolean;\n\n\t// Virtual field\n\t@prop({\n\t\tref: () => ServiceFlag,\n\t\tforeignField: 'serviceBooking',\n\t\tlocalField: '_id',\n\t})\n\tpublic flags?: Ref<ServiceFlag>[];\n\n\t@prop({\n\t\tref: () => Review,\n\t\tforeignField: 'serviceBooking',\n\t\tlocalField: '_id',\n\t})\n\tpublic reviews?: Ref<Review>[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"service-booking.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-booking.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA8E;AAC9E,6CAAoC;AACpC,iDAAwC;AACxC,kDAOiC;AACjC,6DAAoD;AACpD,6DAAmD;AACnD,4FAAiF;AACjF,sHAG+D;AAC/D,4EAAgF;AAChF,wBAAuD;AACvD,uEAA6D;AAC7D,0DAA6D;AAC7D,4DAAyD;AACzD,4EAAqE;AACrE,kHAAsG;AACtG,4HAAgH;AAChH,6DAAmD;AACnD,oDAAiD;AA4B1C,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,2BAAU;IAEtC,OAAO,CAAU;IAGjB,IAAI,CAAa;IAGjB,MAAM,CAAe;IAGrB,YAAY,CAAqB;IAGjC,WAAW,CAAe;IAG1B,cAAc,CAAkB;IAGhC,IAAI,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';\nimport { User } from './user.model';\nimport { Vendor } from './vendor.model';\nimport {\n\tServiceBookingStatus,\n\tCounterType,\n\tServiceType,\n\tSubServiceType,\n\tAdjustmentStatus,\n\tOnlinePaymentStatus,\n} from '../../../utilities/enum';\nimport { Professional } from './professional.model';\nimport { ServiceCart } from './service-cart.model';\nimport { ServiceBookingFinance } from './embedded/service-booking-finance.model';\nimport {\n\tServiceBookingCancellationDetails,\n\tServiceBookingEndorseLoss,\n} from './embedded/service-booking-cancellation-details.model';\nimport { ServiceBookingStatusTimeline } from './embedded/status-timeline.model';\nimport { CounterModel, Review, VendorParent } from '.';\nimport { ServicePromotion } from './service-promotion.model';\nimport { RegularOrderAddress } from './shared/address.model';\nimport { OrderSlotRange } from './shared/duration.model';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ServiceBookingRefundInformation } from './embedded/service-booking-refund-information.model';\nimport { ServiceBookingReplacementInformation } from './embedded/service-booking-replacement-information.model';\nimport { ServiceFlag } from './service-flag.model';\nimport { dayjs } from '../../../utilities/dayjs';\n@modelOptions({\n\tschemaOptions: { collection: 'serviceBookings', timestamps: true },\n\toptions: { allowMixed: Severity.ALLOW },\n})\n@pre<ServiceBooking>('validate', async function (next) {\n\tif (this.isNew) {\n\t\tconst today = dayjs().format('DDMMYY');\n\n\t\tconst counter = await CounterModel.findOneAndUpdate(\n\t\t\t{ counterType: CounterType.ORDER },\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\t$set: {\n\t\t\t\t\t\tvalue: {\n\t\t\t\t\t\t\t$cond: [{ $eq: ['$today', today] }, { $add: ['$value', 1] }, 1],\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttoday: today,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t\t{ new: true, upsert: true }\n\t\t);\n\n\t\tthis.orderId = `${today}${counter.value.toString().padStart(6, '0')}`;\n\t}\n\tnext();\n})\nexport class ServiceBooking extends TimeStamps {\n\t@prop({ type: String, unique: true })\n\tpublic orderId?: string;\n\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: true, ref: () => VendorParent })\n\tpublic vendorParent!: Ref<VendorParent>;\n\n\t@prop({ required: true, type: String, enum: ServiceType })\n\tpublic serviceType!: ServiceType;\n\n\t@prop({ type: String, enum: SubServiceType })\n\tpublic subServiceType?: SubServiceType;\n\n\t@prop({ required: true, ref: () => ServiceCart })\n\tpublic cart!: Ref<ServiceCart>;\n\n\t@prop({ required: true, type: () => RegularOrderAddress })\n\tpublic userAddress!: RegularOrderAddress;\n\n\t@prop({ required: true, type: OrderSlotRange, _id: false })\n\tpublic slotRange!: OrderSlotRange;\n\n\t@prop({ type: String, enum: ServiceBookingStatus, default: ServiceBookingStatus.PENDING })\n\tpublic status!: ServiceBookingStatus;\n\n\t@prop({ ref: () => Professional })\n\tpublic professionals?: Ref<Professional>[];\n\n\t@prop({ ref: () => Professional })\n\tpublic responsibleProfessional?: Ref<Professional>;\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic processedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic placedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic startedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic estimatedCompletionAt?: Date;\n\n\t@prop({ type: Number })\n\tpublic estimatedCompletionInMinutes?: number;\n\n\t@prop({ type: Date })\n\tpublic completedAt?: Date;\n\n\t@prop({ type: Number })\n\tpublic actualCompletionInMinutes?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isUrgent?: boolean;\n\n\t@prop({ type: Date })\n\tpublic urgentAt?: Date;\n\n\t@prop({ required: true, type: ServiceBookingFinance, _id: false })\n\tpublic finance!: ServiceBookingFinance;\n\n\t@prop({ required: true, type: ServiceBookingFinance, _id: false })\n\tpublic adjustedFinance!: ServiceBookingFinance;\n\n\t@prop({ type: () => ServiceBookingCancellationDetails, _id: false })\n\tpublic cancellationDetails?: ServiceBookingCancellationDetails;\n\n\t@prop({ type: Date })\n\tpublic cancelledAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isEndorseLossApplied?: boolean;\n\n\t@prop({ type: () => ServiceBookingEndorseLoss, _id: false })\n\tpublic endorseLossInformation?: ServiceBookingEndorseLoss;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAdjusted?: boolean;\n\n\t@prop({ type: String, enum: AdjustmentStatus, default: AdjustmentStatus.NONE })\n\tpublic adjustmentStatus?: AdjustmentStatus;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isFlagged?: boolean;\n\n\t@prop({ type: Date })\n\tpublic flaggedAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRefunded?: boolean;\n\n\t@prop({ type: ServiceBookingRefundInformation, _id: false })\n\tpublic refundInformation?: ServiceBookingRefundInformation;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReplacement?: boolean;\n\n\t@prop({ type: () => ServiceBookingReplacementInformation, _id: false })\n\tpublic replacementInformation?: ServiceBookingReplacementInformation;\n\n\t@prop({ ref: () => ServiceBooking })\n\tpublic replacementBooking?: Ref<ServiceBooking>;\n\n\t@prop({ type: () => [ServiceBookingStatusTimeline], default: [] })\n\tpublic statusTimeline?: ServiceBookingStatusTimeline[];\n\n\t@prop({ type: Number })\n\tpublic bufferTime?: number; // minutes\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReviewed?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReviewNotificationSent?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLowRated?: boolean;\n\n\t@prop({ ref: () => ServicePromotion })\n\tpublic servicePromotions?: Ref<ServicePromotion>[];\n\n\t@prop({ type: Number })\n\tpublic maxDiscountPerOrder?: number | null;\n\n\t@prop({ type: String, enum: OnlinePaymentStatus })\n\tpublic onlinePaymentStatus?: OnlinePaymentStatus;\n\n\t@prop({ type: String })\n\tpublic specialInstructions?: string;\n\n\t@prop({ type: Date, default: null })\n\tpublic professionalStartNotificationSentAt?: Date;\n\n\t@prop({ type: Date, default: null })\n\tpublic professionalEndNotificationSentAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLate?: boolean;\n\n\t// Virtual field\n\t@prop({\n\t\tref: () => ServiceFlag,\n\t\tforeignField: 'serviceBooking',\n\t\tlocalField: '_id',\n\t})\n\tpublic flags?: Ref<ServiceFlag>[];\n\n\t@prop({\n\t\tref: () => Review,\n\t\tforeignField: 'serviceBooking',\n\t\tlocalField: '_id',\n\t})\n\tpublic reviews?: Ref<Review>[];\n}\n"]}
|
|
@@ -11,31 +11,31 @@ export declare const ChatlistMessageSendSocketOutputSchema: z.ZodObject<{
|
|
|
11
11
|
content: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
12
12
|
createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
createdAt: Date;
|
|
15
14
|
content: string;
|
|
16
|
-
}, {
|
|
17
15
|
createdAt: Date;
|
|
16
|
+
}, {
|
|
18
17
|
content: string;
|
|
18
|
+
createdAt: Date;
|
|
19
19
|
}>>;
|
|
20
20
|
unreadCount: z.ZodNumber;
|
|
21
21
|
status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
unreadCount: number;
|
|
24
23
|
chatroomId: import("mongoose").Types.ObjectId;
|
|
24
|
+
unreadCount: number;
|
|
25
25
|
status?: TicketStatus | undefined;
|
|
26
26
|
orderId?: import("mongoose").Types.ObjectId | undefined;
|
|
27
27
|
lastMessage?: {
|
|
28
|
-
createdAt: Date;
|
|
29
28
|
content: string;
|
|
29
|
+
createdAt: Date;
|
|
30
30
|
} | undefined;
|
|
31
31
|
}, {
|
|
32
|
-
unreadCount: number;
|
|
33
32
|
chatroomId: import("mongoose").Types.ObjectId;
|
|
33
|
+
unreadCount: number;
|
|
34
34
|
status?: TicketStatus | undefined;
|
|
35
35
|
orderId?: import("mongoose").Types.ObjectId | undefined;
|
|
36
36
|
lastMessage?: {
|
|
37
|
-
createdAt: Date;
|
|
38
37
|
content: string;
|
|
38
|
+
createdAt: Date;
|
|
39
39
|
} | undefined;
|
|
40
40
|
}>;
|
|
41
41
|
export declare const ChatlistMessageSendPushOutputSchema: z.ZodObject<{
|
|
@@ -45,31 +45,31 @@ export declare const ChatlistMessageSendPushOutputSchema: z.ZodObject<{
|
|
|
45
45
|
content: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
46
46
|
createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
|
|
47
47
|
}, "strip", z.ZodTypeAny, {
|
|
48
|
-
createdAt: Date;
|
|
49
48
|
content: string;
|
|
50
|
-
}, {
|
|
51
49
|
createdAt: Date;
|
|
50
|
+
}, {
|
|
52
51
|
content: string;
|
|
52
|
+
createdAt: Date;
|
|
53
53
|
}>>;
|
|
54
54
|
unreadCount: z.ZodNumber;
|
|
55
55
|
status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
|
-
unreadCount: number;
|
|
58
57
|
chatroomId: import("mongoose").Types.ObjectId;
|
|
58
|
+
unreadCount: number;
|
|
59
59
|
status?: TicketStatus | undefined;
|
|
60
60
|
orderId?: import("mongoose").Types.ObjectId | undefined;
|
|
61
61
|
lastMessage?: {
|
|
62
|
-
createdAt: Date;
|
|
63
62
|
content: string;
|
|
63
|
+
createdAt: Date;
|
|
64
64
|
} | undefined;
|
|
65
65
|
}, {
|
|
66
|
-
unreadCount: number;
|
|
67
66
|
chatroomId: import("mongoose").Types.ObjectId;
|
|
67
|
+
unreadCount: number;
|
|
68
68
|
status?: TicketStatus | undefined;
|
|
69
69
|
orderId?: import("mongoose").Types.ObjectId | undefined;
|
|
70
70
|
lastMessage?: {
|
|
71
|
-
createdAt: Date;
|
|
72
71
|
content: string;
|
|
72
|
+
createdAt: Date;
|
|
73
73
|
} | undefined;
|
|
74
74
|
}>;
|
|
75
75
|
export type ChatlistMessageSendPushOutputDTO = DTO<typeof ChatlistMessageSendPushOutputSchema>;
|
|
@@ -85,31 +85,31 @@ export declare class ChatlistMessageSendSocketEvent extends BaseSocketEvent<type
|
|
|
85
85
|
content: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
86
86
|
createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
|
|
87
87
|
}, "strip", z.ZodTypeAny, {
|
|
88
|
-
createdAt: Date;
|
|
89
88
|
content: string;
|
|
90
|
-
}, {
|
|
91
89
|
createdAt: Date;
|
|
90
|
+
}, {
|
|
92
91
|
content: string;
|
|
92
|
+
createdAt: Date;
|
|
93
93
|
}>>;
|
|
94
94
|
unreadCount: z.ZodNumber;
|
|
95
95
|
status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
|
|
96
96
|
}, "strip", z.ZodTypeAny, {
|
|
97
|
-
unreadCount: number;
|
|
98
97
|
chatroomId: import("mongoose").Types.ObjectId;
|
|
98
|
+
unreadCount: number;
|
|
99
99
|
status?: TicketStatus | undefined;
|
|
100
100
|
orderId?: import("mongoose").Types.ObjectId | undefined;
|
|
101
101
|
lastMessage?: {
|
|
102
|
-
createdAt: Date;
|
|
103
102
|
content: string;
|
|
103
|
+
createdAt: Date;
|
|
104
104
|
} | undefined;
|
|
105
105
|
}, {
|
|
106
|
-
unreadCount: number;
|
|
107
106
|
chatroomId: import("mongoose").Types.ObjectId;
|
|
107
|
+
unreadCount: number;
|
|
108
108
|
status?: TicketStatus | undefined;
|
|
109
109
|
orderId?: import("mongoose").Types.ObjectId | undefined;
|
|
110
110
|
lastMessage?: {
|
|
111
|
-
createdAt: Date;
|
|
112
111
|
content: string;
|
|
112
|
+
createdAt: Date;
|
|
113
113
|
} | undefined;
|
|
114
114
|
}>;
|
|
115
115
|
pushNotificationOutput: z.ZodObject<{
|
|
@@ -119,31 +119,31 @@ export declare class ChatlistMessageSendSocketEvent extends BaseSocketEvent<type
|
|
|
119
119
|
content: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
120
120
|
createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
|
|
121
121
|
}, "strip", z.ZodTypeAny, {
|
|
122
|
-
createdAt: Date;
|
|
123
122
|
content: string;
|
|
124
|
-
}, {
|
|
125
123
|
createdAt: Date;
|
|
124
|
+
}, {
|
|
126
125
|
content: string;
|
|
126
|
+
createdAt: Date;
|
|
127
127
|
}>>;
|
|
128
128
|
unreadCount: z.ZodNumber;
|
|
129
129
|
status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
|
|
130
130
|
}, "strip", z.ZodTypeAny, {
|
|
131
|
-
unreadCount: number;
|
|
132
131
|
chatroomId: import("mongoose").Types.ObjectId;
|
|
132
|
+
unreadCount: number;
|
|
133
133
|
status?: TicketStatus | undefined;
|
|
134
134
|
orderId?: import("mongoose").Types.ObjectId | undefined;
|
|
135
135
|
lastMessage?: {
|
|
136
|
-
createdAt: Date;
|
|
137
136
|
content: string;
|
|
137
|
+
createdAt: Date;
|
|
138
138
|
} | undefined;
|
|
139
139
|
}, {
|
|
140
|
-
unreadCount: number;
|
|
141
140
|
chatroomId: import("mongoose").Types.ObjectId;
|
|
141
|
+
unreadCount: number;
|
|
142
142
|
status?: TicketStatus | undefined;
|
|
143
143
|
orderId?: import("mongoose").Types.ObjectId | undefined;
|
|
144
144
|
lastMessage?: {
|
|
145
|
-
createdAt: Date;
|
|
146
145
|
content: string;
|
|
146
|
+
createdAt: Date;
|
|
147
147
|
} | undefined;
|
|
148
148
|
}>;
|
|
149
149
|
};
|