@lyxa.ai/core 1.4.330 → 1.4.331

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 (28) hide show
  1. package/dist/libraries/event/events/mongo-stream-changes-batch-process-shops-event.d.ts +2 -2
  2. package/dist/libraries/event/events/punch-marketing/sync-user-shop-punch-marketing-history-event.d.ts +2 -2
  3. package/dist/libraries/event/events/sync-order-again-sections-for-shop-event.d.ts +2 -2
  4. package/dist/libraries/mongo/models/index.d.ts +3 -0
  5. package/dist/libraries/mongo/models/index.js +6 -3
  6. package/dist/libraries/mongo/models/index.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 +13 -13
  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 +13 -13
  20. package/dist/libraries/socket/events/ticket-assign.socket.event.d.ts +8 -8
  21. package/dist/types/README.md +1 -1
  22. package/dist/types/package.json +1 -1
  23. package/dist/types/utilities/validation/common-validation.d.ts +12 -12
  24. package/dist/types/utilities/validation/validation-for-frontend.d.ts +2 -2
  25. package/dist/utilities/pagination.d.ts +3 -3
  26. package/dist/utilities/validation/common-validation.d.ts +12 -12
  27. package/dist/utilities/validation/validation-for-frontend.d.ts +2 -2
  28. package/package.json +1 -1
@@ -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;
25
28
  search?: {
26
29
  searchKey: string;
27
30
  searchFields?: string[] | undefined;
28
31
  } | undefined;
29
- select?: Record<string, 0 | 1> | undefined;
30
- populate?: any;
31
- query?: Record<string, any> | undefined;
32
32
  }, {
33
+ size?: number | undefined;
34
+ page?: number | undefined;
33
35
  sort?: Record<string, 1 | -1> | undefined;
36
+ query?: Record<string, any> | undefined;
37
+ select?: Record<string, 0 | 1> | undefined;
38
+ populate?: any;
34
39
  search?: {
35
40
  searchKey: string;
36
41
  searchFields?: string[] | undefined;
37
42
  } | 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,7 +181,6 @@ 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;
185
184
  address: string;
186
185
  country: string;
187
186
  location: {
@@ -193,6 +192,7 @@ export declare const RegularOrderAddressSchema: z.ZodObject<{
193
192
  addressLabel: string;
194
193
  apartment: string;
195
194
  buildingName: string;
195
+ _id: import("mongoose").Types.ObjectId;
196
196
  description?: string | undefined;
197
197
  city?: string | undefined;
198
198
  state?: string | undefined;
@@ -200,7 +200,6 @@ 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;
204
203
  address: string;
205
204
  country: string;
206
205
  location: {
@@ -212,6 +211,7 @@ export declare const RegularOrderAddressSchema: z.ZodObject<{
212
211
  addressLabel: string;
213
212
  apartment: string;
214
213
  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;
806
807
  select?: Record<string, 0 | 1> | undefined;
807
808
  populate?: any;
808
- query?: Record<string, any> | undefined;
809
809
  }, {
810
+ query?: Record<string, any> | undefined;
810
811
  select?: Record<string, 0 | 1> | undefined;
811
812
  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<{
@@ -4,8 +4,8 @@ export declare const UserAddressFrontendSchema: z.ZodObject<{
4
4
  addressLabel: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
5
5
  apartment: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
6
6
  buildingName: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
7
- deliveryOption: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
8
- instructions: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
7
+ deliveryOption: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
8
+ instructions: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
9
9
  }, "strip", z.ZodTypeAny, {
10
10
  addressLabel: string;
11
11
  apartment: string;
@@ -22,7 +22,6 @@ 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"][];
26
25
  metadata: {
27
26
  size: number;
28
27
  page: number;
@@ -31,8 +30,8 @@ export declare function createPaginatedSchema<ItemType extends z.ZodTypeAny>(ite
31
30
  } & {
32
31
  [k: string]: string | number | boolean | null | undefined;
33
32
  };
33
+ items: ItemType["_output"][];
34
34
  }, {
35
- items: ItemType["_input"][];
36
35
  metadata: {
37
36
  size: number;
38
37
  page: number;
@@ -41,6 +40,7 @@ export declare function createPaginatedSchema<ItemType extends z.ZodTypeAny>(ite
41
40
  } & {
42
41
  [k: string]: string | number | boolean | null | undefined;
43
42
  };
43
+ items: ItemType["_input"][];
44
44
  }>;
45
45
  export interface RawPaginatedResult<T extends AnyParamConstructor<any>> {
46
46
  metadata: {
@@ -62,7 +62,6 @@ 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[];
66
65
  metadata: {
67
66
  size: number;
68
67
  page: number;
@@ -71,6 +70,7 @@ export declare function createPaginatorObject<T extends AnyParamConstructor<any>
71
70
  } & {
72
71
  [k: string]: string | number | boolean | null | undefined;
73
72
  };
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: {
@@ -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;
25
28
  search?: {
26
29
  searchKey: string;
27
30
  searchFields?: string[] | undefined;
28
31
  } | undefined;
29
- select?: Record<string, 0 | 1> | undefined;
30
- populate?: any;
31
- query?: Record<string, any> | undefined;
32
32
  }, {
33
+ size?: number | undefined;
34
+ page?: number | undefined;
33
35
  sort?: Record<string, 1 | -1> | undefined;
36
+ query?: Record<string, any> | undefined;
37
+ select?: Record<string, 0 | 1> | undefined;
38
+ populate?: any;
34
39
  search?: {
35
40
  searchKey: string;
36
41
  searchFields?: string[] | undefined;
37
42
  } | 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,7 +181,6 @@ 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;
185
184
  address: string;
186
185
  country: string;
187
186
  location: {
@@ -193,6 +192,7 @@ export declare const RegularOrderAddressSchema: z.ZodObject<{
193
192
  addressLabel: string;
194
193
  apartment: string;
195
194
  buildingName: string;
195
+ _id: import("mongoose").Types.ObjectId;
196
196
  description?: string | undefined;
197
197
  city?: string | undefined;
198
198
  state?: string | undefined;
@@ -200,7 +200,6 @@ 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;
204
203
  address: string;
205
204
  country: string;
206
205
  location: {
@@ -212,6 +211,7 @@ export declare const RegularOrderAddressSchema: z.ZodObject<{
212
211
  addressLabel: string;
213
212
  apartment: string;
214
213
  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;
806
807
  select?: Record<string, 0 | 1> | undefined;
807
808
  populate?: any;
808
- query?: Record<string, any> | undefined;
809
809
  }, {
810
+ query?: Record<string, any> | undefined;
810
811
  select?: Record<string, 0 | 1> | undefined;
811
812
  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<{
@@ -4,8 +4,8 @@ export declare const UserAddressFrontendSchema: z.ZodObject<{
4
4
  addressLabel: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
5
5
  apartment: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
6
6
  buildingName: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
7
- deliveryOption: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
8
- instructions: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
7
+ deliveryOption: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
8
+ instructions: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
9
9
  }, "strip", z.ZodTypeAny, {
10
10
  addressLabel: string;
11
11
  apartment: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/core",
3
- "version": "1.4.330",
3
+ "version": "1.4.331",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",