@constructor-io/constructorio-node 4.6.3 → 4.6.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructor-io/constructorio-node",
3
- "version": "4.6.3",
3
+ "version": "4.6.4",
4
4
  "description": "Constructor.io Node.js client",
5
5
  "main": "src/constructorio.js",
6
6
  "types": "src/types/constructorio.d.ts",
@@ -898,12 +898,12 @@ class Catalog {
898
898
  * constructorio.catalog.addItemGroups({
899
899
  * itemGroups: [
900
900
  * {
901
- * id: 'subcat_12891',
901
+ * id: 'cat_49203',
902
902
  * name: 'Hoodies & Sweaters',
903
- * parentId: 'cat_49203',
903
+ * children: [{ id: 'subcat_12891', name: 'Blazers'}],
904
904
  * },
905
905
  * {
906
- * id: 'cat49203',
906
+ * id: 'cat49204',
907
907
  * name: 'Outerwear',
908
908
  * },
909
909
  * ],
@@ -1048,12 +1048,12 @@ class Catalog {
1048
1048
  * constructorio.catalog.addOrUpdateItemGroups({
1049
1049
  * itemGroups: [
1050
1050
  * {
1051
- * id: 'subcat_12891',
1052
- * name: 'Hoodies, Sweaters, & Jackets',
1053
- * parentId: 'cat_49203',
1051
+ * id: 'cat_49203',
1052
+ * name: 'Hoodies & Sweaters',
1053
+ * children: [{ id: 'subcat_12891', name: 'Blazers'}],
1054
1054
  * },
1055
1055
  * {
1056
- * id: 'cat49203',
1056
+ * id: 'cat49204',
1057
1057
  * name: 'Outerwear',
1058
1058
  * },
1059
1059
  * ],
@@ -17,7 +17,7 @@ export interface ConstructorClientOptions {
17
17
  securityToken?: string;
18
18
  version?: string;
19
19
  serviceUrl?: string;
20
- fetch?: () => any;
20
+ fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
21
21
  networkParameters?: NetworkParameters;
22
22
  }
23
23
 
@@ -149,7 +149,7 @@ export interface ItemData extends Record<string, any> {
149
149
  keywords?: string[];
150
150
  url?: string;
151
151
  image_url?: string;
152
- facets?: Record<string, any>;
152
+ facets?: Record<string, string[] | number[]>;
153
153
  group_ids?: string[];
154
154
  description?: string;
155
155
  active?: boolean;
@@ -17,6 +17,7 @@ export default Search;
17
17
 
18
18
  export interface SearchParameters {
19
19
  page?: number;
20
+ offset?: number;
20
21
  resultsPerPage?: number;
21
22
  filters?: Record<string, any>;
22
23
  sortBy?: string;