@unchainedshop/core-products 4.0.0-rc.9 → 4.0.1
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/lib/db/ProductMediaCollection.d.ts +3 -3
- package/lib/db/ProductMediaCollection.d.ts.map +1 -1
- package/lib/db/ProductMediaSchema.d.ts +4 -0
- package/lib/db/ProductMediaSchema.d.ts.map +1 -0
- package/lib/db/ProductMediaSchema.js +22 -0
- package/lib/db/ProductMediaSchema.js.map +1 -0
- package/lib/db/ProductReviewsCollection.d.ts +1 -1
- package/lib/db/ProductReviewsCollection.d.ts.map +1 -1
- package/lib/db/ProductReviewsCollection.js +16 -15
- package/lib/db/ProductReviewsCollection.js.map +1 -1
- package/lib/db/ProductReviewsSchema.d.ts +8 -0
- package/lib/db/ProductReviewsSchema.d.ts.map +1 -0
- package/lib/db/ProductReviewsSchema.js +31 -0
- package/lib/db/ProductReviewsSchema.js.map +1 -0
- package/lib/db/ProductStatus.d.ts +6 -0
- package/lib/db/ProductStatus.d.ts.map +1 -0
- package/lib/db/ProductStatus.js +7 -0
- package/lib/db/ProductStatus.js.map +1 -0
- package/lib/db/ProductVariationsCollection.d.ts +6 -6
- package/lib/db/ProductVariationsCollection.d.ts.map +1 -1
- package/lib/db/ProductVariationsSchema.d.ts +8 -0
- package/lib/db/ProductVariationsSchema.d.ts.map +1 -0
- package/lib/db/ProductVariationsSchema.js +28 -0
- package/lib/db/ProductVariationsSchema.js.map +1 -0
- package/lib/db/ProductsCollection.d.ts +9 -9
- package/lib/db/ProductsCollection.d.ts.map +1 -1
- package/lib/db/ProductsCollection.js +24 -19
- package/lib/db/ProductsCollection.js.map +1 -1
- package/lib/db/ProductsSchema.d.ts +11 -0
- package/lib/db/ProductsSchema.d.ts.map +1 -0
- package/lib/db/ProductsSchema.js +106 -0
- package/lib/db/ProductsSchema.js.map +1 -0
- package/lib/director/ProductDiscountAdapter.d.ts +4 -0
- package/lib/director/ProductDiscountAdapter.d.ts.map +1 -0
- package/lib/director/ProductDiscountAdapter.js +3 -0
- package/lib/director/ProductDiscountAdapter.js.map +1 -0
- package/lib/director/ProductDiscountConfiguration.d.ts +13 -0
- package/lib/director/ProductDiscountConfiguration.d.ts.map +1 -0
- package/lib/director/ProductDiscountConfiguration.js +2 -0
- package/lib/director/ProductDiscountConfiguration.js.map +1 -0
- package/lib/director/ProductDiscountDirector.d.ts +3 -0
- package/lib/director/ProductDiscountDirector.d.ts.map +1 -0
- package/lib/director/ProductDiscountDirector.js +3 -0
- package/lib/director/ProductDiscountDirector.js.map +1 -0
- package/lib/director/ProductPricingAdapter.d.ts +3 -0
- package/lib/director/ProductPricingAdapter.d.ts.map +1 -0
- package/lib/director/ProductPricingAdapter.js +25 -0
- package/lib/director/ProductPricingAdapter.js.map +1 -0
- package/lib/director/ProductPricingDirector.d.ts +3 -0
- package/lib/director/ProductPricingDirector.d.ts.map +1 -0
- package/lib/director/ProductPricingDirector.js +59 -0
- package/lib/director/ProductPricingDirector.js.map +1 -0
- package/lib/director/ProductPricingSheet.d.ts +4 -0
- package/lib/director/ProductPricingSheet.d.ts.map +1 -0
- package/lib/director/ProductPricingSheet.js +78 -0
- package/lib/director/ProductPricingSheet.js.map +1 -0
- package/lib/migrations/addMigrations.d.ts +3 -0
- package/lib/migrations/addMigrations.d.ts.map +1 -0
- package/lib/migrations/addMigrations.js +35 -0
- package/lib/migrations/addMigrations.js.map +1 -0
- package/lib/mock/product.d.ts +10 -3
- package/lib/mock/product.d.ts.map +1 -1
- package/lib/module/configureProductMediaModule.d.ts +5 -5
- package/lib/module/configureProductMediaModule.d.ts.map +1 -1
- package/lib/module/configureProductMediaModule.js +11 -13
- package/lib/module/configureProductMediaModule.js.map +1 -1
- package/lib/module/configureProductPrices.d.ts +5 -8
- package/lib/module/configureProductPrices.d.ts.map +1 -1
- package/lib/module/configureProductPrices.js +11 -9
- package/lib/module/configureProductPrices.js.map +1 -1
- package/lib/module/configureProductReviewsModule.d.ts +11 -7
- package/lib/module/configureProductReviewsModule.d.ts.map +1 -1
- package/lib/module/configureProductReviewsModule.js +10 -4
- package/lib/module/configureProductReviewsModule.js.map +1 -1
- package/lib/module/configureProductTextsModule.d.ts +2 -2
- package/lib/module/configureProductTextsModule.d.ts.map +1 -1
- package/lib/module/configureProductTextsModule.js +25 -28
- package/lib/module/configureProductTextsModule.js.map +1 -1
- package/lib/module/configureProductVariationsModule.d.ts +10 -9
- package/lib/module/configureProductVariationsModule.d.ts.map +1 -1
- package/lib/module/configureProductVariationsModule.js +13 -14
- package/lib/module/configureProductVariationsModule.js.map +1 -1
- package/lib/module/configureProductsModule.d.ts +45 -41
- package/lib/module/configureProductsModule.d.ts.map +1 -1
- package/lib/module/configureProductsModule.js +41 -25
- package/lib/module/configureProductsModule.js.map +1 -1
- package/lib/module/utils/getPriceRange.d.ts +2 -5
- package/lib/module/utils/getPriceRange.d.ts.map +1 -1
- package/lib/module/utils/getPriceRange.js +2 -0
- package/lib/module/utils/getPriceRange.js.map +1 -1
- package/lib/products-settings.d.ts +2 -4
- package/lib/products-settings.d.ts.map +1 -1
- package/lib/products-settings.js +3 -3
- package/lib/products-settings.js.map +1 -1
- package/lib/service/productServices.d.ts +3 -0
- package/lib/service/productServices.d.ts.map +1 -0
- package/lib/service/productServices.js +5 -0
- package/lib/service/productServices.js.map +1 -0
- package/lib/service/removeProductService.d.ts +3 -0
- package/lib/service/removeProductService.d.ts.map +1 -0
- package/lib/service/removeProductService.js +21 -0
- package/lib/service/removeProductService.js.map +1 -0
- package/package.json +4 -4
- package/src/db/ProductMediaCollection.ts +3 -3
- package/src/db/ProductReviewsCollection.ts +18 -16
- package/src/db/ProductVariationsCollection.ts +6 -6
- package/src/db/ProductsCollection.ts +34 -28
- package/src/module/configureProductMediaModule.ts +28 -25
- package/src/module/configureProductPrices.ts +27 -27
- package/src/module/configureProductReviewsModule.ts +23 -14
- package/src/module/configureProductTextsModule.ts +29 -32
- package/src/module/configureProductVariationsModule.ts +42 -36
- package/src/module/configureProductsModule.ts +71 -49
- package/src/module/utils/getPriceRange.test.ts +4 -0
- package/src/module/utils/getPriceRange.ts +4 -2
- package/src/products-settings.ts +6 -9
- package/tsconfig.json +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mongodb, TimestampFields } from '@unchainedshop/mongodb';
|
|
2
2
|
export type ProductMedia = {
|
|
3
|
-
_id
|
|
3
|
+
_id: string;
|
|
4
4
|
mediaId: string;
|
|
5
5
|
productId: string;
|
|
6
6
|
sortKey: number;
|
|
@@ -8,9 +8,9 @@ export type ProductMedia = {
|
|
|
8
8
|
meta?: any;
|
|
9
9
|
} & TimestampFields;
|
|
10
10
|
export type ProductMediaText = {
|
|
11
|
-
_id
|
|
11
|
+
_id: string;
|
|
12
12
|
productMediaId: string;
|
|
13
|
-
locale
|
|
13
|
+
locale: string;
|
|
14
14
|
title?: string;
|
|
15
15
|
subtitle?: string;
|
|
16
16
|
} & TimestampFields;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductMediaCollection.d.ts","sourceRoot":"","sources":["../../src/db/ProductMediaCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAkB,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAElF,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,
|
|
1
|
+
{"version":3,"file":"ProductMediaCollection.d.ts","sourceRoot":"","sources":["../../src/db/ProductMediaCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAkB,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAElF,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ,GAAG,eAAe,CAAC;AAEpB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,eAAe,CAAC;AAEpB,eAAO,MAAM,sBAAsB,GAAU,IAAI,OAAO,CAAC,EAAE;;;EAmB1D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductMediaSchema.d.ts","sourceRoot":"","sources":["../../src/db/ProductMediaSchema.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,cAAc,CAAC;AAExC,eAAO,MAAM,kBAAkB,cAW9B,CAAC;AAEF,eAAO,MAAM,uBAAuB,cAYnC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Schemas } from '@unchainedshop/utils';
|
|
2
|
+
import SimpleSchema from 'simpl-schema';
|
|
3
|
+
export const ProductMediaSchema = new SimpleSchema({
|
|
4
|
+
mediaId: { type: String, required: true },
|
|
5
|
+
productId: { type: String, required: true },
|
|
6
|
+
sortKey: { type: Number, required: true },
|
|
7
|
+
tags: Array,
|
|
8
|
+
'tags.$': String,
|
|
9
|
+
meta: { type: Object, blackbox: true },
|
|
10
|
+
...Schemas.timestampFields,
|
|
11
|
+
}, { requiredByDefault: false });
|
|
12
|
+
export const ProductMediaTextsSchema = new SimpleSchema({
|
|
13
|
+
productMediaId: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
locale: String,
|
|
18
|
+
title: String,
|
|
19
|
+
subtitle: String,
|
|
20
|
+
...Schemas.timestampFields,
|
|
21
|
+
}, { requiredByDefault: false });
|
|
22
|
+
//# sourceMappingURL=ProductMediaSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductMediaSchema.js","sourceRoot":"","sources":["../../src/db/ProductMediaSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,YAAY,MAAM,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,YAAY,CAChD;IACE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACzC,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC3C,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACzC,IAAI,EAAE,KAAK;IACX,QAAQ,EAAE,MAAM;IAChB,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACtC,GAAG,OAAO,CAAC,eAAe;CAC3B,EACD,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,YAAY,CACrD;IACE,cAAc,EAAE;QACd,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;IACD,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,GAAG,OAAO,CAAC,eAAe;CAC3B,EACD,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAC7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductReviewsCollection.d.ts","sourceRoot":"","sources":["../../src/db/ProductReviewsCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAEhC,oBAAY,qBAAqB;IAC/B,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,IAAI,EAAE,qBAAqB,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,
|
|
1
|
+
{"version":3,"file":"ProductReviewsCollection.d.ts","sourceRoot":"","sources":["../../src/db/ProductReviewsCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAEhC,oBAAY,qBAAqB;IAC/B,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,IAAI,EAAE,qBAAqB,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB,GAAG,eAAe,CAAC;AAEpB,eAAO,MAAM,wBAAwB,GAAU,IAAI,OAAO,CAAC,EAAE;;EA0B5D,CAAC"}
|
|
@@ -7,23 +7,24 @@ export var ProductReviewVoteType;
|
|
|
7
7
|
})(ProductReviewVoteType || (ProductReviewVoteType = {}));
|
|
8
8
|
export const ProductReviewsCollection = async (db) => {
|
|
9
9
|
const ProductReviews = db.collection('product_reviews');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
if (!isDocumentDBCompatModeEnabled()) {
|
|
11
|
+
await buildDbIndexes(ProductReviews, [
|
|
12
|
+
{
|
|
13
|
+
index: {
|
|
14
|
+
title: 'text',
|
|
15
|
+
review: 'text',
|
|
16
|
+
},
|
|
17
|
+
options: {
|
|
18
|
+
weights: {
|
|
19
|
+
title: 3,
|
|
20
|
+
review: 5,
|
|
21
|
+
},
|
|
22
|
+
name: 'productreview_fulltext_search',
|
|
22
23
|
},
|
|
23
|
-
name: 'productreview_fulltext_search',
|
|
24
24
|
},
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
]);
|
|
26
|
+
}
|
|
27
|
+
await buildDbIndexes(ProductReviews, [{ index: { productId: 1 } }, { index: { authorId: 1 } }]);
|
|
27
28
|
return {
|
|
28
29
|
ProductReviews,
|
|
29
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductReviewsCollection.js","sourceRoot":"","sources":["../../src/db/ProductReviewsCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EAEd,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC;AAEhC,MAAM,CAAN,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,8CAAqB,CAAA;IACrB,0CAAiB,CAAA;AACnB,CAAC,EAJW,qBAAqB,KAArB,qBAAqB,QAIhC;AAoBD,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,EAAE,EAAc,EAAE,EAAE;IAC/D,MAAM,cAAc,GAAG,EAAE,CAAC,UAAU,CAAgB,iBAAiB,CAAC,CAAC;IAEvE,MAAM,cAAc,CAAC,cAAc,EAAE;
|
|
1
|
+
{"version":3,"file":"ProductReviewsCollection.js","sourceRoot":"","sources":["../../src/db/ProductReviewsCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EAEd,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC;AAEhC,MAAM,CAAN,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;IACjB,8CAAqB,CAAA;IACrB,0CAAiB,CAAA;AACnB,CAAC,EAJW,qBAAqB,KAArB,qBAAqB,QAIhC;AAoBD,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,EAAE,EAAc,EAAE,EAAE;IAC/D,MAAM,cAAc,GAAG,EAAE,CAAC,UAAU,CAAgB,iBAAiB,CAAC,CAAC;IAEvE,IAAI,CAAC,6BAA6B,EAAE,EAAE,CAAC;QACrC,MAAM,cAAc,CAAC,cAAc,EAAE;YACnC;gBACE,KAAK,EAAE;oBACL,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,MAAM;iBACf;gBACD,OAAO,EAAE;oBACP,OAAO,EAAE;wBACP,KAAK,EAAE,CAAC;wBACR,MAAM,EAAE,CAAC;qBACV;oBACD,IAAI,EAAE,+BAA+B;iBACtC;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,MAAM,cAAc,CAAC,cAAc,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAEhG,OAAO;QACL,cAAc;KACf,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductReviewsSchema.d.ts","sourceRoot":"","sources":["../../src/db/ProductReviewsSchema.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,cAAc,CAAC;AAExC,eAAO,MAAM,sBAAsB;;;;CAIlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,cAyBhC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Schemas } from '@unchainedshop/utils';
|
|
2
|
+
import SimpleSchema from 'simpl-schema';
|
|
3
|
+
export const ProductReviewVoteTypes = {
|
|
4
|
+
UPVOTE: 'UPVOTE',
|
|
5
|
+
DOWNVOTE: 'DOWNVOTE',
|
|
6
|
+
REPORT: 'REPORT',
|
|
7
|
+
};
|
|
8
|
+
export const ProductReviewsSchema = new SimpleSchema({
|
|
9
|
+
productId: { type: String, required: true },
|
|
10
|
+
authorId: { type: String, required: true },
|
|
11
|
+
rating: {
|
|
12
|
+
type: SimpleSchema.Integer,
|
|
13
|
+
min: 1,
|
|
14
|
+
max: 100,
|
|
15
|
+
},
|
|
16
|
+
title: String,
|
|
17
|
+
review: String,
|
|
18
|
+
meta: { type: Object, blackbox: true },
|
|
19
|
+
votes: Array,
|
|
20
|
+
'votes.$': { type: Object, required: true },
|
|
21
|
+
'votes.$.timestamp': { type: Date, required: true },
|
|
22
|
+
'votes.$.userId': { type: String, required: true },
|
|
23
|
+
'votes.$.type': {
|
|
24
|
+
type: String,
|
|
25
|
+
required: true,
|
|
26
|
+
allowedValues: Object.values(ProductReviewVoteTypes),
|
|
27
|
+
},
|
|
28
|
+
'votes.$.meta': { type: Object, blackbox: true },
|
|
29
|
+
...Schemas.timestampFields,
|
|
30
|
+
}, { requiredByDefault: false });
|
|
31
|
+
//# sourceMappingURL=ProductReviewsSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductReviewsSchema.js","sourceRoot":"","sources":["../../src/db/ProductReviewsSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,YAAY,MAAM,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,YAAY,CAClD;IACE,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC3C,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC1C,MAAM,EAAE;QACN,IAAI,EAAE,YAAY,CAAC,OAAO;QAC1B,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,GAAG;KACT;IACD,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACtC,KAAK,EAAE,KAAK;IACZ,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC3C,mBAAmB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;IACnD,gBAAgB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAClD,cAAc,EAAE;QACd,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC;KACrD;IACD,cAAc,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAChD,GAAG,OAAO,CAAC,eAAe;CAC3B,EACD,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductStatus.d.ts","sourceRoot":"","sources":["../../src/db/ProductStatus.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductStatus.js","sourceRoot":"","sources":["../../src/db/ProductStatus.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,gCAAe,CAAA;IACf,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;AACrB,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB"}
|
|
@@ -4,23 +4,23 @@ export declare enum ProductVariationType {
|
|
|
4
4
|
TEXT = "TEXT"
|
|
5
5
|
}
|
|
6
6
|
export type ProductVariation = {
|
|
7
|
-
_id
|
|
8
|
-
key
|
|
7
|
+
_id: string;
|
|
8
|
+
key: string;
|
|
9
9
|
tags?: string[];
|
|
10
10
|
options: string[];
|
|
11
11
|
productId: string;
|
|
12
|
-
type
|
|
12
|
+
type: string;
|
|
13
13
|
} & TimestampFields;
|
|
14
14
|
export type ProductVariationText = {
|
|
15
|
-
_id
|
|
15
|
+
_id: string;
|
|
16
16
|
locale: string;
|
|
17
17
|
productVariationId: string;
|
|
18
|
-
productVariationOptionValue
|
|
18
|
+
productVariationOptionValue: string | null;
|
|
19
19
|
subtitle?: string;
|
|
20
20
|
title?: string;
|
|
21
21
|
} & TimestampFields;
|
|
22
22
|
export interface ProductVariationOption {
|
|
23
|
-
_id
|
|
23
|
+
_id: string;
|
|
24
24
|
texts: ProductVariationText;
|
|
25
25
|
value: string;
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductVariationsCollection.d.ts","sourceRoot":"","sources":["../../src/db/ProductVariationsCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAkB,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAElF,oBAAY,oBAAoB;IAC9B,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,
|
|
1
|
+
{"version":3,"file":"ProductVariationsCollection.d.ts","sourceRoot":"","sources":["../../src/db/ProductVariationsCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAkB,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAElF,oBAAY,oBAAoB;IAC9B,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,eAAe,CAAC;AAEpB,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,eAAe,CAAC;AAEpB,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,oBAAoB,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf;AACD,eAAO,MAAM,2BAA2B,GAAU,IAAI,OAAO,CAAC,EAAE;;;EAe/D,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import SimpleSchema from 'simpl-schema';
|
|
2
|
+
export declare const ProductVariationType: {
|
|
3
|
+
COLOR: string;
|
|
4
|
+
TEXT: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const ProductVariationsSchema: SimpleSchema;
|
|
7
|
+
export declare const ProductVariationTextsSchema: SimpleSchema;
|
|
8
|
+
//# sourceMappingURL=ProductVariationsSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductVariationsSchema.d.ts","sourceRoot":"","sources":["../../src/db/ProductVariationsSchema.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,cAAc,CAAC;AAExC,eAAO,MAAM,oBAAoB;;;CAGhC,CAAC;AAEF,eAAO,MAAM,uBAAuB,cAYnC,CAAC;AAEF,eAAO,MAAM,2BAA2B,cAavC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Schemas } from '@unchainedshop/utils';
|
|
2
|
+
import SimpleSchema from 'simpl-schema';
|
|
3
|
+
export const ProductVariationType = {
|
|
4
|
+
COLOR: 'COLOR',
|
|
5
|
+
TEXT: 'TEXT',
|
|
6
|
+
};
|
|
7
|
+
export const ProductVariationsSchema = new SimpleSchema({
|
|
8
|
+
productId: { type: String, required: true },
|
|
9
|
+
key: String,
|
|
10
|
+
type: String,
|
|
11
|
+
tags: Array,
|
|
12
|
+
'tags.$': String,
|
|
13
|
+
options: Array,
|
|
14
|
+
'options.$': String,
|
|
15
|
+
...Schemas.timestampFields,
|
|
16
|
+
}, { requiredByDefault: false });
|
|
17
|
+
export const ProductVariationTextsSchema = new SimpleSchema({
|
|
18
|
+
productVariationId: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
productVariationOptionValue: String,
|
|
23
|
+
locale: String,
|
|
24
|
+
title: String,
|
|
25
|
+
subtitle: String,
|
|
26
|
+
...Schemas.timestampFields,
|
|
27
|
+
}, { requiredByDefault: false });
|
|
28
|
+
//# sourceMappingURL=ProductVariationsSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductVariationsSchema.js","sourceRoot":"","sources":["../../src/db/ProductVariationsSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,YAAY,MAAM,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;CACb,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,YAAY,CACrD;IACE,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC3C,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,KAAK;IACX,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,MAAM;IACnB,GAAG,OAAO,CAAC,eAAe;CAC3B,EACD,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,YAAY,CACzD;IACE,kBAAkB,EAAE;QAClB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;IACD,2BAA2B,EAAE,MAAM;IACnC,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,GAAG,OAAO,CAAC,eAAe;CAC3B,EACD,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAC7B,CAAC"}
|
|
@@ -46,7 +46,7 @@ export interface ProductBundleItem {
|
|
|
46
46
|
export interface ProductPrice extends Price {
|
|
47
47
|
isTaxable?: boolean;
|
|
48
48
|
isNetPrice?: boolean;
|
|
49
|
-
countryCode
|
|
49
|
+
countryCode: string;
|
|
50
50
|
maxQuantity?: number;
|
|
51
51
|
}
|
|
52
52
|
export interface ProductPriceRange {
|
|
@@ -78,24 +78,24 @@ export interface ProductWarehousing {
|
|
|
78
78
|
sku?: string;
|
|
79
79
|
}
|
|
80
80
|
export type Product = {
|
|
81
|
-
_id
|
|
82
|
-
bundleItems
|
|
81
|
+
_id: string;
|
|
82
|
+
bundleItems?: ProductBundleItem[];
|
|
83
83
|
commerce?: ProductCommerce;
|
|
84
84
|
meta?: any;
|
|
85
|
-
plan
|
|
86
|
-
proxy
|
|
85
|
+
plan?: ProductPlan;
|
|
86
|
+
proxy?: ProductProxy;
|
|
87
87
|
published?: Date;
|
|
88
88
|
sequence: number;
|
|
89
89
|
slugs: string[];
|
|
90
|
-
status?: string;
|
|
91
|
-
supply
|
|
92
|
-
tags
|
|
90
|
+
status?: string | null;
|
|
91
|
+
supply?: ProductSupply;
|
|
92
|
+
tags: string[];
|
|
93
93
|
type: string;
|
|
94
94
|
warehousing?: ProductWarehousing;
|
|
95
95
|
tokenization?: ProductTokenization;
|
|
96
96
|
} & TimestampFields;
|
|
97
97
|
export type ProductText = {
|
|
98
|
-
_id
|
|
98
|
+
_id: string;
|
|
99
99
|
productId: string;
|
|
100
100
|
description?: string;
|
|
101
101
|
locale: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductsCollection.d.ts","sourceRoot":"","sources":["../../src/db/ProductsCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,oBAAY,aAAa;IACvB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,YAAY;IACtB,aAAa,mBAAmB;IAChC,mBAAmB,yBAAyB;IAC5C,aAAa,mBAAmB;IAChC,WAAW,iBAAiB;IAC5B,gBAAgB,sBAAsB;CACvC;AACD,MAAM,WAAW,4BAA4B;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,iBAAiB,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,oBAAY,uBAAuB;IACj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AE;;;EAkDtD,CAAC"}
|
|
@@ -21,6 +21,30 @@ export var ProductContractStandard;
|
|
|
21
21
|
export const ProductsCollection = async (db) => {
|
|
22
22
|
const Products = db.collection('products');
|
|
23
23
|
const ProductTexts = db.collection('product_texts');
|
|
24
|
+
if (!isDocumentDBCompatModeEnabled()) {
|
|
25
|
+
await buildDbIndexes(Products, [
|
|
26
|
+
{
|
|
27
|
+
index: { 'warehousing.sku': 'text', slugs: 'text' },
|
|
28
|
+
options: {
|
|
29
|
+
name: 'products_fulltext_search',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
]);
|
|
33
|
+
await buildDbIndexes(ProductTexts, [
|
|
34
|
+
{
|
|
35
|
+
index: { title: 'text', subtitle: 'text', vendor: 'text', brand: 'text' },
|
|
36
|
+
options: {
|
|
37
|
+
weights: {
|
|
38
|
+
title: 8,
|
|
39
|
+
subtitle: 6,
|
|
40
|
+
vendor: 5,
|
|
41
|
+
brand: 4,
|
|
42
|
+
},
|
|
43
|
+
name: 'product_texts_fulltext_search',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
]);
|
|
47
|
+
}
|
|
24
48
|
// Product Indexes
|
|
25
49
|
await buildDbIndexes(Products, [
|
|
26
50
|
{ index: { sequence: 1 } },
|
|
@@ -28,13 +52,6 @@ export const ProductsCollection = async (db) => {
|
|
|
28
52
|
{ index: { status: 1 } },
|
|
29
53
|
{ index: { tags: 1 } },
|
|
30
54
|
{ index: { 'warehousing.sku': 1 } },
|
|
31
|
-
!isDocumentDBCompatModeEnabled() &&
|
|
32
|
-
{
|
|
33
|
-
index: { 'warehousing.sku': 'text', slugs: 'text' },
|
|
34
|
-
options: {
|
|
35
|
-
name: 'products_fulltext_search',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
55
|
]);
|
|
39
56
|
// ProductTexts indexes
|
|
40
57
|
await buildDbIndexes(ProductTexts, [
|
|
@@ -42,18 +59,6 @@ export const ProductsCollection = async (db) => {
|
|
|
42
59
|
{ index: { locale: 1 } },
|
|
43
60
|
{ index: { slug: 1 } },
|
|
44
61
|
{ index: { locale: 1, productId: 1 } },
|
|
45
|
-
!isDocumentDBCompatModeEnabled() && {
|
|
46
|
-
index: { title: 'text', subtitle: 'text', vendor: 'text', brand: 'text' },
|
|
47
|
-
options: {
|
|
48
|
-
weights: {
|
|
49
|
-
title: 8,
|
|
50
|
-
subtitle: 6,
|
|
51
|
-
vendor: 5,
|
|
52
|
-
brand: 4,
|
|
53
|
-
},
|
|
54
|
-
name: 'product_texts_fulltext_search',
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
62
|
]);
|
|
58
63
|
return {
|
|
59
64
|
Products,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductsCollection.js","sourceRoot":"","sources":["../../src/db/ProductsCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EAEd,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC;AAGhC,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,gCAAe,CAAA;IACf,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;AACrB,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAED,MAAM,CAAN,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,gDAAgC,CAAA;IAChC,4DAA4C,CAAA;IAC5C,gDAAgC,CAAA;IAChC,4CAA4B,CAAA;IAC5B,sDAAsC,CAAA;AACxC,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB;AAuBD,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,4CAAiB,CAAA;IACjB,8CAAmB,CAAA;AACrB,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AAoFD,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EAAE,EAAc,EAAE,EAAE;IACzD,MAAM,QAAQ,GAAG,EAAE,CAAC,UAAU,CAAU,UAAU,CAAC,CAAC;IACpD,MAAM,YA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,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;gBACzE,OAAO,EAAE;oBACP,OAAO,EAAE;wBACP,KAAK,EAAE,CAAC;wBACR,QAAQ,EAAE,CAAC;wBACX,MAAM,EAAE,CAAC;wBACT,KAAK,EAAE,CAAC;qBACT;oBACD,IAAI,EAAE,+BAA+B;iBACtC;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,kBAAkB;IAClB,MAAM,cAAc,CAAC,QAAQ,EAAE;QAC7B,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE;QAC1B,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;QACvB,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE;QACxB,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;QACtB,EAAE,KAAK,EAAE,EAAE,iBAAiB,EAAE,CAAC,EAAE,EAAE;KACpC,CAAC,CAAC;IAEH,uBAAuB;IACvB,MAAM,cAAc,CAAC,YAAY,EAAE;QACjC,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE;QAC3B,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE;QACxB,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;QACtB,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE;KACvC,CAAC,CAAC;IAEH,OAAO;QACL,QAAQ;QACR,YAAY;KACb,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import SimpleSchema from 'simpl-schema';
|
|
2
|
+
export declare const ProductTypes: {
|
|
3
|
+
SimpleProduct: string;
|
|
4
|
+
ConfigurableProduct: string;
|
|
5
|
+
BundleProduct: string;
|
|
6
|
+
PlanProduct: string;
|
|
7
|
+
TokenizedProduct: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const ProductsSchema: SimpleSchema;
|
|
10
|
+
export declare const ProductTextsSchema: SimpleSchema;
|
|
11
|
+
//# sourceMappingURL=ProductsSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductsSchema.d.ts","sourceRoot":"","sources":["../../src/db/ProductsSchema.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,cAAc,CAAC;AAExC,eAAO,MAAM,YAAY;;;;;;CAMxB,CAAC;AAoFF,eAAO,MAAM,cAAc,cA6B1B,CAAC;AAEF,eAAO,MAAM,kBAAkB,cAe9B,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { Schemas } from '@unchainedshop/utils';
|
|
2
|
+
import SimpleSchema from 'simpl-schema';
|
|
3
|
+
export const ProductTypes = {
|
|
4
|
+
SimpleProduct: 'SIMPLE_PRODUCT',
|
|
5
|
+
ConfigurableProduct: 'CONFIGURABLE_PRODUCT',
|
|
6
|
+
BundleProduct: 'BUNDLE_PRODUCT',
|
|
7
|
+
PlanProduct: 'PLAN_PRODUCT',
|
|
8
|
+
TokenizedProduct: 'TOKENIZED_PRODUCT',
|
|
9
|
+
};
|
|
10
|
+
const ProductCommerceSchema = new SimpleSchema({
|
|
11
|
+
salesUnit: String,
|
|
12
|
+
salesQuantityPerUnit: String,
|
|
13
|
+
defaultOrderQuantity: Number,
|
|
14
|
+
pricing: Array,
|
|
15
|
+
'pricing.$': Object,
|
|
16
|
+
'pricing.$.isTaxable': Boolean,
|
|
17
|
+
'pricing.$.isNetPrice': Boolean,
|
|
18
|
+
'pricing.$.countryCode': String,
|
|
19
|
+
'pricing.$.currencyCode': String,
|
|
20
|
+
'pricing.$.amount': Number,
|
|
21
|
+
'pricing.$.maxQuantity': Number,
|
|
22
|
+
}, { requiredByDefault: false });
|
|
23
|
+
const ProductWarehousingSchema = new SimpleSchema({
|
|
24
|
+
baseUnit: String,
|
|
25
|
+
sku: String,
|
|
26
|
+
}, { requiredByDefault: false });
|
|
27
|
+
const ProductTokenizationSchema = new SimpleSchema({
|
|
28
|
+
contractAddress: String,
|
|
29
|
+
contractStandard: String,
|
|
30
|
+
ercMetadataProperties: { type: Object, blackbox: true, optional: true },
|
|
31
|
+
tokenId: String,
|
|
32
|
+
supply: Number,
|
|
33
|
+
}, { requiredByDefault: true });
|
|
34
|
+
const ProductSupplySchema = new SimpleSchema({
|
|
35
|
+
weightInGram: Number,
|
|
36
|
+
heightInMillimeters: Number,
|
|
37
|
+
lengthInMillimeters: Number,
|
|
38
|
+
widthInMillimeters: Number,
|
|
39
|
+
}, { requiredByDefault: false });
|
|
40
|
+
const ProductPlanSchema = new SimpleSchema({
|
|
41
|
+
billingInterval: String,
|
|
42
|
+
billingIntervalCount: Number,
|
|
43
|
+
usageCalculationType: String,
|
|
44
|
+
trialInterval: String,
|
|
45
|
+
trialIntervalCount: Number,
|
|
46
|
+
}, { requiredByDefault: false });
|
|
47
|
+
const ProductProxySchema = new SimpleSchema({
|
|
48
|
+
assignments: Array,
|
|
49
|
+
'assignments.$': Object,
|
|
50
|
+
'assignments.$.vector': { type: Object, blackbox: true },
|
|
51
|
+
'assignments.$.productId': String,
|
|
52
|
+
}, { requiredByDefault: false });
|
|
53
|
+
const ProductConfigurationSchema = new SimpleSchema({
|
|
54
|
+
key: String,
|
|
55
|
+
value: String,
|
|
56
|
+
});
|
|
57
|
+
const ProductBundleItemSchema = new SimpleSchema({
|
|
58
|
+
productId: String,
|
|
59
|
+
quantity: Number,
|
|
60
|
+
configuration: {
|
|
61
|
+
type: Array,
|
|
62
|
+
defaultValue: [],
|
|
63
|
+
},
|
|
64
|
+
'configuration.$': ProductConfigurationSchema,
|
|
65
|
+
});
|
|
66
|
+
export const ProductsSchema = new SimpleSchema({
|
|
67
|
+
sequence: { type: Number, required: true },
|
|
68
|
+
slugs: Array,
|
|
69
|
+
'slugs.$': String,
|
|
70
|
+
type: {
|
|
71
|
+
type: String,
|
|
72
|
+
allowedValues: Object.values(ProductTypes),
|
|
73
|
+
required: true,
|
|
74
|
+
},
|
|
75
|
+
status: String,
|
|
76
|
+
published: Date,
|
|
77
|
+
tags: Array,
|
|
78
|
+
'tags.$': String,
|
|
79
|
+
commerce: ProductCommerceSchema,
|
|
80
|
+
warehousing: ProductWarehousingSchema,
|
|
81
|
+
supply: ProductSupplySchema,
|
|
82
|
+
proxy: ProductProxySchema,
|
|
83
|
+
plan: ProductPlanSchema,
|
|
84
|
+
bundleItems: {
|
|
85
|
+
type: Array,
|
|
86
|
+
optional: true,
|
|
87
|
+
},
|
|
88
|
+
'bundleItems.$': ProductBundleItemSchema,
|
|
89
|
+
meta: { type: Object, blackbox: true },
|
|
90
|
+
tokenization: ProductTokenizationSchema,
|
|
91
|
+
...Schemas.timestampFields,
|
|
92
|
+
}, { requiredByDefault: false });
|
|
93
|
+
export const ProductTextsSchema = new SimpleSchema({
|
|
94
|
+
productId: { type: String, required: true },
|
|
95
|
+
locale: { type: String, required: true },
|
|
96
|
+
vendor: String,
|
|
97
|
+
brand: String,
|
|
98
|
+
title: String,
|
|
99
|
+
slug: String,
|
|
100
|
+
subtitle: String,
|
|
101
|
+
description: String,
|
|
102
|
+
labels: Array,
|
|
103
|
+
'labels.$': String,
|
|
104
|
+
...Schemas.timestampFields,
|
|
105
|
+
}, { requiredByDefault: false });
|
|
106
|
+
//# sourceMappingURL=ProductsSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductsSchema.js","sourceRoot":"","sources":["../../src/db/ProductsSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,YAAY,MAAM,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,aAAa,EAAE,gBAAgB;IAC/B,mBAAmB,EAAE,sBAAsB;IAC3C,aAAa,EAA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B,WAAW,EAAE;QACX,IAAI,EAAE,KAAK;QACX,QAAQ,EAAE,IAAI;KACf;IACD,eAAe,EAAE,uBAAuB;IACxC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACtC,YAAY,EAAE,yBAAyB;IACvC,GAAG,OAAO,CAAC,eAAe;CAC3B,EACD,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,YAAY,CAChD;IACE,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC3C,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACxC,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,MAAM;IAChB,WAAW,EAAE,MAAM;IACnB,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,MAAM;IAClB,GAAG,OAAO,CAAC,eAAe;CAC3B,EACD,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAC7B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IDiscountAdapter } from '@unchainedshop/types/discount.js';
|
|
2
|
+
import { ProductDiscountConfiguration } from './ProductDiscountConfiguration.js';
|
|
3
|
+
export declare const ProductDiscountAdapter: Omit<IDiscountAdapter<ProductDiscountConfiguration>, 'key' | 'label' | 'version'>;
|
|
4
|
+
//# sourceMappingURL=ProductDiscountAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductDiscountAdapter.d.ts","sourceRoot":"","sources":["../../src/director/ProductDiscountAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,eAAO,MAAM,sBAAsB,EAAE,IAAI,CACvC,gBAAgB,CAAC,4BAA4B,CAAC,EAC9C,KAAK,GAAG,OAAO,GAAG,SAAS,CACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductDiscountAdapter.js","sourceRoot":"","sources":["../../src/director/ProductDiscountAdapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAG3D,MAAM,CAAC,MAAM,sBAAsB,GAG/B,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Product, ProductConfiguration } from '@unchainedshop/types/products.js';
|
|
2
|
+
type ResolvedConfiguration = {
|
|
3
|
+
fixedRate?: number;
|
|
4
|
+
rate?: number;
|
|
5
|
+
isNetPrice?: boolean;
|
|
6
|
+
taxRate?: number;
|
|
7
|
+
} & Record<string, any>;
|
|
8
|
+
export type PriceConfigurationResolver = (product: Product, quantity: number, configuration: Array<ProductConfiguration>) => ResolvedConfiguration | null;
|
|
9
|
+
export interface ProductDiscountConfiguration extends ResolvedConfiguration {
|
|
10
|
+
customPriceConfigurationResolver?: PriceConfigurationResolver;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=ProductDiscountConfiguration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductDiscountConfiguration.d.ts","sourceRoot":"","sources":["../../src/director/ProductDiscountConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAEjF,KAAK,qBAAqB,GAAG;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAExB,MAAM,MAAM,0BAA0B,GAAG,CACvC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,KAAK,CAAC,oBAAoB,CAAC,KACvC,qBAAqB,GAAG,IAAI,CAAC;AAElC,MAAM,WAAW,4BAA6B,SAAQ,qBAAqB;IACzE,gCAAgC,CAAC,EAAE,0BAA0B,CAAC;CAC/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductDiscountConfiguration.js","sourceRoot":"","sources":["../../src/director/ProductDiscountConfiguration.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ProductDiscountConfiguration } from './ProductDiscountConfiguration.js';
|
|
2
|
+
export declare const ProductDiscountDirector: import("@unchainedshop/types/discount.js").IDiscountDirector<ProductDiscountConfiguration>;
|
|
3
|
+
//# sourceMappingURL=ProductDiscountDirector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductDiscountDirector.d.ts","sourceRoot":"","sources":["../../src/director/ProductDiscountDirector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,eAAO,MAAM,uBAAuB,4FAC2C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductDiscountDirector.js","sourceRoot":"","sources":["../../src/director/ProductDiscountDirector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG5D,MAAM,CAAC,MAAM,uBAAuB,GAClC,oBAAoB,CAA+B,yBAAyB,CAAC,CAAC"}
|