@lyxa.ai/core 1.2.42 → 1.2.43
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.
- package/dist/libraries/mongo/models/providers/buy1-get1-marketing.model.d.ts +2 -0
- package/dist/libraries/mongo/models/providers/buy1-get1-marketing.model.js +6 -0
- package/dist/libraries/mongo/models/providers/buy1-get1-marketing.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/discount-marketing.model.d.ts +2 -0
- package/dist/libraries/mongo/models/providers/discount-marketing.model.js +6 -0
- package/dist/libraries/mongo/models/providers/discount-marketing.model.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -3,10 +3,12 @@ import { MarketingType } from '../../../../utilities/enum';
|
|
|
3
3
|
import { Marketing } from '../marketing.model';
|
|
4
4
|
import { ProductMarketing } from '../product-marketing.model';
|
|
5
5
|
import { ShopCategory } from '../shop-category.model';
|
|
6
|
+
import { Product } from '../product.model';
|
|
6
7
|
export declare class Buy1Get1Marketing extends Marketing {
|
|
7
8
|
marketingType: MarketingType.BUY1GET1;
|
|
8
9
|
isEntireMenu?: boolean;
|
|
9
10
|
products: Ref<ProductMarketing>;
|
|
11
|
+
excludeProducts?: Ref<Product>[];
|
|
10
12
|
spendLimit?: number;
|
|
11
13
|
isSpendLimitEnabled?: boolean;
|
|
12
14
|
isOnlyForSubscriber?: boolean;
|
|
@@ -15,10 +15,12 @@ const enum_1 = require("../../../../utilities/enum");
|
|
|
15
15
|
const marketing_model_1 = require("../marketing.model");
|
|
16
16
|
const product_marketing_model_1 = require("../product-marketing.model");
|
|
17
17
|
const shop_category_model_1 = require("../shop-category.model");
|
|
18
|
+
const product_model_1 = require("../product.model");
|
|
18
19
|
class Buy1Get1Marketing extends marketing_model_1.Marketing {
|
|
19
20
|
marketingType = enum_1.MarketingType.BUY1GET1;
|
|
20
21
|
isEntireMenu;
|
|
21
22
|
products;
|
|
23
|
+
excludeProducts;
|
|
22
24
|
spendLimit;
|
|
23
25
|
isSpendLimitEnabled;
|
|
24
26
|
isOnlyForSubscriber;
|
|
@@ -37,6 +39,10 @@ __decorate([
|
|
|
37
39
|
}),
|
|
38
40
|
__metadata("design:type", Object)
|
|
39
41
|
], Buy1Get1Marketing.prototype, "products", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typegoose_1.prop)({ ref: () => product_model_1.Product }),
|
|
44
|
+
__metadata("design:type", Array)
|
|
45
|
+
], Buy1Get1Marketing.prototype, "excludeProducts", void 0);
|
|
40
46
|
__decorate([
|
|
41
47
|
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
42
48
|
__metadata("design:type", Number)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buy1-get1-marketing.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/buy1-get1-marketing.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAA2D;AAC3D,wDAA+C;AAC/C,wEAA8D;AAC9D,gEAAsD;
|
|
1
|
+
{"version":3,"file":"buy1-get1-marketing.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/buy1-get1-marketing.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAA2D;AAC3D,wDAA+C;AAC/C,wEAA8D;AAC9D,gEAAsD;AACtD,oDAA2C;AAE3C,MAAa,iBAAkB,SAAQ,2BAAS;IACxC,aAAa,GAAG,oBAAa,CAAC,QAAiB,CAAC;IAGhD,YAAY,CAAW;IAOvB,QAAQ,CAAwB;IAGhC,eAAe,CAAkB;IAGjC,UAAU,CAAU;IAGpB,mBAAmB,CAAW;IAG9B,mBAAmB,CAAW;IAG9B,UAAU,CAAsB;CACvC;AA3BD,8CA2BC;AAvBO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;uDACV;AAOvB;IALN,IAAA,gBAAI,EAAC;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,0CAAgB;QAC3B,YAAY,EAAE,WAAW;QACzB,UAAU,EAAE,KAAK;KACjB,CAAC;;mDACqC;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,uBAAO,EAAE,CAAC;;0DACW;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;qDACR;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8DACH;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8DACH;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;;qDACK","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { MarketingType } from '../../../../utilities/enum';\nimport { Marketing } from '../marketing.model';\nimport { ProductMarketing } from '../product-marketing.model';\nimport { ShopCategory } from '../shop-category.model';\nimport { Product } from '../product.model';\n\nexport class Buy1Get1Marketing extends Marketing {\n\tpublic marketingType = MarketingType.BUY1GET1 as const;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isEntireMenu?: boolean;\n\n\t@prop({\n\t\tref: () => ProductMarketing,\n\t\tforeignField: 'marketing',\n\t\tlocalField: '_id',\n\t})\n\tpublic products: Ref<ProductMarketing>;\n\n\t@prop({ ref: () => Product })\n\tpublic excludeProducts?: Ref<Product>[];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic spendLimit?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSpendLimitEnabled?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isOnlyForSubscriber?: boolean;\n\n\t@prop({ ref: () => ShopCategory })\n\tpublic categories: Ref<ShopCategory>[];\n}\n"]}
|
|
@@ -3,12 +3,14 @@ import { MarketingType, ValueType } from '../../../../utilities/enum';
|
|
|
3
3
|
import { Marketing } from '../marketing.model';
|
|
4
4
|
import { ProductMarketing } from '../product-marketing.model';
|
|
5
5
|
import { ShopCategory } from '../shop-category.model';
|
|
6
|
+
import { Product } from '../product.model';
|
|
6
7
|
export declare class DiscountMarketing extends Marketing {
|
|
7
8
|
marketingType: MarketingType.DISCOUNT;
|
|
8
9
|
isEntireMenu?: boolean;
|
|
9
10
|
valueType?: ValueType;
|
|
10
11
|
value?: number;
|
|
11
12
|
products: Ref<ProductMarketing>;
|
|
13
|
+
excludeProducts?: Ref<Product>[];
|
|
12
14
|
maxDiscountPerOrder?: number;
|
|
13
15
|
isMaxDiscountPerOrderEnabled?: boolean;
|
|
14
16
|
spendLimit?: number;
|
|
@@ -15,12 +15,14 @@ const enum_1 = require("../../../../utilities/enum");
|
|
|
15
15
|
const marketing_model_1 = require("../marketing.model");
|
|
16
16
|
const product_marketing_model_1 = require("../product-marketing.model");
|
|
17
17
|
const shop_category_model_1 = require("../shop-category.model");
|
|
18
|
+
const product_model_1 = require("../product.model");
|
|
18
19
|
class DiscountMarketing extends marketing_model_1.Marketing {
|
|
19
20
|
marketingType = enum_1.MarketingType.DISCOUNT;
|
|
20
21
|
isEntireMenu;
|
|
21
22
|
valueType;
|
|
22
23
|
value;
|
|
23
24
|
products;
|
|
25
|
+
excludeProducts;
|
|
24
26
|
maxDiscountPerOrder;
|
|
25
27
|
isMaxDiscountPerOrderEnabled;
|
|
26
28
|
spendLimit;
|
|
@@ -51,6 +53,10 @@ __decorate([
|
|
|
51
53
|
}),
|
|
52
54
|
__metadata("design:type", Object)
|
|
53
55
|
], DiscountMarketing.prototype, "products", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typegoose_1.prop)({ ref: () => product_model_1.Product }),
|
|
58
|
+
__metadata("design:type", Array)
|
|
59
|
+
], DiscountMarketing.prototype, "excludeProducts", void 0);
|
|
54
60
|
__decorate([
|
|
55
61
|
(0, typegoose_1.prop)({ type: Number, default: 0 }),
|
|
56
62
|
__metadata("design:type", Number)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discount-marketing.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/discount-marketing.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAAsE;AACtE,wDAA+C;AAC/C,wEAA8D;AAC9D,gEAAsD;
|
|
1
|
+
{"version":3,"file":"discount-marketing.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/discount-marketing.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAAsE;AACtE,wDAA+C;AAC/C,wEAA8D;AAC9D,gEAAsD;AACtD,oDAA2C;AAE3C,MAAa,iBAAkB,SAAQ,2BAAS;IACxC,aAAa,GAAG,oBAAa,CAAC,QAAiB,CAAC;IAGhD,YAAY,CAAW;IAGvB,SAAS,CAAa;IAGtB,KAAK,CAAU;IAOf,QAAQ,CAAwB;IAGhC,eAAe,CAAkB;IAGjC,mBAAmB,CAAU;IAG7B,4BAA4B,CAAW;IAGvC,UAAU,CAAU;IAGpB,mBAAmB,CAAW;IAG9B,mBAAmB,CAAW;IAG9B,aAAa,CAAU;IAGvB,iBAAiB,CAAa;IAG9B,UAAU,CAAsB;CACvC;AA7CD,8CA6CC;AAzCO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;uDACV;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAS,EAAE,CAAC;;oDACX;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDACD;AAOf;IALN,IAAA,gBAAI,EAAC;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,0CAAgB;QAC3B,YAAY,EAAE,WAAW;QACzB,UAAU,EAAE,KAAK;KACjB,CAAC;;mDACqC;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,uBAAO,EAAE,CAAC;;0DACW;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;8DACC;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;uEACM;AAGvC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;qDACR;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8DACH;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8DACH;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;wDACL;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAS,EAAE,OAAO,EAAE,gBAAS,CAAC,UAAU,EAAE,CAAC;;4DAClC;AAG9B;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,kCAAY,EAAE,CAAC;;qDACK","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { MarketingType, ValueType } from '../../../../utilities/enum';\nimport { Marketing } from '../marketing.model';\nimport { ProductMarketing } from '../product-marketing.model';\nimport { ShopCategory } from '../shop-category.model';\nimport { Product } from '../product.model';\n\nexport class DiscountMarketing extends Marketing {\n\tpublic marketingType = MarketingType.DISCOUNT as const;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isEntireMenu?: boolean;\n\n\t@prop({ type: String, enum: ValueType })\n\tpublic valueType?: ValueType;\n\n\t@prop({ type: Number })\n\tpublic value?: number;\n\n\t@prop({\n\t\tref: () => ProductMarketing,\n\t\tforeignField: 'marketing',\n\t\tlocalField: '_id',\n\t})\n\tpublic products: Ref<ProductMarketing>;\n\n\t@prop({ ref: () => Product })\n\tpublic excludeProducts?: Ref<Product>[];\n\n\t@prop({ type: Number, default: 0 })\n\tpublic maxDiscountPerOrder?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isMaxDiscountPerOrderEnabled?: boolean;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic spendLimit?: number;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isSpendLimitEnabled?: boolean;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isOnlyForSubscriber?: boolean;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic categoryValue?: number;\n\n\t@prop({ type: String, enum: ValueType, default: ValueType.PERCENTAGE })\n\tpublic categoryValueType?: ValueType;\n\n\t@prop({ ref: () => ShopCategory })\n\tpublic categories: Ref<ShopCategory>[];\n}"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED