rerobe-js-orm 3.0.13 → 3.0.14

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.
@@ -19,6 +19,7 @@ class ProductCollectionFromFormState extends ProductCollectionFactory_1.default
19
19
  description: fs.fields.description.inputValue || '',
20
20
  type: fs.fields.type.selectedValue || '',
21
21
  imgUrl: fs.fields.imgUrl.inputValue || '',
22
+ imageUrls: fs.fields.imageUrls.selectedValues || [],
22
23
  refinements: fs.fields.refinements.selectedValue || {},
23
24
  tags: fs.fields.tags.selectedValues || [],
24
25
  collectionId,
@@ -16,6 +16,7 @@ class ProductCollectionFormState extends FormState_1.default {
16
16
  this.fields.description = this.fieldFactory('textInput', 'description');
17
17
  this.fields.type = this.fieldFactory('singleSelect', 'type');
18
18
  this.fields.imgUrl = this.fieldFactory('textInput', 'imgUrl');
19
+ this.fields.imageUrls = this.fieldFactory('multiSelect', 'imageUrls', []);
19
20
  this.fields.refinements = this.fieldFactory('singleSelect', 'refinements');
20
21
  this.fields.tags = this.fieldFactory('multiSelect', 'tags', []);
21
22
  this.fields.collectionId = this.fieldFactory('textInput', 'collectionId');
@@ -65,6 +66,14 @@ class ProductCollectionFormState extends FormState_1.default {
65
66
  }
66
67
  valid = true;
67
68
  }
69
+ if (fieldKey === 'imageUrls') {
70
+ if (this.props.imageUrls) {
71
+ if (Array.isArray(this.props.imageUrls)) {
72
+ selectedValues = this.props.imageUrls;
73
+ }
74
+ }
75
+ valid = true;
76
+ }
68
77
  return {
69
78
  options,
70
79
  selectedValues,
@@ -326,6 +326,12 @@ class Order extends Base_1.default {
326
326
  type: 'string',
327
327
  optional: true,
328
328
  },
329
+ {
330
+ facet: true,
331
+ name: 'createdAtYear',
332
+ type: 'string',
333
+ optional: true,
334
+ },
329
335
  ],
330
336
  name: 'dev_orders_20220809',
331
337
  };
@@ -763,6 +763,12 @@ class Product extends Base_1.default {
763
763
  type: 'string',
764
764
  optional: true,
765
765
  },
766
+ {
767
+ facet: true,
768
+ name: 'createdAtYear',
769
+ type: 'string',
770
+ optional: true,
771
+ },
766
772
  ],
767
773
  name,
768
774
  };
@@ -9,6 +9,7 @@ export default class ProductCollection extends Base {
9
9
  description: string;
10
10
  type: CollectionType;
11
11
  imgUrl: string;
12
+ imageUrls: string[];
12
13
  refinements: ProductRefinements;
13
14
  tags: string[];
14
15
  collectionId: string;
@@ -16,6 +16,7 @@ class ProductCollection extends Base_1.default {
16
16
  this.refinements = (props === null || props === void 0 ? void 0 : props.refinements) || {};
17
17
  this.tags = (props === null || props === void 0 ? void 0 : props.tags) || [];
18
18
  this.collectionId = (props === null || props === void 0 ? void 0 : props.collectionId) || '';
19
+ this.imageUrls = (props === null || props === void 0 ? void 0 : props.imageUrls) || [];
19
20
  }
20
21
  toObj() {
21
22
  const productCollectionObj = {
@@ -31,6 +32,7 @@ class ProductCollection extends Base_1.default {
31
32
  refinements: this.refinements,
32
33
  tags: this.tags,
33
34
  collectionId: this.collectionId,
35
+ imageUrls: this.imageUrls,
34
36
  };
35
37
  return productCollectionObj;
36
38
  }
@@ -79,10 +81,16 @@ class ProductCollection extends Base_1.default {
79
81
  type: 'string',
80
82
  },
81
83
  {
84
+ // deprecate soon, will be migrated into imageUrls
82
85
  facet: false,
83
86
  name: 'imgUrl',
84
87
  type: 'string',
85
88
  },
89
+ {
90
+ facet: false,
91
+ name: 'imageUrls',
92
+ type: 'string[]',
93
+ },
86
94
  {
87
95
  facet: true,
88
96
  optional: true,
@@ -208,6 +216,7 @@ class ProductCollection extends Base_1.default {
208
216
  'refinements.statusRefinement': this.utilities.sanitzeStringArr(this.refinements.statusRefinement),
209
217
  'refinements.salesChannelRefinement': this.utilities.sanitzeStringArr(this.refinements.salesChannelRefinement),
210
218
  tags: this.utilities.sanitzeStringArr(this.tags),
219
+ imageUrls: this.utilities.sanitzeStringArr(this.imageUrls),
211
220
  collectionId: this.utilities.sanitizeString(this.collectionId),
212
221
  };
213
222
  return stagedObj;
@@ -313,6 +313,12 @@ class User extends Base_1.default {
313
313
  type: 'string',
314
314
  optional: true,
315
315
  },
316
+ {
317
+ facet: true,
318
+ name: 'createdAtYear',
319
+ type: 'string',
320
+ optional: true,
321
+ },
316
322
  ],
317
323
  name: 'prod_customers_20220907',
318
324
  };
@@ -48,6 +48,7 @@ declare type ProductCollectionType = {
48
48
  refinements: ProductRefinements;
49
49
  tags: string[];
50
50
  collectionId: string;
51
+ imageUrls: string[];
51
52
  };
52
53
  declare type CompleteProductCollection = ProductCollectionType & {
53
54
  [key: string]: any;
@@ -61,6 +62,7 @@ declare type ProductCollectionFormFields = {
61
62
  imgUrl: TextInputFormField<string>;
62
63
  refinements: SingleSelectFormField<ProductRefinements>;
63
64
  tags: MultiSelectFormField<string>;
65
+ imageUrls: MultiSelectFormField<string>;
64
66
  collectionId: TextInputFormField<string>;
65
67
  };
66
68
  declare type TypesenseProductCollectionObj = {
@@ -89,5 +91,6 @@ declare type TypesenseProductCollectionObj = {
89
91
  'refinements.statusRefinement': string[];
90
92
  'refinements.salesChannelRefinement': string[];
91
93
  tags: string[];
94
+ imageUrls: string[];
92
95
  collectionId: string;
93
96
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "3.0.13",
3
+ "version": "3.0.14",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",