store-scrapper-js-common 2.0.2 → 2.0.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/dist/classes/command.js +5 -8
- package/dist/classes/command.js.map +1 -1
- package/dist/classes/response.js +2 -3
- package/dist/classes/response.js.map +1 -1
- package/dist/dto/process-product-category.dto.d.ts +6 -5
- package/dist/dto/process-product-category.dto.js.map +1 -1
- package/dist/dto/telegram-queue-command.dto.d.ts +2 -0
- package/dist/dto/telegram-queue-command.dto.js.map +1 -1
- package/dist/entities/abstract-base.d.ts +2 -2
- package/dist/entities/abstract-base.js +4 -4
- package/dist/entities/abstract-base.js.map +1 -1
- package/dist/entities/alert-conditions.js +12 -12
- package/dist/entities/alert-conditions.js.map +1 -1
- package/dist/entities/category-entity.js +7 -7
- package/dist/entities/category-entity.js.map +1 -1
- package/dist/entities/category.js +1 -1
- package/dist/entities/category.js.map +1 -1
- package/dist/entities/keyword.js +16 -16
- package/dist/entities/keyword.js.map +1 -1
- package/dist/entities/price.js +23 -23
- package/dist/entities/price.js.map +1 -1
- package/dist/entities/prices-stats.js +32 -32
- package/dist/entities/prices-stats.js.map +1 -1
- package/dist/entities/product.js +63 -63
- package/dist/entities/product.js.map +1 -1
- package/dist/entities/store.js +22 -22
- package/dist/entities/store.js.map +1 -1
- package/dist/entities/user.js +15 -15
- package/dist/entities/user.js.map +1 -1
- package/dist/enums/telegram-queue.enum.d.ts +62 -0
- package/dist/enums/telegram-queue.enum.js +62 -0
- package/dist/enums/telegram-queue.enum.js.map +1 -1
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/dist/utils/array-utils.js +6 -10
- package/dist/utils/array-utils.js.map +1 -1
- package/dist/utils/entity-queries-utils.js +1 -2
- package/dist/utils/entity-queries-utils.js.map +1 -1
- package/dist/utils/number-utils.js +8 -13
- package/dist/utils/number-utils.js.map +1 -1
- package/dist/utils/price-utils.js +19 -29
- package/dist/utils/price-utils.js.map +1 -1
- package/dist/utils/product.utils.js +2 -4
- package/dist/utils/product.utils.js.map +1 -1
- package/dist/utils/string-formatter.js +7 -15
- package/dist/utils/string-formatter.js.map +1 -1
- package/dist/utils/string-utils.js +14 -22
- package/dist/utils/string-utils.js.map +1 -1
- package/dist/utils/url-utils.js +4 -8
- package/dist/utils/url-utils.js.map +1 -1
- package/package.json +2 -2
- package/src/dto/process-product-category.dto.ts +7 -5
- package/src/dto/telegram-queue-command.dto.ts +4 -0
- package/src/entities/abstract-base.ts +2 -2
- package/src/enums/telegram-queue.enum.ts +65 -0
|
@@ -16,86 +16,86 @@ const abstract_base_1 = require("./abstract-base");
|
|
|
16
16
|
let PricesStats = class PricesStats extends abstract_base_1.AbstractBase {
|
|
17
17
|
};
|
|
18
18
|
__decorate([
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
typeorm_1.Column(),
|
|
20
|
+
class_validator_1.IsNumber(),
|
|
21
21
|
__metadata("design:type", Number)
|
|
22
22
|
], PricesStats.prototype, "minPriceSum", void 0);
|
|
23
23
|
__decorate([
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
typeorm_1.Column(),
|
|
25
|
+
class_validator_1.IsNumber(),
|
|
26
26
|
__metadata("design:type", Number)
|
|
27
27
|
], PricesStats.prototype, "maxPriceSum", void 0);
|
|
28
28
|
__decorate([
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
typeorm_1.Column(),
|
|
30
|
+
class_validator_1.IsNumber(),
|
|
31
31
|
__metadata("design:type", Number)
|
|
32
32
|
], PricesStats.prototype, "avgPriceSum", void 0);
|
|
33
33
|
__decorate([
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
typeorm_1.Column(),
|
|
35
|
+
class_validator_1.IsNumber(),
|
|
36
36
|
__metadata("design:type", Number)
|
|
37
37
|
], PricesStats.prototype, "pricesCount", void 0);
|
|
38
38
|
__decorate([
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
typeorm_1.Column(),
|
|
40
|
+
class_validator_1.IsNumber(),
|
|
41
41
|
__metadata("design:type", Number)
|
|
42
42
|
], PricesStats.prototype, "avgMinPrice", void 0);
|
|
43
43
|
__decorate([
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
typeorm_1.Column(),
|
|
45
|
+
class_validator_1.IsNumber(),
|
|
46
46
|
__metadata("design:type", Number)
|
|
47
47
|
], PricesStats.prototype, "avgAvgPrice", void 0);
|
|
48
48
|
__decorate([
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
typeorm_1.Column(),
|
|
50
|
+
class_validator_1.IsNumber(),
|
|
51
51
|
__metadata("design:type", Number)
|
|
52
52
|
], PricesStats.prototype, "avgMaxPrice", void 0);
|
|
53
53
|
__decorate([
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
typeorm_1.Column(),
|
|
55
|
+
class_validator_1.IsNumber(),
|
|
56
56
|
__metadata("design:type", Number)
|
|
57
57
|
], PricesStats.prototype, "currentMinPrice", void 0);
|
|
58
58
|
__decorate([
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
typeorm_1.Column(),
|
|
60
|
+
class_validator_1.IsNumber(),
|
|
61
61
|
__metadata("design:type", Number)
|
|
62
62
|
], PricesStats.prototype, "currentMaxPrice", void 0);
|
|
63
63
|
__decorate([
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
typeorm_1.Column(),
|
|
65
|
+
class_validator_1.IsNumber(),
|
|
66
66
|
__metadata("design:type", Number)
|
|
67
67
|
], PricesStats.prototype, "conditionalPriceMinPriceDiffPct", void 0);
|
|
68
68
|
__decorate([
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
typeorm_1.Column(),
|
|
70
|
+
class_validator_1.IsNumber(),
|
|
71
71
|
__metadata("design:type", Number)
|
|
72
72
|
], PricesStats.prototype, "currentPriceAvgMinPriceDiffPct", void 0);
|
|
73
73
|
__decorate([
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
typeorm_1.Column(),
|
|
75
|
+
class_validator_1.IsNumber(),
|
|
76
76
|
__metadata("design:type", Number)
|
|
77
77
|
], PricesStats.prototype, "currentPriceBestPriceDiffPct", void 0);
|
|
78
78
|
__decorate([
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
typeorm_1.Column(),
|
|
80
|
+
class_validator_1.IsNumber(),
|
|
81
81
|
__metadata("design:type", Number)
|
|
82
82
|
], PricesStats.prototype, "currentPricePrevPriceDiffPct", void 0);
|
|
83
83
|
__decorate([
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
typeorm_1.Column(),
|
|
85
|
+
class_validator_1.IsNumber(),
|
|
86
86
|
__metadata("design:type", Number)
|
|
87
87
|
], PricesStats.prototype, "currentMinPriceMaxPriceDiffPct", void 0);
|
|
88
88
|
__decorate([
|
|
89
|
-
|
|
89
|
+
typeorm_1.Column(),
|
|
90
90
|
__metadata("design:type", Array)
|
|
91
91
|
], PricesStats.prototype, "pivotPrices", void 0);
|
|
92
92
|
__decorate([
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
typeorm_1.Column(),
|
|
94
|
+
class_validator_1.IsNumber(),
|
|
95
95
|
__metadata("design:type", Number)
|
|
96
96
|
], PricesStats.prototype, "bollingerBands", void 0);
|
|
97
97
|
PricesStats = __decorate([
|
|
98
|
-
|
|
98
|
+
typeorm_1.Entity({ name: 'pricesStats' })
|
|
99
99
|
], PricesStats);
|
|
100
100
|
exports.PricesStats = PricesStats;
|
|
101
101
|
//# sourceMappingURL=prices-stats.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prices-stats.js","sourceRoot":"/","sources":["entities/prices-stats.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAEiB;AACjB,qDAA2C;AAC3C,mDAA+C;AAG/C,IAAa,WAAW,GAAxB,MAAa,WAAY,SAAQ,4BAAY;CA+D5C,CAAA;AA5DG;IAFC,
|
|
1
|
+
{"version":3,"file":"prices-stats.js","sourceRoot":"/","sources":["entities/prices-stats.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAEiB;AACjB,qDAA2C;AAC3C,mDAA+C;AAG/C,IAAa,WAAW,GAAxB,MAAa,WAAY,SAAQ,4BAAY;CA+D5C,CAAA;AA5DG;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;gDACS;AAIpB;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;gDACS;AAIpB;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;gDACS;AAIpB;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;gDACS;AAIpB;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;gDACS;AAIpB;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;gDACS;AAIpB;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;gDACS;AAIpB;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;oDACa;AAIxB;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;oDACa;AAIxB;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;oEAC8B;AAIzC;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;mEAC4B;AAIvC;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;iEAC0B;AAIrC;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;iEAC0B;AAIrC;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;mEAC4B;AAGvC;IADC,gBAAM,EAAE;;gDACc;AAIvB;IAFC,gBAAM,EAAE;IACR,0BAAQ,EAAE;;mDACa;AA9Df,WAAW;IADvB,gBAAM,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;GACnB,WAAW,CA+DvB;AA/DY,kCAAW","sourcesContent":["import {\n Column, Entity,\n} from 'typeorm';\nimport { IsNumber } from 'class-validator';\nimport { AbstractBase } from './abstract-base';\n\n@Entity({ name: 'pricesStats' })\nexport class PricesStats extends AbstractBase {\n @Column()\n @IsNumber()\n minPriceSum: number;\n\n @Column()\n @IsNumber()\n maxPriceSum: number;\n\n @Column()\n @IsNumber()\n avgPriceSum: number;\n\n @Column()\n @IsNumber()\n pricesCount: number;\n\n @Column()\n @IsNumber()\n avgMinPrice: number;\n\n @Column()\n @IsNumber()\n avgAvgPrice: number;\n\n @Column()\n @IsNumber()\n avgMaxPrice: number;\n\n @Column()\n @IsNumber()\n currentMinPrice: number;\n\n @Column()\n @IsNumber()\n currentMaxPrice: number;\n\n @Column()\n @IsNumber()\n conditionalPriceMinPriceDiffPct?: number;\n\n @Column()\n @IsNumber()\n currentPriceAvgMinPriceDiffPct: number;\n\n @Column()\n @IsNumber()\n currentPriceBestPriceDiffPct: number;\n\n @Column()\n @IsNumber()\n currentPricePrevPriceDiffPct: number;\n\n @Column()\n @IsNumber()\n currentMinPriceMaxPriceDiffPct: number;\n\n @Column()\n pivotPrices?: number[];\n\n @Column()\n @IsNumber()\n bollingerBands?: number;\n}\n"]}
|
package/dist/entities/product.js
CHANGED
|
@@ -60,225 +60,225 @@ var UpdateReasonEnum;
|
|
|
60
60
|
let Product = class Product extends abstract_base_1.AbstractBase {
|
|
61
61
|
};
|
|
62
62
|
__decorate([
|
|
63
|
-
|
|
63
|
+
typeorm_1.Column(),
|
|
64
64
|
__metadata("design:type", String)
|
|
65
65
|
], Product.prototype, "name", void 0);
|
|
66
66
|
__decorate([
|
|
67
|
-
|
|
67
|
+
typeorm_1.Column(),
|
|
68
68
|
__metadata("design:type", String)
|
|
69
69
|
], Product.prototype, "brandName", void 0);
|
|
70
70
|
__decorate([
|
|
71
|
-
|
|
71
|
+
typeorm_1.Column(),
|
|
72
72
|
__metadata("design:type", String)
|
|
73
73
|
], Product.prototype, "normalizedBrandName", void 0);
|
|
74
74
|
__decorate([
|
|
75
|
-
|
|
75
|
+
typeorm_1.Column(),
|
|
76
76
|
__metadata("design:type", String)
|
|
77
77
|
], Product.prototype, "modelName", void 0);
|
|
78
78
|
__decorate([
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
typeorm_1.Column(),
|
|
80
|
+
class_validator_1.IsNotEmpty(),
|
|
81
|
+
typeorm_1.Index(),
|
|
82
82
|
__metadata("design:type", String)
|
|
83
83
|
], Product.prototype, "sku", void 0);
|
|
84
84
|
__decorate([
|
|
85
|
-
|
|
85
|
+
typeorm_1.Column(),
|
|
86
86
|
__metadata("design:type", String)
|
|
87
87
|
], Product.prototype, "internalId", void 0);
|
|
88
88
|
__decorate([
|
|
89
|
-
|
|
89
|
+
typeorm_1.Column(),
|
|
90
90
|
__metadata("design:type", String)
|
|
91
91
|
], Product.prototype, "ean", void 0);
|
|
92
92
|
__decorate([
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
typeorm_1.Column(),
|
|
94
|
+
class_validator_1.IsNotEmpty(),
|
|
95
95
|
__metadata("design:type", String)
|
|
96
96
|
], Product.prototype, "url", void 0);
|
|
97
97
|
__decorate([
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
typeorm_1.Column(),
|
|
99
|
+
class_validator_1.IsNotEmpty(),
|
|
100
|
+
typeorm_1.Index(),
|
|
101
101
|
__metadata("design:type", String)
|
|
102
102
|
], Product.prototype, "storeRef", void 0);
|
|
103
103
|
__decorate([
|
|
104
|
-
|
|
104
|
+
typeorm_1.Column(),
|
|
105
105
|
__metadata("design:type", String)
|
|
106
106
|
], Product.prototype, "storeName", void 0);
|
|
107
107
|
__decorate([
|
|
108
|
-
|
|
108
|
+
typeorm_1.Column(),
|
|
109
109
|
__metadata("design:type", String)
|
|
110
110
|
], Product.prototype, "branchStoreName", void 0);
|
|
111
111
|
__decorate([
|
|
112
|
-
|
|
112
|
+
typeorm_1.Column(),
|
|
113
113
|
__metadata("design:type", String)
|
|
114
114
|
], Product.prototype, "sellerName", void 0);
|
|
115
115
|
__decorate([
|
|
116
|
-
|
|
116
|
+
typeorm_1.Column(),
|
|
117
117
|
__metadata("design:type", String)
|
|
118
118
|
], Product.prototype, "normalizedSellerName", void 0);
|
|
119
119
|
__decorate([
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
typeorm_1.Column(),
|
|
121
|
+
class_validator_1.IsNotEmpty(),
|
|
122
122
|
__metadata("design:type", price_1.Price)
|
|
123
123
|
], Product.prototype, "price", void 0);
|
|
124
124
|
__decorate([
|
|
125
|
-
|
|
125
|
+
typeorm_1.Column(),
|
|
126
126
|
__metadata("design:type", Object)
|
|
127
127
|
], Product.prototype, "conditionalPrice", void 0);
|
|
128
128
|
__decorate([
|
|
129
|
-
|
|
129
|
+
typeorm_1.Column(),
|
|
130
130
|
__metadata("design:type", Array)
|
|
131
131
|
], Product.prototype, "conditionalPriceHistory", void 0);
|
|
132
132
|
__decorate([
|
|
133
|
-
|
|
133
|
+
typeorm_1.Column(),
|
|
134
134
|
__metadata("design:type", price_1.Price)
|
|
135
135
|
], Product.prototype, "previousPrice", void 0);
|
|
136
136
|
__decorate([
|
|
137
|
-
|
|
137
|
+
typeorm_1.Column(),
|
|
138
138
|
__metadata("design:type", price_1.Price)
|
|
139
139
|
], Product.prototype, "bestPrice", void 0);
|
|
140
140
|
__decorate([
|
|
141
|
-
|
|
141
|
+
typeorm_1.Column(),
|
|
142
142
|
__metadata("design:type", prices_stats_1.PricesStats)
|
|
143
143
|
], Product.prototype, "priceStats", void 0);
|
|
144
144
|
__decorate([
|
|
145
|
-
|
|
145
|
+
typeorm_1.Column(),
|
|
146
146
|
__metadata("design:type", Array)
|
|
147
147
|
], Product.prototype, "priceHistory", void 0);
|
|
148
148
|
__decorate([
|
|
149
|
-
|
|
149
|
+
typeorm_1.Column(),
|
|
150
150
|
__metadata("design:type", Number)
|
|
151
151
|
], Product.prototype, "rank", void 0);
|
|
152
152
|
__decorate([
|
|
153
|
-
|
|
153
|
+
typeorm_1.Column(),
|
|
154
154
|
__metadata("design:type", String)
|
|
155
155
|
], Product.prototype, "image", void 0);
|
|
156
156
|
__decorate([
|
|
157
|
-
|
|
157
|
+
typeorm_1.Column(),
|
|
158
158
|
__metadata("design:type", Array)
|
|
159
159
|
], Product.prototype, "images", void 0);
|
|
160
160
|
__decorate([
|
|
161
|
-
|
|
161
|
+
typeorm_1.Column(),
|
|
162
162
|
__metadata("design:type", String)
|
|
163
163
|
], Product.prototype, "category", void 0);
|
|
164
164
|
__decorate([
|
|
165
|
-
|
|
165
|
+
typeorm_1.Column(),
|
|
166
166
|
__metadata("design:type", String)
|
|
167
167
|
], Product.prototype, "categoryPath", void 0);
|
|
168
168
|
__decorate([
|
|
169
|
-
|
|
169
|
+
typeorm_1.Column(),
|
|
170
170
|
__metadata("design:type", Number)
|
|
171
171
|
], Product.prototype, "page", void 0);
|
|
172
172
|
__decorate([
|
|
173
|
-
|
|
173
|
+
typeorm_1.Column(),
|
|
174
174
|
__metadata("design:type", Number)
|
|
175
175
|
], Product.prototype, "userRank", void 0);
|
|
176
176
|
__decorate([
|
|
177
|
-
|
|
177
|
+
typeorm_1.Column(),
|
|
178
178
|
__metadata("design:type", Object)
|
|
179
179
|
], Product.prototype, "attributes", void 0);
|
|
180
180
|
__decorate([
|
|
181
|
-
|
|
181
|
+
typeorm_1.Column(),
|
|
182
182
|
__metadata("design:type", Array)
|
|
183
183
|
], Product.prototype, "stockHistory", void 0);
|
|
184
184
|
__decorate([
|
|
185
|
-
|
|
185
|
+
typeorm_1.Column(),
|
|
186
186
|
__metadata("design:type", Boolean)
|
|
187
187
|
], Product.prototype, "homeDeliveryShipping", void 0);
|
|
188
188
|
__decorate([
|
|
189
|
-
|
|
189
|
+
typeorm_1.Column(),
|
|
190
190
|
__metadata("design:type", Boolean)
|
|
191
191
|
], Product.prototype, "pickUpFromStoreShipping", void 0);
|
|
192
192
|
__decorate([
|
|
193
|
-
|
|
193
|
+
typeorm_1.Column(),
|
|
194
194
|
__metadata("design:type", Boolean)
|
|
195
195
|
], Product.prototype, "fastDelivery", void 0);
|
|
196
196
|
__decorate([
|
|
197
|
-
|
|
197
|
+
typeorm_1.Column(),
|
|
198
198
|
__metadata("design:type", Boolean)
|
|
199
199
|
], Product.prototype, "enabled", void 0);
|
|
200
200
|
__decorate([
|
|
201
|
-
|
|
201
|
+
typeorm_1.Column(),
|
|
202
202
|
__metadata("design:type", Array)
|
|
203
203
|
], Product.prototype, "enabledHistory", void 0);
|
|
204
204
|
__decorate([
|
|
205
|
-
|
|
205
|
+
typeorm_1.Column(),
|
|
206
206
|
__metadata("design:type", String)
|
|
207
207
|
], Product.prototype, "sourceUrl", void 0);
|
|
208
208
|
__decorate([
|
|
209
|
-
|
|
209
|
+
typeorm_1.Column(),
|
|
210
210
|
__metadata("design:type", http_request_1.HttpRequest)
|
|
211
211
|
], Product.prototype, "request", void 0);
|
|
212
212
|
__decorate([
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
typeorm_1.Column(),
|
|
214
|
+
typeorm_1.Index(),
|
|
215
215
|
__metadata("design:type", Date)
|
|
216
216
|
], Product.prototype, "updatedAt", void 0);
|
|
217
217
|
__decorate([
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
typeorm_1.Column(),
|
|
219
|
+
typeorm_1.Index(),
|
|
220
220
|
__metadata("design:type", Array)
|
|
221
221
|
], Product.prototype, "categoryKeywordNames", void 0);
|
|
222
222
|
__decorate([
|
|
223
|
-
|
|
223
|
+
typeorm_1.Column(),
|
|
224
224
|
__metadata("design:type", Array)
|
|
225
225
|
], Product.prototype, "categoryKeywords", void 0);
|
|
226
226
|
__decorate([
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
typeorm_1.Column(),
|
|
228
|
+
typeorm_1.Index(),
|
|
229
229
|
__metadata("design:type", Date)
|
|
230
230
|
], Product.prototype, "processedPricesAt", void 0);
|
|
231
231
|
__decorate([
|
|
232
|
-
|
|
232
|
+
typeorm_1.Column(),
|
|
233
233
|
__metadata("design:type", Boolean)
|
|
234
234
|
], Product.prototype, "isMarketplace", void 0);
|
|
235
235
|
__decorate([
|
|
236
|
-
|
|
236
|
+
typeorm_1.Column(),
|
|
237
237
|
__metadata("design:type", String)
|
|
238
238
|
], Product.prototype, "addToCartLink", void 0);
|
|
239
239
|
__decorate([
|
|
240
|
-
|
|
240
|
+
typeorm_1.Column(),
|
|
241
241
|
__metadata("design:type", String)
|
|
242
242
|
], Product.prototype, "currency", void 0);
|
|
243
243
|
__decorate([
|
|
244
|
-
|
|
244
|
+
typeorm_1.Column(),
|
|
245
245
|
__metadata("design:type", Array)
|
|
246
246
|
], Product.prototype, "updateReason", void 0);
|
|
247
247
|
__decorate([
|
|
248
|
-
|
|
248
|
+
typeorm_1.Column(),
|
|
249
249
|
__metadata("design:type", Array)
|
|
250
250
|
], Product.prototype, "nameHistory", void 0);
|
|
251
251
|
__decorate([
|
|
252
|
-
|
|
252
|
+
typeorm_1.Column(),
|
|
253
253
|
__metadata("design:type", Array)
|
|
254
254
|
], Product.prototype, "availableLocations", void 0);
|
|
255
255
|
__decorate([
|
|
256
|
-
|
|
256
|
+
typeorm_1.Column(),
|
|
257
257
|
__metadata("design:type", Boolean)
|
|
258
258
|
], Product.prototype, "refurbished", void 0);
|
|
259
259
|
__decorate([
|
|
260
|
-
|
|
260
|
+
typeorm_1.Column(),
|
|
261
261
|
__metadata("design:type", String)
|
|
262
262
|
], Product.prototype, "parentProductIdRef", void 0);
|
|
263
263
|
__decorate([
|
|
264
|
-
|
|
264
|
+
typeorm_1.Column(),
|
|
265
265
|
__metadata("design:type", String)
|
|
266
266
|
], Product.prototype, "parentProductSkuRef", void 0);
|
|
267
267
|
__decorate([
|
|
268
|
-
|
|
268
|
+
typeorm_1.Column(),
|
|
269
269
|
__metadata("design:type", Array)
|
|
270
270
|
], Product.prototype, "children", void 0);
|
|
271
271
|
__decorate([
|
|
272
|
-
|
|
272
|
+
typeorm_1.Column(),
|
|
273
273
|
__metadata("design:type", Date)
|
|
274
274
|
], Product.prototype, "extractedAt", void 0);
|
|
275
275
|
__decorate([
|
|
276
|
-
|
|
276
|
+
typeorm_1.Column(),
|
|
277
277
|
__metadata("design:type", Boolean)
|
|
278
278
|
], Product.prototype, "isFree", void 0);
|
|
279
279
|
Product = __decorate([
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
typeorm_1.Entity({ name: 'products' }),
|
|
281
|
+
typeorm_1.Unique('store_ref_sku', ['storeRef', 'sku'])
|
|
282
282
|
], Product);
|
|
283
283
|
exports.Product = Product;
|
|
284
284
|
//# sourceMappingURL=product.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.js","sourceRoot":"/","sources":["entities/product.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAGiB;AACjB,qDAA6C;AAC7C,mDAA+C;AAC/C,mCAAgC;AAChC,iDAA6C;AAE7C,0DAAsD;AAGtD,IAAY,YAaX;AAbD,WAAY,YAAY;IACpB,2BAAW,CAAA;IACX,mCAAmB,CAAA;IACnB,uCAAuB,CAAA;IACvB,yCAAyB,CAAA;IACzB,8CAA8B,CAAA;IAC9B,2BAAW,CAAA;IACX,2BAAW,CAAA;IACX,2BAAW,CAAA;IACX,2BAAW,CAAA;IACX,2BAAW,CAAA;IACX,2BAAW,CAAA;IACX,2BAAW,CAAA;AACf,CAAC,EAbW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAavB;AAED,IAAY,gBAyBX;AAzBD,WAAY,gBAAgB;IACxB,iCAAa,CAAA;IACb,2CAAuB,CAAA;IACvB,6CAAyB,CAAA;IACzB,yCAAqB,CAAA;IACrB,mEAA+C,CAAA;IAC/C,yCAAqB,CAAA;IACrB,+CAA2B,CAAA;IAC3B,2CAAuB,CAAA;IACvB,yCAAqB,CAAA;IACrB,6CAAyB,CAAA;IACzB,iDAA6B,CAAA;IAC7B,yCAAqB,CAAA;IACrB,6CAAyB,CAAA;IACzB,iDAA6B,CAAA;IAE7B,6DAAyC,CAAA;IACzC,qFAAiE,CAAA;IACjE,2DAAuC,CAAA;IACvC,iEAA6C,CAAA;IAC7C,6DAAyC,CAAA;IACzC,mEAA+C,CAAA;IAC/C,2DAAuC,CAAA;IACvC,+DAA2C,CAAA;IAC3C,mEAA+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M,EAAE;;wDACyB;AAGlC;IADC,gBAAM,EAAE;;6CACc;AAGvB;IADC,gBAAM,EAAE;;wCACS;AAGlB;IADC,gBAAM,EAAE;;+CACgE;AAGzE;IADC,gBAAM,EAAE;;0CACU;AAGnB;IADC,gBAAM,EAAE;8BACE,0BAAW;wCAAC;AAIvB;IAFC,gBAAM,EAAE;IACR,eAAK,EAAE;8BACI,IAAI;0CAAC;AAIjB;IAFC,gBAAM,EAAE;IACR,eAAK,EAAE;;qDACwB;AAGhC;IADC,gBAAM,EAAE;;iDACoB;AAI7B;IAFC,gBAAM,EAAE;IACR,eAAK,EAAE;8BACY,IAAI;kDAAC;AAGzB;IADC,gBAAM,EAAE;;8CACe;AAGxB;IADC,gBAAM,EAAE;;8CACc;AAGvB;IADC,gBAAM,EAAE;;yCACe;AAGxB;IADC,gBAAM,EAAE;;6CACyB;AAGlC;IADC,gBAAM,EAAE;;4CAIL;AAGJ;IADC,gBAAM,EAAE;;mDACqB;AAG9B;IADC,gBAAM,EAAE;;4CACa;AAGtB;IADC,gBAAM,EAAE;;mDACmB;AAG5B;IADC,gBAAM,EAAE;;oDACoB;AAG7B;IADC,gBAAM,EAAE;;yCACW;AAGpB;IADC,gBAAM,EAAE;8BACK,IAAI;4CAAC;AAGnB;IADC,gBAAM,EAAE;;uCACQ;AA1KR,OAAO;IAFnB,gBAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IAC5B,gBAAM,CAAC,eAAe,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;GAChC,OAAO,CA2KnB;AA3KY,0BAAO","sourcesContent":["import {\n Column,\n Entity, Index, Unique,\n} from 'typeorm';\nimport { IsNotEmpty } from 'class-validator';\nimport { AbstractBase } from './abstract-base';\nimport { Price } from './price';\nimport { PricesStats } from './prices-stats';\nimport { Keyword } from './keyword';\nimport { HttpRequest } from '../classes/http-request';\nimport { ImageTypeEnum } from '../enums/image-type.enum';\n\nexport enum CurrencyEnum {\n CLP = 'clp',\n CMR_PTS = 'cmr_pts',\n PARIS_PTS = 'paris_pts',\n RIPLEY_PTS = 'ripley_pts',\n GENERAL_POINTS = 'general_pts',\n BRL = 'brl',\n PEN = 'pen',\n ARS = 'ars',\n EUR = 'eur',\n USD = 'usd',\n MXN = 'mxn',\n COP = 'cop',\n}\n\nexport enum UpdateReasonEnum {\n TIME = 'time',\n NEW_PRICE = 'new_price',\n PRICE_DOWN = 'price_down',\n PRICE_UP = 'price_up',\n NEW_CONDITIONAL_PRICE = 'new_conditional_price',\n NEW_NAME = 'new_name',\n NEW_LISTING = 'new_listing',\n NEW_STOCK = 'new_stock',\n STOCK_UP = 'stock_up',\n STOCK_DOWN = 'stock_down',\n MISSING_DATA = 'missing_data',\n FIX_DATA = 'fix_data',\n RE_LISTING = 're_listing',\n OUT_OF_STOCK = 'out_of_stock',\n\n CHILDREN_NEW_PRICE = 'children_new_price',\n CHILDREN_NEW_CONDITIONAL_PRICE = 'children_conditional_new_price',\n CHILDREN_NEW_NAME = 'children_new_name',\n CHILDREN_NEW_LISTING = 'children_new_listing',\n CHILDREN_NEW_STOCK = 'children_new_stock',\n CHILDREN_MISSING_DATA = 'children_missing_data',\n CHILDREN_FIX_DATA = 'children_fix_data',\n CHILDREN_RE_LISTING = 'children_re_listing',\n CHILDREN_OUT_OF_STOCK = 'children_out_of_stock'\n}\n\nexport interface ProductAttributes {\n stock?: number;\n\n // TODO: Add enum\n color?: string;\n\n // TODO: Add enum\n size?: string;\n\n [key: string]: any;\n}\n\nexport interface ConditionalPrice {\n minAmount?: number;\n price?:number;\n cardRequired?: boolean;\n createdAt?: Date;\n updatedAt?: Date;\n}\n\n@Entity({ name: 'products' })\n@Unique('store_ref_sku', ['storeRef', 'sku'])\nexport class Product extends AbstractBase {\n @Column()\n name: string;\n\n @Column()\n brandName?: string;\n\n @Column()\n normalizedBrandName?: string;\n\n @Column()\n modelName?: string;\n\n @Column()\n @IsNotEmpty()\n @Index()\n sku: string;\n\n @Column()\n internalId?: string;\n\n @Column()\n ean?: string;\n\n @Column()\n @IsNotEmpty()\n url: string;\n\n @Column()\n @IsNotEmpty()\n @Index()\n storeRef: string;\n\n @Column()\n storeName?: string;\n\n @Column()\n branchStoreName?: string;\n\n @Column()\n sellerName?: string;\n\n @Column()\n normalizedSellerName?: string;\n\n @Column()\n @IsNotEmpty()\n price?: Price;\n\n @Column()\n conditionalPrice?: ConditionalPrice;\n\n @Column()\n conditionalPriceHistory?: ConditionalPrice[];\n\n @Column()\n previousPrice?: Price;\n\n @Column()\n bestPrice?: Price;\n\n @Column()\n priceStats?: PricesStats;\n\n @Column()\n priceHistory?: Price[];\n\n @Column()\n rank?: number;\n\n @Column()\n image?: string;\n\n @Column()\n images?: { type: ImageTypeEnum, url: string }[]\n\n @Column()\n category?: string;\n\n @Column()\n categoryPath?: string;\n\n @Column()\n page?: number;\n\n @Column()\n userRank?: number;\n\n @Column()\n attributes?: ProductAttributes;\n\n @Column()\n stockHistory?: {\n stock: number,\n updatedAt: string,\n }[];\n\n @Column()\n homeDeliveryShipping?: boolean;\n\n @Column()\n pickUpFromStoreShipping?: boolean;\n\n @Column()\n fastDelivery?: boolean;\n\n @Column()\n enabled?: boolean;\n\n @Column()\n enabledHistory?: {enabled: boolean, updatedAt?:Date, createdAt?: Date}[];\n\n @Column()\n sourceUrl?: string;\n\n @Column()\n request? : HttpRequest;\n\n @Column()\n @Index()\n updatedAt?: Date;\n\n @Column()\n @Index()\n categoryKeywordNames?: string[];\n\n @Column()\n categoryKeywords?: Keyword[];\n\n @Column()\n @Index()\n processedPricesAt?: Date;\n\n @Column()\n isMarketplace?: boolean;\n\n @Column()\n addToCartLink?: string;\n\n @Column()\n currency?: CurrencyEnum;\n\n @Column()\n updateReason?: UpdateReasonEnum[];\n\n @Column()\n nameHistory?: {\n name: string,\n updatedAt: string,\n }[];\n\n @Column()\n availableLocations?: string[];\n\n @Column()\n refurbished?: boolean;\n\n @Column()\n parentProductIdRef?: string;\n\n @Column()\n parentProductSkuRef?: string;\n\n @Column()\n children?: Product[]\n\n @Column()\n extractedAt?: Date;\n\n @Column()\n isFree?: boolean;\n}\n"]}
|
package/dist/entities/store.js
CHANGED
|
@@ -57,76 +57,76 @@ let Store = class Store extends abstract_base_1.AbstractBase {
|
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
__decorate([
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
typeorm_1.Column({ nullable: false }),
|
|
61
|
+
typeorm_1.Index(),
|
|
62
|
+
class_validator_1.IsNotEmpty(),
|
|
63
63
|
__metadata("design:type", String)
|
|
64
64
|
], Store.prototype, "name", void 0);
|
|
65
65
|
__decorate([
|
|
66
|
-
|
|
66
|
+
typeorm_1.Column(),
|
|
67
67
|
__metadata("design:type", String)
|
|
68
68
|
], Store.prototype, "displayName", void 0);
|
|
69
69
|
__decorate([
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
typeorm_1.Column({ nullable: false }),
|
|
71
|
+
class_validator_1.IsNotEmpty(),
|
|
72
72
|
__metadata("design:type", String)
|
|
73
73
|
], Store.prototype, "url", void 0);
|
|
74
74
|
__decorate([
|
|
75
|
-
|
|
75
|
+
typeorm_1.Column(),
|
|
76
76
|
__metadata("design:type", Array)
|
|
77
77
|
], Store.prototype, "categories", void 0);
|
|
78
78
|
__decorate([
|
|
79
|
-
|
|
79
|
+
typeorm_1.Column(),
|
|
80
80
|
__metadata("design:type", String)
|
|
81
81
|
], Store.prototype, "priority", void 0);
|
|
82
82
|
__decorate([
|
|
83
|
-
|
|
83
|
+
typeorm_1.Column(),
|
|
84
84
|
__metadata("design:type", String)
|
|
85
85
|
], Store.prototype, "type", void 0);
|
|
86
86
|
__decorate([
|
|
87
|
-
|
|
87
|
+
typeorm_1.Column(),
|
|
88
88
|
__metadata("design:type", String)
|
|
89
89
|
], Store.prototype, "parentStoreRef", void 0);
|
|
90
90
|
__decorate([
|
|
91
|
-
|
|
91
|
+
typeorm_1.Column({ default: true, type: 'boolean' }),
|
|
92
92
|
__metadata("design:type", Object)
|
|
93
93
|
], Store.prototype, "enabled", void 0);
|
|
94
94
|
__decorate([
|
|
95
|
-
|
|
95
|
+
typeorm_1.Column(),
|
|
96
96
|
__metadata("design:type", String)
|
|
97
97
|
], Store.prototype, "queue", void 0);
|
|
98
98
|
__decorate([
|
|
99
|
-
|
|
99
|
+
typeorm_1.Column(),
|
|
100
100
|
__metadata("design:type", String)
|
|
101
101
|
], Store.prototype, "persistQueue", void 0);
|
|
102
102
|
__decorate([
|
|
103
|
-
|
|
103
|
+
typeorm_1.Column(),
|
|
104
104
|
__metadata("design:type", Array)
|
|
105
105
|
], Store.prototype, "storeQueueConfig", void 0);
|
|
106
106
|
__decorate([
|
|
107
|
-
|
|
107
|
+
typeorm_1.Column(),
|
|
108
108
|
__metadata("design:type", String)
|
|
109
109
|
], Store.prototype, "country", void 0);
|
|
110
110
|
__decorate([
|
|
111
|
-
|
|
111
|
+
typeorm_1.Column(),
|
|
112
112
|
__metadata("design:type", String)
|
|
113
113
|
], Store.prototype, "defaultCurrency", void 0);
|
|
114
114
|
__decorate([
|
|
115
|
-
|
|
115
|
+
typeorm_1.Column(),
|
|
116
116
|
__metadata("design:type", Array)
|
|
117
117
|
], Store.prototype, "configs", void 0);
|
|
118
118
|
__decorate([
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
typeorm_1.Column(),
|
|
120
|
+
typeorm_1.Index(),
|
|
121
121
|
__metadata("design:type", Array)
|
|
122
122
|
], Store.prototype, "tags", void 0);
|
|
123
123
|
__decorate([
|
|
124
|
-
|
|
124
|
+
typeorm_1.Column(),
|
|
125
125
|
__metadata("design:type", Array)
|
|
126
126
|
], Store.prototype, "platforms", void 0);
|
|
127
127
|
Store = __decorate([
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
typeorm_1.Entity({ name: 'stores' }),
|
|
129
|
+
typeorm_1.Unique(['url'])
|
|
130
130
|
], Store);
|
|
131
131
|
exports.Store = Store;
|
|
132
132
|
//# sourceMappingURL=store.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"/","sources":["entities/store.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAEiB;AACjB,qDAA6C;AAC7C,mDAA+C;AAM/C,IAAY,YASX;AATD,WAAY,YAAY;IACpB,6BAAa,CAAA;IACb,2CAA2B,CAAA;IAC3B,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;IACrB,yCAAyB,CAAA;IACzB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;AACvB,CAAC,EATW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QASvB;AAED,IAAY,WAQX;AARD,WAAY,WAAW;IACnB,8BAAe,CAAA;IACf,sCAAuB,CAAA;IACvB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,0BAAW,CAAA;IACX,8BAAe,CAAA;AACnB,CAAC,EARW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAQtB;AAED,IAAY,YAiBX;AAjBD,WAAY,YAAY;IACpB,uCAAuB,CAAA;IACvB,6BAAa,CAAA;IACb,iCAAiB,CAAA;IACjB,2BAAW,CAAA;IAEX,yCAAyB,CAAA;IACzB,6CAA6B,CAAA;IAC7B,uCAAuB,CAAA;IAEvB,yCAAyB,CAAA;IACzB,6CAA6B,CAAA;IAC7B,uCAAuB,CAAA;IAEvB,6CAA6B,CAAA;IAC7B,iDAAiC,CAAA;IACjC,2CAA2B,CAAA;AAC/B,CAAC,EAjBW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAiBvB;AAID,IAAa,KAAK,GAAlB,MAAa,KAAM,SAAQ,4BAAY;IAAvC;;QA0BI,YAAO,GAAG,IAAI,CAAC;IA0BnB,CAAC;CAAA,CAAA;AAhDG;IAHC,
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"/","sources":["entities/store.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,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ACD;AAGZ;IADC,gBAAM,EAAE;;yCACoB;AAG7B;IADC,gBAAM,EAAE;;uCACwB;AAGjC;IADC,gBAAM,EAAE;;mCACI;AAGb;IADC,gBAAM,EAAE;;6CACe;AAGxB;IADC,gBAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;sCAC5B;AAGf;IADC,gBAAM,EAAE;;oCACK;AAGd;IADC,gBAAM,EAAE;;2CACY;AAGrB;IADC,gBAAM,EAAE;;+CAC2B;AAGpC;IADC,gBAAM,EAAE;;sCACsB;AAG/B;IADC,gBAAM,EAAE;;8CAC+B;AAGxC;IADC,gBAAM,EAAE;;sCACe;AAIxB;IAFC,gBAAM,EAAE;IACR,eAAK,EAAE;;mCACQ;AAGhB;IADC,gBAAM,EAAE;;wCACkB;AAnDlB,KAAK;IAFjB,gBAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC1B,gBAAM,CAAC,CAAC,KAAK,CAAC,CAAC;GACH,KAAK,CAoDjB;AApDY,sBAAK","sourcesContent":["import {\n Column, Entity, Index, Unique,\n} from 'typeorm';\nimport { IsNotEmpty } from 'class-validator';\nimport { AbstractBase } from './abstract-base';\nimport { CATEGORY_ENUM } from './keyword';\nimport { QueueConfigDto } from '../dto/queue-config.dto';\nimport { StoreConfig } from '../dto';\nimport { CurrencyEnum } from './product';\n\nexport enum PlatformEnum {\n VTEX = 'vtex',\n CUSTOM_VTEX = 'custom_vtex',\n COMMERCE = 'commerce',\n MYBCAPPS = 'mybcapps',\n JUMPSELLER = 'jumpseller',\n MAGENTO = 'magento',\n SHOPIFY = 'shopify',\n ALGOLIA = 'algolia',\n}\n\nexport enum CountryEnum {\n CHILE = 'chile',\n ARGENTINA = 'argentina',\n URUGUAY = 'uruguay',\n PERU = 'peru',\n BRAZIL = 'brazil',\n USA = 'usa',\n SPAIN = 'spain',\n}\n\nexport enum PriorityEnum {\n VERY_HIGH = 'very_high',\n HIGH = 'high',\n MEDIUM = 'medium',\n LOW = 'low',\n\n SHOES_HIGH = 'shoes_high',\n SHOES_MEDIUM = 'shoes_medium',\n SHOES_LOW = 'shoes_low',\n\n TECNO_HIGH = 'tecno_high',\n TECNO_MEDIUM = 'tecno_medium',\n TECNO_LOW = 'tecno_low',\n\n ELECTRO_HIGH = 'electro_high',\n ELECTRO_MEDIUM = 'electro_medium',\n ELECTRO_LOW = 'electro_low',\n}\n\n@Entity({ name: 'stores' })\n@Unique(['url'])\nexport class Store extends AbstractBase {\n @Column({ nullable: false })\n @Index()\n @IsNotEmpty()\n name: string;\n\n @Column()\n displayName?: string;\n\n @Column({ nullable: false })\n @IsNotEmpty()\n url: string;\n\n @Column()\n categories?: CATEGORY_ENUM[];\n\n @Column()\n priority?: PriorityEnum | string;\n\n @Column()\n type: string;\n\n @Column()\n parentStoreRef?: string;\n\n @Column({ default: true, type: 'boolean' })\n enabled = true;\n\n @Column()\n queue: string;\n\n @Column()\n persistQueue: string;\n\n @Column()\n storeQueueConfig?: QueueConfigDto[];\n\n @Column()\n country?: CountryEnum | string;\n\n @Column()\n defaultCurrency?: CurrencyEnum | string;\n\n @Column()\n configs?: StoreConfig[];\n\n @Column()\n @Index()\n tags?: string[];\n\n @Column()\n platforms?: PlatformEnum[];\n}\n"]}
|