@lyxa.ai/core 1.0.282-alpha.1 → 1.0.282-alpha.2
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.
|
@@ -3,14 +3,13 @@ import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
|
3
3
|
import { Cart } from './cart.model';
|
|
4
4
|
import { Product } from './product.model';
|
|
5
5
|
import { OrderPriceBreakdown } from './embedded/price-breakdown.model';
|
|
6
|
-
import { ItemType, PriceOption } from '../../../utilities/enum';
|
|
6
|
+
import { ItemType, PriceOption, ProductType } from '../../../utilities/enum';
|
|
7
7
|
import { LineItemAttribute } from './embedded/line-item-attribute.model';
|
|
8
8
|
import { User } from './user.model';
|
|
9
9
|
import { Shop } from './shop.model';
|
|
10
10
|
import { Parent } from './parent.model';
|
|
11
11
|
import { Category } from './category.model';
|
|
12
12
|
import { Marketing } from './marketing.model';
|
|
13
|
-
import { ProductSnap } from './embedded/product-snap.model';
|
|
14
13
|
export declare class LineItem extends TimeStamps {
|
|
15
14
|
cart: Ref<Cart>;
|
|
16
15
|
user: Ref<User>;
|
|
@@ -19,7 +18,13 @@ export declare class LineItem extends TimeStamps {
|
|
|
19
18
|
itemType: ItemType;
|
|
20
19
|
category: Ref<Category>;
|
|
21
20
|
product: Ref<Product>;
|
|
22
|
-
|
|
21
|
+
productName: string;
|
|
22
|
+
productBarcode?: string;
|
|
23
|
+
productType?: ProductType;
|
|
24
|
+
productLogo?: string;
|
|
25
|
+
productImages?: string[];
|
|
26
|
+
productDescription?: string;
|
|
27
|
+
isDrinkIncluded?: boolean;
|
|
23
28
|
marketings?: Ref<Marketing>[];
|
|
24
29
|
quantity?: number;
|
|
25
30
|
priceOption?: PriceOption;
|
|
@@ -22,7 +22,6 @@ const shop_model_1 = require("./shop.model");
|
|
|
22
22
|
const parent_model_1 = require("./parent.model");
|
|
23
23
|
const category_model_1 = require("./category.model");
|
|
24
24
|
const marketing_model_1 = require("./marketing.model");
|
|
25
|
-
const product_snap_model_1 = require("./embedded/product-snap.model");
|
|
26
25
|
let LineItem = class LineItem extends defaultClasses_1.TimeStamps {
|
|
27
26
|
cart;
|
|
28
27
|
user;
|
|
@@ -31,7 +30,13 @@ let LineItem = class LineItem extends defaultClasses_1.TimeStamps {
|
|
|
31
30
|
itemType;
|
|
32
31
|
category;
|
|
33
32
|
product;
|
|
34
|
-
|
|
33
|
+
productName;
|
|
34
|
+
productBarcode;
|
|
35
|
+
productType;
|
|
36
|
+
productLogo;
|
|
37
|
+
productImages;
|
|
38
|
+
productDescription;
|
|
39
|
+
isDrinkIncluded;
|
|
35
40
|
marketings;
|
|
36
41
|
quantity;
|
|
37
42
|
priceOption;
|
|
@@ -71,9 +76,33 @@ __decorate([
|
|
|
71
76
|
__metadata("design:type", Object)
|
|
72
77
|
], LineItem.prototype, "product", void 0);
|
|
73
78
|
__decorate([
|
|
74
|
-
(0, typegoose_1.prop)({ type:
|
|
75
|
-
__metadata("design:type",
|
|
76
|
-
], LineItem.prototype, "
|
|
79
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], LineItem.prototype, "productName", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], LineItem.prototype, "productBarcode", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.ProductType }),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], LineItem.prototype, "productType", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], LineItem.prototype, "productLogo", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, typegoose_1.prop)({ type: [String], default: [] }),
|
|
96
|
+
__metadata("design:type", Array)
|
|
97
|
+
], LineItem.prototype, "productImages", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
100
|
+
__metadata("design:type", String)
|
|
101
|
+
], LineItem.prototype, "productDescription", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
104
|
+
__metadata("design:type", Boolean)
|
|
105
|
+
], LineItem.prototype, "isDrinkIncluded", void 0);
|
|
77
106
|
__decorate([
|
|
78
107
|
(0, typegoose_1.prop)({ ref: () => marketing_model_1.Marketing, default: [] }),
|
|
79
108
|
__metadata("design:type", Array)
|
|
@@ -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,
|
|
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,kDAA6E;AAC7E,oFAAyE;AACzE,6CAAoC;AACpC,6CAAoC;AACpC,iDAAwC;AACxC,qDAA4C;AAC5C,uDAA8C;AAqBvC,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,CAAU;IAGrB,cAAc,CAAU;IAGxB,WAAW,CAAe;IAG1B,WAAW,CAAU;IAGrB,aAAa,CAAY;IAGzB,kBAAkB,CAAU;IAG5B,eAAe,CAAW;IAM1B,UAAU,CAAoB;IAG9B,QAAQ,CAAU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AAI,EAAC,EAAE,IAAI,EAAE,oBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;;iDACK;mBApErC,QAAQ;IAfpB,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,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,CAqEpB","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, ProductType } 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';\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({ 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({ required: true, type: String })\n\tpublic productName!: string;\n\n\t@prop({ type: String })\n\tpublic productBarcode?: string;\n\n\t@prop({ type: String, enum: ProductType })\n\tpublic productType?: ProductType;\n\n\t@prop({ type: String })\n\tpublic productLogo?: string;\n\n\t@prop({ type: [String], default: [] })\n\tpublic productImages?: string[];\n\n\t@prop({ type: String })\n\tpublic productDescription?: string;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isDrinkIncluded?: boolean;\n\n\t// @prop({ type: ProductSnap })\n\t// public 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"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyxa.ai/types",
|
|
3
|
-
"version": "1.0.282-alpha.
|
|
3
|
+
"version": "1.0.282-alpha.2",
|
|
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