@lyxa.ai/core 1.4.185 → 1.4.187
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/service-booking.model.d.ts +1 -0
- package/dist/libraries/mongo/models/service-booking.model.js +5 -0
- package/dist/libraries/mongo/models/service-booking.model.js.map +1 -1
- package/dist/libraries/socket/events/ticket-actions.socket.event.d.ts +13 -0
- package/dist/libraries/socket/events/ticket-actions.socket.event.js +3 -0
- package/dist/libraries/socket/events/ticket-actions.socket.event.js.map +1 -1
- 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/validation/common-validation.d.ts +12 -12
- package/package.json +1 -1
|
@@ -40,6 +40,7 @@ export declare class ServiceBooking extends TimeStamps {
|
|
|
40
40
|
finance: ServiceBookingFinance;
|
|
41
41
|
adjustedFinance: ServiceBookingFinance;
|
|
42
42
|
cancellationDetails?: ServiceBookingCancellationDetails;
|
|
43
|
+
cancelledAt?: Date;
|
|
43
44
|
isEndorseLossApplied?: boolean;
|
|
44
45
|
endorseLossInformation?: ServiceBookingEndorseLoss;
|
|
45
46
|
isAdjusted?: boolean;
|
|
@@ -53,6 +53,7 @@ let ServiceBooking = class ServiceBooking extends defaultClasses_1.TimeStamps {
|
|
|
53
53
|
finance;
|
|
54
54
|
adjustedFinance;
|
|
55
55
|
cancellationDetails;
|
|
56
|
+
cancelledAt;
|
|
56
57
|
isEndorseLossApplied;
|
|
57
58
|
endorseLossInformation;
|
|
58
59
|
isAdjusted;
|
|
@@ -172,6 +173,10 @@ __decorate([
|
|
|
172
173
|
(0, typegoose_1.prop)({ type: () => service_booking_cancellation_details_model_1.ServiceBookingCancellationDetails, _id: false }),
|
|
173
174
|
__metadata("design:type", service_booking_cancellation_details_model_1.ServiceBookingCancellationDetails)
|
|
174
175
|
], ServiceBooking.prototype, "cancellationDetails", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, typegoose_1.prop)({ type: Date }),
|
|
178
|
+
__metadata("design:type", Date)
|
|
179
|
+
], ServiceBooking.prototype, "cancelledAt", void 0);
|
|
175
180
|
__decorate([
|
|
176
181
|
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
177
182
|
__metadata("design:type", Boolean)
|
|
@@ -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,kDAOiC;AACjC,6DAAoD;AACpD,6DAAmD;AACnD,4FAAiF;AACjF,sHAG+D;AAC/D,4EAAgF;AAChF,wBAAuD;AACvD,uEAA6D;AAC7D,0DAA6D;AAC7D,4DAAyD;AACzD,4EAAqE;AACrE,kHAAsG;AACtG,4HAAgH;AAChH,6DAAmD;AACnD,oDAAiD;AA4B1C,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,2BAAU;IAEtC,OAAO,CAAU;IAGjB,IAAI,CAAa;IAGjB,MAAM,CAAe;IAGrB,YAAY,CAAqB;IAGjC,WAAW,CAAe;IAG1B,cAAc,CAAkB;IAGhC,IAAI,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,QAAQ,CAAW;IAGnB,QAAQ,CAAQ;IAGh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ACD,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAC3B,CAAC;YAEF,IAAI,CAAC,OAAO,GAAG,GAAG,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;QACvE,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,cAAc,CAgJ1B","sourcesContent":["import { modelOptions, pre, prop, Ref, Severity } from '@typegoose/typegoose';\nimport { User } from './user.model';\nimport { Vendor } from './vendor.model';\nimport {\n\tServiceBookingStatus,\n\tCounterType,\n\tServiceType,\n\tSubServiceType,\n\tAdjustmentStatus,\n\tOnlinePaymentStatus,\n} from '../../../utilities/enum';\nimport { Professional } from './professional.model';\nimport { ServiceCart } from './service-cart.model';\nimport { ServiceBookingFinance } from './embedded/service-booking-finance.model';\nimport {\n\tServiceBookingCancellationDetails,\n\tServiceBookingEndorseLoss,\n} from './embedded/service-booking-cancellation-details.model';\nimport { ServiceBookingStatusTimeline } from './embedded/status-timeline.model';\nimport { CounterModel, Review, VendorParent } from '.';\nimport { ServicePromotion } from './service-promotion.model';\nimport { RegularOrderAddress } from './shared/address.model';\nimport { OrderSlotRange } from './shared/duration.model';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ServiceBookingRefundInformation } from './embedded/service-booking-refund-information.model';\nimport { ServiceBookingReplacementInformation } from './embedded/service-booking-replacement-information.model';\nimport { ServiceFlag } from './service-flag.model';\nimport { dayjs } from '../../../utilities/dayjs';\n@modelOptions({\n\tschemaOptions: { collection: 'serviceBookings', timestamps: true },\n\toptions: { allowMixed: Severity.ALLOW },\n})\n@pre<ServiceBooking>('validate', async function (next) {\n\tif (this.isNew) {\n\t\tconst today = dayjs().format('DDMMYY');\n\n\t\tconst counter = await CounterModel.findOneAndUpdate(\n\t\t\t{ counterType: CounterType.ORDER },\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\t$set: {\n\t\t\t\t\t\tvalue: {\n\t\t\t\t\t\t\t$cond: [{ $eq: ['$today', today] }, { $add: ['$value', 1] }, 1],\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttoday: today,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t\t{ new: true, upsert: true }\n\t\t);\n\n\t\tthis.orderId = `${today}${counter.value.toString().padStart(6, '0')}`;\n\t}\n\tnext();\n})\nexport class ServiceBooking extends TimeStamps {\n\t@prop({ type: String, unique: true })\n\tpublic orderId?: string;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, ref: () => Vendor })\n\tpublic vendor!: Ref<Vendor>;\n\n\t@prop({ required: true, ref: () => VendorParent })\n\tpublic vendorParent!: Ref<VendorParent>;\n\n\t@prop({ required: true, type: String, enum: ServiceType })\n\tpublic serviceType!: ServiceType;\n\n\t@prop({ type: String, enum: SubServiceType })\n\tpublic subServiceType?: SubServiceType;\n\n\t@prop({ required: true, ref: () => ServiceCart })\n\tpublic cart!: Ref<ServiceCart>;\n\n\t@prop({ required: true, type: () => RegularOrderAddress })\n\tpublic userAddress!: RegularOrderAddress;\n\n\t@prop({ required: true, type: OrderSlotRange, _id: false })\n\tpublic slotRange!: OrderSlotRange;\n\n\t@prop({ type: String, enum: ServiceBookingStatus, default: ServiceBookingStatus.PENDING })\n\tpublic status!: ServiceBookingStatus;\n\n\t@prop({ ref: () => Professional })\n\tpublic professionals?: Ref<Professional>[];\n\n\t@prop({ ref: () => Professional })\n\tpublic responsibleProfessional?: Ref<Professional>;\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic processedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic placedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic startedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic estimatedCompletionAt?: Date;\n\n\t@prop({ type: Number })\n\tpublic estimatedCompletionInMinutes?: number;\n\n\t@prop({ type: Date })\n\tpublic completedAt?: Date;\n\n\t@prop({ type: Number })\n\tpublic actualCompletionInMinutes?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isUrgent?: boolean;\n\n\t@prop({ type: Date })\n\tpublic urgentAt?: Date;\n\n\t@prop({ required: true, type: ServiceBookingFinance, _id: false })\n\tpublic finance!: ServiceBookingFinance;\n\n\t@prop({ required: true, type: ServiceBookingFinance, _id: false })\n\tpublic adjustedFinance!: ServiceBookingFinance;\n\n\t@prop({ type: () => ServiceBookingCancellationDetails, _id: false })\n\tpublic cancellationDetails?: ServiceBookingCancellationDetails;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isEndorseLossApplied?: boolean;\n\n\t@prop({ type: () => ServiceBookingEndorseLoss, _id: false })\n\tpublic endorseLossInformation?: ServiceBookingEndorseLoss;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAdjusted?: boolean;\n\n\t@prop({ type: String, enum: AdjustmentStatus, default: AdjustmentStatus.NONE })\n\tpublic adjustmentStatus?: AdjustmentStatus;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isFlagged?: boolean;\n\n\t@prop({ type: Date })\n\tpublic flaggedAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRefunded?: boolean;\n\n\t@prop({ type: ServiceBookingRefundInformation, _id: false })\n\tpublic refundInformation?: ServiceBookingRefundInformation;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReplacement?: boolean;\n\n\t@prop({ type: () => ServiceBookingReplacementInformation, _id: false })\n\tpublic replacementInformation?: ServiceBookingReplacementInformation;\n\n\t@prop({ ref: () => ServiceBooking })\n\tpublic replacementBooking?: Ref<ServiceBooking>;\n\n\t@prop({ type: () => [ServiceBookingStatusTimeline], default: [] })\n\tpublic statusTimeline?: ServiceBookingStatusTimeline[];\n\n\t@prop({ type: Number })\n\tpublic bufferTime?: number; // minutes\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReviewed?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReviewNotificationSent?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLowRated?: boolean;\n\n\t@prop({ ref: () => ServicePromotion })\n\tpublic servicePromotion?: Ref<ServicePromotion>;\n\n\t@prop({ type: String, enum: OnlinePaymentStatus })\n\tpublic onlinePaymentStatus?: OnlinePaymentStatus;\n\n\t@prop({ type: String })\n\tpublic specialInstructions?: string;\n\n\t// Virtual field\n\t@prop({\n\t\tref: () => ServiceFlag,\n\t\tforeignField: 'serviceBooking',\n\t\tlocalField: '_id',\n\t})\n\tpublic flags?: Ref<ServiceFlag>[];\n\n\t@prop({\n\t\tref: () => Review,\n\t\tforeignField: 'serviceBooking',\n\t\tlocalField: '_id',\n\t})\n\tpublic reviews?: Ref<Review>[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"service-booking.model.js","sourceRoot":"/","sources":["libraries/mongo/models/service-booking.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA8E;AAC9E,6CAAoC;AACpC,iDAAwC;AACxC,kDAOiC;AACjC,6DAAoD;AACpD,6DAAmD;AACnD,4FAAiF;AACjF,sHAG+D;AAC/D,4EAAgF;AAChF,wBAAuD;AACvD,uEAA6D;AAC7D,0DAA6D;AAC7D,4DAAyD;AACzD,4EAAqE;AACrE,kHAAsG;AACtG,4HAAgH;AAChH,6DAAmD;AACnD,oDAAiD;AA4B1C,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,2BAAU;IAEtC,OAAO,CAAU;IAGjB,IAAI,CAAa;IAGjB,MAAM,CAAe;IAGrB,YAAY,CAAqB;IAGjC,WAAW,CAAe;IAG1B,cAAc,CAAkB;IAGhC,IAAI,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,q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AAE;wBACL,KAAK,EAAE;4BACN,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;yBAC/D;wBACD,KAAK,EAAE,KAAK;qBACZ;iBACD;aACD,EACD,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAC3B,CAAC;YAEF,IAAI,CAAC,OAAO,GAAG,GAAG,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;QACvE,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,cAAc,CAmJ1B","sourcesContent":["import { modelOptions, pre, prop, Ref, Severity } from '@typegoose/typegoose';\nimport { User } from './user.model';\nimport { Vendor } from './vendor.model';\nimport {\n\tServiceBookingStatus,\n\tCounterType,\n\tServiceType,\n\tSubServiceType,\n\tAdjustmentStatus,\n\tOnlinePaymentStatus,\n} from '../../../utilities/enum';\nimport { Professional } from './professional.model';\nimport { ServiceCart } from './service-cart.model';\nimport { ServiceBookingFinance } from './embedded/service-booking-finance.model';\nimport {\n\tServiceBookingCancellationDetails,\n\tServiceBookingEndorseLoss,\n} from './embedded/service-booking-cancellation-details.model';\nimport { ServiceBookingStatusTimeline } from './embedded/status-timeline.model';\nimport { CounterModel, Review, VendorParent } from '.';\nimport { ServicePromotion } from './service-promotion.model';\nimport { RegularOrderAddress } from './shared/address.model';\nimport { OrderSlotRange } from './shared/duration.model';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { ServiceBookingRefundInformation } from './embedded/service-booking-refund-information.model';\nimport { ServiceBookingReplacementInformation } from './embedded/service-booking-replacement-information.model';\nimport { ServiceFlag } from './service-flag.model';\nimport { dayjs } from '../../../utilities/dayjs';\n@modelOptions({\n\tschemaOptions: { collection: 'serviceBookings', timestamps: true },\n\toptions: { allowMixed: Severity.ALLOW },\n})\n@pre<ServiceBooking>('validate', async function (next) {\n\tif (this.isNew) {\n\t\tconst today = dayjs().format('DDMMYY');\n\n\t\tconst counter = await CounterModel.findOneAndUpdate(\n\t\t\t{ counterType: CounterType.ORDER },\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\t$set: {\n\t\t\t\t\t\tvalue: {\n\t\t\t\t\t\t\t$cond: [{ $eq: ['$today', today] }, { $add: ['$value', 1] }, 1],\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttoday: today,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t\t{ new: true, upsert: true }\n\t\t);\n\n\t\tthis.orderId = `${today}${counter.value.toString().padStart(6, '0')}`;\n\t}\n\tnext();\n})\nexport class ServiceBooking extends TimeStamps {\n\t@prop({ type: String, unique: true })\n\tpublic orderId?: string;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, ref: () => Vendor })\n\tpublic vendor!: Ref<Vendor>;\n\n\t@prop({ required: true, ref: () => VendorParent })\n\tpublic vendorParent!: Ref<VendorParent>;\n\n\t@prop({ required: true, type: String, enum: ServiceType })\n\tpublic serviceType!: ServiceType;\n\n\t@prop({ type: String, enum: SubServiceType })\n\tpublic subServiceType?: SubServiceType;\n\n\t@prop({ required: true, ref: () => ServiceCart })\n\tpublic cart!: Ref<ServiceCart>;\n\n\t@prop({ required: true, type: () => RegularOrderAddress })\n\tpublic userAddress!: RegularOrderAddress;\n\n\t@prop({ required: true, type: OrderSlotRange, _id: false })\n\tpublic slotRange!: OrderSlotRange;\n\n\t@prop({ type: String, enum: ServiceBookingStatus, default: ServiceBookingStatus.PENDING })\n\tpublic status!: ServiceBookingStatus;\n\n\t@prop({ ref: () => Professional })\n\tpublic professionals?: Ref<Professional>[];\n\n\t@prop({ ref: () => Professional })\n\tpublic responsibleProfessional?: Ref<Professional>;\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic processedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic placedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic startedAt?: Date;\n\n\t@prop({ type: Date })\n\tpublic estimatedCompletionAt?: Date;\n\n\t@prop({ type: Number })\n\tpublic estimatedCompletionInMinutes?: number;\n\n\t@prop({ type: Date })\n\tpublic completedAt?: Date;\n\n\t@prop({ type: Number })\n\tpublic actualCompletionInMinutes?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isUrgent?: boolean;\n\n\t@prop({ type: Date })\n\tpublic urgentAt?: Date;\n\n\t@prop({ required: true, type: ServiceBookingFinance, _id: false })\n\tpublic finance!: ServiceBookingFinance;\n\n\t@prop({ required: true, type: ServiceBookingFinance, _id: false })\n\tpublic adjustedFinance!: ServiceBookingFinance;\n\n\t@prop({ type: () => ServiceBookingCancellationDetails, _id: false })\n\tpublic cancellationDetails?: ServiceBookingCancellationDetails;\n\n\t@prop({ type: Date })\n\tpublic cancelledAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isEndorseLossApplied?: boolean;\n\n\t@prop({ type: () => ServiceBookingEndorseLoss, _id: false })\n\tpublic endorseLossInformation?: ServiceBookingEndorseLoss;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAdjusted?: boolean;\n\n\t@prop({ type: String, enum: AdjustmentStatus, default: AdjustmentStatus.NONE })\n\tpublic adjustmentStatus?: AdjustmentStatus;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isFlagged?: boolean;\n\n\t@prop({ type: Date })\n\tpublic flaggedAt?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRefunded?: boolean;\n\n\t@prop({ type: ServiceBookingRefundInformation, _id: false })\n\tpublic refundInformation?: ServiceBookingRefundInformation;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReplacement?: boolean;\n\n\t@prop({ type: () => ServiceBookingReplacementInformation, _id: false })\n\tpublic replacementInformation?: ServiceBookingReplacementInformation;\n\n\t@prop({ ref: () => ServiceBooking })\n\tpublic replacementBooking?: Ref<ServiceBooking>;\n\n\t@prop({ type: () => [ServiceBookingStatusTimeline], default: [] })\n\tpublic statusTimeline?: ServiceBookingStatusTimeline[];\n\n\t@prop({ type: Number })\n\tpublic bufferTime?: number; // minutes\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReviewed?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReviewNotificationSent?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isLowRated?: boolean;\n\n\t@prop({ ref: () => ServicePromotion })\n\tpublic servicePromotion?: Ref<ServicePromotion>;\n\n\t@prop({ type: String, enum: OnlinePaymentStatus })\n\tpublic onlinePaymentStatus?: OnlinePaymentStatus;\n\n\t@prop({ type: String })\n\tpublic specialInstructions?: string;\n\n\t// 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"]}
|
|
@@ -6,6 +6,7 @@ import { NotificationSettings } from '../PushNotificationEvent';
|
|
|
6
6
|
export declare const TicketActionsSocketInputSchema: z.ZodUndefined;
|
|
7
7
|
export declare const TicketActionsSocketOutputSchema: z.ZodObject<{
|
|
8
8
|
_id: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
9
|
+
chatroomId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
9
10
|
status: z.ZodNativeEnum<typeof TicketStatus>;
|
|
10
11
|
type: z.ZodNativeEnum<typeof TicketType>;
|
|
11
12
|
content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
@@ -14,17 +15,20 @@ export declare const TicketActionsSocketOutputSchema: z.ZodObject<{
|
|
|
14
15
|
type: TicketType;
|
|
15
16
|
status: TicketStatus;
|
|
16
17
|
_id: import("mongoose").Types.ObjectId;
|
|
18
|
+
chatroomId: import("mongoose").Types.ObjectId;
|
|
17
19
|
content?: string | undefined;
|
|
18
20
|
title?: string | undefined;
|
|
19
21
|
}, {
|
|
20
22
|
type: TicketType;
|
|
21
23
|
status: TicketStatus;
|
|
22
24
|
_id: import("mongoose").Types.ObjectId;
|
|
25
|
+
chatroomId: import("mongoose").Types.ObjectId;
|
|
23
26
|
content?: string | undefined;
|
|
24
27
|
title?: string | undefined;
|
|
25
28
|
}>;
|
|
26
29
|
export declare const TicketActionsPushOutputSchema: z.ZodObject<{
|
|
27
30
|
ticketId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
31
|
+
chatroomId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
28
32
|
status: z.ZodNativeEnum<typeof TicketStatus>;
|
|
29
33
|
type: z.ZodNativeEnum<typeof TicketType>;
|
|
30
34
|
content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
@@ -33,12 +37,14 @@ export declare const TicketActionsPushOutputSchema: z.ZodObject<{
|
|
|
33
37
|
type: TicketType;
|
|
34
38
|
status: TicketStatus;
|
|
35
39
|
ticketId: import("mongoose").Types.ObjectId;
|
|
40
|
+
chatroomId: import("mongoose").Types.ObjectId;
|
|
36
41
|
content?: string | undefined;
|
|
37
42
|
title?: string | undefined;
|
|
38
43
|
}, {
|
|
39
44
|
type: TicketType;
|
|
40
45
|
status: TicketStatus;
|
|
41
46
|
ticketId: import("mongoose").Types.ObjectId;
|
|
47
|
+
chatroomId: import("mongoose").Types.ObjectId;
|
|
42
48
|
content?: string | undefined;
|
|
43
49
|
title?: string | undefined;
|
|
44
50
|
}>;
|
|
@@ -50,6 +56,7 @@ export declare class TicketActionsSocketEvent extends BaseSocketEvent<typeof Tic
|
|
|
50
56
|
input: z.ZodUndefined;
|
|
51
57
|
output: z.ZodObject<{
|
|
52
58
|
_id: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
59
|
+
chatroomId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
53
60
|
status: z.ZodNativeEnum<typeof TicketStatus>;
|
|
54
61
|
type: z.ZodNativeEnum<typeof TicketType>;
|
|
55
62
|
content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
@@ -58,17 +65,20 @@ export declare class TicketActionsSocketEvent extends BaseSocketEvent<typeof Tic
|
|
|
58
65
|
type: TicketType;
|
|
59
66
|
status: TicketStatus;
|
|
60
67
|
_id: import("mongoose").Types.ObjectId;
|
|
68
|
+
chatroomId: import("mongoose").Types.ObjectId;
|
|
61
69
|
content?: string | undefined;
|
|
62
70
|
title?: string | undefined;
|
|
63
71
|
}, {
|
|
64
72
|
type: TicketType;
|
|
65
73
|
status: TicketStatus;
|
|
66
74
|
_id: import("mongoose").Types.ObjectId;
|
|
75
|
+
chatroomId: import("mongoose").Types.ObjectId;
|
|
67
76
|
content?: string | undefined;
|
|
68
77
|
title?: string | undefined;
|
|
69
78
|
}>;
|
|
70
79
|
pushNotificationOutput: z.ZodObject<{
|
|
71
80
|
ticketId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
81
|
+
chatroomId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
72
82
|
status: z.ZodNativeEnum<typeof TicketStatus>;
|
|
73
83
|
type: z.ZodNativeEnum<typeof TicketType>;
|
|
74
84
|
content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
@@ -77,12 +87,14 @@ export declare class TicketActionsSocketEvent extends BaseSocketEvent<typeof Tic
|
|
|
77
87
|
type: TicketType;
|
|
78
88
|
status: TicketStatus;
|
|
79
89
|
ticketId: import("mongoose").Types.ObjectId;
|
|
90
|
+
chatroomId: import("mongoose").Types.ObjectId;
|
|
80
91
|
content?: string | undefined;
|
|
81
92
|
title?: string | undefined;
|
|
82
93
|
}, {
|
|
83
94
|
type: TicketType;
|
|
84
95
|
status: TicketStatus;
|
|
85
96
|
ticketId: import("mongoose").Types.ObjectId;
|
|
97
|
+
chatroomId: import("mongoose").Types.ObjectId;
|
|
86
98
|
content?: string | undefined;
|
|
87
99
|
title?: string | undefined;
|
|
88
100
|
}>;
|
|
@@ -93,6 +105,7 @@ export declare class TicketActionsSocketEvent extends BaseSocketEvent<typeof Tic
|
|
|
93
105
|
type: TicketType;
|
|
94
106
|
status: TicketStatus;
|
|
95
107
|
ticketId: import("mongoose").Types.ObjectId;
|
|
108
|
+
chatroomId: import("mongoose").Types.ObjectId;
|
|
96
109
|
content?: string | undefined;
|
|
97
110
|
title?: string | undefined;
|
|
98
111
|
} | undefined;
|
|
@@ -11,6 +11,7 @@ const BaseSocketEvent_1 = require("../BaseSocketEvent");
|
|
|
11
11
|
exports.TicketActionsSocketInputSchema = zod_1.default.undefined();
|
|
12
12
|
exports.TicketActionsSocketOutputSchema = zod_1.default.object({
|
|
13
13
|
_id: validation_1.ZodValidation.coerce.objectId(),
|
|
14
|
+
chatroomId: validation_1.ZodValidation.coerce.objectId(),
|
|
14
15
|
status: validation_1.ZodValidation.enumType(enum_1.TicketStatus, 'status'),
|
|
15
16
|
type: validation_1.ZodValidation.enumType(enum_1.TicketType, 'type'),
|
|
16
17
|
content: validation_1.ZodValidation.string('content').optional(),
|
|
@@ -18,6 +19,7 @@ exports.TicketActionsSocketOutputSchema = zod_1.default.object({
|
|
|
18
19
|
});
|
|
19
20
|
exports.TicketActionsPushOutputSchema = zod_1.default.object({
|
|
20
21
|
ticketId: validation_1.ZodValidation.coerce.objectId(),
|
|
22
|
+
chatroomId: validation_1.ZodValidation.coerce.objectId(),
|
|
21
23
|
status: validation_1.ZodValidation.enumType(enum_1.TicketStatus, 'status'),
|
|
22
24
|
type: validation_1.ZodValidation.enumType(enum_1.TicketType, 'type'),
|
|
23
25
|
content: validation_1.ZodValidation.string('content').optional(),
|
|
@@ -40,6 +42,7 @@ class TicketActionsSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
|
|
|
40
42
|
constructor(payload) {
|
|
41
43
|
const pushPayload = {
|
|
42
44
|
ticketId: payload._id,
|
|
45
|
+
chatroomId: payload.chatroomId,
|
|
43
46
|
status: payload.status,
|
|
44
47
|
type: payload.type,
|
|
45
48
|
content: payload.content,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ticket-actions.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/ticket-actions.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAA+F;AAC/F,8DAAmE;AACnE,wDAAqD;AAGxC,QAAA,8BAA8B,GAAG,aAAC,CAAC,SAAS,EAAE,CAAC;AAC/C,QAAA,+BAA+B,GAA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CF,4DAwCC","sourcesContent":["import z from 'zod';\nimport { ClickType, SocketEventType, TicketStatus, TicketType } from '../../../utilities/enum';\nimport { DTO, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { NotificationSettings } from '../PushNotificationEvent';\n\nexport const TicketActionsSocketInputSchema = z.undefined();\nexport const TicketActionsSocketOutputSchema = z.object({\n\t_id: ZodValidation.coerce.objectId(),\n\tchatroomId: ZodValidation.coerce.objectId(),\n\tstatus: ZodValidation.enumType(TicketStatus, 'status'),\n\ttype: ZodValidation.enumType(TicketType, 'type'),\n\tcontent: ZodValidation.string('content').optional(),\n\ttitle: ZodValidation.string('title').optional(),\n});\n\nexport const TicketActionsPushOutputSchema = z.object({\n\tticketId: ZodValidation.coerce.objectId(),\n\tchatroomId: ZodValidation.coerce.objectId(),\n\tstatus: ZodValidation.enumType(TicketStatus, 'status'),\n\ttype: ZodValidation.enumType(TicketType, 'type'),\n\tcontent: ZodValidation.string('content').optional(),\n\ttitle: ZodValidation.string('title').optional(),\n});\n\nexport type TicketActionsSocketOutputDTO = DTO<typeof TicketActionsSocketOutputSchema>;\nexport type TicketActionsPushOutputDTO = DTO<typeof TicketActionsPushOutputSchema>;\nexport type TicketActionsSocketInputDTO = DTO<typeof TicketActionsSocketInputSchema>;\n\nexport class TicketActionsSocketEvent extends BaseSocketEvent<\n\ttypeof TicketActionsSocketInputSchema,\n\ttypeof TicketActionsSocketOutputSchema,\n\ttypeof TicketActionsPushOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: TicketActionsSocketInputSchema,\n\t\toutput: TicketActionsSocketOutputSchema,\n\t\tpushNotificationOutput: TicketActionsPushOutputSchema,\n\t};\n\n\tpublic get notificationSettings(): NotificationSettings | undefined {\n\t\treturn {\n\t\t\tisPushNotification: true,\n\t\t\tisClickable: true,\n\t\t\tclickType: ClickType.CLICKABLE_TICKET,\n\t\t\ttitle: this.pushNotificationData?.title || 'Customer Support',\n\t\t};\n\t}\n\n\tconstructor(payload: TicketActionsSocketOutputDTO) {\n\t\tconst pushPayload: TicketActionsPushOutputDTO = {\n\t\t\tticketId: payload._id,\n\t\t\tchatroomId: payload.chatroomId,\n\t\t\tstatus: payload.status,\n\t\t\ttype: payload.type,\n\t\t\tcontent: payload.content,\n\t\t\ttitle: payload.title,\n\t\t};\n\n\t\tsuper(SocketEventType.TICKET_ACTIONS, TicketActionsSocketEvent.schemas, payload, pushPayload);\n\t}\n\n\tpublic getPushNotificationPayload() {\n\t\treturn this.pushNotificationData;\n\t}\n\n\tprotected getIdentifier(): string {\n\t\treturn 'default';\n\t}\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
|
@@ -26,8 +26,8 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
|
|
|
26
26
|
searchFields?: string[] | undefined;
|
|
27
27
|
} | undefined;
|
|
28
28
|
sort?: Record<string, 1 | -1> | undefined;
|
|
29
|
-
populate?: any;
|
|
30
29
|
select?: Record<string, 0 | 1> | undefined;
|
|
30
|
+
populate?: any;
|
|
31
31
|
query?: Record<string, any> | undefined;
|
|
32
32
|
}, {
|
|
33
33
|
search?: {
|
|
@@ -36,8 +36,8 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
|
|
|
36
36
|
} | undefined;
|
|
37
37
|
sort?: Record<string, 1 | -1> | undefined;
|
|
38
38
|
size?: number | undefined;
|
|
39
|
-
populate?: any;
|
|
40
39
|
select?: Record<string, 0 | 1> | undefined;
|
|
40
|
+
populate?: any;
|
|
41
41
|
query?: Record<string, any> | undefined;
|
|
42
42
|
page?: number | undefined;
|
|
43
43
|
}>>;
|
|
@@ -736,12 +736,12 @@ export declare const GetByIdInputSchema: z.ZodObject<{
|
|
|
736
736
|
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
|
|
737
737
|
}, "strip", z.ZodTypeAny, {
|
|
738
738
|
_id: import("mongoose").Types.ObjectId;
|
|
739
|
-
populate?: any;
|
|
740
739
|
select?: Record<string, 0 | 1> | undefined;
|
|
740
|
+
populate?: any;
|
|
741
741
|
}, {
|
|
742
742
|
_id: string | import("mongoose").Types.ObjectId;
|
|
743
|
-
populate?: any;
|
|
744
743
|
select?: Record<string, 0 | 1> | undefined;
|
|
744
|
+
populate?: any;
|
|
745
745
|
}>;
|
|
746
746
|
export type GetByIdInputDTO = DTO<typeof GetByIdInputSchema>;
|
|
747
747
|
export declare const GetProductByIdInputSchema: z.ZodObject<{
|
|
@@ -754,12 +754,12 @@ export declare const GetProductByIdInputSchema: z.ZodObject<{
|
|
|
754
754
|
_id: import("mongoose").Types.ObjectId;
|
|
755
755
|
withAttributeHiddenItems: boolean;
|
|
756
756
|
withAddonsHiddenItems: boolean;
|
|
757
|
-
populate?: any;
|
|
758
757
|
select?: Record<string, 0 | 1> | undefined;
|
|
758
|
+
populate?: any;
|
|
759
759
|
}, {
|
|
760
760
|
_id: string | import("mongoose").Types.ObjectId;
|
|
761
|
-
populate?: any;
|
|
762
761
|
select?: Record<string, 0 | 1> | undefined;
|
|
762
|
+
populate?: any;
|
|
763
763
|
withAttributeHiddenItems?: boolean | undefined;
|
|
764
764
|
withAddonsHiddenItems?: boolean | undefined;
|
|
765
765
|
}>;
|
|
@@ -773,15 +773,15 @@ export declare const GetOrderByIdInputSchema: z.ZodObject<{
|
|
|
773
773
|
userOrderCompletionScope: z.ZodOptional<z.ZodNativeEnum<typeof UserOrderCompletionScope>>;
|
|
774
774
|
}, "strip", z.ZodTypeAny, {
|
|
775
775
|
_id: import("mongoose").Types.ObjectId;
|
|
776
|
-
populate?: any;
|
|
777
776
|
select?: Record<string, 0 | 1> | undefined;
|
|
777
|
+
populate?: any;
|
|
778
778
|
groupByCategories?: boolean | undefined;
|
|
779
779
|
getParentCategory?: boolean | undefined;
|
|
780
780
|
userOrderCompletionScope?: UserOrderCompletionScope | undefined;
|
|
781
781
|
}, {
|
|
782
782
|
_id: string | import("mongoose").Types.ObjectId;
|
|
783
|
-
populate?: any;
|
|
784
783
|
select?: Record<string, 0 | 1> | undefined;
|
|
784
|
+
populate?: any;
|
|
785
785
|
groupByCategories?: boolean | undefined;
|
|
786
786
|
getParentCategory?: boolean | undefined;
|
|
787
787
|
userOrderCompletionScope?: UserOrderCompletionScope | undefined;
|
|
@@ -791,11 +791,11 @@ export declare const GetByTokenInputSchema: z.ZodOptional<z.ZodObject<{
|
|
|
791
791
|
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
|
|
792
792
|
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
|
|
793
793
|
}, "strip", z.ZodTypeAny, {
|
|
794
|
-
populate?: any;
|
|
795
794
|
select?: Record<string, 0 | 1> | undefined;
|
|
796
|
-
}, {
|
|
797
795
|
populate?: any;
|
|
796
|
+
}, {
|
|
798
797
|
select?: Record<string, 0 | 1> | undefined;
|
|
798
|
+
populate?: any;
|
|
799
799
|
}>>;
|
|
800
800
|
export type GetByTokenInputDTO = DTO<typeof GetByTokenInputSchema>;
|
|
801
801
|
export declare const GetOneQuerySchema: z.ZodObject<{
|
|
@@ -803,12 +803,12 @@ export declare const GetOneQuerySchema: z.ZodObject<{
|
|
|
803
803
|
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
|
|
804
804
|
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
|
|
805
805
|
}, "strip", z.ZodTypeAny, {
|
|
806
|
-
populate?: any;
|
|
807
806
|
select?: Record<string, 0 | 1> | undefined;
|
|
807
|
+
populate?: any;
|
|
808
808
|
query?: Record<string, any> | undefined;
|
|
809
809
|
}, {
|
|
810
|
-
populate?: any;
|
|
811
810
|
select?: Record<string, 0 | 1> | undefined;
|
|
811
|
+
populate?: any;
|
|
812
812
|
query?: Record<string, any> | undefined;
|
|
813
813
|
}>;
|
|
814
814
|
export type GetOneQueryDTO = DTO<typeof GetOneQuerySchema>;
|