@lyxa.ai/core 1.4.322-alpha.2 → 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
@@ -21,25 +21,25 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
21
21
  }, "strip", z.ZodTypeAny, {
22
22
  size: number;
23
23
  page: number;
24
- query?: Record<string, any> | undefined;
24
+ sort?: Record<string, 1 | -1> | undefined;
25
25
  search?: {
26
26
  searchKey: string;
27
27
  searchFields?: string[] | undefined;
28
28
  } | undefined;
29
- sort?: Record<string, 1 | -1> | undefined;
30
29
  select?: Record<string, 0 | 1> | undefined;
31
30
  populate?: any;
32
- }, {
33
31
  query?: Record<string, any> | undefined;
32
+ }, {
33
+ sort?: Record<string, 1 | -1> | undefined;
34
34
  search?: {
35
35
  searchKey: string;
36
36
  searchFields?: string[] | undefined;
37
37
  } | undefined;
38
- sort?: Record<string, 1 | -1> | undefined;
39
- size?: number | undefined;
40
- page?: number | undefined;
41
38
  select?: Record<string, 0 | 1> | undefined;
42
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;
@@ -63,27 +63,27 @@ export declare const AddressSchema: z.ZodObject<{
63
63
  longitude: z.ZodNumber;
64
64
  zone: z.ZodOptional<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>]>>;
65
65
  }, "strip", z.ZodTypeAny, {
66
- longitude: number;
67
- latitude: number;
66
+ address: string;
67
+ country: string;
68
68
  location: {
69
69
  type: GeoLocationType;
70
70
  coordinates: [number, number];
71
71
  };
72
- address: string;
73
- country: string;
72
+ latitude: number;
73
+ longitude: number;
74
74
  description?: string | undefined;
75
75
  city?: string | undefined;
76
76
  state?: string | undefined;
77
77
  zone?: import("mongoose").Types.ObjectId | undefined;
78
78
  }, {
79
- longitude: number;
80
- latitude: number;
79
+ address: string;
80
+ country: string;
81
81
  location: {
82
82
  coordinates: [number, number];
83
83
  type?: GeoLocationType | undefined;
84
84
  };
85
- address: string;
86
- country: string;
85
+ latitude: number;
86
+ longitude: number;
87
87
  description?: string | undefined;
88
88
  city?: string | undefined;
89
89
  state?: string | undefined;
@@ -116,14 +116,14 @@ export declare const UserAddressSchema: z.ZodObject<{
116
116
  deliveryOption: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
117
117
  instructions: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
118
118
  }, "strip", z.ZodTypeAny, {
119
- longitude: number;
120
- latitude: number;
119
+ address: string;
120
+ country: string;
121
121
  location: {
122
122
  type: GeoLocationType;
123
123
  coordinates: [number, number];
124
124
  };
125
- address: string;
126
- country: string;
125
+ latitude: number;
126
+ longitude: number;
127
127
  addressLabel: string;
128
128
  apartment: string;
129
129
  buildingName: string;
@@ -134,14 +134,14 @@ export declare const UserAddressSchema: z.ZodObject<{
134
134
  deliveryOption?: string | undefined;
135
135
  instructions?: string | undefined;
136
136
  }, {
137
- longitude: number;
138
- latitude: number;
137
+ address: string;
138
+ country: string;
139
139
  location: {
140
140
  coordinates: [number, number];
141
141
  type?: GeoLocationType | undefined;
142
142
  };
143
- address: string;
144
- country: string;
143
+ latitude: number;
144
+ longitude: number;
145
145
  addressLabel: string;
146
146
  apartment: string;
147
147
  buildingName: string;
@@ -182,14 +182,14 @@ export declare const RegularOrderAddressSchema: z.ZodObject<{
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
184
  _id: import("mongoose").Types.ObjectId;
185
- longitude: number;
186
- latitude: number;
185
+ address: string;
186
+ country: string;
187
187
  location: {
188
188
  type: GeoLocationType;
189
189
  coordinates: [number, number];
190
190
  };
191
- address: string;
192
- country: string;
191
+ latitude: number;
192
+ longitude: number;
193
193
  addressLabel: string;
194
194
  apartment: string;
195
195
  buildingName: string;
@@ -201,14 +201,14 @@ export declare const RegularOrderAddressSchema: z.ZodObject<{
201
201
  instructions?: string | undefined;
202
202
  }, {
203
203
  _id: string | import("mongoose").Types.ObjectId;
204
- longitude: number;
205
- latitude: number;
204
+ address: string;
205
+ country: string;
206
206
  location: {
207
207
  coordinates: [number, number];
208
208
  type?: GeoLocationType | undefined;
209
209
  };
210
- address: string;
211
- country: string;
210
+ latitude: number;
211
+ longitude: number;
212
212
  addressLabel: string;
213
213
  apartment: string;
214
214
  buildingName: string;
@@ -248,17 +248,17 @@ export declare const CourierAddressSchema: z.ZodObject<{
248
248
  apartment: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
249
249
  buildingName: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
250
250
  }, "strip", z.ZodTypeAny, {
251
- name: string;
252
- longitude: number;
253
- latitude: number;
251
+ address: string;
252
+ country: string;
254
253
  location: {
255
254
  type: GeoLocationType;
256
255
  coordinates: [number, number];
257
256
  };
258
- phoneNumber: string;
259
- address: string;
260
- country: string;
257
+ latitude: number;
258
+ longitude: number;
261
259
  addressLabel: string;
260
+ name: string;
261
+ phoneNumber: string;
262
262
  description?: string | undefined;
263
263
  city?: string | undefined;
264
264
  state?: string | undefined;
@@ -268,17 +268,17 @@ export declare const CourierAddressSchema: z.ZodObject<{
268
268
  deliveryOption?: string | undefined;
269
269
  instructions?: string | undefined;
270
270
  }, {
271
- name: string;
272
- longitude: number;
273
- latitude: number;
271
+ address: string;
272
+ country: string;
274
273
  location: {
275
274
  coordinates: [number, number];
276
275
  type?: GeoLocationType | undefined;
277
276
  };
278
- phoneNumber: string;
279
- address: string;
280
- country: string;
277
+ latitude: number;
278
+ longitude: number;
281
279
  addressLabel: string;
280
+ name: string;
281
+ phoneNumber: string;
282
282
  description?: string | undefined;
283
283
  city?: string | undefined;
284
284
  state?: string | undefined;
@@ -331,15 +331,15 @@ export declare const NormalHourSchema: z.ZodObject<{
331
331
  end: string;
332
332
  }[] | undefined>;
333
333
  }, "strip", z.ZodTypeAny, {
334
- day: WeekDay;
335
334
  status: WorkStatus;
335
+ day: WeekDay;
336
336
  openingHours: {
337
337
  start: string;
338
338
  end: string;
339
339
  }[];
340
340
  }, {
341
- day: WeekDay;
342
341
  status: WorkStatus;
342
+ day: WeekDay;
343
343
  openingHours?: {
344
344
  start: string;
345
345
  end: string;
@@ -371,15 +371,15 @@ export declare const HolidayHourSchema: z.ZodObject<{
371
371
  end: string;
372
372
  }>;
373
373
  }, "strip", z.ZodTypeAny, {
374
- date: Date;
375
374
  status: HolidayWorkStatus;
375
+ date: Date;
376
376
  closingHour: {
377
377
  start: string;
378
378
  end: string;
379
379
  };
380
380
  }, {
381
- date: string | Date;
382
381
  status: HolidayWorkStatus;
382
+ date: string | Date;
383
383
  closingHour: {
384
384
  start: string;
385
385
  end: string;
@@ -418,15 +418,15 @@ export declare const WorkHourSettingSchema: z.ZodObject<{
418
418
  end: string;
419
419
  }[] | undefined>;
420
420
  }, "strip", z.ZodTypeAny, {
421
- day: WeekDay;
422
421
  status: WorkStatus;
422
+ day: WeekDay;
423
423
  openingHours: {
424
424
  start: string;
425
425
  end: string;
426
426
  }[];
427
427
  }, {
428
- day: WeekDay;
429
428
  status: WorkStatus;
429
+ day: WeekDay;
430
430
  openingHours?: {
431
431
  start: string;
432
432
  end: string;
@@ -458,15 +458,15 @@ export declare const WorkHourSettingSchema: z.ZodObject<{
458
458
  end: string;
459
459
  }>;
460
460
  }, "strip", z.ZodTypeAny, {
461
- date: Date;
462
461
  status: HolidayWorkStatus;
462
+ date: Date;
463
463
  closingHour: {
464
464
  start: string;
465
465
  end: string;
466
466
  };
467
467
  }, {
468
- date: string | Date;
469
468
  status: HolidayWorkStatus;
469
+ date: string | Date;
470
470
  closingHour: {
471
471
  start: string;
472
472
  end: string;
@@ -474,16 +474,16 @@ export declare const WorkHourSettingSchema: z.ZodObject<{
474
474
  }>, "many">>;
475
475
  }, "strip", z.ZodTypeAny, {
476
476
  normalHours: {
477
- day: WeekDay;
478
477
  status: WorkStatus;
478
+ day: WeekDay;
479
479
  openingHours: {
480
480
  start: string;
481
481
  end: string;
482
482
  }[];
483
483
  }[];
484
484
  holidayHours: {
485
- date: Date;
486
485
  status: HolidayWorkStatus;
486
+ date: Date;
487
487
  closingHour: {
488
488
  start: string;
489
489
  end: string;
@@ -491,16 +491,16 @@ export declare const WorkHourSettingSchema: z.ZodObject<{
491
491
  }[];
492
492
  }, {
493
493
  normalHours?: {
494
- day: WeekDay;
495
494
  status: WorkStatus;
495
+ day: WeekDay;
496
496
  openingHours?: {
497
497
  start: string;
498
498
  end: string;
499
499
  }[] | undefined;
500
500
  }[] | undefined;
501
501
  holidayHours?: {
502
- date: string | Date;
503
502
  status: HolidayWorkStatus;
503
+ date: string | Date;
504
504
  closingHour: {
505
505
  start: string;
506
506
  end: string;
@@ -803,24 +803,24 @@ 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<{
816
816
  link: z.ZodString;
817
817
  message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
818
818
  }, "strip", z.ZodTypeAny, {
819
- link: string;
820
819
  message: string;
821
- }, {
822
820
  link: string;
821
+ }, {
823
822
  message: string;
823
+ link: string;
824
824
  }>;
825
825
  export declare const ShareableLinkResponseSchema: z.ZodObject<{
826
826
  success: z.ZodBoolean;
@@ -843,16 +843,16 @@ export declare const ShareableLinkResponseSchema: z.ZodObject<{
843
843
  totalPages: number;
844
844
  }>>;
845
845
  documents: z.ZodArray<z.ZodType<{
846
- link: string;
847
846
  message: string;
848
- }, z.ZodTypeDef, {
849
847
  link: string;
848
+ }, z.ZodTypeDef, {
850
849
  message: string;
850
+ link: string;
851
851
  }>, "many">;
852
852
  }, "strip", z.ZodTypeAny, {
853
853
  documents: {
854
- link: string;
855
854
  message: string;
855
+ link: string;
856
856
  }[];
857
857
  metadata?: {
858
858
  size: number;
@@ -862,8 +862,8 @@ export declare const ShareableLinkResponseSchema: z.ZodObject<{
862
862
  } | undefined;
863
863
  }, {
864
864
  documents: {
865
- link: string;
866
865
  message: string;
866
+ link: string;
867
867
  }[];
868
868
  metadata?: {
869
869
  size: number;
@@ -872,22 +872,22 @@ export declare const ShareableLinkResponseSchema: z.ZodObject<{
872
872
  totalPages: number;
873
873
  } | undefined;
874
874
  }>, z.ZodType<{
875
- link: string;
876
875
  message: string;
877
- }, z.ZodTypeDef, {
878
876
  link: string;
877
+ }, z.ZodTypeDef, {
879
878
  message: string;
879
+ link: string;
880
880
  }>]>>;
881
881
  }, "strip", z.ZodTypeAny, {
882
882
  message: string;
883
883
  success: boolean;
884
884
  data?: {
885
- link: string;
886
885
  message: string;
886
+ link: string;
887
887
  } | {
888
888
  documents: {
889
- link: string;
890
889
  message: string;
890
+ link: string;
891
891
  }[];
892
892
  metadata?: {
893
893
  size: number;
@@ -900,12 +900,12 @@ export declare const ShareableLinkResponseSchema: z.ZodObject<{
900
900
  message: string;
901
901
  success: boolean;
902
902
  data?: {
903
- link: string;
904
903
  message: string;
904
+ link: string;
905
905
  } | {
906
906
  documents: {
907
- link: string;
908
907
  message: string;
908
+ link: string;
909
909
  }[];
910
910
  metadata?: {
911
911
  size: number;
@@ -954,13 +954,13 @@ export declare const PaymentInformationSchema: z.ZodObject<{
954
954
  transactionId: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
955
955
  }, "strip", z.ZodTypeAny, {
956
956
  cardType: CardType;
957
- orderId?: string | undefined;
958
957
  paymentIntentId?: string | undefined;
958
+ orderId?: string | undefined;
959
959
  transactionId?: string | undefined;
960
960
  }, {
961
- orderId?: string | undefined;
962
961
  cardType?: CardType | undefined;
963
962
  paymentIntentId?: string | undefined;
963
+ orderId?: string | undefined;
964
964
  transactionId?: string | undefined;
965
965
  }>;
966
966
  export type PaymentInformationDTO = DTO<typeof PaymentInformationSchema>;
@@ -1004,16 +1004,16 @@ export declare const PaymentRecordSchema: z.ZodObject<{
1004
1004
  amount: number;
1005
1005
  provider: PaymentProvider;
1006
1006
  authorizedAmount: number;
1007
- orderId?: string | null | undefined;
1008
1007
  paymentIntentId?: string | null | undefined;
1008
+ orderId?: string | null | undefined;
1009
1009
  transactionId?: string | null | undefined;
1010
1010
  externalId?: number | null | undefined;
1011
1011
  }, {
1012
1012
  amount: number;
1013
1013
  provider: PaymentProvider;
1014
1014
  authorizedAmount: number;
1015
- orderId?: string | null | undefined;
1016
1015
  paymentIntentId?: string | null | undefined;
1016
+ orderId?: string | null | undefined;
1017
1017
  transactionId?: string | null | undefined;
1018
1018
  externalId?: number | null | undefined;
1019
1019
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/core",
3
- "version": "1.4.322-alpha.2",
3
+ "version": "1.4.323",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -1,11 +0,0 @@
1
- import { Ref } from '@typegoose/typegoose';
2
- import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
3
- import { User } from './user.model';
4
- import { Coupon } from './coupon.model';
5
- export declare class UserCoupon extends TimeStamps {
6
- user: Ref<User>;
7
- coupon: Ref<Coupon>;
8
- startDate: Date;
9
- endDate?: Date;
10
- isExpired?: boolean;
11
- }
@@ -1,52 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.UserCoupon = void 0;
13
- const typegoose_1 = require("@typegoose/typegoose");
14
- const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
15
- const user_model_1 = require("./user.model");
16
- const coupon_model_1 = require("./coupon.model");
17
- let UserCoupon = class UserCoupon extends defaultClasses_1.TimeStamps {
18
- user;
19
- coupon;
20
- startDate;
21
- endDate;
22
- isExpired;
23
- };
24
- exports.UserCoupon = UserCoupon;
25
- __decorate([
26
- (0, typegoose_1.prop)({ required: true, ref: () => user_model_1.User }),
27
- __metadata("design:type", Object)
28
- ], UserCoupon.prototype, "user", void 0);
29
- __decorate([
30
- (0, typegoose_1.prop)({ required: true, ref: () => coupon_model_1.Coupon }),
31
- __metadata("design:type", Object)
32
- ], UserCoupon.prototype, "coupon", void 0);
33
- __decorate([
34
- (0, typegoose_1.prop)({ required: true, type: Date }),
35
- __metadata("design:type", Date)
36
- ], UserCoupon.prototype, "startDate", void 0);
37
- __decorate([
38
- (0, typegoose_1.prop)({ type: Date }),
39
- __metadata("design:type", Date)
40
- ], UserCoupon.prototype, "endDate", void 0);
41
- __decorate([
42
- (0, typegoose_1.prop)({ type: Boolean, default: false }),
43
- __metadata("design:type", Boolean)
44
- ], UserCoupon.prototype, "isExpired", void 0);
45
- exports.UserCoupon = UserCoupon = __decorate([
46
- (0, typegoose_1.modelOptions)({
47
- schemaOptions: { collection: 'user-coupons' },
48
- }),
49
- (0, typegoose_1.index)({ user: 1, deletedAt: 1 }, { partialFilterExpression: { deletedAt: null } }),
50
- (0, typegoose_1.index)({ coupon: 1, deletedAt: 1 }, { partialFilterExpression: { deletedAt: null } })
51
- ], UserCoupon);
52
- //# sourceMappingURL=user-coupon.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-coupon.model.js","sourceRoot":"/","sources":["libraries/mongo/models/user-coupon.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,6CAAoC;AACpC,iDAAwC;AAOjC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,2BAAU;IAElC,IAAI,CAAa;IAGjB,MAAM,CAAe;IAGrB,SAAS,CAAQ;IAGjB,OAAO,CAAQ;IAGf,SAAS,CAAW;CAC3B,CAAA;AAfY,gCAAU;AAEf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;wCAClB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,qBAAM,EAAE,CAAC;;0CAChB;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BAClB,IAAI;6CAAC;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACJ,IAAI;2CAAC;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;6CACb;qBAdf,UAAU;IALtB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE;KAC7C,CAAC;IACD,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;IAClF,IAAA,iBAAK,EAAC,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;GACxE,UAAU,CAetB","sourcesContent":["import { index, modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { User } from './user.model';\nimport { Coupon } from './coupon.model';\n\n@modelOptions({\n\tschemaOptions: { collection: 'user-coupons' },\n})\n@index({ user: 1, deletedAt: 1 }, { partialFilterExpression: { deletedAt: null } })\n@index({ coupon: 1, deletedAt: 1 }, { partialFilterExpression: { deletedAt: null } })\nexport class UserCoupon extends TimeStamps {\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, ref: () => Coupon })\n\tpublic coupon!: Ref<Coupon>;\n\n\t@prop({ required: true, type: Date })\n\tpublic startDate!: Date;\n\n\t@prop({ type: Date })\n\tpublic endDate?: Date;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isExpired?: boolean;\n}\n"]}