@lyxa.ai/core 1.4.310 → 1.4.311
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 +1 -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/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
|
@@ -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: {
|