store-scrapper-js-common 1.0.81 → 1.0.82
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/http-request.d.ts +7 -0
- package/dist/classes/http-request.js +7 -0
- package/dist/classes/http-request.js.map +1 -0
- package/dist/entities/product.d.ts +2 -2
- package/dist/entities/product.js +3 -3
- package/dist/entities/product.js.map +1 -1
- package/package.json +1 -1
- package/src/classes/http-request.ts +10 -0
- package/src/entities/product.ts +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-request.js","sourceRoot":"/","sources":["classes/http-request.ts"],"names":[],"mappings":";;;AAGA,MAAa,WAAW;CAMvB;AAND,kCAMC","sourcesContent":["import { RequestTypeEnum } from '../enums';\nimport { ObjectLiteral } from './object-literal';\n\nexport class HttpRequest {\n headers?: ObjectLiteral;\n\n url?: string;\n\n type?: RequestTypeEnum\n}\n"]}
|
|
@@ -2,7 +2,7 @@ import { AbstractBase } from './abstract-base';
|
|
|
2
2
|
import { Price } from './price';
|
|
3
3
|
import { PricesStats } from './prices-stats';
|
|
4
4
|
import { Keyword } from './keyword';
|
|
5
|
-
import {
|
|
5
|
+
import { HttpRequest } from '../classes/http-request';
|
|
6
6
|
export declare enum CurrencyEnum {
|
|
7
7
|
CLP = "clp",
|
|
8
8
|
CMR_PTS = "cmr_pts",
|
|
@@ -63,7 +63,7 @@ export declare class Product extends AbstractBase {
|
|
|
63
63
|
fastDelivery?: boolean;
|
|
64
64
|
enabled?: boolean;
|
|
65
65
|
sourceUrl?: string;
|
|
66
|
-
|
|
66
|
+
request?: HttpRequest;
|
|
67
67
|
updatedAt?: Date;
|
|
68
68
|
categoryKeywordNames?: string[];
|
|
69
69
|
categoryKeywords?: Keyword[];
|
package/dist/entities/product.js
CHANGED
|
@@ -15,7 +15,7 @@ const class_validator_1 = require("class-validator");
|
|
|
15
15
|
const abstract_base_1 = require("./abstract-base");
|
|
16
16
|
const price_1 = require("./price");
|
|
17
17
|
const prices_stats_1 = require("./prices-stats");
|
|
18
|
-
const
|
|
18
|
+
const http_request_1 = require("../classes/http-request");
|
|
19
19
|
var CurrencyEnum;
|
|
20
20
|
(function (CurrencyEnum) {
|
|
21
21
|
CurrencyEnum["CLP"] = "clp";
|
|
@@ -153,8 +153,8 @@ __decorate([
|
|
|
153
153
|
], Product.prototype, "sourceUrl", void 0);
|
|
154
154
|
__decorate([
|
|
155
155
|
typeorm_1.Column(),
|
|
156
|
-
__metadata("design:type",
|
|
157
|
-
], Product.prototype, "
|
|
156
|
+
__metadata("design:type", http_request_1.HttpRequest)
|
|
157
|
+
], Product.prototype, "request", void 0);
|
|
158
158
|
__decorate([
|
|
159
159
|
typeorm_1.Column(),
|
|
160
160
|
typeorm_1.Index(),
|
|
@@ -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,
|
|
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;AAEtD,IAAY,YAWX;AAXD,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;AACf,CAAC,EAXW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAWvB;AAED,IAAY,gBAQX;AARD,WAAY,gBAAgB;IACxB,iCAAa,CAAA;IACb,2CAAuB,CAAA;IACvB,mEAA+C,C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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;;yCACe;AAGxB;IADC,gBAAM,EAAE;;6CACuB;AAGhC;IADC,gBAAM,EAAE;;4CAIL;AAGJ;IADC,gBAAM,EAAE;;mDACmB;AAG5B;IADC,gBAAM,EAAE;;oDACoB;AA1HpB,OAAO;IAFnB,gBAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IAC5B,gBAAM,CAAC,eAAe,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;GAChC,OAAO,CA2HnB;AA3HY,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';\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}\n\nexport enum UpdateReasonEnum {\n TIME = 'time',\n NEW_PRICE = 'new_price',\n NEW_CONDITIONAL_PRICE = 'new_conditional_price',\n NEW_NAME = 'new_name',\n NEW_LISTING = 'new_listing',\n MISSING_DATA = 'missing_data',\n FIX_DATA = 'fix_data',\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}\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 modelName?: string;\n\n @Column()\n @IsNotEmpty()\n @Index()\n sku: string;\n\n @Column()\n internalId?: 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 @IsNotEmpty()\n price?: Price;\n\n @Column()\n conditionalPrice?: 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 category?: string;\n\n @Column()\n categoryPath?: string;\n\n @Column()\n attributes?: ProductAttributes;\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 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 currency?: CurrencyEnum;\n\n @Column()\n updateReason?: UpdateReasonEnum;\n\n @Column()\n nameHistory?: {\n name: string,\n updatedAt: string,\n }[];\n\n @Column()\n parentProductIdRef?: string;\n\n @Column()\n parentProductSkuRef?: string;\n}\n"]}
|
package/package.json
CHANGED
package/src/entities/product.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { AbstractBase } from './abstract-base';
|
|
|
7
7
|
import { Price } from './price';
|
|
8
8
|
import { PricesStats } from './prices-stats';
|
|
9
9
|
import { Keyword } from './keyword';
|
|
10
|
-
import {
|
|
10
|
+
import { HttpRequest } from '../classes/http-request';
|
|
11
11
|
|
|
12
12
|
export enum CurrencyEnum {
|
|
13
13
|
CLP = 'clp',
|
|
@@ -139,7 +139,7 @@ export class Product extends AbstractBase {
|
|
|
139
139
|
sourceUrl?: string;
|
|
140
140
|
|
|
141
141
|
@Column()
|
|
142
|
-
|
|
142
|
+
request? : HttpRequest;
|
|
143
143
|
|
|
144
144
|
@Column()
|
|
145
145
|
@Index()
|