api_connect_nodejs 2.0.2 → 2.0.4

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.
Files changed (39) hide show
  1. package/README.md +30 -30
  2. package/conf/settings.ini +19 -19
  3. package/enums/actionType.js +10 -10
  4. package/enums/assetType.js +25 -25
  5. package/enums/chartExchangeType.js +15 -15
  6. package/enums/chartType.js +13 -13
  7. package/enums/eodIntervalType.js +11 -11
  8. package/enums/exchangeType.js +14 -14
  9. package/enums/intradayIntervalType.js +14 -14
  10. package/enums/marketCapType.js +12 -12
  11. package/enums/orderType.js +21 -21
  12. package/enums/productType.js +24 -24
  13. package/enums/segementsType.js +13 -13
  14. package/enums/streamingConstants.js +11 -11
  15. package/enums/termsType.js +12 -12
  16. package/enums/validity.js +22 -22
  17. package/index.js +3 -3
  18. package/package.json +25 -25
  19. package/src/apiConnect.js +2342 -2430
  20. package/src/apiUtils.js +221 -129
  21. package/src/chart.js +258 -258
  22. package/src/config.js +316 -326
  23. package/src/feed/feed.js +139 -139
  24. package/src/feed/liveNewsFeed.js +112 -112
  25. package/src/feed/ordersFeed.js +124 -124
  26. package/src/feed/quotesFeed.js +121 -121
  27. package/src/http.js +197 -197
  28. package/src/iniparser.js +42 -42
  29. package/src/liveNews.js +362 -362
  30. package/src/logger.js +16 -16
  31. package/src/order.js +48 -48
  32. package/src/researchCalls.js +175 -175
  33. package/src/watchlist.js +378 -378
  34. package/validations/apiConnectValidator.js +521 -508
  35. package/validations/chartValidator.js +85 -85
  36. package/validations/feedStreamerValidator.js +68 -68
  37. package/validations/liveNewsValidator.js +60 -60
  38. package/validations/researchCallsValidator.js +86 -86
  39. package/validations/watchlistValidator.js +60 -60
@@ -1,60 +1,60 @@
1
- const Joi = require("joi");
2
-
3
- validateGetWatchlistScrips = (groupName) => {
4
- const watchlistScriptsObj = {
5
- groupName: groupName,
6
- };
7
-
8
- const watchlistScriptsSchema = Joi.object({
9
- groupName: Joi.string().required(),
10
- }).options({ abortEarly: false });
11
-
12
- return watchlistScriptsSchema.validate(watchlistScriptsObj);
13
- };
14
-
15
- validateGroupNameAndSymbolList = (groupName, symbolList) => {
16
- const createWatchlistObj = {
17
- groupName: groupName,
18
- symbolList: symbolList,
19
- };
20
-
21
- const createWatchlistSchema = Joi.object({
22
- groupName: Joi.string().required(),
23
- symbolList: Joi.array().items(Joi.string().required()).min(1).required(),
24
- }).options({ abortEarly: false });
25
-
26
- return createWatchlistSchema.validate(createWatchlistObj);
27
- };
28
-
29
- validateDeleteWatchlistGroups = (groups) => {
30
- const paramsObj = {
31
- groups: groups,
32
- };
33
-
34
- const deleteGroupsSchema = Joi.object({
35
- groups: Joi.array().items(Joi.string().required()).min(1).required(),
36
- }).options({ abortEarly: false });
37
-
38
- return deleteGroupsSchema.validate(paramsObj);
39
- };
40
-
41
- validateRenameGroup = (groupName, newGroupName) => {
42
- const renameWatchlistObj = {
43
- groupName: groupName,
44
- newGroupName: newGroupName,
45
- };
46
-
47
- const renameWatchlistSchema = Joi.object({
48
- groupName: Joi.string().required(),
49
- newGroupName: Joi.string().required(),
50
- }).options({ abortEarly: false });
51
-
52
- return renameWatchlistSchema.validate(renameWatchlistObj);
53
- };
54
-
55
- module.exports = {
56
- validateGetWatchlistScrips,
57
- validateGroupNameAndSymbolList,
58
- validateDeleteWatchlistGroups,
59
- validateRenameGroup,
60
- };
1
+ const Joi = require("joi");
2
+
3
+ validateGetWatchlistScrips = (groupName) => {
4
+ const watchlistScriptsObj = {
5
+ groupName: groupName,
6
+ };
7
+
8
+ const watchlistScriptsSchema = Joi.object({
9
+ groupName: Joi.string().required(),
10
+ }).options({ abortEarly: false });
11
+
12
+ return watchlistScriptsSchema.validate(watchlistScriptsObj);
13
+ };
14
+
15
+ validateGroupNameAndSymbolList = (groupName, symbolList) => {
16
+ const createWatchlistObj = {
17
+ groupName: groupName,
18
+ symbolList: symbolList,
19
+ };
20
+
21
+ const createWatchlistSchema = Joi.object({
22
+ groupName: Joi.string().required(),
23
+ symbolList: Joi.array().items(Joi.string().required()).min(1).required(),
24
+ }).options({ abortEarly: false });
25
+
26
+ return createWatchlistSchema.validate(createWatchlistObj);
27
+ };
28
+
29
+ validateDeleteWatchlistGroups = (groups) => {
30
+ const paramsObj = {
31
+ groups: groups,
32
+ };
33
+
34
+ const deleteGroupsSchema = Joi.object({
35
+ groups: Joi.array().items(Joi.string().required()).min(1).required(),
36
+ }).options({ abortEarly: false });
37
+
38
+ return deleteGroupsSchema.validate(paramsObj);
39
+ };
40
+
41
+ validateRenameGroup = (groupName, newGroupName) => {
42
+ const renameWatchlistObj = {
43
+ groupName: groupName,
44
+ newGroupName: newGroupName,
45
+ };
46
+
47
+ const renameWatchlistSchema = Joi.object({
48
+ groupName: Joi.string().required(),
49
+ newGroupName: Joi.string().required(),
50
+ }).options({ abortEarly: false });
51
+
52
+ return renameWatchlistSchema.validate(renameWatchlistObj);
53
+ };
54
+
55
+ module.exports = {
56
+ validateGetWatchlistScrips,
57
+ validateGroupNameAndSymbolList,
58
+ validateDeleteWatchlistGroups,
59
+ validateRenameGroup,
60
+ };