@lyxa.ai/core 1.4.327 → 1.4.328-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/libraries/mongo/models/index.d.ts +3 -3
  2. package/dist/libraries/mongo/models/index.js +6 -6
  3. package/dist/libraries/mongo/models/index.js.map +1 -1
  4. package/dist/libraries/mongo/models/order.model.d.ts +0 -1
  5. package/dist/libraries/mongo/models/order.model.js +0 -5
  6. package/dist/libraries/mongo/models/order.model.js.map +1 -1
  7. package/dist/libraries/mongo/models/providers/global-coupon.model.d.ts +2 -0
  8. package/dist/libraries/mongo/models/providers/global-coupon.model.js +20 -0
  9. package/dist/libraries/mongo/models/providers/global-coupon.model.js.map +1 -1
  10. package/dist/libraries/mongo/models/user-coupon.model.d.ts +11 -0
  11. package/dist/libraries/mongo/models/user-coupon.model.js +52 -0
  12. package/dist/libraries/mongo/models/user-coupon.model.js.map +1 -0
  13. package/dist/libraries/mongo/models/user.model.d.ts +2 -1
  14. package/dist/libraries/mongo/models/user.model.js +6 -1
  15. package/dist/libraries/mongo/models/user.model.js.map +1 -1
  16. package/dist/libraries/socket/events/chatroom-message-send.socket.event.d.ts +16 -16
  17. package/dist/libraries/socket/events/order-actions.socket.event.d.ts +32 -32
  18. package/dist/libraries/socket/events/rider-location-update.socket.event.d.ts +8 -8
  19. package/dist/libraries/socket/events/ticket-actions.socket.event.d.ts +4 -4
  20. package/dist/libraries/socket/events/ticket-assign.socket.event.d.ts +24 -24
  21. package/dist/libraries/trpc/middlewares/auth.d.ts +2 -2
  22. package/dist/libraries/trpc/middlewares/createRoleProtectedProcedure.d.ts +2 -2
  23. package/dist/libraries/trpc/middlewares/phone-verified.d.ts +2 -2
  24. package/dist/libraries/trpc/middlewares/publicUserDecoder.d.ts +2 -2
  25. package/dist/types/README.md +1 -1
  26. package/dist/types/package.json +1 -1
  27. package/package.json +1 -1
  28. package/dist/libraries/mongo/models/shop-orders-last-7-days-snapshot.model.d.ts +0 -13
  29. package/dist/libraries/mongo/models/shop-orders-last-7-days-snapshot.model.js +0 -53
  30. package/dist/libraries/mongo/models/shop-orders-last-7-days-snapshot.model.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oDAAuF;AACvF,4EAAqE;AACrE,uDAA6C;AAC7C,0DAAqD;AACrD,iDAAwC;AACxC,6DAAoD;AACpD,kDAAuD;AACvD,kEAAwD;AACxD,oEAA0D;AAC1D,0DAAiD;AAS1C,IAAM,IAAI,YAAV,MAAM,IAAK,SAAQ,2BAAU;IAE5B,QAAQ,CAAiB;IAGzB,QAAQ,CAAU;IAGlB,SAAS,CAAiB;IAG1B,QAAQ,CAAe;IAGvB,cAAc,CAAU;IAGxB,eAAe,CAAQ;IAGvB,OAAO,CAAiB;IAGxB,yBAAyB,CAAU;IAGnC,kBAAkB,CAAU;IAG5B,iCAAiC,CAAU;IAG3C,qBAAqB,CAAW;IAGhC,YAAY,CAAe;IAG3B,YAAY,CAAqB;IAGjC,YAAY,CAAW;IAGvB,WAAW,CAAU;IAGrB,kBAAkB,CAAU;IAG5B,YAAY,CAAa;IAGzB,eAAe,CAAW;IAO1B,YAAY,CAAgB;IAG5B,8BAA8B,CAAW;IAGzC,6BAA6B,CAAW;IAGxC,SAAS,CAAY;IAGrB,MAAM,CAAU;IAEhB,MAAM,CAAC,KAAK,CAAC,YAAY,CAE/B,MAAc,EACd,IAAI,GAAG,CAAC,EACR,OAAO,GAAG,CAAC;QAEX,OAAO,IAAI,CAAC,iBAAiB,CAC5B,MAAM,EACN,EAAE,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,cAAc,EAAE,IAAI,GAAG,OAAO,EAAE,EAAE,EAC5F,EAAE,GAAG,EAAE,IAAI,EAAE,CACb,CAAC;IACH,CAAC;C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K,EAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACrC,IAAA,iBAAK,EACL,EAAE,WAAW,EAAE,CAAC,EAAE,EAClB,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CACzG;GACY,IAAI,CAsFhB","sourcesContent":["import { index, modelOptions, prop, Ref, ReturnModelType } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { CoreUser } from './core-user.model';\nimport { UserAddress } from './shared/address.model';\nimport { Coupon } from './coupon.model';\nimport { Subscription } from './subscription.model';\nimport { OnlineStatus } from '../../../utilities/enum';\nimport { OTPFields } from './embedded/otp-fields.model';\nimport { GeoLocation } from './shared/geo-location.model';\nimport { Wallet } from './embedded/wallet.model';\n\n@modelOptions({ schemaOptions: { collection: 'users' } })\n@index({ location: '2dsphere' })\n@index({ createdAt: 1, addresses: 1 })\n@index(\n\t{ phoneNumber: 1 },\n\t{ unique: true, partialFilterExpression: { deletedAt: null, phoneNumber: { $exists: true, $ne: null } } }\n)\nexport class User extends TimeStamps {\n\t@prop({ required: true, ref: () => CoreUser })\n\tpublic coreUser!: Ref<CoreUser>;\n\n\t@prop({ type: () => String })\n\tpublic deviceId?: string;\n\n\t@prop({ type: () => [UserAddress], default: [] })\n\tpublic addresses?: UserAddress[];\n\n\t@prop({ type: GeoLocation }) // Last order location for finding user zone\n\tpublic location?: GeoLocation;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic orderCompleted?: number;\n\n\t@prop({ type: Date })\n\tpublic repeatedOrderAt?: Date;\n\n\t@prop({ ref: () => Coupon })\n\tpublic coupons?: Ref<Coupon>[];\n\n\t@prop({ type: String })\n\tpublic newUserCouponDiscountType?: string;\n\n\t@prop({ type: Number })\n\tpublic newUserCouponValue?: number;\n\n\t@prop({ type: Number })\n\tpublic newUserCouponMaximumDiscountLimit?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isNewUserCouponShowed?: boolean;\n\n\t@prop({ ref: () => Coupon })\n\tpublic referralCode?: Ref<Coupon>;\n\n\t@prop({ type: String, ref: () => Subscription })\n\tpublic subscription?: Ref<Subscription>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSubscribed?: boolean;\n\n\t@prop({ type: String })\n\tpublic phoneNumber?: string;\n\n\t@prop({ type: String })\n\tpublic pendingPhoneNumber?: string;\n\n\t@prop({ type: () => OTPFields })\n\tpublic phoneOtpInfo?: OTPFields;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPhoneVerified?: boolean;\n\n\t@prop({\n\t\ttype: String,\n\t\tenum: OnlineStatus,\n\t\tdefault: OnlineStatus.OFFLINE,\n\t})\n\tpublic onlineStatus?: OnlineStatus;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic receiveTicketAgentNotification?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic receiveOrderAgentNotification?: boolean;\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic fcmTokens?: string[];\n\n\t@prop({ type: Wallet })\n\tpublic wallet?: Wallet;\n\n\tpublic static async updateWallet(\n\t\tthis: ReturnModelType<typeof User>,\n\t\tuserId: string,\n\t\tmain = 0,\n\t\treserve = 0\n\t) {\n\t\treturn this.findByIdAndUpdate(\n\t\t\tuserId,\n\t\t\t{ $inc: { 'wallet.main': main, 'wallet.reserve': reserve, 'wallet.total': main + reserve } },\n\t\t\t{ new: true }\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"file":"user.model.js","sourceRoot":"/","sources":["libraries/mongo/models/user.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oDAAuF;AACvF,4EAAqE;AACrE,uDAA6C;AAC7C,0DAAqD;AACrD,iDAAwC;AACxC,6DAAoD;AACpD,kDAAuD;AACvD,kEAAwD;AAC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I,CA0FhB","sourcesContent":["import { index, modelOptions, prop, Ref, ReturnModelType } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { CoreUser } from './core-user.model';\nimport { UserAddress } from './shared/address.model';\nimport { Coupon } from './coupon.model';\nimport { Subscription } from './subscription.model';\nimport { OnlineStatus } from '../../../utilities/enum';\nimport { OTPFields } from './embedded/otp-fields.model';\nimport { GeoLocation } from './shared/geo-location.model';\nimport { Wallet } from './embedded/wallet.model';\nimport { UserCoupon } from './user-coupon.model';\n\n@modelOptions({ schemaOptions: { collection: 'users' } })\n@index({ location: '2dsphere' })\n@index({ createdAt: 1, addresses: 1 })\n@index(\n\t{ phoneNumber: 1 },\n\t{ unique: true, partialFilterExpression: { deletedAt: null, phoneNumber: { $exists: true, $ne: null } } }\n)\nexport class User extends TimeStamps {\n\t@prop({ required: true, ref: () => CoreUser })\n\tpublic coreUser!: Ref<CoreUser>;\n\n\t@prop({ type: () => String })\n\tpublic deviceId?: string;\n\n\t@prop({ type: () => [UserAddress], default: [] })\n\tpublic addresses?: UserAddress[];\n\n\t@prop({ type: GeoLocation }) // Last order location for finding user zone\n\tpublic location?: GeoLocation;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic orderCompleted?: number;\n\n\t@prop({ type: Date })\n\tpublic repeatedOrderAt?: Date;\n\n\t@prop({\n\t\tref: () => UserCoupon,\n\t\tforeignField: 'user',\n\t\tlocalField: '_id',\n\t})\n\tpublic coupons?: Ref<UserCoupon>[]; // Virtual reference to UserCoupons\n\n\t@prop({ type: String })\n\tpublic newUserCouponDiscountType?: string;\n\n\t@prop({ type: Number })\n\tpublic newUserCouponValue?: number;\n\n\t@prop({ type: Number })\n\tpublic newUserCouponMaximumDiscountLimit?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isNewUserCouponShowed?: boolean;\n\n\t@prop({ ref: () => Coupon })\n\tpublic referralCode?: Ref<Coupon>;\n\n\t@prop({ type: String, ref: () => Subscription })\n\tpublic subscription?: Ref<Subscription>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSubscribed?: boolean;\n\n\t@prop({ type: String })\n\tpublic phoneNumber?: string;\n\n\t@prop({ type: String })\n\tpublic pendingPhoneNumber?: string;\n\n\t@prop({ type: () => OTPFields })\n\tpublic phoneOtpInfo?: OTPFields;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPhoneVerified?: boolean;\n\n\t@prop({\n\t\ttype: String,\n\t\tenum: OnlineStatus,\n\t\tdefault: OnlineStatus.OFFLINE,\n\t})\n\tpublic onlineStatus?: OnlineStatus;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic receiveTicketAgentNotification?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic receiveOrderAgentNotification?: boolean;\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic fcmTokens?: string[];\n\n\t@prop({ type: Wallet })\n\tpublic wallet?: Wallet;\n\n\tpublic static async updateWallet(\n\t\tthis: ReturnModelType<typeof User>,\n\t\tuserId: string,\n\t\tmain = 0,\n\t\treserve = 0\n\t) {\n\t\treturn this.findByIdAndUpdate(\n\t\t\tuserId,\n\t\t\t{ $inc: { 'wallet.main': main, 'wallet.reserve': reserve, 'wallet.total': main + reserve } },\n\t\t\t{ new: true }\n\t\t);\n\t}\n}\n"]}
@@ -20,13 +20,13 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
20
20
  name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
21
21
  type: z.ZodNativeEnum<typeof UserRef>;
22
22
  }, "strip", z.ZodTypeAny, {
23
- type: UserRef;
24
23
  name: string;
25
24
  id: import("mongoose").Types.ObjectId;
26
- }, {
27
25
  type: UserRef;
26
+ }, {
28
27
  name: string;
29
28
  id: import("mongoose").Types.ObjectId;
29
+ type: UserRef;
30
30
  }>;
31
31
  content: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
32
32
  media: z.ZodArray<z.ZodObject<{
@@ -63,12 +63,12 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
63
63
  orderId: z.ZodOptional<z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>>;
64
64
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
65
65
  }, "strip", z.ZodTypeAny, {
66
- _id: import("mongoose").Types.ObjectId;
67
66
  createdAt: Date;
67
+ _id: import("mongoose").Types.ObjectId;
68
68
  sender: {
69
- type: UserRef;
70
69
  name: string;
71
70
  id: import("mongoose").Types.ObjectId;
71
+ type: UserRef;
72
72
  };
73
73
  senderType: UserRef;
74
74
  media: {
@@ -80,21 +80,21 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
80
80
  }[];
81
81
  chatroomType: ChatroomType;
82
82
  senderId: import("mongoose").Types.ObjectId;
83
- orderId?: import("mongoose").Types.ObjectId | undefined;
84
83
  location?: {
85
84
  latitude?: number | undefined;
86
85
  longitude?: number | undefined;
87
86
  } | undefined;
87
+ orderId?: import("mongoose").Types.ObjectId | undefined;
88
88
  ticketId?: import("mongoose").Types.ObjectId | undefined;
89
89
  content?: string | undefined;
90
90
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
91
91
  }, {
92
- _id: import("mongoose").Types.ObjectId;
93
92
  createdAt: Date;
93
+ _id: import("mongoose").Types.ObjectId;
94
94
  sender: {
95
- type: UserRef;
96
95
  name: string;
97
96
  id: import("mongoose").Types.ObjectId;
97
+ type: UserRef;
98
98
  };
99
99
  senderType: UserRef;
100
100
  media: {
@@ -106,11 +106,11 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
106
106
  }[];
107
107
  chatroomType: ChatroomType;
108
108
  senderId: import("mongoose").Types.ObjectId;
109
- orderId?: import("mongoose").Types.ObjectId | undefined;
110
109
  location?: {
111
110
  latitude?: number | undefined;
112
111
  longitude?: number | undefined;
113
112
  } | undefined;
113
+ orderId?: import("mongoose").Types.ObjectId | undefined;
114
114
  ticketId?: import("mongoose").Types.ObjectId | undefined;
115
115
  content?: string | undefined;
116
116
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
@@ -156,13 +156,13 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
156
156
  name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
157
157
  type: z.ZodNativeEnum<typeof UserRef>;
158
158
  }, "strip", z.ZodTypeAny, {
159
- type: UserRef;
160
159
  name: string;
161
160
  id: import("mongoose").Types.ObjectId;
162
- }, {
163
161
  type: UserRef;
162
+ }, {
164
163
  name: string;
165
164
  id: import("mongoose").Types.ObjectId;
165
+ type: UserRef;
166
166
  }>;
167
167
  content: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
168
168
  media: z.ZodArray<z.ZodObject<{
@@ -199,12 +199,12 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
199
199
  orderId: z.ZodOptional<z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>>;
200
200
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
201
201
  }, "strip", z.ZodTypeAny, {
202
- _id: import("mongoose").Types.ObjectId;
203
202
  createdAt: Date;
203
+ _id: import("mongoose").Types.ObjectId;
204
204
  sender: {
205
- type: UserRef;
206
205
  name: string;
207
206
  id: import("mongoose").Types.ObjectId;
207
+ type: UserRef;
208
208
  };
209
209
  senderType: UserRef;
210
210
  media: {
@@ -216,21 +216,21 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
216
216
  }[];
217
217
  chatroomType: ChatroomType;
218
218
  senderId: import("mongoose").Types.ObjectId;
219
- orderId?: import("mongoose").Types.ObjectId | undefined;
220
219
  location?: {
221
220
  latitude?: number | undefined;
222
221
  longitude?: number | undefined;
223
222
  } | undefined;
223
+ orderId?: import("mongoose").Types.ObjectId | undefined;
224
224
  ticketId?: import("mongoose").Types.ObjectId | undefined;
225
225
  content?: string | undefined;
226
226
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
227
227
  }, {
228
- _id: import("mongoose").Types.ObjectId;
229
228
  createdAt: Date;
229
+ _id: import("mongoose").Types.ObjectId;
230
230
  sender: {
231
- type: UserRef;
232
231
  name: string;
233
232
  id: import("mongoose").Types.ObjectId;
233
+ type: UserRef;
234
234
  };
235
235
  senderType: UserRef;
236
236
  media: {
@@ -242,11 +242,11 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
242
242
  }[];
243
243
  chatroomType: ChatroomType;
244
244
  senderId: import("mongoose").Types.ObjectId;
245
- orderId?: import("mongoose").Types.ObjectId | undefined;
246
245
  location?: {
247
246
  latitude?: number | undefined;
248
247
  longitude?: number | undefined;
249
248
  } | undefined;
249
+ orderId?: import("mongoose").Types.ObjectId | undefined;
250
250
  ticketId?: import("mongoose").Types.ObjectId | undefined;
251
251
  content?: string | undefined;
252
252
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
@@ -16,11 +16,11 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
16
16
  _id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
17
17
  name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
18
18
  }, "strip", z.ZodTypeAny, {
19
- _id: import("mongoose").Types.ObjectId;
20
19
  name: string;
20
+ _id: import("mongoose").Types.ObjectId;
21
21
  }, {
22
- _id: string | import("mongoose").Types.ObjectId;
23
22
  name: string;
23
+ _id: string | import("mongoose").Types.ObjectId;
24
24
  }>;
25
25
  orderStatus: z.ZodNativeEnum<typeof RegularOrderStatus>;
26
26
  orderAction: z.ZodNativeEnum<typeof OrderAction>;
@@ -40,19 +40,19 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
40
40
  secondaryRiderTips: z.ZodNumber;
41
41
  }, "strip", z.ZodTypeAny, {
42
42
  deliveryFee: number;
43
- total: number;
44
43
  secondaryDeliveryFee: number;
45
44
  riderTips: number;
46
45
  secondaryRiderTips: number;
46
+ total: number;
47
47
  secondaryTotal: number;
48
48
  paidAmount: number;
49
49
  secondaryPaidAmount: number;
50
50
  }, {
51
51
  deliveryFee: number;
52
- total: number;
53
52
  secondaryDeliveryFee: number;
54
53
  riderTips: number;
55
54
  secondaryRiderTips: number;
55
+ total: number;
56
56
  secondaryTotal: number;
57
57
  paidAmount: number;
58
58
  secondaryPaidAmount: number;
@@ -61,10 +61,10 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
61
61
  paymentMethod: PaymentMethod;
62
62
  pricing: {
63
63
  deliveryFee: number;
64
- total: number;
65
64
  secondaryDeliveryFee: number;
66
65
  riderTips: number;
67
66
  secondaryRiderTips: number;
67
+ total: number;
68
68
  secondaryTotal: number;
69
69
  paidAmount: number;
70
70
  secondaryPaidAmount: number;
@@ -74,10 +74,10 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
74
74
  paymentMethod: PaymentMethod;
75
75
  pricing: {
76
76
  deliveryFee: number;
77
- total: number;
78
77
  secondaryDeliveryFee: number;
79
78
  riderTips: number;
80
79
  secondaryRiderTips: number;
80
+ total: number;
81
81
  secondaryTotal: number;
82
82
  paidAmount: number;
83
83
  secondaryPaidAmount: number;
@@ -88,23 +88,23 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
88
88
  triggerAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
89
89
  orderActionType: z.ZodNativeEnum<typeof OrderAction>;
90
90
  }, "strip", z.ZodTypeAny, {
91
- _id: import("mongoose").Types.ObjectId;
92
- orderId: string;
93
- shopId: import("mongoose").Types.ObjectId;
94
91
  createdAt: Date;
92
+ _id: import("mongoose").Types.ObjectId;
95
93
  user: {
96
- _id: import("mongoose").Types.ObjectId;
97
94
  name: string;
95
+ _id: import("mongoose").Types.ObjectId;
98
96
  };
97
+ shopId: import("mongoose").Types.ObjectId;
98
+ orderId: string;
99
99
  triggerAt: Date;
100
100
  adjustedFinance: {
101
101
  paymentMethod: PaymentMethod;
102
102
  pricing: {
103
103
  deliveryFee: number;
104
- total: number;
105
104
  secondaryDeliveryFee: number;
106
105
  riderTips: number;
107
106
  secondaryRiderTips: number;
107
+ total: number;
108
108
  secondaryTotal: number;
109
109
  paidAmount: number;
110
110
  secondaryPaidAmount: number;
@@ -117,23 +117,23 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
117
117
  orderAction: OrderAction;
118
118
  preparationTimeMinutes: number;
119
119
  }, {
120
- _id: string | import("mongoose").Types.ObjectId;
121
- orderId: string;
122
- shopId: string | import("mongoose").Types.ObjectId;
123
120
  createdAt: Date;
121
+ _id: string | import("mongoose").Types.ObjectId;
124
122
  user: {
125
- _id: string | import("mongoose").Types.ObjectId;
126
123
  name: string;
124
+ _id: string | import("mongoose").Types.ObjectId;
127
125
  };
126
+ shopId: string | import("mongoose").Types.ObjectId;
127
+ orderId: string;
128
128
  triggerAt: Date;
129
129
  adjustedFinance: {
130
130
  paymentMethod: PaymentMethod;
131
131
  pricing: {
132
132
  deliveryFee: number;
133
- total: number;
134
133
  secondaryDeliveryFee: number;
135
134
  riderTips: number;
136
135
  secondaryRiderTips: number;
136
+ total: number;
137
137
  secondaryTotal: number;
138
138
  paidAmount: number;
139
139
  secondaryPaidAmount: number;
@@ -160,11 +160,11 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
160
160
  _id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
161
161
  name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
162
162
  }, "strip", z.ZodTypeAny, {
163
- _id: import("mongoose").Types.ObjectId;
164
163
  name: string;
164
+ _id: import("mongoose").Types.ObjectId;
165
165
  }, {
166
- _id: string | import("mongoose").Types.ObjectId;
167
166
  name: string;
167
+ _id: string | import("mongoose").Types.ObjectId;
168
168
  }>;
169
169
  orderStatus: z.ZodNativeEnum<typeof RegularOrderStatus>;
170
170
  orderAction: z.ZodNativeEnum<typeof OrderAction>;
@@ -184,19 +184,19 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
184
184
  secondaryRiderTips: z.ZodNumber;
185
185
  }, "strip", z.ZodTypeAny, {
186
186
  deliveryFee: number;
187
- total: number;
188
187
  secondaryDeliveryFee: number;
189
188
  riderTips: number;
190
189
  secondaryRiderTips: number;
190
+ total: number;
191
191
  secondaryTotal: number;
192
192
  paidAmount: number;
193
193
  secondaryPaidAmount: number;
194
194
  }, {
195
195
  deliveryFee: number;
196
- total: number;
197
196
  secondaryDeliveryFee: number;
198
197
  riderTips: number;
199
198
  secondaryRiderTips: number;
199
+ total: number;
200
200
  secondaryTotal: number;
201
201
  paidAmount: number;
202
202
  secondaryPaidAmount: number;
@@ -205,10 +205,10 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
205
205
  paymentMethod: PaymentMethod;
206
206
  pricing: {
207
207
  deliveryFee: number;
208
- total: number;
209
208
  secondaryDeliveryFee: number;
210
209
  riderTips: number;
211
210
  secondaryRiderTips: number;
211
+ total: number;
212
212
  secondaryTotal: number;
213
213
  paidAmount: number;
214
214
  secondaryPaidAmount: number;
@@ -218,10 +218,10 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
218
218
  paymentMethod: PaymentMethod;
219
219
  pricing: {
220
220
  deliveryFee: number;
221
- total: number;
222
221
  secondaryDeliveryFee: number;
223
222
  riderTips: number;
224
223
  secondaryRiderTips: number;
224
+ total: number;
225
225
  secondaryTotal: number;
226
226
  paidAmount: number;
227
227
  secondaryPaidAmount: number;
@@ -232,23 +232,23 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
232
232
  triggerAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
233
233
  orderActionType: z.ZodNativeEnum<typeof OrderAction>;
234
234
  }, "strip", z.ZodTypeAny, {
235
- _id: import("mongoose").Types.ObjectId;
236
- orderId: string;
237
- shopId: import("mongoose").Types.ObjectId;
238
235
  createdAt: Date;
236
+ _id: import("mongoose").Types.ObjectId;
239
237
  user: {
240
- _id: import("mongoose").Types.ObjectId;
241
238
  name: string;
239
+ _id: import("mongoose").Types.ObjectId;
242
240
  };
241
+ shopId: import("mongoose").Types.ObjectId;
242
+ orderId: string;
243
243
  triggerAt: Date;
244
244
  adjustedFinance: {
245
245
  paymentMethod: PaymentMethod;
246
246
  pricing: {
247
247
  deliveryFee: number;
248
- total: number;
249
248
  secondaryDeliveryFee: number;
250
249
  riderTips: number;
251
250
  secondaryRiderTips: number;
251
+ total: number;
252
252
  secondaryTotal: number;
253
253
  paidAmount: number;
254
254
  secondaryPaidAmount: number;
@@ -261,23 +261,23 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
261
261
  orderAction: OrderAction;
262
262
  preparationTimeMinutes: number;
263
263
  }, {
264
- _id: string | import("mongoose").Types.ObjectId;
265
- orderId: string;
266
- shopId: string | import("mongoose").Types.ObjectId;
267
264
  createdAt: Date;
265
+ _id: string | import("mongoose").Types.ObjectId;
268
266
  user: {
269
- _id: string | import("mongoose").Types.ObjectId;
270
267
  name: string;
268
+ _id: string | import("mongoose").Types.ObjectId;
271
269
  };
270
+ shopId: string | import("mongoose").Types.ObjectId;
271
+ orderId: string;
272
272
  triggerAt: Date;
273
273
  adjustedFinance: {
274
274
  paymentMethod: PaymentMethod;
275
275
  pricing: {
276
276
  deliveryFee: number;
277
- total: number;
278
277
  secondaryDeliveryFee: number;
279
278
  riderTips: number;
280
279
  secondaryRiderTips: number;
280
+ total: number;
281
281
  secondaryTotal: number;
282
282
  paidAmount: number;
283
283
  secondaryPaidAmount: number;
@@ -19,18 +19,18 @@ export declare const RiderLocationUpdateSocketOutputSchema: z.ZodObject<{
19
19
  bearing: z.ZodOptional<z.ZodNumber>;
20
20
  updatedAt: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
21
21
  }, "strip", z.ZodTypeAny, {
22
+ updatedAt: Date;
22
23
  _id: import("mongoose").Types.ObjectId;
24
+ riderId: import("mongoose").Types.ObjectId;
23
25
  latitude: number;
24
26
  longitude: number;
25
- updatedAt: Date;
26
- riderId: import("mongoose").Types.ObjectId;
27
27
  bearing?: number | undefined;
28
28
  }, {
29
+ updatedAt: string | Date;
29
30
  _id: string | import("mongoose").Types.ObjectId;
31
+ riderId: string | import("mongoose").Types.ObjectId;
30
32
  latitude: number;
31
33
  longitude: number;
32
- updatedAt: string | Date;
33
- riderId: string | import("mongoose").Types.ObjectId;
34
34
  bearing?: number | undefined;
35
35
  }>;
36
36
  export type RiderLocationUpdateSocketInputDTO = DTO<typeof RiderLocationUpdateSocketInputSchema>;
@@ -55,18 +55,18 @@ export declare class RiderLocationUpdateSocketEvent extends BaseSocketEvent<type
55
55
  bearing: z.ZodOptional<z.ZodNumber>;
56
56
  updatedAt: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
57
57
  }, "strip", z.ZodTypeAny, {
58
+ updatedAt: Date;
58
59
  _id: import("mongoose").Types.ObjectId;
60
+ riderId: import("mongoose").Types.ObjectId;
59
61
  latitude: number;
60
62
  longitude: number;
61
- updatedAt: Date;
62
- riderId: import("mongoose").Types.ObjectId;
63
63
  bearing?: number | undefined;
64
64
  }, {
65
+ updatedAt: string | Date;
65
66
  _id: string | import("mongoose").Types.ObjectId;
67
+ riderId: string | import("mongoose").Types.ObjectId;
66
68
  latitude: number;
67
69
  longitude: number;
68
- updatedAt: string | Date;
69
- riderId: string | import("mongoose").Types.ObjectId;
70
70
  bearing?: number | undefined;
71
71
  }>;
72
72
  };
@@ -13,15 +13,15 @@ export declare const TicketActionsSocketOutputSchema: z.ZodObject<{
13
13
  silent: z.ZodOptional<z.ZodBoolean>;
14
14
  }, "strip", z.ZodTypeAny, {
15
15
  status: TicketStatus;
16
- type: TicketType;
17
16
  _id: import("mongoose").Types.ObjectId;
17
+ type: TicketType;
18
18
  title?: string | undefined;
19
19
  content?: string | undefined;
20
20
  silent?: boolean | undefined;
21
21
  }, {
22
22
  status: TicketStatus;
23
- type: TicketType;
24
23
  _id: import("mongoose").Types.ObjectId;
24
+ type: TicketType;
25
25
  title?: string | undefined;
26
26
  content?: string | undefined;
27
27
  silent?: boolean | undefined;
@@ -60,15 +60,15 @@ export declare class TicketActionsSocketEvent extends BaseSocketEvent<typeof Tic
60
60
  silent: z.ZodOptional<z.ZodBoolean>;
61
61
  }, "strip", z.ZodTypeAny, {
62
62
  status: TicketStatus;
63
- type: TicketType;
64
63
  _id: import("mongoose").Types.ObjectId;
64
+ type: TicketType;
65
65
  title?: string | undefined;
66
66
  content?: string | undefined;
67
67
  silent?: boolean | undefined;
68
68
  }, {
69
69
  status: TicketStatus;
70
- type: TicketType;
71
70
  _id: import("mongoose").Types.ObjectId;
71
+ type: TicketType;
72
72
  title?: string | undefined;
73
73
  content?: string | undefined;
74
74
  silent?: boolean | undefined;
@@ -13,14 +13,14 @@ export declare const TicketAssignSocketOutputSchema: z.ZodObject<{
13
13
  name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
14
14
  profilePhoto: z.ZodNullable<z.ZodString> | z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
15
15
  }, "strip", z.ZodTypeAny, {
16
- type: UserRef;
17
- _id: import("mongoose").Types.ObjectId;
18
16
  name: string;
17
+ _id: import("mongoose").Types.ObjectId;
18
+ type: UserRef;
19
19
  profilePhoto: string | null;
20
20
  }, {
21
- type: UserRef;
22
- _id: string | import("mongoose").Types.ObjectId;
23
21
  name: string;
22
+ _id: string | import("mongoose").Types.ObjectId;
23
+ type: UserRef;
24
24
  profilePhoto: string | null;
25
25
  }>;
26
26
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
@@ -40,18 +40,18 @@ export declare const TicketAssignSocketOutputSchema: z.ZodObject<{
40
40
  unreadCount: z.ZodNumber;
41
41
  }, "strip", z.ZodTypeAny, {
42
42
  status: TicketStatus;
43
- type: TicketType;
44
- _id: import("mongoose").Types.ObjectId;
45
43
  createdAt: Date;
46
44
  updatedAt: Date;
45
+ _id: import("mongoose").Types.ObjectId;
46
+ type: TicketType;
47
47
  lastMessage: {
48
48
  createdAt: Date;
49
49
  content: string;
50
50
  };
51
51
  client: {
52
- type: UserRef;
53
- _id: import("mongoose").Types.ObjectId;
54
52
  name: string;
53
+ _id: import("mongoose").Types.ObjectId;
54
+ type: UserRef;
55
55
  profilePhoto: string | null;
56
56
  };
57
57
  unreadCount: number;
@@ -59,18 +59,18 @@ export declare const TicketAssignSocketOutputSchema: z.ZodObject<{
59
59
  orderId?: import("mongoose").Types.ObjectId | undefined;
60
60
  }, {
61
61
  status: TicketStatus;
62
- type: TicketType;
63
- _id: string | import("mongoose").Types.ObjectId;
64
62
  createdAt: string | Date;
65
63
  updatedAt: string | Date;
64
+ _id: string | import("mongoose").Types.ObjectId;
65
+ type: TicketType;
66
66
  lastMessage: {
67
67
  createdAt: string | Date;
68
68
  content: string;
69
69
  };
70
70
  client: {
71
- type: UserRef;
72
- _id: string | import("mongoose").Types.ObjectId;
73
71
  name: string;
72
+ _id: string | import("mongoose").Types.ObjectId;
73
+ type: UserRef;
74
74
  profilePhoto: string | null;
75
75
  };
76
76
  unreadCount: number;
@@ -91,14 +91,14 @@ export declare class TicketAssignEvent extends BaseSocketEvent<typeof TicketAssi
91
91
  name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
92
92
  profilePhoto: z.ZodNullable<z.ZodString> | z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
93
93
  }, "strip", z.ZodTypeAny, {
94
- type: UserRef;
95
- _id: import("mongoose").Types.ObjectId;
96
94
  name: string;
95
+ _id: import("mongoose").Types.ObjectId;
96
+ type: UserRef;
97
97
  profilePhoto: string | null;
98
98
  }, {
99
- type: UserRef;
100
- _id: string | import("mongoose").Types.ObjectId;
101
99
  name: string;
100
+ _id: string | import("mongoose").Types.ObjectId;
101
+ type: UserRef;
102
102
  profilePhoto: string | null;
103
103
  }>;
104
104
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
@@ -118,18 +118,18 @@ export declare class TicketAssignEvent extends BaseSocketEvent<typeof TicketAssi
118
118
  unreadCount: z.ZodNumber;
119
119
  }, "strip", z.ZodTypeAny, {
120
120
  status: TicketStatus;
121
- type: TicketType;
122
- _id: import("mongoose").Types.ObjectId;
123
121
  createdAt: Date;
124
122
  updatedAt: Date;
123
+ _id: import("mongoose").Types.ObjectId;
124
+ type: TicketType;
125
125
  lastMessage: {
126
126
  createdAt: Date;
127
127
  content: string;
128
128
  };
129
129
  client: {
130
- type: UserRef;
131
- _id: import("mongoose").Types.ObjectId;
132
130
  name: string;
131
+ _id: import("mongoose").Types.ObjectId;
132
+ type: UserRef;
133
133
  profilePhoto: string | null;
134
134
  };
135
135
  unreadCount: number;
@@ -137,18 +137,18 @@ export declare class TicketAssignEvent extends BaseSocketEvent<typeof TicketAssi
137
137
  orderId?: import("mongoose").Types.ObjectId | undefined;
138
138
  }, {
139
139
  status: TicketStatus;
140
- type: TicketType;
141
- _id: string | import("mongoose").Types.ObjectId;
142
140
  createdAt: string | Date;
143
141
  updatedAt: string | Date;
142
+ _id: string | import("mongoose").Types.ObjectId;
143
+ type: TicketType;
144
144
  lastMessage: {
145
145
  createdAt: string | Date;
146
146
  content: string;
147
147
  };
148
148
  client: {
149
- type: UserRef;
150
- _id: string | import("mongoose").Types.ObjectId;
151
149
  name: string;
150
+ _id: string | import("mongoose").Types.ObjectId;
151
+ type: UserRef;
152
152
  profilePhoto: string | null;
153
153
  };
154
154
  unreadCount: number;
@@ -5,10 +5,10 @@ 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
- requestId: string | undefined;
9
- entity: import("../context").EntityContext | undefined;
10
8
  req: import("http").IncomingMessage;
11
9
  res: import("http").ServerResponse<import("http").IncomingMessage>;
10
+ entity: import("../context").EntityContext | undefined;
11
+ requestId: string | undefined;
12
12
  tokenType: TokenType | undefined;
13
13
  usedRefreshToken: boolean | undefined;
14
14
  tokenRenewed: boolean | undefined;
@@ -4,10 +4,10 @@ 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
- requestId: string | undefined;
8
- entity: import("../context").EntityContext | undefined;
9
7
  req: import("http").IncomingMessage;
10
8
  res: import("http").ServerResponse<import("http").IncomingMessage>;
9
+ entity: import("../context").EntityContext | undefined;
10
+ requestId: string | undefined;
11
11
  tokenType: import("../../auth").TokenType | undefined;
12
12
  usedRefreshToken: boolean | undefined;
13
13
  tokenRenewed: boolean | undefined;
@@ -3,10 +3,10 @@ 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
- requestId: string | undefined;
7
- entity: import("../context").EntityContext | undefined;
8
6
  req: import("http").IncomingMessage;
9
7
  res: import("http").ServerResponse<import("http").IncomingMessage>;
8
+ entity: import("../context").EntityContext | undefined;
9
+ requestId: string | undefined;
10
10
  tokenType: import("../../auth").TokenType | undefined;
11
11
  usedRefreshToken: boolean | undefined;
12
12
  tokenRenewed: boolean | undefined;
@@ -5,10 +5,10 @@ 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
- requestId: string | undefined;
9
- entity: import("../context").EntityContext | undefined;
10
8
  req: import("http").IncomingMessage;
11
9
  res: import("http").ServerResponse<import("http").IncomingMessage>;
10
+ entity: import("../context").EntityContext | undefined;
11
+ requestId: string | undefined;
12
12
  tokenType: TokenType | undefined;
13
13
  usedRefreshToken: boolean | undefined;
14
14
  tokenRenewed: boolean | undefined;