@persei/perseed-api 4.34.18 → 4.34.19
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/dist/index.d.ts +18 -11
- package/package.json +6 -7
package/dist/index.d.ts
CHANGED
|
@@ -78,16 +78,16 @@ export declare type BaseApiServicePayload = {
|
|
|
78
78
|
ctx?: RequestContext;
|
|
79
79
|
} & Partial<ApiActionContextData>;
|
|
80
80
|
|
|
81
|
-
export declare type BaseDashboardWidget =
|
|
81
|
+
export declare type BaseDashboardWidget = BaseDashboardWidgetPayload & ({
|
|
82
82
|
type: DashboardWidgetType.SECTIONCARD;
|
|
83
83
|
params: SectionCardProps;
|
|
84
|
-
}
|
|
84
|
+
} | {
|
|
85
85
|
type: DashboardWidgetType.VALUECARD;
|
|
86
86
|
params: ValueCardProps;
|
|
87
|
-
}
|
|
87
|
+
} | {
|
|
88
88
|
type: DashboardWidgetType.PATIENTLIST;
|
|
89
89
|
params: PatientListProps;
|
|
90
|
-
}
|
|
90
|
+
} | {
|
|
91
91
|
type: DashboardWidgetType.DASHBOARD;
|
|
92
92
|
params: DashboardProps;
|
|
93
93
|
});
|
|
@@ -96,7 +96,6 @@ export declare type BaseDashboardWidgetPayload<T extends DashboardWidgetType | u
|
|
|
96
96
|
id?: number;
|
|
97
97
|
title: string;
|
|
98
98
|
description?: string;
|
|
99
|
-
size?: number | ColProps;
|
|
100
99
|
type: T | DashboardWidgetType;
|
|
101
100
|
library: boolean;
|
|
102
101
|
config?: WidgetBlockConfig;
|
|
@@ -440,16 +439,16 @@ export declare const CORE: {
|
|
|
440
439
|
|
|
441
440
|
export declare const CountryPhoneCodes: {};
|
|
442
441
|
|
|
443
|
-
export declare type CreateDashboardWidgetPayload =
|
|
442
|
+
export declare type CreateDashboardWidgetPayload = DashboardBaseWidgetPayload & ({
|
|
444
443
|
type: DashboardWidgetType.SECTIONCARD;
|
|
445
444
|
params: SectionCardProps;
|
|
446
|
-
}
|
|
445
|
+
} | {
|
|
447
446
|
type: DashboardWidgetType.VALUECARD;
|
|
448
447
|
params: ValueCardProps;
|
|
449
|
-
}
|
|
448
|
+
} | {
|
|
450
449
|
type: DashboardWidgetType.PATIENTLIST;
|
|
451
450
|
params: PatientListProps;
|
|
452
|
-
}
|
|
451
|
+
} | {
|
|
453
452
|
type: DashboardWidgetType.DASHBOARD;
|
|
454
453
|
params: DashboardProps;
|
|
455
454
|
});
|
|
@@ -491,6 +490,12 @@ export declare type DashboardBaseWidgetPayload = {
|
|
|
491
490
|
widgetsBlocks?: DashboardWidgetBlockCreatePayload[];
|
|
492
491
|
};
|
|
493
492
|
|
|
493
|
+
export declare type DashboardChildrenWidget<T extends DashboardWidgetType | undefined = undefined> = DashboardBaseWidgetPayload & BaseDashboardWidgetPayload<T> & {
|
|
494
|
+
id: number;
|
|
495
|
+
type: DashboardWidgetType;
|
|
496
|
+
params: GenericParams;
|
|
497
|
+
};
|
|
498
|
+
|
|
494
499
|
export declare interface DashboardProps {
|
|
495
500
|
active?: boolean;
|
|
496
501
|
config?: any;
|
|
@@ -499,11 +504,11 @@ export declare interface DashboardProps {
|
|
|
499
504
|
|
|
500
505
|
export declare type DashboardWidget<T extends DashboardWidgetType | undefined = undefined> = T extends DashboardWidgetType ? {
|
|
501
506
|
id: number;
|
|
502
|
-
widgets?:
|
|
507
|
+
widgets?: DashboardChildrenWidget[];
|
|
503
508
|
} & DashboardWidgetTypeToParams[T] & BaseDashboardWidgetPayload<T> : {
|
|
504
509
|
id: number;
|
|
505
510
|
params: any;
|
|
506
|
-
widgets?:
|
|
511
|
+
widgets?: DashboardChildrenWidget[];
|
|
507
512
|
} & BaseDashboardWidgetPayload<T>;
|
|
508
513
|
|
|
509
514
|
export declare type DashboardWidgetBlockCreatePayload = {
|
|
@@ -826,6 +831,8 @@ export declare interface GenericDashboardWidgetDataLoader {
|
|
|
826
831
|
params: Record<string, any>;
|
|
827
832
|
}
|
|
828
833
|
|
|
834
|
+
export declare type GenericParams = SectionCardProps | ValueCardProps | PatientListProps | DashboardProps;
|
|
835
|
+
|
|
829
836
|
export declare const HISTORY: {
|
|
830
837
|
PERMANENT: string;
|
|
831
838
|
TEMPORARY: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@persei/perseed-api",
|
|
3
|
-
"version": "4.34.
|
|
3
|
+
"version": "4.34.19",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "./dist/perseed-api.umd.js",
|
|
6
6
|
"module": "./dist/perseed-api.mjs",
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
|
-
"
|
|
13
|
-
"build": "tsc --noEmit && vite build",
|
|
12
|
+
"lib:build": "npm run precommit && tsc --noEmit && vite build",
|
|
14
13
|
"start": "ts-node src/server.ts",
|
|
15
14
|
"lint": "npm run test:lint",
|
|
16
15
|
"jshint": "jshint . > report.txt || true",
|
|
@@ -29,10 +28,10 @@
|
|
|
29
28
|
"security-packages-report": "npm audit --json | npm-audit-html --output reports/packages-security-report.html",
|
|
30
29
|
"test:lint": "eslint src/ && prettier --ignore-path .prettierignorefile --check src/",
|
|
31
30
|
"test:types": "tsc --noEmit",
|
|
32
|
-
"test:
|
|
33
|
-
"
|
|
34
|
-
"test:security": "
|
|
35
|
-
"test:security:report": "
|
|
31
|
+
"test:dependencies": "pipx install njsscan semgrep esprima",
|
|
32
|
+
"test:docs": "python3 swagger_gen.py",
|
|
33
|
+
"test:security": "njsscan ./src/",
|
|
34
|
+
"test:security:report": "njsscan --html -o reports/security-report.html ./src/",
|
|
36
35
|
"test:security:report2": "./bin/bearer scan perseed-api/src --scanner=sast,secrets --report security --format html --output reports/bearer_api_report",
|
|
37
36
|
"precommit": "npm run schemas:generate && prettier --ignore-path .prettierignorefile src/ --write && npm run eslintfix && npm run i18n:generate && npm run test:types && npm run test-unit && npm run test:security",
|
|
38
37
|
"i18n:generate": "npx rimraf src/i18n/api/en.json && i18next && i18next --config i18next-parser.config.js",
|