@lyxa.ai/core 1.4.49 → 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.
- package/dist/libraries/mongo/models/embedded/service-booking-refund-information.model.d.ts +16 -0
- package/dist/libraries/mongo/models/embedded/service-booking-refund-information.model.js +70 -0
- package/dist/libraries/mongo/models/embedded/service-booking-refund-information.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/service-booking-replacement-information.model.d.ts +19 -0
- package/dist/libraries/mongo/models/embedded/service-booking-replacement-information.model.js +76 -0
- package/dist/libraries/mongo/models/embedded/service-booking-replacement-information.model.js.map +1 -0
- package/dist/libraries/mongo/models/service-booking.model.d.ts +11 -2
- package/dist/libraries/mongo/models/service-booking.model.js +47 -6
- package/dist/libraries/mongo/models/service-booking.model.js.map +1 -1
- package/dist/libraries/mongo/models/service-flag.model.d.ts +13 -0
- package/dist/libraries/mongo/models/service-flag.model.js +54 -0
- package/dist/libraries/mongo/models/service-flag.model.js.map +1 -0
- package/dist/libraries/trpc/middlewares/auth.d.ts +1 -1
- package/dist/libraries/trpc/middlewares/createRoleProtectedProcedure.d.ts +1 -1
- package/dist/libraries/trpc/middlewares/phone-verified.d.ts +1 -1
- package/dist/libraries/trpc/middlewares/publicUserDecoder.d.ts +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/dist/types/utilities/enum.d.ts +8 -4
- package/dist/types/utilities/enum.js +12 -7
- package/dist/types/utilities/enum.js.map +1 -1
- package/dist/types/utilities/validation/common-validation.d.ts +12 -12
- package/dist/utilities/enum.d.ts +8 -4
- package/dist/utilities/enum.js +12 -7
- package/dist/utilities/enum.js.map +1 -1
- package/package.json +1 -1
- package/dist/libraries/mongo/models/embedded/service-booking-flag.model.d.ts +0 -8
- package/dist/libraries/mongo/models/embedded/service-booking-flag.model.js +0 -43
- 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"]}
|
package/dist/libraries/mongo/models/embedded/service-booking-replacement-information.model.d.ts
ADDED
|
@@ -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
|
package/dist/libraries/mongo/models/embedded/service-booking-replacement-information.model.js.map
ADDED
|
@@ -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;IAG3B,MAAM,CAAwB;IA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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,iBAAiB,CAAmC;I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E,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"]}
|
|
@@ -5,9 +5,9 @@ interface AuthOptions {
|
|
|
5
5
|
autoRefresh?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare function createAuthenticatedProcedure(options: AuthOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
|
|
8
|
-
req: import("http").IncomingMessage;
|
|
9
8
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
10
9
|
tokenType: TokenType | undefined;
|
|
10
|
+
req: import("http").IncomingMessage;
|
|
11
11
|
requestId: string | undefined;
|
|
12
12
|
entity: import("../context").EntityContext | undefined;
|
|
13
13
|
usedRefreshToken: boolean | undefined;
|
|
@@ -4,9 +4,9 @@ interface RoleProtectedOptions {
|
|
|
4
4
|
allowedRoles: string[];
|
|
5
5
|
}
|
|
6
6
|
export declare function createRoleProtectedProcedure(options: RoleProtectedOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
|
|
7
|
-
req: import("http").IncomingMessage;
|
|
8
7
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
9
8
|
tokenType: import("../../auth").TokenType | undefined;
|
|
9
|
+
req: import("http").IncomingMessage;
|
|
10
10
|
requestId: string | undefined;
|
|
11
11
|
entity: import("../context").EntityContext | undefined;
|
|
12
12
|
usedRefreshToken: boolean | undefined;
|
|
@@ -3,9 +3,9 @@ interface PhoneVerifiedOptions {
|
|
|
3
3
|
entityTypes: AuthEntityType[];
|
|
4
4
|
}
|
|
5
5
|
export declare function createPhoneVerifiedProcedure(options: PhoneVerifiedOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
|
|
6
|
-
req: import("http").IncomingMessage;
|
|
7
6
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
8
7
|
tokenType: import("../../auth").TokenType | undefined;
|
|
8
|
+
req: import("http").IncomingMessage;
|
|
9
9
|
requestId: string | undefined;
|
|
10
10
|
entity: import("../context").EntityContext | undefined;
|
|
11
11
|
usedRefreshToken: boolean | undefined;
|
|
@@ -5,9 +5,9 @@ interface AuthOptions {
|
|
|
5
5
|
autoRefresh?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare function publicUserDecoder(options: AuthOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
|
|
8
|
-
req: import("http").IncomingMessage;
|
|
9
8
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
10
9
|
tokenType: TokenType | undefined;
|
|
10
|
+
req: import("http").IncomingMessage;
|
|
11
11
|
requestId: string | undefined;
|
|
12
12
|
entity: import("../context").EntityContext | undefined;
|
|
13
13
|
usedRefreshToken: boolean | undefined;
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -857,6 +857,14 @@ export declare enum FlagReasonType {
|
|
|
857
857
|
HIGH_VALUE_FIRST_ORDER = "high_value_first_order",
|
|
858
858
|
ADJUSTED_ORDER_REQUEST_IGNORED = "adjusted_order_request_ignored"
|
|
859
859
|
}
|
|
860
|
+
export declare enum ServiceFlagType {
|
|
861
|
+
REPLACEMENT = "replacement",
|
|
862
|
+
REFUNDED = "refunded"
|
|
863
|
+
}
|
|
864
|
+
export declare enum ServiceFlagReasonType {
|
|
865
|
+
INCOMPLETE_SERVICE = "incomplete_service",
|
|
866
|
+
OTHER = "other"
|
|
867
|
+
}
|
|
860
868
|
export declare enum UrgentOrderReasons {
|
|
861
869
|
SHOP_INACTION = "shop_inaction",
|
|
862
870
|
RIDER_INACTION = "rider_inaction",
|
|
@@ -970,10 +978,6 @@ export declare enum AppAppearanceType {
|
|
|
970
978
|
SPLASH = "splash",
|
|
971
979
|
HEADERS = "headers"
|
|
972
980
|
}
|
|
973
|
-
export declare enum ServiceBookingActionType {
|
|
974
|
-
RESCHEDULE = "reschedule",
|
|
975
|
-
REFUND = "refund"
|
|
976
|
-
}
|
|
977
981
|
export declare enum DateFormatType {
|
|
978
982
|
YYYY_MM_DD = "YYYY-MM-DD",
|
|
979
983
|
DD_MM_YYYY = "DD-MM-YYYY",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BobType = exports.BobChannelType = exports.BobModel = exports.BobSettlementStatus = exports.BobSettlementType = exports.BobAccountType = exports.ZoneStatus = exports.FaqAccountType = exports.CounterType = exports.BannerUserType = exports.BannerLinkType = exports.BannerClickType = exports.VendorRole = exports.ShopRole = exports.OnlineStatus = exports.ShopOnlineStatus = exports.ChargeType = exports.ClickType = exports.NotificationAccountType = exports.DishCategory = exports.ProductDietaryType = exports.ShopDietaryType = exports.PriceOption = exports.ProductType = exports.CoreAuthIdentityType = exports.UserAppSectionItemType = exports.UserAppSectionType = exports.AdminLogsUpdatedFieldsType = exports.UpdatedField = exports.GeoLocationType = exports.RatingAccountType = exports.SubscriptionStatus = exports.SubscriptionPackage = exports.PaidCurrency = exports.PaymentStatus = exports.ChangeReturnMethod = exports.PaymentMethod = exports.ValueType = exports.HolidayWorkStatus = exports.WorkStatus = exports.WeekDay = exports.GlobalItemType = exports.AdjustmentStatus = exports.ServiceItemType = exports.ItemType = exports.Status = exports.AppPlatform = exports.AccountType = exports.AgentLiveStatus = exports.AuthEntityType = void 0;
|
|
4
4
|
exports.ReplacementReason = exports.OrderCanceledBy = exports.LogUser = exports.PayoutStatus = exports.PayoutType = exports.AddRemoveCreditAccountType = exports.SettingsReasonStatus = exports.CancellationReasonTypeEnum = exports.SupportReasonTypeEnum = exports.PlusSettingsPackageType = exports.AddRemoveCreditSettlementType = exports.SettlementType = exports.MediaType = exports.WorkingHourSettingsType = exports.ZoneGeometryType = exports.RiderAssignmentStatus = exports.CourierServiceType = exports.TripLegStatus = exports.DeliveryStatus = exports.CourierOrderPaymentFrom = exports.ShopCourierOrderStatus = exports.ServiceBookingStatus = exports.CourierOrderStatus = exports.RegularOrderStatus = exports.AdjustmentType = exports.ServiceBookingStatusTimelineType = exports.StatusTimelineType = exports.OrderType = exports.Language = exports.OrderSize = exports.RiderBagSize = exports.RiderType = exports.ShiftType = exports.CreatedBy = exports.LiveStatus = exports.PaymentIntentStatus = exports.CardStatus = exports.CardUserType = exports.PaymentProvider = exports.CardType = exports.PaymentPreference = exports.CartStatus = exports.AdminRole = exports.PunchMarketingStatus = exports.MarketingStatus = exports.ServiceMarketingType = exports.MarketingType = exports.FavouriteType = exports.CouponExpirationReason = exports.CouponType = void 0;
|
|
5
|
-
exports.
|
|
6
|
-
exports.BarcodeTypes = exports.RiderScoreEventTag = void 0;
|
|
5
|
+
exports.HttpStatus = exports.LogTag = exports.LogLevel = exports.SyncCacheEnumType = exports.DateFormatType = exports.AppAppearanceType = exports.GraphType = exports.CalendarEventType = exports.CalendarViewType = exports.LyxaTimeZoneEnum = exports.UserOrderCompletionScope = exports.GroupCartNotificationStatus = exports.Currency = exports.RequestFrom = exports.UploadState = exports.SubServiceType = exports.ServiceType = exports.ActionType = exports.DeviceType = exports.PushNotificationEventType = exports.SocketEventType = exports.SocketServiceQueue = exports.OtpMethodType = exports.ReviewType = exports.FoodNutritionType = exports.AdjustmentReason = exports.UrgentOrderReasons = exports.ServiceFlagReasonType = exports.ServiceFlagType = exports.FlagReasonType = exports.FlagType = exports.PromotionType = exports.ServiceBookingCanceledBy = exports.TRPCErrorEnum = exports.ShopFilterSortByEnum = exports.BookingStatus = exports.ProfessionalScheduleType = exports.ServiceBookingRecurrencePattern = exports.ProfessionalRecurrencePattern = exports.ServiceBookingPriority = exports.ProfessionalStatus = exports.Service = exports.ServiceLineItemType = exports.ServiceCartStatus = exports.ChatroomType = exports.UserRef = exports.TicketStatus = exports.TicketType = exports.RewardedToTypeEnum = exports.ReplacementType = void 0;
|
|
6
|
+
exports.BarcodeTypes = exports.RiderScoreEventTag = exports.AreebaPaymentType = void 0;
|
|
7
7
|
var AuthEntityType;
|
|
8
8
|
(function (AuthEntityType) {
|
|
9
9
|
AuthEntityType["USER"] = "USER";
|
|
@@ -984,6 +984,16 @@ var FlagReasonType;
|
|
|
984
984
|
FlagReasonType["HIGH_VALUE_FIRST_ORDER"] = "high_value_first_order";
|
|
985
985
|
FlagReasonType["ADJUSTED_ORDER_REQUEST_IGNORED"] = "adjusted_order_request_ignored";
|
|
986
986
|
})(FlagReasonType || (exports.FlagReasonType = FlagReasonType = {}));
|
|
987
|
+
var ServiceFlagType;
|
|
988
|
+
(function (ServiceFlagType) {
|
|
989
|
+
ServiceFlagType["REPLACEMENT"] = "replacement";
|
|
990
|
+
ServiceFlagType["REFUNDED"] = "refunded";
|
|
991
|
+
})(ServiceFlagType || (exports.ServiceFlagType = ServiceFlagType = {}));
|
|
992
|
+
var ServiceFlagReasonType;
|
|
993
|
+
(function (ServiceFlagReasonType) {
|
|
994
|
+
ServiceFlagReasonType["INCOMPLETE_SERVICE"] = "incomplete_service";
|
|
995
|
+
ServiceFlagReasonType["OTHER"] = "other";
|
|
996
|
+
})(ServiceFlagReasonType || (exports.ServiceFlagReasonType = ServiceFlagReasonType = {}));
|
|
987
997
|
var UrgentOrderReasons;
|
|
988
998
|
(function (UrgentOrderReasons) {
|
|
989
999
|
UrgentOrderReasons["SHOP_INACTION"] = "shop_inaction";
|
|
@@ -1119,11 +1129,6 @@ var AppAppearanceType;
|
|
|
1119
1129
|
AppAppearanceType["SPLASH"] = "splash";
|
|
1120
1130
|
AppAppearanceType["HEADERS"] = "headers";
|
|
1121
1131
|
})(AppAppearanceType || (exports.AppAppearanceType = AppAppearanceType = {}));
|
|
1122
|
-
var ServiceBookingActionType;
|
|
1123
|
-
(function (ServiceBookingActionType) {
|
|
1124
|
-
ServiceBookingActionType["RESCHEDULE"] = "reschedule";
|
|
1125
|
-
ServiceBookingActionType["REFUND"] = "refund";
|
|
1126
|
-
})(ServiceBookingActionType || (exports.ServiceBookingActionType = ServiceBookingActionType = {}));
|
|
1127
1132
|
var DateFormatType;
|
|
1128
1133
|
(function (DateFormatType) {
|
|
1129
1134
|
DateFormatType["YYYY_MM_DD"] = "YYYY-MM-DD";
|