@ezpaarse-project/ezreeport-sdk-js 1.0.0-beta.5 → 1.0.0-beta.6

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 (83) hide show
  1. package/README.md +19 -752
  2. package/dist/browser/ezreeport-sdk-js.mjs +529 -495
  3. package/dist/browser/ezreeport-sdk-js.mjs.map +1 -1
  4. package/dist/browser/ezreeport-sdk-js.umd.js +3 -3
  5. package/dist/browser/ezreeport-sdk-js.umd.js.map +1 -1
  6. package/dist/node/package.json +7 -9
  7. package/dist/node/src/index.js +3 -2
  8. package/dist/node/src/index.js.map +1 -1
  9. package/dist/node/src/modules/auth.js.map +1 -1
  10. package/dist/node/src/modules/crons.js +12 -8
  11. package/dist/node/src/modules/crons.js.map +1 -1
  12. package/dist/node/src/modules/queues.js +23 -12
  13. package/dist/node/src/modules/queues.js.map +1 -1
  14. package/dist/node/src/modules/reports.js +10 -9
  15. package/dist/node/src/modules/reports.js.map +1 -1
  16. package/dist/node/src/modules/tasks.base.js.map +1 -1
  17. package/dist/node/src/modules/tasks.js +59 -21
  18. package/dist/node/src/modules/tasks.js.map +1 -1
  19. package/dist/node/src/modules/tasks.public.js +3 -1
  20. package/dist/node/src/modules/tasks.public.js.map +1 -1
  21. package/dist/node/{modules/history.js → src/modules/tasksActivity.js} +13 -11
  22. package/dist/node/src/modules/tasksActivity.js.map +1 -0
  23. package/dist/node/src/modules/tasksActivity.public.js +6 -0
  24. package/dist/node/src/modules/tasksActivity.public.js.map +1 -0
  25. package/dist/node/src/modules/templates.js +23 -22
  26. package/dist/node/src/modules/templates.js.map +1 -1
  27. package/dist/types/{index.d.ts → src/index.d.ts} +5 -2
  28. package/dist/types/{lib → src/lib}/promises.d.ts +1 -0
  29. package/dist/types/{modules → src/modules}/crons.d.ts +8 -8
  30. package/dist/types/{modules → src/modules}/queues.d.ts +12 -12
  31. package/dist/types/{modules → src/modules}/reports.d.ts +15 -14
  32. package/dist/types/{modules → src/modules}/tasks.d.ts +65 -23
  33. package/dist/types/src/modules/tasks.public.d.ts +2 -0
  34. package/dist/types/src/modules/tasksActivity.d.ts +38 -0
  35. package/dist/types/src/modules/tasksActivity.public.d.ts +5 -0
  36. package/dist/types/{modules → src/modules}/templates.d.ts +37 -21
  37. package/package.json +12 -10
  38. package/dist/node/index.js +0 -38
  39. package/dist/node/index.js.map +0 -1
  40. package/dist/node/lib/axios.js +0 -91
  41. package/dist/node/lib/axios.js.map +0 -1
  42. package/dist/node/lib/promises.js +0 -26
  43. package/dist/node/lib/promises.js.map +0 -1
  44. package/dist/node/lib/utils.js +0 -24
  45. package/dist/node/lib/utils.js.map +0 -1
  46. package/dist/node/modules/auth.js +0 -61
  47. package/dist/node/modules/auth.js.map +0 -1
  48. package/dist/node/modules/crons.js +0 -105
  49. package/dist/node/modules/crons.js.map +0 -1
  50. package/dist/node/modules/health.js +0 -52
  51. package/dist/node/modules/health.js.map +0 -1
  52. package/dist/node/modules/history.js.map +0 -1
  53. package/dist/node/modules/institutions.js +0 -61
  54. package/dist/node/modules/institutions.js.map +0 -1
  55. package/dist/node/modules/queues.js +0 -128
  56. package/dist/node/modules/queues.js.map +0 -1
  57. package/dist/node/modules/reports.js +0 -261
  58. package/dist/node/modules/reports.js.map +0 -1
  59. package/dist/node/modules/setup.js +0 -35
  60. package/dist/node/modules/setup.js.map +0 -1
  61. package/dist/node/modules/tasks.js +0 -187
  62. package/dist/node/modules/tasks.js.map +0 -1
  63. package/dist/node/modules/templates.js +0 -28
  64. package/dist/node/modules/templates.js.map +0 -1
  65. package/dist/types/modules/institutions.d.ts +0 -56
  66. package/dist/types/modules/tasks.public.d.ts +0 -2
  67. /package/dist/types/{lib → src/lib}/axios.d.ts +0 -0
  68. /package/dist/types/{lib → src/lib}/utils.d.ts +0 -0
  69. /package/dist/types/{modules → src/modules}/auth.d.ts +0 -0
  70. /package/dist/types/{modules → src/modules}/auth.public.d.ts +0 -0
  71. /package/dist/types/{modules → src/modules}/crons.public.d.ts +0 -0
  72. /package/dist/types/{modules → src/modules}/health.d.ts +0 -0
  73. /package/dist/types/{modules → src/modules}/health.public.d.ts +0 -0
  74. /package/dist/types/{modules → src/modules}/history.d.ts +0 -0
  75. /package/dist/types/{modules → src/modules}/history.public.d.ts +0 -0
  76. /package/dist/types/{modules → src/modules}/namespaces.d.ts +0 -0
  77. /package/dist/types/{modules → src/modules}/namespaces.public.d.ts +0 -0
  78. /package/dist/types/{modules → src/modules}/queues.public.d.ts +0 -0
  79. /package/dist/types/{modules → src/modules}/reports.public.d.ts +0 -0
  80. /package/dist/types/{modules → src/modules}/setup.d.ts +0 -0
  81. /package/dist/types/{modules → src/modules}/setup.public.d.ts +0 -0
  82. /package/dist/types/{modules → src/modules}/tasks.base.d.ts +0 -0
  83. /package/dist/types/{modules → src/modules}/templates.public.d.ts +0 -0
@@ -1,5 +1,6 @@
1
1
  import { type ApiResponse } from '../lib/axios';
2
2
  import type { JsonObject } from '../lib/utils';
3
+ import { type RawTask, type Task } from './tasks.base';
3
4
  export interface Figure {
4
5
  type: string;
5
6
  data?: string | unknown[];
@@ -13,6 +14,7 @@ export interface Layout {
13
14
  figures: Figure[];
14
15
  }
15
16
  export interface RawTemplate {
17
+ id: string;
16
18
  name: string;
17
19
  renderer: string;
18
20
  pageCount: number;
@@ -27,6 +29,14 @@ export interface Template extends Omit<RawTemplate, 'createdAt' | 'updatedAt'> {
27
29
  createdAt: Date;
28
30
  updatedAt?: Date;
29
31
  }
32
+ /**
33
+ * Transform raw data from JSON, to JS usable data
34
+ *
35
+ * @param template Raw template
36
+ *
37
+ * @returns Parsed template
38
+ */
39
+ export declare const parseTemplate: (template: RawTemplate) => Template;
30
40
  export interface RawFullTemplate extends RawTemplate {
31
41
  body: {
32
42
  renderer?: string;
@@ -34,15 +44,23 @@ export interface RawFullTemplate extends RawTemplate {
34
44
  fetchOptions?: JsonObject;
35
45
  layouts: Layout[];
36
46
  };
47
+ tasks: RawTask[];
37
48
  }
38
- export interface FullTemplate extends Omit<RawFullTemplate, 'createdAt' | 'updatedAt'> {
49
+ export interface FullTemplate extends Omit<RawFullTemplate, 'tasks' | 'createdAt' | 'updatedAt'> {
39
50
  createdAt: Date;
40
51
  updatedAt?: Date;
52
+ tasks: Task[];
41
53
  }
42
54
  export interface InputTemplate {
55
+ name: FullTemplate['name'];
43
56
  body: FullTemplate['body'];
44
57
  tags: FullTemplate['tags'];
45
58
  }
59
+ type TemplateListResponse = ApiResponse<Template[]> & {
60
+ meta: {
61
+ default: string;
62
+ };
63
+ };
46
64
  /**
47
65
  * Get all available templates
48
66
  *
@@ -50,17 +68,17 @@ export interface InputTemplate {
50
68
  *
51
69
  * @returns All templates' info
52
70
  */
53
- export declare const getAllTemplates: () => Promise<ApiResponse<Template[]>>;
71
+ export declare const getAllTemplates: () => Promise<TemplateListResponse>;
54
72
  /**
55
73
  * Get template info
56
74
  *
57
- * Needs `general.templates-get-name(*)` permission
75
+ * Needs `general.templates-get-template` permission
58
76
  *
59
- * @param name Template's name
77
+ * @param templateOrId Template or Template's id
60
78
  *
61
79
  * @returns Template info
62
80
  */
63
- export declare const getTemplate: (name: Template['name']) => Promise<ApiResponse<FullTemplate>>;
81
+ export declare const getTemplate: (templateOrId: Template | Template['id']) => Promise<ApiResponse<FullTemplate>>;
64
82
  /**
65
83
  * Create a new template
66
84
  *
@@ -69,29 +87,26 @@ export declare const getTemplate: (name: Template['name']) => Promise<ApiRespons
69
87
  * @param template Template's data
70
88
  * @param namespaces
71
89
  *
72
- * @deprecated use `upsertTemplate` instead
73
- *
74
90
  * @returns Created template's info
75
91
  */
76
- export declare const createTemplate: (template: InputTemplate & {
77
- name: Template['name'];
78
- }) => Promise<ApiResponse<FullTemplate>>;
92
+ export declare const createTemplate: (template: InputTemplate) => Promise<ApiResponse<FullTemplate>>;
79
93
  /**
80
94
  * Update or create a template
81
95
  *
82
- * Needs `general.templates-put-name(*)` permission
96
+ * Needs `general.templates-put-template` permission
83
97
  *
84
- * @param id Template's id
85
- * @param template Template's data
98
+ * @param template Template's data **with id**
86
99
  * @param namespaces
87
100
  *
88
101
  * @returns Updated/Created Template's info
89
102
  */
90
- export declare const upsertTemplate: (name: Template['name'], template: InputTemplate) => Promise<ApiResponse<FullTemplate>>;
103
+ export declare const upsertTemplate: (template: InputTemplate & {
104
+ id: Template['id'];
105
+ }) => Promise<ApiResponse<FullTemplate>>;
91
106
  /**
92
107
  * Update a template
93
108
  *
94
- * Needs `general.templates-put-name(*)` permission
109
+ * Needs `general.templates-put-template` permission
95
110
  *
96
111
  * @param id Template's id
97
112
  * @param template New Template's data
@@ -101,15 +116,16 @@ export declare const upsertTemplate: (name: Template['name'], template: InputTem
101
116
  *
102
117
  * @returns Updated Template's info
103
118
  */
104
- export declare const updateTemplate: (name: Template['name'], template: InputTemplate) => Promise<ApiResponse<FullTemplate>>;
119
+ export declare const updateTemplate: (template: InputTemplate & {
120
+ id: Template['id'];
121
+ }) => Promise<ApiResponse<FullTemplate>>;
105
122
  /**
106
123
  * Delete a template
107
124
  *
108
- * Needs `general.templates-delete-name(*)` permission
125
+ * Needs `general.templates-delete-template` permission
109
126
  *
110
- * @param id Template's id
127
+ * @param templateOrId Template or Template's id
111
128
  * @param namespaces
112
- *
113
- * @returns Deleted Template's info
114
129
  */
115
- export declare const deleteTemplate: (name: Template['name']) => Promise<void>;
130
+ export declare const deleteTemplate: (templateOrId: Template | Template['id']) => Promise<void>;
131
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ezpaarse-project/ezreeport-sdk-js",
3
- "version": "1.0.0-beta.5",
3
+ "version": "1.0.0-beta.6",
4
4
  "description": "JS SDK to communicate with ezReeport API",
5
5
  "homepage": "https://github.com/ezpaarse-project/ezreeport#readme",
6
6
  "bugs": {
@@ -18,19 +18,21 @@
18
18
  "require": "./dist/browser/ezreeport-sdk-js.umd.js"
19
19
  },
20
20
  "node": {
21
- "default": "./dist/node/index.js"
21
+ "default": "./dist/node/src/index.js"
22
22
  }
23
23
  },
24
- "types": "./dist/types/index.d.ts",
24
+ "types": "./dist/types/src/index.d.ts",
25
25
  "files": [
26
26
  "dist"
27
27
  ],
28
28
  "scripts": {
29
- "build": "run-s build:web build:node build:types",
29
+ "build": "run-s build:web build:node build:doc",
30
30
  "build:node-vite": "tsc && BUILD_TARGET=node vite build",
31
31
  "build:node": "tsc --project tsconfig.node.json",
32
- "build:types": "tsc && BUILD_TARGET=types vite build",
33
32
  "build:web": "tsc && BUILD_TARGET=browser vite build",
33
+ "build:docs": "typedoc src/index.ts",
34
+ "docs": "vite docs --open",
35
+ "dev": "run-p \"build:docs -- --watch\" docs",
34
36
  "lint": "eslint --fix .",
35
37
  "test": "npm run build && npm -w ezreeport-tests run test:sdk"
36
38
  },
@@ -42,13 +44,13 @@
42
44
  "dependencies": {
43
45
  "axios": "^1.4.0",
44
46
  "date-fns": "^2.30.0",
45
- "events": "^3.3.0",
46
- "typescript": "^5.1.3",
47
- "vite": "^4.3.9",
48
- "vite-plugin-dts": "^2.3.0"
47
+ "events": "^3.3.0"
49
48
  },
50
49
  "devDependencies": {
51
- "@types/node": "^20.2.5"
50
+ "@types/node": "^20.4.5",
51
+ "typedoc": "^0.24.8",
52
+ "typescript": "^5.1.6",
53
+ "vite": "^4.4.7"
52
54
  },
53
55
  "engines": {
54
56
  "node": "^16 || ^18"
@@ -1,38 +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
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.templates = exports.tasks = exports.setup = exports.reports = exports.queues = exports.institutions = exports.history = exports.health = exports.crons = exports.auth = void 0;
27
- /* eslint-disable no-multiple-empty-lines */
28
- exports.auth = __importStar(require("./modules/auth"));
29
- exports.crons = __importStar(require("./modules/crons"));
30
- exports.health = __importStar(require("./modules/health"));
31
- exports.history = __importStar(require("./modules/history"));
32
- exports.institutions = __importStar(require("./modules/institutions"));
33
- exports.queues = __importStar(require("./modules/queues"));
34
- exports.reports = __importStar(require("./modules/reports"));
35
- exports.setup = __importStar(require("./modules/setup"));
36
- exports.tasks = __importStar(require("./modules/tasks"));
37
- exports.templates = __importStar(require("./modules/templates"));
38
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA4C;AAC5C,uDAAuC;AACvC,yDAAyC;AACzC,2DAA2C;AAC3C,6DAA6C;AAC7C,uEAAuD;AACvD,2DAA2C;AAC3C,6DAA6C;AAC7C,yDAAyC;AACzC,yDAAyC;AACzC,iEAAiD"}
@@ -1,91 +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
- Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.axiosWithErrorFormatter = void 0;
36
- const axios_1 = __importStar(require("axios"));
37
- const agent = axios_1.default.create({});
38
- /**
39
- * Start axios request with basic error handling
40
- *
41
- * @param method The request's method
42
- * @param params The other params of axios
43
- *
44
- * @returns Response
45
- */
46
- const axiosWithErrorFormatter = (method, ...params) => __awaiter(void 0, void 0, void 0, function* () {
47
- try {
48
- // @ts-expect-error
49
- return yield agent[method](...params);
50
- }
51
- catch (error) {
52
- if (!(error instanceof axios_1.AxiosError) || !error.response) {
53
- throw error;
54
- }
55
- const res = error.response;
56
- let message = '';
57
- switch (res.status) {
58
- case 400:
59
- message = 'Check parameters or API token';
60
- break;
61
- case 401:
62
- message = 'You must be logged before using this function, use `auth.login(token)`';
63
- break;
64
- case 403:
65
- message = 'You dont have enough permissions';
66
- break;
67
- case 404:
68
- message = 'Check parameters';
69
- break;
70
- case 409:
71
- message = 'Request conflit with current state';
72
- break;
73
- case 500:
74
- message = 'Something went wrong with server';
75
- break;
76
- default:
77
- break;
78
- }
79
- message = `${error.code} (${res.status}) - ${message}: ${res.data.content.message}`;
80
- throw new Error(message);
81
- }
82
- });
83
- exports.axiosWithErrorFormatter = axiosWithErrorFormatter;
84
- exports.default = Object.assign(agent, {
85
- $get: (...params) => __awaiter(void 0, void 0, void 0, function* () { return (yield (0, exports.axiosWithErrorFormatter)('get', ...params)).data; }),
86
- $post: (...params) => __awaiter(void 0, void 0, void 0, function* () { return (yield (0, exports.axiosWithErrorFormatter)('post', ...params)).data; }),
87
- $put: (...params) => __awaiter(void 0, void 0, void 0, function* () { return (yield (0, exports.axiosWithErrorFormatter)('put', ...params)).data; }),
88
- $patch: (...params) => __awaiter(void 0, void 0, void 0, function* () { return (yield (0, exports.axiosWithErrorFormatter)('patch', ...params)).data; }),
89
- $delete: (...params) => __awaiter(void 0, void 0, void 0, function* () { return (yield (0, exports.axiosWithErrorFormatter)('delete', ...params)).data; }),
90
- });
91
- //# sourceMappingURL=axios.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"axios.js","sourceRoot":"","sources":["../../../src/lib/axios.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgE;AAkBhE,MAAM,KAAK,GAAG,eAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAE/B;;;;;;;GAOG;AACI,MAAM,uBAAuB,GAAG,CACrC,MAAc,EACd,GAAG,MAAiC,EACT,EAAE;IAC7B,IAAI;QACF,mBAAmB;QACnB,OAAO,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;KACvC;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,CAAC,KAAK,YAAY,kBAAU,CAAC,IAAI,CAAC,KAAK,CAAC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C,OAAA,CAAC,MAAM,IAAA,+BAAuB,EAAwB,KAAK,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA,GAAA;IACrI,MAAM,EAAE,CAAU,GAAG,MAAkC,EAAE,EAAE,kDAAC,OAAA,CAAC,MAAM,IAAA,+BAAuB,EAA0B,OAAO,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA,GAAA;IAC7I,OAAO,EAAE,CAAU,GAAG,MAAmC,EAAE,EAAE,kDAAC,OAAA,CAAC,MAAM,IAAA,+BAAuB,EAA2B,QAAQ,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA,GAAA;CAClJ,CACF,CAAC"}
@@ -1,26 +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
- const events_1 = __importDefault(require("events"));
7
- /**
8
- * Attach a `EventEmitter` to a `Promise` returned by the `executor`
9
- *
10
- * @param executor Executor returning the promise. The `emitter` is passed to the executor as param.
11
- * @param emitter `EventEmitter` attached. By default it's a new instance.
12
- *
13
- * @returns The EventfullPromise
14
- */
15
- const createEventfullPromise = (executor, emitter = new events_1.default()) => {
16
- const promise = executor(emitter);
17
- const res = Object.assign(promise, {
18
- on: (...p) => { emitter.on(...p); return res; },
19
- once: (...p) => { emitter.on(...p); return res; },
20
- off: (...p) => { emitter.on(...p); return res; },
21
- emit: (...p) => { emitter.emit(...p); return res; },
22
- });
23
- return res;
24
- };
25
- exports.default = createEventfullPromise;
26
- //# sourceMappingURL=promises.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"promises.js","sourceRoot":"","sources":["../../../src/lib/promises.ts"],"names":[],"mappings":";;;;;AAAA,oDAAkC;AAWlC;;;;;;;GAOG;AACH,MAAM,sBAAsB,GAAG,CAC7B,QAAkE,EAClE,OAAO,GAAG,IAAI,gBAAY,EAAE,EACP,EAAE;IACvB,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IAElC,MAAM,GAAG,GAAwB,MAAM,CAAC,MAAM,CAC5C,OAAO,EACP;QACE,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;QAC/C,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;QACjD,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;QAChD,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;KAChC,CACtB,CAAC;IACF,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF,kBAAe,sBAAsB,CAAC"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parsePeriod = exports.setTimeoutAsync = void 0;
4
- const date_fns_1 = require("date-fns");
5
- /**
6
- * Async version of `setTimeout`
7
- *
8
- * @param ms Time to wait
9
- */
10
- const setTimeoutAsync = (ms) => new Promise((resolve) => { setTimeout(resolve, ms); });
11
- exports.setTimeoutAsync = setTimeoutAsync;
12
- /**
13
- * Transform raw data from JSON, to JS usable data
14
- *
15
- * @param period Raw period
16
- *
17
- * @returns Parsed period
18
- */
19
- const parsePeriod = (period) => ({
20
- start: (0, date_fns_1.parseISO)(period.start),
21
- end: (0, date_fns_1.parseISO)(period.end),
22
- });
23
- exports.parsePeriod = parsePeriod;
24
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/lib/utils.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AAEpC;;;;GAIG;AACI,MAAM,eAAe,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CACxD,CAAC,OAAO,EAAE,EAAE,GAAG,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAC1C,CAAC;AAFW,QAAA,eAAe,mBAE1B;AAYF;;;;;;GAMG;AACI,MAAM,WAAW,GAAG,CAAC,MAAiB,EAAU,EAAE,CAAC,CAAC;IACzD,KAAK,EAAE,IAAA,mBAAQ,EAAC,MAAM,CAAC,KAAK,CAAC;IAC7B,GAAG,EAAE,IAAA,mBAAQ,EAAC,MAAM,CAAC,GAAG,CAAC;CAC1B,CAAC,CAAC;AAHU,QAAA,WAAW,eAGrB"}
@@ -1,61 +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.getPermissions = exports.getCurrentUser = exports.isLogged = exports.logout = exports.login = void 0;
7
- const axios_1 = __importDefault(require("../lib/axios"));
8
- var Roles;
9
- (function (Roles) {
10
- Roles[Roles["SUPER_USER"] = 9999] = "SUPER_USER";
11
- Roles[Roles["READ_WRITE"] = 2] = "READ_WRITE";
12
- Roles[Roles["READ"] = 1] = "READ";
13
- })(Roles || (Roles = {}));
14
- /**
15
- * Set API token for ezMESURE to axios
16
- *
17
- * @param token The API token for ezMESURE
18
- */
19
- const login = (token) => {
20
- axios_1.default.defaults.headers.common.authorization = `Bearer ${token}`;
21
- };
22
- exports.login = login;
23
- /**
24
- * Unset API token for ezMESURE from axios
25
- */
26
- const logout = () => {
27
- axios_1.default.defaults.headers.common.authorization = undefined;
28
- };
29
- exports.logout = logout;
30
- /**
31
- * Check if API token is setup in axios. **DOESN'T CHECK IF JWT IS VALID !**
32
- *
33
- * @returns If API token is setup
34
- */
35
- const isLogged = () => {
36
- const bearer = axios_1.default.defaults.headers.common.authorization;
37
- if (!bearer || typeof bearer !== 'string')
38
- return false;
39
- const [, token] = bearer.split('Bearer ');
40
- return !!token;
41
- };
42
- exports.isLogged = isLogged;
43
- /**
44
- * Get authed user info
45
- *
46
- * Needs `auth-get` permission
47
- *
48
- * @returns The authed user info
49
- */
50
- const getCurrentUser = () => axios_1.default.$get('/me');
51
- exports.getCurrentUser = getCurrentUser;
52
- /**
53
- * Compute auther user permissions
54
- *
55
- * Needs `auth-get-permissions` permission
56
- *
57
- * @returns Permissions
58
- */
59
- const getPermissions = () => axios_1.default.$get('/me/permissions');
60
- exports.getPermissions = getPermissions;
61
- //# sourceMappingURL=auth.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/modules/auth.ts"],"names":[],"mappings":";;;;;;AAAA,yDAAiC;AAEjC,IAAK,KAIJ;AAJD,WAAK,KAAK;IACR,gDAAiB,CAAA;IACjB,6CAAc,CAAA;IACd,iCAAQ,CAAA;AACV,CAAC,EAJI,KAAK,KAAL,KAAK,QAIT;AAYD;;;;GAIG;AACI,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,EAAE;IACrC,eAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,GAAG,UAAU,KAAK,EAAE,CAAC;AAClE,CAAC,CAAC;AAFW,QAAA,KAAK,SAEhB;AAEF;;GAEG;AACI,MAAM,MAAM,GAAG,GAAG,EAAE;IACzB,eAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,GAAG,SAAS,CAAC;AAC1D,CAAC,CAAC;AAFW,QAAA,MAAM,UAEjB;AAEF;;;;GAIG;AACI,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,MAAM,MAAM,GAAG,eAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC;IAC3D,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACxD,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1C,OAAO,CAAC,CAAC,KAAK,CAAC;AACjB,CAAC,CAAC;AALW,QAAA,QAAQ,YAKnB;AAEF;;;;;;GAMG;AACI,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,eAAK,CAAC,IAAI,CAAO,KAAK,CAAC,CAAC;AAA/C,QAAA,cAAc,kBAAiC;AAE5D;;;;;;GAMG;AACI,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,eAAK,CAAC,IAAI,CAAc,iBAAiB,CAAC,CAAC;AAAlE,QAAA,cAAc,kBAAoD"}
@@ -1,105 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __rest = (this && this.__rest) || function (s, e) {
12
- var t = {};
13
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
- t[p] = s[p];
15
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
- t[p[i]] = s[p[i]];
19
- }
20
- return t;
21
- };
22
- var __importDefault = (this && this.__importDefault) || function (mod) {
23
- return (mod && mod.__esModule) ? mod : { "default": mod };
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.forceCron = exports.stopCron = exports.startCron = exports.getCron = exports.getAllCrons = void 0;
27
- const date_fns_1 = require("date-fns");
28
- const axios_1 = __importDefault(require("../lib/axios"));
29
- /**
30
- * Transform raw data from JSON, to JS usable data
31
- *
32
- * @param cron Raw cron
33
- *
34
- * @returns Parsed cron
35
- */
36
- const parseCron = (cron) => (Object.assign(Object.assign({}, cron), { nextRun: cron.nextRun ? (0, date_fns_1.parseISO)(cron.nextRun) : undefined, lastRun: cron.lastRun ? (0, date_fns_1.parseISO)(cron.lastRun) : undefined }));
37
- /**
38
- * Get all available crons
39
- *
40
- * Needs `crons-get` permission
41
- *
42
- * @returns All crons' info
43
- */
44
- const getAllCrons = () => __awaiter(void 0, void 0, void 0, function* () {
45
- const _a = yield axios_1.default.$get('/crons'), { content } = _a, response = __rest(_a, ["content"]);
46
- return Object.assign(Object.assign({}, response), { content: content.map(parseCron) });
47
- });
48
- exports.getAllCrons = getAllCrons;
49
- /**
50
- * Get cron info
51
- *
52
- * Needs `crons-get-cron` permission
53
- *
54
- * @param name Cron name
55
- *
56
- * @returns Cron's info
57
- */
58
- const getCron = (name) => __awaiter(void 0, void 0, void 0, function* () {
59
- const _b = yield axios_1.default.$get(`/crons/${name}`), { content } = _b, response = __rest(_b, ["content"]);
60
- return Object.assign(Object.assign({}, response), { content: parseCron(content) });
61
- });
62
- exports.getCron = getCron;
63
- /**
64
- * Start cron
65
- *
66
- * Needs `crons-put-cron-start` permission
67
- *
68
- * @param name Cron name
69
- *
70
- * @returns Cron's info
71
- */
72
- const startCron = (name) => __awaiter(void 0, void 0, void 0, function* () {
73
- const _c = yield axios_1.default.$put(`/crons/${name}/start`), { content } = _c, response = __rest(_c, ["content"]);
74
- return Object.assign(Object.assign({}, response), { content: parseCron(content) });
75
- });
76
- exports.startCron = startCron;
77
- /**
78
- * Stop cron
79
- *
80
- * Needs `crons-put-cron-stop` permission
81
- *
82
- * @param name Cron name
83
- *
84
- * @returns Cron's info
85
- */
86
- const stopCron = (name) => __awaiter(void 0, void 0, void 0, function* () {
87
- const _d = yield axios_1.default.$put(`/crons/${name}/stop`), { content } = _d, response = __rest(_d, ["content"]);
88
- return Object.assign(Object.assign({}, response), { content: parseCron(content) });
89
- });
90
- exports.stopCron = stopCron;
91
- /**
92
- * Force cron to run
93
- *
94
- * Needs `crons-post-cron-force` permission
95
- *
96
- * @param name Cron name
97
- *
98
- * @returns Cron's info
99
- */
100
- const forceCron = (name) => __awaiter(void 0, void 0, void 0, function* () {
101
- const _e = yield axios_1.default.$post(`/crons/${name}/force`), { content } = _e, response = __rest(_e, ["content"]);
102
- return Object.assign(Object.assign({}, response), { content: parseCron(content) });
103
- });
104
- exports.forceCron = forceCron;
105
- //# sourceMappingURL=crons.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"crons.js","sourceRoot":"","sources":["../../../src/modules/crons.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAoC;AACpC,yDAAuD;AAcvD;;;;;;GAMG;AACH,MAAM,SAAS,GAAG,CAAC,IAAa,EAAQ,EAAE,CAAC,iCACtC,IAAI,KACP,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,mBAAQ,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,EAC1D,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,mBAAQ,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,IAC1D,CAAC;AAEH;;;;;;GAMG;AACI,MAAM,WAAW,GAAG,GAAuC,EAAE;IAClE,MAAM,KAA2B,MAAM,eAAK,CAAC,IAAI,CAAY,QAAQ,CAAC,EAAhE,EAAE,OAAO,OAAuD,EAAlD,QAAQ,cAAtB,WAAwB,CAAwC,CA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U,UAAU,IAAI,QAAQ,CAAC,EAA7E,EAAE,OAAO,OAAoE,EAA/D,QAAQ,cAAtB,WAAwB,CAAqD,CAAC;IACpF,uCACK,QAAQ,KACX,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,IAC3B;AACJ,CAAC,CAAA,CAAC;AANW,QAAA,SAAS,aAMpB"}
@@ -1,52 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.checkCurrentService = exports.checkConnectedService = exports.checkAllConnectedService = exports.getAllConnectedServices = void 0;
16
- const axios_1 = __importDefault(require("../lib/axios"));
17
- /**
18
- * Get all services connected to current
19
- *
20
- * @returns The current service & the name of connected ones
21
- */
22
- const getAllConnectedServices = () => axios_1.default.$get('/health');
23
- exports.getAllConnectedServices = getAllConnectedServices;
24
- /**
25
- * Check connection for all connected service from current
26
- *
27
- * @returns The connection status for all services
28
- */
29
- const checkAllConnectedService = () => axios_1.default.$get('/health/all');
30
- exports.checkAllConnectedService = checkAllConnectedService;
31
- /**
32
- * Check connection of a specific service from current
33
- *
34
- * @param service The name of the service
35
- *
36
- * @returns The connection status of the service from current
37
- */
38
- const checkConnectedService = (service) => axios_1.default.$get(`/health/${service}`);
39
- exports.checkConnectedService = checkConnectedService;
40
- /**
41
- * Check connection of current service
42
- *
43
- * It's usefull when the app will have limited connection, or if you just want the processing time.
44
- *
45
- * @returns The connection status of current service
46
- */
47
- const checkCurrentService = () => __awaiter(void 0, void 0, void 0, function* () {
48
- const { content: { current } } = yield (0, exports.getAllConnectedServices)();
49
- return (0, exports.checkConnectedService)(current);
50
- });
51
- exports.checkCurrentService = checkCurrentService;
52
- //# sourceMappingURL=health.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"health.js","sourceRoot":"","sources":["../../../src/modules/health.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yDAAiC;AAiBjC;;;;GAIG;AACI,MAAM,uBAAuB,GAAG,GAAG,EAAE,CAAC,eAAK,CAAC,IAAI,CAAkE,SAAS,CAAC,CAAC;AAAvH,QAAA,uBAAuB,2BAAgG;AAEpI;;;;GAIG;AACI,MAAM,wBAAwB,GAAG,GAAG,EAAE,CAAC,eAAK,CAAC,IAAI,CAAe,aAAa,CAAC,CAAC;AAAzE,QAAA,wBAAwB,4BAAiD;AAEtF;;;;;;GAMG;AACI,MAAM,qBAAqB,GAAG,CAAC,OAA2B,EAAE,EAAE,CAAC,eAAK,CAAC,IAAI,CAAa,WAAW,OAAO,EAAE,CAAC,CAAC;AAAtG,QAAA,qBAAqB,yBAAiF;AAEnH;;;;;;GAMG;AACI,MAAM,mBAAmB,GAAG,GAAS,EAAE;IAC5C,MAAM,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,MAAM,IAAA,+BAAuB,GAAE,CAAC;IACjE,OAAO,IAAA,6BAAqB,EAAC,OAAO,CAAC,CAAC;AACxC,CAAC,CAAA,CAAC;AAHW,QAAA,mBAAmB,uBAG9B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"history.js","sourceRoot":"","sources":["../../../src/modules/history.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAoC;AACpC,wCAAkF;AAwBlF;;;;;;GAMG;AACI,MAAM,YAAY,GAAG,CAAC,KAAiB,EAAW,EAAE,CAAC,iCAC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