rerobe-js-orm 2.6.4 → 2.6.5
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.
|
@@ -5,6 +5,7 @@ class ProductCollection extends Base_1.default {
|
|
|
5
5
|
constructor(props) {
|
|
6
6
|
super();
|
|
7
7
|
this.documentId = (props === null || props === void 0 ? void 0 : props.documentId) || this.utilities.makeRandId(28);
|
|
8
|
+
this.merchantId = (props === null || props === void 0 ? void 0 : props.merchantId) || '';
|
|
8
9
|
this.createdAtTimestamp = (props === null || props === void 0 ? void 0 : props.createdAtTimestamp) || 0;
|
|
9
10
|
this.preTitle = (props === null || props === void 0 ? void 0 : props.preTitle) || '';
|
|
10
11
|
this.title = (props === null || props === void 0 ? void 0 : props.title) || '';
|
|
@@ -19,6 +20,7 @@ class ProductCollection extends Base_1.default {
|
|
|
19
20
|
toObj() {
|
|
20
21
|
const productCollectionObj = {
|
|
21
22
|
documentId: this.documentId,
|
|
23
|
+
merchantId: this.merchantId,
|
|
22
24
|
createdAtTimestamp: this.createdAtTimestamp,
|
|
23
25
|
preTitle: this.preTitle,
|
|
24
26
|
title: this.title,
|
|
@@ -41,6 +43,11 @@ class ProductCollection extends Base_1.default {
|
|
|
41
43
|
name: 'documentId',
|
|
42
44
|
type: 'string',
|
|
43
45
|
},
|
|
46
|
+
{
|
|
47
|
+
facet: true,
|
|
48
|
+
name: 'merchantId',
|
|
49
|
+
type: 'string',
|
|
50
|
+
},
|
|
44
51
|
{
|
|
45
52
|
facet: true,
|
|
46
53
|
name: 'createdAtTimestamp',
|
|
@@ -172,6 +179,7 @@ class ProductCollection extends Base_1.default {
|
|
|
172
179
|
toObjForTypesense() {
|
|
173
180
|
const stagedObj = {
|
|
174
181
|
documentId: this.utilities.sanitizeString(this.documentId),
|
|
182
|
+
merchantId: this.utilities.sanitizeString(this.merchantId),
|
|
175
183
|
createdAtTimestamp: this.utilities.sanitizeMillisTimeStamp(this.createdAtTimestamp),
|
|
176
184
|
preTitle: this.utilities.sanitizeString(this.preTitle),
|
|
177
185
|
title: this.utilities.sanitizeString(this.title),
|
|
@@ -38,6 +38,7 @@ declare type ProductCollectionType = {
|
|
|
38
38
|
createdAtTimestamp?: number;
|
|
39
39
|
updatedAt?: string;
|
|
40
40
|
documentId?: string;
|
|
41
|
+
merchantId?: string;
|
|
41
42
|
preTitle: string;
|
|
42
43
|
title: string;
|
|
43
44
|
subTitle: string;
|
|
@@ -64,6 +65,7 @@ declare type ProductCollectionFormFields = {
|
|
|
64
65
|
};
|
|
65
66
|
declare type TypesenseProductCollectionObj = {
|
|
66
67
|
documentId: string;
|
|
68
|
+
merchantId: string;
|
|
67
69
|
createdAtTimestamp: number;
|
|
68
70
|
preTitle: string;
|
|
69
71
|
title: string;
|