store-scrapper-js-common 1.0.71 → 1.0.72
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.
|
@@ -7,6 +7,7 @@ export declare enum CurrencyEnum {
|
|
|
7
7
|
CMR_PTS = "cmr_pts",
|
|
8
8
|
PARIS_PTS = "paris_pts",
|
|
9
9
|
RIPLEY_PTS = "ripley_pts",
|
|
10
|
+
GENERAL_POINTS = "general_pts",
|
|
10
11
|
BRL = "brl",
|
|
11
12
|
PEN = "PEN",
|
|
12
13
|
ARS = "ars",
|
|
@@ -15,6 +16,7 @@ export declare enum CurrencyEnum {
|
|
|
15
16
|
export declare enum UpdateReasonEnum {
|
|
16
17
|
TIME = "time",
|
|
17
18
|
NEW_PRICE = "new_price",
|
|
19
|
+
NEW_CONDITIONAL_PRICE = "new_conditional_price",
|
|
18
20
|
NEW_NAME = "new_name",
|
|
19
21
|
NEW_LISTING = "new_listing",
|
|
20
22
|
MISSING_DATA = "missing_data",
|
|
@@ -30,6 +32,7 @@ export interface ConditionalPrice {
|
|
|
30
32
|
minAmount?: number;
|
|
31
33
|
price?: number;
|
|
32
34
|
cardRequired?: boolean;
|
|
35
|
+
createdAt?: Date;
|
|
33
36
|
}
|
|
34
37
|
export declare class Product extends AbstractBase {
|
|
35
38
|
name: string;
|
package/dist/entities/product.js
CHANGED
|
@@ -21,6 +21,7 @@ var CurrencyEnum;
|
|
|
21
21
|
CurrencyEnum["CMR_PTS"] = "cmr_pts";
|
|
22
22
|
CurrencyEnum["PARIS_PTS"] = "paris_pts";
|
|
23
23
|
CurrencyEnum["RIPLEY_PTS"] = "ripley_pts";
|
|
24
|
+
CurrencyEnum["GENERAL_POINTS"] = "general_pts";
|
|
24
25
|
CurrencyEnum["BRL"] = "brl";
|
|
25
26
|
CurrencyEnum["PEN"] = "PEN";
|
|
26
27
|
CurrencyEnum["ARS"] = "ars";
|
|
@@ -30,6 +31,7 @@ var UpdateReasonEnum;
|
|
|
30
31
|
(function (UpdateReasonEnum) {
|
|
31
32
|
UpdateReasonEnum["TIME"] = "time";
|
|
32
33
|
UpdateReasonEnum["NEW_PRICE"] = "new_price";
|
|
34
|
+
UpdateReasonEnum["NEW_CONDITIONAL_PRICE"] = "new_conditional_price";
|
|
33
35
|
UpdateReasonEnum["NEW_NAME"] = "new_name";
|
|
34
36
|
UpdateReasonEnum["NEW_LISTING"] = "new_listing";
|
|
35
37
|
UpdateReasonEnum["MISSING_DATA"] = "missing_data";
|
|
@@ -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;AAG7C,IAAY,
|
|
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;AAG7C,IAAY,YAUX;AAVD,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;AACf,CAAC,EAVW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAUvB;AAED,IAAY,gBAQX;AARD,WAAY,gBAAgB;IACxB,iCAAa,CAAA;IACb,2CAAuB,CAAA;IACvB,mEAA+C,CAAA;IAC/C,yCAAqB,CAAA;IACrB,+CAA2B,CAAA;IAC3B,iDAA6B,CAAA;IAC7B,yCAAqB,CAAA;AACzB,CAAC,EARW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAQ3B;AAuBD,IAAa,OAAO,GAApB,MAAa,OAAQ,SAAQ,4BAAY;CA+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GhC;IADC,gBAAM,EAAE;;4CAIL;AAGJ;IADC,gBAAM,EAAE;;mDACmB;AAG5B;IADC,gBAAM,EAAE;;oDACoB;AA9GpB,OAAO;IAFnB,gBAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IAC5B,gBAAM,CAAC,eAAe,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;GAChC,OAAO,CA+GnB;AA/GY,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';\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}\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 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 enabled?: boolean;\n\n @Column()\n sourceUrl?: string;\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 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
|
@@ -13,6 +13,7 @@ export enum CurrencyEnum {
|
|
|
13
13
|
CMR_PTS = 'cmr_pts',
|
|
14
14
|
PARIS_PTS = 'paris_pts',
|
|
15
15
|
RIPLEY_PTS = 'ripley_pts',
|
|
16
|
+
GENERAL_POINTS = 'general_pts',
|
|
16
17
|
BRL = 'brl',
|
|
17
18
|
PEN = 'PEN',
|
|
18
19
|
ARS = 'ars',
|
|
@@ -22,6 +23,7 @@ export enum CurrencyEnum {
|
|
|
22
23
|
export enum UpdateReasonEnum {
|
|
23
24
|
TIME = 'time',
|
|
24
25
|
NEW_PRICE = 'new_price',
|
|
26
|
+
NEW_CONDITIONAL_PRICE = 'new_conditional_price',
|
|
25
27
|
NEW_NAME = 'new_name',
|
|
26
28
|
NEW_LISTING = 'new_listing',
|
|
27
29
|
MISSING_DATA = 'missing_data',
|
|
@@ -42,8 +44,9 @@ export interface ProductAttributes {
|
|
|
42
44
|
|
|
43
45
|
export interface ConditionalPrice {
|
|
44
46
|
minAmount?: number;
|
|
45
|
-
price?:
|
|
47
|
+
price?:number;
|
|
46
48
|
cardRequired?: boolean;
|
|
49
|
+
createdAt?: Date;
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
@Entity({ name: 'products' })
|