store-scrapper-js-common 1.0.92 → 1.0.96

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,5 @@
1
1
  import { Command, getCommandsStep, createCommand, getNextSQSUrl, SQSCommandNames, SQSPersistenceName, SQSCommandName } from './command';
2
+ import { HttpRequest } from './http-request';
2
3
  import { ObjectLiteral } from './object-literal';
3
4
  import { Response, getResultFromResponse, ResponseInterface } from './response';
4
- export { Command, getCommandsStep, createCommand, getNextSQSUrl, SQSCommandNames, SQSPersistenceName, SQSCommandName, ObjectLiteral, Response, getResultFromResponse, ResponseInterface, };
5
+ export { Command, getCommandsStep, createCommand, getNextSQSUrl, SQSCommandNames, SQSPersistenceName, SQSCommandName, ObjectLiteral, Response, getResultFromResponse, ResponseInterface, HttpRequest, };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getResultFromResponse = exports.Response = exports.SQSCommandName = exports.SQSPersistenceName = exports.SQSCommandNames = exports.getNextSQSUrl = exports.createCommand = exports.getCommandsStep = exports.Command = void 0;
3
+ exports.HttpRequest = exports.getResultFromResponse = exports.Response = exports.SQSCommandName = exports.SQSPersistenceName = exports.SQSCommandNames = exports.getNextSQSUrl = exports.createCommand = exports.getCommandsStep = exports.Command = void 0;
4
4
  const command_1 = require("./command");
5
5
  Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return command_1.Command; } });
6
6
  Object.defineProperty(exports, "getCommandsStep", { enumerable: true, get: function () { return command_1.getCommandsStep; } });
@@ -9,6 +9,8 @@ Object.defineProperty(exports, "getNextSQSUrl", { enumerable: true, get: functio
9
9
  Object.defineProperty(exports, "SQSCommandNames", { enumerable: true, get: function () { return command_1.SQSCommandNames; } });
10
10
  Object.defineProperty(exports, "SQSPersistenceName", { enumerable: true, get: function () { return command_1.SQSPersistenceName; } });
11
11
  Object.defineProperty(exports, "SQSCommandName", { enumerable: true, get: function () { return command_1.SQSCommandName; } });
12
+ const http_request_1 = require("./http-request");
13
+ Object.defineProperty(exports, "HttpRequest", { enumerable: true, get: function () { return http_request_1.HttpRequest; } });
12
14
  const response_1 = require("./response");
13
15
  Object.defineProperty(exports, "Response", { enumerable: true, get: function () { return response_1.Response; } });
14
16
  Object.defineProperty(exports, "getResultFromResponse", { enumerable: true, get: function () { return response_1.getResultFromResponse; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["classes/index.ts"],"names":[],"mappings":";;;AAAA,uCAEmB;AAKjB,wFANA,iBAAO,OAMA;AAAE,gGANA,yBAAe,OAMA;AAAE,8FANA,uBAAa,OAMA;AAAE,8FANA,uBAAa,OAMA;AAAE,gGANA,yBAAe,OAMA;AAAE,mGANA,4BAAkB,OAMA;AAAE,+FANA,wBAAc,OAMA;AAH7G,yCAAgF;AAK9E,yFALO,mBAAQ,OAKP;AAAE,sGALO,gCAAqB,OAKP","sourcesContent":["import {\n Command, getCommandsStep, createCommand, getNextSQSUrl, SQSCommandNames, SQSPersistenceName, SQSCommandName,\n} from './command';\nimport { ObjectLiteral } from './object-literal';\nimport { Response, getResultFromResponse, ResponseInterface } from './response';\n\nexport {\n Command, getCommandsStep, createCommand, getNextSQSUrl, SQSCommandNames, SQSPersistenceName, SQSCommandName,\n ObjectLiteral,\n Response, getResultFromResponse, ResponseInterface,\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["classes/index.ts"],"names":[],"mappings":";;;AAAA,uCAEmB;AAMjB,wFAPA,iBAAO,OAOA;AAAE,gGAPA,yBAAe,OAOA;AAAE,8FAPA,uBAAa,OAOA;AAAE,8FAPA,uBAAa,OAOA;AAAE,gGAPA,yBAAe,OAOA;AAAE,mGAPA,4BAAkB,OAOA;AAAE,+FAPA,wBAAc,OAOA;AAL7G,iDAA6C;AAOS,4FAP7C,0BAAW,OAO6C;AALjE,yCAAgF;AAK9E,yFALO,mBAAQ,OAKP;AAAE,sGALO,gCAAqB,OAKP","sourcesContent":["import {\n Command, getCommandsStep, createCommand, getNextSQSUrl, SQSCommandNames, SQSPersistenceName, SQSCommandName,\n} from './command';\nimport { HttpRequest } from './http-request';\nimport { ObjectLiteral } from './object-literal';\nimport { Response, getResultFromResponse, ResponseInterface } from './response';\n\nexport {\n Command, getCommandsStep, createCommand, getNextSQSUrl, SQSCommandNames, SQSPersistenceName, SQSCommandName,\n ObjectLiteral,\n Response, getResultFromResponse, ResponseInterface, HttpRequest,\n};\n"]}
@@ -1,9 +1,6 @@
1
1
  import { ObjectLiteral } from '../classes';
2
2
  import { TelegramQueueCommandEnum } from '../enums/telegram-queue-command.enum';
3
- export declare const enum TelegramMessageType {
4
- MESSAGE = "message",
5
- IMAGE = "image"
6
- }
3
+ import { TelegramMessageType } from '../enums/telegram-message-type';
7
4
  export declare class TelegramQueueCommandDto {
8
5
  message: string;
9
6
  telegramChatId: string | number;
@@ -1 +1 @@
1
- {"version":3,"file":"telegram-queue-command.dto.js","sourceRoot":"/","sources":["dto/telegram-queue-command.dto.ts"],"names":[],"mappings":";;;AAQA,MAAa,uBAAuB;CAcnC;AAdD,0DAcC","sourcesContent":["import { ObjectLiteral } from '../classes';\nimport { TelegramQueueCommandEnum } from '../enums/telegram-queue-command.enum';\n\nexport const enum TelegramMessageType {\n MESSAGE = 'message',\n IMAGE = 'image',\n}\n\nexport class TelegramQueueCommandDto {\n message: string;\n\n telegramChatId: string | number;\n\n options?: { [key: string]: any };\n\n namedJob?: TelegramQueueCommandEnum;\n\n telegramClientId: string;\n\n type?: TelegramMessageType;\n\n imageOpts?: ObjectLiteral;\n}\n"]}
1
+ {"version":3,"file":"telegram-queue-command.dto.js","sourceRoot":"/","sources":["dto/telegram-queue-command.dto.ts"],"names":[],"mappings":";;;AAIA,MAAa,uBAAuB;CAcnC;AAdD,0DAcC","sourcesContent":["import { ObjectLiteral } from '../classes';\nimport { TelegramQueueCommandEnum } from '../enums/telegram-queue-command.enum';\nimport { TelegramMessageType } from '../enums/telegram-message-type';\n\nexport class TelegramQueueCommandDto {\n message: string;\n\n telegramChatId: string | number;\n\n options?: { [key: string]: any };\n\n namedJob?: TelegramQueueCommandEnum;\n\n telegramClientId: string;\n\n type?: TelegramMessageType;\n\n imageOpts?: ObjectLiteral;\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import { RequestTypeEnum } from './request-type.enum';
2
2
  import { TelegramClientEnum } from './telegram-client.enum';
3
+ import { TelegramMessageType } from './telegram-message-type';
3
4
  import { TelegramQueueCommandEnum } from './telegram-queue-command.enum';
4
5
  import { TelegramQueueEnum } from './telegram-queue.enum';
5
- export { RequestTypeEnum, TelegramClientEnum, TelegramQueueEnum, TelegramQueueCommandEnum, };
6
+ export { RequestTypeEnum, TelegramClientEnum, TelegramQueueEnum, TelegramQueueCommandEnum, TelegramMessageType, };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["enums/index.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AAMpD,gGANO,mCAAe,OAMP;AALjB,iEAA4D;AAKzC,mGALV,yCAAkB,OAKU;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 { TelegramQueueCommandEnum } from './telegram-queue-command.enum';\nimport { TelegramQueueEnum } from './telegram-queue.enum';\n\nexport {\n RequestTypeEnum, TelegramClientEnum, TelegramQueueEnum, TelegramQueueCommandEnum,\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;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"]}
@@ -0,0 +1,4 @@
1
+ export declare const enum TelegramMessageType {
2
+ MESSAGE = "message",
3
+ IMAGE = "image"
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=telegram-message-type.js.map
@@ -0,0 +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"]}
@@ -4,5 +4,7 @@ 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_PUBLIC = "telegram_stock_alert_public",
8
+ TELEGRAM_STOCK_DOWN_ALERT = "telegram_stock_down_alert",
9
+ TELEGRAM_CURRENT_PRICE_ALERT = "telegram_current_price_alert"
8
10
  }
@@ -9,5 +9,7 @@ var TelegramQueueEnum;
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
11
  TelegramQueueEnum["TELEGRAM_STOCK_ALERT_PUBLIC"] = "telegram_stock_alert_public";
12
+ TelegramQueueEnum["TELEGRAM_STOCK_DOWN_ALERT"] = "telegram_stock_down_alert";
13
+ TelegramQueueEnum["TELEGRAM_CURRENT_PRICE_ALERT"] = "telegram_current_price_alert";
12
14
  })(TelegramQueueEnum = exports.TelegramQueueEnum || (exports.TelegramQueueEnum = {}));
13
15
  //# 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,iBASX;AATD,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;AAC/D,CAAC,EATW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAS5B","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}\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.92",
3
+ "version": "1.0.96",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,11 +1,12 @@
1
1
  import {
2
2
  Command, getCommandsStep, createCommand, getNextSQSUrl, SQSCommandNames, SQSPersistenceName, SQSCommandName,
3
3
  } from './command';
4
+ import { HttpRequest } from './http-request';
4
5
  import { ObjectLiteral } from './object-literal';
5
6
  import { Response, getResultFromResponse, ResponseInterface } from './response';
6
7
 
7
8
  export {
8
9
  Command, getCommandsStep, createCommand, getNextSQSUrl, SQSCommandNames, SQSPersistenceName, SQSCommandName,
9
10
  ObjectLiteral,
10
- Response, getResultFromResponse, ResponseInterface,
11
+ Response, getResultFromResponse, ResponseInterface, HttpRequest,
11
12
  };
@@ -1,10 +1,6 @@
1
1
  import { ObjectLiteral } from '../classes';
2
2
  import { TelegramQueueCommandEnum } from '../enums/telegram-queue-command.enum';
3
-
4
- export const enum TelegramMessageType {
5
- MESSAGE = 'message',
6
- IMAGE = 'image',
7
- }
3
+ import { TelegramMessageType } from '../enums/telegram-message-type';
8
4
 
9
5
  export class TelegramQueueCommandDto {
10
6
  message: string;
@@ -1,8 +1,9 @@
1
1
  import { RequestTypeEnum } from './request-type.enum';
2
2
  import { TelegramClientEnum } from './telegram-client.enum';
3
+ import { TelegramMessageType } from './telegram-message-type';
3
4
  import { TelegramQueueCommandEnum } from './telegram-queue-command.enum';
4
5
  import { TelegramQueueEnum } from './telegram-queue.enum';
5
6
 
6
7
  export {
7
- RequestTypeEnum, TelegramClientEnum, TelegramQueueEnum, TelegramQueueCommandEnum,
8
+ RequestTypeEnum, TelegramClientEnum, TelegramQueueEnum, TelegramQueueCommandEnum, TelegramMessageType,
8
9
  };
@@ -0,0 +1,4 @@
1
+ export const enum TelegramMessageType {
2
+ MESSAGE = 'message',
3
+ IMAGE = 'image',
4
+ }
@@ -5,4 +5,6 @@ export enum TelegramQueueEnum {
5
5
  TELEGRAM_ALERT_PUBLIC_3 = 'telegram_alert_public_non_vip_60',
6
6
  TELEGRAM_ALERT_PUBLIC_4 = 'telegram_alert_public_60',
7
7
  TELEGRAM_STOCK_ALERT_PUBLIC = 'telegram_stock_alert_public',
8
+ TELEGRAM_STOCK_DOWN_ALERT = 'telegram_stock_down_alert',
9
+ TELEGRAM_CURRENT_PRICE_ALERT = 'telegram_current_price_alert'
8
10
  }
@@ -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
  };