rerobe-js-orm 3.0.23 → 3.0.25
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.
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export namespace MERCHANT_TYPES {
|
|
2
|
+
const individual: string;
|
|
3
|
+
const business: string;
|
|
4
|
+
const enterprise: string;
|
|
5
|
+
}
|
|
6
|
+
export namespace PAYMENT_TIERS {
|
|
7
|
+
const free: string;
|
|
8
|
+
const one: string;
|
|
9
|
+
}
|
|
10
|
+
export namespace INDUSTRY_TYPES {
|
|
11
|
+
const beauty: string;
|
|
12
|
+
const clothing: string;
|
|
13
|
+
const electronics: string;
|
|
14
|
+
const furniture: string;
|
|
15
|
+
const handcrafts: string;
|
|
16
|
+
const jewelry: string;
|
|
17
|
+
const sports: string;
|
|
18
|
+
const toys: string;
|
|
19
|
+
const other: string;
|
|
20
|
+
}
|
|
21
|
+
export namespace UNIT_SYSTEM_TYPES {
|
|
22
|
+
const metric: string;
|
|
23
|
+
const imperial: string;
|
|
24
|
+
}
|
|
25
|
+
export namespace METRIC_WEIGHT_TYPES {
|
|
26
|
+
const kilogram: string;
|
|
27
|
+
const gram: string;
|
|
28
|
+
}
|
|
29
|
+
export namespace IMPERIAL_WEIGHT_TYPES {
|
|
30
|
+
const pound: string;
|
|
31
|
+
const once: string;
|
|
32
|
+
}
|
|
33
|
+
export namespace RIBBN_WEBHOOK_EVENT_DICT {
|
|
34
|
+
const productCreate: string;
|
|
35
|
+
const productUpdate: string;
|
|
36
|
+
const productDelete: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RIBBN_WEBHOOK_EVENT_DICT = exports.IMPERIAL_WEIGHT_TYPES = exports.METRIC_WEIGHT_TYPES = exports.UNIT_SYSTEM_TYPES = exports.INDUSTRY_TYPES = exports.PAYMENT_TIERS = exports.MERCHANT_TYPES = void 0;
|
|
4
|
+
exports.MERCHANT_TYPES = {
|
|
5
|
+
individual: 'INDIVIDUAL',
|
|
6
|
+
business: 'BUSINESS',
|
|
7
|
+
enterprise: 'ENTERPRISE',
|
|
8
|
+
};
|
|
9
|
+
exports.PAYMENT_TIERS = {
|
|
10
|
+
free: 'FREE',
|
|
11
|
+
one: 'TIER_ONE',
|
|
12
|
+
};
|
|
13
|
+
exports.INDUSTRY_TYPES = {
|
|
14
|
+
beauty: 'BEAUTY',
|
|
15
|
+
clothing: 'CLOTHING',
|
|
16
|
+
electronics: 'ELECTRONICS',
|
|
17
|
+
furniture: 'FURNITURE',
|
|
18
|
+
handcrafts: 'HANDCRAFTS',
|
|
19
|
+
jewelry: 'JEWELRY',
|
|
20
|
+
sports: 'SPORTS',
|
|
21
|
+
toys: 'TOYS',
|
|
22
|
+
other: 'OTHER',
|
|
23
|
+
};
|
|
24
|
+
exports.UNIT_SYSTEM_TYPES = {
|
|
25
|
+
metric: 'METRIC',
|
|
26
|
+
imperial: 'IMPERIAL',
|
|
27
|
+
};
|
|
28
|
+
exports.METRIC_WEIGHT_TYPES = {
|
|
29
|
+
kilogram: 'KILOGRAM',
|
|
30
|
+
gram: 'GRAM',
|
|
31
|
+
};
|
|
32
|
+
exports.IMPERIAL_WEIGHT_TYPES = {
|
|
33
|
+
pound: 'POUND',
|
|
34
|
+
once: 'ONCE',
|
|
35
|
+
};
|
|
36
|
+
exports.RIBBN_WEBHOOK_EVENT_DICT = {
|
|
37
|
+
productCreate: 'PRODUCT_CREATE',
|
|
38
|
+
productUpdate: 'PRODUCT_UPDATE',
|
|
39
|
+
productDelete: 'PRODUCT_DELETE',
|
|
40
|
+
// TODO: Add webhook events for other models (Orders, User, etc)
|
|
41
|
+
};
|
package/lib/models/Merchant.d.ts
CHANGED
package/lib/models/Merchant.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const Base_1 = require("../Base");
|
|
4
|
+
const merchant_constants_1 = require("../constants/merchant-constants");
|
|
4
5
|
class Merchant extends Base_1.default {
|
|
5
6
|
constructor(props) {
|
|
6
7
|
super();
|
|
@@ -98,40 +99,10 @@ class Merchant extends Base_1.default {
|
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
exports.default = Merchant;
|
|
101
|
-
Merchant.MERCHANT_TYPES =
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
Merchant.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
};
|
|
109
|
-
Merchant.INDUSTRY_TYPES = {
|
|
110
|
-
beauty: 'BEAUTY',
|
|
111
|
-
clothing: 'CLOTHING',
|
|
112
|
-
electronics: 'ELECTRONICS',
|
|
113
|
-
furniture: 'FURNITURE',
|
|
114
|
-
handcrafts: 'HANDCRAFTS',
|
|
115
|
-
jewelry: 'JEWELRY',
|
|
116
|
-
sports: 'SPORTS',
|
|
117
|
-
toys: 'TOYS',
|
|
118
|
-
other: 'OTHER',
|
|
119
|
-
};
|
|
120
|
-
Merchant.UNIT_SYSTEM_TYPES = {
|
|
121
|
-
metric: 'METRIC',
|
|
122
|
-
imperial: 'IMPERIAL',
|
|
123
|
-
};
|
|
124
|
-
Merchant.METRIC_WEIGHT_TYPES = {
|
|
125
|
-
kilogram: 'KILOGRAM',
|
|
126
|
-
gram: 'GRAM',
|
|
127
|
-
};
|
|
128
|
-
Merchant.IMPERIAL_WEIGHT_TYPES = {
|
|
129
|
-
pound: 'POUND',
|
|
130
|
-
once: 'ONCE',
|
|
131
|
-
};
|
|
132
|
-
Merchant.RIBBN_WEBHOOK_EVENT_DICT = {
|
|
133
|
-
productCreate: 'PRODUCT_CREATE',
|
|
134
|
-
productUpdate: 'PRODUCT_UPDATE',
|
|
135
|
-
productDelete: 'PRODUCT_DELETE',
|
|
136
|
-
// TODO: Add webhook events for other models (Orders, User, etc)
|
|
137
|
-
};
|
|
102
|
+
Merchant.MERCHANT_TYPES = merchant_constants_1.MERCHANT_TYPES;
|
|
103
|
+
Merchant.PAYMENT_TIERS = merchant_constants_1.PAYMENT_TIERS;
|
|
104
|
+
Merchant.INDUSTRY_TYPES = merchant_constants_1.INDUSTRY_TYPES;
|
|
105
|
+
Merchant.UNIT_SYSTEM_TYPES = merchant_constants_1.UNIT_SYSTEM_TYPES;
|
|
106
|
+
Merchant.METRIC_WEIGHT_TYPES = merchant_constants_1.METRIC_WEIGHT_TYPES;
|
|
107
|
+
Merchant.IMPERIAL_WEIGHT_TYPES = merchant_constants_1.IMPERIAL_WEIGHT_TYPES;
|
|
108
|
+
Merchant.RIBBN_WEBHOOK_EVENT_DICT = merchant_constants_1.RIBBN_WEBHOOK_EVENT_DICT;
|
package/lib/models/Product.js
CHANGED
|
@@ -72,7 +72,7 @@ class Product extends Base_1.default {
|
|
|
72
72
|
purchasePrice: (props === null || props === void 0 ? void 0 : props.purchasePrice) || '',
|
|
73
73
|
yearPurchased: (props === null || props === void 0 ? void 0 : props.yearPurchased) || '',
|
|
74
74
|
salesChannel: (props === null || props === void 0 ? void 0 : props.salesChannel) || [],
|
|
75
|
-
sizeComment: (props === null || props === void 0 ? void 0 : props.sizeComment) || '
|
|
75
|
+
sizeComment: (props === null || props === void 0 ? void 0 : props.sizeComment) || '',
|
|
76
76
|
salePrice: (props === null || props === void 0 ? void 0 : props.salePrice) || '',
|
|
77
77
|
isOnSale: (props === null || props === void 0 ? void 0 : props.isOnSale) || '',
|
|
78
78
|
discountType: (props === null || props === void 0 ? void 0 : props.discountType) || '',
|
|
@@ -432,6 +432,7 @@ class Product extends Base_1.default {
|
|
|
432
432
|
return this.utilities.capitalizeString(result).trim();
|
|
433
433
|
}
|
|
434
434
|
autoCreateDescriptionHTML() {
|
|
435
|
+
var _a;
|
|
435
436
|
const customHeading = false; // ToDo: Add as an attribute;
|
|
436
437
|
const color = this.filterAttributes.color;
|
|
437
438
|
const productStyle = this.filterAttributes.productStyle.join(', ');
|
|
@@ -442,7 +443,7 @@ class Product extends Base_1.default {
|
|
|
442
443
|
const materials = this.materialCompJoinedString();
|
|
443
444
|
const sizeComment = this.consignmentAttributes.sizeComment;
|
|
444
445
|
const measurements = this.measurementsJoinedString(this.filterAttributes.measurements);
|
|
445
|
-
const fit = options_1.sizeCommentOptions.filter((option) => option.value === sizeComment)[0].label;
|
|
446
|
+
const fit = ((_a = options_1.sizeCommentOptions.filter((option) => option.value === sizeComment)[0]) === null || _a === void 0 ? void 0 : _a.label) || '';
|
|
446
447
|
const descriptionObj = {
|
|
447
448
|
title: customHeading ? `<p>${customHeading}</p>\n` : 'REMOVE_ME',
|
|
448
449
|
line1: `<ul>\n`,
|