@lyxa.ai/core 1.4.47 → 1.4.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/libraries/mongo/models/embedded/service-booking-refund-information.model.d.ts +16 -0
  2. package/dist/libraries/mongo/models/embedded/service-booking-refund-information.model.js +70 -0
  3. package/dist/libraries/mongo/models/embedded/service-booking-refund-information.model.js.map +1 -0
  4. package/dist/libraries/mongo/models/embedded/service-booking-replacement-information.model.d.ts +19 -0
  5. package/dist/libraries/mongo/models/embedded/service-booking-replacement-information.model.js +76 -0
  6. package/dist/libraries/mongo/models/embedded/service-booking-replacement-information.model.js.map +1 -0
  7. package/dist/libraries/mongo/models/service-booking.model.d.ts +11 -2
  8. package/dist/libraries/mongo/models/service-booking.model.js +47 -6
  9. package/dist/libraries/mongo/models/service-booking.model.js.map +1 -1
  10. package/dist/libraries/mongo/models/service-flag.model.d.ts +13 -0
  11. package/dist/libraries/mongo/models/service-flag.model.js +54 -0
  12. package/dist/libraries/mongo/models/service-flag.model.js.map +1 -0
  13. package/dist/libraries/socket/events/chatlist-message-send.socket.event.d.ts +0 -13
  14. package/dist/libraries/socket/events/chatlist-message-send.socket.event.js +0 -1
  15. package/dist/libraries/socket/events/chatlist-message-send.socket.event.js.map +1 -1
  16. package/dist/types/README.md +1 -1
  17. package/dist/types/package.json +1 -1
  18. package/dist/types/utilities/enum.d.ts +22 -4
  19. package/dist/types/utilities/enum.js +27 -7
  20. package/dist/types/utilities/enum.js.map +1 -1
  21. package/dist/utilities/enum.d.ts +22 -4
  22. package/dist/utilities/enum.js +27 -7
  23. package/dist/utilities/enum.js.map +1 -1
  24. package/package.json +1 -1
  25. package/dist/libraries/mongo/models/embedded/service-booking-flag.model.d.ts +0 -8
  26. package/dist/libraries/mongo/models/embedded/service-booking-flag.model.js +0 -43
  27. package/dist/libraries/mongo/models/embedded/service-booking-flag.model.js.map +0 -1
@@ -0,0 +1,16 @@
1
+ import { ServiceFlagReasonType } from '../../../../utilities/enum';
2
+ declare class SelectedLineItemsInfo {
3
+ lineItemId: string;
4
+ quantity?: number;
5
+ }
6
+ export declare class ServiceBookingRefundInformation {
7
+ selectedLineItems?: SelectedLineItemsInfo[];
8
+ refundedAmountByCompany?: number;
9
+ secondaryRefundedAmountByCompany?: number;
10
+ refundedAmountByVendor?: number;
11
+ secondaryRefundedAmountByVendor?: number;
12
+ totalRefund?: number;
13
+ secondaryTotalRefund?: number;
14
+ reasonType?: ServiceFlagReasonType;
15
+ }
16
+ export {};
@@ -0,0 +1,70 @@
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.ServiceBookingRefundInformation = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ const enum_1 = require("../../../../utilities/enum");
15
+ class SelectedLineItemsInfo {
16
+ lineItemId;
17
+ quantity;
18
+ }
19
+ __decorate([
20
+ (0, typegoose_1.prop)({ required: true, type: String }),
21
+ __metadata("design:type", String)
22
+ ], SelectedLineItemsInfo.prototype, "lineItemId", void 0);
23
+ __decorate([
24
+ (0, typegoose_1.prop)({ type: Number, default: 1 }),
25
+ __metadata("design:type", Number)
26
+ ], SelectedLineItemsInfo.prototype, "quantity", void 0);
27
+ class ServiceBookingRefundInformation {
28
+ selectedLineItems;
29
+ refundedAmountByCompany;
30
+ secondaryRefundedAmountByCompany;
31
+ refundedAmountByVendor;
32
+ secondaryRefundedAmountByVendor;
33
+ totalRefund;
34
+ secondaryTotalRefund;
35
+ reasonType;
36
+ }
37
+ exports.ServiceBookingRefundInformation = ServiceBookingRefundInformation;
38
+ __decorate([
39
+ (0, typegoose_1.prop)({ type: () => [SelectedLineItemsInfo], default: [], _id: false }),
40
+ __metadata("design:type", Array)
41
+ ], ServiceBookingRefundInformation.prototype, "selectedLineItems", void 0);
42
+ __decorate([
43
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
44
+ __metadata("design:type", Number)
45
+ ], ServiceBookingRefundInformation.prototype, "refundedAmountByCompany", void 0);
46
+ __decorate([
47
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
48
+ __metadata("design:type", Number)
49
+ ], ServiceBookingRefundInformation.prototype, "secondaryRefundedAmountByCompany", void 0);
50
+ __decorate([
51
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
52
+ __metadata("design:type", Number)
53
+ ], ServiceBookingRefundInformation.prototype, "refundedAmountByVendor", void 0);
54
+ __decorate([
55
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
56
+ __metadata("design:type", Number)
57
+ ], ServiceBookingRefundInformation.prototype, "secondaryRefundedAmountByVendor", void 0);
58
+ __decorate([
59
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
60
+ __metadata("design:type", Number)
61
+ ], ServiceBookingRefundInformation.prototype, "totalRefund", void 0);
62
+ __decorate([
63
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
64
+ __metadata("design:type", Number)
65
+ ], ServiceBookingRefundInformation.prototype, "secondaryTotalRefund", void 0);
66
+ __decorate([
67
+ (0, typegoose_1.prop)({ type: String, enum: enum_1.ServiceFlagReasonType, default: enum_1.ServiceFlagReasonType.OTHER }),
68
+ __metadata("design:type", String)
69
+ ], ServiceBookingRefundInformation.prototype, "reasonType", void 0);
70
+ //# sourceMappingURL=service-booking-refund-information.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-booking-refund-information.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/service-booking-refund-information.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,qDAAmE;AAEnE,MAAM,qBAAqB;IAEnB,UAAU,CAAU;IAGpB,QAAQ,CAAU;CACzB;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yDACZ;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;uDACV;AAG1B,MAAa,+BAA+B;IAEpC,iBAAiB,CAA2B;IAG5C,uBAAuB,CAAU;IAGjC,gCAAgC,CAAU;IAG1C,sBAAsB,CAAU;IAGhC,+BAA+B,CAAU;IAGzC,WAAW,CAAU;IAGrB,oBAAoB,CAAU;IAG9B,UAAU,CAAyB;CAC1C;AAxBD,0EAwBC;AAtBO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,qBAAqB,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;;0EACpB;AAG5C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;gFACK;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;yFACc;AAG1C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+EACI;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;wFACa;AAGzC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;oEACP;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;6EACE;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,4BAAqB,EAAE,OAAO,EAAE,4BAAqB,CAAC,KAAK,EAAE,CAAC;;mEAChD","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { ServiceFlagReasonType } from '../../../../utilities/enum';\n\nclass SelectedLineItemsInfo {\n\t@prop({ required: true, type: String })\n\tpublic lineItemId!: string;\n\n\t@prop({ type: Number, default: 1 })\n\tpublic quantity?: number;\n}\n\nexport class ServiceBookingRefundInformation {\n\t@prop({ type: () => [SelectedLineItemsInfo], default: [], _id: false })\n\tpublic selectedLineItems?: SelectedLineItemsInfo[];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic refundedAmountByCompany?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryRefundedAmountByCompany?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic refundedAmountByVendor?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryRefundedAmountByVendor?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic totalRefund?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryTotalRefund?: number;\n\n\t@prop({ type: String, enum: ServiceFlagReasonType, default: ServiceFlagReasonType.OTHER })\n\tpublic reasonType?: ServiceFlagReasonType;\n}\n"]}
@@ -0,0 +1,19 @@
1
+ import { Ref } from '@typegoose/typegoose';
2
+ import { ServiceFlagReasonType } from '../../../../utilities/enum';
3
+ import { ServiceBooking } from '../service-booking.model';
4
+ declare class SelectedLineItemsInfo {
5
+ lineItemId: string;
6
+ quantity?: number;
7
+ }
8
+ export declare class ServiceBookingReplacementInformation {
9
+ originalBooking: Ref<ServiceBooking>;
10
+ selectedLineItems?: SelectedLineItemsInfo[];
11
+ replacementByCompany?: number;
12
+ secondaryReplacementByCompany?: number;
13
+ replacementByVendor?: number;
14
+ secondaryReplacementByVendor?: number;
15
+ totalReplacement?: number;
16
+ secondaryTotalReplacement?: number;
17
+ reasonType?: ServiceFlagReasonType;
18
+ }
19
+ export {};
@@ -0,0 +1,76 @@
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.ServiceBookingReplacementInformation = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ const enum_1 = require("../../../../utilities/enum");
15
+ const service_booking_model_1 = require("../service-booking.model");
16
+ class SelectedLineItemsInfo {
17
+ lineItemId;
18
+ quantity;
19
+ }
20
+ __decorate([
21
+ (0, typegoose_1.prop)({ required: true, type: String }),
22
+ __metadata("design:type", String)
23
+ ], SelectedLineItemsInfo.prototype, "lineItemId", void 0);
24
+ __decorate([
25
+ (0, typegoose_1.prop)({ type: Number, default: 1 }),
26
+ __metadata("design:type", Number)
27
+ ], SelectedLineItemsInfo.prototype, "quantity", void 0);
28
+ class ServiceBookingReplacementInformation {
29
+ originalBooking;
30
+ selectedLineItems;
31
+ replacementByCompany;
32
+ secondaryReplacementByCompany;
33
+ replacementByVendor;
34
+ secondaryReplacementByVendor;
35
+ totalReplacement;
36
+ secondaryTotalReplacement;
37
+ reasonType;
38
+ }
39
+ exports.ServiceBookingReplacementInformation = ServiceBookingReplacementInformation;
40
+ __decorate([
41
+ (0, typegoose_1.prop)({ required: true, ref: () => service_booking_model_1.ServiceBooking }),
42
+ __metadata("design:type", Object)
43
+ ], ServiceBookingReplacementInformation.prototype, "originalBooking", void 0);
44
+ __decorate([
45
+ (0, typegoose_1.prop)({ type: () => [SelectedLineItemsInfo], default: [], _id: false }),
46
+ __metadata("design:type", Array)
47
+ ], ServiceBookingReplacementInformation.prototype, "selectedLineItems", void 0);
48
+ __decorate([
49
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
50
+ __metadata("design:type", Number)
51
+ ], ServiceBookingReplacementInformation.prototype, "replacementByCompany", void 0);
52
+ __decorate([
53
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
54
+ __metadata("design:type", Number)
55
+ ], ServiceBookingReplacementInformation.prototype, "secondaryReplacementByCompany", void 0);
56
+ __decorate([
57
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
58
+ __metadata("design:type", Number)
59
+ ], ServiceBookingReplacementInformation.prototype, "replacementByVendor", void 0);
60
+ __decorate([
61
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
62
+ __metadata("design:type", Number)
63
+ ], ServiceBookingReplacementInformation.prototype, "secondaryReplacementByVendor", void 0);
64
+ __decorate([
65
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
66
+ __metadata("design:type", Number)
67
+ ], ServiceBookingReplacementInformation.prototype, "totalReplacement", void 0);
68
+ __decorate([
69
+ (0, typegoose_1.prop)({ type: Number, default: 0 }),
70
+ __metadata("design:type", Number)
71
+ ], ServiceBookingReplacementInformation.prototype, "secondaryTotalReplacement", void 0);
72
+ __decorate([
73
+ (0, typegoose_1.prop)({ type: String, enum: enum_1.ServiceFlagReasonType, default: enum_1.ServiceFlagReasonType.OTHER }),
74
+ __metadata("design:type", String)
75
+ ], ServiceBookingReplacementInformation.prototype, "reasonType", void 0);
76
+ //# sourceMappingURL=service-booking-replacement-information.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-booking-replacement-information.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/service-booking-replacement-information.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAAmE;AACnE,oEAA0D;AAE1D,MAAM,qBAAqB;IAEnB,UAAU,CAAU;IAGpB,QAAQ,CAAU;CACzB;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yDACZ;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;uDACV;AAG1B,MAAa,oCAAoC;IAEzC,eAAe,CAAuB;IAGtC,iBAAiB,CAA2B;IAG5C,oBAAoB,CAAU;IAG9B,6BAA6B,CAAU;IAGvC,mBAAmB,CAAU;IAG7B,4BAA4B,CAAU;IAGtC,gBAAgB,CAAU;IAG1B,yBAAyB,CAAU;IAGnC,UAAU,CAAyB;CAC1C;AA3BD,oFA2BC;AAzBO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,sCAAc,EAAE,CAAC;;6EACP;AAGtC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,qBAAqB,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;;+EACpB;AAG5C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;kFACE;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;2FACW;AAGvC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;iFACC;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;0FACU;AAGtC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;8EACF;AAG1B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;uFACO;AAGnC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,4BAAqB,EAAE,OAAO,EAAE,4BAAqB,CAAC,KAAK,EAAE,CAAC;;wEAChD","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { ServiceFlagReasonType } from '../../../../utilities/enum';\nimport { ServiceBooking } from '../service-booking.model';\n\nclass SelectedLineItemsInfo {\n\t@prop({ required: true, type: String })\n\tpublic lineItemId!: string;\n\n\t@prop({ type: Number, default: 1 })\n\tpublic quantity?: number;\n}\n\nexport class ServiceBookingReplacementInformation {\n\t@prop({ required: true, ref: () => ServiceBooking })\n\tpublic originalBooking!: Ref<ServiceBooking>;\n\n\t@prop({ type: () => [SelectedLineItemsInfo], default: [], _id: false })\n\tpublic selectedLineItems?: SelectedLineItemsInfo[];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic replacementByCompany?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryReplacementByCompany?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic replacementByVendor?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryReplacementByVendor?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic totalReplacement?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryTotalReplacement?: number;\n\n\t@prop({ type: String, enum: ServiceFlagReasonType, default: ServiceFlagReasonType.OTHER })\n\tpublic reasonType?: ServiceFlagReasonType;\n}\n"]}
@@ -3,7 +3,6 @@ import { User } from './user.model';
3
3
  import { Vendor } from './vendor.model';
4
4
  import { ServiceBookingStatus, ServiceType, SubServiceType } from '../../../utilities/enum';
5
5
  import { Professional } from './professional.model';
6
- import { ServiceBookingFlag } from './embedded/service-booking-flag.model';
7
6
  import { ServiceCart } from './service-cart.model';
8
7
  import { ServiceBookingFinance } from './embedded/service-booking-finance.model';
9
8
  import { ServiceBookingCancelllationDetails, ServiceBookingEndorseLoss } from './embedded/service-booking-cancellation-details.model';
@@ -12,6 +11,9 @@ import { Review, VendorParent } from '.';
12
11
  import { RegularOrderAddress } from './shared/address.model';
13
12
  import { OrderSlotRange } from './shared/duration.model';
14
13
  import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
14
+ import { ServiceBookingRefundInformation } from './embedded/service-booking-refund-information.model';
15
+ import { ServiceBookingReplacementInformation } from './embedded/service-booking-replacement-information.model';
16
+ import { ServiceFlag } from './service-flag.model';
15
17
  export declare class ServiceBooking extends TimeStamps {
16
18
  orderId?: string;
17
19
  user: Ref<User>;
@@ -25,7 +27,6 @@ export declare class ServiceBooking extends TimeStamps {
25
27
  status: ServiceBookingStatus;
26
28
  professionals?: Ref<Professional>[];
27
29
  responsibleProfessional?: Ref<Professional>;
28
- flag?: ServiceBookingFlag;
29
30
  processedAt?: Date;
30
31
  placedAt?: Date;
31
32
  startedAt?: Date;
@@ -43,9 +44,17 @@ export declare class ServiceBooking extends TimeStamps {
43
44
  isEndorseLossApplied?: boolean;
44
45
  endorseLossInformation?: ServiceBookingEndorseLoss;
45
46
  isAdjusted?: boolean;
47
+ isFlagged?: boolean;
48
+ flaggedAt?: Date;
49
+ isRefunded?: boolean;
50
+ refundInformation?: ServiceBookingRefundInformation;
51
+ isReplacement?: boolean;
52
+ replacementInformation?: ServiceBookingReplacementInformation;
53
+ replacementBooking?: Ref<ServiceBooking>;
46
54
  statusTimeline?: ServiceBookingStatusTimeline[];
47
55
  bufferTime?: number;
48
56
  isReviewed?: boolean;
49
57
  isReviewNotificationSent?: boolean;
58
+ flags?: Ref<ServiceFlag>[];
50
59
  reviews?: Ref<Review>[];
51
60
  }
@@ -15,7 +15,6 @@ const user_model_1 = require("./user.model");
15
15
  const vendor_model_1 = require("./vendor.model");
16
16
  const enum_1 = require("../../../utilities/enum");
17
17
  const professional_model_1 = require("./professional.model");
18
- const service_booking_flag_model_1 = require("./embedded/service-booking-flag.model");
19
18
  const service_cart_model_1 = require("./service-cart.model");
20
19
  const service_booking_finance_model_1 = require("./embedded/service-booking-finance.model");
21
20
  const service_booking_cancellation_details_model_1 = require("./embedded/service-booking-cancellation-details.model");
@@ -25,6 +24,9 @@ const _1 = require(".");
25
24
  const address_model_1 = require("./shared/address.model");
26
25
  const duration_model_1 = require("./shared/duration.model");
27
26
  const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
27
+ const service_booking_refund_information_model_1 = require("./embedded/service-booking-refund-information.model");
28
+ const service_booking_replacement_information_model_1 = require("./embedded/service-booking-replacement-information.model");
29
+ const service_flag_model_1 = require("./service-flag.model");
28
30
  let ServiceBooking = class ServiceBooking extends defaultClasses_1.TimeStamps {
29
31
  orderId;
30
32
  user;
@@ -38,7 +40,6 @@ let ServiceBooking = class ServiceBooking extends defaultClasses_1.TimeStamps {
38
40
  status;
39
41
  professionals;
40
42
  responsibleProfessional;
41
- flag;
42
43
  processedAt;
43
44
  placedAt;
44
45
  startedAt;
@@ -56,10 +57,18 @@ let ServiceBooking = class ServiceBooking extends defaultClasses_1.TimeStamps {
56
57
  isEndorseLossApplied;
57
58
  endorseLossInformation;
58
59
  isAdjusted;
60
+ isFlagged;
61
+ flaggedAt;
62
+ isRefunded;
63
+ refundInformation;
64
+ isReplacement;
65
+ replacementInformation;
66
+ replacementBooking;
59
67
  statusTimeline;
60
68
  bufferTime;
61
69
  isReviewed;
62
70
  isReviewNotificationSent;
71
+ flags;
63
72
  reviews;
64
73
  };
65
74
  exports.ServiceBooking = ServiceBooking;
@@ -111,10 +120,6 @@ __decorate([
111
120
  (0, typegoose_1.prop)({ ref: () => professional_model_1.Professional }),
112
121
  __metadata("design:type", Object)
113
122
  ], ServiceBooking.prototype, "responsibleProfessional", void 0);
114
- __decorate([
115
- (0, typegoose_1.prop)({ type: () => service_booking_flag_model_1.ServiceBookingFlag, _id: false }),
116
- __metadata("design:type", service_booking_flag_model_1.ServiceBookingFlag)
117
- ], ServiceBooking.prototype, "flag", void 0);
118
123
  __decorate([
119
124
  (0, typegoose_1.prop)({ type: Date, default: new Date() }),
120
125
  __metadata("design:type", Date)
@@ -183,6 +188,34 @@ __decorate([
183
188
  (0, typegoose_1.prop)({ type: Boolean, default: false }),
184
189
  __metadata("design:type", Boolean)
185
190
  ], ServiceBooking.prototype, "isAdjusted", void 0);
191
+ __decorate([
192
+ (0, typegoose_1.prop)({ type: Boolean, default: false }),
193
+ __metadata("design:type", Boolean)
194
+ ], ServiceBooking.prototype, "isFlagged", void 0);
195
+ __decorate([
196
+ (0, typegoose_1.prop)({ type: Date }),
197
+ __metadata("design:type", Date)
198
+ ], ServiceBooking.prototype, "flaggedAt", void 0);
199
+ __decorate([
200
+ (0, typegoose_1.prop)({ type: Boolean, default: false }),
201
+ __metadata("design:type", Boolean)
202
+ ], ServiceBooking.prototype, "isRefunded", void 0);
203
+ __decorate([
204
+ (0, typegoose_1.prop)({ type: service_booking_refund_information_model_1.ServiceBookingRefundInformation, _id: false }),
205
+ __metadata("design:type", service_booking_refund_information_model_1.ServiceBookingRefundInformation)
206
+ ], ServiceBooking.prototype, "refundInformation", void 0);
207
+ __decorate([
208
+ (0, typegoose_1.prop)({ type: Boolean, default: false }),
209
+ __metadata("design:type", Boolean)
210
+ ], ServiceBooking.prototype, "isReplacement", void 0);
211
+ __decorate([
212
+ (0, typegoose_1.prop)({ type: () => service_booking_replacement_information_model_1.ServiceBookingReplacementInformation, _id: false }),
213
+ __metadata("design:type", service_booking_replacement_information_model_1.ServiceBookingReplacementInformation)
214
+ ], ServiceBooking.prototype, "replacementInformation", void 0);
215
+ __decorate([
216
+ (0, typegoose_1.prop)({ ref: () => ServiceBooking }),
217
+ __metadata("design:type", Object)
218
+ ], ServiceBooking.prototype, "replacementBooking", void 0);
186
219
  __decorate([
187
220
  (0, typegoose_1.prop)({ type: () => [status_timeline_model_1.ServiceBookingStatusTimeline], default: [] }),
188
221
  __metadata("design:type", Array)
@@ -199,6 +232,14 @@ __decorate([
199
232
  (0, typegoose_1.prop)({ type: Boolean, default: false }),
200
233
  __metadata("design:type", Boolean)
201
234
  ], ServiceBooking.prototype, "isReviewNotificationSent", void 0);
235
+ __decorate([
236
+ (0, typegoose_1.prop)({
237
+ ref: () => service_flag_model_1.ServiceFlag,
238
+ foreignField: 'serviceBooking',
239
+ localField: '_id',
240
+ }),
241
+ __metadata("design:type", Array)
242
+ ], ServiceBooking.prototype, "flags", void 0);
202
243
  __decorate([
203
244
  (0, typegoose_1.prop)({
204
245
  ref: () => _1.Review,
@@ -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;AACpC,iDAAwC;AACxC,kDAAyG;AACzG,6DAAoD;AACpD,sFAA2E;AAC3E,6DAAmD;AACnD,4FAAiF;AACjF,sHAG+D;AAC/D,4EAAgF;AAChF,kEAA6D;AAC7D,wBAAuD;AACvD,0DAA6D;AAC7D,4DAAyD;AACzD,4EAAqE;AAW9D,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,2BAAU;IAEtC,OAAO,CAAU;IAGjB,IAAI,CAAa;IAGjB,MAAM,CAAe;IAGrB,MAAM,CAAqB;IAG3B,WAAW,CAAe;IAG1B,cAAc,CAAkB;IAGhC,IAAI,CAAoB;IAGxB,WAAW,CAAuB;IAGlC,SAAS,CAAkB;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AyB,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;8BAC5B,sEAAyB;8DAAC;AAGnD;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;kDACZ;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,oDAA4B,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;sDACX;AAGhD;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDACI;AAIpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;kDACZ;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;gEACE;AAOnC;IALN,IAAA,gBAAI,EAAC;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,SAAM;QACjB,YAAY,EAAE,gBAAgB;QAC9B,UAAU,EAAE,KAAK;KACjB,CAAC;;+CAC6B;yBA7GnB,cAAc;IAT1B,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,EAAE,IAAI,EAAE;QAClE,OAAO,EAAE,EAAE,UAAU,EAAE,oBAAQ,CAAC,KAAK,EAAE;KACvC,CAAC;IACD,IAAA,eAAG,EAAiB,MAAM,EAAE,KAAK;QACjC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,OAAO,GAAG,MAAM,IAAA,yBAAU,EAAC,eAAY,EAAE,kBAAW,CAAC,OAAO,CAAC,CAAC;QACpE,CAAC;IACF,CAAC,CAAC;GACW,cAAc,CA8G1B","sourcesContent":["import { modelOptions, pre, prop, Ref, Severity } from '@typegoose/typegoose';\nimport { User } from './user.model';\nimport { Vendor } from './vendor.model';\nimport { ServiceBookingStatus, CounterType, ServiceType, SubServiceType } from '../../../utilities/enum';\nimport { Professional } from './professional.model';\nimport { ServiceBookingFlag } from './embedded/service-booking-flag.model';\nimport { ServiceCart } from './service-cart.model';\nimport { ServiceBookingFinance } from './embedded/service-booking-finance.model';\nimport {\n\tServiceBookingCancelllationDetails,\n\tServiceBookingEndorseLoss,\n} from './embedded/service-booking-cancellation-details.model';\nimport { ServiceBookingStatusTimeline } from './embedded/status-timeline.model';\nimport { generateId } from '../../../utilities/id-generator';\nimport { CounterModel, Review, VendorParent } from '.';\nimport { RegularOrderAddress } from './shared/address.model';\nimport { OrderSlotRange } from './shared/duration.model';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\n\n@modelOptions({\n\tschemaOptions: { collection: 'serviceBookings', timestamps: true },\n\toptions: { allowMixed: Severity.ALLOW },\n})\n@pre<ServiceBooking>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.orderId = await generateId(CounterModel, CounterType.BOOKING);\n\t}\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 parent!: 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: () => ServiceBookingFlag, _id: false })\n\tpublic flag?: ServiceBookingFlag;\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 isUrgentOrder?: boolean;\n\n\t@prop({ type: Date })\n\tpublic urgentAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isOverdue?: boolean;\n\n\t@prop({ type: Date })\n\tpublic overdueAt?: 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: () => ServiceBookingCancelllationDetails, _id: false })\n\tpublic cancellationDetails?: ServiceBookingCancelllationDetails;\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: () => [ServiceBookingStatusTimeline], default: [] })\n\tpublic statusTimeline?: ServiceBookingStatusTimeline[];\n\n\t@prop({ type: Number })\n\tpublic bufferTime?: number; // minutes\n\n\t// Review feature\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({\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,kDAAyG;AACzG,6DAAoD;AACpD,6DAAmD;AACnD,4FAAiF;AACjF,sHAG+D;AAC/D,4EAAgF;AAChF,kEAA6D;AAC7D,wBAAuD;AACvD,0DAA6D;AAC7D,4DAAyD;AACzD,4EAAqE;AACrE,kHAAsG;AACtG,4HAAgH;AAChH,6DAAmD;AAW5C,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,2BAAU;IAEtC,OAAO,CAAU;IAGjB,IAAI,CAAa;IAGjB,MAAM,CAAe;IAGrB,MAAM,CAAqB;IAG3B,WAAW,CAAe;IAG1B,cAAc,CAAkB;IAGhC,IAAI,CAAoB;IAGxB,WAAW,CAAuB;IAGlC,SAAS,CAAkB;IAG3B,MAAM,CAAwB;IAG9B,aAAa,CAAuB;IAGpC,uBAAuB,CAAqB;IAG5C,WAAW,CAAQ;IAGnB,QAAQ,CAAQ;IAGhB,SAAS,CAAQ;IAGjB,qBAAqB,CAAQ;IAG7B,4BAA4B,CAAU;IAGtC,WAAW,CAAQ;IAGnB,yBAAyB,CAAU;IAGnC,aAAa,CAAW;IAGxB,QAAQ,CAAQ;IAGhB,SAAS,CAAW;IAGpB,SAAS,CAAQ;IAGjB,OAAO,CAAyB;IAGhC,eAAe,CAAyB;IAGxC,mBAAmB,CAAsC;IAGzD,oBAAoB,CAAW;IAG/B,sBAAsB,CAA6B;IAGnD,UAAU,CAAW;IAGrB,SAAS,CAAW;IAGpB,SAAS,CAAQ;IAGjB,UAAU,CAAW;IAGrB,i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OAAO,EAAE,EAAE,UAAU,EAAE,oBAAQ,CAAC,KAAK,EAAE;KACvC,CAAC;IACD,IAAA,eAAG,EAAiB,MAAM,EAAE,KAAK;QACjC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,OAAO,GAAG,MAAM,IAAA,yBAAU,EAAC,eAAY,EAAE,kBAAW,CAAC,OAAO,CAAC,CAAC;QACpE,CAAC;IACF,CAAC,CAAC;GACW,cAAc,CAuI1B","sourcesContent":["import { modelOptions, pre, prop, Ref, Severity } from '@typegoose/typegoose';\nimport { User } from './user.model';\nimport { Vendor } from './vendor.model';\nimport { ServiceBookingStatus, CounterType, ServiceType, SubServiceType } from '../../../utilities/enum';\nimport { Professional } from './professional.model';\nimport { ServiceCart } from './service-cart.model';\nimport { ServiceBookingFinance } from './embedded/service-booking-finance.model';\nimport {\n\tServiceBookingCancelllationDetails,\n\tServiceBookingEndorseLoss,\n} from './embedded/service-booking-cancellation-details.model';\nimport { ServiceBookingStatusTimeline } from './embedded/status-timeline.model';\nimport { generateId } from '../../../utilities/id-generator';\nimport { CounterModel, Review, VendorParent } from '.';\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';\n\n@modelOptions({\n\tschemaOptions: { collection: 'serviceBookings', timestamps: true },\n\toptions: { allowMixed: Severity.ALLOW },\n})\n@pre<ServiceBooking>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.orderId = await generateId(CounterModel, CounterType.BOOKING);\n\t}\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 parent!: 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 isUrgentOrder?: boolean;\n\n\t@prop({ type: Date })\n\tpublic urgentAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isOverdue?: boolean;\n\n\t@prop({ type: Date })\n\tpublic overdueAt?: 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: () => ServiceBookingCancelllationDetails, _id: false })\n\tpublic cancellationDetails?: ServiceBookingCancelllationDetails;\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: 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// 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"]}
@@ -0,0 +1,13 @@
1
+ import { Ref } from '@typegoose/typegoose';
2
+ import { ServiceFlagType, ServiceFlagReasonType } from '../../../utilities/enum';
3
+ import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
4
+ import { Admin } from './admin.model';
5
+ import { ServiceBooking } from './service-booking.model';
6
+ export declare class ServiceFlag extends TimeStamps {
7
+ serviceBooking: Ref<ServiceBooking>;
8
+ orderId: string;
9
+ flagType: ServiceFlagType;
10
+ reasonType?: ServiceFlagReasonType;
11
+ otherReason?: string;
12
+ flaggedBy?: Ref<Admin>;
13
+ }
@@ -0,0 +1,54 @@
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.ServiceFlag = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
14
+ const enum_1 = require("../../../utilities/enum");
15
+ const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
16
+ const admin_model_1 = require("./admin.model");
17
+ const service_booking_model_1 = require("./service-booking.model");
18
+ let ServiceFlag = class ServiceFlag extends defaultClasses_1.TimeStamps {
19
+ serviceBooking;
20
+ orderId;
21
+ flagType;
22
+ reasonType;
23
+ otherReason;
24
+ flaggedBy;
25
+ };
26
+ exports.ServiceFlag = ServiceFlag;
27
+ __decorate([
28
+ (0, typegoose_1.prop)({ required: true, ref: () => service_booking_model_1.ServiceBooking }),
29
+ __metadata("design:type", Object)
30
+ ], ServiceFlag.prototype, "serviceBooking", void 0);
31
+ __decorate([
32
+ (0, typegoose_1.prop)({ required: true, type: String }),
33
+ __metadata("design:type", String)
34
+ ], ServiceFlag.prototype, "orderId", void 0);
35
+ __decorate([
36
+ (0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ServiceFlagType }),
37
+ __metadata("design:type", String)
38
+ ], ServiceFlag.prototype, "flagType", void 0);
39
+ __decorate([
40
+ (0, typegoose_1.prop)({ type: String, enum: enum_1.ServiceFlagReasonType, default: enum_1.ServiceFlagReasonType.OTHER }),
41
+ __metadata("design:type", String)
42
+ ], ServiceFlag.prototype, "reasonType", void 0);
43
+ __decorate([
44
+ (0, typegoose_1.prop)({ type: String }),
45
+ __metadata("design:type", String)
46
+ ], ServiceFlag.prototype, "otherReason", void 0);
47
+ __decorate([
48
+ (0, typegoose_1.prop)({ ref: () => admin_model_1.Admin }),
49
+ __metadata("design:type", Object)
50
+ ], ServiceFlag.prototype, "flaggedBy", void 0);
51
+ exports.ServiceFlag = ServiceFlag = __decorate([
52
+ (0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'serviceFlags' } })
53
+ ], ServiceFlag);
54
+ //# sourceMappingURL=service-flag.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-flag.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-flag.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,kDAAiF;AACjF,4EAAqE;AACrE,+CAAsC;AACtC,mEAAyD;AAGlD,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,2BAAU;IAEnC,cAAc,CAAuB;IAGrC,OAAO,CAAU;IAGjB,QAAQ,CAAmB;IAG3B,UAAU,CAAyB;IAGnC,WAAW,CAAU;IAGrB,SAAS,CAAc;CAC9B,CAAA;AAlBY,kCAAW;AAEhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,sCAAc,EAAE,CAAC;;mDACR;AAGrC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CACf;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAe,EAAE,CAAC;;6CAC5B;AAG3B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,4BAAqB,EAAE,OAAO,EAAE,4BAAqB,CAAC,KAAK,EAAE,CAAC;;+CAChD;AAGnC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDACK;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;8CACG;sBAjBlB,WAAW;IADvB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE,EAAE,CAAC;GACnD,WAAW,CAkBvB","sourcesContent":["import { modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { ServiceFlagType, ServiceFlagReasonType } from '../../../utilities/enum';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Admin } from './admin.model';\nimport { ServiceBooking } from './service-booking.model';\n\n@modelOptions({ schemaOptions: { collection: 'serviceFlags' } })\nexport class ServiceFlag extends TimeStamps {\n\t@prop({ required: true, ref: () => ServiceBooking })\n\tpublic serviceBooking!: Ref<ServiceBooking>;\n\n\t@prop({ required: true, type: String })\n\tpublic orderId!: string;\n\n\t@prop({ required: true, type: String, enum: ServiceFlagType })\n\tpublic flagType!: ServiceFlagType;\n\n\t@prop({ type: String, enum: ServiceFlagReasonType, default: ServiceFlagReasonType.OTHER })\n\tpublic reasonType?: ServiceFlagReasonType;\n\n\t@prop({ type: String })\n\tpublic otherReason?: string;\n\n\t@prop({ ref: () => Admin })\n\tpublic flaggedBy?: Ref<Admin>;\n}\n"]}
@@ -1,5 +1,4 @@
1
1
  import z from 'zod';
2
- import { TicketStatus } from '../../../utilities/enum';
3
2
  import { DTO } from '../../../utilities/validation';
4
3
  import { BaseSocketEvent } from '../BaseSocketEvent';
5
4
  import { NotificationSettings } from '../PushNotificationEvent';
@@ -18,11 +17,9 @@ export declare const ChatlistMessageSendSocketOutputSchema: z.ZodObject<{
18
17
  createdAt: Date;
19
18
  }>>;
20
19
  unreadCount: z.ZodNumber;
21
- status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
22
20
  }, "strip", z.ZodTypeAny, {
23
21
  unreadCount: number;
24
22
  chatroomId: import("mongoose").Types.ObjectId;
25
- status?: TicketStatus | undefined;
26
23
  orderId?: import("mongoose").Types.ObjectId | undefined;
27
24
  lastMessage?: {
28
25
  content: string;
@@ -31,7 +28,6 @@ export declare const ChatlistMessageSendSocketOutputSchema: z.ZodObject<{
31
28
  }, {
32
29
  unreadCount: number;
33
30
  chatroomId: import("mongoose").Types.ObjectId;
34
- status?: TicketStatus | undefined;
35
31
  orderId?: import("mongoose").Types.ObjectId | undefined;
36
32
  lastMessage?: {
37
33
  content: string;
@@ -52,11 +48,9 @@ export declare const ChatlistMessageSendPushOutputSchema: z.ZodObject<{
52
48
  createdAt: Date;
53
49
  }>>;
54
50
  unreadCount: z.ZodNumber;
55
- status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
56
51
  }, "strip", z.ZodTypeAny, {
57
52
  unreadCount: number;
58
53
  chatroomId: import("mongoose").Types.ObjectId;
59
- status?: TicketStatus | undefined;
60
54
  orderId?: import("mongoose").Types.ObjectId | undefined;
61
55
  lastMessage?: {
62
56
  content: string;
@@ -65,7 +59,6 @@ export declare const ChatlistMessageSendPushOutputSchema: z.ZodObject<{
65
59
  }, {
66
60
  unreadCount: number;
67
61
  chatroomId: import("mongoose").Types.ObjectId;
68
- status?: TicketStatus | undefined;
69
62
  orderId?: import("mongoose").Types.ObjectId | undefined;
70
63
  lastMessage?: {
71
64
  content: string;
@@ -92,11 +85,9 @@ export declare class ChatlistMessageSendSocketEvent extends BaseSocketEvent<type
92
85
  createdAt: Date;
93
86
  }>>;
94
87
  unreadCount: z.ZodNumber;
95
- status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
96
88
  }, "strip", z.ZodTypeAny, {
97
89
  unreadCount: number;
98
90
  chatroomId: import("mongoose").Types.ObjectId;
99
- status?: TicketStatus | undefined;
100
91
  orderId?: import("mongoose").Types.ObjectId | undefined;
101
92
  lastMessage?: {
102
93
  content: string;
@@ -105,7 +96,6 @@ export declare class ChatlistMessageSendSocketEvent extends BaseSocketEvent<type
105
96
  }, {
106
97
  unreadCount: number;
107
98
  chatroomId: import("mongoose").Types.ObjectId;
108
- status?: TicketStatus | undefined;
109
99
  orderId?: import("mongoose").Types.ObjectId | undefined;
110
100
  lastMessage?: {
111
101
  content: string;
@@ -126,11 +116,9 @@ export declare class ChatlistMessageSendSocketEvent extends BaseSocketEvent<type
126
116
  createdAt: Date;
127
117
  }>>;
128
118
  unreadCount: z.ZodNumber;
129
- status: z.ZodOptional<z.ZodNativeEnum<typeof TicketStatus>>;
130
119
  }, "strip", z.ZodTypeAny, {
131
120
  unreadCount: number;
132
121
  chatroomId: import("mongoose").Types.ObjectId;
133
- status?: TicketStatus | undefined;
134
122
  orderId?: import("mongoose").Types.ObjectId | undefined;
135
123
  lastMessage?: {
136
124
  content: string;
@@ -139,7 +127,6 @@ export declare class ChatlistMessageSendSocketEvent extends BaseSocketEvent<type
139
127
  }, {
140
128
  unreadCount: number;
141
129
  chatroomId: import("mongoose").Types.ObjectId;
142
- status?: TicketStatus | undefined;
143
130
  orderId?: import("mongoose").Types.ObjectId | undefined;
144
131
  lastMessage?: {
145
132
  content: string;
@@ -19,7 +19,6 @@ exports.ChatlistMessageSendSocketOutputSchema = zod_1.default.object({
19
19
  })
20
20
  .optional(),
21
21
  unreadCount: validation_1.ZodValidation.number(),
22
- status: validation_1.ZodValidation.enumType(enum_1.TicketStatus).optional(),
23
22
  });
24
23
  exports.ChatlistMessageSendPushOutputSchema = exports.ChatlistMessageSendSocketOutputSchema;
25
24
  class ChatlistMessageSendSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
@@ -1 +1 @@
1
- {"version":3,"file":"chatlist-message-send.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/chatlist-message-send.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAAmF;AACnF,8DAAmE;AACnE,wDAAqD;AAIxC,QAAA,oCAAoC,GAAG,aAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACpD,QAAA,qCAAqC,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7D,UAAU,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC3C,OAAO,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACnD,WAAW,EAAE,aAAC;SACZ,MAAM,CAAC;QACP,OAAO,EAAE,0BAAa,CAAC,MAAM,EAAE;QAC/B,SAAS,EAAE,0BAAa,CAAC,MAAM,CAAC,IAAI,EAAE;KACtC,CAAC;SACD,QAAQ,EAAE;IACZ,WAAW,EAAE,0BAAa,CAAC,MAAM,EAAE;IACnC,MAAM,EAAE,0BAAa,CAAC,QAAQ,CAAC,mBAAY,CAAC,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC;AAEU,QAAA,mCAAmC,GAAG,6CAAqC,CAAC;AAMzF,MAAa,8BAA+B,SAAQ,iCAInD;IACA,MAAM,CAAU,OAAO,GAAG;QACzB,KAAK,EAAE,4CAAoC;QAC3C,MAAM,EAAE,6CAAqC;QAC7C,sBAAsB,EAAE,2CAAmC;KAC3D,CAAC;IAEF,IAAW,oBAAoB;QAC9B,OAAO;YACN,kBAAkB,EAAE,IAAI;YACxB,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,gBAAS,CAAC,iBAAiB;SACtC,CAAC;IACH,CAAC;IAED,YAAY,OAA2C;QACtD,KAAK,CACJ,sBAAe,CAAC,yBAAyB,EACzC,8BAA8B,CAAC,OAAO,EACtC,OAAO,EACP,OAAO,CACP,CAAC;IACH,CAAC;IAES,aAAa;QACtB,OAAO,SAAS,CAAC;IAClB,CAAC;;AA9BF,wEA+BC","sourcesContent":["import z from 'zod';\nimport { ClickType, SocketEventType, TicketStatus } from '../../../utilities/enum';\nimport { DTO, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\n\nimport { NotificationSettings } from '../PushNotificationEvent';\n\nexport const ChatlistMessageSendSocketInputSchema = z.object({});\nexport const ChatlistMessageSendSocketOutputSchema = z.object({\n\tchatroomId: ZodValidation.coerce.objectId(),\n\torderId: ZodValidation.coerce.objectId().optional(),\n\tlastMessage: z\n\t\t.object({\n\t\t\tcontent: ZodValidation.string(),\n\t\t\tcreatedAt: ZodValidation.coerce.date(),\n\t\t})\n\t\t.optional(),\n\tunreadCount: ZodValidation.number(),\n\tstatus: ZodValidation.enumType(TicketStatus).optional(),\n});\n\nexport const ChatlistMessageSendPushOutputSchema = ChatlistMessageSendSocketOutputSchema;\n\nexport type ChatlistMessageSendPushOutputDTO = DTO<typeof ChatlistMessageSendPushOutputSchema>;\nexport type ChatlistMessageSendSocketOutputDTO = DTO<typeof ChatlistMessageSendSocketOutputSchema>;\nexport type ChatlistMessageSendSocketInputDTO = DTO<typeof ChatlistMessageSendSocketInputSchema>;\n\nexport class ChatlistMessageSendSocketEvent extends BaseSocketEvent<\n\ttypeof ChatlistMessageSendSocketInputSchema,\n\ttypeof ChatlistMessageSendSocketOutputSchema,\n\ttypeof ChatlistMessageSendPushOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: ChatlistMessageSendSocketInputSchema,\n\t\toutput: ChatlistMessageSendSocketOutputSchema,\n\t\tpushNotificationOutput: ChatlistMessageSendPushOutputSchema,\n\t};\n\n\tpublic get notificationSettings(): NotificationSettings | undefined {\n\t\treturn {\n\t\t\tisPushNotification: true,\n\t\t\tisClickable: true,\n\t\t\tclickType: ClickType.CLICKABLE_MESSAGE,\n\t\t};\n\t}\n\n\tconstructor(payload: ChatlistMessageSendSocketOutputDTO) {\n\t\tsuper(\n\t\t\tSocketEventType.CHATLIST_MESSAGE_RECEIVED,\n\t\t\tChatlistMessageSendSocketEvent.schemas,\n\t\t\tpayload,\n\t\t\tpayload\n\t\t);\n\t}\n\n\tprotected getIdentifier(): string {\n\t\treturn 'default';\n\t}\n}\n"]}
1
+ {"version":3,"file":"chatlist-message-send.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/chatlist-message-send.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAAqE;AACrE,8DAAmE;AACnE,wDAAqD;AAIxC,QAAA,oCAAoC,GAAG,aAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACpD,QAAA,qCAAqC,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7D,UAAU,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC3C,OAAO,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACnD,WAAW,EAAE,aAAC;SACZ,MAAM,CAAC;QACP,OAAO,EAAE,0BAAa,CAAC,MAAM,EAAE;QAC/B,SAAS,EAAE,0BAAa,CAAC,MAAM,CAAC,IAAI,EAAE;KACtC,CAAC;SACD,QAAQ,EAAE;IACZ,WAAW,EAAE,0BAAa,CAAC,MAAM,EAAE;CACnC,CAAC,CAAC;AAEU,QAAA,mCAAmC,GAAG,6CAAqC,CAAC;AAMzF,MAAa,8BAA+B,SAAQ,iCAInD;IACA,MAAM,CAAU,OAAO,GAAG;QACzB,KAAK,EAAE,4CAAoC;QAC3C,MAAM,EAAE,6CAAqC;QAC7C,sBAAsB,EAAE,2CAAmC;KAC3D,CAAC;IAEF,IAAW,oBAAoB;QAC9B,OAAO;YACN,kBAAkB,EAAE,IAAI;YACxB,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,gBAAS,CAAC,iBAAiB;SACtC,CAAC;IACH,CAAC;IAED,YAAY,OAA2C;QACtD,KAAK,CAAC,sBAAe,CAAC,yBAAyB,EAAE,8BAA8B,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5G,CAAC;IAES,aAAa;QACtB,OAAO,SAAS,CAAC;IAClB,CAAC;;AAzBF,wEA0BC","sourcesContent":["import z from 'zod';\nimport { ClickType, SocketEventType } from '../../../utilities/enum';\nimport { DTO, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\n\nimport { NotificationSettings } from '../PushNotificationEvent';\n\nexport const ChatlistMessageSendSocketInputSchema = z.object({});\nexport const ChatlistMessageSendSocketOutputSchema = z.object({\n\tchatroomId: ZodValidation.coerce.objectId(),\n\torderId: ZodValidation.coerce.objectId().optional(),\n\tlastMessage: z\n\t\t.object({\n\t\t\tcontent: ZodValidation.string(),\n\t\t\tcreatedAt: ZodValidation.coerce.date(),\n\t\t})\n\t\t.optional(),\n\tunreadCount: ZodValidation.number(),\n});\n\nexport const ChatlistMessageSendPushOutputSchema = ChatlistMessageSendSocketOutputSchema;\n\nexport type ChatlistMessageSendPushOutputDTO = DTO<typeof ChatlistMessageSendPushOutputSchema>;\nexport type ChatlistMessageSendSocketOutputDTO = DTO<typeof ChatlistMessageSendSocketOutputSchema>;\nexport type ChatlistMessageSendSocketInputDTO = DTO<typeof ChatlistMessageSendSocketInputSchema>;\n\nexport class ChatlistMessageSendSocketEvent extends BaseSocketEvent<\n\ttypeof ChatlistMessageSendSocketInputSchema,\n\ttypeof ChatlistMessageSendSocketOutputSchema,\n\ttypeof ChatlistMessageSendPushOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: ChatlistMessageSendSocketInputSchema,\n\t\toutput: ChatlistMessageSendSocketOutputSchema,\n\t\tpushNotificationOutput: ChatlistMessageSendPushOutputSchema,\n\t};\n\n\tpublic get notificationSettings(): NotificationSettings | undefined {\n\t\treturn {\n\t\t\tisPushNotification: true,\n\t\t\tisClickable: true,\n\t\t\tclickType: ClickType.CLICKABLE_MESSAGE,\n\t\t};\n\t}\n\n\tconstructor(payload: ChatlistMessageSendSocketOutputDTO) {\n\t\tsuper(SocketEventType.CHATLIST_MESSAGE_RECEIVED, ChatlistMessageSendSocketEvent.schemas, payload, payload);\n\t}\n\n\tprotected getIdentifier(): string {\n\t\treturn 'default';\n\t}\n}\n"]}
@@ -22,7 +22,7 @@ Perfect for sharing types between frontend and backend applications.
22
22
 
23
23
  ## Version
24
24
 
25
- Version: 1.4.47
25
+ Version: 1.4.50
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.4.47",
3
+ "version": "1.4.50",
4
4
  "description": "Lyxa type definitions and validation schemas for both frontend and backend",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",