store-scrapper-js-common 1.0.94 → 1.0.98

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.
@@ -4,5 +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_PUBLIC = "telegram_stock_alert_public"
7
+ TELEGRAM_STOCK_ALERT = "telegram_stock_alert",
8
+ TELEGRAM_STOCK_ALERT_PUBLIC = "telegram_stock_alert_public",
9
+ TELEGRAM_STOCK_DOWN_ALERT = "telegram_stock_down_alert",
10
+ TELEGRAM_STOCK_DOWN_ALERT_PUBLIC = "telegram_stock_down_alert_public",
11
+ TELEGRAM_CURRENT_PRICE_ALERT = "telegram_current_price_alert",
12
+ TELEGRAM_CURRENT_PRICE_ALERT_PUBLIC = "telegram_current_price_alert_public",
13
+ TELEGRAM_RETAIL_CUSTOM_ALERT = "telegram_retail_custom_alert",
14
+ TELEGRAM_RETAIL_CUSTOM_ALERT_PUBLIC = "telegram_retail_custom_alert_public",
15
+ TELEGRAM_LOW_RANGE_ALERT = "telegram_low_range",
16
+ TELEGRAM_LOW_RANGE_ALERT_PUBLIC = "telegram_low_range_alert"
8
17
  }
@@ -8,6 +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";
13
+ TelegramQueueEnum["TELEGRAM_STOCK_DOWN_ALERT"] = "telegram_stock_down_alert";
14
+ TelegramQueueEnum["TELEGRAM_STOCK_DOWN_ALERT_PUBLIC"] = "telegram_stock_down_alert_public";
15
+ TelegramQueueEnum["TELEGRAM_CURRENT_PRICE_ALERT"] = "telegram_current_price_alert";
16
+ TelegramQueueEnum["TELEGRAM_CURRENT_PRICE_ALERT_PUBLIC"] = "telegram_current_price_alert_public";
17
+ TelegramQueueEnum["TELEGRAM_RETAIL_CUSTOM_ALERT"] = "telegram_retail_custom_alert";
18
+ TelegramQueueEnum["TELEGRAM_RETAIL_CUSTOM_ALERT_PUBLIC"] = "telegram_retail_custom_alert_public";
19
+ TelegramQueueEnum["TELEGRAM_LOW_RANGE_ALERT"] = "telegram_low_range";
20
+ TelegramQueueEnum["TELEGRAM_LOW_RANGE_ALERT_PUBLIC"] = "telegram_low_range_alert";
12
21
  })(TelegramQueueEnum = exports.TelegramQueueEnum || (exports.TelegramQueueEnum = {}));
13
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,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,sDAAiC,CAAA;IACjC,sEAAiD,CAAA;IACjD,8EAAyD,CAAA;IACzD,iFAA4D,CAAA;IAC5D,yEAAoD,CAAA;IACpD,gFAA2D,CAAA;AAC7D,CAAC,EAPW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAO5B","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}\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,oEAA+C,CAAA;IAC/C,iFAA4D,CAAA;AAC9D,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',\n TELEGRAM_LOW_RANGE_ALERT_PUBLIC = 'telegram_low_range_alert',\n}\n"]}
@@ -3,4 +3,7 @@ import { findLastQuery } from './entity-queries-utils';
3
3
  import { reverseString, removeNewLines, includesStringArray, getLastAfter, replaceMultipleSpacesByOne, removeIfEndsWith } from './string-utils';
4
4
  import { isUrl, getHostname, getParam, getPathname } from './url-utils';
5
5
  import { calculateAverage, roundNumber } from './number-utils';
6
- export { checkIfSamePrices, findLastQuery, replaceMultipleSpacesByOne, hasMeasurementUnitMultiplier, getPriceByMeasurementUnitMultiplier, removeIfEndsWith, getLastAfter, includesStringArray, removeNewLines, reverseString, getParam, getPathname, getHostname, isUrl, isValidPrice, getMinPrice, isCheaper, getMaxPrice, getPriceOperation, getAvgPrice, calculateAverage, roundNumber, removeZeroPrices, };
6
+ import { hasElementInArray, isArrayEmpty, stringToArray } from './array-utils';
7
+ import { hasUpdateReason, getStoreName } from './product.utils';
8
+ import { formatDate, formatMoney, formatPct } from './string-formatter';
9
+ export { checkIfSamePrices, findLastQuery, replaceMultipleSpacesByOne, hasMeasurementUnitMultiplier, getPriceByMeasurementUnitMultiplier, removeIfEndsWith, getLastAfter, includesStringArray, removeNewLines, reverseString, getParam, getPathname, getHostname, isUrl, isValidPrice, getMinPrice, isCheaper, getMaxPrice, getPriceOperation, getAvgPrice, calculateAverage, roundNumber, removeZeroPrices, isArrayEmpty, hasElementInArray, stringToArray, hasUpdateReason, getStoreName, formatPct, formatDate, formatMoney, };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.removeZeroPrices = exports.roundNumber = exports.calculateAverage = exports.getAvgPrice = exports.getPriceOperation = exports.getMaxPrice = exports.isCheaper = exports.getMinPrice = exports.isValidPrice = exports.isUrl = exports.getHostname = exports.getPathname = exports.getParam = exports.reverseString = exports.removeNewLines = exports.includesStringArray = exports.getLastAfter = exports.removeIfEndsWith = exports.getPriceByMeasurementUnitMultiplier = exports.hasMeasurementUnitMultiplier = exports.replaceMultipleSpacesByOne = exports.findLastQuery = exports.checkIfSamePrices = void 0;
3
+ exports.formatMoney = exports.formatDate = exports.formatPct = exports.getStoreName = exports.hasUpdateReason = exports.stringToArray = exports.hasElementInArray = exports.isArrayEmpty = exports.removeZeroPrices = exports.roundNumber = exports.calculateAverage = exports.getAvgPrice = exports.getPriceOperation = exports.getMaxPrice = exports.isCheaper = exports.getMinPrice = exports.isValidPrice = exports.isUrl = exports.getHostname = exports.getPathname = exports.getParam = exports.reverseString = exports.removeNewLines = exports.includesStringArray = exports.getLastAfter = exports.removeIfEndsWith = exports.getPriceByMeasurementUnitMultiplier = exports.hasMeasurementUnitMultiplier = exports.replaceMultipleSpacesByOne = exports.findLastQuery = exports.checkIfSamePrices = void 0;
4
4
  const price_utils_1 = require("./price-utils");
5
5
  Object.defineProperty(exports, "checkIfSamePrices", { enumerable: true, get: function () { return price_utils_1.checkIfSamePrices; } });
6
6
  Object.defineProperty(exports, "isCheaper", { enumerable: true, get: function () { return price_utils_1.isCheaper; } });
@@ -29,4 +29,15 @@ Object.defineProperty(exports, "getPathname", { enumerable: true, get: function
29
29
  const number_utils_1 = require("./number-utils");
30
30
  Object.defineProperty(exports, "calculateAverage", { enumerable: true, get: function () { return number_utils_1.calculateAverage; } });
31
31
  Object.defineProperty(exports, "roundNumber", { enumerable: true, get: function () { return number_utils_1.roundNumber; } });
32
+ const array_utils_1 = require("./array-utils");
33
+ Object.defineProperty(exports, "hasElementInArray", { enumerable: true, get: function () { return array_utils_1.hasElementInArray; } });
34
+ Object.defineProperty(exports, "isArrayEmpty", { enumerable: true, get: function () { return array_utils_1.isArrayEmpty; } });
35
+ Object.defineProperty(exports, "stringToArray", { enumerable: true, get: function () { return array_utils_1.stringToArray; } });
36
+ const product_utils_1 = require("./product.utils");
37
+ Object.defineProperty(exports, "hasUpdateReason", { enumerable: true, get: function () { return product_utils_1.hasUpdateReason; } });
38
+ Object.defineProperty(exports, "getStoreName", { enumerable: true, get: function () { return product_utils_1.getStoreName; } });
39
+ const string_formatter_1 = require("./string-formatter");
40
+ Object.defineProperty(exports, "formatDate", { enumerable: true, get: function () { return string_formatter_1.formatDate; } });
41
+ Object.defineProperty(exports, "formatMoney", { enumerable: true, get: function () { return string_formatter_1.formatMoney; } });
42
+ Object.defineProperty(exports, "formatPct", { enumerable: true, get: function () { return string_formatter_1.formatPct; } });
32
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["utils/index.ts"],"names":[],"mappings":";;;AAAA,+CAGuB;AAcrB,kGAhBA,+BAAiB,OAgBA;AAE8B,0FAlB5B,uBAAS,OAkB4B;AAAtB,4FAlBJ,yBAAW,OAkBI;AAAzB,6FAlBuB,0BAAY,OAkBvB;AAA0D,4FAlBjC,yBAAW,OAkBiC;AAA3C,4FAlBY,yBAAW,OAkBZ;AAAE,kGAlBY,+BAAiB,OAkBZ;AAC3E,iGAnByF,8BAAgB,OAmBzF;AAHiC,6GAf9D,0CAA4B,OAe8D;AAAE,oHAf9D,iDAAmC,OAe8D;AAbjI,iEAAuD;AAalC,8FAbZ,oCAAa,OAaY;AAZlC,iDAGwB;AAU+C,8FAZrE,4BAAa,OAYqE;AAA7B,+FAZtC,6BAAc,OAYsC;AAAnC,oGAZD,kCAAmB,OAYC;AAAjC,6FAZkC,2BAAY,OAYlC;AADI,2GAXgC,yCAA0B,OAWhC;AAC5D,iGAZ8F,+BAAgB,OAY9F;AATlB,2CAEqB;AAQN,sFATb,iBAAK,OASa;AAAlB,4FATO,uBAAW,OASP;AADyE,yFARhE,oBAAQ,OAQgE;AAAE,4FARhE,uBAAW,OAQgE;AAN3G,iDAEwB;AAKiF,iGANvG,+BAAgB,OAMuG;AACvH,4FAPkB,0BAAW,OAOlB","sourcesContent":["import {\n checkIfSamePrices, isCheaper, getMinPrice, isValidPrice, getAvgPrice, getMaxPrice, getPriceOperation, removeZeroPrices,\n hasMeasurementUnitMultiplier, getPriceByMeasurementUnitMultiplier,\n} from './price-utils';\nimport { findLastQuery } from './entity-queries-utils';\nimport {\n reverseString, removeNewLines, includesStringArray, getLastAfter, replaceMultipleSpacesByOne, removeIfEndsWith,\n}\n from './string-utils';\nimport {\n isUrl, getHostname, getParam, getPathname,\n} from './url-utils';\nimport {\n calculateAverage, roundNumber,\n} from './number-utils';\n\nexport {\n checkIfSamePrices, findLastQuery, replaceMultipleSpacesByOne, hasMeasurementUnitMultiplier, getPriceByMeasurementUnitMultiplier,\n removeIfEndsWith, getLastAfter, includesStringArray, removeNewLines, reverseString, getParam, getPathname,\n getHostname, isUrl, isValidPrice, getMinPrice, isCheaper, getMaxPrice, getPriceOperation, getAvgPrice, calculateAverage,\n roundNumber, removeZeroPrices,\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["utils/index.ts"],"names":[],"mappings":";;;AAAA,+CAGuB;AAiBrB,kGAnBA,+BAAiB,OAmBA;AAE8B,0FArB5B,uBAAS,OAqB4B;AAAtB,4FArBJ,yBAAW,OAqBI;AAAzB,6FArBuB,0BAAY,OAqBvB;AAA0D,4FArBjC,yBAAW,OAqBiC;AAA3C,4FArBY,yBAAW,OAqBZ;AAAE,kGArBY,+BAAiB,OAqBZ;AAC3E,iGAtByF,8BAAgB,OAsBzF;AAHiC,6GAlB9D,0CAA4B,OAkB8D;AAAE,oHAlB9D,iDAAmC,OAkB8D;AAhBjI,iEAAuD;AAgBlC,8FAhBZ,oCAAa,OAgBY;AAflC,iDAGwB;AAa+C,8FAfrE,4BAAa,OAeqE;AAA7B,+FAftC,6BAAc,OAesC;AAAnC,oGAfD,kCAAmB,OAeC;AAAjC,6FAfkC,2BAAY,OAelC;AADI,2GAdgC,yCAA0B,OAchC;AAC5D,iGAf8F,+BAAgB,OAe9F;AAZlB,2CAEqB;AAWN,sFAZb,iBAAK,OAYa;AAAlB,4FAZO,uBAAW,OAYP;AADyE,yFAXhE,oBAAQ,OAWgE;AAAE,4FAXhE,uBAAW,OAWgE;AAT3G,iDAEwB;AAQiF,iGATvG,+BAAgB,OASuG;AACvH,4FAVkB,0BAAW,OAUlB;AARb,+CAA+E;AAQhC,kGARtC,+BAAiB,OAQsC;AAA/B,6FARL,0BAAY,OAQK;AAAqB,8FARxB,2BAAa,OAQwB;AAP/E,mDAAgE;AAOiB,gGAPxE,+BAAe,OAOwE;AAAE,6FAPxE,4BAAY,OAOwE;AAN9G,yDAAwE;AAO3D,2FAPJ,6BAAU,OAOI;AAAE,4FAPJ,8BAAW,OAOI;AAAlC,0FAPgC,4BAAS,OAOhC","sourcesContent":["import {\n checkIfSamePrices, isCheaper, getMinPrice, isValidPrice, getAvgPrice, getMaxPrice, getPriceOperation, removeZeroPrices,\n hasMeasurementUnitMultiplier, getPriceByMeasurementUnitMultiplier,\n} from './price-utils';\nimport { findLastQuery } from './entity-queries-utils';\nimport {\n reverseString, removeNewLines, includesStringArray, getLastAfter, replaceMultipleSpacesByOne, removeIfEndsWith,\n}\n from './string-utils';\nimport {\n isUrl, getHostname, getParam, getPathname,\n} from './url-utils';\nimport {\n calculateAverage, roundNumber,\n} from './number-utils';\nimport { hasElementInArray, isArrayEmpty, stringToArray } from './array-utils';\nimport { hasUpdateReason, getStoreName } from './product.utils';\nimport { formatDate, formatMoney, formatPct } from './string-formatter';\n\nexport {\n checkIfSamePrices, findLastQuery, replaceMultipleSpacesByOne, hasMeasurementUnitMultiplier, getPriceByMeasurementUnitMultiplier,\n removeIfEndsWith, getLastAfter, includesStringArray, removeNewLines, reverseString, getParam, getPathname,\n getHostname, isUrl, isValidPrice, getMinPrice, isCheaper, getMaxPrice, getPriceOperation, getAvgPrice, calculateAverage,\n roundNumber, removeZeroPrices, isArrayEmpty, hasElementInArray, stringToArray, hasUpdateReason, getStoreName,\n formatPct, formatDate, formatMoney,\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "store-scrapper-js-common",
3
- "version": "1.0.94",
3
+ "version": "1.0.98",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -4,5 +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',
9
+ TELEGRAM_STOCK_DOWN_ALERT = 'telegram_stock_down_alert',
10
+ TELEGRAM_STOCK_DOWN_ALERT_PUBLIC = 'telegram_stock_down_alert_public',
11
+ TELEGRAM_CURRENT_PRICE_ALERT = 'telegram_current_price_alert',
12
+ TELEGRAM_CURRENT_PRICE_ALERT_PUBLIC = 'telegram_current_price_alert_public',
13
+ TELEGRAM_RETAIL_CUSTOM_ALERT = 'telegram_retail_custom_alert',
14
+ TELEGRAM_RETAIL_CUSTOM_ALERT_PUBLIC = 'telegram_retail_custom_alert_public',
15
+ TELEGRAM_LOW_RANGE_ALERT = 'telegram_low_range',
16
+ TELEGRAM_LOW_RANGE_ALERT_PUBLIC = 'telegram_low_range_alert',
8
17
  }
@@ -13,10 +13,14 @@ import {
13
13
  import {
14
14
  calculateAverage, roundNumber,
15
15
  } from './number-utils';
16
+ import { hasElementInArray, isArrayEmpty, stringToArray } from './array-utils';
17
+ import { hasUpdateReason, getStoreName } from './product.utils';
18
+ import { formatDate, formatMoney, formatPct } from './string-formatter';
16
19
 
17
20
  export {
18
21
  checkIfSamePrices, findLastQuery, replaceMultipleSpacesByOne, hasMeasurementUnitMultiplier, getPriceByMeasurementUnitMultiplier,
19
22
  removeIfEndsWith, getLastAfter, includesStringArray, removeNewLines, reverseString, getParam, getPathname,
20
23
  getHostname, isUrl, isValidPrice, getMinPrice, isCheaper, getMaxPrice, getPriceOperation, getAvgPrice, calculateAverage,
21
- roundNumber, removeZeroPrices,
24
+ roundNumber, removeZeroPrices, isArrayEmpty, hasElementInArray, stringToArray, hasUpdateReason, getStoreName,
25
+ formatPct, formatDate, formatMoney,
22
26
  };