vinmonopolet-ts 2.1.0 → 2.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  #Changelog
2
2
 
3
+ ## [2.1.1]
4
+
5
+ ### Changed
6
+
7
+ - Made UpcomingProduct a FacetValue object
8
+
3
9
  ## [2.1.0]
4
10
 
5
11
  #### Added
@@ -118,5 +118,8 @@ class Facet {
118
118
  }
119
119
  }
120
120
  Facet.Category = (0, exports.FacetCategoryMapping)();
121
- Facet.UpcomingProduct = "upcomingProduct:true";
121
+ Facet.UpcomingProduct = new FacetValue_1.default({
122
+ name: "Upcoming product",
123
+ query: { query: { value: "upcomingProduct:true" } },
124
+ });
122
125
  exports.default = Facet;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const index_1 = require("./index");
4
+ (0, index_1.getProducts)({ facets: [index_1.Facet.Category.BEER, index_1.Facet.UpcomingProduct] }).then((res) => {
5
+ console.log(res);
6
+ });
@@ -93,6 +93,9 @@ class Facet {
93
93
  this.values = facet.values.map((val) => new FacetValue(val, valueFilter));
94
94
  }
95
95
  static Category = FacetCategoryMapping();
96
- static UpcomingProduct = "upcomingProduct:true";
96
+ static UpcomingProduct = new FacetValue({
97
+ name: "Upcoming product",
98
+ query: { query: { value: "upcomingProduct:true" } },
99
+ });
97
100
  }
98
101
  export default Facet;
@@ -0,0 +1,4 @@
1
+ import { Facet, getProducts } from "./index";
2
+ getProducts({ facets: [Facet.Category.BEER, Facet.UpcomingProduct] }).then((res) => {
3
+ console.log(res);
4
+ });
@@ -13,6 +13,6 @@ declare class Facet {
13
13
  values: FacetValue[];
14
14
  constructor(facet: any);
15
15
  static Category: FacetCategory;
16
- static UpcomingProduct: string;
16
+ static UpcomingProduct: FacetValue;
17
17
  }
18
18
  export default Facet;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vinmonopolet-ts",
3
3
  "description": "Extracts information on products, categories and stores from Vinmonopolet",
4
- "version": "2.1.0",
4
+ "version": "2.1.1",
5
5
  "keywords": [
6
6
  "vinmonopolet",
7
7
  "beer",