@lyxa.ai/core 1.3.57 → 1.3.58

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.
@@ -24,5 +24,6 @@ export declare class AdjustmentHistory {
24
24
  addedLineItems?: Ref<LineItem>[];
25
25
  timestamp?: Date;
26
26
  adjustmentType: AdjustmentType;
27
+ adjustmentRef: string;
27
28
  admin?: Ref<Admin>;
28
29
  }
@@ -82,6 +82,7 @@ class AdjustmentHistory {
82
82
  addedLineItems;
83
83
  timestamp;
84
84
  adjustmentType;
85
+ adjustmentRef;
85
86
  admin;
86
87
  }
87
88
  exports.AdjustmentHistory = AdjustmentHistory;
@@ -105,6 +106,10 @@ __decorate([
105
106
  (0, typegoose_1.prop)({ type: String, enum: enum_1.AdjustmentType }),
106
107
  __metadata("design:type", String)
107
108
  ], AdjustmentHistory.prototype, "adjustmentType", void 0);
109
+ __decorate([
110
+ (0, typegoose_1.prop)({ required: true, type: String }),
111
+ __metadata("design:type", String)
112
+ ], AdjustmentHistory.prototype, "adjustmentRef", void 0);
108
113
  __decorate([
109
114
  (0, typegoose_1.prop)({ ref: () => admin_model_1.Admin }),
110
115
  __metadata("design:type", Object)
@@ -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,qDAAgG;AAEhG,wDAA8C;AAC9C,gDAAuC;AACvC,uCAAiC;AAEjC,MAAa,gBAAgB;IAErB,QAAQ,CAAiB;IAGzB,IAAI,CAAU;IAGd,gBAAgB,CAAoB;IAGpC,gBAAgB,CAAU;CACjC;AAZD,4CAYC;AAVO;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,EAA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AAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8DACP;AAGlC,MAAa,iBAAiB;IAEtB,gBAAgB,CAA+B;IAG/C,iBAAiB,CAAmB;IAGpC,cAAc,CAAmB;IAGjC,SAAS,CAAQ;IAGjB,cAAc,CAAiB;IAG/B,KAAK,CAAc;CAC1B;AAlBD,8CAkBC;AAhBO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,gBAAK,CAAC,QAAQ,CAAC,EAAE,EAAE,oBAAQ,CAAC,GAAG,CAAC;8BAC3B,GAAG;2DAAyB;AAG/C;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;4DACA;AAGpC;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;yDACH;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC;8BACvB,IAAI;oDAAC;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAc,EAAE,CAAC;;yDACP;AAG/B;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;gDACD","sourcesContent":["import { prop, PropType, Ref } from '@typegoose/typegoose';\nimport { AdjustmentReason, AdjustmentStatus, AdjustmentType } from '../../../../utilities/enum';\nimport { Product } from '../product.model';\nimport { LineItem } from '../line-item.model';\nimport { Admin } from '../admin.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\t@prop({ type: Number, default: 0 })\n\tpublic adjustedQuantity?: number;\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\nexport class AdjustmentHistory {\n\t@prop({ type: () => [Types.ObjectId] }, PropType.MAP)\n\tpublic suggestedProduct?: Map<string, Ref<Product>[]>;\n\n\t@prop({ ref: () => LineItem, default: [] })\n\tpublic adjustedLineItems?: Ref<LineItem>[];\n\n\t@prop({ ref: () => LineItem, default: [] })\n\tpublic addedLineItems?: Ref<LineItem>[];\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic timestamp?: Date;\n\n\t@prop({ type: String, enum: AdjustmentType })\n\tpublic adjustmentType: AdjustmentType;\n\n\t@prop({ ref: () => Admin })\n\tpublic admin?: Ref<Admin>;\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,qDAAgG;AAEhG,wDAA8C;AAC9C,gDAAuC;AACvC,uCAAiC;AAEjC,MAAa,gBAAgB;IAErB,QAAQ,CAAiB;IAGzB,IAAI,CAAU;IAGd,gBAAgB,CAAoB;IAGpC,gBAAgB,CAAU;CACjC;AAZD,4CAYC;AA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Ref } from '@typegoose/typegoose';\nimport { AdjustmentReason, AdjustmentStatus, AdjustmentType } from '../../../../utilities/enum';\nimport { Product } from '../product.model';\nimport { LineItem } from '../line-item.model';\nimport { Admin } from '../admin.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\t@prop({ type: Number, default: 0 })\n\tpublic adjustedQuantity?: number;\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\nexport class AdjustmentHistory {\n\t@prop({ type: () => [Types.ObjectId] }, PropType.MAP)\n\tpublic suggestedProduct?: Map<string, Ref<Product>[]>;\n\n\t@prop({ ref: () => LineItem, default: [] })\n\tpublic adjustedLineItems?: Ref<LineItem>[];\n\n\t@prop({ ref: () => LineItem, default: [] })\n\tpublic addedLineItems?: Ref<LineItem>[];\n\n\t@prop({ type: Date, default: new Date() })\n\tpublic timestamp?: Date;\n\n\t@prop({ type: String, enum: AdjustmentType })\n\tpublic adjustmentType: AdjustmentType;\n\n\t@prop({ required: true, type: String })\n\tpublic adjustmentRef: string;\n\n\t@prop({ ref: () => Admin })\n\tpublic admin?: Ref<Admin>;\n}\n"]}
@@ -38,5 +38,7 @@ export declare class LineItem extends TimeStamps {
38
38
  isB1G1: boolean;
39
39
  adjustReason?: string;
40
40
  lineItemHash: string;
41
+ adjustmentRef: string;
42
+ isSkipped: boolean;
41
43
  cartParticipant?: Ref<CartParticipant>;
42
44
  }
@@ -50,6 +50,8 @@ let LineItem = class LineItem extends defaultClasses_1.TimeStamps {
50
50
  isB1G1;
51
51
  adjustReason;
52
52
  lineItemHash;
53
+ adjustmentRef;
54
+ isSkipped;
53
55
  cartParticipant;
54
56
  };
55
57
  exports.LineItem = LineItem;
@@ -98,11 +100,11 @@ __decorate([
98
100
  __metadata("design:type", Number)
99
101
  ], LineItem.prototype, "quantity", void 0);
100
102
  __decorate([
101
- (0, typegoose_1.prop)({ type: String, enum: enum_1.PriceOption, default: enum_1.PriceOption.SINGLE_PRICE }),
103
+ (0, typegoose_1.prop)({ type: String, enum: enum_1.PriceOption, default: enum_1.PriceOption.SINGLE_PRICE, _id: false }),
102
104
  __metadata("design:type", String)
103
105
  ], LineItem.prototype, "priceOption", void 0);
104
106
  __decorate([
105
- (0, typegoose_1.prop)({ required: true, type: price_breakdown_model_1.OrderPriceBreakdown }),
107
+ (0, typegoose_1.prop)({ required: true, type: price_breakdown_model_1.OrderPriceBreakdown, _id: false }),
106
108
  __metadata("design:type", price_breakdown_model_1.OrderPriceBreakdown)
107
109
  ], LineItem.prototype, "priceBreakdown", void 0);
108
110
  __decorate([
@@ -118,7 +120,7 @@ __decorate([
118
120
  __metadata("design:type", String)
119
121
  ], LineItem.prototype, "specialInstructions", void 0);
120
122
  __decorate([
121
- (0, typegoose_1.prop)({ type: typegoose_1.mongoose.Schema.Types.Mixed }),
123
+ (0, typegoose_1.prop)({ type: typegoose_1.mongoose.Schema.Types.Mixed, _id: false }),
122
124
  __metadata("design:type", Object)
123
125
  ], LineItem.prototype, "calculationSnap", void 0);
124
126
  __decorate([
@@ -149,6 +151,14 @@ __decorate([
149
151
  (0, typegoose_1.prop)({ type: String, select: false }),
150
152
  __metadata("design:type", String)
151
153
  ], LineItem.prototype, "lineItemHash", void 0);
154
+ __decorate([
155
+ (0, typegoose_1.prop)({ type: String, select: false }),
156
+ __metadata("design:type", String)
157
+ ], LineItem.prototype, "adjustmentRef", void 0);
158
+ __decorate([
159
+ (0, typegoose_1.prop)({ type: Boolean, default: false }),
160
+ __metadata("design:type", Boolean)
161
+ ], LineItem.prototype, "isSkipped", void 0);
152
162
  __decorate([
153
163
  (0, typegoose_1.prop)({
154
164
  ref: () => cart_participant_model_1.CartParticipant,
@@ -1 +1 @@
1
- {"version":3,"file":"line-item.model.js","sourceRoot":"/","sources":["libraries/mongo/models/line-item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0F;AAC1F,4EAAqE;AACrE,6CAAoC;AACpC,mDAA0C;AAC1C,4EAAuE;AACvE,kDAAgE;AAChE,oFAAyE;AACzE,6CAAoC;AACpC,6CAAoC;AACpC,iDAAwC;AACxC,qDAA4C;AAC5C,uDAA8C;AAC9C,sEAA4D;AAC5D,qEAA2D;AAC3D,uEAA6D;AAqBtD,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,2BAAU;IAEhC,IAAI,CAAa;IAGjB,IAAI,CAAa;IAGjB,IAAI,CAAa;IAGjB,MAAM,CAAc;IAGpB,QAAQ,CAAY;IAGpB,QAAQ,CAAiB;IAGzB,OAAO,CAAgB;IAGvB,WAAW,CAAe;IAG1B,UAAU,CAAoB;IAG9B,iBAAiB,CAA2B;IAG5C,QAAQ,CAAS;IAGjB,WAAW,CAAe;IAG1B,cAAc,CAAsB;IAGpC,UAAU,CAAyB;IAGnC,kBAAkB,CAAY;IAG9B,mBAAmB,CAAU;IAG7B,eAAe,CAA2B;IAG1C,UAAU,CAAU;IAGpB,iBAAiB,CAAU;IAG3B,wBAAwB,CAAW;IAGnC,gBAAgB,CAAS;IAGzB,MAAM,CAAU;IAGhB,YAAY,CAAU;IAGtB,YAAY,CAAS;IASrB,eAAe,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Options, Severity, mongoose } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Cart } from './cart.model';\nimport { Product } from './product.model';\nimport { OrderPriceBreakdown } from './embedded/price-breakdown.model';\nimport { ItemType, PriceOption } from '../../../utilities/enum';\nimport { LineItemAttribute } from './embedded/line-item-attribute.model';\nimport { User } from './user.model';\nimport { Shop } from './shop.model';\nimport { Parent } from './parent.model';\nimport { Category } from './category.model';\nimport { Marketing } from './marketing.model';\nimport { ProductSnap } from './embedded/product-snap.model';\nimport { CartParticipant } from './cart-participant.model';\nimport { ProductMarketing } from './product-marketing.model';\n\n/**\n * LineItem model - Represents individual items in a cart\n */\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'lineItems',\n\t\ttoJSON: { virtuals: true },\n\t\ttoObject: { virtuals: true },\n\t},\n\toptions: {\n\t\tallowMixed: Severity.ALLOW,\n\t},\n})\n@index({ cart: 1 })\n@index({ cart: 1, user: 1 })\n@index({ product: 1 })\n@index({ lineItemHash: 1 })\n@index({ shop: 1, deletedAt: 1 })\n@index({ shop: 1, createdAt: 1 })\nexport class LineItem extends TimeStamps {\n\t@prop({ required: true, ref: () => Cart })\n\tpublic cart!: Ref<Cart>;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, ref: () => Parent })\n\tpublic parent: Ref<Parent>;\n\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ required: true, ref: () => Category })\n\tpublic category!: Ref<Category>;\n\n\t@prop({ required: true, ref: () => Product })\n\tpublic product!: Ref<Product>;\n\n\t@prop({ type: ProductSnap, _id: false })\n\tpublic productSnap?: ProductSnap;\n\n\t@prop({ ref: () => Marketing, default: [] })\n\tpublic marketings?: Ref<Marketing>[];\n\n\t@prop({ ref: () => ProductMarketing, default: [] })\n\tpublic productMarketings?: Ref<ProductMarketing>[];\n\n\t@prop({ min: 1, default: 1 })\n\tpublic quantity: number;\n\n\t@prop({ type: String, enum: PriceOption, default: PriceOption.SINGLE_PRICE })\n\tpublic priceOption?: PriceOption;\n\n\t@prop({ required: true, type: OrderPriceBreakdown })\n\tpublic priceBreakdown: OrderPriceBreakdown;\n\n\t@prop({ type: () => [[LineItemAttribute]], default: [] })\n\tpublic attributes?: LineItemAttribute[][];\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic removedIngredients?: string[];\n\n\t@prop({ type: String })\n\tpublic specialInstructions?: string;\n\n\t@prop({ type: mongoose.Schema.Types.Mixed })\n\tpublic calculationSnap?: Record<string, unknown>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAdjusted: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPartialAdjusted: boolean;\n\n\t@prop({ type: Boolean })\n\tpublic isCreatedAfterAdjustment?: boolean;\n\n\t@prop({ default: 0 })\n\tpublic adjustedQuantity: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isB1G1: boolean;\n\n\t@prop({ type: String })\n\tpublic adjustReason?: string;\n\n\t@prop({ type: String, select: false })\n\tpublic lineItemHash: string;\n\n\t@prop({\n\t\tref: () => CartParticipant,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t\tjustOne: true,\n\t\tmatch: (doc: LineItem) => ({ user: doc.user }),\n\t})\n\tpublic cartParticipant?: Ref<CartParticipant>;\n}\n"]}
1
+ {"version":3,"file":"line-item.model.js","sourceRoot":"/","sources":["libraries/mongo/models/line-item.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0F;AAC1F,4EAAqE;AACrE,6CAAoC;AACpC,mDAA0C;AAC1C,4EAAuE;AACvE,kDAAgE;AAChE,oFAAyE;AACzE,6CAAoC;AACpC,6CAAoC;AACpC,iDAAwC;AACxC,qDAA4C;AAC5C,uDAA8C;AAC9C,sEAA4D;AAC5D,qEAA2D;AAC3D,uE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EAAE,CAAC,GAAa,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC;KAC9C,CAAC;;iDAC4C;mBAtFlC,QAAQ;IAhBpB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE;YACd,UAAU,EAAE,WAAW;YACvB,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC1B,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;SAC5B;QACD,OAAO,EAAE;YACR,UAAU,EAAE,oBAAQ,CAAC,KAAK;SAC1B;KACD,CAAC;IACD,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAClB,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAC3B,IAAA,iBAAK,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACrB,IAAA,iBAAK,EAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;IAC1B,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAChC,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;GACpB,QAAQ,CAuFpB","sourcesContent":["import { prop, Ref, index, modelOptions, Severity, mongoose } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Cart } from './cart.model';\nimport { Product } from './product.model';\nimport { OrderPriceBreakdown } from './embedded/price-breakdown.model';\nimport { ItemType, PriceOption } from '../../../utilities/enum';\nimport { LineItemAttribute } from './embedded/line-item-attribute.model';\nimport { User } from './user.model';\nimport { Shop } from './shop.model';\nimport { Parent } from './parent.model';\nimport { Category } from './category.model';\nimport { Marketing } from './marketing.model';\nimport { ProductSnap } from './embedded/product-snap.model';\nimport { CartParticipant } from './cart-participant.model';\nimport { ProductMarketing } from './product-marketing.model';\n\n/**\n * LineItem model - Represents individual items in a cart\n */\n@modelOptions({\n\tschemaOptions: {\n\t\tcollection: 'lineItems',\n\t\ttoJSON: { virtuals: true },\n\t\ttoObject: { virtuals: true },\n\t},\n\toptions: {\n\t\tallowMixed: Severity.ALLOW,\n\t},\n})\n@index({ cart: 1 })\n@index({ cart: 1, user: 1 })\n@index({ product: 1 })\n@index({ lineItemHash: 1 })\n@index({ shop: 1, deletedAt: 1 })\n@index({ shop: 1, createdAt: 1 })\nexport class LineItem extends TimeStamps {\n\t@prop({ required: true, ref: () => Cart })\n\tpublic cart!: Ref<Cart>;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, ref: () => Parent })\n\tpublic parent: Ref<Parent>;\n\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ required: true, ref: () => Category })\n\tpublic category!: Ref<Category>;\n\n\t@prop({ required: true, ref: () => Product })\n\tpublic product!: Ref<Product>;\n\n\t@prop({ type: ProductSnap, _id: false })\n\tpublic productSnap?: ProductSnap;\n\n\t@prop({ ref: () => Marketing, default: [] })\n\tpublic marketings?: Ref<Marketing>[];\n\n\t@prop({ ref: () => ProductMarketing, default: [] })\n\tpublic productMarketings?: Ref<ProductMarketing>[];\n\n\t@prop({ min: 1, default: 1 })\n\tpublic quantity: number;\n\n\t@prop({ type: String, enum: PriceOption, default: PriceOption.SINGLE_PRICE, _id: false })\n\tpublic priceOption?: PriceOption;\n\n\t@prop({ required: true, type: OrderPriceBreakdown, _id: false })\n\tpublic priceBreakdown: OrderPriceBreakdown;\n\n\t@prop({ type: () => [[LineItemAttribute]], default: [] })\n\tpublic attributes?: LineItemAttribute[][];\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic removedIngredients?: string[];\n\n\t@prop({ type: String })\n\tpublic specialInstructions?: string;\n\n\t@prop({ type: mongoose.Schema.Types.Mixed, _id: false })\n\tpublic calculationSnap?: Record<string, unknown>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAdjusted: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isPartialAdjusted: boolean;\n\n\t@prop({ type: Boolean })\n\tpublic isCreatedAfterAdjustment?: boolean;\n\n\t@prop({ default: 0 })\n\tpublic adjustedQuantity: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isB1G1: boolean;\n\n\t@prop({ type: String })\n\tpublic adjustReason?: string;\n\n\t@prop({ type: String, select: false })\n\tpublic lineItemHash: string;\n\n\t@prop({ type: String, select: false })\n\tpublic adjustmentRef: string;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSkipped: boolean;\n\n\t@prop({\n\t\tref: () => CartParticipant,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t\tjustOne: true,\n\t\tmatch: (doc: LineItem) => ({ user: doc.user }),\n\t})\n\tpublic cartParticipant?: Ref<CartParticipant>;\n}\n"]}
@@ -118,7 +118,7 @@ __decorate([
118
118
  __metadata("design:type", Boolean)
119
119
  ], RegularOrder.prototype, "isReplacementOrder", void 0);
120
120
  __decorate([
121
- (0, typegoose_1.prop)({ type: () => replacement_order_model_1.ReplacementOrder }),
121
+ (0, typegoose_1.prop)({ type: () => replacement_order_model_1.ReplacementOrder, _id: false }),
122
122
  __metadata("design:type", replacement_order_model_1.ReplacementOrder)
123
123
  ], RegularOrder.prototype, "replacementOrderInformation", void 0);
124
124
  __decorate([
@@ -138,7 +138,7 @@ __decorate([
138
138
  __metadata("design:type", Boolean)
139
139
  ], RegularOrder.prototype, "isEndorseLossApplied", void 0);
140
140
  __decorate([
141
- (0, typegoose_1.prop)({ type: () => order_cancel_model_1.EndorseLoss }),
141
+ (0, typegoose_1.prop)({ type: () => order_cancel_model_1.EndorseLoss, _id: false }),
142
142
  __metadata("design:type", order_cancel_model_1.EndorseLoss)
143
143
  ], RegularOrder.prototype, "endorseLossInformation", void 0);
144
144
  __decorate([
@@ -150,7 +150,7 @@ __decorate([
150
150
  __metadata("design:type", String)
151
151
  ], RegularOrder.prototype, "adjustmentStatus", void 0);
152
152
  __decorate([
153
- (0, typegoose_1.prop)({ type: () => adjustment_information_model_1.AdjustmentInformation }),
153
+ (0, typegoose_1.prop)({ type: () => adjustment_information_model_1.AdjustmentInformation, _id: false }),
154
154
  __metadata("design:type", adjustment_information_model_1.AdjustmentInformation)
155
155
  ], RegularOrder.prototype, "adjustmentInformation", void 0);
156
156
  __decorate([
@@ -158,11 +158,11 @@ __decorate([
158
158
  __metadata("design:type", Array)
159
159
  ], RegularOrder.prototype, "adjustmentHistory", void 0);
160
160
  __decorate([
161
- (0, typegoose_1.prop)({ required: true, type: regular_order_finance_model_1.RegularOrderFinance }),
161
+ (0, typegoose_1.prop)({ required: true, type: regular_order_finance_model_1.RegularOrderFinance, _id: false }),
162
162
  __metadata("design:type", regular_order_finance_model_1.RegularOrderFinance)
163
163
  ], RegularOrder.prototype, "finance", void 0);
164
164
  __decorate([
165
- (0, typegoose_1.prop)({ type: regular_order_finance_model_1.RegularOrderFinance }),
165
+ (0, typegoose_1.prop)({ type: regular_order_finance_model_1.RegularOrderFinance, _id: false }),
166
166
  __metadata("design:type", regular_order_finance_model_1.RegularOrderFinance)
167
167
  ], RegularOrder.prototype, "adjustedFinance", void 0);
168
168
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"regular-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/regular-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,gDAAuC;AACvC,qDAAuG;AACvG,kDAAyC;AACzC,8CAAqC;AACrC,8CAAqC;AACrC,2DAAuE;AACvE,6EAA+E;AAC/E,uEAA6D;AAC7D,yFAA8E;AAC9E,uEAA6D;AAC7D,iFAAuE;AACvE,wDAA8C;AAC9C,8CAAqC;AACrC,gDAAuC;AACvC,sEAA4D;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I,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;kDACV;AAOvB;IALN,IAAA,gBAAI,EAAC;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ;QACnB,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,MAAM;KAClB,CAAC;;+CACgC;AAO3B;IALN,IAAA,gBAAI,EAAC;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,wCAAe;QAC1B,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,MAAM;KAClB,CAAC;;sDAC8C","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { Order } from '../order.model';\nimport { AdjustmentStatus, ItemType, OrderType, RegularOrderStatus } from '../../../../utilities/enum';\nimport { Parent } from '../parent.model';\nimport { Shop } from '../shop.model';\nimport { Cart } from '../cart.model';\nimport { Address, RegularOrderAddress } from '../shared/address.model';\nimport { RegularOrderStatusTimeline } from '../embedded/status-timeline.model';\nimport { OrderRefund } from '../embedded/order-refund.model';\nimport { RegularOrderFinance } from '../embedded/regular-order-finance.model';\nimport { EndorseLoss } from '../embedded/order-cancel.model';\nimport { ReplacementOrder } from '../embedded/replacement-order.model';\nimport { LineItem } from '../line-item.model';\nimport { User } from '../user.model';\nimport { Rider } from '../rider.model';\nimport { CartParticipant } from '../cart-participant.model';\nimport { AdjustmentHistory, AdjustmentInformation } from '../embedded/adjustment-information.model';\nimport { RegularOrderAddressChangeHistory } from '../embedded/address-change-history.model';\n\nexport class RegularOrder extends Order {\n\tpublic orderType = OrderType.REGULAR as const;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user: Ref<User>;\n\n\t@prop({ ref: () => Rider })\n\tpublic supportRiders?: Ref<Rider>[];\n\n\t@prop({ type: String, enum: RegularOrderStatus, default: RegularOrderStatus.PLACED })\n\tpublic status: RegularOrderStatus;\n\n\t@prop({ type: () => [RegularOrderStatusTimeline], default: [] })\n\tpublic statusTimeline: RegularOrderStatusTimeline[];\n\n\t@prop({ type: String, enum: ItemType, default: ItemType.FOOD })\n\tpublic itemType?: string;\n\n\t@prop({ required: true, type: Address })\n\tpublic pickupAddress: Address;\n\n\t@prop({ required: true, type: RegularOrderAddress })\n\tpublic deliveryAddress: RegularOrderAddress;\n\n\t@prop({ type: [RegularOrderAddressChangeHistory] })\n\tpublic addressChangeHistory?: RegularOrderAddressChangeHistory[];\n\n\t@prop({ required: true, ref: () => Parent })\n\tpublic parent!: Ref<Parent>;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, ref: () => Cart, unique: true })\n\tpublic cart!: Ref<Cart>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isShopDelivery?: boolean;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic preparingTimeInMinutes?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReplacementOrder?: boolean;\n\n\t@prop({ type: () => ReplacementOrder })\n\tpublic replacementOrderInformation?: ReplacementOrder;\n\n\t@prop({ ref: () => Order })\n\tpublic replacementOrder?: Ref<Order>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRefunded?: boolean;\n\n\t@prop({ type: OrderRefund })\n\tpublic refundInformation?: OrderRefund;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isEndorseLossApplied?: boolean;\n\n\t@prop({ type: () => EndorseLoss })\n\tpublic endorseLossInformation?: EndorseLoss;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAdjusted?: boolean;\n\n\t@prop({ type: String, enum: AdjustmentStatus, default: AdjustmentStatus.NONE })\n\tpublic adjustmentStatus: AdjustmentStatus;\n\n\t@prop({ type: () => AdjustmentInformation })\n\tpublic adjustmentInformation?: AdjustmentInformation;\n\n\t@prop({ type: () => [AdjustmentHistory], default: [] })\n\tpublic adjustmentHistory?: AdjustmentHistory[];\n\n\t@prop({ required: true, type: RegularOrderFinance })\n\tpublic finance: RegularOrderFinance;\n\n\t@prop({ type: RegularOrderFinance })\n\tpublic adjustedFinance?: RegularOrderFinance;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isGroupOrder?: boolean;\n\n\t@prop({\n\t\tref: () => LineItem,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t})\n\tpublic lineItems: Ref<LineItem>[];\n\n\t@prop({\n\t\tref: () => CartParticipant,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t})\n\tpublic cartParticipants: Ref<CartParticipant>[];\n}\n"]}
1
+ {"version":3,"file":"regular-order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/regular-order.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,gDAAuC;AACvC,qDAAuG;AACvG,kDAAyC;AACzC,8CAAqC;AACrC,8CAAqC;AACrC,2DAAuE;AACvE,6EAA+E;AAC/E,uEAA6D;AAC7D,yFAA8E;AAC9E,uEAA6D;AAC7D,iFAAuE;AACvE,wDAA8C;AAC9C,8CAAqC;AACrC,gDAAuC;AACvC,sEAA4D;AAC5D,2FAAoG;AACpG,2FAA4F;AAE5F,MAAa,YAAa,SAAQ,mBAAK;IAC/B,SAAS,GAAG,gBAAS,CAAC,OAAgB,CAAC;IAGvC,IAAI,CAAY;IAGhB,aAAa,CAAgB;IAG7B,MAAM,CAAqB;IAG3B,cAAc,CAA+B;IAG7C,QAAQ,CAAU;IAGlB,aAAa,CAAU;IAGvB,eAAe,CAAsB;IAGrC,oBAAoB,CAAsC;IAG1D,MAAM,CAAe;IAGrB,IAAI,CAAa;IAGjB,IAAI,CAAa;IAGjB,cAAc,CAAW;IAGzB,sBAAsB,CAAU;IAGhC,kBAAkB,CAAW;IAG7B,2BAA2B,CAAoB;IAG/C,gBAAgB,CAAc;IAG9B,UAAU,CAAW;IAGrB,iBAAiB,CAAe;IAGhC,oBAAoB,CAAW;IAG/B,sBAAsB,CAAe;IAGrC,UAAU,CAAW;IAGrB,gBAAgB,CAAmB;IAGnC,qBAAqB,CAAyB;IAG9C,iBAAiB,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,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;gDACZ;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAgB,EAAE,OAAO,EAAE,uBAAgB,CAAC,IAAI,EAAE,CAAC;;sDACrC;AAGnC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,oDAAqB,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;8BACzB,oDAAqB;2DAAC;AAG9C;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,gDAAiB,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;uDACR;AAGxC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,iDAAmB,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;8BAChD,iDAAmB;6CAAC;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,iDAAmB,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;8BACvB,iDAAmB;qDAAC;AAGtC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;kDACV;AAOvB;IALN,IAAA,gBAAI,EAAC;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ;QACnB,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,MAAM;KAClB,CAAC;;+CACgC;AAO3B;IALN,IAAA,gBAAI,EAAC;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,wCAAe;QAC1B,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,MAAM;KAClB,CAAC;;sDAC8C","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { Order } from '../order.model';\nimport { AdjustmentStatus, ItemType, OrderType, RegularOrderStatus } from '../../../../utilities/enum';\nimport { Parent } from '../parent.model';\nimport { Shop } from '../shop.model';\nimport { Cart } from '../cart.model';\nimport { Address, RegularOrderAddress } from '../shared/address.model';\nimport { RegularOrderStatusTimeline } from '../embedded/status-timeline.model';\nimport { OrderRefund } from '../embedded/order-refund.model';\nimport { RegularOrderFinance } from '../embedded/regular-order-finance.model';\nimport { EndorseLoss } from '../embedded/order-cancel.model';\nimport { ReplacementOrder } from '../embedded/replacement-order.model';\nimport { LineItem } from '../line-item.model';\nimport { User } from '../user.model';\nimport { Rider } from '../rider.model';\nimport { CartParticipant } from '../cart-participant.model';\nimport { AdjustmentHistory, AdjustmentInformation } from '../embedded/adjustment-information.model';\nimport { RegularOrderAddressChangeHistory } from '../embedded/address-change-history.model';\n\nexport class RegularOrder extends Order {\n\tpublic orderType = OrderType.REGULAR as const;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user: Ref<User>;\n\n\t@prop({ ref: () => Rider })\n\tpublic supportRiders?: Ref<Rider>[];\n\n\t@prop({ type: String, enum: RegularOrderStatus, default: RegularOrderStatus.PLACED })\n\tpublic status: RegularOrderStatus;\n\n\t@prop({ type: () => [RegularOrderStatusTimeline], default: [] })\n\tpublic statusTimeline: RegularOrderStatusTimeline[];\n\n\t@prop({ type: String, enum: ItemType, default: ItemType.FOOD })\n\tpublic itemType?: string;\n\n\t@prop({ required: true, type: Address })\n\tpublic pickupAddress: Address;\n\n\t@prop({ required: true, type: RegularOrderAddress })\n\tpublic deliveryAddress: RegularOrderAddress;\n\n\t@prop({ type: [RegularOrderAddressChangeHistory] })\n\tpublic addressChangeHistory?: RegularOrderAddressChangeHistory[];\n\n\t@prop({ required: true, ref: () => Parent })\n\tpublic parent!: Ref<Parent>;\n\n\t@prop({ required: true, ref: () => Shop })\n\tpublic shop!: Ref<Shop>;\n\n\t@prop({ required: true, ref: () => Cart, unique: true })\n\tpublic cart!: Ref<Cart>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isShopDelivery?: boolean;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic preparingTimeInMinutes?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isReplacementOrder?: boolean;\n\n\t@prop({ type: () => ReplacementOrder, _id: false })\n\tpublic replacementOrderInformation?: ReplacementOrder;\n\n\t@prop({ ref: () => Order })\n\tpublic replacementOrder?: Ref<Order>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRefunded?: boolean;\n\n\t@prop({ type: OrderRefund })\n\tpublic refundInformation?: OrderRefund;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isEndorseLossApplied?: boolean;\n\n\t@prop({ type: () => EndorseLoss, _id: false })\n\tpublic endorseLossInformation?: EndorseLoss;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isAdjusted?: boolean;\n\n\t@prop({ type: String, enum: AdjustmentStatus, default: AdjustmentStatus.NONE })\n\tpublic adjustmentStatus: AdjustmentStatus;\n\n\t@prop({ type: () => AdjustmentInformation, _id: false })\n\tpublic adjustmentInformation?: AdjustmentInformation;\n\n\t@prop({ type: () => [AdjustmentHistory], default: [] })\n\tpublic adjustmentHistory?: AdjustmentHistory[];\n\n\t@prop({ required: true, type: RegularOrderFinance, _id: false })\n\tpublic finance: RegularOrderFinance;\n\n\t@prop({ type: RegularOrderFinance, _id: false })\n\tpublic adjustedFinance?: RegularOrderFinance;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isGroupOrder?: boolean;\n\n\t@prop({\n\t\tref: () => LineItem,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t})\n\tpublic lineItems: Ref<LineItem>[];\n\n\t@prop({\n\t\tref: () => CartParticipant,\n\t\tforeignField: 'cart',\n\t\tlocalField: 'cart',\n\t})\n\tpublic cartParticipants: Ref<CartParticipant>[];\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.3.57
25
+ Version: 1.3.58
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.3.57",
3
+ "version": "1.3.58",
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",
@@ -26,8 +26,8 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
26
26
  searchFields?: string[] | undefined;
27
27
  } | undefined;
28
28
  sort?: Record<string, 1 | -1> | undefined;
29
- select?: Record<string, 0 | 1> | undefined;
30
29
  populate?: any;
30
+ select?: Record<string, 0 | 1> | undefined;
31
31
  query?: Record<string, any> | undefined;
32
32
  }, {
33
33
  search?: {
@@ -36,8 +36,8 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
36
36
  } | undefined;
37
37
  sort?: Record<string, 1 | -1> | undefined;
38
38
  size?: number | undefined;
39
- select?: Record<string, 0 | 1> | undefined;
40
39
  populate?: any;
40
+ select?: Record<string, 0 | 1> | undefined;
41
41
  query?: Record<string, any> | undefined;
42
42
  page?: number | undefined;
43
43
  }>>;
@@ -733,12 +733,12 @@ export declare const GetByIdInputSchema: z.ZodObject<{
733
733
  populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
734
734
  }, "strip", z.ZodTypeAny, {
735
735
  _id: import("mongoose").Types.ObjectId;
736
- select?: Record<string, 0 | 1> | undefined;
737
736
  populate?: any;
737
+ select?: Record<string, 0 | 1> | undefined;
738
738
  }, {
739
739
  _id: string | import("mongoose").Types.ObjectId;
740
- select?: Record<string, 0 | 1> | undefined;
741
740
  populate?: any;
741
+ select?: Record<string, 0 | 1> | undefined;
742
742
  }>;
743
743
  export type GetByIdInputDTO = DTO<typeof GetByIdInputSchema>;
744
744
  export declare const GetProductByIdInputSchema: z.ZodObject<{
@@ -751,12 +751,12 @@ export declare const GetProductByIdInputSchema: z.ZodObject<{
751
751
  _id: import("mongoose").Types.ObjectId;
752
752
  withAttributeHiddenItems: boolean;
753
753
  withAddonsHiddenItems: boolean;
754
- select?: Record<string, 0 | 1> | undefined;
755
754
  populate?: any;
755
+ select?: Record<string, 0 | 1> | undefined;
756
756
  }, {
757
757
  _id: string | import("mongoose").Types.ObjectId;
758
- select?: Record<string, 0 | 1> | undefined;
759
758
  populate?: any;
759
+ select?: Record<string, 0 | 1> | undefined;
760
760
  withAttributeHiddenItems?: boolean | undefined;
761
761
  withAddonsHiddenItems?: boolean | undefined;
762
762
  }>;
@@ -768,13 +768,13 @@ export declare const GetOrderByIdInputSchema: z.ZodObject<{
768
768
  userOrderCompletionScope: z.ZodOptional<z.ZodNativeEnum<typeof UserOrderCompletionScope>>;
769
769
  }, "strip", z.ZodTypeAny, {
770
770
  _id: import("mongoose").Types.ObjectId;
771
- select?: Record<string, 0 | 1> | undefined;
772
771
  populate?: any;
772
+ select?: Record<string, 0 | 1> | undefined;
773
773
  userOrderCompletionScope?: UserOrderCompletionScope | undefined;
774
774
  }, {
775
775
  _id: string | import("mongoose").Types.ObjectId;
776
- select?: Record<string, 0 | 1> | undefined;
777
776
  populate?: any;
777
+ select?: Record<string, 0 | 1> | undefined;
778
778
  userOrderCompletionScope?: UserOrderCompletionScope | undefined;
779
779
  }>;
780
780
  export type GetOrderByIdInputDTO = DTO<typeof GetOrderByIdInputSchema>;
@@ -782,11 +782,11 @@ export declare const GetByTokenInputSchema: z.ZodOptional<z.ZodObject<{
782
782
  select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
783
783
  populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
784
784
  }, "strip", z.ZodTypeAny, {
785
- select?: Record<string, 0 | 1> | undefined;
786
785
  populate?: any;
787
- }, {
788
786
  select?: Record<string, 0 | 1> | undefined;
787
+ }, {
789
788
  populate?: any;
789
+ select?: Record<string, 0 | 1> | undefined;
790
790
  }>>;
791
791
  export type GetByTokenInputDTO = DTO<typeof GetByTokenInputSchema>;
792
792
  export declare const GetOneQuerySchema: z.ZodObject<{
@@ -794,12 +794,12 @@ export declare const GetOneQuerySchema: z.ZodObject<{
794
794
  select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
795
795
  populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
796
796
  }, "strip", z.ZodTypeAny, {
797
- select?: Record<string, 0 | 1> | undefined;
798
797
  populate?: any;
798
+ select?: Record<string, 0 | 1> | undefined;
799
799
  query?: Record<string, any> | undefined;
800
800
  }, {
801
- select?: Record<string, 0 | 1> | undefined;
802
801
  populate?: any;
802
+ select?: Record<string, 0 | 1> | undefined;
803
803
  query?: Record<string, any> | undefined;
804
804
  }>;
805
805
  export type GetOneQueryDTO = DTO<typeof GetOneQuerySchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/core",
3
- "version": "1.3.57",
3
+ "version": "1.3.58",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",