@ezpaarse-project/ezreeport-sdk-js 1.0.0-beta.1 → 1.0.0-beta.11
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.
- package/README.md +19 -752
- package/dist/browser/ezreeport-sdk-js.mjs +1054 -891
- package/dist/browser/ezreeport-sdk-js.mjs.map +1 -1
- package/dist/browser/ezreeport-sdk-js.umd.js +5 -3
- package/dist/browser/ezreeport-sdk-js.umd.js.map +1 -1
- package/dist/dist/browser/ezreeport-sdk-js.mjs +2426 -0
- package/dist/dist/browser/ezreeport-sdk-js.mjs.map +1 -0
- package/dist/dist/browser/ezreeport-sdk-js.umd.js +6 -0
- package/dist/dist/browser/ezreeport-sdk-js.umd.js.map +1 -0
- package/dist/dist/dist/browser/ezreeport-sdk-js.mjs +2426 -0
- package/dist/dist/dist/browser/ezreeport-sdk-js.mjs.map +1 -0
- package/dist/dist/dist/browser/ezreeport-sdk-js.umd.js +6 -0
- package/dist/dist/dist/browser/ezreeport-sdk-js.umd.js.map +1 -0
- package/dist/dist/dist/node/package.json +58 -0
- package/dist/dist/dist/node/src/index.js +43 -0
- package/dist/dist/dist/node/src/index.js.map +1 -0
- package/dist/dist/dist/node/src/lib/axios.js +95 -0
- package/dist/dist/dist/node/src/lib/axios.js.map +1 -0
- package/dist/dist/dist/node/src/lib/promises.js +41 -0
- package/dist/dist/dist/node/src/lib/promises.js.map +1 -0
- package/dist/dist/dist/node/src/lib/utils.js +24 -0
- package/dist/dist/dist/node/src/lib/utils.js.map +1 -0
- package/dist/dist/dist/node/src/modules/auth.js +111 -0
- package/dist/dist/dist/node/src/modules/auth.js.map +1 -0
- package/dist/dist/dist/node/src/modules/auth.public.js +11 -0
- package/dist/dist/dist/node/src/modules/auth.public.js.map +1 -0
- package/dist/dist/dist/node/src/modules/crons.js +128 -0
- package/dist/dist/dist/node/src/modules/crons.js.map +1 -0
- package/dist/dist/dist/node/src/modules/crons.public.js +11 -0
- package/dist/dist/dist/node/src/modules/crons.public.js.map +1 -0
- package/dist/dist/dist/node/src/modules/elastic.js +31 -0
- package/dist/dist/dist/node/src/modules/elastic.js.map +1 -0
- package/dist/dist/dist/node/src/modules/elastic.public.js +7 -0
- package/dist/dist/dist/node/src/modules/elastic.public.js.map +1 -0
- package/dist/dist/dist/node/src/modules/health.js +60 -0
- package/dist/dist/dist/node/src/modules/health.js.map +1 -0
- package/dist/dist/dist/node/src/modules/health.public.js +9 -0
- package/dist/dist/dist/node/src/modules/health.public.js.map +1 -0
- package/dist/dist/dist/node/src/modules/history.js +62 -0
- package/dist/dist/dist/node/src/modules/history.js.map +1 -0
- package/dist/dist/dist/node/src/modules/history.public.js +6 -0
- package/dist/dist/dist/node/src/modules/history.public.js.map +1 -0
- package/dist/dist/dist/node/src/modules/namespaces.js +15 -0
- package/dist/dist/dist/node/src/modules/namespaces.js.map +1 -0
- package/dist/dist/dist/node/src/modules/namespaces.public.js +3 -0
- package/dist/dist/dist/node/src/modules/namespaces.public.js.map +1 -0
- package/dist/dist/dist/node/src/modules/queues.js +179 -0
- package/dist/dist/dist/node/src/modules/queues.js.map +1 -0
- package/dist/dist/dist/node/src/modules/queues.public.js +13 -0
- package/dist/dist/dist/node/src/modules/queues.public.js.map +1 -0
- package/dist/dist/dist/node/src/modules/reports.js +267 -0
- package/dist/dist/dist/node/src/modules/reports.js.map +1 -0
- package/dist/dist/dist/node/src/modules/reports.public.js +13 -0
- package/dist/dist/dist/node/src/modules/reports.public.js.map +1 -0
- package/dist/dist/dist/node/src/modules/setup.js +35 -0
- package/dist/dist/dist/node/src/modules/setup.js.map +1 -0
- package/dist/dist/dist/node/src/modules/setup.public.js +12 -0
- package/dist/dist/dist/node/src/modules/setup.public.js.map +1 -0
- package/dist/dist/dist/node/src/modules/tasks.base.js +51 -0
- package/dist/dist/dist/node/src/modules/tasks.base.js.map +1 -0
- package/dist/dist/dist/node/src/modules/tasks.js +281 -0
- package/dist/dist/dist/node/src/modules/tasks.js.map +1 -0
- package/dist/dist/dist/node/src/modules/tasks.public.js +21 -0
- package/dist/dist/dist/node/src/modules/tasks.public.js.map +1 -0
- package/dist/dist/dist/node/src/modules/tasksActivity.js +62 -0
- package/dist/dist/dist/node/src/modules/tasksActivity.js.map +1 -0
- package/dist/dist/dist/node/src/modules/tasksActivity.public.js +6 -0
- package/dist/dist/dist/node/src/modules/tasksActivity.public.js.map +1 -0
- package/dist/dist/dist/node/src/modules/tasksPresets.js +102 -0
- package/dist/dist/dist/node/src/modules/tasksPresets.js.map +1 -0
- package/dist/dist/dist/node/src/modules/tasksPresets.public.js +10 -0
- package/dist/dist/dist/node/src/modules/tasksPresets.public.js.map +1 -0
- package/dist/dist/dist/node/src/modules/templates.js +136 -0
- package/dist/dist/dist/node/src/modules/templates.js.map +1 -0
- package/dist/dist/dist/node/src/modules/templates.public.js +11 -0
- package/dist/dist/dist/node/src/modules/templates.public.js.map +1 -0
- package/dist/dist/dist/test +0 -0
- package/dist/{types → dist/dist/types/src}/index.d.ts +10 -2
- package/dist/{types → dist/dist/types/src}/lib/axios.d.ts +3 -3
- package/dist/dist/dist/types/src/lib/promises.d.ts +21 -0
- package/dist/{types → dist/dist/types/src}/lib/utils.d.ts +5 -0
- package/dist/{types → dist/dist/types/src}/modules/auth.d.ts +4 -4
- package/dist/{types → dist/dist/types/src}/modules/crons.d.ts +32 -8
- package/dist/dist/dist/types/src/modules/crons.public.d.ts +1 -0
- package/dist/dist/dist/types/src/modules/elastic.d.ts +22 -0
- package/dist/dist/dist/types/src/modules/elastic.public.d.ts +1 -0
- package/dist/{types → dist/dist/types/src}/modules/namespaces.d.ts +10 -0
- package/dist/dist/dist/types/src/modules/queues.d.ts +120 -0
- package/dist/dist/dist/types/src/modules/queues.public.d.ts +1 -0
- package/dist/{types → dist/dist/types/src}/modules/reports.d.ts +27 -17
- package/dist/dist/dist/types/src/modules/tasks.d.ts +243 -0
- package/dist/dist/dist/types/src/modules/tasks.public.d.ts +2 -0
- package/dist/dist/dist/types/src/modules/tasksActivity.d.ts +36 -0
- package/dist/dist/dist/types/src/modules/tasksActivity.public.d.ts +5 -0
- package/dist/dist/dist/types/src/modules/tasksPresets.d.ts +83 -0
- package/dist/dist/dist/types/src/modules/tasksPresets.public.d.ts +1 -0
- package/dist/dist/dist/types/src/modules/templates.d.ts +153 -0
- package/dist/dist/node/package.json +58 -0
- package/dist/dist/node/src/index.js +43 -0
- package/dist/dist/node/src/index.js.map +1 -0
- package/dist/dist/node/src/lib/axios.js +95 -0
- package/dist/dist/node/src/lib/axios.js.map +1 -0
- package/dist/dist/node/src/lib/promises.js +41 -0
- package/dist/dist/node/src/lib/promises.js.map +1 -0
- package/dist/dist/node/src/lib/utils.js +24 -0
- package/dist/dist/node/src/lib/utils.js.map +1 -0
- package/dist/dist/node/src/modules/auth.js +111 -0
- package/dist/dist/node/src/modules/auth.js.map +1 -0
- package/dist/dist/node/src/modules/auth.public.js +11 -0
- package/dist/dist/node/src/modules/auth.public.js.map +1 -0
- package/dist/dist/node/src/modules/crons.js +128 -0
- package/dist/dist/node/src/modules/crons.js.map +1 -0
- package/dist/dist/node/src/modules/crons.public.js +11 -0
- package/dist/dist/node/src/modules/crons.public.js.map +1 -0
- package/dist/dist/node/src/modules/elastic.js +31 -0
- package/dist/dist/node/src/modules/elastic.js.map +1 -0
- package/dist/dist/node/src/modules/elastic.public.js +7 -0
- package/dist/dist/node/src/modules/elastic.public.js.map +1 -0
- package/dist/dist/node/src/modules/health.js +60 -0
- package/dist/dist/node/src/modules/health.js.map +1 -0
- package/dist/dist/node/src/modules/health.public.js +9 -0
- package/dist/dist/node/src/modules/health.public.js.map +1 -0
- package/dist/dist/node/src/modules/history.js +62 -0
- package/dist/dist/node/src/modules/history.js.map +1 -0
- package/dist/dist/node/src/modules/history.public.js +6 -0
- package/dist/dist/node/src/modules/history.public.js.map +1 -0
- package/dist/dist/node/src/modules/namespaces.js +15 -0
- package/dist/dist/node/src/modules/namespaces.js.map +1 -0
- package/dist/dist/node/src/modules/namespaces.public.js +3 -0
- package/dist/dist/node/src/modules/namespaces.public.js.map +1 -0
- package/dist/dist/node/src/modules/queues.js +179 -0
- package/dist/dist/node/src/modules/queues.js.map +1 -0
- package/dist/dist/node/src/modules/queues.public.js +13 -0
- package/dist/dist/node/src/modules/queues.public.js.map +1 -0
- package/dist/dist/node/src/modules/reports.js +267 -0
- package/dist/dist/node/src/modules/reports.js.map +1 -0
- package/dist/dist/node/src/modules/reports.public.js +13 -0
- package/dist/dist/node/src/modules/reports.public.js.map +1 -0
- package/dist/dist/node/src/modules/setup.js +35 -0
- package/dist/dist/node/src/modules/setup.js.map +1 -0
- package/dist/dist/node/src/modules/setup.public.js +12 -0
- package/dist/dist/node/src/modules/setup.public.js.map +1 -0
- package/dist/dist/node/src/modules/tasks.base.js +51 -0
- package/dist/dist/node/src/modules/tasks.base.js.map +1 -0
- package/dist/dist/node/src/modules/tasks.js +281 -0
- package/dist/dist/node/src/modules/tasks.js.map +1 -0
- package/dist/dist/node/src/modules/tasks.public.js +21 -0
- package/dist/dist/node/src/modules/tasks.public.js.map +1 -0
- package/dist/dist/node/src/modules/tasksActivity.js +62 -0
- package/dist/dist/node/src/modules/tasksActivity.js.map +1 -0
- package/dist/dist/node/src/modules/tasksActivity.public.js +6 -0
- package/dist/dist/node/src/modules/tasksActivity.public.js.map +1 -0
- package/dist/dist/node/src/modules/tasksPresets.js +102 -0
- package/dist/dist/node/src/modules/tasksPresets.js.map +1 -0
- package/dist/dist/node/src/modules/tasksPresets.public.js +10 -0
- package/dist/dist/node/src/modules/tasksPresets.public.js.map +1 -0
- package/dist/dist/node/src/modules/templates.js +136 -0
- package/dist/dist/node/src/modules/templates.js.map +1 -0
- package/dist/dist/node/src/modules/templates.public.js +11 -0
- package/dist/dist/node/src/modules/templates.public.js.map +1 -0
- package/dist/dist/test +0 -0
- package/dist/dist/types/src/index.d.ts +32 -0
- package/dist/dist/types/src/lib/axios.d.ts +51 -0
- package/dist/dist/types/src/lib/promises.d.ts +21 -0
- package/dist/dist/types/src/lib/utils.d.ts +27 -0
- package/dist/dist/types/src/modules/auth.d.ts +90 -0
- package/dist/dist/types/src/modules/auth.public.d.ts +1 -0
- package/dist/dist/types/src/modules/crons.d.ts +102 -0
- package/dist/dist/types/src/modules/crons.public.d.ts +1 -0
- package/dist/dist/types/src/modules/elastic.d.ts +22 -0
- package/dist/dist/types/src/modules/elastic.public.d.ts +1 -0
- package/dist/dist/types/src/modules/health.d.ts +53 -0
- package/dist/dist/types/src/modules/health.public.d.ts +1 -0
- package/dist/dist/types/src/modules/history.d.ts +38 -0
- package/dist/dist/types/src/modules/history.public.d.ts +1 -0
- package/dist/dist/types/src/modules/namespaces.d.ts +29 -0
- package/dist/dist/types/src/modules/namespaces.public.d.ts +1 -0
- package/dist/dist/types/src/modules/queues.d.ts +120 -0
- package/dist/dist/types/src/modules/queues.public.d.ts +1 -0
- package/dist/dist/types/src/modules/reports.d.ts +204 -0
- package/dist/dist/types/src/modules/reports.public.d.ts +1 -0
- package/dist/dist/types/src/modules/setup.d.ts +17 -0
- package/dist/dist/types/src/modules/setup.public.d.ts +2 -0
- package/dist/dist/types/src/modules/tasks.base.d.ts +48 -0
- package/dist/dist/types/src/modules/tasks.d.ts +243 -0
- package/dist/dist/types/src/modules/tasks.public.d.ts +2 -0
- package/dist/dist/types/src/modules/tasksActivity.d.ts +36 -0
- package/dist/dist/types/src/modules/tasksActivity.public.d.ts +5 -0
- package/dist/dist/types/src/modules/tasksPresets.d.ts +83 -0
- package/dist/dist/types/src/modules/tasksPresets.public.d.ts +1 -0
- package/dist/dist/types/src/modules/templates.d.ts +153 -0
- package/dist/dist/types/src/modules/templates.public.d.ts +1 -0
- package/dist/node/package.json +15 -13
- package/dist/node/src/index.js +43 -0
- package/dist/node/src/index.js.map +1 -0
- package/dist/node/src/lib/axios.js +95 -0
- package/dist/node/src/lib/axios.js.map +1 -0
- package/dist/node/src/lib/promises.js +41 -0
- package/dist/node/src/lib/promises.js.map +1 -0
- package/dist/node/src/lib/utils.js +24 -0
- package/dist/node/src/lib/utils.js.map +1 -0
- package/dist/node/src/modules/auth.js +114 -0
- package/dist/node/src/modules/auth.js.map +1 -0
- package/dist/node/src/modules/auth.public.js +11 -0
- package/dist/node/src/modules/auth.public.js.map +1 -0
- package/dist/node/src/modules/crons.js +128 -0
- package/dist/node/src/modules/crons.js.map +1 -0
- package/dist/node/src/modules/crons.public.js +11 -0
- package/dist/node/src/modules/crons.public.js.map +1 -0
- package/dist/node/src/modules/elastic.js +31 -0
- package/dist/node/src/modules/elastic.js.map +1 -0
- package/dist/node/src/modules/elastic.public.js +7 -0
- package/dist/node/src/modules/elastic.public.js.map +1 -0
- package/dist/node/src/modules/health.js +60 -0
- package/dist/node/src/modules/health.js.map +1 -0
- package/dist/node/src/modules/health.public.js +9 -0
- package/dist/node/src/modules/health.public.js.map +1 -0
- package/dist/node/src/modules/history.js +62 -0
- package/dist/node/src/modules/history.js.map +1 -0
- package/dist/node/src/modules/history.public.js +6 -0
- package/dist/node/src/modules/history.public.js.map +1 -0
- package/dist/node/src/modules/namespaces.js +15 -0
- package/dist/node/src/modules/namespaces.js.map +1 -0
- package/dist/node/src/modules/namespaces.public.js +3 -0
- package/dist/node/src/modules/namespaces.public.js.map +1 -0
- package/dist/node/src/modules/queues.js +179 -0
- package/dist/node/src/modules/queues.js.map +1 -0
- package/dist/node/src/modules/queues.public.js +13 -0
- package/dist/node/src/modules/queues.public.js.map +1 -0
- package/dist/node/src/modules/reports.js +267 -0
- package/dist/node/src/modules/reports.js.map +1 -0
- package/dist/node/src/modules/reports.public.js +13 -0
- package/dist/node/src/modules/reports.public.js.map +1 -0
- package/dist/node/src/modules/setup.js +35 -0
- package/dist/node/src/modules/setup.js.map +1 -0
- package/dist/node/src/modules/setup.public.js +12 -0
- package/dist/node/src/modules/setup.public.js.map +1 -0
- package/dist/node/src/modules/tasks.base.js +51 -0
- package/dist/node/src/modules/tasks.base.js.map +1 -0
- package/dist/node/src/modules/tasks.js +281 -0
- package/dist/node/src/modules/tasks.js.map +1 -0
- package/dist/node/src/modules/tasks.public.js +21 -0
- package/dist/node/src/modules/tasks.public.js.map +1 -0
- package/dist/node/src/modules/tasksActivity.js +62 -0
- package/dist/node/src/modules/tasksActivity.js.map +1 -0
- package/dist/node/src/modules/tasksActivity.public.js +6 -0
- package/dist/node/src/modules/tasksActivity.public.js.map +1 -0
- package/dist/node/src/modules/tasksPresets.js +102 -0
- package/dist/node/src/modules/tasksPresets.js.map +1 -0
- package/dist/node/src/modules/tasksPresets.public.js +10 -0
- package/dist/node/src/modules/tasksPresets.public.js.map +1 -0
- package/dist/node/src/modules/templates.js +136 -0
- package/dist/node/src/modules/templates.js.map +1 -0
- package/dist/node/src/modules/templates.public.js +11 -0
- package/dist/node/src/modules/templates.public.js.map +1 -0
- package/dist/types/src/index.d.ts +32 -0
- package/dist/types/src/lib/axios.d.ts +51 -0
- package/dist/types/src/lib/promises.d.ts +21 -0
- package/dist/types/src/lib/utils.d.ts +27 -0
- package/dist/types/src/modules/auth.d.ts +90 -0
- package/dist/types/src/modules/auth.public.d.ts +1 -0
- package/dist/types/src/modules/crons.d.ts +102 -0
- package/dist/types/src/modules/crons.public.d.ts +1 -0
- package/dist/types/src/modules/elastic.d.ts +22 -0
- package/dist/types/src/modules/elastic.public.d.ts +1 -0
- package/dist/types/src/modules/health.d.ts +53 -0
- package/dist/types/src/modules/health.public.d.ts +1 -0
- package/dist/types/src/modules/history.d.ts +38 -0
- package/dist/types/src/modules/history.public.d.ts +1 -0
- package/dist/types/src/modules/namespaces.d.ts +29 -0
- package/dist/types/src/modules/namespaces.public.d.ts +1 -0
- package/dist/types/src/modules/queues.d.ts +120 -0
- package/dist/types/src/modules/queues.public.d.ts +1 -0
- package/dist/types/src/modules/reports.d.ts +204 -0
- package/dist/types/src/modules/reports.public.d.ts +1 -0
- package/dist/types/src/modules/setup.d.ts +17 -0
- package/dist/types/src/modules/setup.public.d.ts +2 -0
- package/dist/types/src/modules/tasks.base.d.ts +48 -0
- package/dist/types/src/modules/tasks.d.ts +243 -0
- package/dist/types/src/modules/tasks.public.d.ts +2 -0
- package/dist/types/src/modules/tasksActivity.d.ts +36 -0
- package/dist/types/src/modules/tasksActivity.public.d.ts +5 -0
- package/dist/types/src/modules/tasksPresets.d.ts +83 -0
- package/dist/types/src/modules/tasksPresets.public.d.ts +1 -0
- package/dist/types/src/modules/templates.d.ts +153 -0
- package/dist/types/src/modules/templates.public.d.ts +1 -0
- package/package.json +14 -12
- package/CHANGELOG.md +0 -42
- package/dist/types/lib/promises.d.ts +0 -18
- package/dist/types/modules/crons.public.d.ts +0 -1
- package/dist/types/modules/institutions.d.ts +0 -56
- package/dist/types/modules/queues.d.ts +0 -93
- package/dist/types/modules/queues.public.d.ts +0 -1
- package/dist/types/modules/tasks.d.ts +0 -124
- package/dist/types/modules/tasks.public.d.ts +0 -2
- package/dist/types/modules/templates.d.ts +0 -120
- /package/dist/{types → dist/dist/types/src}/modules/auth.public.d.ts +0 -0
- /package/dist/{types → dist/dist/types/src}/modules/health.d.ts +0 -0
- /package/dist/{types → dist/dist/types/src}/modules/health.public.d.ts +0 -0
- /package/dist/{types → dist/dist/types/src}/modules/history.d.ts +0 -0
- /package/dist/{types → dist/dist/types/src}/modules/history.public.d.ts +0 -0
- /package/dist/{types → dist/dist/types/src}/modules/namespaces.public.d.ts +0 -0
- /package/dist/{types → dist/dist/types/src}/modules/reports.public.d.ts +0 -0
- /package/dist/{types → dist/dist/types/src}/modules/setup.d.ts +0 -0
- /package/dist/{types → dist/dist/types/src}/modules/setup.public.d.ts +0 -0
- /package/dist/{types → dist/dist/types/src}/modules/tasks.base.d.ts +0 -0
- /package/dist/{types → dist/dist/types/src}/modules/templates.public.d.ts +0 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { type ApiResponse } from '../lib/axios';
|
|
2
|
+
import { type RawTask, type Task } from './tasks.base';
|
|
3
|
+
interface FigureFetchOptions {
|
|
4
|
+
fetchCount?: string;
|
|
5
|
+
filters?: Record<string, any>;
|
|
6
|
+
}
|
|
7
|
+
interface FigureFetchOptionsAggs extends FigureFetchOptions {
|
|
8
|
+
aggs?: Record<string, any>[];
|
|
9
|
+
}
|
|
10
|
+
interface FigureFetchOptionsBuckets extends FigureFetchOptions {
|
|
11
|
+
buckets?: Record<string, any>[];
|
|
12
|
+
metric?: Record<string, any>;
|
|
13
|
+
}
|
|
14
|
+
export interface Figure {
|
|
15
|
+
type: string;
|
|
16
|
+
data?: string | unknown[];
|
|
17
|
+
params: Record<string, any>;
|
|
18
|
+
fetchOptions?: FigureFetchOptionsAggs | FigureFetchOptionsBuckets;
|
|
19
|
+
slots?: number[];
|
|
20
|
+
}
|
|
21
|
+
export interface Layout {
|
|
22
|
+
data?: unknown;
|
|
23
|
+
fetcher?: string;
|
|
24
|
+
fetchOptions?: {
|
|
25
|
+
fetchCount?: string;
|
|
26
|
+
filters?: Record<string, any>;
|
|
27
|
+
};
|
|
28
|
+
figures: Figure[];
|
|
29
|
+
}
|
|
30
|
+
export interface RawTemplate {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
pageCount: number;
|
|
34
|
+
tags: {
|
|
35
|
+
name: string;
|
|
36
|
+
color?: string;
|
|
37
|
+
}[];
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface Template extends Omit<RawTemplate, 'createdAt' | 'updatedAt'> {
|
|
42
|
+
createdAt: Date;
|
|
43
|
+
updatedAt?: Date;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Transform raw data from JSON, to JS usable data
|
|
47
|
+
*
|
|
48
|
+
* @param template Raw template
|
|
49
|
+
*
|
|
50
|
+
* @returns Parsed template
|
|
51
|
+
*/
|
|
52
|
+
export declare const parseTemplate: (template: RawTemplate) => Template;
|
|
53
|
+
export interface RawFullTemplate extends RawTemplate {
|
|
54
|
+
body: {
|
|
55
|
+
renderer?: string;
|
|
56
|
+
renderOptions?: {
|
|
57
|
+
grid?: {
|
|
58
|
+
cols: number;
|
|
59
|
+
rows: number;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
fetchOptions?: {
|
|
63
|
+
filters?: Record<string, any>;
|
|
64
|
+
index?: string;
|
|
65
|
+
dateField: string;
|
|
66
|
+
};
|
|
67
|
+
layouts: Layout[];
|
|
68
|
+
};
|
|
69
|
+
tasks: RawTask[];
|
|
70
|
+
}
|
|
71
|
+
export interface FullTemplate extends Omit<RawFullTemplate, 'tasks' | 'createdAt' | 'updatedAt'> {
|
|
72
|
+
createdAt: Date;
|
|
73
|
+
updatedAt?: Date;
|
|
74
|
+
tasks: Task[];
|
|
75
|
+
}
|
|
76
|
+
export interface InputTemplate {
|
|
77
|
+
name: FullTemplate['name'];
|
|
78
|
+
body: FullTemplate['body'];
|
|
79
|
+
tags: FullTemplate['tags'];
|
|
80
|
+
}
|
|
81
|
+
type TemplateListResponse = ApiResponse<Template[]> & {
|
|
82
|
+
meta: {
|
|
83
|
+
default: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Get all available templates
|
|
88
|
+
*
|
|
89
|
+
* Needs `general.templates-get` permission
|
|
90
|
+
*
|
|
91
|
+
* @returns All templates' info
|
|
92
|
+
*/
|
|
93
|
+
export declare const getAllTemplates: () => Promise<TemplateListResponse>;
|
|
94
|
+
/**
|
|
95
|
+
* Get template info
|
|
96
|
+
*
|
|
97
|
+
* Needs `general.templates-get-template` permission
|
|
98
|
+
*
|
|
99
|
+
* @param templateOrId Template or Template's id
|
|
100
|
+
*
|
|
101
|
+
* @returns Template info
|
|
102
|
+
*/
|
|
103
|
+
export declare const getTemplate: (templateOrId: Template | Template['id']) => Promise<ApiResponse<FullTemplate>>;
|
|
104
|
+
/**
|
|
105
|
+
* Create a new template
|
|
106
|
+
*
|
|
107
|
+
* Needs `general.templates-post` permission
|
|
108
|
+
*
|
|
109
|
+
* @param template Template's data
|
|
110
|
+
* @param namespaces
|
|
111
|
+
*
|
|
112
|
+
* @returns Created template's info
|
|
113
|
+
*/
|
|
114
|
+
export declare const createTemplate: (template: InputTemplate) => Promise<ApiResponse<FullTemplate>>;
|
|
115
|
+
/**
|
|
116
|
+
* Update or create a template
|
|
117
|
+
*
|
|
118
|
+
* Needs `general.templates-put-template` permission
|
|
119
|
+
*
|
|
120
|
+
* @param template Template's data **with id**
|
|
121
|
+
* @param namespaces
|
|
122
|
+
*
|
|
123
|
+
* @returns Updated/Created Template's info
|
|
124
|
+
*/
|
|
125
|
+
export declare const upsertTemplate: (template: InputTemplate & {
|
|
126
|
+
id: Template['id'];
|
|
127
|
+
}) => Promise<ApiResponse<FullTemplate>>;
|
|
128
|
+
/**
|
|
129
|
+
* Update a template
|
|
130
|
+
*
|
|
131
|
+
* Needs `general.templates-put-template` permission
|
|
132
|
+
*
|
|
133
|
+
* @param id Template's id
|
|
134
|
+
* @param template New Template's data
|
|
135
|
+
* @param namespaces
|
|
136
|
+
*
|
|
137
|
+
* @deprecated use `upsertTemplate` instead
|
|
138
|
+
*
|
|
139
|
+
* @returns Updated Template's info
|
|
140
|
+
*/
|
|
141
|
+
export declare const updateTemplate: (template: InputTemplate & {
|
|
142
|
+
id: Template['id'];
|
|
143
|
+
}) => Promise<ApiResponse<FullTemplate>>;
|
|
144
|
+
/**
|
|
145
|
+
* Delete a template
|
|
146
|
+
*
|
|
147
|
+
* Needs `general.templates-delete-template` permission
|
|
148
|
+
*
|
|
149
|
+
* @param templateOrId Template or Template's id
|
|
150
|
+
* @param namespaces
|
|
151
|
+
*/
|
|
152
|
+
export declare const deleteTemplate: (templateOrId: Template | Template['id']) => Promise<void>;
|
|
153
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type Figure, type Layout, type Template, type FullTemplate, type InputTemplate, getAllTemplates, getTemplate, createTemplate, updateTemplate, upsertTemplate, deleteTemplate, } from './templates';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ezpaarse-project/ezreeport-sdk-js",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.11",
|
|
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:
|
|
29
|
+
"build": "run-s build:web build:node build:docs",
|
|
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
|
},
|
|
@@ -40,15 +42,15 @@
|
|
|
40
42
|
]
|
|
41
43
|
},
|
|
42
44
|
"dependencies": {
|
|
43
|
-
"axios": "^1.
|
|
44
|
-
"date-fns": "^
|
|
45
|
-
"events": "^3.3.0"
|
|
46
|
-
"typescript": "^5.0.4",
|
|
47
|
-
"vite": "^4.2.1",
|
|
48
|
-
"vite-plugin-dts": "^2.2.0"
|
|
45
|
+
"axios": "^1.6.4",
|
|
46
|
+
"date-fns": "^3.0.6",
|
|
47
|
+
"events": "^3.3.0"
|
|
49
48
|
},
|
|
50
49
|
"devDependencies": {
|
|
51
|
-
"@types/node": "^
|
|
50
|
+
"@types/node": "^20.10.6",
|
|
51
|
+
"typedoc": "^0.25.6",
|
|
52
|
+
"typescript": "^5.3.3",
|
|
53
|
+
"vite": "^5.0.10"
|
|
52
54
|
},
|
|
53
55
|
"engines": {
|
|
54
56
|
"node": "^16 || ^18"
|
package/CHANGELOG.md
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# @ezpaarse-project/ezreeport-sdk-js 1.0.0-beta.1 (2023-05-02)
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
### Bug Fixes
|
|
5
|
-
|
|
6
|
-
* **sdk:** fix type on getAllTemplates ([4309030](https://github.com/ezpaarse-project/ezreeport/commit/4309030938b47d7289a72736b84d99540bd40784))
|
|
7
|
-
* **sdk:** fixed export of crons methods ([46d1dbc](https://github.com/ezpaarse-project/ezreeport/commit/46d1dbc081a1c2206c2a63737088c4627990f7ca))
|
|
8
|
-
* **sdk:** fixed export of reccurence ([7d88766](https://github.com/ezpaarse-project/ezreeport/commit/7d8876676256de55766b4724c57c5c9b27effe5e))
|
|
9
|
-
* **sdk:** fixed namespace in task in history ([a992199](https://github.com/ezpaarse-project/ezreeport/commit/a992199ecb4c2748112fe928ba93f5e9a6e8a4df))
|
|
10
|
-
* **sdk:** fixed type of InputTask ([3feaade](https://github.com/ezpaarse-project/ezreeport/commit/3feaade67d014cf24a47d222af0a4a284a0c466f))
|
|
11
|
-
* **sdk:** fixed type of paginated data ([7113f7d](https://github.com/ezpaarse-project/ezreeport/commit/7113f7d42d2f0e98f351202d8efcc47126f7c0e3))
|
|
12
|
-
* **sdk:** fixed type on figures ([74e3467](https://github.com/ezpaarse-project/ezreeport/commit/74e3467b3edb2a698ccb460a9da4b32760b0c5d8))
|
|
13
|
-
* **sdk:** fixed types by replacing objects with json values ([ae1a501](https://github.com/ezpaarse-project/ezreeport/commit/ae1a50192531308aa097cd3f7f2c8218cc2c880d))
|
|
14
|
-
* **sdk:** fixed types on report ([89542e1](https://github.com/ezpaarse-project/ezreeport/commit/89542e1c547dbbfa67f4685020e55a18c9b0bb14))
|
|
15
|
-
* **sdk:** fixed wrong name for updating template ([b75dad6](https://github.com/ezpaarse-project/ezreeport/commit/b75dad69899df59cefeac246e33f9243307cf200))
|
|
16
|
-
* **sdk:** updating auth module following API ([947084d](https://github.com/ezpaarse-project/ezreeport/commit/947084d8827c41c2ec4fbb3ff64eaf24a5bd9fd5))
|
|
17
|
-
* **vue:** fixed generation permissions ([afbeea2](https://github.com/ezpaarse-project/ezreeport/commit/afbeea21c38da0d2fe7686f0b88666b4abcf3bde))
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### Features
|
|
21
|
-
|
|
22
|
-
* **sdk:** added list of user's available institution ([80412de](https://github.com/ezpaarse-project/ezreeport/commit/80412de76f1f01f1f1692f17070cf24709cc8d40))
|
|
23
|
-
* **sdk:** added support for responseType with reports ([4997076](https://github.com/ezpaarse-project/ezreeport/commit/4997076b67722fd256c7cd0e9c8fc8e9c44144a1))
|
|
24
|
-
* **sdk:** added support for tags in template ([d9285b0](https://github.com/ezpaarse-project/ezreeport/commit/d9285b083c426b96fcc636cb0bf4ae7a0026dd99))
|
|
25
|
-
* **sdk:** added template management ([e67ae37](https://github.com/ezpaarse-project/ezreeport/commit/e67ae37a3524ba4490bc328b7939926537dbd811))
|
|
26
|
-
* **sdk:** can retrieve version ([e0eea2c](https://github.com/ezpaarse-project/ezreeport/commit/e0eea2ca07c3854e597f84eb534b43969f451fc8))
|
|
27
|
-
* **sdk:** delete no longer returns something ([743308f](https://github.com/ezpaarse-project/ezreeport/commit/743308f52e75ad329fd067c9282bbb80dbbcb42a))
|
|
28
|
-
* **sdk:** following api changes about queues ([d49fd3f](https://github.com/ezpaarse-project/ezreeport/commit/d49fd3f99243186cdc697f8f026af565dc569bad))
|
|
29
|
-
* **sdk:** following reporting api changes ([4a52e7c](https://github.com/ezpaarse-project/ezreeport/commit/4a52e7c2a5ffd83f3ee2d471484d4b49115adcbb))
|
|
30
|
-
* **sdk:** moved institutions to dedicated modules ([4e81396](https://github.com/ezpaarse-project/ezreeport/commit/4e813967ab1faff1f26728878e25a456600e9054))
|
|
31
|
-
* **sdk:** task is now included in history list ([d094471](https://github.com/ezpaarse-project/ezreeport/commit/d094471d702cbef36f2f58fde9f3049c327a0ccc))
|
|
32
|
-
* **sdk:** using namespaces instead of institutions, following API ([9950309](https://github.com/ezpaarse-project/ezreeport/commit/99503094c972aede02c18677b3c81e718d820214))
|
|
33
|
-
* **vue:** added base to work on vue plugin ([7d2dd35](https://github.com/ezpaarse-project/ezreeport/commit/7d2dd35f2c157115ccbf706860bdb9473196e9fd))
|
|
34
|
-
* **vue:** added global data for sdk ([f2ad20f](https://github.com/ezpaarse-project/ezreeport/commit/f2ad20f5beaf446d200ad0987cad567495fba0c8))
|
|
35
|
-
* **vue:** moved from `Histoire` to `Storybook` ([4f41efe](https://github.com/ezpaarse-project/ezreeport/commit/4f41efefcd75c063fbc5dbfc63f03d15c191fb6c))
|
|
36
|
-
* **vue:** switched to the new permission system ([a0a59a0](https://github.com/ezpaarse-project/ezreeport/commit/a0a59a050a216f1ca4a17060fb57395deb5c443a))
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
### BREAKING CHANGES
|
|
40
|
-
|
|
41
|
-
* **sdk:** institution parameter is now an array of strings
|
|
42
|
-
* **sdk:** institution module is dropped
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import EventEmitter from 'events';
|
|
2
|
-
interface EventEmitterBase {
|
|
3
|
-
on: (...p: Parameters<EventEmitter['on']>) => this;
|
|
4
|
-
once: (...p: Parameters<EventEmitter['once']>) => this;
|
|
5
|
-
off: (...p: Parameters<EventEmitter['off']>) => this;
|
|
6
|
-
emit: (...p: Parameters<EventEmitter['emit']>) => this;
|
|
7
|
-
}
|
|
8
|
-
export type EventfulPromise<T> = Promise<T> & EventEmitterBase;
|
|
9
|
-
/**
|
|
10
|
-
* Attach a `EventEmitter` to a `Promise` returned by the `executor`
|
|
11
|
-
*
|
|
12
|
-
* @param executor Executor returning the promise. The `emitter` is passed to the executor as param.
|
|
13
|
-
* @param emitter `EventEmitter` attached. By default it's a new instance.
|
|
14
|
-
*
|
|
15
|
-
* @returns The EventfulPromise
|
|
16
|
-
*/
|
|
17
|
-
declare const createEventfulPromise: <T>(executor: (emitter: EventEmitter | EventEmitterBase) => Promise<T>, emitter?: EventEmitter) => EventfulPromise<T>;
|
|
18
|
-
export default createEventfulPromise;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { type Cron, getAllCrons, getCron, startCron, stopCron, forceCron, } from './crons';
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { type ApiResponse } from '../lib/axios';
|
|
2
|
-
interface RawInstitution {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
website?: string;
|
|
6
|
-
uai?: string;
|
|
7
|
-
auto: {
|
|
8
|
-
ezmesure: boolean;
|
|
9
|
-
ezpaarse: boolean;
|
|
10
|
-
report: boolean;
|
|
11
|
-
sushi?: boolean;
|
|
12
|
-
};
|
|
13
|
-
validated?: boolean;
|
|
14
|
-
indexCount?: number;
|
|
15
|
-
domains?: string[];
|
|
16
|
-
logoId?: string;
|
|
17
|
-
updatedAt?: string;
|
|
18
|
-
createdAt: string;
|
|
19
|
-
acronym?: string;
|
|
20
|
-
city?: string;
|
|
21
|
-
type?: string;
|
|
22
|
-
linkedinUrl?: string;
|
|
23
|
-
facebookUrl?: string;
|
|
24
|
-
twitterUrl?: string;
|
|
25
|
-
creator?: string;
|
|
26
|
-
youtubeUrl?: string;
|
|
27
|
-
indexPrefix?: string;
|
|
28
|
-
role?: string;
|
|
29
|
-
space?: string;
|
|
30
|
-
docContactName?: string;
|
|
31
|
-
techContactName?: string;
|
|
32
|
-
hidePartner?: boolean;
|
|
33
|
-
sushiReadySince?: string;
|
|
34
|
-
}
|
|
35
|
-
export interface Institution extends Omit<RawInstitution, 'updatedAt' | 'createdAt' | 'sushiReadySince'> {
|
|
36
|
-
updatedAt?: Date;
|
|
37
|
-
createdAt: Date;
|
|
38
|
-
sushiReadySince?: Date;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Get all available institutions for authed user
|
|
42
|
-
*
|
|
43
|
-
* Needs `institutions-get` permission
|
|
44
|
-
*
|
|
45
|
-
* @returns Available institutions
|
|
46
|
-
*/
|
|
47
|
-
export declare const getInstitutions: () => Promise<ApiResponse<Institution[]>>;
|
|
48
|
-
/**
|
|
49
|
-
* Get specific institution that is available for authed user
|
|
50
|
-
*
|
|
51
|
-
* Needs `institutions-get-id` permission
|
|
52
|
-
*
|
|
53
|
-
* @returns Available institution
|
|
54
|
-
*/
|
|
55
|
-
export declare const getInstitution: (id: Institution['id']) => Promise<ApiResponse<Institution>>;
|
|
56
|
-
export {};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { type PaginatedApiResponse, type ApiResponse } from '../lib/axios';
|
|
2
|
-
export interface Job<Data> {
|
|
3
|
-
id: number | string;
|
|
4
|
-
queue: string;
|
|
5
|
-
data: Data;
|
|
6
|
-
}
|
|
7
|
-
type JobStatus = 'completed' | 'waiting' | 'active' | 'delayed' | 'failed' | 'paused' | 'stuck';
|
|
8
|
-
interface RawFullJob<Data, Result> {
|
|
9
|
-
id: Job<Data>['id'];
|
|
10
|
-
data: Job<Data>['data'];
|
|
11
|
-
result?: Result;
|
|
12
|
-
progress: number;
|
|
13
|
-
added: string;
|
|
14
|
-
started?: string;
|
|
15
|
-
ended?: string;
|
|
16
|
-
attempts: number;
|
|
17
|
-
status: JobStatus;
|
|
18
|
-
}
|
|
19
|
-
export interface FullJob<Data, Result> extends Omit<RawFullJob<Data, Result>, 'added' | 'started' | 'ended'> {
|
|
20
|
-
added: Date;
|
|
21
|
-
started?: Date;
|
|
22
|
-
ended?: Date;
|
|
23
|
-
}
|
|
24
|
-
export interface Queue {
|
|
25
|
-
status: 'paused' | 'active';
|
|
26
|
-
name: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Get all available queues
|
|
30
|
-
*
|
|
31
|
-
* Needs `general.queues-get` permission
|
|
32
|
-
*
|
|
33
|
-
* @returns All queues' names
|
|
34
|
-
*/
|
|
35
|
-
export declare const getAllQueues: () => Promise<ApiResponse<Queue[]>>;
|
|
36
|
-
/**
|
|
37
|
-
* Pause queue
|
|
38
|
-
*
|
|
39
|
-
* Needs `general.queues-put-queue-pause` permission
|
|
40
|
-
*
|
|
41
|
-
* @param queueName Name of the queue
|
|
42
|
-
*
|
|
43
|
-
* @returns queue info
|
|
44
|
-
*/
|
|
45
|
-
export declare const pauseQueue: (queueName: string) => Promise<ApiResponse<Queue>>;
|
|
46
|
-
/**
|
|
47
|
-
* Resume queue
|
|
48
|
-
*
|
|
49
|
-
* Needs `general.queues-put-queue-resume` permission
|
|
50
|
-
*
|
|
51
|
-
* @param queueName Name of the queue
|
|
52
|
-
*
|
|
53
|
-
* @returns queue info
|
|
54
|
-
*/
|
|
55
|
-
export declare const resumeQueue: (queueName: string) => Promise<ApiResponse<Queue>>;
|
|
56
|
-
/**
|
|
57
|
-
* Get queue info
|
|
58
|
-
*
|
|
59
|
-
* Needs `general.queues-get-queue-jobs` permission
|
|
60
|
-
*
|
|
61
|
-
* @param queueName Name of the queue
|
|
62
|
-
*
|
|
63
|
-
* @returns queue info
|
|
64
|
-
*/
|
|
65
|
-
export declare const getQueueJobs: <Data, Result>(queueName: string, paginationOpts?: {
|
|
66
|
-
previous?: string | number | undefined;
|
|
67
|
-
count?: number | undefined;
|
|
68
|
-
} | undefined) => Promise<PaginatedApiResponse<FullJob<Data, Result>[]>>;
|
|
69
|
-
/**
|
|
70
|
-
* Get job info
|
|
71
|
-
*
|
|
72
|
-
* Needs `namespaces[namespaceId].queues-get-queue-jobs-jobId` permission
|
|
73
|
-
*
|
|
74
|
-
* @param queueName Name of queue where job is
|
|
75
|
-
* @param jobId Id of the job in queue
|
|
76
|
-
* @param namespaces
|
|
77
|
-
*
|
|
78
|
-
* @returns Job full info
|
|
79
|
-
*/
|
|
80
|
-
export declare const getJob: <Data, Result>(queueName: string, jobId: string | number, namespaces?: string[]) => Promise<ApiResponse<FullJob<Data, Result>>>;
|
|
81
|
-
/**
|
|
82
|
-
* Retry job that failed
|
|
83
|
-
*
|
|
84
|
-
* Needs `namespaces[namespaceId].queues-post-queue-jobs-jobId-retry` permission
|
|
85
|
-
*
|
|
86
|
-
* @param queueName Name of queue where job is
|
|
87
|
-
* @param jobId Id of the job in queue
|
|
88
|
-
* @param namespaces
|
|
89
|
-
*
|
|
90
|
-
* @returns queue info
|
|
91
|
-
*/
|
|
92
|
-
export declare const retryJob: <Data, Result>(queueName: string, jobId: string | number, namespaces?: string[]) => Promise<ApiResponse<FullJob<Data, Result>>>;
|
|
93
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { type Job, type FullJob, type Queue, getAllQueues, pauseQueue, resumeQueue, getQueueJobs, getJob, retryJob, } from './queues';
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { type ApiResponse, type PaginatedApiResponse } from '../lib/axios';
|
|
2
|
-
import { type History, type RawHistory } from './history';
|
|
3
|
-
import type { Namespace } from './namespaces';
|
|
4
|
-
import { type Task, type RawTaskWithNamespace, type TaskWithNamespace } from './tasks.base';
|
|
5
|
-
import type { Layout } from './templates';
|
|
6
|
-
interface AdditionalRawTaskData {
|
|
7
|
-
template: {
|
|
8
|
-
extends: string;
|
|
9
|
-
fetchOptions?: object;
|
|
10
|
-
inserts?: (Layout & {
|
|
11
|
-
at: number;
|
|
12
|
-
})[];
|
|
13
|
-
};
|
|
14
|
-
targets: string[];
|
|
15
|
-
history: RawHistory[];
|
|
16
|
-
}
|
|
17
|
-
interface AdditionalTaskData extends Omit<AdditionalRawTaskData, 'history'> {
|
|
18
|
-
history: History[];
|
|
19
|
-
}
|
|
20
|
-
export interface RawFullTask extends RawTaskWithNamespace, AdditionalRawTaskData {
|
|
21
|
-
}
|
|
22
|
-
export interface FullTask extends TaskWithNamespace, AdditionalTaskData {
|
|
23
|
-
}
|
|
24
|
-
export interface InputTask extends Pick<FullTask, 'name' | 'template' | 'targets' | 'recurrence'> {
|
|
25
|
-
namespace?: Task['namespaceId'];
|
|
26
|
-
nextRun?: FullTask['nextRun'];
|
|
27
|
-
enabled?: FullTask['enabled'];
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Get all available tasks
|
|
31
|
-
*
|
|
32
|
-
* Needs `namespaces[namespaceId].tasks-get` permission
|
|
33
|
-
*
|
|
34
|
-
* @param paginationOpts Options for pagination
|
|
35
|
-
* @param namespaces
|
|
36
|
-
*
|
|
37
|
-
* @returns All tasks' info
|
|
38
|
-
*/
|
|
39
|
-
export declare const getAllTasks: (paginationOpts?: {
|
|
40
|
-
previous?: Task['id'];
|
|
41
|
-
count?: number;
|
|
42
|
-
}, namespaces?: Namespace['id'][]) => Promise<PaginatedApiResponse<Task[]>>;
|
|
43
|
-
/**
|
|
44
|
-
* Create a new task
|
|
45
|
-
*
|
|
46
|
-
* Needs `namespaces[namespaceId].tasks-post` permission
|
|
47
|
-
*
|
|
48
|
-
* @param task Task's data
|
|
49
|
-
* @param namespaces
|
|
50
|
-
*
|
|
51
|
-
* @returns Created task's info
|
|
52
|
-
*/
|
|
53
|
-
export declare const createTask: (task: InputTask, namespaces?: Namespace['id'][]) => Promise<ApiResponse<FullTask>>;
|
|
54
|
-
/**
|
|
55
|
-
* Get task info
|
|
56
|
-
*
|
|
57
|
-
* Needs `namespaces[namespaceId].tasks-get-task` permission
|
|
58
|
-
*
|
|
59
|
-
* @param id Task's id
|
|
60
|
-
* @param namespaces
|
|
61
|
-
*
|
|
62
|
-
* @returns Task's info
|
|
63
|
-
*/
|
|
64
|
-
export declare const getTask: (id: Task['id'], namespaces?: Namespace['id'][]) => Promise<ApiResponse<FullTask>>;
|
|
65
|
-
/**
|
|
66
|
-
* Update or create a task
|
|
67
|
-
*
|
|
68
|
-
* Needs `namespaces[namespaceId].tasks-put-task` permission
|
|
69
|
-
*
|
|
70
|
-
* @param id Task's id
|
|
71
|
-
* @param task Task's data
|
|
72
|
-
* @param namespaces
|
|
73
|
-
*
|
|
74
|
-
* @returns Updated/Created Task's info
|
|
75
|
-
*/
|
|
76
|
-
export declare const upsertTask: (id: Task['id'], task: InputTask, namespaces?: Namespace['id'][]) => Promise<ApiResponse<FullTask>>;
|
|
77
|
-
/**
|
|
78
|
-
* Update a task
|
|
79
|
-
*
|
|
80
|
-
* Needs `namespaces[namespaceId].tasks-put-task` permission
|
|
81
|
-
*
|
|
82
|
-
* @param id Task's id
|
|
83
|
-
* @param task New Task's data
|
|
84
|
-
* @param namespaces
|
|
85
|
-
*
|
|
86
|
-
* @deprecated Use `upsertTask` instead
|
|
87
|
-
*
|
|
88
|
-
* @returns Updated Task's info
|
|
89
|
-
*/
|
|
90
|
-
export declare const updateTask: (id: Task['id'], task: InputTask, namespaces?: Namespace['id'][]) => Promise<ApiResponse<FullTask>>;
|
|
91
|
-
/**
|
|
92
|
-
* Delete a task
|
|
93
|
-
*
|
|
94
|
-
* Needs `namespaces[namespaceId].tasks-delete-task` permission
|
|
95
|
-
*
|
|
96
|
-
* @param id Task's id
|
|
97
|
-
* @param namespaces
|
|
98
|
-
*
|
|
99
|
-
* @returns Deleted Task's info
|
|
100
|
-
*/
|
|
101
|
-
export declare const deleteTask: (id: Task['id'], namespaces?: Namespace['id'][]) => Promise<void>;
|
|
102
|
-
/**
|
|
103
|
-
* Shorthand to enable task
|
|
104
|
-
*
|
|
105
|
-
* Needs `namespaces[namespaceId].tasks-put-task-enable` permission
|
|
106
|
-
*
|
|
107
|
-
* @param id Task's id
|
|
108
|
-
* @param namespaces
|
|
109
|
-
*
|
|
110
|
-
* @returns Updated task's info
|
|
111
|
-
*/
|
|
112
|
-
export declare const enableTask: (id: Task['id'], namespaces?: Namespace['id'][]) => Promise<ApiResponse<FullTask>>;
|
|
113
|
-
/**
|
|
114
|
-
* Shorthand to disable task
|
|
115
|
-
*
|
|
116
|
-
* Needs `namespaces[namespaceId].tasks-put-task-disable` permission
|
|
117
|
-
*
|
|
118
|
-
* @param id Task's id
|
|
119
|
-
* @param namespaces
|
|
120
|
-
*
|
|
121
|
-
* @returns Updated task's info
|
|
122
|
-
*/
|
|
123
|
-
export declare const disableTask: (id: Task['id'], namespaces?: Namespace['id'][]) => Promise<ApiResponse<FullTask>>;
|
|
124
|
-
export {};
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { type ApiResponse } from '../lib/axios';
|
|
2
|
-
type JsonObject = {
|
|
3
|
-
[Key in string]?: JsonValue;
|
|
4
|
-
};
|
|
5
|
-
type JsonArray = JsonValue[];
|
|
6
|
-
type JsonValue = string | number | boolean | JsonObject | JsonArray | null;
|
|
7
|
-
export interface Figure {
|
|
8
|
-
type: string;
|
|
9
|
-
data?: string | unknown[];
|
|
10
|
-
params: JsonObject;
|
|
11
|
-
slots?: number[];
|
|
12
|
-
}
|
|
13
|
-
export interface Layout {
|
|
14
|
-
data?: unknown;
|
|
15
|
-
fetcher?: string;
|
|
16
|
-
fetchOptions?: JsonObject;
|
|
17
|
-
figures: Figure[];
|
|
18
|
-
}
|
|
19
|
-
export interface RawTemplate {
|
|
20
|
-
name: string;
|
|
21
|
-
renderer: string;
|
|
22
|
-
pageCount: number;
|
|
23
|
-
tags: {
|
|
24
|
-
name: string;
|
|
25
|
-
color?: string;
|
|
26
|
-
}[];
|
|
27
|
-
createdAt: string;
|
|
28
|
-
updatedAt?: string;
|
|
29
|
-
}
|
|
30
|
-
export interface Template extends Omit<RawTemplate, 'createdAt' | 'updatedAt'> {
|
|
31
|
-
createdAt: Date;
|
|
32
|
-
updatedAt?: Date;
|
|
33
|
-
}
|
|
34
|
-
export interface RawFullTemplate extends RawTemplate {
|
|
35
|
-
body: {
|
|
36
|
-
renderer?: string;
|
|
37
|
-
renderOptions?: JsonObject;
|
|
38
|
-
fetchOptions?: JsonObject;
|
|
39
|
-
layouts: Layout[];
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
export interface FullTemplate extends Omit<RawFullTemplate, 'createdAt' | 'updatedAt'> {
|
|
43
|
-
createdAt: Date;
|
|
44
|
-
updatedAt?: Date;
|
|
45
|
-
}
|
|
46
|
-
export interface InputTemplate {
|
|
47
|
-
body: FullTemplate['body'];
|
|
48
|
-
tags: FullTemplate['tags'];
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Get all available templates
|
|
52
|
-
*
|
|
53
|
-
* Needs `general.templates-get` permission
|
|
54
|
-
*
|
|
55
|
-
* @returns All templates' info
|
|
56
|
-
*/
|
|
57
|
-
export declare const getAllTemplates: () => Promise<ApiResponse<Template[]>>;
|
|
58
|
-
/**
|
|
59
|
-
* Get template info
|
|
60
|
-
*
|
|
61
|
-
* Needs `general.templates-get-name(*)` permission
|
|
62
|
-
*
|
|
63
|
-
* @param name Template's name
|
|
64
|
-
*
|
|
65
|
-
* @returns Template info
|
|
66
|
-
*/
|
|
67
|
-
export declare const getTemplate: (name: Template['name']) => Promise<ApiResponse<FullTemplate>>;
|
|
68
|
-
/**
|
|
69
|
-
* Create a new template
|
|
70
|
-
*
|
|
71
|
-
* Needs `general.templates-post` permission
|
|
72
|
-
*
|
|
73
|
-
* @param template Template's data
|
|
74
|
-
* @param namespaces
|
|
75
|
-
*
|
|
76
|
-
* @deprecated use `upsertTemplate` instead
|
|
77
|
-
*
|
|
78
|
-
* @returns Created template's info
|
|
79
|
-
*/
|
|
80
|
-
export declare const createTemplate: (template: InputTemplate & {
|
|
81
|
-
name: Template['name'];
|
|
82
|
-
}) => Promise<ApiResponse<FullTemplate>>;
|
|
83
|
-
/**
|
|
84
|
-
* Update or create a template
|
|
85
|
-
*
|
|
86
|
-
* Needs `general.templates-put-name(*)` permission
|
|
87
|
-
*
|
|
88
|
-
* @param id Template's id
|
|
89
|
-
* @param template Template's data
|
|
90
|
-
* @param namespaces
|
|
91
|
-
*
|
|
92
|
-
* @returns Updated/Created Template's info
|
|
93
|
-
*/
|
|
94
|
-
export declare const upsertTemplate: (name: Template['name'], template: InputTemplate) => Promise<ApiResponse<FullTemplate>>;
|
|
95
|
-
/**
|
|
96
|
-
* Update a template
|
|
97
|
-
*
|
|
98
|
-
* Needs `general.templates-put-name(*)` permission
|
|
99
|
-
*
|
|
100
|
-
* @param id Template's id
|
|
101
|
-
* @param template New Template's data
|
|
102
|
-
* @param namespaces
|
|
103
|
-
*
|
|
104
|
-
* @deprecated use `upsertTemplate` instead
|
|
105
|
-
*
|
|
106
|
-
* @returns Updated Template's info
|
|
107
|
-
*/
|
|
108
|
-
export declare const updateTemplate: (name: Template['name'], template: InputTemplate) => Promise<ApiResponse<FullTemplate>>;
|
|
109
|
-
/**
|
|
110
|
-
* Delete a template
|
|
111
|
-
*
|
|
112
|
-
* Needs `general.templates-delete-name(*)` permission
|
|
113
|
-
*
|
|
114
|
-
* @param id Template's id
|
|
115
|
-
* @param namespaces
|
|
116
|
-
*
|
|
117
|
-
* @returns Deleted Template's info
|
|
118
|
-
*/
|
|
119
|
-
export declare const deleteTemplate: (name: Template['name']) => Promise<void>;
|
|
120
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|