store-scrapper-js-common 1.0.97 → 1.0.101

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.
@@ -1,4 +1,4 @@
1
- import { StoreQueueConfig, Store, CountryEnum, PriorityEnum } from './store';
1
+ import { StoreQueueConfig, Store, CountryEnum, PriorityEnum, StoreConfig } from './store';
2
2
  import { Product, UpdateReasonEnum, CurrencyEnum, ProductAttributes, ConditionalPrice } from './product';
3
3
  import { Price, MeasurementUnitEnum } from './price';
4
4
  import { Category } from './category';
@@ -9,4 +9,4 @@ import { AlertConditions } from './alert-conditions';
9
9
  import { PricesStats } from './prices-stats';
10
10
  import { CategoryEntity } from './category-entity';
11
11
  export declare const Entities: (typeof Price | typeof Keyword | typeof Product | typeof Store | typeof User)[];
12
- export { Store, Product, Price, Category, CategoryEntity, AbstractBase, Keyword, CONDITION_FIELD_ENUM, CONDITION_ENUM, CATEGORY_ENUM, User, AlertConditions, StoreQueueConfig, CountryEnum, PriorityEnum, CurrencyEnum, UpdateReasonEnum, ConditionalPrice, ProductAttributes, MeasurementUnitEnum, PricesStats, };
12
+ export { Store, Product, Price, Category, CategoryEntity, AbstractBase, Keyword, CONDITION_FIELD_ENUM, CONDITION_ENUM, CATEGORY_ENUM, User, AlertConditions, StoreQueueConfig, StoreConfig, CountryEnum, PriorityEnum, CurrencyEnum, UpdateReasonEnum, ConditionalPrice, ProductAttributes, MeasurementUnitEnum, PricesStats, };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["entities/index.ts"],"names":[],"mappings":";;;AAAA,mCAEiB;AAoBf,sFArBkB,aAAK,OAqBlB;AACmE,4FAtB/C,mBAAW,OAsB+C;AAAE,6FAtB/C,oBAAY,OAsB+C;AApBnG,uCAEmB;AAiBV,wFAlBP,iBAAO,OAkBO;AAEA,iGApBL,0BAAgB,OAoBK;AAA9B,6FApB2B,sBAAY,OAoB3B;AAlBd,mCAAqD;AAgBnC,sFAhBT,aAAK,OAgBS;AAEgD,oGAlBvD,2BAAmB,OAkBuD;AAjB1F,yCAAsC;AAeb,yFAfhB,mBAAQ,OAegB;AAdjC,mDAA+C;AAcI,6FAd1C,4BAAY,OAc0C;AAb/D,uCAEmB;AAW8C,wFAZ/D,iBAAO,OAY+D;AACtD,8FAbP,uBAAa,OAaO;AAA7B,+FAbwB,wBAAc,OAaxB;AAD0D,qGAZhC,8BAAoB,OAYgC;AAV9F,iCAA8B;AAWG,qFAXxB,WAAI,OAWwB;AAVrC,yDAAqD;AAUd,gGAV9B,kCAAe,OAU8B;AATtD,iDAA6C;AAU+C,4FAVnF,0BAAW,OAUmF;AATvG,uDAAmD;AAOhB,+FAP1B,gCAAc,OAO0B;AALpC,QAAA,QAAQ,GAAG;IACtB,aAAK,EAAE,iBAAO,EAAE,aAAK,EAAE,iBAAO,EAAE,WAAI;CACrC,CAAC","sourcesContent":["import {\n StoreQueueConfig, Store, CountryEnum, PriorityEnum,\n} from './store';\nimport {\n Product, UpdateReasonEnum, CurrencyEnum, ProductAttributes, ConditionalPrice,\n} from './product';\nimport { Price, MeasurementUnitEnum } from './price';\nimport { Category } from './category';\nimport { AbstractBase } from './abstract-base';\nimport {\n Keyword, CATEGORY_ENUM, CONDITION_ENUM, CONDITION_FIELD_ENUM,\n} from './keyword';\nimport { User } from './user';\nimport { AlertConditions } from './alert-conditions';\nimport { PricesStats } from './prices-stats';\nimport { CategoryEntity } from './category-entity';\n\nexport const Entities = [\n Store, Product, Price, Keyword, User,\n];\n\nexport {\n Store, Product, Price, Category, CategoryEntity, AbstractBase, Keyword, CONDITION_FIELD_ENUM,\n CONDITION_ENUM, CATEGORY_ENUM, User, AlertConditions, StoreQueueConfig, CountryEnum, PriorityEnum,\n CurrencyEnum, UpdateReasonEnum, ConditionalPrice, ProductAttributes, MeasurementUnitEnum, PricesStats,\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["entities/index.ts"],"names":[],"mappings":";;;AAAA,mCAEiB;AAoBf,sFArBkB,aAAK,OAqBlB;AACgF,4FAtB5D,mBAAW,OAsB4D;AAAE,6FAtB5D,oBAAY,OAsB4D;AApBhH,uCAEmB;AAiBV,wFAlBP,iBAAO,OAkBO;AAEA,iGApBL,0BAAgB,OAoBK;AAA9B,6FApB2B,sBAAY,OAoB3B;AAlBd,mCAAqD;AAgBnC,sFAhBT,aAAK,OAgBS;AAEgD,oGAlBvD,2BAAmB,OAkBuD;AAjB1F,yCAAsC;AAeb,yFAfhB,mBAAQ,OAegB;AAdjC,mDAA+C;AAcI,6FAd1C,4BAAY,OAc0C;AAb/D,uCAEmB;AAW8C,wFAZ/D,iBAAO,OAY+D;AACtD,8FAbP,uBAAa,OAaO;AAA7B,+FAbwB,wBAAc,OAaxB;AAD0D,qGAZhC,8BAAoB,OAYgC;AAV9F,iCAA8B;AAWG,qFAXxB,WAAI,OAWwB;AAVrC,yDAAqD;AAUd,gGAV9B,kCAAe,OAU8B;AATtD,iDAA6C;AAU+C,4FAVnF,0BAAW,OAUmF;AATvG,uDAAmD;AAOhB,+FAP1B,gCAAc,OAO0B;AALpC,QAAA,QAAQ,GAAG;IACtB,aAAK,EAAE,iBAAO,EAAE,aAAK,EAAE,iBAAO,EAAE,WAAI;CACrC,CAAC","sourcesContent":["import {\n StoreQueueConfig, Store, CountryEnum, PriorityEnum, StoreConfig,\n} from './store';\nimport {\n Product, UpdateReasonEnum, CurrencyEnum, ProductAttributes, ConditionalPrice,\n} from './product';\nimport { Price, MeasurementUnitEnum } from './price';\nimport { Category } from './category';\nimport { AbstractBase } from './abstract-base';\nimport {\n Keyword, CATEGORY_ENUM, CONDITION_ENUM, CONDITION_FIELD_ENUM,\n} from './keyword';\nimport { User } from './user';\nimport { AlertConditions } from './alert-conditions';\nimport { PricesStats } from './prices-stats';\nimport { CategoryEntity } from './category-entity';\n\nexport const Entities = [\n Store, Product, Price, Keyword, User,\n];\n\nexport {\n Store, Product, Price, Category, CategoryEntity, AbstractBase, Keyword, CONDITION_FIELD_ENUM,\n CONDITION_ENUM, CATEGORY_ENUM, User, AlertConditions, StoreQueueConfig, StoreConfig, CountryEnum, PriorityEnum,\n CurrencyEnum, UpdateReasonEnum, ConditionalPrice, ProductAttributes, MeasurementUnitEnum, PricesStats,\n};\n"]}
@@ -10,6 +10,14 @@ export interface StoreQueueConfig {
10
10
  duration: number;
11
11
  };
12
12
  }
13
+ export interface StoreConfig {
14
+ name: string;
15
+ filterCategories?: string[];
16
+ skipCategories?: string[];
17
+ cacheMenus?: boolean;
18
+ headers?: ObjectLiteral;
19
+ proxySettings?: ObjectLiteral;
20
+ }
13
21
  export declare enum CountryEnum {
14
22
  CHILE = "chile",
15
23
  ARGENTINA = "argentina",
@@ -17,9 +25,13 @@ export declare enum CountryEnum {
17
25
  BRAZIL = "brazil"
18
26
  }
19
27
  export declare enum PriorityEnum {
28
+ VERY_HIGH = "very_high",
20
29
  HIGH = "high",
21
30
  MEDIUM = "medium",
22
- LOW = "low"
31
+ LOW = "low",
32
+ SHOES_HIGH = "shoes_high",
33
+ SHOES_MEDIUM = "shoes_medium",
34
+ SHOES_LOW = "shoes_low"
23
35
  }
24
36
  export declare class Store extends AbstractBase {
25
37
  name: string;
@@ -35,6 +47,7 @@ export declare class Store extends AbstractBase {
35
47
  storeQueueConfig?: StoreQueueConfig[];
36
48
  country?: CountryEnum | string;
37
49
  defaultCurrency?: CurrencyEnum | string;
50
+ config?: StoreConfig;
38
51
  scraperConfig?: {
39
52
  filterCategories?: string[];
40
53
  skipCategories?: string[];
@@ -22,9 +22,13 @@ var CountryEnum;
22
22
  })(CountryEnum = exports.CountryEnum || (exports.CountryEnum = {}));
23
23
  var PriorityEnum;
24
24
  (function (PriorityEnum) {
25
+ PriorityEnum["VERY_HIGH"] = "very_high";
25
26
  PriorityEnum["HIGH"] = "high";
26
27
  PriorityEnum["MEDIUM"] = "medium";
27
28
  PriorityEnum["LOW"] = "low";
29
+ PriorityEnum["SHOES_HIGH"] = "shoes_high";
30
+ PriorityEnum["SHOES_MEDIUM"] = "shoes_medium";
31
+ PriorityEnum["SHOES_LOW"] = "shoes_low";
28
32
  })(PriorityEnum = exports.PriorityEnum || (exports.PriorityEnum = {}));
29
33
  let Store = class Store extends abstract_base_1.AbstractBase {
30
34
  constructor() {
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","sourceRoot":"/","sources":["entities/store.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAEiB;AACjB,qDAA6C;AAC7C,mDAA+C;AAgB/C,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,8BAAe,CAAA;IACf,sCAAuB,CAAA;IACvB,4BAAa,CAAA;IACb,gCAAiB,CAAA;AACrB,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB;AAED,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,6BAAa,CAAA;IACb,iCAAiB,CAAA;IACjB,2BAAW,CAAA;AACf,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB;AAID,IAAa,KAAK,GAAlB,MAAa,KAAM,SAAQ,4BAAY;IAAvC;;QA0BI,YAAO,GAAG,IAAI,CAAC;IAuBnB,CAAC;CAAA,CAAA;AA7CG;IAHC,gBAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC3B,eAAK,EAAE;IACP,4BAAU,EAAE;;mCACA;AAGb;IADC,gBAAM,EAAE;;0CACY;AAIrB;IAFC,gBAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC3B,4BAAU,EAAE;;kCACD;AAGZ;IADC,gBAAM,EAAE;;yCACoB;AAG7B;IADC,gBAAM,EAAE;;uCACe;AAGxB;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;;+CAC6B;AAGtC;IADC,gBAAM,EAAE;;sCACsB;AAG/B;IADC,gBAAM,EAAE;;8CAC+B;AAGxC;IADC,gBAAM,EAAE;;4CAKR;AAhDQ,KAAK;IAFjB,gBAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC1B,gBAAM,CAAC,CAAC,KAAK,CAAC,CAAC;GACH,KAAK,CAiDjB;AAjDY,sBAAK","sourcesContent":["import {\n Column, Entity, Index, Unique,\n} from 'typeorm';\nimport { IsNotEmpty } from 'class-validator';\nimport { AbstractBase } from './abstract-base';\nimport { CurrencyEnum } from './product';\nimport { ObjectLiteral } from '../classes';\nimport { CATEGORY_ENUM } from './keyword';\n\nexport interface StoreQueueConfig {\n name?: string;\n concurrency?: number;\n rateLimiter?: {\n /** Max numbers of jobs processed */\n max: number,\n /** Per duration in milliseconds */\n duration: number\n }\n}\n\nexport enum CountryEnum {\n CHILE = 'chile',\n ARGENTINA = 'argentina',\n PERU = 'peru',\n BRAZIL = 'brazil'\n}\n\nexport enum PriorityEnum {\n HIGH = 'high',\n MEDIUM = 'medium',\n LOW = '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;\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?: StoreQueueConfig[];\n\n @Column()\n country?: CountryEnum | string;\n\n @Column()\n defaultCurrency?: CurrencyEnum | string;\n\n @Column()\n scraperConfig?: {\n filterCategories?: string[];\n skipCategories?: string[];\n headers?: ObjectLiteral;\n }\n}\n"]}
1
+ {"version":3,"file":"store.js","sourceRoot":"/","sources":["entities/store.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAEiB;AACjB,qDAA6C;AAC7C,mDAA+C;AAyB/C,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,8BAAe,CAAA;IACf,sCAAuB,CAAA;IACvB,4BAAa,CAAA;IACb,gCAAiB,CAAA;AACrB,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB;AAED,IAAY,YASX;AATD,WAAY,YAAY;IACpB,uCAAuB,CAAA;IACvB,6BAAa,CAAA;IACb,iCAAiB,CAAA;IACjB,2BAAW,CAAA;IAEX,yCAAyB,CAAA;IACzB,6CAA6B,CAAA;IAC7B,uCAAuB,CAAA;AAC3B,CAAC,EATW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QASvB;AAID,IAAa,KAAK,GAAlB,MAAa,KAAM,SAAQ,4BAAY;IAAvC;;QA0BI,YAAO,GAAG,IAAI,CAAC;IAyBnB,CAAC;CAAA,CAAA;AA/CG;IAHC,gBAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC3B,eAAK,EAAE;IACP,4BAAU,EAAE;;mCACA;AAGb;IADC,gBAAM,EAAE;;0CACY;AAIrB;IAFC,gBAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC3B,4BAAU,EAAE;;kCACD;AAGZ;IADC,gBAAM,EAAE;;yCACoB;AAG7B;IADC,gBAAM,EAAE;;uCACe;AAGxB;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;;+CAC6B;AAGtC;IADC,gBAAM,EAAE;;sCACsB;AAG/B;IADC,gBAAM,EAAE;;8CAC+B;AAKxC;IADC,gBAAM,EAAE;;4CAKR;AAlDQ,KAAK;IAFjB,gBAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC1B,gBAAM,CAAC,CAAC,KAAK,CAAC,CAAC;GACH,KAAK,CAmDjB;AAnDY,sBAAK","sourcesContent":["import {\n Column, Entity, Index, Unique,\n} from 'typeorm';\nimport { IsNotEmpty } from 'class-validator';\nimport { AbstractBase } from './abstract-base';\nimport { CurrencyEnum } from './product';\nimport { ObjectLiteral } from '../classes';\nimport { CATEGORY_ENUM } from './keyword';\n\nexport interface StoreQueueConfig {\n name?: string;\n concurrency?: number;\n rateLimiter?: {\n /** Max numbers of jobs processed */\n max: number,\n /** Per duration in milliseconds */\n duration: number\n }\n}\n\nexport interface StoreConfig {\n name: string;\n filterCategories?: string[];\n skipCategories?: string[];\n cacheMenus?: boolean;\n headers?: ObjectLiteral;\n proxySettings?: ObjectLiteral;\n}\n\nexport enum CountryEnum {\n CHILE = 'chile',\n ARGENTINA = 'argentina',\n PERU = 'peru',\n BRAZIL = 'brazil'\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\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;\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?: StoreQueueConfig[];\n\n @Column()\n country?: CountryEnum | string;\n\n @Column()\n defaultCurrency?: CurrencyEnum | string;\n\n config?: StoreConfig;\n\n @Column()\n scraperConfig?: {\n filterCategories?: string[];\n skipCategories?: string[];\n headers?: ObjectLiteral;\n }\n}\n"]}
@@ -4,9 +4,14 @@ export declare enum TelegramQueueEnum {
4
4
  TELEGRAM_ALERT_PUBLIC_2 = "telegram_alert_public_non_vip",
5
5
  TELEGRAM_ALERT_PUBLIC_3 = "telegram_alert_public_non_vip_60",
6
6
  TELEGRAM_ALERT_PUBLIC_4 = "telegram_alert_public_60",
7
+ TELEGRAM_STOCK_ALERT = "telegram_stock_alert",
7
8
  TELEGRAM_STOCK_ALERT_PUBLIC = "telegram_stock_alert_public",
8
9
  TELEGRAM_STOCK_DOWN_ALERT = "telegram_stock_down_alert",
10
+ TELEGRAM_STOCK_DOWN_ALERT_PUBLIC = "telegram_stock_down_alert_public",
9
11
  TELEGRAM_CURRENT_PRICE_ALERT = "telegram_current_price_alert",
12
+ TELEGRAM_CURRENT_PRICE_ALERT_PUBLIC = "telegram_current_price_alert_public",
10
13
  TELEGRAM_RETAIL_CUSTOM_ALERT = "telegram_retail_custom_alert",
11
- TELEGRAM_LOW_RANGE_ALERT = "telegram_low_range_alert"
14
+ TELEGRAM_RETAIL_CUSTOM_ALERT_PUBLIC = "telegram_retail_custom_alert_public",
15
+ TELEGRAM_LOW_RANGE_ALERT = "telegram_low_range_alert",
16
+ TELEGRAM_LOW_RANGE_ALERT_PUBLIC = "telegram_low_range_alert_public"
12
17
  }
@@ -8,10 +8,15 @@ var TelegramQueueEnum;
8
8
  TelegramQueueEnum["TELEGRAM_ALERT_PUBLIC_2"] = "telegram_alert_public_non_vip";
9
9
  TelegramQueueEnum["TELEGRAM_ALERT_PUBLIC_3"] = "telegram_alert_public_non_vip_60";
10
10
  TelegramQueueEnum["TELEGRAM_ALERT_PUBLIC_4"] = "telegram_alert_public_60";
11
+ TelegramQueueEnum["TELEGRAM_STOCK_ALERT"] = "telegram_stock_alert";
11
12
  TelegramQueueEnum["TELEGRAM_STOCK_ALERT_PUBLIC"] = "telegram_stock_alert_public";
12
13
  TelegramQueueEnum["TELEGRAM_STOCK_DOWN_ALERT"] = "telegram_stock_down_alert";
14
+ TelegramQueueEnum["TELEGRAM_STOCK_DOWN_ALERT_PUBLIC"] = "telegram_stock_down_alert_public";
13
15
  TelegramQueueEnum["TELEGRAM_CURRENT_PRICE_ALERT"] = "telegram_current_price_alert";
16
+ TelegramQueueEnum["TELEGRAM_CURRENT_PRICE_ALERT_PUBLIC"] = "telegram_current_price_alert_public";
14
17
  TelegramQueueEnum["TELEGRAM_RETAIL_CUSTOM_ALERT"] = "telegram_retail_custom_alert";
18
+ TelegramQueueEnum["TELEGRAM_RETAIL_CUSTOM_ALERT_PUBLIC"] = "telegram_retail_custom_alert_public";
15
19
  TelegramQueueEnum["TELEGRAM_LOW_RANGE_ALERT"] = "telegram_low_range_alert";
20
+ TelegramQueueEnum["TELEGRAM_LOW_RANGE_ALERT_PUBLIC"] = "telegram_low_range_alert_public";
16
21
  })(TelegramQueueEnum = exports.TelegramQueueEnum || (exports.TelegramQueueEnum = {}));
17
22
  //# 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,iBAWX;AAXD,WAAY,iBAAiB;IAC3B,sDAAiC,CAAA;IACjC,sEAAiD,CAAA;IACjD,8EAAyD,CAAA;IACzD,iFAA4D,CAAA;IAC5D,yEAAoD,CAAA;IACpD,gFAA2D,CAAA;IAC3D,4EAAuD,CAAA;IACvD,kFAA6D,CAAA;IAC7D,kFAA6D,CAAA;IAC7D,0EAAqD,CAAA;AACvD,CAAC,EAXW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAW5B","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_PUBLIC = 'telegram_stock_alert_public',\n TELEGRAM_STOCK_DOWN_ALERT = 'telegram_stock_down_alert',\n TELEGRAM_CURRENT_PRICE_ALERT = 'telegram_current_price_alert',\n TELEGRAM_RETAIL_CUSTOM_ALERT = 'telegram_retail_custom_alert',\n TELEGRAM_LOW_RANGE_ALERT = 'telegram_low_range_alert',\n}\n"]}
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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "store-scrapper-js-common",
3
- "version": "1.0.97",
3
+ "version": "1.0.101",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,5 +1,5 @@
1
1
  import {
2
- StoreQueueConfig, Store, CountryEnum, PriorityEnum,
2
+ StoreQueueConfig, Store, CountryEnum, PriorityEnum, StoreConfig,
3
3
  } from './store';
4
4
  import {
5
5
  Product, UpdateReasonEnum, CurrencyEnum, ProductAttributes, ConditionalPrice,
@@ -21,6 +21,6 @@ export const Entities = [
21
21
 
22
22
  export {
23
23
  Store, Product, Price, Category, CategoryEntity, AbstractBase, Keyword, CONDITION_FIELD_ENUM,
24
- CONDITION_ENUM, CATEGORY_ENUM, User, AlertConditions, StoreQueueConfig, CountryEnum, PriorityEnum,
24
+ CONDITION_ENUM, CATEGORY_ENUM, User, AlertConditions, StoreQueueConfig, StoreConfig, CountryEnum, PriorityEnum,
25
25
  CurrencyEnum, UpdateReasonEnum, ConditionalPrice, ProductAttributes, MeasurementUnitEnum, PricesStats,
26
26
  };
@@ -18,6 +18,15 @@ export interface StoreQueueConfig {
18
18
  }
19
19
  }
20
20
 
21
+ export interface StoreConfig {
22
+ name: string;
23
+ filterCategories?: string[];
24
+ skipCategories?: string[];
25
+ cacheMenus?: boolean;
26
+ headers?: ObjectLiteral;
27
+ proxySettings?: ObjectLiteral;
28
+ }
29
+
21
30
  export enum CountryEnum {
22
31
  CHILE = 'chile',
23
32
  ARGENTINA = 'argentina',
@@ -26,9 +35,14 @@ export enum CountryEnum {
26
35
  }
27
36
 
28
37
  export enum PriorityEnum {
38
+ VERY_HIGH = 'very_high',
29
39
  HIGH = 'high',
30
40
  MEDIUM = 'medium',
31
- LOW = 'low'
41
+ LOW = 'low',
42
+
43
+ SHOES_HIGH = 'shoes_high',
44
+ SHOES_MEDIUM = 'shoes_medium',
45
+ SHOES_LOW = 'shoes_low',
32
46
  }
33
47
 
34
48
  @Entity({ name: 'stores' })
@@ -76,6 +90,8 @@ export class Store extends AbstractBase {
76
90
  @Column()
77
91
  defaultCurrency?: CurrencyEnum | string;
78
92
 
93
+ config?: StoreConfig;
94
+
79
95
  @Column()
80
96
  scraperConfig?: {
81
97
  filterCategories?: string[];
@@ -4,9 +4,14 @@ export enum TelegramQueueEnum {
4
4
  TELEGRAM_ALERT_PUBLIC_2 = 'telegram_alert_public_non_vip',
5
5
  TELEGRAM_ALERT_PUBLIC_3 = 'telegram_alert_public_non_vip_60',
6
6
  TELEGRAM_ALERT_PUBLIC_4 = 'telegram_alert_public_60',
7
+ TELEGRAM_STOCK_ALERT = 'telegram_stock_alert',
7
8
  TELEGRAM_STOCK_ALERT_PUBLIC = 'telegram_stock_alert_public',
8
9
  TELEGRAM_STOCK_DOWN_ALERT = 'telegram_stock_down_alert',
10
+ TELEGRAM_STOCK_DOWN_ALERT_PUBLIC = 'telegram_stock_down_alert_public',
9
11
  TELEGRAM_CURRENT_PRICE_ALERT = 'telegram_current_price_alert',
12
+ TELEGRAM_CURRENT_PRICE_ALERT_PUBLIC = 'telegram_current_price_alert_public',
10
13
  TELEGRAM_RETAIL_CUSTOM_ALERT = 'telegram_retail_custom_alert',
14
+ TELEGRAM_RETAIL_CUSTOM_ALERT_PUBLIC = 'telegram_retail_custom_alert_public',
11
15
  TELEGRAM_LOW_RANGE_ALERT = 'telegram_low_range_alert',
16
+ TELEGRAM_LOW_RANGE_ALERT_PUBLIC = 'telegram_low_range_alert_public',
12
17
  }