eventregistry 8.11.2 → 9.1.0

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 (65) hide show
  1. package/dist/analytics.d.ts +82 -82
  2. package/dist/analytics.js +336 -330
  3. package/dist/analytics.js.map +1 -1
  4. package/dist/base.d.ts +82 -81
  5. package/dist/base.js +261 -219
  6. package/dist/base.js.map +1 -1
  7. package/dist/counts.d.ts +81 -81
  8. package/dist/counts.js +162 -149
  9. package/dist/counts.js.map +1 -1
  10. package/dist/dailyShares.d.ts +10 -10
  11. package/dist/dailyShares.js +90 -77
  12. package/dist/dailyShares.js.map +1 -1
  13. package/dist/data.d.ts +269 -268
  14. package/dist/data.js +3 -3
  15. package/dist/eventForText.d.ts +48 -48
  16. package/dist/eventForText.js +126 -123
  17. package/dist/eventForText.js.map +1 -1
  18. package/dist/eventRegistry.d.ts +244 -224
  19. package/dist/eventRegistry.js +1098 -1018
  20. package/dist/eventRegistry.js.map +1 -1
  21. package/dist/index.d.ts +21 -20
  22. package/dist/index.js +128 -122
  23. package/dist/index.js.map +1 -1
  24. package/dist/info.d.ts +61 -61
  25. package/dist/info.js +171 -158
  26. package/dist/info.js.map +1 -1
  27. package/dist/logger.d.ts +44 -0
  28. package/dist/logger.js +144 -0
  29. package/dist/logger.js.map +1 -0
  30. package/dist/query.d.ts +53 -53
  31. package/dist/query.js +333 -290
  32. package/dist/query.js.map +1 -1
  33. package/dist/queryArticle.d.ts +61 -61
  34. package/dist/queryArticle.js +183 -168
  35. package/dist/queryArticle.js.map +1 -1
  36. package/dist/queryArticles.d.ts +144 -160
  37. package/dist/queryArticles.js +729 -701
  38. package/dist/queryArticles.js.map +1 -1
  39. package/dist/queryEvent.d.ts +140 -140
  40. package/dist/queryEvent.js +587 -569
  41. package/dist/queryEvent.js.map +1 -1
  42. package/dist/queryEvents.d.ts +210 -210
  43. package/dist/queryEvents.js +825 -798
  44. package/dist/queryEvents.js.map +1 -1
  45. package/dist/queryMentions.d.ts +96 -96
  46. package/dist/queryMentions.js +637 -600
  47. package/dist/queryMentions.js.map +1 -1
  48. package/dist/queryStory.d.ts +58 -58
  49. package/dist/queryStory.js +194 -174
  50. package/dist/queryStory.js.map +1 -1
  51. package/dist/recent.d.ts +23 -23
  52. package/dist/recent.js +199 -179
  53. package/dist/recent.js.map +1 -1
  54. package/dist/returnInfo.d.ts +68 -66
  55. package/dist/returnInfo.js +332 -304
  56. package/dist/returnInfo.js.map +1 -1
  57. package/dist/topicPage.d.ts +157 -157
  58. package/dist/topicPage.js +599 -604
  59. package/dist/topicPage.js.map +1 -1
  60. package/dist/trends.d.ts +35 -35
  61. package/dist/trends.js +115 -102
  62. package/dist/trends.js.map +1 -1
  63. package/dist/types.d.ts +2453 -2155
  64. package/dist/types.js +2 -2
  65. package/package.json +13 -13
package/dist/recent.d.ts CHANGED
@@ -1,23 +1,23 @@
1
- import { QueryParamsBase } from "./base";
2
- import { EventRegistry } from "./eventRegistry";
3
- import { ReturnInfo } from "./returnInfo";
4
- export declare class GetRecentEvents extends QueryParamsBase {
5
- private er;
6
- constructor(er: EventRegistry, { mandatoryLang, mandatoryLocation, returnInfo, }?: {
7
- mandatoryLang?: any;
8
- mandatoryLocation?: boolean;
9
- returnInfo?: ReturnInfo;
10
- });
11
- readonly path: string;
12
- getUpdates(): Promise<any>;
13
- }
14
- export declare class GetRecentArticles extends QueryParamsBase {
15
- private er;
16
- constructor(er: EventRegistry, { mandatorySourceLocation, lang, returnInfo, ...kwargs }?: {
17
- mandatorySourceLocation?: any;
18
- lang?: any;
19
- returnInfo?: ReturnInfo;
20
- });
21
- readonly path: string;
22
- getUpdates(): Promise<any>;
23
- }
1
+ import { QueryParamsBase } from "./base";
2
+ import { EventRegistry } from "./eventRegistry";
3
+ import { ReturnInfo } from "./returnInfo";
4
+ export declare class GetRecentEvents extends QueryParamsBase {
5
+ private er;
6
+ constructor(er: EventRegistry, { mandatoryLang, mandatoryLocation, returnInfo, }?: {
7
+ mandatoryLang?: any;
8
+ mandatoryLocation?: boolean;
9
+ returnInfo?: ReturnInfo;
10
+ });
11
+ get path(): string;
12
+ getUpdates(): Promise<{}>;
13
+ }
14
+ export declare class GetRecentArticles extends QueryParamsBase {
15
+ private er;
16
+ constructor(er: EventRegistry, { mandatorySourceLocation, lang, returnInfo, ...kwargs }?: {
17
+ mandatorySourceLocation?: any;
18
+ lang?: any;
19
+ returnInfo?: ReturnInfo;
20
+ });
21
+ get path(): string;
22
+ getUpdates(): Promise<unknown[]>;
23
+ }
package/dist/recent.js CHANGED
@@ -1,180 +1,200 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- }
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- var __generator = (this && this.__generator) || function (thisArg, body) {
24
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
25
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
26
- function verb(n) { return function (v) { return step([n, v]); }; }
27
- function step(op) {
28
- if (f) throw new TypeError("Generator is already executing.");
29
- while (_) try {
30
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
31
- if (y = 0, t) op = [op[0] & 2, t.value];
32
- switch (op[0]) {
33
- case 0: case 1: t = op; break;
34
- case 4: _.label++; return { value: op[1], done: false };
35
- case 5: _.label++; y = op[1]; op = [0]; continue;
36
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
37
- default:
38
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
39
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
40
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
41
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
42
- if (t[2]) _.ops.pop();
43
- _.trys.pop(); continue;
44
- }
45
- op = body.call(thisArg, _);
46
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
47
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
48
- }
49
- };
50
- var __rest = (this && this.__rest) || function (s, e) {
51
- var t = {};
52
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
53
- t[p] = s[p];
54
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
55
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
56
- t[p[i]] = s[p[i]];
57
- return t;
58
- };
59
- var __values = (this && this.__values) || function (o) {
60
- var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
61
- if (m) return m.call(o);
62
- return {
63
- next: function () {
64
- if (o && i >= o.length) o = void 0;
65
- return { value: o && o[i++], done: !o };
66
- }
67
- };
68
- };
69
- var __read = (this && this.__read) || function (o, n) {
70
- var m = typeof Symbol === "function" && o[Symbol.iterator];
71
- if (!m) return o;
72
- var i = m.call(o), r, ar = [], e;
73
- try {
74
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
75
- }
76
- catch (error) { e = { error: error }; }
77
- finally {
78
- try {
79
- if (r && !r.done && (m = i["return"])) m.call(i);
80
- }
81
- finally { if (e) throw e.error; }
82
- }
83
- return ar;
84
- };
85
- Object.defineProperty(exports, "__esModule", { value: true });
86
- var _ = require("lodash");
87
- var base_1 = require("./base");
88
- var returnInfo_1 = require("./returnInfo");
89
- var GetRecentEvents = /** @class */ (function (_super) {
90
- __extends(GetRecentEvents, _super);
91
- function GetRecentEvents(er, _a) {
92
- var _b = _a === void 0 ? {} : _a, _c = _b.mandatoryLang, mandatoryLang = _c === void 0 ? undefined : _c, _d = _b.mandatoryLocation, mandatoryLocation = _d === void 0 ? true : _d, _e = _b.returnInfo, returnInfo = _e === void 0 ? new returnInfo_1.ReturnInfo() : _e;
93
- var _this = _super.call(this) || this;
94
- _this.er = er;
95
- _this.setVal("recentActivityEventsMandatoryLocation", mandatoryLocation);
96
- if (!_.isUndefined(mandatoryLang)) {
97
- _this.setVal("recentActivityEventsMandatoryLang", mandatoryLang);
98
- }
99
- _this.params = _.extend({}, _this.params, returnInfo.getParams("recentActivityEvents"));
100
- return _this;
101
- }
102
- Object.defineProperty(GetRecentEvents.prototype, "path", {
103
- get: function () {
104
- return "/api/v1/minuteStreamEvents";
105
- },
106
- enumerable: true,
107
- configurable: true
108
- });
109
- GetRecentEvents.prototype.getUpdates = function () {
110
- return __awaiter(this, void 0, void 0, function () {
111
- var response;
112
- return __generator(this, function (_a) {
113
- switch (_a.label) {
114
- case 0: return [4 /*yield*/, this.er.execQuery(this)];
115
- case 1:
116
- response = _a.sent();
117
- return [2 /*return*/, _.get(response, "recentActivityEvents.activity", {})];
118
- }
119
- });
120
- });
121
- };
122
- return GetRecentEvents;
123
- }(base_1.QueryParamsBase));
124
- exports.GetRecentEvents = GetRecentEvents;
125
- var GetRecentArticles = /** @class */ (function (_super) {
126
- __extends(GetRecentArticles, _super);
127
- function GetRecentArticles(er, _a) {
128
- if (_a === void 0) { _a = {}; }
129
- var _b = _a.mandatorySourceLocation, mandatorySourceLocation = _b === void 0 ? undefined : _b, _c = _a.lang, lang = _c === void 0 ? undefined : _c, _d = _a.returnInfo, returnInfo = _d === void 0 ? new returnInfo_1.ReturnInfo() : _d, kwargs = __rest(_a, ["mandatorySourceLocation", "lang", "returnInfo"]);
130
- var _this = _super.call(this) || this;
131
- _this.er = er;
132
- _this.setVal("recentActivityArticlesMandatorySourceLocation", mandatorySourceLocation);
133
- if (!_.isUndefined(lang)) {
134
- _this.setVal("recentActivityArticlesLang", lang);
135
- }
136
- _this.params = _.extend({}, _this.params, kwargs);
137
- _this.params = _.extend({}, _this.params, returnInfo.getParams("recentActivityArticles"));
138
- return _this;
139
- }
140
- Object.defineProperty(GetRecentArticles.prototype, "path", {
141
- get: function () {
142
- return "/api/v1/minuteStreamArticles";
143
- },
144
- enumerable: true,
145
- configurable: true
146
- });
147
- GetRecentArticles.prototype.getUpdates = function () {
148
- return __awaiter(this, void 0, void 0, function () {
149
- var e_1, _a, response, _b, _c, _d, key, value, splitKey;
150
- return __generator(this, function (_e) {
151
- switch (_e.label) {
152
- case 0: return [4 /*yield*/, this.er.execQuery(this)];
153
- case 1:
154
- response = _e.sent();
155
- if (_.has(response, "recentActivityArticles")) {
156
- try {
157
- for (_b = __values(_.entries(_.get(response, "recentActivityArticles.newestUri", {}))), _c = _b.next(); !_c.done; _c = _b.next()) {
158
- _d = __read(_c.value, 2), key = _d[0], value = _d[1];
159
- splitKey = _.split(key, "");
160
- this.setVal("recentActivityArticles" + _.upperCase(splitKey[0]) + _.join(_.tail(splitKey)), value);
161
- }
162
- }
163
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
164
- finally {
165
- try {
166
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
167
- }
168
- finally { if (e_1) throw e_1.error; }
169
- }
170
- return [2 /*return*/, _.get(response, "recentActivityArticles.activity", [])];
171
- }
172
- return [2 /*return*/, []];
173
- }
174
- });
175
- });
176
- };
177
- return GetRecentArticles;
178
- }(base_1.QueryParamsBase));
179
- exports.GetRecentArticles = GetRecentArticles;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __generator = (this && this.__generator) || function (thisArg, body) {
38
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
39
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
40
+ function verb(n) { return function (v) { return step([n, v]); }; }
41
+ function step(op) {
42
+ if (f) throw new TypeError("Generator is already executing.");
43
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
44
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
45
+ if (y = 0, t) op = [op[0] & 2, t.value];
46
+ switch (op[0]) {
47
+ case 0: case 1: t = op; break;
48
+ case 4: _.label++; return { value: op[1], done: false };
49
+ case 5: _.label++; y = op[1]; op = [0]; continue;
50
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
51
+ default:
52
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
53
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
54
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
55
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
56
+ if (t[2]) _.ops.pop();
57
+ _.trys.pop(); continue;
58
+ }
59
+ op = body.call(thisArg, _);
60
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
61
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
62
+ }
63
+ };
64
+ var __rest = (this && this.__rest) || function (s, e) {
65
+ var t = {};
66
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
67
+ t[p] = s[p];
68
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
69
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
70
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
71
+ t[p[i]] = s[p[i]];
72
+ }
73
+ return t;
74
+ };
75
+ var __values = (this && this.__values) || function(o) {
76
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
77
+ if (m) return m.call(o);
78
+ if (o && typeof o.length === "number") return {
79
+ next: function () {
80
+ if (o && i >= o.length) o = void 0;
81
+ return { value: o && o[i++], done: !o };
82
+ }
83
+ };
84
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
85
+ };
86
+ var __read = (this && this.__read) || function (o, n) {
87
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
88
+ if (!m) return o;
89
+ var i = m.call(o), r, ar = [], e;
90
+ try {
91
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
92
+ }
93
+ catch (error) { e = { error: error }; }
94
+ finally {
95
+ try {
96
+ if (r && !r.done && (m = i["return"])) m.call(i);
97
+ }
98
+ finally { if (e) throw e.error; }
99
+ }
100
+ return ar;
101
+ };
102
+ Object.defineProperty(exports, "__esModule", { value: true });
103
+ exports.GetRecentArticles = exports.GetRecentEvents = void 0;
104
+ var base_1 = require("./base");
105
+ var returnInfo_1 = require("./returnInfo");
106
+ var GetRecentEvents = /** @class */ (function (_super) {
107
+ __extends(GetRecentEvents, _super);
108
+ function GetRecentEvents(er, _a) {
109
+ var _b = _a === void 0 ? {} : _a, _c = _b.mandatoryLang, mandatoryLang = _c === void 0 ? undefined : _c, _d = _b.mandatoryLocation, mandatoryLocation = _d === void 0 ? true : _d, _e = _b.returnInfo, returnInfo = _e === void 0 ? new returnInfo_1.ReturnInfo() : _e;
110
+ var _this = _super.call(this) || this;
111
+ _this.er = er;
112
+ _this.setVal("recentActivityEventsMandatoryLocation", mandatoryLocation);
113
+ if (mandatoryLang !== undefined) {
114
+ _this.setVal("recentActivityEventsMandatoryLang", mandatoryLang);
115
+ }
116
+ _this.params = __assign(__assign({}, _this.params), returnInfo.getParams("recentActivityEvents"));
117
+ return _this;
118
+ }
119
+ Object.defineProperty(GetRecentEvents.prototype, "path", {
120
+ get: function () {
121
+ return "/api/v1/minuteStreamEvents";
122
+ },
123
+ enumerable: false,
124
+ configurable: true
125
+ });
126
+ GetRecentEvents.prototype.getUpdates = function () {
127
+ return __awaiter(this, void 0, void 0, function () {
128
+ var response;
129
+ var _a;
130
+ return __generator(this, function (_b) {
131
+ switch (_b.label) {
132
+ case 0: return [4 /*yield*/, this.er.execQuery(this)];
133
+ case 1:
134
+ response = _b.sent();
135
+ return [2 /*return*/, ((_a = response.recentActivityEvents) === null || _a === void 0 ? void 0 : _a.activity) || {}];
136
+ }
137
+ });
138
+ });
139
+ };
140
+ return GetRecentEvents;
141
+ }(base_1.QueryParamsBase));
142
+ exports.GetRecentEvents = GetRecentEvents;
143
+ var GetRecentArticles = /** @class */ (function (_super) {
144
+ __extends(GetRecentArticles, _super);
145
+ function GetRecentArticles(er, _a) {
146
+ if (_a === void 0) { _a = {}; }
147
+ var _this = this;
148
+ var _b = _a.mandatorySourceLocation, mandatorySourceLocation = _b === void 0 ? undefined : _b, _c = _a.lang, lang = _c === void 0 ? undefined : _c, _d = _a.returnInfo, returnInfo = _d === void 0 ? new returnInfo_1.ReturnInfo() : _d, kwargs = __rest(_a, ["mandatorySourceLocation", "lang", "returnInfo"]);
149
+ _this = _super.call(this) || this;
150
+ _this.er = er;
151
+ _this.setVal("recentActivityArticlesMandatorySourceLocation", mandatorySourceLocation);
152
+ if (lang !== undefined) {
153
+ _this.setVal("recentActivityArticlesLang", lang);
154
+ }
155
+ _this.params = __assign(__assign({}, _this.params), kwargs);
156
+ _this.params = __assign(__assign({}, _this.params), returnInfo.getParams("recentActivityArticles"));
157
+ return _this;
158
+ }
159
+ Object.defineProperty(GetRecentArticles.prototype, "path", {
160
+ get: function () {
161
+ return "/api/v1/minuteStreamArticles";
162
+ },
163
+ enumerable: false,
164
+ configurable: true
165
+ });
166
+ GetRecentArticles.prototype.getUpdates = function () {
167
+ return __awaiter(this, void 0, void 0, function () {
168
+ var response, _a, _b, _c, key, value, splitKey;
169
+ var e_1, _d;
170
+ return __generator(this, function (_e) {
171
+ switch (_e.label) {
172
+ case 0: return [4 /*yield*/, this.er.execQuery(this)];
173
+ case 1:
174
+ response = _e.sent();
175
+ if (response === null || response === void 0 ? void 0 : response.recentActivityArticles) {
176
+ try {
177
+ for (_a = __values(Object.entries(response.recentActivityArticles.newestUri || {})), _b = _a.next(); !_b.done; _b = _a.next()) {
178
+ _c = __read(_b.value, 2), key = _c[0], value = _c[1];
179
+ splitKey = key.split("");
180
+ this.setVal("recentActivityArticles" + splitKey[0].toUpperCase() + splitKey.slice(1).join(""), value);
181
+ }
182
+ }
183
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
184
+ finally {
185
+ try {
186
+ if (_b && !_b.done && (_d = _a.return)) _d.call(_a);
187
+ }
188
+ finally { if (e_1) throw e_1.error; }
189
+ }
190
+ return [2 /*return*/, response.recentActivityArticles.activity || []];
191
+ }
192
+ return [2 /*return*/, []];
193
+ }
194
+ });
195
+ });
196
+ };
197
+ return GetRecentArticles;
198
+ }(base_1.QueryParamsBase));
199
+ exports.GetRecentArticles = GetRecentArticles;
180
200
  //# sourceMappingURL=recent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recent.js","sourceRoot":"","sources":["../src/recent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0BAA4B;AAC5B,+BAAyC;AAEzC,2CAA0C;AAE1C;IAAqC,mCAAe;IAEhD,yBAAY,EAAiB,EAAE,EAGM;YAHN,4BAGM,EAHJ,qBAAyB,EAAzB,8CAAyB,EACzB,yBAAwB,EAAxB,6CAAwB,EACxB,kBAA6B,EAA7B,+DAA6B;QAF9D,YAII,iBAAO,SAOV;QANG,KAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,KAAI,CAAC,MAAM,CAA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AAE,CAAC,EAAE,KAAK,CAAC,CAAC;gCAC1G,CAAC;;;;;;;;;4BACD,sBAAQ,QAAQ,CAAC,sBAA+D,CAAC,QAAQ,IAAI,EAAE,EAAC;wBACpG,CAAC;wBACD,sBAAO,EAAE,EAAC;;;;KACb;IACL,wBAAC;AAAD,CAAC,AAhCD,CAAuC,sBAAe,GAgCrD;AAhCY,8CAAiB"}
@@ -1,66 +1,68 @@
1
- import * as _ from "lodash";
2
- import { EventRegistryStatic } from "./types";
3
- export declare abstract class ReturnInfoFlagsBase<T extends {}> {
4
- protected type: string;
5
- private data;
6
- setFlag(key: string, value: boolean, defaultValue?: boolean): void;
7
- setValue(key: string, value: any, defaultValue?: any, skipKeyMod?: boolean): void;
8
- getProperties(prefix?: string): _.Dictionary<never>;
9
- addProperties(properties: object): void;
10
- private setProperty;
11
- }
12
- export declare class ReturnInfo {
13
- private articleInfo;
14
- private eventInfo;
15
- private sourceInfo;
16
- private categoryInfo;
17
- private conceptInfo;
18
- private locationInfo;
19
- private storyInfo;
20
- private conceptClassInfo;
21
- private conceptFolderInfo;
22
- constructor({ articleInfo, eventInfo, sourceInfo, categoryInfo, conceptInfo, locationInfo, storyInfo, conceptClassInfo, conceptFolderInfo, ...unsupported }?: {
23
- articleInfo?: ArticleInfoFlags;
24
- eventInfo?: EventInfoFlags;
25
- sourceInfo?: SourceInfoFlags;
26
- categoryInfo?: CategoryInfoFlags;
27
- conceptInfo?: ConceptInfoFlags;
28
- locationInfo?: LocationInfoFlags;
29
- storyInfo?: StoryInfoFlags;
30
- conceptClassInfo?: ConceptClassInfoFlags;
31
- conceptFolderInfo?: ConceptFolderInfoFlags;
32
- });
33
- getParams(prefix?: string): {};
34
- /**
35
- * load the configuration for the ReturnInfo from a filename
36
- * @param filename filename that contains the json configuration to use in the ReturnInfo
37
- */
38
- static loadFromFile(filename: string): ReturnInfo;
39
- }
40
- export declare class ArticleInfoFlags extends ReturnInfoFlagsBase<EventRegistryStatic.ReturnInfo.ArticleInfoFlags> {
41
- constructor(params?: EventRegistryStatic.ReturnInfo.ArticleInfo);
42
- }
43
- export declare class StoryInfoFlags extends ReturnInfoFlagsBase<EventRegistryStatic.ReturnInfo.StoryInfoFlags> {
44
- constructor(params?: EventRegistryStatic.ReturnInfo.StoryInfo);
45
- }
46
- export declare class EventInfoFlags extends ReturnInfoFlagsBase<EventRegistryStatic.ReturnInfo.EventInfoFlags> {
47
- constructor(params?: EventRegistryStatic.ReturnInfo.EventInfo);
48
- }
49
- export declare class SourceInfoFlags extends ReturnInfoFlagsBase<EventRegistryStatic.ReturnInfo.SourceInfoFlags> {
50
- constructor(params?: EventRegistryStatic.ReturnInfo.SourceInfo);
51
- }
52
- export declare class CategoryInfoFlags extends ReturnInfoFlagsBase<EventRegistryStatic.ReturnInfo.CategoryInfoFlags> {
53
- constructor(params?: EventRegistryStatic.ReturnInfo.CategoryInfo);
54
- }
55
- export declare class ConceptInfoFlags extends ReturnInfoFlagsBase<EventRegistryStatic.ReturnInfo.ConceptInfoFlags> {
56
- constructor(params?: EventRegistryStatic.ReturnInfo.ConceptInfo);
57
- }
58
- export declare class LocationInfoFlags extends ReturnInfoFlagsBase<EventRegistryStatic.ReturnInfo.LocationInfoFlags> {
59
- constructor(params?: EventRegistryStatic.ReturnInfo.LocationInfo);
60
- }
61
- export declare class ConceptClassInfoFlags extends ReturnInfoFlagsBase<EventRegistryStatic.ReturnInfo.ConceptClassInfoFlags> {
62
- constructor(params?: EventRegistryStatic.ReturnInfo.ConceptClassInfo);
63
- }
64
- export declare class ConceptFolderInfoFlags extends ReturnInfoFlagsBase<EventRegistryStatic.ReturnInfo.ConceptFolderInfoFlags> {
65
- constructor(params?: EventRegistryStatic.ReturnInfo.ConceptFolderInfo);
66
- }
1
+ import { ER } from "./types";
2
+ export declare abstract class ReturnInfoFlagsBase<T extends {}> {
3
+ protected type: string;
4
+ private data;
5
+ setFlag(key: string, value: boolean, defaultValue?: boolean): void;
6
+ setValue(key: string, value: any, defaultValue?: any, skipKeyMod?: boolean): void;
7
+ getProperties(prefix?: string): {
8
+ [key: string]: any;
9
+ };
10
+ private camelCase;
11
+ addProperties(properties: object): void;
12
+ private setProperty;
13
+ }
14
+ export declare class ReturnInfo {
15
+ private articleInfo;
16
+ private eventInfo;
17
+ private sourceInfo;
18
+ private categoryInfo;
19
+ private conceptInfo;
20
+ private locationInfo;
21
+ private storyInfo;
22
+ private conceptClassInfo;
23
+ private conceptFolderInfo;
24
+ constructor({ articleInfo, eventInfo, sourceInfo, categoryInfo, conceptInfo, locationInfo, storyInfo, conceptClassInfo, conceptFolderInfo, ...unsupported }?: {
25
+ articleInfo?: ArticleInfoFlags;
26
+ eventInfo?: EventInfoFlags;
27
+ sourceInfo?: SourceInfoFlags;
28
+ categoryInfo?: CategoryInfoFlags;
29
+ conceptInfo?: ConceptInfoFlags;
30
+ locationInfo?: LocationInfoFlags;
31
+ storyInfo?: StoryInfoFlags;
32
+ conceptClassInfo?: ConceptClassInfoFlags;
33
+ conceptFolderInfo?: ConceptFolderInfoFlags;
34
+ });
35
+ getParams(prefix?: string): Record<string, unknown>;
36
+ /**
37
+ * load the configuration for the ReturnInfo from a filename
38
+ * @param filename filename that contains the json configuration to use in the ReturnInfo
39
+ */
40
+ static loadFromFile(filename: string): ReturnInfo;
41
+ }
42
+ export declare class ArticleInfoFlags extends ReturnInfoFlagsBase<ER.ReturnInfo.ArticleInfoFlags> {
43
+ constructor(params?: ER.ReturnInfo.ArticleInfo);
44
+ }
45
+ export declare class StoryInfoFlags extends ReturnInfoFlagsBase<ER.ReturnInfo.StoryInfoFlags> {
46
+ constructor(params?: ER.ReturnInfo.StoryInfo);
47
+ }
48
+ export declare class EventInfoFlags extends ReturnInfoFlagsBase<ER.ReturnInfo.EventInfoFlags> {
49
+ constructor(params?: ER.ReturnInfo.EventInfo);
50
+ }
51
+ export declare class SourceInfoFlags extends ReturnInfoFlagsBase<ER.ReturnInfo.SourceInfoFlags> {
52
+ constructor(params?: ER.ReturnInfo.SourceInfo);
53
+ }
54
+ export declare class CategoryInfoFlags extends ReturnInfoFlagsBase<ER.ReturnInfo.CategoryInfoFlags> {
55
+ constructor(params?: ER.ReturnInfo.CategoryInfo);
56
+ }
57
+ export declare class ConceptInfoFlags extends ReturnInfoFlagsBase<ER.ReturnInfo.ConceptInfoFlags> {
58
+ constructor(params?: ER.ReturnInfo.ConceptInfo);
59
+ }
60
+ export declare class LocationInfoFlags extends ReturnInfoFlagsBase<ER.ReturnInfo.LocationInfoFlags> {
61
+ constructor(params?: ER.ReturnInfo.LocationInfo);
62
+ }
63
+ export declare class ConceptClassInfoFlags extends ReturnInfoFlagsBase<ER.ReturnInfo.ConceptClassInfoFlags> {
64
+ constructor(params?: ER.ReturnInfo.ConceptClassInfo);
65
+ }
66
+ export declare class ConceptFolderInfoFlags extends ReturnInfoFlagsBase<ER.ReturnInfo.ConceptFolderInfoFlags> {
67
+ constructor(params?: ER.ReturnInfo.ConceptFolderInfo);
68
+ }