@lyxa.ai/core 1.0.345 → 1.0.346
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,10 +24,12 @@ export declare class LineItem extends TimeStamps {
|
|
|
24
24
|
quantity?: number;
|
|
25
25
|
priceOption?: PriceOption;
|
|
26
26
|
priceBreakdown: OrderPriceBreakdown;
|
|
27
|
-
attributes?: LineItemAttribute[];
|
|
27
|
+
attributes?: LineItemAttribute[][];
|
|
28
28
|
removedIngredients?: string[];
|
|
29
29
|
specialInstructions?: string;
|
|
30
30
|
calculationSnap?: Record<string, unknown>;
|
|
31
|
-
isAdjusted
|
|
31
|
+
isAdjusted: boolean;
|
|
32
|
+
isB1G1: boolean;
|
|
32
33
|
adjustReason?: string;
|
|
34
|
+
lineItemHash: string;
|
|
33
35
|
}
|
|
@@ -41,7 +41,9 @@ let LineItem = class LineItem extends defaultClasses_1.TimeStamps {
|
|
|
41
41
|
specialInstructions;
|
|
42
42
|
calculationSnap;
|
|
43
43
|
isAdjusted;
|
|
44
|
+
isB1G1;
|
|
44
45
|
adjustReason;
|
|
46
|
+
lineItemHash;
|
|
45
47
|
};
|
|
46
48
|
exports.LineItem = LineItem;
|
|
47
49
|
__decorate([
|
|
@@ -93,7 +95,7 @@ __decorate([
|
|
|
93
95
|
__metadata("design:type", price_breakdown_model_1.OrderPriceBreakdown)
|
|
94
96
|
], LineItem.prototype, "priceBreakdown", void 0);
|
|
95
97
|
__decorate([
|
|
96
|
-
(0, typegoose_1.prop)({ type: () => [line_item_attribute_model_1.LineItemAttribute], default: [] }),
|
|
98
|
+
(0, typegoose_1.prop)({ type: () => [[line_item_attribute_model_1.LineItemAttribute]], default: [] }),
|
|
97
99
|
__metadata("design:type", Array)
|
|
98
100
|
], LineItem.prototype, "attributes", void 0);
|
|
99
101
|
__decorate([
|
|
@@ -112,10 +114,18 @@ __decorate([
|
|
|
112
114
|
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
113
115
|
__metadata("design:type", Boolean)
|
|
114
116
|
], LineItem.prototype, "isAdjusted", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
119
|
+
__metadata("design:type", Boolean)
|
|
120
|
+
], LineItem.prototype, "isB1G1", void 0);
|
|
115
121
|
__decorate([
|
|
116
122
|
(0, typegoose_1.prop)({ type: String }),
|
|
117
123
|
__metadata("design:type", String)
|
|
118
124
|
], LineItem.prototype, "adjustReason", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, typegoose_1.prop)({ type: String, select: false }),
|
|
127
|
+
__metadata("design:type", String)
|
|
128
|
+
], LineItem.prototype, "lineItemHash", void 0);
|
|
119
129
|
exports.LineItem = LineItem = __decorate([
|
|
120
130
|
(0, typegoose_1.modelOptions)({
|
|
121
131
|
schemaOptions: {
|
|
@@ -130,6 +140,7 @@ exports.LineItem = LineItem = __decorate([
|
|
|
130
140
|
(0, typegoose_1.index)({ cart: 1 }),
|
|
131
141
|
(0, typegoose_1.index)({ cart: 1, user: 1 }),
|
|
132
142
|
(0, typegoose_1.index)({ product: 1 }),
|
|
143
|
+
(0, typegoose_1.index)({ lineItemHash: 1 }),
|
|
133
144
|
(0, typegoose_1.index)({ shop: 1, deletedAt: 1 }),
|
|
134
145
|
(0, typegoose_1.index)({ shop: 1, createdAt: 1 })
|
|
135
146
|
], LineItem);
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"line-item.model.js","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AAE,CAAC,EAAE,CAAC;GACpB,QAAQ,CA4DpB","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 { Schema } from 'zod';\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({ 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 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"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED