@lyxa.ai/core 1.4.5 → 1.4.7
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/frequency-configuration.model.d.ts +2 -2
- package/dist/libraries/mongo/models/embedded/frequency-configuration.model.js +1 -1
- package/dist/libraries/mongo/models/embedded/frequency-configuration.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/profit.model.d.ts +1 -1
- package/dist/libraries/mongo/models/embedded/profit.model.js +5 -5
- package/dist/libraries/mongo/models/embedded/profit.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/service-booking-cancellation-details.model.d.ts +18 -0
- package/dist/libraries/mongo/models/embedded/service-booking-cancellation-details.model.js +77 -0
- package/dist/libraries/mongo/models/embedded/service-booking-cancellation-details.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/{service-order-finance.model.d.ts → service-booking-finance.model.d.ts} +7 -7
- package/dist/libraries/mongo/models/embedded/{service-order-finance.model.js → service-booking-finance.model.js} +22 -22
- package/dist/libraries/mongo/models/embedded/service-booking-finance.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/service-booking-flag.model.d.ts +8 -0
- package/dist/libraries/mongo/models/embedded/{service-order-flag.model.js → service-booking-flag.model.js} +10 -10
- package/dist/libraries/mongo/models/embedded/service-booking-flag.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/{service-order-pricing.model.d.ts → service-booking-pricing.model.d.ts} +1 -1
- package/dist/libraries/mongo/models/embedded/{service-order-pricing.model.js → service-booking-pricing.model.js} +20 -20
- package/dist/libraries/mongo/models/embedded/service-booking-pricing.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/{service-order-settings.model.d.ts → service-booking-settings.model.d.ts} +1 -1
- package/dist/libraries/mongo/models/embedded/{service-order-settings.model.js → service-booking-settings.model.js} +12 -15
- package/dist/libraries/mongo/models/embedded/service-booking-settings.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/status-timeline.model.d.ts +3 -3
- package/dist/libraries/mongo/models/embedded/status-timeline.model.js +5 -5
- package/dist/libraries/mongo/models/embedded/status-timeline.model.js.map +1 -1
- package/dist/libraries/mongo/models/index.d.ts +6 -6
- package/dist/libraries/mongo/models/index.js +7 -7
- package/dist/libraries/mongo/models/index.js.map +1 -1
- package/dist/libraries/mongo/models/product.model.d.ts +1 -0
- package/dist/libraries/mongo/models/product.model.js +6 -0
- package/dist/libraries/mongo/models/product.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/{service-order-review.model.d.ts → service-booking-review.model.d.ts} +3 -3
- package/dist/libraries/mongo/models/providers/{service-order-review.model.js → service-booking-review.model.js} +9 -9
- package/dist/libraries/mongo/models/providers/service-booking-review.model.js.map +1 -0
- package/dist/libraries/mongo/models/review.model.js +1 -1
- package/dist/libraries/mongo/models/review.model.js.map +1 -1
- package/dist/libraries/mongo/models/{service-order.model.d.ts → service-booking.model.d.ts} +16 -14
- package/dist/libraries/mongo/models/{service-order.model.js → service-booking.model.js} +66 -56
- package/dist/libraries/mongo/models/service-booking.model.js.map +1 -0
- package/dist/libraries/mongo/models/vendor.model.d.ts +2 -3
- package/dist/libraries/mongo/models/vendor.model.js +3 -8
- package/dist/libraries/mongo/models/vendor.model.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/dist/types/utilities/enum.d.ts +6 -7
- package/dist/types/utilities/enum.js +33 -34
- package/dist/types/utilities/enum.js.map +1 -1
- package/dist/utilities/enum.d.ts +6 -7
- package/dist/utilities/enum.js +33 -34
- package/dist/utilities/enum.js.map +1 -1
- package/dist/utilities/map.d.ts +2 -2
- package/dist/utilities/map.js +5 -5
- package/dist/utilities/map.js.map +1 -1
- package/package.json +2 -2
- package/dist/libraries/mongo/models/embedded/service-order-cance.model.d.ts +0 -5
- package/dist/libraries/mongo/models/embedded/service-order-cance.model.js +0 -28
- package/dist/libraries/mongo/models/embedded/service-order-cance.model.js.map +0 -1
- package/dist/libraries/mongo/models/embedded/service-order-finance.model.js.map +0 -1
- package/dist/libraries/mongo/models/embedded/service-order-flag.model.d.ts +0 -8
- package/dist/libraries/mongo/models/embedded/service-order-flag.model.js.map +0 -1
- package/dist/libraries/mongo/models/embedded/service-order-pricing.model.js.map +0 -1
- package/dist/libraries/mongo/models/embedded/service-order-settings.model.js.map +0 -1
- package/dist/libraries/mongo/models/providers/service-order-review.model.js.map +0 -1
- package/dist/libraries/mongo/models/service-order.model.js.map +0 -1
|
@@ -9,24 +9,24 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.ServiceBooking = void 0;
|
|
13
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
14
|
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
|
|
18
|
+
const service_booking_flag_model_1 = require("./embedded/service-booking-flag.model");
|
|
19
19
|
const service_cart_model_1 = require("./service-cart.model");
|
|
20
|
-
const
|
|
21
|
-
const
|
|
20
|
+
const service_booking_finance_model_1 = require("./embedded/service-booking-finance.model");
|
|
21
|
+
const service_booking_cancellation_details_model_1 = require("./embedded/service-booking-cancellation-details.model");
|
|
22
22
|
const status_timeline_model_1 = require("./embedded/status-timeline.model");
|
|
23
23
|
const id_generator_1 = require("../../../utilities/id-generator");
|
|
24
24
|
const _1 = require(".");
|
|
25
25
|
const address_model_1 = require("./shared/address.model");
|
|
26
26
|
const duration_model_1 = require("./shared/duration.model");
|
|
27
27
|
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
28
|
-
let
|
|
29
|
-
|
|
28
|
+
let ServiceBooking = class ServiceBooking extends defaultClasses_1.TimeStamps {
|
|
29
|
+
bookingId;
|
|
30
30
|
user;
|
|
31
31
|
vendor;
|
|
32
32
|
parent;
|
|
@@ -51,148 +51,158 @@ let ServiceOrder = class ServiceOrder extends defaultClasses_1.TimeStamps {
|
|
|
51
51
|
overdueAt;
|
|
52
52
|
finance;
|
|
53
53
|
adjustedFinance;
|
|
54
|
-
|
|
54
|
+
cancellationDetails;
|
|
55
|
+
isEndorseLossApplied;
|
|
56
|
+
endorseLossInformation;
|
|
55
57
|
statusTimeline;
|
|
56
58
|
bufferTime;
|
|
57
|
-
|
|
59
|
+
isReviewed;
|
|
58
60
|
isReviewNotificationSent;
|
|
59
61
|
reviews;
|
|
60
62
|
};
|
|
61
|
-
exports.
|
|
63
|
+
exports.ServiceBooking = ServiceBooking;
|
|
62
64
|
__decorate([
|
|
63
65
|
(0, typegoose_1.prop)({ type: String, unique: true }),
|
|
64
66
|
__metadata("design:type", String)
|
|
65
|
-
],
|
|
67
|
+
], ServiceBooking.prototype, "bookingId", void 0);
|
|
66
68
|
__decorate([
|
|
67
69
|
(0, typegoose_1.prop)({ required: true, ref: () => user_model_1.User }),
|
|
68
70
|
__metadata("design:type", Object)
|
|
69
|
-
],
|
|
71
|
+
], ServiceBooking.prototype, "user", void 0);
|
|
70
72
|
__decorate([
|
|
71
73
|
(0, typegoose_1.prop)({ required: true, ref: () => vendor_model_1.Vendor }),
|
|
72
74
|
__metadata("design:type", Object)
|
|
73
|
-
],
|
|
75
|
+
], ServiceBooking.prototype, "vendor", void 0);
|
|
74
76
|
__decorate([
|
|
75
77
|
(0, typegoose_1.prop)({ required: true, ref: () => _1.VendorParent }),
|
|
76
78
|
__metadata("design:type", Object)
|
|
77
|
-
],
|
|
79
|
+
], ServiceBooking.prototype, "parent", void 0);
|
|
78
80
|
__decorate([
|
|
79
81
|
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ServiceType }),
|
|
80
82
|
__metadata("design:type", String)
|
|
81
|
-
],
|
|
83
|
+
], ServiceBooking.prototype, "serviceType", void 0);
|
|
82
84
|
__decorate([
|
|
83
85
|
(0, typegoose_1.prop)({ type: String, enum: enum_1.SubServiceType }),
|
|
84
86
|
__metadata("design:type", String)
|
|
85
|
-
],
|
|
87
|
+
], ServiceBooking.prototype, "subServiceType", void 0);
|
|
86
88
|
__decorate([
|
|
87
89
|
(0, typegoose_1.prop)({ required: true, ref: () => service_cart_model_1.ServiceCart }),
|
|
88
90
|
__metadata("design:type", Object)
|
|
89
|
-
],
|
|
91
|
+
], ServiceBooking.prototype, "cart", void 0);
|
|
90
92
|
__decorate([
|
|
91
93
|
(0, typegoose_1.prop)({ required: true, type: () => address_model_1.RegularOrderAddress }),
|
|
92
94
|
__metadata("design:type", address_model_1.RegularOrderAddress)
|
|
93
|
-
],
|
|
95
|
+
], ServiceBooking.prototype, "userAddress", void 0);
|
|
94
96
|
__decorate([
|
|
95
97
|
(0, typegoose_1.prop)({ required: true, type: duration_model_1.OrderSlotRange, _id: false }),
|
|
96
98
|
__metadata("design:type", duration_model_1.OrderSlotRange)
|
|
97
|
-
],
|
|
99
|
+
], ServiceBooking.prototype, "slotRange", void 0);
|
|
98
100
|
__decorate([
|
|
99
|
-
(0, typegoose_1.prop)({ type: String, enum: enum_1.
|
|
101
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.ServiceBookingStatus, default: enum_1.ServiceBookingStatus.PENDING }),
|
|
100
102
|
__metadata("design:type", String)
|
|
101
|
-
],
|
|
103
|
+
], ServiceBooking.prototype, "status", void 0);
|
|
102
104
|
__decorate([
|
|
103
105
|
(0, typegoose_1.prop)({ ref: () => professional_model_1.Professional }),
|
|
104
106
|
__metadata("design:type", Array)
|
|
105
|
-
],
|
|
107
|
+
], ServiceBooking.prototype, "professionals", void 0);
|
|
106
108
|
__decorate([
|
|
107
109
|
(0, typegoose_1.prop)({ ref: () => professional_model_1.Professional }),
|
|
108
110
|
__metadata("design:type", Object)
|
|
109
|
-
],
|
|
111
|
+
], ServiceBooking.prototype, "responsibleProfessional", void 0);
|
|
110
112
|
__decorate([
|
|
111
|
-
(0, typegoose_1.prop)({ type: () =>
|
|
112
|
-
__metadata("design:type",
|
|
113
|
-
],
|
|
113
|
+
(0, typegoose_1.prop)({ type: () => service_booking_flag_model_1.ServiceBookingFlag, _id: false }),
|
|
114
|
+
__metadata("design:type", service_booking_flag_model_1.ServiceBookingFlag)
|
|
115
|
+
], ServiceBooking.prototype, "flag", void 0);
|
|
114
116
|
__decorate([
|
|
115
117
|
(0, typegoose_1.prop)({ type: Date, default: new Date() }),
|
|
116
118
|
__metadata("design:type", Date)
|
|
117
|
-
],
|
|
119
|
+
], ServiceBooking.prototype, "processedAt", void 0);
|
|
118
120
|
__decorate([
|
|
119
121
|
(0, typegoose_1.prop)({ type: Date }),
|
|
120
122
|
__metadata("design:type", Date)
|
|
121
|
-
],
|
|
123
|
+
], ServiceBooking.prototype, "placedAt", void 0);
|
|
122
124
|
__decorate([
|
|
123
125
|
(0, typegoose_1.prop)({ type: Date }),
|
|
124
126
|
__metadata("design:type", Date)
|
|
125
|
-
],
|
|
127
|
+
], ServiceBooking.prototype, "startedAt", void 0);
|
|
126
128
|
__decorate([
|
|
127
129
|
(0, typegoose_1.prop)({ type: Date }),
|
|
128
130
|
__metadata("design:type", Date)
|
|
129
|
-
],
|
|
131
|
+
], ServiceBooking.prototype, "estimatedCompletionTime", void 0);
|
|
130
132
|
__decorate([
|
|
131
133
|
(0, typegoose_1.prop)({ type: Date }),
|
|
132
134
|
__metadata("design:type", Date)
|
|
133
|
-
],
|
|
135
|
+
], ServiceBooking.prototype, "completedAt", void 0);
|
|
134
136
|
__decorate([
|
|
135
137
|
(0, typegoose_1.prop)({ type: Number }),
|
|
136
138
|
__metadata("design:type", Number)
|
|
137
|
-
],
|
|
139
|
+
], ServiceBooking.prototype, "completionTimeInMinutes", void 0);
|
|
138
140
|
__decorate([
|
|
139
141
|
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
140
142
|
__metadata("design:type", Boolean)
|
|
141
|
-
],
|
|
143
|
+
], ServiceBooking.prototype, "isUrgentOrder", void 0);
|
|
142
144
|
__decorate([
|
|
143
145
|
(0, typegoose_1.prop)({ type: Date }),
|
|
144
146
|
__metadata("design:type", Date)
|
|
145
|
-
],
|
|
147
|
+
], ServiceBooking.prototype, "urgentAt", void 0);
|
|
146
148
|
__decorate([
|
|
147
149
|
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
148
150
|
__metadata("design:type", Boolean)
|
|
149
|
-
],
|
|
151
|
+
], ServiceBooking.prototype, "isOverdue", void 0);
|
|
150
152
|
__decorate([
|
|
151
153
|
(0, typegoose_1.prop)({ type: Date }),
|
|
152
154
|
__metadata("design:type", Date)
|
|
153
|
-
],
|
|
155
|
+
], ServiceBooking.prototype, "overdueAt", void 0);
|
|
154
156
|
__decorate([
|
|
155
|
-
(0, typegoose_1.prop)({ required: true, type:
|
|
156
|
-
__metadata("design:type",
|
|
157
|
-
],
|
|
157
|
+
(0, typegoose_1.prop)({ required: true, type: service_booking_finance_model_1.ServiceBookingFinance, _id: false }),
|
|
158
|
+
__metadata("design:type", service_booking_finance_model_1.ServiceBookingFinance)
|
|
159
|
+
], ServiceBooking.prototype, "finance", void 0);
|
|
158
160
|
__decorate([
|
|
159
|
-
(0, typegoose_1.prop)({ required: true, type:
|
|
160
|
-
__metadata("design:type",
|
|
161
|
-
],
|
|
161
|
+
(0, typegoose_1.prop)({ required: true, type: service_booking_finance_model_1.ServiceBookingFinance, _id: false }),
|
|
162
|
+
__metadata("design:type", service_booking_finance_model_1.ServiceBookingFinance)
|
|
163
|
+
], ServiceBooking.prototype, "adjustedFinance", void 0);
|
|
162
164
|
__decorate([
|
|
163
|
-
(0, typegoose_1.prop)({ type: () =>
|
|
164
|
-
__metadata("design:type",
|
|
165
|
-
],
|
|
165
|
+
(0, typegoose_1.prop)({ type: () => service_booking_cancellation_details_model_1.ServiceBookingCancelllationDetails, _id: false }),
|
|
166
|
+
__metadata("design:type", service_booking_cancellation_details_model_1.ServiceBookingCancelllationDetails)
|
|
167
|
+
], ServiceBooking.prototype, "cancellationDetails", void 0);
|
|
166
168
|
__decorate([
|
|
167
|
-
(0, typegoose_1.prop)({ type:
|
|
169
|
+
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
170
|
+
__metadata("design:type", Boolean)
|
|
171
|
+
], ServiceBooking.prototype, "isEndorseLossApplied", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, typegoose_1.prop)({ type: () => service_booking_cancellation_details_model_1.ServiceBookingEndorseLoss, _id: false }),
|
|
174
|
+
__metadata("design:type", service_booking_cancellation_details_model_1.ServiceBookingEndorseLoss)
|
|
175
|
+
], ServiceBooking.prototype, "endorseLossInformation", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, typegoose_1.prop)({ type: () => [status_timeline_model_1.ServiceBookingStatusTimeline], default: [] }),
|
|
168
178
|
__metadata("design:type", Array)
|
|
169
|
-
],
|
|
179
|
+
], ServiceBooking.prototype, "statusTimeline", void 0);
|
|
170
180
|
__decorate([
|
|
171
181
|
(0, typegoose_1.prop)({ type: Number }),
|
|
172
182
|
__metadata("design:type", Number)
|
|
173
|
-
],
|
|
183
|
+
], ServiceBooking.prototype, "bufferTime", void 0);
|
|
174
184
|
__decorate([
|
|
175
185
|
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
176
186
|
__metadata("design:type", Boolean)
|
|
177
|
-
],
|
|
187
|
+
], ServiceBooking.prototype, "isReviewed", void 0);
|
|
178
188
|
__decorate([
|
|
179
189
|
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
180
190
|
__metadata("design:type", Boolean)
|
|
181
|
-
],
|
|
191
|
+
], ServiceBooking.prototype, "isReviewNotificationSent", void 0);
|
|
182
192
|
__decorate([
|
|
183
193
|
(0, typegoose_1.prop)({
|
|
184
194
|
ref: () => _1.Review,
|
|
185
|
-
foreignField: '
|
|
195
|
+
foreignField: 'serviceBooking',
|
|
186
196
|
localField: '_id',
|
|
187
197
|
}),
|
|
188
198
|
__metadata("design:type", Array)
|
|
189
|
-
],
|
|
190
|
-
exports.
|
|
191
|
-
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: '
|
|
199
|
+
], ServiceBooking.prototype, "reviews", void 0);
|
|
200
|
+
exports.ServiceBooking = ServiceBooking = __decorate([
|
|
201
|
+
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'serviceBookings', timestamps: true } }),
|
|
192
202
|
(0, typegoose_1.pre)('save', async function () {
|
|
193
203
|
if (this.isNew) {
|
|
194
|
-
this.
|
|
204
|
+
this.bookingId = await (0, id_generator_1.generateId)(_1.CounterModel, enum_1.CounterType.BOOKING);
|
|
195
205
|
}
|
|
196
206
|
})
|
|
197
|
-
],
|
|
198
|
-
//# sourceMappingURL=service-
|
|
207
|
+
], ServiceBooking);
|
|
208
|
+
//# sourceMappingURL=service-booking.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-booking.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-booking.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoE;AACpE,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;AAQ9D,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,2BAAU;IAEtC,SAAS,CAAU;IAGnB,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;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E,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;yBAvGnB,cAAc;IAN1B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;IACpF,IAAA,eAAG,EAAiB,MAAM,EAAE,KAAK;QACjC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,SAAS,GAAG,MAAM,IAAA,yBAAU,EAAC,eAAY,EAAE,kBAAW,CAAC,OAAO,CAAC,CAAC;QACtE,CAAC;IACF,CAAC,CAAC;GACW,cAAc,CAwG1B","sourcesContent":["import { modelOptions, pre, prop, Ref } 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({ schemaOptions: { collection: 'serviceBookings', timestamps: true } })\n@pre<ServiceBooking>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.bookingId = await generateId(CounterModel, CounterType.BOOKING);\n\t}\n})\nexport class ServiceBooking extends TimeStamps {\n\t@prop({ type: String, unique: true })\n\tpublic bookingId?: 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 estimatedCompletionTime?: Date;\n\n\t@prop({ type: Date })\n\tpublic completedAt?: Date;\n\n\t@prop({ type: Number })\n\tpublic completionTimeInMinutes?: 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: () => [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"]}
|
|
@@ -6,7 +6,7 @@ import { Address } from './shared/address.model';
|
|
|
6
6
|
import { WorkHourSetting } from './shared/work-hour.model';
|
|
7
7
|
import { Zone } from './zone.model';
|
|
8
8
|
import { VendorParent } from '.';
|
|
9
|
-
import {
|
|
9
|
+
import { ServiceBookingSettings } from './embedded/service-booking-settings.model';
|
|
10
10
|
export declare class Vendor extends TimeStamps {
|
|
11
11
|
vendorId?: string;
|
|
12
12
|
name: string;
|
|
@@ -26,9 +26,8 @@ export declare class Vendor extends TimeStamps {
|
|
|
26
26
|
avgRating?: number;
|
|
27
27
|
isVisibleToUser: boolean;
|
|
28
28
|
ordersCount?: number;
|
|
29
|
-
customersCount?: number;
|
|
30
29
|
bobContactName?: string;
|
|
31
30
|
bobContactPhoneNumber?: string;
|
|
32
|
-
orderSettings?:
|
|
31
|
+
orderSettings?: ServiceBookingSettings;
|
|
33
32
|
workHourSetting?: WorkHourSetting;
|
|
34
33
|
}
|
|
@@ -18,7 +18,7 @@ const address_model_1 = require("./shared/address.model");
|
|
|
18
18
|
const work_hour_model_1 = require("./shared/work-hour.model");
|
|
19
19
|
const zone_model_1 = require("./zone.model");
|
|
20
20
|
const _1 = require(".");
|
|
21
|
-
const
|
|
21
|
+
const service_booking_settings_model_1 = require("./embedded/service-booking-settings.model");
|
|
22
22
|
const id_generator_1 = require("../../../utilities/id-generator");
|
|
23
23
|
let Vendor = class Vendor extends defaultClasses_1.TimeStamps {
|
|
24
24
|
vendorId;
|
|
@@ -39,7 +39,6 @@ let Vendor = class Vendor extends defaultClasses_1.TimeStamps {
|
|
|
39
39
|
avgRating;
|
|
40
40
|
isVisibleToUser;
|
|
41
41
|
ordersCount;
|
|
42
|
-
customersCount;
|
|
43
42
|
bobContactName;
|
|
44
43
|
bobContactPhoneNumber;
|
|
45
44
|
orderSettings;
|
|
@@ -118,10 +117,6 @@ __decorate([
|
|
|
118
117
|
(0, typegoose_1.prop)({ default: 0, type: () => Number }),
|
|
119
118
|
__metadata("design:type", Number)
|
|
120
119
|
], Vendor.prototype, "ordersCount", void 0);
|
|
121
|
-
__decorate([
|
|
122
|
-
(0, typegoose_1.prop)({ default: 0, type: () => Number }),
|
|
123
|
-
__metadata("design:type", Number)
|
|
124
|
-
], Vendor.prototype, "customersCount", void 0);
|
|
125
120
|
__decorate([
|
|
126
121
|
(0, typegoose_1.prop)({ type: String, maxlength: 100 }),
|
|
127
122
|
__metadata("design:type", String)
|
|
@@ -131,8 +126,8 @@ __decorate([
|
|
|
131
126
|
__metadata("design:type", String)
|
|
132
127
|
], Vendor.prototype, "bobContactPhoneNumber", void 0);
|
|
133
128
|
__decorate([
|
|
134
|
-
(0, typegoose_1.prop)({ type: () =>
|
|
135
|
-
__metadata("design:type",
|
|
129
|
+
(0, typegoose_1.prop)({ type: () => service_booking_settings_model_1.ServiceBookingSettings }),
|
|
130
|
+
__metadata("design:type", service_booking_settings_model_1.ServiceBookingSettings)
|
|
136
131
|
], Vendor.prototype, "orderSettings", void 0);
|
|
137
132
|
__decorate([
|
|
138
133
|
(0, typegoose_1.prop)({ type: work_hour_model_1.WorkHourSetting }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendor.model.js","sourceRoot":"/","sources":["libraries/mongo/models/vendor.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAqF;AACrF,4EAAqE;AACrE,kDAA2E;AAC3E,wEAA8D;AAC9D,0DAAiD;AACjD,8DAA2D;AAC3D,6CAAoC;AACpC,wBAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"vendor.model.js","sourceRoot":"/","sources":["libraries/mongo/models/vendor.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAqF;AACrF,4EAAqE;AACrE,kDAA2E;AAC3E,wEAA8D;AAC9D,0DAAiD;AACjD,8DAA2D;AAC3D,6CAAoC;AACpC,wBAA+C;AAC/C,8FAAmF;AACnF,kEAA6D;AActD,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,2BAAU;IAE9B,QAAQ,CAAU;IAGlB,IAAI,CAAU;IAGd,SAAS,CAAU;IAGnB,KAAK,CAAU;IAGf,MAAM,CAAqB;IAG3B,WAAW,CAAe;IAG1B,MAAM,CAAU;IAGhB,WAAW,CAAU;IAGrB,eAAe,CAAU;IAGzB,sBAAsB,CAAY;IAGlC,OAAO,CAAW;IAGlB,KAAK,CAAe;IAGpB,IAAI,CAAU;IAGd,MAAM,CAAU;IAGhB,QAAQ,CAAgB;IAGxB,SAAS,CAAU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P,iCAAe;+CAAC;iBAjE7B,MAAM;IAZlB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE;QACxC,OAAO,EAAE,EAAE,UAAU,EAAE,oBAAQ,CAAC,KAAK,EAAE;KACvC,CAAC;IACD,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;IAClG,IAAA,iBAAK,EAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACjE,IAAA,iBAAK,EAAC,EAAE,WAAW,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;IACnG,IAAA,eAAG,EAAS,MAAM,EAAE,KAAK;QACzB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAA,yBAAU,EAAC,eAAY,EAAE,kBAAW,CAAC,MAAM,CAAC,CAAC;QACpE,CAAC;IACF,CAAC,CAAC;GACW,MAAM,CAkElB","sourcesContent":["import { modelOptions, prop, Ref, Severity, Index, pre } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { CounterType, ServiceType, Status } from '../../../utilities/enum';\nimport { ShopDocument } from './embedded/shop-document.model';\nimport { Address } from './shared/address.model';\nimport { WorkHourSetting } from './shared/work-hour.model';\nimport { Zone } from './zone.model';\nimport { VendorParent, CounterModel } from '.';\nimport { ServiceBookingSettings } from './embedded/service-booking-settings.model';\nimport { generateId } from '../../../utilities/id-generator';\n\n@modelOptions({\n\tschemaOptions: { collection: 'vendors' },\n\toptions: { allowMixed: Severity.ALLOW },\n})\n@Index({ name: 1, serviceType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\n@Index({ parent: 1, status: 1, isVisibleToUser: 1, deletedAt: 1 })\n@Index({ serviceType: 1, zones: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\n@pre<Vendor>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.vendorId = await generateId(CounterModel, CounterType.VENDOR);\n\t}\n})\nexport class Vendor extends TimeStamps {\n\t@prop({ type: String, unique: true, index: true })\n\tpublic vendorId?: string;\n\n\t@prop({ required: true, type: String })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic ownerName!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic email!: string;\n\n\t@prop({ required: true, ref: () => VendorParent })\n\tpublic parent!: Ref<VendorParent>;\n\n\t@prop({ type: String, enum: ServiceType })\n\tpublic serviceType?: ServiceType;\n\n\t@prop({ required: true, type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status!: Status;\n\n\t@prop({ required: true, type: String })\n\tpublic phoneNumber!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic userPhoneNumber!: string;\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic additionalPhoneNumbers?: string[];\n\n\t@prop({ required: true, type: Address })\n\tpublic address!: Address;\n\n\t@prop({ required: true, ref: () => Zone })\n\tpublic zones!: Ref<Zone>[];\n\n\t@prop({ type: String })\n\tpublic logo?: string;\n\n\t@prop({ type: String })\n\tpublic banner?: string;\n\n\t@prop({ type: ShopDocument })\n\tpublic document?: ShopDocument;\n\n\t@prop({ default: 0, type: () => Number })\n\tpublic avgRating?: number;\n\n\t@prop({ required: true, type: Boolean })\n\tpublic isVisibleToUser!: boolean;\n\n\t@prop({ default: 0, type: () => Number })\n\tpublic ordersCount?: number;\n\n\t@prop({ type: String, maxlength: 100 })\n\tpublic bobContactName?: string;\n\n\t@prop({ type: String, maxlength: 15 })\n\tpublic bobContactPhoneNumber?: string;\n\n\t@prop({ type: () => ServiceBookingSettings })\n\tpublic orderSettings?: ServiceBookingSettings;\n\n\t@prop({ type: WorkHourSetting })\n\tpublic workHourSetting?: WorkHourSetting;\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -590,7 +590,7 @@ export declare enum CourierOrderStatus {
|
|
|
590
590
|
DELIVERED = "delivered",
|
|
591
591
|
CANCELLED = "cancelled"
|
|
592
592
|
}
|
|
593
|
-
export declare enum
|
|
593
|
+
export declare enum ServiceBookingStatus {
|
|
594
594
|
PENDING = "pending",
|
|
595
595
|
CONFIRMED = "confirmed",
|
|
596
596
|
IN_PROGRESS = "in_progress",
|
|
@@ -764,7 +764,7 @@ export declare enum ProfessionalStatus {
|
|
|
764
764
|
BUSY = "busy",
|
|
765
765
|
FULLY_BOOKED = "fully_booked"
|
|
766
766
|
}
|
|
767
|
-
export declare enum
|
|
767
|
+
export declare enum ServiceBookingPriority {
|
|
768
768
|
NORMAL = "normal",
|
|
769
769
|
URGENT = "urgent",
|
|
770
770
|
FLAGGED = "flagged"
|
|
@@ -774,7 +774,7 @@ export declare enum ProfessionalRecurrencePattern {
|
|
|
774
774
|
WEEKLY = "weekly",
|
|
775
775
|
MONTHLY = "monthly"
|
|
776
776
|
}
|
|
777
|
-
export declare enum
|
|
777
|
+
export declare enum ServiceBookingRecurrencePattern {
|
|
778
778
|
ONETIME = "onetime",
|
|
779
779
|
WEEKLY = "weekly",
|
|
780
780
|
MONTHLY = "monthly"
|
|
@@ -816,9 +816,8 @@ export declare enum TRPCErrorEnum {
|
|
|
816
816
|
GATEWAY_TIMEOUT = "GATEWAY_TIMEOUT",
|
|
817
817
|
SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE"
|
|
818
818
|
}
|
|
819
|
-
export declare enum
|
|
819
|
+
export declare enum ServiceBookingCanceledBy {
|
|
820
820
|
USER = "user",
|
|
821
|
-
SHOP = "vendor",
|
|
822
821
|
ADMIN = "admin"
|
|
823
822
|
}
|
|
824
823
|
export declare enum PromotionType {
|
|
@@ -866,7 +865,7 @@ export declare enum ReviewType {
|
|
|
866
865
|
SHOP = "shop",
|
|
867
866
|
RIDER = "rider",
|
|
868
867
|
PROFESSIONAL = "professional",
|
|
869
|
-
|
|
868
|
+
SERVICE_BOOKING = "service_booking"
|
|
870
869
|
}
|
|
871
870
|
export declare enum OtpMethodType {
|
|
872
871
|
SMS = "sms",
|
|
@@ -958,7 +957,7 @@ export declare enum AppAppearanceType {
|
|
|
958
957
|
SPLASH = "splash",
|
|
959
958
|
HEADERS = "headers"
|
|
960
959
|
}
|
|
961
|
-
export declare enum
|
|
960
|
+
export declare enum ServiceBookingActionType {
|
|
962
961
|
RESCHEDULE = "reschedule",
|
|
963
962
|
REFUND = "refund"
|
|
964
963
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
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
|
-
exports.RewardedToTypeEnum = exports.ReplacementType = 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.
|
|
5
|
-
exports.RiderScoreEventTag = exports.AreebaPaymentType = exports.HttpStatus = exports.LogTag = exports.LogLevel = exports.SyncCacheEnumType = exports.DateFormatType = exports.
|
|
4
|
+
exports.RewardedToTypeEnum = exports.ReplacementType = 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.StatusTimelineType = exports.OrderType = exports.Language = exports.OrderSize = exports.RiderBagSize = exports.RiderType = exports.ShiftType = exports.CreatedBy = exports.LiveStatus = exports.PaymentIntentStatus = exports.CardStatus = exports.CardUserType = 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.RiderScoreEventTag = exports.AreebaPaymentType = exports.HttpStatus = exports.LogTag = exports.LogLevel = exports.SyncCacheEnumType = exports.DateFormatType = exports.ServiceBookingActionType = 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.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 = void 0;
|
|
6
6
|
var AuthEntityType;
|
|
7
7
|
(function (AuthEntityType) {
|
|
8
8
|
AuthEntityType["USER"] = "USER";
|
|
@@ -671,14 +671,14 @@ var CourierOrderStatus;
|
|
|
671
671
|
CourierOrderStatus["DELIVERED"] = "delivered";
|
|
672
672
|
CourierOrderStatus["CANCELLED"] = "cancelled";
|
|
673
673
|
})(CourierOrderStatus || (exports.CourierOrderStatus = CourierOrderStatus = {}));
|
|
674
|
-
var
|
|
675
|
-
(function (
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
})(
|
|
674
|
+
var ServiceBookingStatus;
|
|
675
|
+
(function (ServiceBookingStatus) {
|
|
676
|
+
ServiceBookingStatus["PENDING"] = "pending";
|
|
677
|
+
ServiceBookingStatus["CONFIRMED"] = "confirmed";
|
|
678
|
+
ServiceBookingStatus["IN_PROGRESS"] = "in_progress";
|
|
679
|
+
ServiceBookingStatus["COMPLETED"] = "completed";
|
|
680
|
+
ServiceBookingStatus["CANCELLED"] = "cancelled";
|
|
681
|
+
})(ServiceBookingStatus || (exports.ServiceBookingStatus = ServiceBookingStatus = {}));
|
|
682
682
|
var ShopCourierOrderStatus;
|
|
683
683
|
(function (ShopCourierOrderStatus) {
|
|
684
684
|
ShopCourierOrderStatus["PLACED"] = "placed";
|
|
@@ -877,24 +877,24 @@ var ProfessionalStatus;
|
|
|
877
877
|
ProfessionalStatus["BUSY"] = "busy";
|
|
878
878
|
ProfessionalStatus["FULLY_BOOKED"] = "fully_booked";
|
|
879
879
|
})(ProfessionalStatus || (exports.ProfessionalStatus = ProfessionalStatus = {}));
|
|
880
|
-
var
|
|
881
|
-
(function (
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
})(
|
|
880
|
+
var ServiceBookingPriority;
|
|
881
|
+
(function (ServiceBookingPriority) {
|
|
882
|
+
ServiceBookingPriority["NORMAL"] = "normal";
|
|
883
|
+
ServiceBookingPriority["URGENT"] = "urgent";
|
|
884
|
+
ServiceBookingPriority["FLAGGED"] = "flagged";
|
|
885
|
+
})(ServiceBookingPriority || (exports.ServiceBookingPriority = ServiceBookingPriority = {}));
|
|
886
886
|
var ProfessionalRecurrencePattern;
|
|
887
887
|
(function (ProfessionalRecurrencePattern) {
|
|
888
888
|
ProfessionalRecurrencePattern["DAILY"] = "daily";
|
|
889
889
|
ProfessionalRecurrencePattern["WEEKLY"] = "weekly";
|
|
890
890
|
ProfessionalRecurrencePattern["MONTHLY"] = "monthly";
|
|
891
891
|
})(ProfessionalRecurrencePattern || (exports.ProfessionalRecurrencePattern = ProfessionalRecurrencePattern = {}));
|
|
892
|
-
var
|
|
893
|
-
(function (
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
})(
|
|
892
|
+
var ServiceBookingRecurrencePattern;
|
|
893
|
+
(function (ServiceBookingRecurrencePattern) {
|
|
894
|
+
ServiceBookingRecurrencePattern["ONETIME"] = "onetime";
|
|
895
|
+
ServiceBookingRecurrencePattern["WEEKLY"] = "weekly";
|
|
896
|
+
ServiceBookingRecurrencePattern["MONTHLY"] = "monthly";
|
|
897
|
+
})(ServiceBookingRecurrencePattern || (exports.ServiceBookingRecurrencePattern = ServiceBookingRecurrencePattern = {}));
|
|
898
898
|
var ProfessionalScheduleType;
|
|
899
899
|
(function (ProfessionalScheduleType) {
|
|
900
900
|
ProfessionalScheduleType["BLOCK"] = "block";
|
|
@@ -936,12 +936,11 @@ var TRPCErrorEnum;
|
|
|
936
936
|
TRPCErrorEnum["GATEWAY_TIMEOUT"] = "GATEWAY_TIMEOUT";
|
|
937
937
|
TRPCErrorEnum["SERVICE_UNAVAILABLE"] = "SERVICE_UNAVAILABLE";
|
|
938
938
|
})(TRPCErrorEnum || (exports.TRPCErrorEnum = TRPCErrorEnum = {}));
|
|
939
|
-
var
|
|
940
|
-
(function (
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
})(ServiceOrderCanceledBy || (exports.ServiceOrderCanceledBy = ServiceOrderCanceledBy = {}));
|
|
939
|
+
var ServiceBookingCanceledBy;
|
|
940
|
+
(function (ServiceBookingCanceledBy) {
|
|
941
|
+
ServiceBookingCanceledBy["USER"] = "user";
|
|
942
|
+
ServiceBookingCanceledBy["ADMIN"] = "admin";
|
|
943
|
+
})(ServiceBookingCanceledBy || (exports.ServiceBookingCanceledBy = ServiceBookingCanceledBy = {}));
|
|
945
944
|
var PromotionType;
|
|
946
945
|
(function (PromotionType) {
|
|
947
946
|
PromotionType["PACKAGE"] = "package";
|
|
@@ -994,7 +993,7 @@ var ReviewType;
|
|
|
994
993
|
ReviewType["SHOP"] = "shop";
|
|
995
994
|
ReviewType["RIDER"] = "rider";
|
|
996
995
|
ReviewType["PROFESSIONAL"] = "professional";
|
|
997
|
-
ReviewType["
|
|
996
|
+
ReviewType["SERVICE_BOOKING"] = "service_booking";
|
|
998
997
|
})(ReviewType || (exports.ReviewType = ReviewType = {}));
|
|
999
998
|
var OtpMethodType;
|
|
1000
999
|
(function (OtpMethodType) {
|
|
@@ -1104,11 +1103,11 @@ var AppAppearanceType;
|
|
|
1104
1103
|
AppAppearanceType["SPLASH"] = "splash";
|
|
1105
1104
|
AppAppearanceType["HEADERS"] = "headers";
|
|
1106
1105
|
})(AppAppearanceType || (exports.AppAppearanceType = AppAppearanceType = {}));
|
|
1107
|
-
var
|
|
1108
|
-
(function (
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
})(
|
|
1106
|
+
var ServiceBookingActionType;
|
|
1107
|
+
(function (ServiceBookingActionType) {
|
|
1108
|
+
ServiceBookingActionType["RESCHEDULE"] = "reschedule";
|
|
1109
|
+
ServiceBookingActionType["REFUND"] = "refund";
|
|
1110
|
+
})(ServiceBookingActionType || (exports.ServiceBookingActionType = ServiceBookingActionType = {}));
|
|
1112
1111
|
var DateFormatType;
|
|
1113
1112
|
(function (DateFormatType) {
|
|
1114
1113
|
DateFormatType["YYYY_MM_DD"] = "YYYY-MM-DD";
|