@persei/perseed-api 5.0.27 → 5.0.28
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/src/Services/AiService.d.ts.map +1 -1
- package/dist/src/Services/FileService.d.ts +1 -1
- package/dist/src/Services/FileService.d.ts.map +1 -1
- package/dist/src/app.d.ts.map +1 -1
- package/dist/src/controllers/IntrospectionController.d.ts +10 -1
- package/dist/src/controllers/IntrospectionController.d.ts.map +1 -1
- package/dist/src/schemas/container_widget/widgetTypes/PatientListProps.d.ts +20 -0
- package/dist/src/schemas/container_widget/widgetTypes/PatientListProps.d.ts.map +1 -1
- package/dist/src/test/test-helpers.d.ts.map +1 -1
- package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/action-system.helper.d.ts +22 -4
- package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/action-system.helper.d.ts.map +1 -1
- package/dist/src/v2/modules/ecosystem/action-system/action-system.schema.d.ts +14 -14
- package/dist/src/v2/modules/ecosystem/action-system/action-system.service/automatic-trigger.service.d.ts +4 -4
- package/dist/src/v2/modules/ecosystem/action-system/action-system.service/manual-trigger-engine.service.d.ts +5 -0
- package/dist/src/v2/modules/ecosystem/action-system/action-system.service/manual-trigger-engine.service.d.ts.map +1 -1
- package/dist/src/v2/modules/ecosystem/action-system/action-system.service/manual-trigger.service.d.ts +4 -4
- package/dist/src/v2/modules/ecosystem/action-system/action-system.service/trigger-engine.service.d.ts +9 -2
- package/dist/src/v2/modules/ecosystem/action-system/action-system.service/trigger-engine.service.d.ts.map +1 -1
- package/dist/src/v2/modules/ecosystem/alert/alert.helper.d.ts +16 -0
- package/dist/src/v2/modules/ecosystem/alert/alert.helper.d.ts.map +1 -1
- package/dist/src/v2/modules/ecosystem/alert/alert.model.d.ts +42 -0
- package/dist/src/v2/modules/ecosystem/alert/alert.model.d.ts.map +1 -1
- package/dist/src/v2/modules/ecosystem/alert/alert.service/alert-listing.service.d.ts +52 -0
- package/dist/src/v2/modules/ecosystem/alert/alert.service/alert-listing.service.d.ts.map +1 -0
- package/dist/src/v2/modules/ecosystem/alert/alert.service/alert-listing.service.test.d.ts +2 -0
- package/dist/src/v2/modules/ecosystem/alert/alert.service/alert-listing.service.test.d.ts.map +1 -0
- package/dist/src/v2/modules/ecosystem/alert/alert.service/alert-patient-data.service.d.ts +36 -0
- package/dist/src/v2/modules/ecosystem/alert/alert.service/alert-patient-data.service.d.ts.map +1 -0
- package/dist/src/v2/modules/ecosystem/alert/alert.service/alert-patient-data.service.test.d.ts +2 -0
- package/dist/src/v2/modules/ecosystem/alert/alert.service/alert-patient-data.service.test.d.ts.map +1 -0
- package/dist/src/v2/modules/ecosystem/alert/{alert.service.d.ts → alert.service/alert.service.d.ts} +5 -5
- package/dist/src/v2/modules/ecosystem/alert/alert.service/alert.service.d.ts.map +1 -0
- package/dist/src/v2/modules/ecosystem/alert/alert.service/alert.service.test.d.ts.map +1 -0
- package/dist/src/v2/modules/ecosystem/alert/alert.service/index.d.ts +5 -0
- package/dist/src/v2/modules/ecosystem/alert/alert.service/index.d.ts.map +1 -0
- package/dist/src/v2/modules/ecosystem/alert/index.d.ts +3 -2
- package/dist/src/v2/modules/ecosystem/alert/index.d.ts.map +1 -1
- package/dist/src/v2/modules/project/forms-data/forms-data.helper.d.ts +52 -1
- package/dist/src/v2/modules/project/forms-data/forms-data.helper.d.ts.map +1 -1
- package/dist/src/v2/modules/project/forms-data/forms-data.service/associated-sources.service.d.ts +64 -0
- package/dist/src/v2/modules/project/forms-data/forms-data.service/associated-sources.service.d.ts.map +1 -0
- package/dist/src/v2/modules/project/forms-data/forms-data.service/associated-sources.service.test.d.ts +2 -0
- package/dist/src/v2/modules/project/forms-data/forms-data.service/associated-sources.service.test.d.ts.map +1 -0
- package/dist/src/v2/modules/project/forms-data/forms-data.service/forms-data.service.d.ts +22 -0
- package/dist/src/v2/modules/project/forms-data/forms-data.service/forms-data.service.d.ts.map +1 -0
- package/dist/src/v2/modules/project/forms-data/forms-data.service/forms-data.service.test.d.ts.map +1 -0
- package/dist/src/v2/modules/project/forms-data/forms-data.service/index.d.ts +4 -0
- package/dist/src/v2/modules/project/forms-data/forms-data.service/index.d.ts.map +1 -0
- package/dist/src/v2/modules/project/forms-data/index.d.ts +1 -0
- package/dist/src/v2/modules/project/forms-data/index.d.ts.map +1 -1
- package/dist/v1/perseed-api.cjs +9 -0
- package/dist/v1/perseed-api.cjs.map +1 -1
- package/dist/v1/perseed-api.mjs +9 -0
- package/dist/v1/perseed-api.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/src/v2/modules/ecosystem/alert/alert.service.d.ts.map +0 -1
- package/dist/src/v2/modules/ecosystem/alert/alert.service.test.d.ts.map +0 -1
- package/dist/src/v2/modules/project/forms-data/forms-data.service.d.ts +0 -12
- package/dist/src/v2/modules/project/forms-data/forms-data.service.d.ts.map +0 -1
- package/dist/src/v2/modules/project/forms-data/forms-data.service.test.d.ts.map +0 -1
- /package/dist/src/v2/modules/ecosystem/alert/{alert.service.test.d.ts → alert.service/alert.service.test.d.ts} +0 -0
- /package/dist/src/v2/modules/project/forms-data/{forms-data.service.test.d.ts → forms-data.service/forms-data.service.test.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiService.d.ts","sourceRoot":"","sources":["../../../../src/Services/AiService.ts"],"names":[],"mappings":"AAIA,OAAO,cAAc,MAAM,kCAAkC,CAAA;AAC7D,OAA0B,EAAqB,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAWrF,OAAO,aAAa,MAAM,iCAAiC,CAAA;AAE3D,OAAO,SAAS,MAAM,WAAW,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAyB5B,eAAO,MAAM,sBAAsB,wBAAwB,CAAA;AAC3D,eAAO,MAAM,oBAAoB,uBAAuB,CAAA;AAqZxD,QAAA,MAAM,SAAS;IACb;;OAEG;6CAEI,cAAc,SACZ,aAAa,YACV,MAAM,aACL,MAAM,SACV,MAAM,eACA,MAAM,aACR,MAAM,cACL,MAAM,UACV,MAAM,iBACC,SAAS,CAAC,YAAY;6BAkER,cAAc,KAAK,SAAS,QAAQ,GAAG;4BA8JxC,cAAc,KAAK,SAAS,QAAQ,GAAG;
|
|
1
|
+
{"version":3,"file":"AiService.d.ts","sourceRoot":"","sources":["../../../../src/Services/AiService.ts"],"names":[],"mappings":"AAIA,OAAO,cAAc,MAAM,kCAAkC,CAAA;AAC7D,OAA0B,EAAqB,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAWrF,OAAO,aAAa,MAAM,iCAAiC,CAAA;AAE3D,OAAO,SAAS,MAAM,WAAW,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAyB5B,eAAO,MAAM,sBAAsB,wBAAwB,CAAA;AAC3D,eAAO,MAAM,oBAAoB,uBAAuB,CAAA;AAqZxD,QAAA,MAAM,SAAS;IACb;;OAEG;6CAEI,cAAc,SACZ,aAAa,YACV,MAAM,aACL,MAAM,SACV,MAAM,eACA,MAAM,aACR,MAAM,cACL,MAAM,UACV,MAAM,iBACC,SAAS,CAAC,YAAY;6BAkER,cAAc,KAAK,SAAS,QAAQ,GAAG;4BA8JxC,cAAc,KAAK,SAAS,QAAQ,GAAG;CAsJtE,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as RequestContext, NoUserRequestContext } from '../models/request/RequestContext';
|
|
2
2
|
import { Readable } from 'stream';
|
|
3
3
|
declare function stream2buffer(stream: Readable): Promise<Buffer>;
|
|
4
|
-
declare function createThumbnail(buffer: Buffer): Promise<Buffer<
|
|
4
|
+
declare function createThumbnail(buffer: Buffer): Promise<Buffer<ArrayBuffer>>;
|
|
5
5
|
export type DestinationPathContext = Record<string, unknown> & {
|
|
6
6
|
fileName: string;
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileService.d.ts","sourceRoot":"","sources":["../../../../src/Services/FileService.ts"],"names":[],"mappings":"AAIA,OAAO,cAAc,EAAE,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAUvF,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAMjC,iBAAe,aAAa,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAO9D;AAqBD,iBAAe,eAAe,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"FileService.d.ts","sourceRoot":"","sources":["../../../../src/Services/FileService.ts"],"names":[],"mappings":"AAIA,OAAO,cAAc,EAAE,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAUvF,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAMjC,iBAAe,aAAa,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAO9D;AAqBD,iBAAe,eAAe,CAAC,MAAM,EAAE,MAAM,gCAQ5C;AAMD,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAA;AAEnF,iBAAS,0BAA0B,CAAC,GAAG,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,UAK9G;AA4CD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,oBAAoB,UAW7E;AAED,iBAAS,oBAAoB,CAAC,QAAQ,EAAE,MAAM,UAE7C;AAED,QAAA,MAAM,WAAW;;sBAES,cAAc,UAAU,QAAQ,YAAY,MAAM,WAAW,MAAM,cAAc,MAAM;;;;kBAM3F,cAAc,WAAW,MAAM,eAAe,MAAM;oBAuBlD,oBAAoB,cAAc,MAAM,cAAc,MAAM,eAAe,MAAM;;+BAI5E,cAAc,WAAW,MAAM;mCAG3B,oBAAoB,WAAW,MAAM;kCAGtC,cAAc,YAAY,MAAM;6BAG/B,cAAc,iBAAiB,MAAM;sBAK5C,cAAc,iBAAiB,MAAM;6BAI9B,cAAc,eAAe,MAAM;4BAGpC,oBAAoB,WAAW,MAAM,cAAc,MAAM,GAAG,MAAM;;;;;;;2BAcnE,oBAAoB,WAAW,MAAM,aAAa,MAAM,GAAG,MAAM;wBA4BpE,oBAAoB,cAAc,MAAM;4BASrD,MAAM,OACZ,cAAc,WACV,MAAM,YACL,MAAM,eACH,MAAM;sBAQG,oBAAoB,WAAW,MAAM;;CAO9D,CAAA;AAED,eAAe,WAAW,CAAA"}
|
package/dist/src/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAA;AAkCrB,OAAO,EAAE,2BAA2B,EAAoD,MAAM,wBAAwB,CAAA;AAQtH,iBAAe,MAAM,CAAC,QAAQ,UAAQ,EAAE,WAAW,CAAC,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAA;AAkCrB,OAAO,EAAE,2BAA2B,EAAoD,MAAM,wBAAwB,CAAA;AAQtH,iBAAe,MAAM,CAAC,QAAQ,UAAQ,EAAE,WAAW,CAAC,EAAE,OAAO,mTAkO5D;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { IntrospectionSchema } from '../schemas';
|
|
2
2
|
import { TFunction } from 'i18next';
|
|
3
3
|
import { FastifyReply, FastifyRequest } from 'fastify';
|
|
4
|
-
|
|
4
|
+
/** An alert type as the condition builder offers it: the id a condition compares, the name it shows. */
|
|
5
|
+
export interface AlertTypeOption {
|
|
6
|
+
id: number;
|
|
7
|
+
name: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* `alertTypes` is the catalog of alert types of the ecosystem, offered as the options of an alert's
|
|
11
|
+
* `alert_type_id`. It is data rather than schema, so the caller reads it and passes it in.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getIntrospectionSchema(t: TFunction, alertTypes?: AlertTypeOption[]): IntrospectionSchema;
|
|
5
14
|
declare const IntrospectionController: {
|
|
6
15
|
getIntrospectionSchema: (req: FastifyRequest, res: FastifyReply) => Promise<void>;
|
|
7
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntrospectionController.d.ts","sourceRoot":"","sources":["../../../../src/controllers/IntrospectionController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAgD,MAAM,aAAa,CAAA;AAM/F,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"IntrospectionController.d.ts","sourceRoot":"","sources":["../../../../src/controllers/IntrospectionController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAgD,MAAM,aAAa,CAAA;AAM/F,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAQtD,wGAAwG;AACxG,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,GAAE,eAAe,EAAO,GAAG,mBAAmB,CAsW5G;AAED,QAAA,MAAM,uBAAuB;kCACS,cAAc,OAAO,YAAY;CAMtE,CAAA;AAED,eAAe,uBAAuB,CAAA"}
|
|
@@ -42,6 +42,26 @@ export interface SortBy {
|
|
|
42
42
|
}
|
|
43
43
|
export declare const EXTERNAL_SOURCE_KEYS: readonly ["health_data_daily", "health_data_discrete"];
|
|
44
44
|
export type ExternalSourceType = (typeof EXTERNAL_SOURCE_KEYS)[number];
|
|
45
|
+
/**
|
|
46
|
+
* Datasources that stand for a table of the platform rather than a form of the project.
|
|
47
|
+
*
|
|
48
|
+
* The listing compiles its main form's conditions into a query over the **project** database,
|
|
49
|
+
* resolving every source the tree names as a crf of that project (`DesignerCrf.getDesigner`, via
|
|
50
|
+
* the join list). None of these is one: `user` and `user_profile` live in the ecosystem database,
|
|
51
|
+
* `alert` too, `health_data_*` are not a table at all but an external service, `patient_adherence`
|
|
52
|
+
* is a computed shape with no table behind it, and `process_log` is a first-class table no crf
|
|
53
|
+
* describes. A condition naming any of them therefore has nothing to compile against — see
|
|
54
|
+
* `isFilterableSource` in the `forms-data` module for what the listing does with one.
|
|
55
|
+
*
|
|
56
|
+
* `patient` is deliberately absent: it *is* a crf of the project (`displayer_patient`), so a
|
|
57
|
+
* condition on it compiles like any other form's.
|
|
58
|
+
*
|
|
59
|
+
* Kept apart from `EXTERNAL_SOURCE_KEYS`, which is a narrower statement: those two are fetched
|
|
60
|
+
* from elsewhere after pagination and still emit their own column. This list answers a different
|
|
61
|
+
* question — whether the main form's filter can constrain on the source at all.
|
|
62
|
+
*/
|
|
63
|
+
export declare const PLATFORM_TABLE_SOURCE_KEYS: readonly ["user", "user_profile", "patient_adherence", "process_log", "alert", "health_data_daily", "health_data_discrete"];
|
|
64
|
+
export type PlatformTableSourceType = (typeof PLATFORM_TABLE_SOURCE_KEYS)[number];
|
|
45
65
|
export interface FormListDataConfig {
|
|
46
66
|
fields: string[];
|
|
47
67
|
conditions?: Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PatientListProps.d.ts","sourceRoot":"","sources":["../../../../../../src/schemas/container_widget/widgetTypes/PatientListProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AACxE,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,EAC/B,4BAA4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AK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,cAAc,CAAA;IACpB,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,CAAA;AAEpD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,kBAAkB,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;CACzC;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAA;AAErC,MAAM,MAAM,sBAAsB,GAAG;IACnC,CAAC,UAAU,EAAE,gBAAgB,GAAG;QAC9B,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,CAAA;KAClC,CAAA;CACF,CAAA;AAED,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,eAAe,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB"}
|
|
1
|
+
{"version":3,"file":"PatientListProps.d.ts","sourceRoot":"","sources":["../../../../../../src/schemas/container_widget/widgetTypes/PatientListProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AACxE,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,EAC/B,4BAA4B,EAC5B,oCAAoC,EACpC,2BAA2B,EAC5B,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,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AAe,
|
|
1
|
+
{"version":3,"file":"test-helpers.d.ts","sourceRoot":"","sources":["../../../../src/test/test-helpers.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,2BAA2B,EAA6B,MAAM,wBAAwB,CAAA;AAE/F,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,eAAe,QAKxD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,IAC7B,wBAAqB,KAAG,CAAC,GAAG,SAAS,CAM9C;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,yRAI/B"}
|
package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/action-system.helper.d.ts
CHANGED
|
@@ -12,6 +12,18 @@ import { default as RequestContext, RequestContextData } from '../../../../../mo
|
|
|
12
12
|
* cannot be narrowed and stays reachable across the projects of one ecosystem; see the README.
|
|
13
13
|
*/
|
|
14
14
|
export declare function loadTriggerEntity(ctx: RequestContext, source: TriggerSource, target: string, entityId: number): Promise<Record<string, unknown> | undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* Memo of the patient rows resolved while evaluating one batch, keyed by the entity they were
|
|
17
|
+
* resolved from.
|
|
18
|
+
*
|
|
19
|
+
* Every trigger of a batch is evaluated against the same row, so without it a batch of N triggers
|
|
20
|
+
* on one alert repeats the same `user_patient` lookup and the same displayer read N times — and
|
|
21
|
+
* since `canJoinPatient` makes the admin UI prepend `patient` to any relation selection, that is
|
|
22
|
+
* the common case and not an edge one. Its lifetime is the batch: it is created by the caller and
|
|
23
|
+
* dropped with it, so a later batch never reads a row this one saw.
|
|
24
|
+
*/
|
|
25
|
+
export type PatientCache = Map<string, Record<string, unknown> | undefined>;
|
|
26
|
+
export declare function createPatientCache(): PatientCache;
|
|
15
27
|
/**
|
|
16
28
|
* Eager-loads the relations declared in `relations.join` onto `current`, each under its own name,
|
|
17
29
|
* so conditions and action payloads can reference them as `current.patient.name`.
|
|
@@ -19,11 +31,17 @@ export declare function loadTriggerEntity(ctx: RequestContext, source: TriggerSo
|
|
|
19
31
|
* The model is resolved by `resolveTargetQuery`, with the joins passed up front so a displayer
|
|
20
32
|
* target builds its model with them already in place.
|
|
21
33
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
34
|
+
* `patient` on a model source is the one name not eager-loaded: it is resolved separately against
|
|
35
|
+
* the project database (see `PATIENT_RELATION`) and merged in under the same name, so a condition
|
|
36
|
+
* reads `current.patient.x` without caring which side of the boundary the row came from.
|
|
37
|
+
*
|
|
38
|
+
* Returns `current` untouched, with a `skipped` reason, when there is nothing to load or no way to
|
|
39
|
+
* load it — including a patient that cannot be reached. The trigger is then evaluated without the
|
|
40
|
+
* relations instead of aborting the whole batch. A relation name the model does not declare is the
|
|
41
|
+
* exception: Objection throws and the error is left to propagate, which the engine records as an
|
|
42
|
+
* ERROR row for that trigger.
|
|
25
43
|
*/
|
|
26
|
-
export declare function loadRelations(ctx: RequestContext, source: TriggerSource, target: string | null | undefined, current: Record<string, unknown>, relations?: TriggerRelations | null): Promise<{
|
|
44
|
+
export declare function loadRelations(ctx: RequestContext, source: TriggerSource, target: string | null | undefined, current: Record<string, unknown>, relations?: TriggerRelations | null, patientCache?: PatientCache): Promise<{
|
|
27
45
|
current: Record<string, unknown>;
|
|
28
46
|
skipped?: string;
|
|
29
47
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-system.helper.d.ts","sourceRoot":"","sources":["../../../../../../../../src/v2/modules/ecosystem/action-system/action-system.helper/action-system.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,EACL,UAAU,EAGV,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,KAAK,cAAc,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;
|
|
1
|
+
{"version":3,"file":"action-system.helper.d.ts","sourceRoot":"","sources":["../../../../../../../../src/v2/modules/ecosystem/action-system/action-system.helper/action-system.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,EACL,UAAU,EAGV,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,KAAK,cAAc,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAgB3E,OAAO,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAiE9E;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAqB9C;AAkBD;;;;;;;;;GASG;AACH,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,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AC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAanH;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAMpG;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB,GAAG,qBAAqB,CAiBpF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,oBAAoB,EAC7B,MAAM,EAAE,gBAAgB,GAAG,SAAS,GACnC,uBAAuB,CAiCzB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,yBAAyB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAOlF"}
|
|
@@ -106,8 +106,8 @@ export declare const createActionSchema: Type.TObject<{
|
|
|
106
106
|
}>, Type.TObject<{
|
|
107
107
|
payload: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
108
108
|
}>]>]>;
|
|
109
|
-
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
110
109
|
library: Type.TOptional<Type.TBoolean>;
|
|
110
|
+
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
111
111
|
}>;
|
|
112
112
|
export type CreateActionData = Static<typeof createActionSchema>;
|
|
113
113
|
export declare const updateActionSchema: Type.TObject<{
|
|
@@ -121,8 +121,8 @@ export declare const updateActionSchema: Type.TObject<{
|
|
|
121
121
|
}>, Type.TObject<{
|
|
122
122
|
payload: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
123
123
|
}>]>]>>;
|
|
124
|
-
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
125
124
|
library: Type.TOptional<Type.TBoolean>;
|
|
125
|
+
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
126
126
|
}>;
|
|
127
127
|
export type UpdateActionData = Static<typeof updateActionSchema>;
|
|
128
128
|
export declare const triggerActionInputSchema: Type.TUnion<[Type.TNumber, Type.TObject<{
|
|
@@ -136,8 +136,8 @@ export declare const triggerActionInputSchema: Type.TUnion<[Type.TNumber, Type.T
|
|
|
136
136
|
}>, Type.TObject<{
|
|
137
137
|
payload: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
138
138
|
}>]>]>;
|
|
139
|
-
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
140
139
|
library: Type.TOptional<Type.TBoolean>;
|
|
140
|
+
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
141
141
|
}>, Type.TObject<{
|
|
142
142
|
type: Type.TOptional<Type.TEnum<"ApiAction"[]>>;
|
|
143
143
|
name: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
@@ -149,8 +149,8 @@ export declare const triggerActionInputSchema: Type.TUnion<[Type.TNumber, Type.T
|
|
|
149
149
|
}>, Type.TObject<{
|
|
150
150
|
payload: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
151
151
|
}>]>]>>;
|
|
152
|
-
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
153
152
|
library: Type.TOptional<Type.TBoolean>;
|
|
153
|
+
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
154
154
|
id: Type.TNumber;
|
|
155
155
|
}>]>;
|
|
156
156
|
export type TriggerActionInput = Static<typeof triggerActionInputSchema>;
|
|
@@ -165,8 +165,8 @@ export declare const triggerActionsInputSchema: Type.TArray<Type.TUnion<[Type.TN
|
|
|
165
165
|
}>, Type.TObject<{
|
|
166
166
|
payload: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
167
167
|
}>]>]>;
|
|
168
|
-
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
169
168
|
library: Type.TOptional<Type.TBoolean>;
|
|
169
|
+
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
170
170
|
}>, Type.TObject<{
|
|
171
171
|
type: Type.TOptional<Type.TEnum<"ApiAction"[]>>;
|
|
172
172
|
name: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
@@ -178,8 +178,8 @@ export declare const triggerActionsInputSchema: Type.TArray<Type.TUnion<[Type.TN
|
|
|
178
178
|
}>, Type.TObject<{
|
|
179
179
|
payload: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
180
180
|
}>]>]>>;
|
|
181
|
-
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
182
181
|
library: Type.TOptional<Type.TBoolean>;
|
|
182
|
+
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
183
183
|
id: Type.TNumber;
|
|
184
184
|
}>]>>;
|
|
185
185
|
export declare const automaticTriggerSchema: Type.TObject<{
|
|
@@ -224,8 +224,8 @@ export declare const createAutomaticTriggerSchema: Type.TObject<{
|
|
|
224
224
|
}>, Type.TObject<{
|
|
225
225
|
payload: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
226
226
|
}>]>]>;
|
|
227
|
-
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
228
227
|
library: Type.TOptional<Type.TBoolean>;
|
|
228
|
+
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
229
229
|
}>, Type.TObject<{
|
|
230
230
|
type: Type.TOptional<Type.TEnum<"ApiAction"[]>>;
|
|
231
231
|
name: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
@@ -237,8 +237,8 @@ export declare const createAutomaticTriggerSchema: Type.TObject<{
|
|
|
237
237
|
}>, Type.TObject<{
|
|
238
238
|
payload: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
239
239
|
}>]>]>>;
|
|
240
|
-
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
241
240
|
library: Type.TOptional<Type.TBoolean>;
|
|
241
|
+
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
242
242
|
id: Type.TNumber;
|
|
243
243
|
}>]>>>;
|
|
244
244
|
}>;
|
|
@@ -266,8 +266,8 @@ export declare const updateAutomaticTriggerSchema: Type.TObject<{
|
|
|
266
266
|
}>, Type.TObject<{
|
|
267
267
|
payload: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
268
268
|
}>]>]>;
|
|
269
|
-
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
270
269
|
library: Type.TOptional<Type.TBoolean>;
|
|
270
|
+
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
271
271
|
}>, Type.TObject<{
|
|
272
272
|
type: Type.TOptional<Type.TEnum<"ApiAction"[]>>;
|
|
273
273
|
name: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
@@ -279,8 +279,8 @@ export declare const updateAutomaticTriggerSchema: Type.TObject<{
|
|
|
279
279
|
}>, Type.TObject<{
|
|
280
280
|
payload: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
281
281
|
}>]>]>>;
|
|
282
|
-
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
283
282
|
library: Type.TOptional<Type.TBoolean>;
|
|
283
|
+
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
284
284
|
id: Type.TNumber;
|
|
285
285
|
}>]>>>;
|
|
286
286
|
}>;
|
|
@@ -431,8 +431,8 @@ export declare const createManualTriggerSchema: Type.TObject<{
|
|
|
431
431
|
}>, Type.TObject<{
|
|
432
432
|
payload: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
433
433
|
}>]>]>;
|
|
434
|
-
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
435
434
|
library: Type.TOptional<Type.TBoolean>;
|
|
435
|
+
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
436
436
|
}>, Type.TObject<{
|
|
437
437
|
type: Type.TOptional<Type.TEnum<"ApiAction"[]>>;
|
|
438
438
|
name: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
@@ -444,8 +444,8 @@ export declare const createManualTriggerSchema: Type.TObject<{
|
|
|
444
444
|
}>, Type.TObject<{
|
|
445
445
|
payload: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
446
446
|
}>]>]>>;
|
|
447
|
-
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
448
447
|
library: Type.TOptional<Type.TBoolean>;
|
|
448
|
+
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
449
449
|
id: Type.TNumber;
|
|
450
450
|
}>]>>>;
|
|
451
451
|
}>;
|
|
@@ -494,8 +494,8 @@ export declare const updateManualTriggerSchema: Type.TObject<{
|
|
|
494
494
|
}>, Type.TObject<{
|
|
495
495
|
payload: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
496
496
|
}>]>]>;
|
|
497
|
-
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
498
497
|
library: Type.TOptional<Type.TBoolean>;
|
|
498
|
+
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
499
499
|
}>, Type.TObject<{
|
|
500
500
|
type: Type.TOptional<Type.TEnum<"ApiAction"[]>>;
|
|
501
501
|
name: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
@@ -507,8 +507,8 @@ export declare const updateManualTriggerSchema: Type.TObject<{
|
|
|
507
507
|
}>, Type.TObject<{
|
|
508
508
|
payload: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
509
509
|
}>]>]>>;
|
|
510
|
-
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
511
510
|
library: Type.TOptional<Type.TBoolean>;
|
|
511
|
+
retention_days: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
512
512
|
id: Type.TNumber;
|
|
513
513
|
}>]>>>;
|
|
514
514
|
}>;
|
|
@@ -21,8 +21,8 @@ declare function listAutomaticTriggers(ctx: RequestContext, pagination: Paginate
|
|
|
21
21
|
actions?: {
|
|
22
22
|
name?: string | null | undefined;
|
|
23
23
|
project_id?: number | null | undefined;
|
|
24
|
-
retention_days?: number | null | undefined;
|
|
25
24
|
library?: boolean | undefined;
|
|
25
|
+
retention_days?: number | null | undefined;
|
|
26
26
|
id: number;
|
|
27
27
|
type: "ApiAction";
|
|
28
28
|
config: {
|
|
@@ -55,8 +55,8 @@ declare function getAutomaticTriggerById(ctx: RequestContext, id: number, includ
|
|
|
55
55
|
actions?: {
|
|
56
56
|
name?: string | null | undefined;
|
|
57
57
|
project_id?: number | null | undefined;
|
|
58
|
-
retention_days?: number | null | undefined;
|
|
59
58
|
library?: boolean | undefined;
|
|
59
|
+
retention_days?: number | null | undefined;
|
|
60
60
|
id: number;
|
|
61
61
|
type: "ApiAction";
|
|
62
62
|
config: {
|
|
@@ -73,8 +73,8 @@ declare function createAutomaticTrigger(ctx: RequestContext, data: CreateAutomat
|
|
|
73
73
|
actions: {
|
|
74
74
|
name?: string | null | undefined;
|
|
75
75
|
project_id?: number | null | undefined;
|
|
76
|
-
retention_days?: number | null | undefined;
|
|
77
76
|
library?: boolean | undefined;
|
|
77
|
+
retention_days?: number | null | undefined;
|
|
78
78
|
id: number;
|
|
79
79
|
type: "ApiAction";
|
|
80
80
|
config: {
|
|
@@ -105,8 +105,8 @@ declare function updateAutomaticTrigger(ctx: RequestContext, id: number, data: U
|
|
|
105
105
|
actions: {
|
|
106
106
|
name?: string | null | undefined;
|
|
107
107
|
project_id?: number | null | undefined;
|
|
108
|
-
retention_days?: number | null | undefined;
|
|
109
108
|
library?: boolean | undefined;
|
|
109
|
+
retention_days?: number | null | undefined;
|
|
110
110
|
id: number;
|
|
111
111
|
type: "ApiAction";
|
|
112
112
|
config: {
|
|
@@ -17,6 +17,11 @@ declare function resolveManualTriggers(ctx: RequestContext, source: TriggerSourc
|
|
|
17
17
|
* before its style is resolved — a button nobody will see does not pay for its
|
|
18
18
|
* own presentation. What survives with `matched: false` is therefore always a
|
|
19
19
|
* button shown disabled.
|
|
20
|
+
*
|
|
21
|
+
* Every trigger is evaluated against the same entity, so the patient it resolves to is
|
|
22
|
+
* memoised for the call: N buttons cost one `user_patient` read and one displayer read,
|
|
23
|
+
* not N of each. It matters more here than in a batch — this runs on every render, while
|
|
24
|
+
* a batch runs once per save. The memo lives and dies with the call.
|
|
20
25
|
*/
|
|
21
26
|
declare function listAvailable(ctx: RequestContext, query: ManualTriggerAvailabilityQuery): Promise<ManualTriggerAvailability[]>;
|
|
22
27
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manual-trigger-engine.service.d.ts","sourceRoot":"","sources":["../../../../../../../../src/v2/modules/ecosystem/action-system/action-system.service/manual-trigger-engine.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,mCAAmC,CAAA;AAInE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEtD,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAEnB,MAAM,yBAAyB,CAAA;AAOhC;;;;GAIG;AACH,iBAAe,qBAAqB,CAClC,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,aAAa,EAAE,CAAC,CAS1B;AAoBD
|
|
1
|
+
{"version":3,"file":"manual-trigger-engine.service.d.ts","sourceRoot":"","sources":["../../../../../../../../src/v2/modules/ecosystem/action-system/action-system.service/manual-trigger-engine.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,mCAAmC,CAAA;AAInE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEtD,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAEnB,MAAM,yBAAyB,CAAA;AAOhC;;;;GAIG;AACH,iBAAe,qBAAqB,CAClC,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,aAAa,EAAE,CAAC,CAS1B;AAoBD;;;;;;;;;;;;;;;GAeG;AACH,iBAAe,aAAa,CAC1B,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,8BAA8B,GACpC,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAuCtC;AAED;;;;GAIG;AACH,iBAAe,gBAAgB,CAC7B,GAAG,EAAE,cAAc,EACnB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,GAAG,GAAE,IAAiB,GACrB,OAAO,CAAC,sBAAsB,CAAC,CA8CjC;AAED,eAAO,MAAM,0BAA0B;;;;CAItC,CAAA"}
|
|
@@ -42,8 +42,8 @@ declare function listManualTriggers(ctx: RequestContext, pagination: PaginatedQu
|
|
|
42
42
|
actions?: {
|
|
43
43
|
name?: string | null | undefined;
|
|
44
44
|
project_id?: number | null | undefined;
|
|
45
|
-
retention_days?: number | null | undefined;
|
|
46
45
|
library?: boolean | undefined;
|
|
46
|
+
retention_days?: number | null | undefined;
|
|
47
47
|
id: number;
|
|
48
48
|
type: "ApiAction";
|
|
49
49
|
config: {
|
|
@@ -97,8 +97,8 @@ declare function getManualTriggerById(ctx: RequestContext, id: number, includeAc
|
|
|
97
97
|
actions?: {
|
|
98
98
|
name?: string | null | undefined;
|
|
99
99
|
project_id?: number | null | undefined;
|
|
100
|
-
retention_days?: number | null | undefined;
|
|
101
100
|
library?: boolean | undefined;
|
|
101
|
+
retention_days?: number | null | undefined;
|
|
102
102
|
id: number;
|
|
103
103
|
type: "ApiAction";
|
|
104
104
|
config: {
|
|
@@ -115,8 +115,8 @@ declare function createManualTrigger(ctx: RequestContext, data: CreateManualTrig
|
|
|
115
115
|
actions: {
|
|
116
116
|
name?: string | null | undefined;
|
|
117
117
|
project_id?: number | null | undefined;
|
|
118
|
-
retention_days?: number | null | undefined;
|
|
119
118
|
library?: boolean | undefined;
|
|
119
|
+
retention_days?: number | null | undefined;
|
|
120
120
|
id: number;
|
|
121
121
|
type: "ApiAction";
|
|
122
122
|
config: {
|
|
@@ -147,8 +147,8 @@ declare function updateManualTrigger(ctx: RequestContext, id: number, data: Upda
|
|
|
147
147
|
actions: {
|
|
148
148
|
name?: string | null | undefined;
|
|
149
149
|
project_id?: number | null | undefined;
|
|
150
|
-
retention_days?: number | null | undefined;
|
|
151
150
|
library?: boolean | undefined;
|
|
151
|
+
retention_days?: number | null | undefined;
|
|
152
152
|
id: number;
|
|
153
153
|
type: "ApiAction";
|
|
154
154
|
config: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as RequestContext } from '../../../../../models/request/RequestContext';
|
|
2
2
|
import { ApiActionContextData } from '../../../../../schemas/api_action/ApiActionTypes';
|
|
3
3
|
import { EvaluableTrigger, TriggerBatch, TriggerExecutionResult, TriggerRelations, TriggerSource } from '../action-system.schema';
|
|
4
|
+
import { PatientCache } from '../action-system.helper';
|
|
4
5
|
/**
|
|
5
6
|
* Assembles the context that conditions and action payloads are evaluated
|
|
6
7
|
* against: the trigger's declared relations are loaded onto `current` ONCE,
|
|
@@ -15,8 +16,12 @@ import { EvaluableTrigger, TriggerBatch, TriggerExecutionResult, TriggerRelation
|
|
|
15
16
|
* they are — a doctor, someone of a given clinic — and not only what the entity holds.
|
|
16
17
|
* It is part of the one context, not a second one: the conditions and the templates of
|
|
17
18
|
* an action read the same object, so neither can ever see data the other does not.
|
|
19
|
+
*
|
|
20
|
+
* `patientCache` is passed on to `loadRelations` so a batch resolves the patient of its
|
|
21
|
+
* entity once instead of once per trigger. It is optional: a caller that builds a single
|
|
22
|
+
* context has nothing to share and omits it.
|
|
18
23
|
*/
|
|
19
|
-
export declare function buildTriggerContext(ctx: RequestContext, source: TriggerSource, target: string | null | undefined, current: Record<string, unknown>, old: Record<string, unknown> | null, relations?: TriggerRelations | null): Promise<{
|
|
24
|
+
export declare function buildTriggerContext(ctx: RequestContext, source: TriggerSource, target: string | null | undefined, current: Record<string, unknown>, old: Record<string, unknown> | null, relations?: TriggerRelations | null, patientCache?: PatientCache): Promise<{
|
|
20
25
|
context: ApiActionContextData;
|
|
21
26
|
relationsSkipped?: string;
|
|
22
27
|
}>;
|
|
@@ -63,7 +68,9 @@ export declare function executeTriggerActions(ctx: RequestContext, trigger: Eval
|
|
|
63
68
|
* of the batch.
|
|
64
69
|
*
|
|
65
70
|
* `now` is threaded through the whole batch rather than read again per row, so
|
|
66
|
-
* every `expires_at` it computes shares a single timestamp.
|
|
71
|
+
* every `expires_at` it computes shares a single timestamp. The patient cache is
|
|
72
|
+
* threaded for the same reason: every trigger here evaluates against the same
|
|
73
|
+
* `batch.current`, so its patient is worth resolving once and not once per trigger.
|
|
67
74
|
*/
|
|
68
75
|
export declare function runTriggerBatch(ctx: RequestContext, batch: TriggerBatch, now: Date): Promise<TriggerExecutionResult[]>;
|
|
69
76
|
export declare const TriggerEngineService: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-engine.service.d.ts","sourceRoot":"","sources":["../../../../../../../../src/v2/modules/ecosystem/action-system/action-system.service/trigger-engine.service.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,mCAAmC,CAAA;AAQ9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAGjF,OAAO,EAKL,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"trigger-engine.service.d.ts","sourceRoot":"","sources":["../../../../../../../../src/v2/modules/ecosystem/action-system/action-system.service/trigger-engine.service.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,mCAAmC,CAAA;AAQ9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAGjF,OAAO,EAKL,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAQL,KAAK,YAAY,EAClB,MAAM,yBAAyB,CAAA;AAahC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,EACnC,SAAS,CAAC,EAAE,gBAAgB,GAAG,IAAI,EACnC,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC;IAAE,OAAO,EAAE,oBAAoB,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAavE;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,GAAG,YAAY,CAAC,GACnD,OAAO,CAAC,OAAO,CAAC,CAIlB;AA0ED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,cAAc,EACnB,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,oBAAoB,EAC7B,GAAG,EAAE,IAAI,EACT,WAAW,EAAE,yBAAyB,GACrC,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,CAqDhF;AAID;;;;;;;;;;;GAWG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,cAAc,EACnB,KAAK,EAAE,YAAY,EACnB,GAAG,EAAE,IAAI,GACR,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAqEnC;AAED,eAAO,MAAM,oBAAoB;;;;;CAKhC,CAAA"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { QueryBuilder } from 'objection';
|
|
1
2
|
import { default as RequestContext } from '../../../../models/request/RequestContext';
|
|
3
|
+
import { Alert } from './alert.model';
|
|
2
4
|
/**
|
|
3
5
|
* Permission preHandler of the write endpoints of this module (create, update, resolve). Reads go
|
|
4
6
|
* through `resolveAlertReadScope` instead, which narrows what is returned rather than refusing.
|
|
@@ -52,4 +54,18 @@ export interface AlertReadScope {
|
|
|
52
54
|
* query that enforces it (`alert.service.ts`), so each can be tested without the other.
|
|
53
55
|
*/
|
|
54
56
|
export declare function resolveAlertReadScope(ctx: RequestContext): Promise<AlertReadScope | null>;
|
|
57
|
+
/**
|
|
58
|
+
* The scoped base query every reader starts from: the alerts the request reaches, narrowed to what
|
|
59
|
+
* `scope` allows and to nothing else.
|
|
60
|
+
*
|
|
61
|
+
* It exists so no reader — the endpoints of this module, a listing whose axis is `alert` — has to
|
|
62
|
+
* restate the two narrowings, which are the security boundary of this table: `scopeToRequest` keeps
|
|
63
|
+
* a project from reading another project's alerts (they share the ecosystem database), and
|
|
64
|
+
* `applyReadScope` keeps a caller without `alerts_management` from reading alerts they are not
|
|
65
|
+
* party to. Both are module-private on purpose; this is the single supported way to reuse them.
|
|
66
|
+
*
|
|
67
|
+
* The caller adds its own clauses on top. Because both narrowings are already applied — and the
|
|
68
|
+
* scope one as a grouped `OR` — anything the caller adds can only narrow the result further.
|
|
69
|
+
*/
|
|
70
|
+
export declare function scopedQuery(ctx: RequestContext, scope: AlertReadScope | null): QueryBuilder<Alert, Alert[]>;
|
|
55
71
|
//# sourceMappingURL=alert.helper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.helper.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/ecosystem/alert/alert.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,mCAAmC,CAAA;
|
|
1
|
+
{"version":3,"file":"alert.helper.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/ecosystem/alert/alert.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,cAAc,MAAM,mCAAmC,CAAA;AAInE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAErC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB,0DAGnC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAA;IACjB;;;;OAIG;IACH,UAAU,EAAE,MAAM,EAAE,CAAA;CACrB;AAsBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAO/F;AAyCD;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI,GAAG,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAI3G"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { default as Objection } from 'objection';
|
|
2
2
|
import { default as BaseModel } from '../../../../models/BaseModel';
|
|
3
3
|
import { default as RequestContext } from '../../../../models/request/RequestContext';
|
|
4
|
+
import { default as User } from '../../../../models/ecosystem/User';
|
|
5
|
+
import { default as Project } from '../../../../models/ecosystem/Project';
|
|
6
|
+
import { default as UserPatient } from '../../../../models/ecosystem/UserPatient';
|
|
4
7
|
import { TypedQueryBuilder } from '../../global/objection';
|
|
8
|
+
import { AlertType } from '../alert-type';
|
|
5
9
|
import { AlertData, AlertEmitterData, AlertEntityRefData, AlertSeverity, AlertStatus } from './alert.schema';
|
|
6
10
|
/**
|
|
7
11
|
* What the write methods accept, which is not quite a row.
|
|
@@ -39,9 +43,47 @@ export declare class Alert extends BaseModel implements AlertData {
|
|
|
39
43
|
created_user?: number | null;
|
|
40
44
|
created_at?: string;
|
|
41
45
|
mod_time?: string;
|
|
46
|
+
user?: User | null;
|
|
47
|
+
alert_type?: AlertType | null;
|
|
48
|
+
project?: Project | null;
|
|
49
|
+
user_patients?: UserPatient[];
|
|
42
50
|
static tableName: string;
|
|
43
51
|
static jsonAttributes: string[];
|
|
44
52
|
static jsonSchema: Objection.JSONSchema;
|
|
53
|
+
static get relationMappings(): {
|
|
54
|
+
user: {
|
|
55
|
+
relation: Objection.RelationType;
|
|
56
|
+
modelClass: typeof User;
|
|
57
|
+
join: {
|
|
58
|
+
from: string;
|
|
59
|
+
to: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
alert_type: {
|
|
63
|
+
relation: Objection.RelationType;
|
|
64
|
+
modelClass: typeof AlertType;
|
|
65
|
+
join: {
|
|
66
|
+
from: string;
|
|
67
|
+
to: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
project: {
|
|
71
|
+
relation: Objection.RelationType;
|
|
72
|
+
modelClass: typeof Project;
|
|
73
|
+
join: {
|
|
74
|
+
from: string;
|
|
75
|
+
to: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
user_patients: {
|
|
79
|
+
relation: Objection.RelationType;
|
|
80
|
+
modelClass: typeof UserPatient;
|
|
81
|
+
join: {
|
|
82
|
+
from: string;
|
|
83
|
+
to: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
45
87
|
static QueryBuilder: typeof Objection.QueryBuilder;
|
|
46
88
|
static query(): TypedQueryBuilder<Alert, typeof Alert, never>;
|
|
47
89
|
static getModel(ctx: RequestContext): typeof Alert;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/ecosystem/alert/alert.model.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"alert.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/ecosystem/alert/alert.model.ts"],"names":[],"mappings":"AAAA,OAAO,SAAkC,MAAM,WAAW,CAAA;AAC1D,OAAO,SAAS,MAAM,sBAAsB,CAAA;AAC5C,OAAO,cAAc,MAAM,mCAAmC,CAAA;AAG9D,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAC5C,OAAO,OAAO,MAAM,8BAA8B,CAAA;AAClD,OAAO,WAAW,MAAM,kCAAkC,CAAA;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAG9D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAC1D,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAA;AAUvB;;;;;;;;GAQG;AACH,KAAK,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC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IAC5B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IAIjB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IAClB,UAAU,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IAC7B,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IACxB,aAAa,CAAC,EAAE,WAAW,EAAE,CAAA;IAE7B,MAAM,CAAC,SAAS,SAAU;IAK1B,MAAM,CAAC,cAAc,WAAuE;IAS5F,MAAM,CAAC,UAAU,uBAA0C;IAgB3D,MAAM,KAAK,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmC1B;IAED,MAAM,CAAC,YAAY,gCAAyC;IAE5D,MAAM,CAAC,KAAK;IAIZ,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,cAAc;IAInC,MAAM,CAAC,cAAc,CAAC,aAAa,EAAE,SAAS,CAAC,iBAAiB;IAIhE;;;;;;;;OAQG;WACU,MAAM,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,CAAC,EAAE,SAAS,CAAC,iBAAiB;IAWhG;;;;;;;;;;;OAWG;WACU,KAAK,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM;CAqBzE"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { default as RequestContext } from '../../../../../models/request/RequestContext';
|
|
2
|
+
import { ContainerWidget, FormListDataConfig, WidgetType } from '../../../../../schemas';
|
|
3
|
+
import { PaginatedQuery } from '../../../global/pagination';
|
|
4
|
+
import { AssociatedSources } from '../../../project/forms-data';
|
|
5
|
+
interface AlertListingInput {
|
|
6
|
+
widget: ContainerWidget<WidgetType.FORMS_LIST>;
|
|
7
|
+
projectId: number;
|
|
8
|
+
mainFormKey: string;
|
|
9
|
+
config: FormListDataConfig;
|
|
10
|
+
/** Loaded for the patient of each alert: forms of the project and `health_data_*`. */
|
|
11
|
+
associatedSources: AssociatedSources;
|
|
12
|
+
/** Configured alongside the axis but not loadable by patient (platform tables): logged and left out. */
|
|
13
|
+
ignoredSourceKeys: string[];
|
|
14
|
+
paramValues: Record<string, unknown>;
|
|
15
|
+
pagination: PaginatedQuery;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Serves a listing whose rows are alerts.
|
|
19
|
+
*
|
|
20
|
+
* It is a path of its own rather than a branch of the crf one, because from the moment the axis is
|
|
21
|
+
* resolved the two share nothing: that one builds a displayer model over the project pool, keys its
|
|
22
|
+
* rows by patient and pages through `FormService`. Here the axis is a table of the **ecosystem**
|
|
23
|
+
* database, a row is an alert, and paging is the ordinary `paginateQuery` — the same shape
|
|
24
|
+
* `ProcessLogService.list` already uses over that pool.
|
|
25
|
+
*
|
|
26
|
+
* **No query crosses a database.** The axis, its relations and the conditions over them all live in
|
|
27
|
+
* the ecosystem database and compile into one query there. The associated sources come afterwards,
|
|
28
|
+
* in queries of their own over the project database, keyed by the `patient_id` of the alerts of the
|
|
29
|
+
* page — the same way the crf axis loads them for the patient of each of its rows.
|
|
30
|
+
*
|
|
31
|
+
* **Associated sources fill a row, they never narrow the listing.** An alert without a patient, or
|
|
32
|
+
* with one its reader cannot see in the project, keeps its row with those sources empty. Their own
|
|
33
|
+
* conditions narrow what they load, as on the crf axis.
|
|
34
|
+
*
|
|
35
|
+
* **The whole row travels.** Every column of `alert` is returned, JSON ones included: what a client
|
|
36
|
+
* does with a document in a table cell is the client's to decide, and withholding columns here
|
|
37
|
+
* would only make the listing lie about what an alert is.
|
|
38
|
+
*
|
|
39
|
+
* Rows come out flat, keyed `<sourceKey>.<column>`, which is the shape the listing's table already
|
|
40
|
+
* paints for a crf axis — so the front needs no change to render this.
|
|
41
|
+
*/
|
|
42
|
+
declare function get(ctx: RequestContext, input: AlertListingInput): Promise<{
|
|
43
|
+
results: any[];
|
|
44
|
+
total: number;
|
|
45
|
+
}>;
|
|
46
|
+
/** Whether a listing configuration puts `alert` at the axis. */
|
|
47
|
+
export declare function isAlertAxis(mainFormBaseName: string): boolean;
|
|
48
|
+
export declare const AlertListingService: {
|
|
49
|
+
get: typeof get;
|
|
50
|
+
};
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=alert-listing.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-listing.service.d.ts","sourceRoot":"","sources":["../../../../../../../../src/v2/modules/ecosystem/alert/alert.service/alert-listing.service.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,MAAM,mCAAmC,CAAA;AAI9D,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAU,UAAU,EAAE,MAAM,aAAa,CAAA;AAC1F,OAAO,EAAE,cAAc,EAAiB,MAAM,6BAA6B,CAAA;AAE3E,OAAO,EACL,iBAAiB,EAIlB,MAAM,8BAA8B,CAAA;AAgErC,UAAU,iBAAiB;IACzB,MAAM,EAAE,eAAe,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;IAC9C,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,kBAAkB,CAAA;IAC1B,sFAAsF;IACtF,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,wGAAwG;IACxG,iBAAiB,EAAE,MAAM,EAAE,CAAA;IAC3B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpC,UAAU,EAAE,cAAc,CAAA;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,iBAAe,GAAG,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,iBAAiB;;;GA+E/D;AAED,gEAAgE;AAChE,wBAAgB,WAAW,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED,eAAO,MAAM,mBAAmB;;CAE/B,CAAA"}
|