@lyxa.ai/core 1.4.310 → 1.4.312
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/llm/interfaces/common-llm-interfaces.d.ts +4 -0
- package/dist/libraries/llm/interfaces/common-llm-interfaces.js.map +1 -1
- package/dist/libraries/llm/llm-provider-service.js +1 -1
- package/dist/libraries/llm/llm-provider-service.js.map +1 -1
- package/dist/libraries/llm/providers/openai-provider.d.ts +4 -0
- package/dist/libraries/llm/providers/openai-provider.js +42 -13
- package/dist/libraries/llm/providers/openai-provider.js.map +1 -1
- package/dist/libraries/socket/events/chatroom-message-send.socket.event.d.ts +33 -33
- package/dist/libraries/socket/events/order-actions.socket.event.d.ts +20 -20
- package/dist/libraries/socket/events/rider-location-update.socket.event.d.ts +8 -8
- package/dist/libraries/socket/events/ticket-actions.socket.event.d.ts +8 -8
- package/dist/libraries/socket/events/ticket-assign.socket.event.d.ts +40 -40
- package/dist/libraries/trpc/middlewares/auth.d.ts +2 -2
- package/dist/libraries/trpc/middlewares/createRoleProtectedProcedure.d.ts +2 -2
- package/dist/libraries/trpc/middlewares/phone-verified.d.ts +2 -2
- package/dist/libraries/trpc/middlewares/publicUserDecoder.d.ts +2 -2
- 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/dist/utilities/pagination.d.ts +3 -3
- package/dist/utilities/validation/common-validation.d.ts +72 -72
- package/package.json +1 -1
|
@@ -39,8 +39,8 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
|
|
|
39
39
|
riderTips: z.ZodNumber;
|
|
40
40
|
secondaryRiderTips: z.ZodNumber;
|
|
41
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
deliveryFee: number;
|
|
43
42
|
total: number;
|
|
43
|
+
deliveryFee: number;
|
|
44
44
|
secondaryDeliveryFee: number;
|
|
45
45
|
riderTips: number;
|
|
46
46
|
secondaryRiderTips: number;
|
|
@@ -48,8 +48,8 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
|
|
|
48
48
|
paidAmount: number;
|
|
49
49
|
secondaryPaidAmount: number;
|
|
50
50
|
}, {
|
|
51
|
-
deliveryFee: number;
|
|
52
51
|
total: number;
|
|
52
|
+
deliveryFee: number;
|
|
53
53
|
secondaryDeliveryFee: number;
|
|
54
54
|
riderTips: number;
|
|
55
55
|
secondaryRiderTips: number;
|
|
@@ -60,8 +60,8 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
|
|
|
60
60
|
}, "strip", z.ZodTypeAny, {
|
|
61
61
|
paymentMethod: PaymentMethod;
|
|
62
62
|
pricing: {
|
|
63
|
-
deliveryFee: number;
|
|
64
63
|
total: number;
|
|
64
|
+
deliveryFee: number;
|
|
65
65
|
secondaryDeliveryFee: number;
|
|
66
66
|
riderTips: number;
|
|
67
67
|
secondaryRiderTips: number;
|
|
@@ -73,8 +73,8 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
|
|
|
73
73
|
}, {
|
|
74
74
|
paymentMethod: PaymentMethod;
|
|
75
75
|
pricing: {
|
|
76
|
-
deliveryFee: number;
|
|
77
76
|
total: number;
|
|
77
|
+
deliveryFee: number;
|
|
78
78
|
secondaryDeliveryFee: number;
|
|
79
79
|
riderTips: number;
|
|
80
80
|
secondaryRiderTips: number;
|
|
@@ -88,20 +88,21 @@ 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
|
-
createdAt: Date;
|
|
92
91
|
_id: import("mongoose").Types.ObjectId;
|
|
92
|
+
createdAt: Date;
|
|
93
93
|
user: {
|
|
94
94
|
_id: import("mongoose").Types.ObjectId;
|
|
95
95
|
name: string;
|
|
96
96
|
};
|
|
97
97
|
orderId: string;
|
|
98
98
|
shopId: import("mongoose").Types.ObjectId;
|
|
99
|
+
paymentMethod: PaymentMethod;
|
|
99
100
|
triggerAt: Date;
|
|
100
101
|
adjustedFinance: {
|
|
101
102
|
paymentMethod: PaymentMethod;
|
|
102
103
|
pricing: {
|
|
103
|
-
deliveryFee: number;
|
|
104
104
|
total: number;
|
|
105
|
+
deliveryFee: number;
|
|
105
106
|
secondaryDeliveryFee: number;
|
|
106
107
|
riderTips: number;
|
|
107
108
|
secondaryRiderTips: number;
|
|
@@ -111,26 +112,26 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
|
|
|
111
112
|
};
|
|
112
113
|
shopProfit: number;
|
|
113
114
|
};
|
|
114
|
-
paymentMethod: PaymentMethod;
|
|
115
115
|
orderActionType: OrderAction;
|
|
116
116
|
orderStatus: RegularOrderStatus;
|
|
117
117
|
orderAction: OrderAction;
|
|
118
118
|
preparationTimeMinutes: number;
|
|
119
119
|
}, {
|
|
120
|
-
createdAt: Date;
|
|
121
120
|
_id: string | import("mongoose").Types.ObjectId;
|
|
121
|
+
createdAt: Date;
|
|
122
122
|
user: {
|
|
123
123
|
_id: string | import("mongoose").Types.ObjectId;
|
|
124
124
|
name: string;
|
|
125
125
|
};
|
|
126
126
|
orderId: string;
|
|
127
127
|
shopId: string | import("mongoose").Types.ObjectId;
|
|
128
|
+
paymentMethod: PaymentMethod;
|
|
128
129
|
triggerAt: Date;
|
|
129
130
|
adjustedFinance: {
|
|
130
131
|
paymentMethod: PaymentMethod;
|
|
131
132
|
pricing: {
|
|
132
|
-
deliveryFee: number;
|
|
133
133
|
total: number;
|
|
134
|
+
deliveryFee: number;
|
|
134
135
|
secondaryDeliveryFee: number;
|
|
135
136
|
riderTips: number;
|
|
136
137
|
secondaryRiderTips: number;
|
|
@@ -140,7 +141,6 @@ export declare const OrderActionsOutputSchema: z.ZodObject<{
|
|
|
140
141
|
};
|
|
141
142
|
shopProfit: number;
|
|
142
143
|
};
|
|
143
|
-
paymentMethod: PaymentMethod;
|
|
144
144
|
orderActionType: OrderAction;
|
|
145
145
|
orderStatus: RegularOrderStatus;
|
|
146
146
|
orderAction: OrderAction;
|
|
@@ -183,8 +183,8 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
|
|
|
183
183
|
riderTips: z.ZodNumber;
|
|
184
184
|
secondaryRiderTips: z.ZodNumber;
|
|
185
185
|
}, "strip", z.ZodTypeAny, {
|
|
186
|
-
deliveryFee: number;
|
|
187
186
|
total: number;
|
|
187
|
+
deliveryFee: number;
|
|
188
188
|
secondaryDeliveryFee: number;
|
|
189
189
|
riderTips: number;
|
|
190
190
|
secondaryRiderTips: number;
|
|
@@ -192,8 +192,8 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
|
|
|
192
192
|
paidAmount: number;
|
|
193
193
|
secondaryPaidAmount: number;
|
|
194
194
|
}, {
|
|
195
|
-
deliveryFee: number;
|
|
196
195
|
total: number;
|
|
196
|
+
deliveryFee: number;
|
|
197
197
|
secondaryDeliveryFee: number;
|
|
198
198
|
riderTips: number;
|
|
199
199
|
secondaryRiderTips: number;
|
|
@@ -204,8 +204,8 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
|
|
|
204
204
|
}, "strip", z.ZodTypeAny, {
|
|
205
205
|
paymentMethod: PaymentMethod;
|
|
206
206
|
pricing: {
|
|
207
|
-
deliveryFee: number;
|
|
208
207
|
total: number;
|
|
208
|
+
deliveryFee: number;
|
|
209
209
|
secondaryDeliveryFee: number;
|
|
210
210
|
riderTips: number;
|
|
211
211
|
secondaryRiderTips: number;
|
|
@@ -217,8 +217,8 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
|
|
|
217
217
|
}, {
|
|
218
218
|
paymentMethod: PaymentMethod;
|
|
219
219
|
pricing: {
|
|
220
|
-
deliveryFee: number;
|
|
221
220
|
total: number;
|
|
221
|
+
deliveryFee: number;
|
|
222
222
|
secondaryDeliveryFee: number;
|
|
223
223
|
riderTips: number;
|
|
224
224
|
secondaryRiderTips: number;
|
|
@@ -232,20 +232,21 @@ 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
|
-
createdAt: Date;
|
|
236
235
|
_id: import("mongoose").Types.ObjectId;
|
|
236
|
+
createdAt: Date;
|
|
237
237
|
user: {
|
|
238
238
|
_id: import("mongoose").Types.ObjectId;
|
|
239
239
|
name: string;
|
|
240
240
|
};
|
|
241
241
|
orderId: string;
|
|
242
242
|
shopId: import("mongoose").Types.ObjectId;
|
|
243
|
+
paymentMethod: PaymentMethod;
|
|
243
244
|
triggerAt: Date;
|
|
244
245
|
adjustedFinance: {
|
|
245
246
|
paymentMethod: PaymentMethod;
|
|
246
247
|
pricing: {
|
|
247
|
-
deliveryFee: number;
|
|
248
248
|
total: number;
|
|
249
|
+
deliveryFee: number;
|
|
249
250
|
secondaryDeliveryFee: number;
|
|
250
251
|
riderTips: number;
|
|
251
252
|
secondaryRiderTips: number;
|
|
@@ -255,26 +256,26 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
|
|
|
255
256
|
};
|
|
256
257
|
shopProfit: number;
|
|
257
258
|
};
|
|
258
|
-
paymentMethod: PaymentMethod;
|
|
259
259
|
orderActionType: OrderAction;
|
|
260
260
|
orderStatus: RegularOrderStatus;
|
|
261
261
|
orderAction: OrderAction;
|
|
262
262
|
preparationTimeMinutes: number;
|
|
263
263
|
}, {
|
|
264
|
-
createdAt: Date;
|
|
265
264
|
_id: string | import("mongoose").Types.ObjectId;
|
|
265
|
+
createdAt: Date;
|
|
266
266
|
user: {
|
|
267
267
|
_id: string | import("mongoose").Types.ObjectId;
|
|
268
268
|
name: string;
|
|
269
269
|
};
|
|
270
270
|
orderId: string;
|
|
271
271
|
shopId: string | import("mongoose").Types.ObjectId;
|
|
272
|
+
paymentMethod: PaymentMethod;
|
|
272
273
|
triggerAt: Date;
|
|
273
274
|
adjustedFinance: {
|
|
274
275
|
paymentMethod: PaymentMethod;
|
|
275
276
|
pricing: {
|
|
276
|
-
deliveryFee: number;
|
|
277
277
|
total: number;
|
|
278
|
+
deliveryFee: number;
|
|
278
279
|
secondaryDeliveryFee: number;
|
|
279
280
|
riderTips: number;
|
|
280
281
|
secondaryRiderTips: number;
|
|
@@ -284,7 +285,6 @@ export declare class OrderActionsSocketEvent extends BaseSocketEvent<typeof Orde
|
|
|
284
285
|
};
|
|
285
286
|
shopProfit: number;
|
|
286
287
|
};
|
|
287
|
-
paymentMethod: PaymentMethod;
|
|
288
288
|
orderActionType: OrderAction;
|
|
289
289
|
orderStatus: RegularOrderStatus;
|
|
290
290
|
orderAction: OrderAction;
|
|
@@ -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;
|
|
23
22
|
_id: import("mongoose").Types.ObjectId;
|
|
24
|
-
|
|
23
|
+
updatedAt: Date;
|
|
25
24
|
latitude: number;
|
|
26
25
|
longitude: number;
|
|
26
|
+
riderId: import("mongoose").Types.ObjectId;
|
|
27
27
|
bearing?: number | undefined;
|
|
28
28
|
}, {
|
|
29
|
-
updatedAt: string | Date;
|
|
30
29
|
_id: string | import("mongoose").Types.ObjectId;
|
|
31
|
-
|
|
30
|
+
updatedAt: string | Date;
|
|
32
31
|
latitude: number;
|
|
33
32
|
longitude: number;
|
|
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;
|
|
59
58
|
_id: import("mongoose").Types.ObjectId;
|
|
60
|
-
|
|
59
|
+
updatedAt: Date;
|
|
61
60
|
latitude: number;
|
|
62
61
|
longitude: number;
|
|
62
|
+
riderId: import("mongoose").Types.ObjectId;
|
|
63
63
|
bearing?: number | undefined;
|
|
64
64
|
}, {
|
|
65
|
-
updatedAt: string | Date;
|
|
66
65
|
_id: string | import("mongoose").Types.ObjectId;
|
|
67
|
-
|
|
66
|
+
updatedAt: string | Date;
|
|
68
67
|
latitude: number;
|
|
69
68
|
longitude: number;
|
|
69
|
+
riderId: string | import("mongoose").Types.ObjectId;
|
|
70
70
|
bearing?: number | undefined;
|
|
71
71
|
}>;
|
|
72
72
|
};
|
|
@@ -12,19 +12,19 @@ export declare const TicketActionsSocketOutputSchema: z.ZodObject<{
|
|
|
12
12
|
title: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
13
13
|
silent: z.ZodOptional<z.ZodBoolean>;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
_id: import("mongoose").Types.ObjectId;
|
|
16
15
|
status: TicketStatus;
|
|
17
16
|
type: TicketType;
|
|
17
|
+
_id: import("mongoose").Types.ObjectId;
|
|
18
|
+
silent?: boolean | undefined;
|
|
18
19
|
title?: string | undefined;
|
|
19
20
|
content?: string | undefined;
|
|
20
|
-
silent?: boolean | undefined;
|
|
21
21
|
}, {
|
|
22
|
-
_id: import("mongoose").Types.ObjectId;
|
|
23
22
|
status: TicketStatus;
|
|
24
23
|
type: TicketType;
|
|
24
|
+
_id: import("mongoose").Types.ObjectId;
|
|
25
|
+
silent?: boolean | undefined;
|
|
25
26
|
title?: string | undefined;
|
|
26
27
|
content?: string | undefined;
|
|
27
|
-
silent?: boolean | undefined;
|
|
28
28
|
}>;
|
|
29
29
|
export declare const TicketActionsPushOutputSchema: z.ZodObject<{
|
|
30
30
|
ticketId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
@@ -59,19 +59,19 @@ export declare class TicketActionsSocketEvent extends BaseSocketEvent<typeof Tic
|
|
|
59
59
|
title: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
60
60
|
silent: z.ZodOptional<z.ZodBoolean>;
|
|
61
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
_id: import("mongoose").Types.ObjectId;
|
|
63
62
|
status: TicketStatus;
|
|
64
63
|
type: TicketType;
|
|
64
|
+
_id: import("mongoose").Types.ObjectId;
|
|
65
|
+
silent?: boolean | undefined;
|
|
65
66
|
title?: string | undefined;
|
|
66
67
|
content?: string | undefined;
|
|
67
|
-
silent?: boolean | undefined;
|
|
68
68
|
}, {
|
|
69
|
-
_id: import("mongoose").Types.ObjectId;
|
|
70
69
|
status: TicketStatus;
|
|
71
70
|
type: TicketType;
|
|
71
|
+
_id: import("mongoose").Types.ObjectId;
|
|
72
|
+
silent?: boolean | undefined;
|
|
72
73
|
title?: string | undefined;
|
|
73
74
|
content?: string | undefined;
|
|
74
|
-
silent?: boolean | undefined;
|
|
75
75
|
}>;
|
|
76
76
|
pushNotificationOutput: z.ZodObject<{
|
|
77
77
|
ticketId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
@@ -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;
|
|
16
17
|
_id: import("mongoose").Types.ObjectId;
|
|
17
18
|
name: string;
|
|
18
|
-
type: UserRef;
|
|
19
19
|
profilePhoto: string | null;
|
|
20
20
|
}, {
|
|
21
|
+
type: UserRef;
|
|
21
22
|
_id: string | import("mongoose").Types.ObjectId;
|
|
22
23
|
name: string;
|
|
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>;
|
|
@@ -39,41 +39,41 @@ export declare const TicketAssignSocketOutputSchema: z.ZodObject<{
|
|
|
39
39
|
}>;
|
|
40
40
|
unreadCount: z.ZodNumber;
|
|
41
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
createdAt: Date;
|
|
43
|
-
updatedAt: Date;
|
|
44
|
-
_id: import("mongoose").Types.ObjectId;
|
|
45
42
|
status: TicketStatus;
|
|
46
43
|
type: TicketType;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
type: UserRef;
|
|
51
|
-
profilePhoto: string | null;
|
|
52
|
-
};
|
|
44
|
+
_id: import("mongoose").Types.ObjectId;
|
|
45
|
+
createdAt: Date;
|
|
46
|
+
updatedAt: Date;
|
|
53
47
|
lastMessage: {
|
|
54
48
|
createdAt: Date;
|
|
55
49
|
content: string;
|
|
56
50
|
};
|
|
57
51
|
unreadCount: number;
|
|
52
|
+
client: {
|
|
53
|
+
type: UserRef;
|
|
54
|
+
_id: import("mongoose").Types.ObjectId;
|
|
55
|
+
name: string;
|
|
56
|
+
profilePhoto: string | null;
|
|
57
|
+
};
|
|
58
58
|
chatroomId: import("mongoose").Types.ObjectId;
|
|
59
59
|
orderId?: import("mongoose").Types.ObjectId | undefined;
|
|
60
60
|
}, {
|
|
61
|
-
createdAt: string | Date;
|
|
62
|
-
updatedAt: string | Date;
|
|
63
|
-
_id: string | import("mongoose").Types.ObjectId;
|
|
64
61
|
status: TicketStatus;
|
|
65
62
|
type: TicketType;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
type: UserRef;
|
|
70
|
-
profilePhoto: string | null;
|
|
71
|
-
};
|
|
63
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
64
|
+
createdAt: string | Date;
|
|
65
|
+
updatedAt: string | Date;
|
|
72
66
|
lastMessage: {
|
|
73
67
|
createdAt: string | Date;
|
|
74
68
|
content: string;
|
|
75
69
|
};
|
|
76
70
|
unreadCount: number;
|
|
71
|
+
client: {
|
|
72
|
+
type: UserRef;
|
|
73
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
74
|
+
name: string;
|
|
75
|
+
profilePhoto: string | null;
|
|
76
|
+
};
|
|
77
77
|
chatroomId: string | import("mongoose").Types.ObjectId;
|
|
78
78
|
orderId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
79
79
|
}>;
|
|
@@ -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;
|
|
94
95
|
_id: import("mongoose").Types.ObjectId;
|
|
95
96
|
name: string;
|
|
96
|
-
type: UserRef;
|
|
97
97
|
profilePhoto: string | null;
|
|
98
98
|
}, {
|
|
99
|
+
type: UserRef;
|
|
99
100
|
_id: string | import("mongoose").Types.ObjectId;
|
|
100
101
|
name: string;
|
|
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>;
|
|
@@ -117,41 +117,41 @@ export declare class TicketAssignEvent extends BaseSocketEvent<typeof TicketAssi
|
|
|
117
117
|
}>;
|
|
118
118
|
unreadCount: z.ZodNumber;
|
|
119
119
|
}, "strip", z.ZodTypeAny, {
|
|
120
|
-
createdAt: Date;
|
|
121
|
-
updatedAt: Date;
|
|
122
|
-
_id: import("mongoose").Types.ObjectId;
|
|
123
120
|
status: TicketStatus;
|
|
124
121
|
type: TicketType;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
type: UserRef;
|
|
129
|
-
profilePhoto: string | null;
|
|
130
|
-
};
|
|
122
|
+
_id: import("mongoose").Types.ObjectId;
|
|
123
|
+
createdAt: Date;
|
|
124
|
+
updatedAt: Date;
|
|
131
125
|
lastMessage: {
|
|
132
126
|
createdAt: Date;
|
|
133
127
|
content: string;
|
|
134
128
|
};
|
|
135
129
|
unreadCount: number;
|
|
130
|
+
client: {
|
|
131
|
+
type: UserRef;
|
|
132
|
+
_id: import("mongoose").Types.ObjectId;
|
|
133
|
+
name: string;
|
|
134
|
+
profilePhoto: string | null;
|
|
135
|
+
};
|
|
136
136
|
chatroomId: import("mongoose").Types.ObjectId;
|
|
137
137
|
orderId?: import("mongoose").Types.ObjectId | undefined;
|
|
138
138
|
}, {
|
|
139
|
-
createdAt: string | Date;
|
|
140
|
-
updatedAt: string | Date;
|
|
141
|
-
_id: string | import("mongoose").Types.ObjectId;
|
|
142
139
|
status: TicketStatus;
|
|
143
140
|
type: TicketType;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
type: UserRef;
|
|
148
|
-
profilePhoto: string | null;
|
|
149
|
-
};
|
|
141
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
142
|
+
createdAt: string | Date;
|
|
143
|
+
updatedAt: string | Date;
|
|
150
144
|
lastMessage: {
|
|
151
145
|
createdAt: string | Date;
|
|
152
146
|
content: string;
|
|
153
147
|
};
|
|
154
148
|
unreadCount: number;
|
|
149
|
+
client: {
|
|
150
|
+
type: UserRef;
|
|
151
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
152
|
+
name: string;
|
|
153
|
+
profilePhoto: string | null;
|
|
154
|
+
};
|
|
155
155
|
chatroomId: string | import("mongoose").Types.ObjectId;
|
|
156
156
|
orderId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
157
157
|
}>;
|
|
@@ -5,12 +5,12 @@ 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
|
-
entity: import("../context").EntityContext | undefined;
|
|
9
8
|
requestId: string | undefined;
|
|
9
|
+
entity: import("../context").EntityContext | undefined;
|
|
10
10
|
req: import("http").IncomingMessage;
|
|
11
11
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
12
|
+
tokenType: TokenType | undefined;
|
|
12
13
|
usedRefreshToken: boolean | undefined;
|
|
13
14
|
tokenRenewed: boolean | undefined;
|
|
14
|
-
tokenType: TokenType | undefined;
|
|
15
15
|
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
16
16
|
export {};
|
|
@@ -4,12 +4,12 @@ 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
|
-
entity: import("../context").EntityContext | undefined;
|
|
8
7
|
requestId: string | undefined;
|
|
8
|
+
entity: import("../context").EntityContext | undefined;
|
|
9
9
|
req: import("http").IncomingMessage;
|
|
10
10
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
11
|
+
tokenType: import("../../auth").TokenType | undefined;
|
|
11
12
|
usedRefreshToken: boolean | undefined;
|
|
12
13
|
tokenRenewed: boolean | undefined;
|
|
13
|
-
tokenType: import("../../auth").TokenType | undefined;
|
|
14
14
|
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
15
15
|
export {};
|
|
@@ -3,12 +3,12 @@ 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
|
-
entity: import("../context").EntityContext | undefined;
|
|
7
6
|
requestId: string | undefined;
|
|
7
|
+
entity: import("../context").EntityContext | undefined;
|
|
8
8
|
req: import("http").IncomingMessage;
|
|
9
9
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
10
|
+
tokenType: import("../../auth").TokenType | undefined;
|
|
10
11
|
usedRefreshToken: boolean | undefined;
|
|
11
12
|
tokenRenewed: boolean | undefined;
|
|
12
|
-
tokenType: import("../../auth").TokenType | undefined;
|
|
13
13
|
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
14
14
|
export {};
|
|
@@ -5,12 +5,12 @@ 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
|
-
entity: import("../context").EntityContext | undefined;
|
|
9
8
|
requestId: string | undefined;
|
|
9
|
+
entity: import("../context").EntityContext | undefined;
|
|
10
10
|
req: import("http").IncomingMessage;
|
|
11
11
|
res: import("http").ServerResponse<import("http").IncomingMessage>;
|
|
12
|
+
tokenType: TokenType | undefined;
|
|
12
13
|
usedRefreshToken: boolean | undefined;
|
|
13
14
|
tokenRenewed: boolean | undefined;
|
|
14
|
-
tokenType: TokenType | undefined;
|
|
15
15
|
}, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
|
|
16
16
|
export {};
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -22,24 +22,24 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
|
|
|
22
22
|
size: number;
|
|
23
23
|
page: number;
|
|
24
24
|
sort?: Record<string, 1 | -1> | undefined;
|
|
25
|
-
query?: Record<string, any> | undefined;
|
|
26
|
-
select?: Record<string, 0 | 1> | undefined;
|
|
27
|
-
populate?: any;
|
|
28
25
|
search?: {
|
|
29
26
|
searchKey: string;
|
|
30
27
|
searchFields?: string[] | undefined;
|
|
31
28
|
} | undefined;
|
|
32
|
-
}, {
|
|
33
|
-
size?: number | undefined;
|
|
34
|
-
page?: number | undefined;
|
|
35
|
-
sort?: Record<string, 1 | -1> | undefined;
|
|
36
|
-
query?: Record<string, any> | undefined;
|
|
37
29
|
select?: Record<string, 0 | 1> | undefined;
|
|
38
30
|
populate?: any;
|
|
31
|
+
query?: Record<string, any> | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
sort?: Record<string, 1 | -1> | undefined;
|
|
39
34
|
search?: {
|
|
40
35
|
searchKey: string;
|
|
41
36
|
searchFields?: string[] | undefined;
|
|
42
37
|
} | undefined;
|
|
38
|
+
select?: Record<string, 0 | 1> | undefined;
|
|
39
|
+
populate?: any;
|
|
40
|
+
size?: number | undefined;
|
|
41
|
+
page?: number | undefined;
|
|
42
|
+
query?: Record<string, any> | undefined;
|
|
43
43
|
}>>;
|
|
44
44
|
export type FilterDTO = z.infer<typeof FilterSchema>;
|
|
45
45
|
export declare const StringSchema: z.ZodString;
|
|
@@ -181,6 +181,7 @@ export declare const RegularOrderAddressSchema: z.ZodObject<{
|
|
|
181
181
|
} & {
|
|
182
182
|
_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>]>;
|
|
183
183
|
}, "strip", z.ZodTypeAny, {
|
|
184
|
+
_id: import("mongoose").Types.ObjectId;
|
|
184
185
|
address: string;
|
|
185
186
|
country: string;
|
|
186
187
|
location: {
|
|
@@ -192,7 +193,6 @@ export declare const RegularOrderAddressSchema: z.ZodObject<{
|
|
|
192
193
|
addressLabel: string;
|
|
193
194
|
apartment: string;
|
|
194
195
|
buildingName: string;
|
|
195
|
-
_id: import("mongoose").Types.ObjectId;
|
|
196
196
|
description?: string | undefined;
|
|
197
197
|
city?: string | undefined;
|
|
198
198
|
state?: string | undefined;
|
|
@@ -200,6 +200,7 @@ export declare const RegularOrderAddressSchema: z.ZodObject<{
|
|
|
200
200
|
deliveryOption?: string | undefined;
|
|
201
201
|
instructions?: string | undefined;
|
|
202
202
|
}, {
|
|
203
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
203
204
|
address: string;
|
|
204
205
|
country: string;
|
|
205
206
|
location: {
|
|
@@ -211,7 +212,6 @@ export declare const RegularOrderAddressSchema: z.ZodObject<{
|
|
|
211
212
|
addressLabel: string;
|
|
212
213
|
apartment: string;
|
|
213
214
|
buildingName: string;
|
|
214
|
-
_id: string | import("mongoose").Types.ObjectId;
|
|
215
215
|
description?: string | undefined;
|
|
216
216
|
city?: string | undefined;
|
|
217
217
|
state?: string | undefined;
|
|
@@ -803,13 +803,13 @@ 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
|
-
query?: Record<string, any> | undefined;
|
|
807
806
|
select?: Record<string, 0 | 1> | undefined;
|
|
808
807
|
populate?: any;
|
|
809
|
-
}, {
|
|
810
808
|
query?: Record<string, any> | undefined;
|
|
809
|
+
}, {
|
|
811
810
|
select?: Record<string, 0 | 1> | undefined;
|
|
812
811
|
populate?: any;
|
|
812
|
+
query?: Record<string, any> | undefined;
|
|
813
813
|
}>;
|
|
814
814
|
export type GetOneQueryDTO = DTO<typeof GetOneQuerySchema>;
|
|
815
815
|
declare const ShareableLinkSchema: z.ZodObject<{
|
|
@@ -22,6 +22,7 @@ export declare function createPaginatedSchema<ItemType extends z.ZodTypeAny>(ite
|
|
|
22
22
|
}, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodBoolean]>, z.ZodNull]>, z.ZodUndefined]>, "strip">>;
|
|
23
23
|
items: z.ZodArray<ItemType, "many">;
|
|
24
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
items: ItemType["_output"][];
|
|
25
26
|
metadata: {
|
|
26
27
|
size: number;
|
|
27
28
|
page: number;
|
|
@@ -30,8 +31,8 @@ export declare function createPaginatedSchema<ItemType extends z.ZodTypeAny>(ite
|
|
|
30
31
|
} & {
|
|
31
32
|
[k: string]: string | number | boolean | null | undefined;
|
|
32
33
|
};
|
|
33
|
-
items: ItemType["_output"][];
|
|
34
34
|
}, {
|
|
35
|
+
items: ItemType["_input"][];
|
|
35
36
|
metadata: {
|
|
36
37
|
size: number;
|
|
37
38
|
page: number;
|
|
@@ -40,7 +41,6 @@ export declare function createPaginatedSchema<ItemType extends z.ZodTypeAny>(ite
|
|
|
40
41
|
} & {
|
|
41
42
|
[k: string]: string | number | boolean | null | undefined;
|
|
42
43
|
};
|
|
43
|
-
items: ItemType["_input"][];
|
|
44
44
|
}>;
|
|
45
45
|
export interface RawPaginatedResult<T extends AnyParamConstructor<any>> {
|
|
46
46
|
metadata: {
|
|
@@ -62,6 +62,7 @@ export interface PaginatorOptions<TClass extends AnyParamConstructor<any>> {
|
|
|
62
62
|
}
|
|
63
63
|
export declare function createRawDocumentPaginatorObject<T extends AnyParamConstructor<any>>(model: ReturnModelType<T>): (options: PaginatorOptions<T>) => Promise<RawPaginatedResult<T>>;
|
|
64
64
|
export declare function createPaginatorObject<T extends AnyParamConstructor<any>>(model: ReturnModelType<T>, itemSchema: z.ZodTypeAny, transformFn?: (doc: DocumentType<T>) => z.infer<typeof itemSchema>): (options: PaginatorOptions<T>) => Promise<{
|
|
65
|
+
items: any[];
|
|
65
66
|
metadata: {
|
|
66
67
|
size: number;
|
|
67
68
|
page: number;
|
|
@@ -70,7 +71,6 @@ export declare function createPaginatorObject<T extends AnyParamConstructor<any>
|
|
|
70
71
|
} & {
|
|
71
72
|
[k: string]: string | number | boolean | null | undefined;
|
|
72
73
|
};
|
|
73
|
-
items: any[];
|
|
74
74
|
}>;
|
|
75
75
|
export declare function paginateAggregation(model: any, pipeline: any[], page?: number, size?: number, sort?: any, populateOptions?: any): Promise<{
|
|
76
76
|
metadata: {
|