store-scrapper-js-common 1.0.106 → 1.0.109

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.
@@ -3,6 +3,7 @@ import { Price } from './price';
3
3
  import { PricesStats } from './prices-stats';
4
4
  import { Keyword } from './keyword';
5
5
  import { HttpRequest } from '../classes/http-request';
6
+ import { ImageTypeEnum } from '../enums/image-type.enum';
6
7
  export declare enum CurrencyEnum {
7
8
  CLP = "clp",
8
9
  CMR_PTS = "cmr_pts",
@@ -24,7 +25,15 @@ export declare enum UpdateReasonEnum {
24
25
  NEW_STOCK = "new_stock",
25
26
  MISSING_DATA = "missing_data",
26
27
  FIX_DATA = "fix_data",
27
- RE_LISTING = "re_listing"
28
+ RE_LISTING = "re_listing",
29
+ CHILDREN_NEW_PRICE = "children_new_price",
30
+ CHILDREN_NEW_CONDITIONAL_PRICE = "children_conditional_new_price",
31
+ CHILDREN_NEW_NAME = "children_new_name",
32
+ CHILDREN_NEW_LISTING = "children_new_listing",
33
+ CHILDREN_NEW_STOCK = "children_new_stock",
34
+ CHILDREN_MISSING_DATA = "children_missing_data",
35
+ CHILDREN_FIX_DATA = "children_fix_data",
36
+ CHILDREN_RE_LISTING = "children_re_listing"
28
37
  }
29
38
  export interface ProductAttributes {
30
39
  stock?: number;
@@ -60,8 +69,14 @@ export declare class Product extends AbstractBase {
60
69
  priceHistory?: Price[];
61
70
  rank?: number;
62
71
  image?: string;
72
+ images?: {
73
+ type: ImageTypeEnum;
74
+ url: string;
75
+ }[];
63
76
  category?: string;
64
77
  categoryPath?: string;
78
+ page?: number;
79
+ userRank?: number;
65
80
  attributes?: ProductAttributes;
66
81
  stockHistory?: {
67
82
  stock: number;
@@ -87,5 +102,5 @@ export declare class Product extends AbstractBase {
87
102
  }[];
88
103
  parentProductIdRef?: string;
89
104
  parentProductSkuRef?: string;
90
- subProducts?: Product[];
105
+ children?: Product[];
91
106
  }
@@ -40,6 +40,14 @@ var UpdateReasonEnum;
40
40
  UpdateReasonEnum["MISSING_DATA"] = "missing_data";
41
41
  UpdateReasonEnum["FIX_DATA"] = "fix_data";
42
42
  UpdateReasonEnum["RE_LISTING"] = "re_listing";
43
+ UpdateReasonEnum["CHILDREN_NEW_PRICE"] = "children_new_price";
44
+ UpdateReasonEnum["CHILDREN_NEW_CONDITIONAL_PRICE"] = "children_conditional_new_price";
45
+ UpdateReasonEnum["CHILDREN_NEW_NAME"] = "children_new_name";
46
+ UpdateReasonEnum["CHILDREN_NEW_LISTING"] = "children_new_listing";
47
+ UpdateReasonEnum["CHILDREN_NEW_STOCK"] = "children_new_stock";
48
+ UpdateReasonEnum["CHILDREN_MISSING_DATA"] = "children_missing_data";
49
+ UpdateReasonEnum["CHILDREN_FIX_DATA"] = "children_fix_data";
50
+ UpdateReasonEnum["CHILDREN_RE_LISTING"] = "children_re_listing";
43
51
  })(UpdateReasonEnum = exports.UpdateReasonEnum || (exports.UpdateReasonEnum = {}));
44
52
  let Product = class Product extends abstract_base_1.AbstractBase {
45
53
  };
@@ -133,6 +141,10 @@ __decorate([
133
141
  typeorm_1.Column(),
134
142
  __metadata("design:type", String)
135
143
  ], Product.prototype, "image", void 0);
144
+ __decorate([
145
+ typeorm_1.Column(),
146
+ __metadata("design:type", Array)
147
+ ], Product.prototype, "images", void 0);
136
148
  __decorate([
137
149
  typeorm_1.Column(),
138
150
  __metadata("design:type", String)
@@ -141,6 +153,14 @@ __decorate([
141
153
  typeorm_1.Column(),
142
154
  __metadata("design:type", String)
143
155
  ], Product.prototype, "categoryPath", void 0);
156
+ __decorate([
157
+ typeorm_1.Column(),
158
+ __metadata("design:type", Number)
159
+ ], Product.prototype, "page", void 0);
160
+ __decorate([
161
+ typeorm_1.Column(),
162
+ __metadata("design:type", Number)
163
+ ], Product.prototype, "userRank", void 0);
144
164
  __decorate([
145
165
  typeorm_1.Column(),
146
166
  __metadata("design:type", Object)
@@ -223,7 +243,7 @@ __decorate([
223
243
  __decorate([
224
244
  typeorm_1.Column(),
225
245
  __metadata("design:type", Array)
226
- ], Product.prototype, "subProducts", void 0);
246
+ ], Product.prototype, "children", void 0);
227
247
  Product = __decorate([
228
248
  typeorm_1.Entity({ name: 'products' }),
229
249
  typeorm_1.Unique('store_ref_sku', ['storeRef', 'sku'])
@@ -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;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,gBAUX;AAVD,WAAY,gBAAgB;IACxB,iCAAa,CAAA;IACb,2CAAuB,CAAA;IACvB,mEAA+C,CAAA;IAC/C,yCAAqB,CAAA;IACrB,+CAA2B,CAAA;IAC3B,2CAAuB,CAAA;IACvB,iDAA6B,CAAA;IAC7B,yCAAqB,CAAA;IACrB,6CAAyB,CAAA;AAC7B,CAAC,EAVW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAU3B;AAuBD,IAAa,OAAO,GAApB,MAAa,OAAQ,SAAQ,4BAAY;CAgJxC,CAAA;AA9IG;IADC,gBAAM,EAAE;;qCACI;AAGb;IADC,gBAAM,EAAE;;0CACU;AAGnB;IADC,gBAAM,EAAE;;oDACoB;AAG7B;IADC,gBAAM,EAAE;;0CACU;AAKnB;IAHC,gBAAM,EAAE;IACR,4BAAU,EAAE;IACZ,eAAK,EAAE;;oCACI;AAGZ;IADC,gBAAM,EAAE;;2CACW;A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GvB;IADC,gBAAM,EAAE;;yCACe;AAGxB;IADC,gBAAM,EAAE;;6CACyB;AAGlC;IADC,gBAAM,EAAE;;4CAIL;AAGJ;IADC,gBAAM,EAAE;;mDACmB;AAG5B;IADC,gBAAM,EAAE;;oDACoB;AAG7B;IADC,gBAAM,EAAE;;4CACc;AA/Id,OAAO;IAFnB,gBAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IAC5B,gBAAM,CAAC,eAAe,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;GAChC,OAAO,CAgJnB;AAhJY,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 NEW_STOCK = 'new_stock',\n MISSING_DATA = 'missing_data',\n FIX_DATA = 'fix_data',\n RE_LISTING = 're_listing',\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 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 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 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 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 parentProductIdRef?: string;\n\n @Column()\n parentProductSkuRef?: string;\n\n @Column()\n subProducts?: Product[]\n}\n"]}
1
+ {"version":3,"file":"product.js","sourceRoot":"/","sources":["entities/product.ts"],"names":[],"mappings":";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AAM,EAAE;;8CACc;AAGvB;IADC,gBAAM,EAAE;;yCACe;AAGxB;IADC,gBAAM,EAAE;;6CACyB;AAGlC;IADC,gBAAM,EAAE;;4CAIL;AAGJ;IADC,gBAAM,EAAE;;mDACmB;AAG5B;IADC,gBAAM,EAAE;;oDACoB;AAG7B;IADC,gBAAM,EAAE;;yCACW;AAxJX,OAAO;IAFnB,gBAAM,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IAC5B,gBAAM,CAAC,eAAe,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;GAChC,OAAO,CAyJnB;AAzJY,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}\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 NEW_STOCK = 'new_stock',\n MISSING_DATA = 'missing_data',\n FIX_DATA = 'fix_data',\n RE_LISTING = 're_listing',\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}\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 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 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 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 parentProductIdRef?: string;\n\n @Column()\n parentProductSkuRef?: string;\n\n @Column()\n children?: Product[]\n}\n"]}
@@ -0,0 +1,5 @@
1
+ export declare enum ImageTypeEnum {
2
+ DEFAULT = "default",
3
+ FULL = "full",
4
+ THUMBNAIL = "thumbnail"
5
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImageTypeEnum = void 0;
4
+ var ImageTypeEnum;
5
+ (function (ImageTypeEnum) {
6
+ ImageTypeEnum["DEFAULT"] = "default";
7
+ ImageTypeEnum["FULL"] = "full";
8
+ ImageTypeEnum["THUMBNAIL"] = "thumbnail";
9
+ })(ImageTypeEnum = exports.ImageTypeEnum || (exports.ImageTypeEnum = {}));
10
+ //# sourceMappingURL=image-type.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-type.enum.js","sourceRoot":"/","sources":["enums/image-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,8BAAa,CAAA;IACb,wCAAuB,CAAA;AACzB,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB","sourcesContent":["export enum ImageTypeEnum {\n DEFAULT = 'default',\n FULL = 'full',\n THUMBNAIL = 'thumbnail',\n}\n"]}
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TelegramQueueCommandEnum = exports.TelegramQueueEnum = exports.TelegramClientEnum = exports.RequestTypeEnum = void 0;
3
+ exports.TelegramMessageType = exports.TelegramQueueCommandEnum = exports.TelegramQueueEnum = exports.TelegramClientEnum = exports.RequestTypeEnum = void 0;
4
4
  const request_type_enum_1 = require("./request-type.enum");
5
5
  Object.defineProperty(exports, "RequestTypeEnum", { enumerable: true, get: function () { return request_type_enum_1.RequestTypeEnum; } });
6
6
  const telegram_client_enum_1 = require("./telegram-client.enum");
7
7
  Object.defineProperty(exports, "TelegramClientEnum", { enumerable: true, get: function () { return telegram_client_enum_1.TelegramClientEnum; } });
8
+ const telegram_message_type_1 = require("./telegram-message-type");
9
+ Object.defineProperty(exports, "TelegramMessageType", { enumerable: true, get: function () { return telegram_message_type_1.TelegramMessageType; } });
8
10
  const telegram_queue_command_enum_1 = require("./telegram-queue-command.enum");
9
11
  Object.defineProperty(exports, "TelegramQueueCommandEnum", { enumerable: true, get: function () { return telegram_queue_command_enum_1.TelegramQueueCommandEnum; } });
10
12
  const telegram_queue_enum_1 = require("./telegram-queue.enum");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["enums/index.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AAOpD,gGAPO,mCAAe,OAOP;AANjB,iEAA4D;AAMzC,mGANV,yCAAkB,OAMU;AAJrC,+EAAyE;AAIf,yGAJjD,sDAAwB,OAIiD;AAHlF,+DAA0D;AAGnB,kGAH9B,uCAAiB,OAG8B","sourcesContent":["import { RequestTypeEnum } from './request-type.enum';\nimport { TelegramClientEnum } from './telegram-client.enum';\nimport { TelegramMessageType } from './telegram-message-type';\nimport { TelegramQueueCommandEnum } from './telegram-queue-command.enum';\nimport { TelegramQueueEnum } from './telegram-queue.enum';\n\nexport {\n RequestTypeEnum, TelegramClientEnum, TelegramQueueEnum, TelegramQueueCommandEnum, TelegramMessageType,\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["enums/index.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AAOpD,gGAPO,mCAAe,OAOP;AANjB,iEAA4D;AAMzC,mGANV,yCAAkB,OAMU;AALrC,mEAA8D;AAKsB,oGAL3E,2CAAmB,OAK2E;AAJvG,+EAAyE;AAIf,yGAJjD,sDAAwB,OAIiD;AAHlF,+DAA0D;AAGnB,kGAH9B,uCAAiB,OAG8B","sourcesContent":["import { RequestTypeEnum } from './request-type.enum';\nimport { TelegramClientEnum } from './telegram-client.enum';\nimport { TelegramMessageType } from './telegram-message-type';\nimport { TelegramQueueCommandEnum } from './telegram-queue-command.enum';\nimport { TelegramQueueEnum } from './telegram-queue.enum';\n\nexport {\n RequestTypeEnum, TelegramClientEnum, TelegramQueueEnum, TelegramQueueCommandEnum, TelegramMessageType,\n};\n"]}
@@ -1,4 +1,4 @@
1
- export declare const enum TelegramMessageType {
1
+ export declare enum TelegramMessageType {
2
2
  MESSAGE = "message",
3
3
  IMAGE = "image"
4
4
  }
@@ -1,3 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TelegramMessageType = void 0;
4
+ var TelegramMessageType;
5
+ (function (TelegramMessageType) {
6
+ TelegramMessageType["MESSAGE"] = "message";
7
+ TelegramMessageType["IMAGE"] = "image";
8
+ })(TelegramMessageType = exports.TelegramMessageType || (exports.TelegramMessageType = {}));
3
9
  //# sourceMappingURL=telegram-message-type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"telegram-message-type.js","sourceRoot":"/","sources":["enums/telegram-message-type.ts"],"names":[],"mappings":"","sourcesContent":["export const enum TelegramMessageType {\n MESSAGE = 'message',\n IMAGE = 'image',\n}\n"]}
1
+ {"version":3,"file":"telegram-message-type.js","sourceRoot":"/","sources":["enums/telegram-message-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,sCAAe,CAAA;AACjB,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B","sourcesContent":["export enum TelegramMessageType {\n MESSAGE = 'message',\n IMAGE = 'image',\n}\n"]}
@@ -13,5 +13,15 @@ export declare enum TelegramQueueEnum {
13
13
  TELEGRAM_RETAIL_CUSTOM_ALERT = "telegram_retail_custom_alert",
14
14
  TELEGRAM_RETAIL_CUSTOM_ALERT_PUBLIC = "telegram_retail_custom_alert_public",
15
15
  TELEGRAM_LOW_RANGE_ALERT = "telegram_low_range_alert",
16
- TELEGRAM_LOW_RANGE_ALERT_PUBLIC = "telegram_low_range_alert_public"
16
+ TELEGRAM_LOW_RANGE_ALERT_PUBLIC = "telegram_low_range_alert_public",
17
+ TELEGRAM_RESELLER_1 = "telegram_reseller_1",
18
+ TELEGRAM_RESELLER_2 = "telegram_reseller_2",
19
+ TELEGRAM_RESELLER_3 = "telegram_reseller_3",
20
+ TELEGRAM_RESELLER_4 = "telegram_reseller_4",
21
+ TELEGRAM_RESELLER_5 = "telegram_reseller_5",
22
+ TELEGRAM_RESELLER_6 = "telegram_reseller_6",
23
+ TELEGRAM_RESELLER_7 = "telegram_reseller_7",
24
+ TELEGRAM_RESELLER_8 = "telegram_reseller_8",
25
+ TELEGRAM_RESELLER_9 = "telegram_reseller_9",
26
+ TELEGRAM_RESELLER_10 = "telegram_reseller_10"
17
27
  }
@@ -18,5 +18,15 @@ var TelegramQueueEnum;
18
18
  TelegramQueueEnum["TELEGRAM_RETAIL_CUSTOM_ALERT_PUBLIC"] = "telegram_retail_custom_alert_public";
19
19
  TelegramQueueEnum["TELEGRAM_LOW_RANGE_ALERT"] = "telegram_low_range_alert";
20
20
  TelegramQueueEnum["TELEGRAM_LOW_RANGE_ALERT_PUBLIC"] = "telegram_low_range_alert_public";
21
+ TelegramQueueEnum["TELEGRAM_RESELLER_1"] = "telegram_reseller_1";
22
+ TelegramQueueEnum["TELEGRAM_RESELLER_2"] = "telegram_reseller_2";
23
+ TelegramQueueEnum["TELEGRAM_RESELLER_3"] = "telegram_reseller_3";
24
+ TelegramQueueEnum["TELEGRAM_RESELLER_4"] = "telegram_reseller_4";
25
+ TelegramQueueEnum["TELEGRAM_RESELLER_5"] = "telegram_reseller_5";
26
+ TelegramQueueEnum["TELEGRAM_RESELLER_6"] = "telegram_reseller_6";
27
+ TelegramQueueEnum["TELEGRAM_RESELLER_7"] = "telegram_reseller_7";
28
+ TelegramQueueEnum["TELEGRAM_RESELLER_8"] = "telegram_reseller_8";
29
+ TelegramQueueEnum["TELEGRAM_RESELLER_9"] = "telegram_reseller_9";
30
+ TelegramQueueEnum["TELEGRAM_RESELLER_10"] = "telegram_reseller_10";
21
31
  })(TelegramQueueEnum = exports.TelegramQueueEnum || (exports.TelegramQueueEnum = {}));
22
32
  //# sourceMappingURL=telegram-queue.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"telegram-queue.enum.js","sourceRoot":"/","sources":["enums/telegram-queue.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAgBX;AAhBD,WAAY,iBAAiB;IAC3B,sDAAiC,CAAA;IACjC,sEAAiD,CAAA;IACjD,8EAAyD,CAAA;IACzD,iFAA4D,CAAA;IAC5D,yEAAoD,CAAA;IACpD,kEAA6C,CAAA;IAC7C,gFAA2D,CAAA;IAC3D,4EAAuD,CAAA;IACvD,0FAAqE,CAAA;IACrE,kFAA6D,CAAA;IAC7D,gGAA2E,CAAA;IAC3E,kFAA6D,CAAA;IAC7D,gGAA2E,CAAA;IAC3E,0EAAqD,CAAA;IACrD,wFAAmE,CAAA;AACrE,CAAC,EAhBW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAgB5B","sourcesContent":["export enum TelegramQueueEnum {\n TELEGRAM_ALERT = 'telegram_alert',\n TELEGRAM_ALERT_PUBLIC_1 = 'telegram_alert_public',\n TELEGRAM_ALERT_PUBLIC_2 = 'telegram_alert_public_non_vip',\n TELEGRAM_ALERT_PUBLIC_3 = 'telegram_alert_public_non_vip_60',\n TELEGRAM_ALERT_PUBLIC_4 = 'telegram_alert_public_60',\n TELEGRAM_STOCK_ALERT = 'telegram_stock_alert',\n TELEGRAM_STOCK_ALERT_PUBLIC = 'telegram_stock_alert_public',\n TELEGRAM_STOCK_DOWN_ALERT = 'telegram_stock_down_alert',\n TELEGRAM_STOCK_DOWN_ALERT_PUBLIC = 'telegram_stock_down_alert_public',\n TELEGRAM_CURRENT_PRICE_ALERT = 'telegram_current_price_alert',\n TELEGRAM_CURRENT_PRICE_ALERT_PUBLIC = 'telegram_current_price_alert_public',\n TELEGRAM_RETAIL_CUSTOM_ALERT = 'telegram_retail_custom_alert',\n TELEGRAM_RETAIL_CUSTOM_ALERT_PUBLIC = 'telegram_retail_custom_alert_public',\n TELEGRAM_LOW_RANGE_ALERT = 'telegram_low_range_alert',\n TELEGRAM_LOW_RANGE_ALERT_PUBLIC = 'telegram_low_range_alert_public',\n}\n"]}
1
+ {"version":3,"file":"telegram-queue.enum.js","sourceRoot":"/","sources":["enums/telegram-queue.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBA2BX;AA3BD,WAAY,iBAAiB;IAC3B,sDAAiC,CAAA;IACjC,sEAAiD,CAAA;IACjD,8EAAyD,CAAA;IACzD,iFAA4D,CAAA;IAC5D,yEAAoD,CAAA;IACpD,kEAA6C,CAAA;IAC7C,gFAA2D,CAAA;IAC3D,4EAAuD,CAAA;IACvD,0FAAqE,CAAA;IACrE,kFAA6D,CAAA;IAC7D,gGAA2E,CAAA;IAC3E,kFAA6D,CAAA;IAC7D,gGAA2E,CAAA;IAC3E,0EAAqD,CAAA;IACrD,wFAAmE,CAAA;IAEnE,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAC3C,kEAA6C,CAAA;AAC/C,CAAC,EA3BW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QA2B5B","sourcesContent":["export enum TelegramQueueEnum {\n TELEGRAM_ALERT = 'telegram_alert',\n TELEGRAM_ALERT_PUBLIC_1 = 'telegram_alert_public',\n TELEGRAM_ALERT_PUBLIC_2 = 'telegram_alert_public_non_vip',\n TELEGRAM_ALERT_PUBLIC_3 = 'telegram_alert_public_non_vip_60',\n TELEGRAM_ALERT_PUBLIC_4 = 'telegram_alert_public_60',\n TELEGRAM_STOCK_ALERT = 'telegram_stock_alert',\n TELEGRAM_STOCK_ALERT_PUBLIC = 'telegram_stock_alert_public',\n TELEGRAM_STOCK_DOWN_ALERT = 'telegram_stock_down_alert',\n TELEGRAM_STOCK_DOWN_ALERT_PUBLIC = 'telegram_stock_down_alert_public',\n TELEGRAM_CURRENT_PRICE_ALERT = 'telegram_current_price_alert',\n TELEGRAM_CURRENT_PRICE_ALERT_PUBLIC = 'telegram_current_price_alert_public',\n TELEGRAM_RETAIL_CUSTOM_ALERT = 'telegram_retail_custom_alert',\n TELEGRAM_RETAIL_CUSTOM_ALERT_PUBLIC = 'telegram_retail_custom_alert_public',\n TELEGRAM_LOW_RANGE_ALERT = 'telegram_low_range_alert',\n TELEGRAM_LOW_RANGE_ALERT_PUBLIC = 'telegram_low_range_alert_public',\n\n TELEGRAM_RESELLER_1 = 'telegram_reseller_1',\n TELEGRAM_RESELLER_2 = 'telegram_reseller_2',\n TELEGRAM_RESELLER_3 = 'telegram_reseller_3',\n TELEGRAM_RESELLER_4 = 'telegram_reseller_4',\n TELEGRAM_RESELLER_5 = 'telegram_reseller_5',\n TELEGRAM_RESELLER_6 = 'telegram_reseller_6',\n TELEGRAM_RESELLER_7 = 'telegram_reseller_7',\n TELEGRAM_RESELLER_8 = 'telegram_reseller_8',\n TELEGRAM_RESELLER_9 = 'telegram_reseller_9',\n TELEGRAM_RESELLER_10 = 'telegram_reseller_10',\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "store-scrapper-js-common",
3
- "version": "1.0.106",
3
+ "version": "1.0.109",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,6 +8,7 @@ import { Price } from './price';
8
8
  import { PricesStats } from './prices-stats';
9
9
  import { Keyword } from './keyword';
10
10
  import { HttpRequest } from '../classes/http-request';
11
+ import { ImageTypeEnum } from '../enums/image-type.enum';
11
12
 
12
13
  export enum CurrencyEnum {
13
14
  CLP = 'clp',
@@ -32,6 +33,15 @@ export enum UpdateReasonEnum {
32
33
  MISSING_DATA = 'missing_data',
33
34
  FIX_DATA = 'fix_data',
34
35
  RE_LISTING = 're_listing',
36
+
37
+ CHILDREN_NEW_PRICE = 'children_new_price',
38
+ CHILDREN_NEW_CONDITIONAL_PRICE = 'children_conditional_new_price',
39
+ CHILDREN_NEW_NAME = 'children_new_name',
40
+ CHILDREN_NEW_LISTING = 'children_new_listing',
41
+ CHILDREN_NEW_STOCK = 'children_new_stock',
42
+ CHILDREN_MISSING_DATA = 'children_missing_data',
43
+ CHILDREN_FIX_DATA = 'children_fix_data',
44
+ CHILDREN_RE_LISTING = 'children_re_listing',
35
45
  }
36
46
 
37
47
  export interface ProductAttributes {
@@ -125,12 +135,21 @@ export class Product extends AbstractBase {
125
135
  @Column()
126
136
  image?: string;
127
137
 
138
+ @Column()
139
+ images?: { type: ImageTypeEnum, url: string }[]
140
+
128
141
  @Column()
129
142
  category?: string;
130
143
 
131
144
  @Column()
132
145
  categoryPath?: string;
133
146
 
147
+ @Column()
148
+ page?: number;
149
+
150
+ @Column()
151
+ userRank?: number;
152
+
134
153
  @Column()
135
154
  attributes?: ProductAttributes;
136
155
 
@@ -198,5 +217,5 @@ export class Product extends AbstractBase {
198
217
  parentProductSkuRef?: string;
199
218
 
200
219
  @Column()
201
- subProducts?: Product[]
220
+ children?: Product[]
202
221
  }
@@ -0,0 +1,5 @@
1
+ export enum ImageTypeEnum {
2
+ DEFAULT = 'default',
3
+ FULL = 'full',
4
+ THUMBNAIL = 'thumbnail',
5
+ }
@@ -1,4 +1,4 @@
1
- export const enum TelegramMessageType {
1
+ export enum TelegramMessageType {
2
2
  MESSAGE = 'message',
3
3
  IMAGE = 'image',
4
4
  }
@@ -14,4 +14,15 @@ export enum TelegramQueueEnum {
14
14
  TELEGRAM_RETAIL_CUSTOM_ALERT_PUBLIC = 'telegram_retail_custom_alert_public',
15
15
  TELEGRAM_LOW_RANGE_ALERT = 'telegram_low_range_alert',
16
16
  TELEGRAM_LOW_RANGE_ALERT_PUBLIC = 'telegram_low_range_alert_public',
17
+
18
+ TELEGRAM_RESELLER_1 = 'telegram_reseller_1',
19
+ TELEGRAM_RESELLER_2 = 'telegram_reseller_2',
20
+ TELEGRAM_RESELLER_3 = 'telegram_reseller_3',
21
+ TELEGRAM_RESELLER_4 = 'telegram_reseller_4',
22
+ TELEGRAM_RESELLER_5 = 'telegram_reseller_5',
23
+ TELEGRAM_RESELLER_6 = 'telegram_reseller_6',
24
+ TELEGRAM_RESELLER_7 = 'telegram_reseller_7',
25
+ TELEGRAM_RESELLER_8 = 'telegram_reseller_8',
26
+ TELEGRAM_RESELLER_9 = 'telegram_reseller_9',
27
+ TELEGRAM_RESELLER_10 = 'telegram_reseller_10',
17
28
  }