store-scrapper-js-common 1.0.196 → 1.0.197

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.
@@ -47,6 +47,9 @@ export interface ProductAttributes {
47
47
  stock?: number;
48
48
  color?: string;
49
49
  size?: string;
50
+ productType?: string;
51
+ productTypes?: string[];
52
+ genders?: string[];
50
53
  [key: string]: any;
51
54
  }
52
55
  export interface ConditionalPrice {
@@ -114,6 +117,7 @@ export declare class Product extends AbstractBase {
114
117
  lvl1?: string[];
115
118
  lvl2?: string[];
116
119
  };
120
+ inferredAttributes?: ProductAttributes;
117
121
  processedPricesAt?: Date;
118
122
  isMarketplace?: boolean;
119
123
  addToCartLink?: string;
@@ -239,6 +239,10 @@ __decorate([
239
239
  typeorm_1.Column(),
240
240
  __metadata("design:type", Object)
241
241
  ], Product.prototype, "inferredCategoriesLvl", void 0);
242
+ __decorate([
243
+ typeorm_1.Column(),
244
+ __metadata("design:type", Object)
245
+ ], Product.prototype, "inferredAttributes", void 0);
242
246
  __decorate([
243
247
  typeorm_1.Column(),
244
248
  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,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,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,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;AAxLR,OAAO;IAFnB,gBAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IAC5B,gBAAM,CAAC,eAAe,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;GAChC,OAAO,CAyLnB;AAzLY,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 displayName?: 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 description?: string;\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 // Categories using ext. service such as openai\n @Column()\n inferredCategories?: string[];\n\n // Can be used for facets.\n @Column()\n inferredCategoriesLvl?: {lvl0?: string[], lvl1?: string[], lvl2?: string[]};\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"]}
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,2BAA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E;IADC,gBAAM,EAAE;;mDAC8B;AAIvC;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;AAInB;IADC,gBAAM,EAAE;;uCACQ;AA7LR,OAAO;IAFnB,gBAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IAC5B,gBAAM,CAAC,eAAe,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;GAChC,OAAO,CA8LnB;AA9LY,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 // currently used, should be replaced by productTypes ( str[] )\n productType?: string;\n\n // to be implemented with inferred data\n productTypes?: string[];\n\n // to be implemented with inferred data\n genders?: 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 displayName?: 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 description?: string;\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 // Categories using ext. service such as openai\n @Column()\n inferredCategories?: string[];\n\n // Can be used for facets.\n @Column()\n inferredCategoriesLvl?: {lvl0?: string[], lvl1?: string[], lvl2?: string[]};\n\n // Inferred attributes such as product types\n @Column()\n inferredAttributes?: ProductAttributes;\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 // should set this when price is a validated 0 ex Number(null) === 0\n @Column()\n isFree?: boolean;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "store-scrapper-js-common",
3
- "version": "1.0.196",
3
+ "version": "1.0.197",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -61,6 +61,15 @@ export interface ProductAttributes {
61
61
  // TODO: Add enum
62
62
  size?: string;
63
63
 
64
+ // currently used, should be replaced by productTypes ( str[] )
65
+ productType?: string;
66
+
67
+ // to be implemented with inferred data
68
+ productTypes?: string[];
69
+
70
+ // to be implemented with inferred data
71
+ genders?: string[];
72
+
64
73
  [key: string]: any;
65
74
  }
66
75
 
@@ -217,6 +226,10 @@ export class Product extends AbstractBase {
217
226
  @Column()
218
227
  inferredCategoriesLvl?: {lvl0?: string[], lvl1?: string[], lvl2?: string[]};
219
228
 
229
+ // Inferred attributes such as product types
230
+ @Column()
231
+ inferredAttributes?: ProductAttributes;
232
+
220
233
  @Column()
221
234
  @Index()
222
235
  processedPricesAt?: Date;
@@ -257,6 +270,7 @@ export class Product extends AbstractBase {
257
270
  @Column()
258
271
  extractedAt?: Date;
259
272
 
273
+ // should set this when price is a validated 0 ex Number(null) === 0
260
274
  @Column()
261
275
  isFree?: boolean;
262
276
  }