@lyxa.ai/core 1.2.54 → 1.2.56

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.
@@ -1,11 +1,12 @@
1
1
  import { Ref } from '@typegoose/typegoose';
2
- import { AdjustmentReason } from '../../../../utilities/enum';
2
+ import { AdjustmentReason, AdjustmentStatus } from '../../../../utilities/enum';
3
3
  import { Product } from '../product.model';
4
4
  import { LineItem } from '../line-item.model';
5
5
  import { Admin } from '../admin.model';
6
6
  export declare class AdjustedLineItem {
7
7
  lineItem: Ref<LineItem>;
8
8
  note?: string;
9
+ adjustmentStatus?: AdjustmentStatus;
9
10
  }
10
11
  export declare class AdjustmentInformation {
11
12
  reason?: AdjustmentReason;
@@ -18,6 +18,7 @@ const mongoose_1 = require("mongoose");
18
18
  class AdjustedLineItem {
19
19
  lineItem;
20
20
  note;
21
+ adjustmentStatus;
21
22
  }
22
23
  exports.AdjustedLineItem = AdjustedLineItem;
23
24
  __decorate([
@@ -28,6 +29,10 @@ __decorate([
28
29
  (0, typegoose_1.prop)({ type: String, maxlength: 150 }),
29
30
  __metadata("design:type", String)
30
31
  ], AdjustedLineItem.prototype, "note", void 0);
32
+ __decorate([
33
+ (0, typegoose_1.prop)({ type: String, enum: enum_1.AdjustmentStatus }),
34
+ __metadata("design:type", String)
35
+ ], AdjustedLineItem.prototype, "adjustmentStatus", void 0);
31
36
  class AdjustmentInformation {
32
37
  reason;
33
38
  suggestedProduct;
@@ -1 +1 @@
1
- {"version":3,"file":"adjustment-information.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/adjustment-information.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2D;AAC3D,qDAA8D;AAE9D,wDAA8C;AAC9C,gDAAuC;AAEvC,uCAAiC;AAEjC,MAAa,gBAAgB;IAErB,QAAQ,CAAiB;IAGzB,IAAI,CAAU;CACrB;AAND,4CAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,QAA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oose/typegoose';\nimport { AdjustmentReason } from '../../../../utilities/enum';\nimport { Product } from '../product.model';\nimport { LineItem } from '../line-item.model';\nimport { Admin } from '../admin.model';\nimport { User } from '../user.model';\nimport { Types } from 'mongoose';\n\nexport class AdjustedLineItem {\n\t@prop({ required: true, ref: () => LineItem })\n\tpublic lineItem!: Ref<LineItem>;\n\n\t@prop({ type: String, maxlength: 150 })\n\tpublic note?: string;\n}\n\nexport class AdjustmentInformation {\n\t@prop({ type: String, enum: AdjustmentReason })\n\tpublic reason?: AdjustmentReason;\n\n\t@prop({ type: () => [Types.ObjectId] }, PropType.MAP)\n\tpublic suggestedProduct?: Map<string, Ref<Product>[]>;\n\n\t@prop({ type: () => [AdjustedLineItem], default: [] })\n\tpublic adjustedLineItems?: AdjustedLineItem[];\n\n\t@prop({ type: Date, default: () => new Date() })\n\tpublic requestedAt?: Date;\n\n\t@prop({ type: () => Date })\n\tpublic resolvedAt?: Date;\n\n\t@prop({ ref: () => Admin })\n\tpublic admin?: Ref<Admin>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRequestByShop?: boolean;\n}\n"]}
1
+ {"version":3,"file":"adjustment-information.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/adjustment-information.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2D;AAC3D,qDAAgF;AAEhF,wDAA8C;AAC9C,gDAAuC;AAEvC,uCAAiC;AAEjC,MAAa,gBAAgB;IAErB,QAAQ,CAAiB;IAGzB,IAAI,CAAU;IAGd,gBAAgB,CAAoB;CAC3C;AATD,4CASC;AAPO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ,EAAE,CAAC;;kDACd;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;8CAClB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAgB,EAAE,CAAC;;0DACJ;AAG5C,MAAa,qBAAqB;IAE1B,MAAM,CAAoB;IAG1B,gBAAgB,CAA+B;IAG/C,iBAAiB,CAAsB;IAGvC,WAAW,CAAQ;IAGnB,UAAU,CAAQ;IAGlB,KAAK,CAAc;IAGnB,eAAe,CAAW;CACjC;AArBD,sDAqBC;AAnBO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAgB,EAAE,CAAC;;qDACd;AAG1B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,gBAAK,CAAC,QAAQ,CAAC,EAAE,EAAE,oBAAQ,CAAC,GAAG,CAAC;8BAC3B,GAAG;+DAAyB;AAG/C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;gEACR;AAGvC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAC3B,IAAI;0DAAC;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;8BACP,IAAI;yDAAC;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;oDACD;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8DACP","sourcesContent":["import { prop, PropType, Ref } from '@typegoose/typegoose';\nimport { AdjustmentReason, AdjustmentStatus } from '../../../../utilities/enum';\nimport { Product } from '../product.model';\nimport { LineItem } from '../line-item.model';\nimport { Admin } from '../admin.model';\nimport { User } from '../user.model';\nimport { Types } from 'mongoose';\n\nexport class AdjustedLineItem {\n\t@prop({ required: true, ref: () => LineItem })\n\tpublic lineItem!: Ref<LineItem>;\n\n\t@prop({ type: String, maxlength: 150 })\n\tpublic note?: string;\n\n\t@prop({ type: String, enum: AdjustmentStatus })\n\tpublic adjustmentStatus?: AdjustmentStatus;\n}\n\nexport class AdjustmentInformation {\n\t@prop({ type: String, enum: AdjustmentReason })\n\tpublic reason?: AdjustmentReason;\n\n\t@prop({ type: () => [Types.ObjectId] }, PropType.MAP)\n\tpublic suggestedProduct?: Map<string, Ref<Product>[]>;\n\n\t@prop({ type: () => [AdjustedLineItem], default: [] })\n\tpublic adjustedLineItems?: AdjustedLineItem[];\n\n\t@prop({ type: Date, default: () => new Date() })\n\tpublic requestedAt?: Date;\n\n\t@prop({ type: () => Date })\n\tpublic resolvedAt?: Date;\n\n\t@prop({ ref: () => Admin })\n\tpublic admin?: Ref<Admin>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRequestByShop?: boolean;\n}\n"]}
@@ -1,8 +1,11 @@
1
1
  export declare class DeliveryFeeInformation {
2
2
  distance: number;
3
3
  charge: number;
4
+ secondaryCharge: number;
4
5
  riderCut: number;
6
+ secondaryRiderCut: number;
5
7
  distanceCharge: number;
8
+ secondaryDistanceCharge: number;
6
9
  isShopDelivery: boolean;
7
10
  isMarketingApplied: boolean;
8
11
  isMarketingAppliedByCompany: boolean;
@@ -14,8 +14,11 @@ const typegoose_1 = require("@typegoose/typegoose");
14
14
  class DeliveryFeeInformation {
15
15
  distance;
16
16
  charge;
17
+ secondaryCharge;
17
18
  riderCut;
19
+ secondaryRiderCut;
18
20
  distanceCharge;
21
+ secondaryDistanceCharge;
19
22
  isShopDelivery;
20
23
  isMarketingApplied;
21
24
  isMarketingAppliedByCompany;
@@ -29,14 +32,26 @@ __decorate([
29
32
  (0, typegoose_1.prop)({ type: Number }),
30
33
  __metadata("design:type", Number)
31
34
  ], DeliveryFeeInformation.prototype, "charge", void 0);
35
+ __decorate([
36
+ (0, typegoose_1.prop)({ type: Number }),
37
+ __metadata("design:type", Number)
38
+ ], DeliveryFeeInformation.prototype, "secondaryCharge", void 0);
32
39
  __decorate([
33
40
  (0, typegoose_1.prop)({ type: Number }),
34
41
  __metadata("design:type", Number)
35
42
  ], DeliveryFeeInformation.prototype, "riderCut", void 0);
43
+ __decorate([
44
+ (0, typegoose_1.prop)({ type: Number }),
45
+ __metadata("design:type", Number)
46
+ ], DeliveryFeeInformation.prototype, "secondaryRiderCut", void 0);
36
47
  __decorate([
37
48
  (0, typegoose_1.prop)({ type: Number }),
38
49
  __metadata("design:type", Number)
39
50
  ], DeliveryFeeInformation.prototype, "distanceCharge", void 0);
51
+ __decorate([
52
+ (0, typegoose_1.prop)({ type: Number }),
53
+ __metadata("design:type", Number)
54
+ ], DeliveryFeeInformation.prototype, "secondaryDistanceCharge", void 0);
40
55
  __decorate([
41
56
  (0, typegoose_1.prop)({ type: Boolean }),
42
57
  __metadata("design:type", Boolean)
@@ -1 +1 @@
1
- {"version":3,"file":"order-delivery-information.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/order-delivery-information.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,sBAAsB;IAE/B,QAAQ,CAAS;IAGjB,MAAM,CAAS;IAGf,QAAQ,CAAS;IAGjB,cAAc,CAAS;IAGvB,cAAc,CAAU;IAGxB,kBAAkB,CAAU;IAG5B,2BAA2B,CAAU;CACxC;AArBD,wDAqBC;AAnBG;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wDACN;AAGjB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDACR;AAGf;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wDACN;AAGjB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8DACA;AAGvB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;8DACA;AAGxB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;kEACI;AAG5B;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;2EACa","sourcesContent":["import { prop } from '@typegoose/typegoose';\n\nexport class DeliveryFeeInformation {\n @prop({ type: Number })\n distance: number;\n\n @prop({ type: Number })\n charge: number;\n\n @prop({ type: Number })\n riderCut: number;\n\n @prop({ type: Number })\n distanceCharge: number;\n\n @prop({ type: Boolean })\n isShopDelivery: boolean;\n\n @prop({ type: Boolean })\n isMarketingApplied: boolean;\n\n @prop({ type: Boolean })\n isMarketingAppliedByCompany: boolean;\n}\n"]}
1
+ {"version":3,"file":"order-delivery-information.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/order-delivery-information.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,sBAAsB;IAElC,QAAQ,CAAS;IAGjB,MAAM,CAAS;IAGf,eAAe,CAAS;IAGxB,QAAQ,CAAS;IAGjB,iBAAiB,CAAS;IAG1B,cAAc,CAAS;IAGvB,uBAAuB,CAAS;IAGhC,cAAc,CAAU;IAGxB,kBAAkB,CAAU;IAG5B,2BAA2B,CAAU;CACrC;AA9BD,wDA8BC;AA5BA;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wDACN;AAGjB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDACR;AAGf;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+DACC;AAGxB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wDACN;AAGjB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iEACG;AAG1B;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8DACA;AAGvB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uEACS;AAGhC;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;8DACA;AAGxB;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;kEACI;AAG5B;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;2EACa","sourcesContent":["import { prop } from '@typegoose/typegoose';\n\nexport class DeliveryFeeInformation {\n\t@prop({ type: Number })\n\tdistance: number;\n\n\t@prop({ type: Number })\n\tcharge: number;\n\n\t@prop({ type: Number })\n\tsecondaryCharge: number;\n\n\t@prop({ type: Number })\n\triderCut: number;\n\n\t@prop({ type: Number })\n\tsecondaryRiderCut: number;\n\n\t@prop({ type: Number })\n\tdistanceCharge: number;\n\n\t@prop({ type: Number })\n\tsecondaryDistanceCharge: number;\n\n\t@prop({ type: Boolean })\n\tisShopDelivery: boolean;\n\n\t@prop({ type: Boolean })\n\tisMarketingApplied: boolean;\n\n\t@prop({ type: Boolean })\n\tisMarketingAppliedByCompany: boolean;\n}\n"]}
@@ -19,7 +19,7 @@ export declare class Message extends TimeStamps {
19
19
  senderType: UserRef;
20
20
  media: Media[];
21
21
  sender: Ref<User | Admin | Shop | Rider>;
22
- coordinates?: [number, number];
22
+ location?: [number, number];
23
23
  isDelivered?: boolean;
24
24
  deliveredAt?: Date;
25
25
  }
@@ -48,7 +48,7 @@ let Message = class Message extends defaultClasses_1.TimeStamps {
48
48
  senderType;
49
49
  media;
50
50
  sender;
51
- coordinates;
51
+ location;
52
52
  isDelivered;
53
53
  deliveredAt;
54
54
  };
@@ -83,7 +83,7 @@ __decorate([
83
83
  __decorate([
84
84
  (0, typegoose_1.prop)({ required: false, type: () => [Number] }),
85
85
  __metadata("design:type", Array)
86
- ], Message.prototype, "coordinates", void 0);
86
+ ], Message.prototype, "location", void 0);
87
87
  __decorate([
88
88
  (0, typegoose_1.prop)({ type: Boolean, default: false }),
89
89
  __metadata("design:type", Boolean)
@@ -1 +1 @@
1
- {"version":3,"file":"message.model.js","sourceRoot":"/","sources":["libraries/mongo/models/message.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AAIrE,kDAA6D;AAE7D,uDAA6C;AAE7C,MAAa,KAAK;IAEV,QAAQ,CAAU;IAGlB,SAAS,CAAY;IAGrB,QAAQ,CAAS;IAGjB,YAAY,CAAU;IAGtB,IAAI,CAAU;CACrB;AAfD,sBAeC;AAbO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACA;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAS,EAAE,CAAC;;wCAC5B;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACD;AAGjB;IADN,IAAA,gBAAI,GAAE;;2CACsB;AAGtB;IADN,IAAA,gBAAI,GAAE;;mCACc;AAWf,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,2BAAU;IAE/B,QAAQ,CAAiB;IAGzB,OAAO,CAAU;IAGjB,UAAU,CAAW;IAUrB,KAAK,CAAW;IAGhB,MAAM,CAAoC;IAG1C,WAAW,CAAoB;IAG/B,WAAW,CAAW;IAGtB,WAAW,CAAQ;CAC1B,CAAA;AA/BY,0BAAO;AAEZ;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ,EAAE,CAAC;;yCACd;AAGzB;IADN,IAAA,gBAAI,EAAC,EA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oose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { User } from './user.model';\nimport { Admin } from './admin.model';\nimport { Shop } from './shop.model';\nimport { MediaType, UserRef } from '../../../utilities/enum';\nimport { Rider } from './rider.model';\nimport { Chatroom } from './chat-room.model';\n\nexport class Media {\n\t@prop({ required: true })\n\tpublic mediaUrl!: string;\n\n\t@prop({ required: true, type: String, enum: MediaType })\n\tpublic mediaType: MediaType;\n\n\t@prop({ required: true })\n\tpublic mimeType: string;\n\n\t@prop()\n\tpublic thumbnailUrl?: string;\n\n\t@prop()\n\tpublic name?: string;\n}\n\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'messages',\n\t},\n})\n@index({ chatroom: 1, createdAt: -1 })\n@index({ sender: 1, senderType: 1 })\n@index({ isRead: 1, chatroom: 1 })\nexport class Message extends TimeStamps {\n\t@prop({ required: true, ref: () => Chatroom })\n\tpublic chatroom!: Ref<Chatroom>;\n\n\t@prop({ type: String })\n\tpublic content?: string;\n\n\t@prop({ required: true, type: String, enum: UserRef })\n\tpublic senderType!: UserRef;\n\n\t@prop({\n\t\ttype: () => [Media],\n\t\tdefault: [],\n\t\tvalidate: {\n\t\t\tvalidator: (v: Media[]) => v.length <= 4,\n\t\t\tmessage: 'Maximum 4 media items per message',\n\t\t},\n\t})\n\tpublic media!: Media[];\n\n\t@prop({ refPath: 'senderType' })\n\tpublic sender!: Ref<User | Admin | Shop | Rider>;\n\n\t@prop({ required: false, type: () => [Number] })\n\tpublic coordinates?: [number, number]; // [longitude, latitude]\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isDelivered?: boolean;\n\n\t@prop({ type: Date })\n\tpublic deliveredAt?: Date;\n}\n"]}
1
+ {"version":3,"file":"message.model.js","sourceRoot":"/","sources":["libraries/mongo/models/message.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AAIrE,kDAA6D;AAE7D,uDAA6C;AAE7C,MAAa,KAAK;I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AAC;YACxC,OAAO,EAAE,mCAAmC;SAC5C;KACD,CAAC;;sCACqB;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;;uCACiB;AAG1C;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;;yCACb;AAG5B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;4CACX;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACA,IAAI;4CAAC;kBA9Bd,OAAO;IARnB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE;YACd,UAAU,EAAE,UAAU;SACtB;KACD,CAAC;IACD,IAAA,iBAAK,EAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IACrC,IAAA,iBAAK,EAAC,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;IACnC,IAAA,iBAAK,EAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;GACrB,OAAO,CA+BnB","sourcesContent":["import { index, modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { User } from './user.model';\nimport { Admin } from './admin.model';\nimport { Shop } from './shop.model';\nimport { MediaType, UserRef } from '../../../utilities/enum';\nimport { Rider } from './rider.model';\nimport { Chatroom } from './chat-room.model';\n\nexport class Media {\n\t@prop({ required: true })\n\tpublic mediaUrl!: string;\n\n\t@prop({ required: true, type: String, enum: MediaType })\n\tpublic mediaType: MediaType;\n\n\t@prop({ required: true })\n\tpublic mimeType: string;\n\n\t@prop()\n\tpublic thumbnailUrl?: string;\n\n\t@prop()\n\tpublic name?: string;\n}\n\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'messages',\n\t},\n})\n@index({ chatroom: 1, createdAt: -1 })\n@index({ sender: 1, senderType: 1 })\n@index({ isRead: 1, chatroom: 1 })\nexport class Message extends TimeStamps {\n\t@prop({ required: true, ref: () => Chatroom })\n\tpublic chatroom!: Ref<Chatroom>;\n\n\t@prop({ type: String })\n\tpublic content?: string;\n\n\t@prop({ required: true, type: String, enum: UserRef })\n\tpublic senderType!: UserRef;\n\n\t@prop({\n\t\ttype: () => [Media],\n\t\tdefault: [],\n\t\tvalidate: {\n\t\t\tvalidator: (v: Media[]) => v.length <= 4,\n\t\t\tmessage: 'Maximum 4 media items per message',\n\t\t},\n\t})\n\tpublic media!: Media[];\n\n\t@prop({ refPath: 'senderType' })\n\tpublic sender!: Ref<User | Admin | Shop | Rider>;\n\n\t@prop({ required: false, type: () => [Number] })\n\tpublic location?: [number, number]; // [longitude, latitude]\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isDelivered?: boolean;\n\n\t@prop({ type: Date })\n\tpublic deliveredAt?: Date;\n}\n"]}
@@ -22,7 +22,7 @@ Perfect for sharing types between frontend and backend applications.
22
22
 
23
23
  ## Version
24
24
 
25
- Version: 1.2.54
25
+ Version: 1.2.56
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.2.54",
3
+ "version": "1.2.56",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/core",
3
- "version": "1.2.54",
3
+ "version": "1.2.56",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",