@ezpaarse-project/ezreeport-sdk-js 1.0.0-rc.1 → 1.1.0-beta.1

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 (102) hide show
  1. package/README.md +1 -1
  2. package/dist/browser/ezreeport-sdk-js.mjs +598 -1968
  3. package/dist/browser/ezreeport-sdk-js.mjs.map +1 -1
  4. package/dist/browser/ezreeport-sdk-js.umd.js +1 -3
  5. package/dist/browser/ezreeport-sdk-js.umd.js.map +1 -1
  6. package/dist/node/ezreeport-sdk-js.js +2 -0
  7. package/dist/node/ezreeport-sdk-js.js.map +1 -0
  8. package/dist/node/ezreeport-sdk-js.mjs +979 -0
  9. package/dist/node/ezreeport-sdk-js.mjs.map +1 -0
  10. package/dist/types/{src/index.d.ts → index.d.ts} +4 -2
  11. package/dist/types/{src/lib → lib}/axios.d.ts +2 -2
  12. package/dist/types/{src/lib → lib}/utils.d.ts +5 -0
  13. package/dist/types/{src/modules → modules}/elastic.d.ts +11 -0
  14. package/dist/types/modules/elastic.public.d.ts +1 -0
  15. package/dist/types/{src/modules → modules}/queues.d.ts +2 -4
  16. package/dist/types/{src/modules → modules}/tasks.d.ts +26 -4
  17. package/dist/types/modules/tasks.public.d.ts +2 -0
  18. package/dist/types/{src/modules → modules}/tasksActivity.d.ts +2 -4
  19. package/dist/types/modules/tasksPresets.d.ts +83 -0
  20. package/dist/types/modules/tasksPresets.public.d.ts +1 -0
  21. package/package.json +17 -14
  22. package/dist/node/package.json +0 -58
  23. package/dist/node/src/index.js +0 -42
  24. package/dist/node/src/index.js.map +0 -1
  25. package/dist/node/src/lib/axios.js +0 -95
  26. package/dist/node/src/lib/axios.js.map +0 -1
  27. package/dist/node/src/lib/promises.js +0 -41
  28. package/dist/node/src/lib/promises.js.map +0 -1
  29. package/dist/node/src/lib/utils.js +0 -24
  30. package/dist/node/src/lib/utils.js.map +0 -1
  31. package/dist/node/src/modules/auth.js +0 -111
  32. package/dist/node/src/modules/auth.js.map +0 -1
  33. package/dist/node/src/modules/auth.public.js +0 -11
  34. package/dist/node/src/modules/auth.public.js.map +0 -1
  35. package/dist/node/src/modules/crons.js +0 -128
  36. package/dist/node/src/modules/crons.js.map +0 -1
  37. package/dist/node/src/modules/crons.public.js +0 -11
  38. package/dist/node/src/modules/crons.public.js.map +0 -1
  39. package/dist/node/src/modules/elastic.js +0 -31
  40. package/dist/node/src/modules/elastic.js.map +0 -1
  41. package/dist/node/src/modules/elastic.public.js +0 -7
  42. package/dist/node/src/modules/elastic.public.js.map +0 -1
  43. package/dist/node/src/modules/health.js +0 -60
  44. package/dist/node/src/modules/health.js.map +0 -1
  45. package/dist/node/src/modules/health.public.js +0 -9
  46. package/dist/node/src/modules/health.public.js.map +0 -1
  47. package/dist/node/src/modules/history.js +0 -62
  48. package/dist/node/src/modules/history.js.map +0 -1
  49. package/dist/node/src/modules/history.public.js +0 -6
  50. package/dist/node/src/modules/history.public.js.map +0 -1
  51. package/dist/node/src/modules/namespaces.js +0 -15
  52. package/dist/node/src/modules/namespaces.js.map +0 -1
  53. package/dist/node/src/modules/namespaces.public.js +0 -3
  54. package/dist/node/src/modules/namespaces.public.js.map +0 -1
  55. package/dist/node/src/modules/queues.js +0 -179
  56. package/dist/node/src/modules/queues.js.map +0 -1
  57. package/dist/node/src/modules/queues.public.js +0 -13
  58. package/dist/node/src/modules/queues.public.js.map +0 -1
  59. package/dist/node/src/modules/reports.js +0 -267
  60. package/dist/node/src/modules/reports.js.map +0 -1
  61. package/dist/node/src/modules/reports.public.js +0 -13
  62. package/dist/node/src/modules/reports.public.js.map +0 -1
  63. package/dist/node/src/modules/setup.js +0 -35
  64. package/dist/node/src/modules/setup.js.map +0 -1
  65. package/dist/node/src/modules/setup.public.js +0 -12
  66. package/dist/node/src/modules/setup.public.js.map +0 -1
  67. package/dist/node/src/modules/tasks.base.js +0 -51
  68. package/dist/node/src/modules/tasks.base.js.map +0 -1
  69. package/dist/node/src/modules/tasks.js +0 -264
  70. package/dist/node/src/modules/tasks.js.map +0 -1
  71. package/dist/node/src/modules/tasks.public.js +0 -20
  72. package/dist/node/src/modules/tasks.public.js.map +0 -1
  73. package/dist/node/src/modules/tasksActivity.js +0 -62
  74. package/dist/node/src/modules/tasksActivity.js.map +0 -1
  75. package/dist/node/src/modules/tasksActivity.public.js +0 -6
  76. package/dist/node/src/modules/tasksActivity.public.js.map +0 -1
  77. package/dist/node/src/modules/templates.js +0 -136
  78. package/dist/node/src/modules/templates.js.map +0 -1
  79. package/dist/node/src/modules/templates.public.js +0 -11
  80. package/dist/node/src/modules/templates.public.js.map +0 -1
  81. package/dist/types/src/modules/elastic.public.d.ts +0 -1
  82. package/dist/types/src/modules/history.d.ts +0 -38
  83. package/dist/types/src/modules/history.public.d.ts +0 -1
  84. package/dist/types/src/modules/tasks.public.d.ts +0 -2
  85. /package/dist/types/{src/lib → lib}/promises.d.ts +0 -0
  86. /package/dist/types/{src/modules → modules}/auth.d.ts +0 -0
  87. /package/dist/types/{src/modules → modules}/auth.public.d.ts +0 -0
  88. /package/dist/types/{src/modules → modules}/crons.d.ts +0 -0
  89. /package/dist/types/{src/modules → modules}/crons.public.d.ts +0 -0
  90. /package/dist/types/{src/modules → modules}/health.d.ts +0 -0
  91. /package/dist/types/{src/modules → modules}/health.public.d.ts +0 -0
  92. /package/dist/types/{src/modules → modules}/namespaces.d.ts +0 -0
  93. /package/dist/types/{src/modules → modules}/namespaces.public.d.ts +0 -0
  94. /package/dist/types/{src/modules → modules}/queues.public.d.ts +0 -0
  95. /package/dist/types/{src/modules → modules}/reports.d.ts +0 -0
  96. /package/dist/types/{src/modules → modules}/reports.public.d.ts +0 -0
  97. /package/dist/types/{src/modules → modules}/setup.d.ts +0 -0
  98. /package/dist/types/{src/modules → modules}/setup.public.d.ts +0 -0
  99. /package/dist/types/{src/modules → modules}/tasks.base.d.ts +0 -0
  100. /package/dist/types/{src/modules → modules}/tasksActivity.public.d.ts +0 -0
  101. /package/dist/types/{src/modules → modules}/templates.d.ts +0 -0
  102. /package/dist/types/{src/modules → modules}/templates.public.d.ts +0 -0
@@ -1,267 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
- var __importDefault = (this && this.__importDefault) || function (mod) {
35
- return (mod && mod.__esModule) ? mod : { "default": mod };
36
- };
37
- Object.defineProperty(exports, "__esModule", { value: true });
38
- exports.getReportDebugByJob = exports.getReportDebugByName = exports.getReportDetailByJob = exports.getReportDetailByName = exports.getReportFileByJob = exports.getReportFileByName = exports.startAndListenGeneration = exports.startGeneration = void 0;
39
- const date_fns_1 = require("date-fns");
40
- const axios_1 = __importStar(require("../lib/axios"));
41
- const promises_1 = __importDefault(require("../lib/promises"));
42
- const utils_1 = require("../lib/utils");
43
- const queues_1 = require("./queues");
44
- /**
45
- * Transform raw data from JSON, to JS usable data
46
- *
47
- * @param detail Raw result detail
48
- *
49
- * @returns Parsed result detail
50
- */
51
- const parseReportResultDetail = (detail) => (Object.assign(Object.assign({}, detail), { createdAt: (0, date_fns_1.parseISO)(detail.createdAt), destroyAt: (0, date_fns_1.parseISO)(detail.destroyAt), period: detail.period ? (0, utils_1.parsePeriod)(detail.period) : undefined }));
52
- /**
53
- * Transform raw data from JSON, to JS usable data
54
- *
55
- * @param result Raw result
56
- *
57
- * @returns Parsed result
58
- */
59
- const parseReportResult = (result) => (Object.assign(Object.assign({}, result), { detail: parseReportResultDetail(result.detail) }));
60
- /**
61
- * Start generation of a report
62
- *
63
- * Needs `namespaces[namespaceId].tasks-post-task-_run` permission
64
- *
65
- * @param taskOrId Task or id of the task
66
- * @param params Other params for overriding default
67
- * @param namespaces
68
- *
69
- * @returns Job info to track progress
70
- */
71
- const startGeneration = (taskOrId, params, namespaces) => {
72
- var _a, _b;
73
- const id = typeof taskOrId === 'string' ? taskOrId : taskOrId.id;
74
- return axios_1.default.$post(`/tasks/${id}/_run`, null, {
75
- params: {
76
- test_emails: params === null || params === void 0 ? void 0 : params.testEmails,
77
- period_start: (_a = params === null || params === void 0 ? void 0 : params.period) === null || _a === void 0 ? void 0 : _a.start,
78
- period_end: (_b = params === null || params === void 0 ? void 0 : params.period) === null || _b === void 0 ? void 0 : _b.end,
79
- namespaces,
80
- },
81
- });
82
- };
83
- exports.startGeneration = startGeneration;
84
- /**
85
- * Start generation of a report and track progress
86
- *
87
- * Needs `namespaces[namespaceId].tasks-post-task-run`
88
- * & `namespaces[namespaceId].queues-get-queue-jobs-jobId` permissions
89
- *
90
- * @param taskOrId Task or id of the task
91
- * @param params Other params for overriding default
92
- * @param namespaces
93
- *
94
- * @fires #started When generation started. See `GenerationStartedEvent`.
95
- * @fires #progress When generation progress. See `GenerationProgressEvent`. Job's progress is
96
- * between 0 and 1
97
- *
98
- * @throws If job's fails. **Not if generation fails !**
99
- *
100
- * @returns When generation ends, with detail
101
- */
102
- const startAndListenGeneration = (...p) => (0, promises_1.default)((events) => __awaiter(void 0, void 0, void 0, function* () {
103
- const { content: { id, queue } } = yield (0, exports.startGeneration)(...p);
104
- events.emit('started', { id, queue });
105
- // Pulling updates
106
- // TODO[feat]: WS ?
107
- let last;
108
- do {
109
- const { content: { progress, status, result, },
110
- // FIXME: What if param order changes ?
111
- // eslint-disable-next-line no-await-in-loop
112
- } = yield (0, queues_1.getJob)(queue, id, p[2]);
113
- last = { progress, status, result };
114
- events.emit('progress', { progress, status });
115
- let sleepDuration = 1000;
116
- if (last.status === 'active') {
117
- sleepDuration = 250;
118
- }
119
- // eslint-disable-next-line no-await-in-loop
120
- yield (0, utils_1.setTimeoutAsync)(sleepDuration);
121
- } while ((['completed', 'failed', 'stuck']).includes(last.status) === false);
122
- if (!last.result) {
123
- throw new Error('Generation failed with weird error');
124
- }
125
- return parseReportResult(last.result);
126
- }));
127
- exports.startAndListenGeneration = startAndListenGeneration;
128
- /**
129
- * Get report's related file
130
- *
131
- * Needs `namespaces[namespaceId].reports-get-year-yearMonth-filename` permission
132
- *
133
- * @param pathName Path to the file
134
- * @param namespaces
135
- * @param responseType Wanted response type
136
- *
137
- * @returns The file's content
138
- */
139
- const getFile = (pathName, namespaces, responseType) => __awaiter(void 0, void 0, void 0, function* () {
140
- return (yield (0, axios_1.axiosWithErrorFormatter)('get', `/reports/${pathName}`, {
141
- responseType,
142
- params: { namespaces },
143
- })).data;
144
- });
145
- /**
146
- * Get report main file (the result) by giving the report's name
147
- *
148
- * Needs `namespaces[namespaceId].reports-get-year-yearMonth-filename` permission
149
- *
150
- * @param name Name of the report
151
- * @param ext The extension of the result (renderer dependent)
152
- * @param namespaces
153
- * @param responseType Wanted response type
154
- *
155
- * @returns The report's content
156
- */
157
- const getReportFileByName = (name, namespaces, responseType, ext = 'pdf') => getFile(`${name}.rep.${ext}`, namespaces, responseType);
158
- exports.getReportFileByName = getReportFileByName;
159
- /**
160
- * Get report main file (the result) by giving job's info
161
- *
162
- * Needs `namespaces[namespaceId].reports-get-year-yearMonth-filename`
163
- * & `namespaces[namespaceId].queues-get-queue-jobs-jobId ` permission
164
- *
165
- * @param queueOrName Queue or queue's name where job is
166
- * @param jobOrId Job or job's id in queue
167
- * @param namespaces
168
- * @param responseType Wanted response type
169
- *
170
- * @returns The report's content
171
- */
172
- const getReportFileByJob = (queueName, jobId, namespaces, responseType) => __awaiter(void 0, void 0, void 0, function* () {
173
- var _a, _b;
174
- const { content: { result } } = yield (0, queues_1.getJob)(queueName, jobId, namespaces);
175
- if (!result) {
176
- throw new Error('Job have no result');
177
- }
178
- return getFile((_b = (_a = result.detail) === null || _a === void 0 ? void 0 : _a.files.report) !== null && _b !== void 0 ? _b : '', namespaces, responseType);
179
- });
180
- exports.getReportFileByJob = getReportFileByJob;
181
- /**
182
- * Get report detail by giving the report's name
183
- *
184
- * Needs `namespaces[namespaceId].reports-get-year-yearMonth-filename` permission
185
- *
186
- * @param name Name of the report
187
- * @param namespaces
188
- * @param responseType Wanted response type. **If provided with anything but `json` you will have to
189
- * cast in your type to avoid auto-completion issues.**
190
- *
191
- * @returns The detail's content
192
- */
193
- const getReportDetailByName = (name, namespaces, responseType) => __awaiter(void 0, void 0, void 0, function* () {
194
- const res = yield getFile(`${name}.det.json`, namespaces, responseType);
195
- if (!responseType || responseType === 'json') {
196
- return parseReportResult(res);
197
- }
198
- // Allowing user to ask for other response type (and then cast in wanted type)
199
- // while not breaking auto-completion
200
- return res;
201
- });
202
- exports.getReportDetailByName = getReportDetailByName;
203
- /**
204
- * Get report detail by giving job's info
205
- *
206
- * Needs `namespaces[namespaceId].reports-get-year-yearMonth-filename`
207
- * & `namespaces[namespaceId].queues-get-queue-jobs-jobId` permission
208
- *
209
- * @param queueOrName Queue or queue's name where job is
210
- * @param jobOrId Job or job's id in queue
211
- * @param namespaces
212
- * @param responseType Wanted response type. **If provided with anything but `json` you will have to
213
- * cast in your type to avoid auto-completion issues.**
214
- *
215
- * @returns The detail's content
216
- */
217
- const getReportDetailByJob = (queueName, jobId, namespaces, responseType) => __awaiter(void 0, void 0, void 0, function* () {
218
- var _c, _d;
219
- const { content: { result } } = yield (0, queues_1.getJob)(queueName, jobId, namespaces);
220
- if (!result) {
221
- throw new Error('Job have no result');
222
- }
223
- const res = yield getFile((_d = (_c = result.detail) === null || _c === void 0 ? void 0 : _c.files.detail) !== null && _d !== void 0 ? _d : '', namespaces, responseType);
224
- if (!responseType || responseType === 'json') {
225
- return parseReportResult(res);
226
- }
227
- // Allowing user to ask for other response type (and then use `as`)
228
- // while not breaking auto-completion
229
- return res;
230
- });
231
- exports.getReportDetailByJob = getReportDetailByJob;
232
- /**
233
- * Get report debug file by giving the report's name
234
- *
235
- * Needs `namespaces[namespaceId].reports-get-year-yearMonth-filename` permission
236
- *
237
- * @param name Name of the report
238
- * @param namespaces
239
- * @param responseType Wanted response type
240
- *
241
- * @returns The debug's content
242
- */
243
- const getReportDebugByName = (name, namespaces, responseType) => getFile(`${name}.deb.json`, namespaces, responseType);
244
- exports.getReportDebugByName = getReportDebugByName;
245
- /**
246
- * Get report debug file by giving job's info
247
- *
248
- * Needs `namespaces[namespaceId].reports-get-year-yearMonth-filename`
249
- * & `namespaces[namespaceId].queues-get-queue-jobs-jobId ` permission
250
- *
251
- * @param queueOrName Queue or queue's name where job is
252
- * @param jobOrId Job or job's id in queue
253
- * @param namespaces
254
- * @param responseType Wanted response type
255
- *
256
- * @returns The debug's content
257
- */
258
- const getReportDebugByJob = (queueName, jobId, namespaces, responseType) => __awaiter(void 0, void 0, void 0, function* () {
259
- var _e, _f;
260
- const { content: { result } } = yield (0, queues_1.getJob)(queueName, jobId, namespaces);
261
- if (!result) {
262
- throw new Error('Job have no result');
263
- }
264
- return getFile((_f = (_e = result.detail) === null || _e === void 0 ? void 0 : _e.files.debug) !== null && _f !== void 0 ? _f : '', namespaces, responseType);
265
- });
266
- exports.getReportDebugByJob = getReportDebugByJob;
267
- //# sourceMappingURL=reports.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reports.js","sourceRoot":"","sources":["../../../../src/modules/reports.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAAoC;AAGpC,sDAA8D;AAC9D,+DAAoD;AACpD,wCAKsB;AAEtB,qCAMkB;AAmClB;;;;;;GAMG;AACH,MAAM,uBAAuB,GAAG,CAAC,MAA6B,EAAsB,EAAE,CAAC,iCAClF,MAAM,KACT,SAAS,EAAE,IAAA,mBAAQ,EAAC,MAAM,CAAC,SAAS,CAAC,EACrC,SAAS,EAAE,IAAA,mBAAQ,EAAC,MAAM,CAAC,SAAS,CAAC,EACrC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,mBAAW,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,IAC9D,CAAC;AAWH;;;;;;GAMG;AACH,MAAM,iBAAiB,GAAG,CAAC,MAAuB,EAAgB,EAAE,CAAC,iCAChE,MAAM,KACT,MAAM,EAAE,uBAAuB,CAAC,MAAM,CAAC,MAAM,CAAC,IAC9C,CAAC;AAaH;;;;;;;;;;GAUG;AACI,MAAM,eAAe,GAAG,CAC7B,QAAyC,EACzC,MAUC,EACD,UAAqB,EACrB,EAAE;;IACF,MAAM,EAAE,GAAG,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;IACjE,OAAO,eAAK,CAAC,KAAK,CAChB,UAAU,EAAE,OAAO,EACnB,IAAI,EACJ;QACE,MAAM,EAAE;YACN,WAAW,EAAE,MAAM,aAAN,MAAM,uBAAN,MAA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,GAAG,CAClC,IAAY,EACZ,UAAqB,EACrB,YAAqB,EACrB,EAAE,CAAC,OAAO,CAA0B,GAAG,IAAI,WAAW,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;AAJvE,QAAA,oBAAoB,wBAImD;AAEpF;;;;;;;;;;;;GAYG;AACI,MAAM,mBAAmB,GAAG,CACjC,SAAgC,EAChC,KAAoD,EACpD,UAAqB,EACrB,YAAqB,EACrB,EAAE;;IACF,MAAM,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,IAAA,eAAM,EAC1C,SAAS,EACT,KAAK,EACL,UAAU,CACX,CAAC;IACF,IAAI,CAAC,MAAM,EAAE;QACX,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;KACvC;IACD,OAAO,OAAO,CAA0B,MAAA,MAAA,MAAM,CAAC,MAAM,0CAAE,KAAK,CAAC,KAAK,mCAAI,EAAE,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;AACtG,CAAC,CAAA,CAAC;AAfW,QAAA,mBAAmB,uBAe9B"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getReportDebugByJob = exports.getReportDebugByName = exports.getReportDetailByJob = exports.getReportDetailByName = exports.getReportFileByJob = exports.getReportFileByName = exports.startAndListenGeneration = exports.startGeneration = void 0;
4
- var reports_1 = require("./reports");
5
- Object.defineProperty(exports, "startGeneration", { enumerable: true, get: function () { return reports_1.startGeneration; } });
6
- Object.defineProperty(exports, "startAndListenGeneration", { enumerable: true, get: function () { return reports_1.startAndListenGeneration; } });
7
- Object.defineProperty(exports, "getReportFileByName", { enumerable: true, get: function () { return reports_1.getReportFileByName; } });
8
- Object.defineProperty(exports, "getReportFileByJob", { enumerable: true, get: function () { return reports_1.getReportFileByJob; } });
9
- Object.defineProperty(exports, "getReportDetailByName", { enumerable: true, get: function () { return reports_1.getReportDetailByName; } });
10
- Object.defineProperty(exports, "getReportDetailByJob", { enumerable: true, get: function () { return reports_1.getReportDetailByJob; } });
11
- Object.defineProperty(exports, "getReportDebugByName", { enumerable: true, get: function () { return reports_1.getReportDebugByName; } });
12
- Object.defineProperty(exports, "getReportDebugByJob", { enumerable: true, get: function () { return reports_1.getReportDebugByJob; } });
13
- //# sourceMappingURL=reports.public.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reports.public.js","sourceRoot":"","sources":["../../../../src/modules/reports.public.ts"],"names":[],"mappings":";;;AAAA,qCAamB;AARjB,0GAAA,eAAe,OAAA;AACf,mHAAA,wBAAwB,OAAA;AACxB,8GAAA,mBAAmB,OAAA;AACnB,6GAAA,kBAAkB,OAAA;AAClB,gHAAA,qBAAqB,OAAA;AACrB,+GAAA,oBAAoB,OAAA;AACpB,+GAAA,oBAAoB,OAAA;AACpB,8GAAA,mBAAmB,OAAA"}
@@ -1,35 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.isURLset = exports.unsetURL = exports.setURL = exports.logout = exports.login = exports.isLogged = void 0;
7
- const axios_1 = __importDefault(require("../lib/axios"));
8
- var auth_1 = require("./auth");
9
- Object.defineProperty(exports, "isLogged", { enumerable: true, get: function () { return auth_1.isLogged; } });
10
- Object.defineProperty(exports, "login", { enumerable: true, get: function () { return auth_1.login; } });
11
- Object.defineProperty(exports, "logout", { enumerable: true, get: function () { return auth_1.logout; } });
12
- /**
13
- * Set API url to axios
14
- *
15
- * @param url The url
16
- */
17
- const setURL = (url) => {
18
- axios_1.default.defaults.baseURL = url;
19
- };
20
- exports.setURL = setURL;
21
- /**
22
- * Unset API url from axios
23
- */
24
- const unsetURL = () => {
25
- axios_1.default.defaults.baseURL = undefined;
26
- };
27
- exports.unsetURL = unsetURL;
28
- /**
29
- * Check if API url is setup in axios
30
- *
31
- * @returns If API url is setup
32
- */
33
- const isURLset = () => !!axios_1.default.defaults.baseURL;
34
- exports.isURLset = isURLset;
35
- //# sourceMappingURL=setup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../../src/modules/setup.ts"],"names":[],"mappings":";;;;;;AAAA,yDAAiC;AAEjC,+BAAiD;AAAxC,gGAAA,QAAQ,OAAA;AAAE,6FAAA,KAAK,OAAA;AAAE,8FAAA,MAAM,OAAA;AAEhC;;;;GAIG;AACI,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,EAAE;IACpC,eAAK,CAAC,QAAQ,CAAC,OAAO,GAAG,GAAG,CAAC;AAC/B,CAAC,CAAC;AAFW,QAAA,MAAM,UAEjB;AAEF;;GAEG;AACI,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,eAAK,CAAC,QAAQ,CAAC,OAAO,GAAG,SAAS,CAAC;AACrC,CAAC,CAAC;AAFW,QAAA,QAAQ,YAEnB;AAEF;;;;GAIG;AACI,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,eAAK,CAAC,QAAQ,CAAC,OAAO,CAAC;AAA1C,QAAA,QAAQ,YAAkC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.logout = exports.login = exports.isLogged = exports.isURLset = exports.unsetURL = exports.setURL = void 0;
4
- var setup_1 = require("./setup");
5
- Object.defineProperty(exports, "setURL", { enumerable: true, get: function () { return setup_1.setURL; } });
6
- Object.defineProperty(exports, "unsetURL", { enumerable: true, get: function () { return setup_1.unsetURL; } });
7
- Object.defineProperty(exports, "isURLset", { enumerable: true, get: function () { return setup_1.isURLset; } });
8
- var auth_1 = require("./auth");
9
- Object.defineProperty(exports, "isLogged", { enumerable: true, get: function () { return auth_1.isLogged; } });
10
- Object.defineProperty(exports, "login", { enumerable: true, get: function () { return auth_1.login; } });
11
- Object.defineProperty(exports, "logout", { enumerable: true, get: function () { return auth_1.logout; } });
12
- //# sourceMappingURL=setup.public.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.public.js","sourceRoot":"","sources":["../../../../src/modules/setup.public.ts"],"names":[],"mappings":";;;AAAA,iCAIiB;AAHf,+FAAA,MAAM,OAAA;AACN,iGAAA,QAAQ,OAAA;AACR,iGAAA,QAAQ,OAAA;AAGV,+BAIgB;AAHd,gGAAA,QAAQ,OAAA;AACR,6FAAA,KAAK,OAAA;AACL,8FAAA,MAAM,OAAA"}
@@ -1,51 +0,0 @@
1
- "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.parseTaskWithNamespace = exports.parseTask = exports.Recurrence = void 0;
15
- const date_fns_1 = require("date-fns");
16
- const namespaces_1 = require("./namespaces");
17
- var Recurrence;
18
- (function (Recurrence) {
19
- Recurrence["DAILY"] = "DAILY";
20
- Recurrence["WEEKLY"] = "WEEKLY";
21
- Recurrence["MONTHLY"] = "MONTHLY";
22
- Recurrence["QUARTERLY"] = "QUARTERLY";
23
- Recurrence["BIENNIAL"] = "BIENNIAL";
24
- Recurrence["YEARLY"] = "YEARLY";
25
- })(Recurrence || (exports.Recurrence = Recurrence = {}));
26
- // Private export
27
- /**
28
- * Transform raw data from JSON, to JS usable data
29
- *
30
- * @param task Raw task
31
- *
32
- * @returns Parsed task
33
- */
34
- const parseTask = (task) => (Object.assign(Object.assign({}, task), { nextRun: (0, date_fns_1.parseISO)(task.nextRun), lastRun: task.lastRun ? (0, date_fns_1.parseISO)(task.lastRun) : undefined, createdAt: (0, date_fns_1.parseISO)(task.createdAt), updatedAt: task.updatedAt ? (0, date_fns_1.parseISO)(task.updatedAt) : undefined }));
35
- exports.parseTask = parseTask;
36
- // Private export
37
- /**
38
- * Transform raw data from JSON, to JS usable data
39
- *
40
- * @param task Raw task with namespace
41
- *
42
- * @returns Parsed task with namespace
43
- */
44
- const parseTaskWithNamespace = (task) => {
45
- const { namespace } = task, rawTask = __rest(task, ["namespace"]);
46
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
47
- const _a = (0, exports.parseTask)(Object.assign({ namespaceId: namespace.id }, rawTask)), { namespaceId } = _a, parsedTask = __rest(_a, ["namespaceId"]);
48
- return Object.assign(Object.assign({}, parsedTask), { namespace: (0, namespaces_1.parseNamespace)(namespace) });
49
- };
50
- exports.parseTaskWithNamespace = parseTaskWithNamespace;
51
- //# sourceMappingURL=tasks.base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tasks.base.js","sourceRoot":"","sources":["../../../../src/modules/tasks.base.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,uCAAoC;AAEpC,6CAAiF;AAEjF,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,qCAAuB,CAAA;IACvB,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;AACnB,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB;AAwBD,iBAAiB;AACjB;;;;;;GAMG;AACI,MAAM,SAAS,GAAG,CAAC,IAAa,EAAQ,EAAE,CAAC,iCAC7C,IAAI,KACP,OAAO,EAAE,IAAA,mBAAQ,EAAC,IAAI,CAAC,OAAO,CAAC,EAC/B,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,mBAAQ,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,EAE1D,SAAS,EAAE,IAAA,mBAAQ,EAAC,IAAI,CAAC,SAAS,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