@lyxa.ai/core 1.4.322-alpha.1 → 1.4.323

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/google-location/google-location.service.js +0 -10
  2. package/dist/libraries/google-location/google-location.service.js.map +1 -1
  3. package/dist/libraries/llm/providers/openai-provider.js +5 -15
  4. package/dist/libraries/llm/providers/openai-provider.js.map +1 -1
  5. package/dist/libraries/mongo/models/index.d.ts +0 -3
  6. package/dist/libraries/mongo/models/index.js +3 -6
  7. package/dist/libraries/mongo/models/index.js.map +1 -1
  8. package/dist/libraries/mongo/models/providers/global-coupon.model.d.ts +0 -2
  9. package/dist/libraries/mongo/models/providers/global-coupon.model.js +0 -20
  10. package/dist/libraries/mongo/models/providers/global-coupon.model.js.map +1 -1
  11. package/dist/libraries/mongo/models/user-shop-history.model.d.ts +1 -6
  12. package/dist/libraries/mongo/models/user-shop-history.model.js +3 -22
  13. package/dist/libraries/mongo/models/user-shop-history.model.js.map +1 -1
  14. package/dist/libraries/mongo/models/user.model.d.ts +1 -2
  15. package/dist/libraries/mongo/models/user.model.js +1 -6
  16. package/dist/libraries/mongo/models/user.model.js.map +1 -1
  17. package/dist/libraries/socket/events/chatroom-message-send.socket.event.d.ts +25 -25
  18. package/dist/libraries/socket/events/order-actions.socket.event.d.ts +32 -32
  19. package/dist/libraries/socket/events/rider-location-update.socket.event.d.ts +8 -8
  20. package/dist/libraries/socket/events/ticket-actions.socket.event.d.ts +8 -8
  21. package/dist/libraries/socket/events/ticket-assign.socket.event.d.ts +28 -28
  22. package/dist/types/README.md +1 -1
  23. package/dist/types/package.json +1 -1
  24. package/dist/types/utilities/validation/common-validation.d.ts +12 -12
  25. package/dist/utilities/pagination.d.ts +3 -3
  26. package/dist/utilities/validation/common-validation.d.ts +72 -72
  27. package/package.json +1 -1
  28. package/dist/libraries/mongo/models/user-coupon.model.d.ts +0 -11
  29. package/dist/libraries/mongo/models/user-coupon.model.js +0 -52
  30. package/dist/libraries/mongo/models/user-coupon.model.js.map +0 -1
@@ -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
- riderId: import("mongoose").Types.ObjectId;
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
- riderId: string | import("mongoose").Types.ObjectId;
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
- riderId: import("mongoose").Types.ObjectId;
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
- riderId: string | import("mongoose").Types.ObjectId;
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
  };
@@ -13,18 +13,18 @@ export declare const TicketActionsSocketOutputSchema: z.ZodObject<{
13
13
  silent: z.ZodOptional<z.ZodBoolean>;
14
14
  }, "strip", z.ZodTypeAny, {
15
15
  status: TicketStatus;
16
- _id: import("mongoose").Types.ObjectId;
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
22
  status: TicketStatus;
23
- _id: import("mongoose").Types.ObjectId;
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>;
@@ -60,18 +60,18 @@ 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
- _id: import("mongoose").Types.ObjectId;
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
69
  status: TicketStatus;
70
- _id: import("mongoose").Types.ObjectId;
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
- name: string;
17
- _id: import("mongoose").Types.ObjectId;
18
16
  type: UserRef;
17
+ _id: import("mongoose").Types.ObjectId;
18
+ name: string;
19
19
  profilePhoto: string | null;
20
20
  }, {
21
- name: string;
22
- _id: string | import("mongoose").Types.ObjectId;
23
21
  type: UserRef;
22
+ _id: string | import("mongoose").Types.ObjectId;
23
+ name: string;
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,40 +40,40 @@ 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;
43
45
  createdAt: Date;
44
46
  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
+ unreadCount: number;
51
52
  client: {
52
- name: string;
53
- _id: import("mongoose").Types.ObjectId;
54
53
  type: UserRef;
54
+ _id: import("mongoose").Types.ObjectId;
55
+ name: string;
55
56
  profilePhoto: string | null;
56
57
  };
57
- unreadCount: number;
58
58
  chatroomId: import("mongoose").Types.ObjectId;
59
59
  orderId?: import("mongoose").Types.ObjectId | undefined;
60
60
  }, {
61
61
  status: TicketStatus;
62
+ type: TicketType;
63
+ _id: string | import("mongoose").Types.ObjectId;
62
64
  createdAt: string | Date;
63
65
  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
+ unreadCount: number;
70
71
  client: {
71
- name: string;
72
- _id: string | import("mongoose").Types.ObjectId;
73
72
  type: UserRef;
73
+ _id: string | import("mongoose").Types.ObjectId;
74
+ name: string;
74
75
  profilePhoto: string | null;
75
76
  };
76
- unreadCount: number;
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
- name: string;
95
- _id: import("mongoose").Types.ObjectId;
96
94
  type: UserRef;
95
+ _id: import("mongoose").Types.ObjectId;
96
+ name: string;
97
97
  profilePhoto: string | null;
98
98
  }, {
99
- name: string;
100
- _id: string | import("mongoose").Types.ObjectId;
101
99
  type: UserRef;
100
+ _id: string | import("mongoose").Types.ObjectId;
101
+ name: string;
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,40 +118,40 @@ 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;
121
123
  createdAt: Date;
122
124
  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
+ unreadCount: number;
129
130
  client: {
130
- name: string;
131
- _id: import("mongoose").Types.ObjectId;
132
131
  type: UserRef;
132
+ _id: import("mongoose").Types.ObjectId;
133
+ name: string;
133
134
  profilePhoto: string | null;
134
135
  };
135
- unreadCount: number;
136
136
  chatroomId: import("mongoose").Types.ObjectId;
137
137
  orderId?: import("mongoose").Types.ObjectId | undefined;
138
138
  }, {
139
139
  status: TicketStatus;
140
+ type: TicketType;
141
+ _id: string | import("mongoose").Types.ObjectId;
140
142
  createdAt: string | Date;
141
143
  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
+ unreadCount: number;
148
149
  client: {
149
- name: string;
150
- _id: string | import("mongoose").Types.ObjectId;
151
150
  type: UserRef;
151
+ _id: string | import("mongoose").Types.ObjectId;
152
+ name: string;
152
153
  profilePhoto: string | null;
153
154
  };
154
- unreadCount: number;
155
155
  chatroomId: string | import("mongoose").Types.ObjectId;
156
156
  orderId?: string | import("mongoose").Types.ObjectId | undefined;
157
157
  }>;
@@ -22,7 +22,7 @@ Perfect for sharing types between frontend and backend applications.
22
22
 
23
23
  ## Version
24
24
 
25
- Version: 1.4.322-alpha.1
25
+ Version: 1.4.323
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.4.322-alpha.1",
3
+ "version": "1.4.323",
4
4
  "description": "Lyxa type definitions and validation schemas for both frontend and backend",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -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: {