@persei/perseed-api 5.0.21 → 5.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/client.cjs +678 -37
  2. package/dist/client.cjs.map +1 -1
  3. package/dist/client.mjs +678 -37
  4. package/dist/client.mjs.map +1 -1
  5. package/dist/{lib-CDM5aEJG.cjs → dates.helper-CDM5aEJG.cjs} +1 -1
  6. package/dist/dates.helper-CDM5aEJG.cjs.map +1 -0
  7. package/dist/{lib-XRCJ_UAQ.js → dates.helper-XRCJ_UAQ.js} +1 -1
  8. package/dist/dates.helper-XRCJ_UAQ.js.map +1 -0
  9. package/dist/ecosystem-action-system.cjs +42 -32
  10. package/dist/ecosystem-action-system.cjs.map +1 -1
  11. package/dist/ecosystem-action-system.mjs +42 -32
  12. package/dist/ecosystem-action-system.mjs.map +1 -1
  13. package/dist/ecosystem-container-widget.cjs +6 -6
  14. package/dist/ecosystem-container-widget.cjs.map +1 -1
  15. package/dist/ecosystem-container-widget.mjs +1 -1
  16. package/dist/global-dates.cjs +9 -3
  17. package/dist/global-dates.cjs.map +1 -1
  18. package/dist/global-dates.mjs +7 -1
  19. package/dist/global-dates.mjs.map +1 -1
  20. package/dist/lib/src/generated/client.d.ts +5338 -879
  21. package/dist/lib/src/generated/client.d.ts.map +1 -1
  22. package/dist/src/Services/TriggerService.d.ts.map +1 -1
  23. package/dist/src/config/apiPublicKey.d.ts +19 -4
  24. package/dist/src/config/apiPublicKey.d.ts.map +1 -1
  25. package/dist/src/config/apiPublicKey.test.d.ts +2 -0
  26. package/dist/src/config/apiPublicKey.test.d.ts.map +1 -0
  27. package/dist/src/constants/SeedPrivilege.d.ts +1 -0
  28. package/dist/src/constants/SeedPrivilege.d.ts.map +1 -1
  29. package/dist/src/controllers/IntrospectionController.d.ts.map +1 -1
  30. package/dist/src/controllers/UserController.d.ts.map +1 -1
  31. package/dist/src/schemas/container_widget/create_widget_payload.schema.json +1 -1
  32. package/dist/src/schemas/container_widget/update_widget_payload.schema.json +1 -1
  33. package/dist/src/schemas/container_widget/widgetTypes/PatientListProps.d.ts +2 -1
  34. package/dist/src/schemas/container_widget/widgetTypes/PatientListProps.d.ts.map +1 -1
  35. package/dist/src/test/e2e-permissions.d.ts +32 -3
  36. package/dist/src/test/e2e-permissions.d.ts.map +1 -1
  37. package/dist/src/test/test-helpers.d.ts +12 -0
  38. package/dist/src/test/test-helpers.d.ts.map +1 -1
  39. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/action-system.helper.d.ts +1 -1
  40. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/action-system.helper.d.ts.map +1 -1
  41. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/manual-trigger.helper.d.ts.map +1 -1
  42. package/dist/src/v2/modules/ecosystem/action-system/action-system.model.d.ts +5 -2
  43. package/dist/src/v2/modules/ecosystem/action-system/action-system.model.d.ts.map +1 -1
  44. package/dist/src/v2/modules/ecosystem/action-system/action-system.model.test.d.ts +2 -0
  45. package/dist/src/v2/modules/ecosystem/action-system/action-system.model.test.d.ts.map +1 -0
  46. package/dist/src/v2/modules/ecosystem/action-system/action-system.schema.d.ts +69 -58
  47. package/dist/src/v2/modules/ecosystem/action-system/action-system.schema.d.ts.map +1 -1
  48. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/automatic-trigger.service.d.ts +14 -6
  49. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/automatic-trigger.service.d.ts.map +1 -1
  50. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/manual-trigger.service.d.ts +18 -10
  51. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/manual-trigger.service.d.ts.map +1 -1
  52. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/trigger-engine.service.d.ts +1 -0
  53. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/trigger-engine.service.d.ts.map +1 -1
  54. package/dist/src/v2/modules/ecosystem/alert/alert.controller.d.ts +12 -0
  55. package/dist/src/v2/modules/ecosystem/alert/alert.controller.d.ts.map +1 -0
  56. package/dist/src/v2/modules/ecosystem/alert/alert.controller.e2e.d.ts +2 -0
  57. package/dist/src/v2/modules/ecosystem/alert/alert.controller.e2e.d.ts.map +1 -0
  58. package/dist/src/v2/modules/ecosystem/alert/alert.controller.test.d.ts +2 -0
  59. package/dist/src/v2/modules/ecosystem/alert/alert.controller.test.d.ts.map +1 -0
  60. package/dist/src/v2/modules/ecosystem/alert/alert.helper.d.ts +55 -0
  61. package/dist/src/v2/modules/ecosystem/alert/alert.helper.d.ts.map +1 -0
  62. package/dist/src/v2/modules/ecosystem/alert/alert.helper.test.d.ts +2 -0
  63. package/dist/src/v2/modules/ecosystem/alert/alert.helper.test.d.ts.map +1 -0
  64. package/dist/src/v2/modules/ecosystem/alert/alert.model.d.ts +61 -0
  65. package/dist/src/v2/modules/ecosystem/alert/alert.model.d.ts.map +1 -0
  66. package/dist/src/v2/modules/ecosystem/alert/alert.model.test.d.ts +2 -0
  67. package/dist/src/v2/modules/ecosystem/alert/alert.model.test.d.ts.map +1 -0
  68. package/dist/src/v2/modules/ecosystem/alert/alert.schema.d.ts +134 -0
  69. package/dist/src/v2/modules/ecosystem/alert/alert.schema.d.ts.map +1 -0
  70. package/dist/src/v2/modules/ecosystem/alert/alert.service.d.ts +73 -0
  71. package/dist/src/v2/modules/ecosystem/alert/alert.service.d.ts.map +1 -0
  72. package/dist/src/v2/modules/ecosystem/alert/alert.service.test.d.ts +2 -0
  73. package/dist/src/v2/modules/ecosystem/alert/alert.service.test.d.ts.map +1 -0
  74. package/dist/src/v2/modules/ecosystem/alert/index.d.ts +7 -0
  75. package/dist/src/v2/modules/ecosystem/alert/index.d.ts.map +1 -0
  76. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.controller.d.ts +6 -0
  77. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.controller.d.ts.map +1 -0
  78. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.controller.e2e.d.ts +2 -0
  79. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.controller.e2e.d.ts.map +1 -0
  80. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.controller.test.d.ts +2 -0
  81. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.controller.test.d.ts.map +1 -0
  82. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.helper.d.ts +14 -0
  83. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.helper.d.ts.map +1 -0
  84. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.helper.test.d.ts +2 -0
  85. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.helper.test.d.ts.map +1 -0
  86. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.model.d.ts +18 -0
  87. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.model.d.ts.map +1 -0
  88. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.schema.d.ts +29 -0
  89. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.schema.d.ts.map +1 -0
  90. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.service.d.ts +38 -0
  91. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.service.d.ts.map +1 -0
  92. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.service.test.d.ts +2 -0
  93. package/dist/src/v2/modules/ecosystem/alert-type/alert-type.service.test.d.ts.map +1 -0
  94. package/dist/src/v2/modules/ecosystem/alert-type/index.d.ts +6 -0
  95. package/dist/src/v2/modules/ecosystem/alert-type/index.d.ts.map +1 -0
  96. package/dist/src/v2/modules/global/auth-token/auth-token.controller.d.ts.map +1 -1
  97. package/dist/src/v2/modules/global/dates/dates.helper.d.ts.map +1 -1
  98. package/dist/src/v2/modules/global/dates/dates.schema.d.ts +39 -0
  99. package/dist/src/v2/modules/global/dates/dates.schema.d.ts.map +1 -1
  100. package/dist/src/v2/modules/global/permissions/index.d.ts +2 -0
  101. package/dist/src/v2/modules/global/permissions/index.d.ts.map +1 -0
  102. package/dist/src/v2/modules/global/permissions/permissions.helper.d.ts +32 -0
  103. package/dist/src/v2/modules/global/permissions/permissions.helper.d.ts.map +1 -0
  104. package/dist/src/v2/modules/global/permissions/permissions.helper.test.d.ts +2 -0
  105. package/dist/src/v2/modules/global/permissions/permissions.helper.test.d.ts.map +1 -0
  106. package/dist/src/v2/routes/v2/ecosystem/_ecosystemName/alert/index.d.ts +3 -0
  107. package/dist/src/v2/routes/v2/ecosystem/_ecosystemName/alert/index.d.ts.map +1 -0
  108. package/dist/src/v2/routes/v2/ecosystem/_ecosystemName/alert-type/index.d.ts +3 -0
  109. package/dist/src/v2/routes/v2/ecosystem/_ecosystemName/alert-type/index.d.ts.map +1 -0
  110. package/dist/src/v2/routes/v2/ecosystem/_ecosystemName/project/_projectName/alert/index.d.ts +3 -0
  111. package/dist/src/v2/routes/v2/ecosystem/_ecosystemName/project/_projectName/alert/index.d.ts.map +1 -0
  112. package/dist/v1/perseed-api.cjs +2 -0
  113. package/dist/v1/perseed-api.cjs.map +1 -1
  114. package/dist/v1/perseed-api.mjs +2 -0
  115. package/dist/v1/perseed-api.mjs.map +1 -1
  116. package/package.json +1 -1
  117. package/dist/lib-CDM5aEJG.cjs.map +0 -1
  118. package/dist/lib-XRCJ_UAQ.js.map +0 -1
  119. package/dist/src/test/global-setup.d.ts +0 -2
  120. package/dist/src/test/global-setup.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-type.helper.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/ecosystem/alert-type/alert-type.helper.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ import { default as Objection } from 'objection';
2
+ import { default as BaseModel } from '../../../../models/BaseModel';
3
+ import { default as RequestContext } from '../../../../models/request/RequestContext';
4
+ import { TypedQueryBuilder } from '../../global/objection';
5
+ import { AlertTypeData } from './alert-type.schema';
6
+ export declare class AlertType extends BaseModel implements AlertTypeData {
7
+ name: string;
8
+ description?: string | null;
9
+ created_user?: number | null;
10
+ created_at?: string;
11
+ mod_time?: string;
12
+ static tableName: string;
13
+ static jsonSchema: Objection.JSONSchema;
14
+ static QueryBuilder: typeof Objection.QueryBuilder;
15
+ static query(): TypedQueryBuilder<AlertType, typeof AlertType, never>;
16
+ static getModel(ctx: RequestContext): typeof AlertType;
17
+ }
18
+ //# sourceMappingURL=alert-type.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-type.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/ecosystem/alert-type/alert-type.model.ts"],"names":[],"mappings":"AAAA,OAAO,SAA2B,MAAM,WAAW,CAAA;AACnD,OAAO,SAAS,MAAM,sBAAsB,CAAA;AAC5C,OAAO,cAAc,MAAM,mCAAmC,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAG9D,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAMzE,qBAAa,SAAU,SAAQ,SAAU,YAAW,aAAa;IAC/D,IAAI,EAAG,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,MAAM,CAAC,SAAS,SAAe;IAK/B,MAAM,CAAC,UAAU,EAA+C,SAAS,CAAC,UAAU,CAAA;IAEpF,MAAM,CAAC,YAAY,gCAAyC;IAE5D,MAAM,CAAC,KAAK;IAIZ,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,cAAc;CAGpC"}
@@ -0,0 +1,29 @@
1
+ import { Type, Static } from 'typebox';
2
+ export declare const alertTypeSchema: Type.TObject<{
3
+ id: Type.TNumber;
4
+ name: Type.TString;
5
+ description: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
6
+ created_user: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
7
+ created_at: Type.TOptional<Type.TString>;
8
+ mod_time: Type.TOptional<Type.TString>;
9
+ }>;
10
+ export type AlertTypeData = Static<typeof alertTypeSchema>;
11
+ export declare const createAlertTypeSchema: Type.TObject<{
12
+ name: Type.TString;
13
+ description: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
14
+ }>;
15
+ export type CreateAlertTypeData = Static<typeof createAlertTypeSchema>;
16
+ export declare const updateAlertTypeSchema: Type.TObject<{
17
+ name: Type.TOptional<Type.TString>;
18
+ description: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
19
+ }>;
20
+ export type UpdateAlertTypeData = Static<typeof updateAlertTypeSchema>;
21
+ export declare const alertTypeWithIdParamsSchema: Type.TIntersect<[Type.TObject<{
22
+ ecosystemName: Type.TString;
23
+ }>, Type.TObject<{
24
+ id: Type.TNumber;
25
+ }>]>;
26
+ export declare const alertTypeSuccessResponseSchema: Type.TObject<{
27
+ success: Type.TBoolean;
28
+ }>;
29
+ //# sourceMappingURL=alert-type.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-type.schema.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/ecosystem/alert-type/alert-type.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAWtC,eAAO,MAAM,eAAe;;;;;;;EAc3B,CAAA;AACD,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC,CAAA;AAM1D,eAAO,MAAM,qBAAqB;;;EAMjC,CAAA;AACD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAGtE,eAAO,MAAM,qBAAqB;;;EAIhC,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEtE,eAAO,MAAM,2BAA2B;;;;IAGvC,CAAA;AAED,eAAO,MAAM,8BAA8B;;EAG1C,CAAA"}
@@ -0,0 +1,38 @@
1
+ import { default as RequestContext } from '../../../../models/request/RequestContext';
2
+ import { PaginatedQuery } from '../../global/pagination';
3
+ import { AlertType } from './alert-type.model';
4
+ import { CreateAlertTypeData, UpdateAlertTypeData } from './alert-type.schema';
5
+ /**
6
+ * Lists the alert types of the ecosystem, by name.
7
+ *
8
+ * No project scoping anywhere in this service, unlike `alert.service.ts`: the catalog is
9
+ * ecosystem-wide by design, so every row is in scope for every caller of the ecosystem.
10
+ */
11
+ declare function listAlertTypes(ctx: RequestContext, pagination: PaginatedQuery): Promise<import('objection').Page<AlertType>>;
12
+ declare function getAlertTypeById(ctx: RequestContext, id: number): Promise<AlertType | undefined>;
13
+ /**
14
+ * Creates a type.
15
+ *
16
+ * The name is not unique: two types may share it. What identifies a type is its id, which is what
17
+ * `alert.alert_type_id` stores, so a repeated name classifies alerts under distinct types and does
18
+ * not merge them.
19
+ */
20
+ declare function createAlertType(ctx: RequestContext, data: CreateAlertTypeData): Promise<AlertType>;
21
+ declare function updateAlertType(ctx: RequestContext, id: number, data: UpdateAlertTypeData): Promise<AlertType>;
22
+ /**
23
+ * Deletes a type. The `alert.alert_type_id` foreign key is `ON DELETE SET NULL`, so the alerts of a
24
+ * deleted type survive as unclassified rather than disappearing with it — an alert carries clinical
25
+ * data and must not be removed as a side effect of tidying up a catalog.
26
+ */
27
+ declare function deleteAlertType(ctx: RequestContext, id: number): Promise<{
28
+ success: boolean;
29
+ }>;
30
+ export declare const AlertTypeService: {
31
+ list: typeof listAlertTypes;
32
+ getById: typeof getAlertTypeById;
33
+ create: typeof createAlertType;
34
+ update: typeof updateAlertType;
35
+ delete: typeof deleteAlertType;
36
+ };
37
+ export {};
38
+ //# sourceMappingURL=alert-type.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-type.service.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/ecosystem/alert-type/alert-type.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,mCAAmC,CAAA;AAGnE,OAAO,EAAE,cAAc,EAAiB,MAAM,6BAA6B,CAAA;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAEnF;;;;;GAKG;AACH,iBAAe,cAAc,CAAC,GAAG,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,gDAE5E;AAED,iBAAe,gBAAgB,CAAC,GAAG,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,kCAE9D;AAED;;;;;;GAMG;AACH,iBAAe,eAAe,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,mBAAmB,sBAI5E;AAED,iBAAe,eAAe,CAAC,GAAG,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,sBAQxF;AAED;;;;GAIG;AACH,iBAAe,eAAe,CAAC,GAAG,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM;;GAO7D;AAED,eAAO,MAAM,gBAAgB;;;;;;CAM5B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=alert-type.service.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-type.service.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/ecosystem/alert-type/alert-type.service.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export { AlertTypeService } from './alert-type.service';
2
+ export { AlertType } from './alert-type.model';
3
+ export { AlertTypeController } from './alert-type.controller';
4
+ export { requireAlertTypeAdmin } from './alert-type.helper';
5
+ export type { AlertTypeData, CreateAlertTypeData, UpdateAlertTypeData } from './alert-type.schema';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/ecosystem/alert-type/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"auth-token.controller.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/global/auth-token/auth-token.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIxC,iBAAe,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,gBAItD;AAED,iBAAe,cAAc,CAAC,GAAG,EAAE,cAAc,iBAyEhD;AAED,eAAO,MAAM,mBAAmB;;;CAG/B,CAAA"}
1
+ {"version":3,"file":"auth-token.controller.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/global/auth-token/auth-token.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAMxC,iBAAe,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,gBAItD;AAED,iBAAe,cAAc,CAAC,GAAG,EAAE,cAAc,iBAwFhD;AAED,eAAO,MAAM,mBAAmB;;;CAG/B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"dates.helper.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/global/dates/dates.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAmBhD,eAAO,MAAM,kBAAkB,IAAI,CAAA;AAGnC,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,KAAK,CAAC,KAAK,CAEhE;AAQD;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,UAAU,EAChB,SAAS,GAAE,MAA2B,EACtC,GAAG,UAAQ,GACV,MAAM,CAQR;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,UAAQ,GAAG,MAAM,CAEhG"}
1
+ {"version":3,"file":"dates.helper.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/global/dates/dates.helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAmBhD,eAAO,MAAM,kBAAkB,IAAI,CAAA;AAGnC,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,KAAK,CAAC,KAAK,CAEhE;AAQD;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,UAAU,EAChB,SAAS,GAAE,MAA2B,EACtC,GAAG,UAAQ,GACV,MAAM,CAQR;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,UAAQ,GAAG,MAAM,CAEhG"}
@@ -4,4 +4,43 @@
4
4
  * widget's `TrendWindowUnit`) build it on top of this one, so the set of units is defined once here.
5
5
  */
6
6
  export type PeriodUnit = 'hour' | 'day' | 'week' | 'month';
7
+ /**
8
+ * Datetimes a request carries are declared with `format: 'date-time'` (RFC 3339): a date and a time
9
+ * separated by `T`, an optional fraction, and a mandatory offset (`Z` or `±HH:MM`). The offset names
10
+ * the instant; the service converts it to UTC for the column.
11
+ *
12
+ * The format is TypeBox's, not `ajv-formats`': routes compile through `TypeBoxValidatorCompiler`
13
+ * (`app.ts`), and `ajv-formats` only validates the v1/Objection layer. Which one runs matters,
14
+ * because TypeBox's is the stricter of the two and the difference is visible from outside:
15
+ *
16
+ * - It splits the value on `/T/i` alone, so `T`/`t` is the only separator — a space is a 400.
17
+ * - Its offset is `(?:Z|([+-])(\d\d):(\d\d))?`, so the minutes are not optional: `+01` is a 400,
18
+ * and so is `+0100` without the colon. That is what keeps `dayjs.utc()` from ever seeing an
19
+ * hour-only offset, which it cannot read — it would fall back to parsing the value as a bare wall
20
+ * clock and drop the offset, storing an instant an hour off with no error.
21
+ * - It bounds the offset to `±23:59` (`tzH > 23 || tzM > 59`), so `+99:99` is a 400, and it checks
22
+ * the calendar (`IsDate`, leap years included), so `2026-02-31T00:00:00Z` is a 400 before any
23
+ * handler runs. The bound is RFC 3339's and not the tz database's, so it also takes offsets no
24
+ * zone uses (`-14:00`, `+23:59`) — each still names one unambiguous instant, so what gets stored
25
+ * is right.
26
+ *
27
+ * A `pattern` alongside the format would be dead weight: everything one could reasonably spell in it
28
+ * is already a subset of what the format checks, and a stricter one drifts silently the day either
29
+ * side changes. This was tried and removed (persei/tasks#294).
30
+ *
31
+ * This is that contract in one sentence, for the description of a request field: what the format
32
+ * takes and, just as important, the two near-miss spellings a client is likely to try.
33
+ */
34
+ export declare const API_DATETIME_ACCEPTED_NOTE = "Only this spelling is accepted: `T` as the separator (a space is a 400) and an offset with minutes, either `Z` or `\u00B1HH:MM` (`+01` and `+0100` are a 400). A lowercase `t`/`z` and a fractional second are fine";
35
+ /** An RFC 3339 datetime, for schema examples and API documentation. */
36
+ export declare const API_DATETIME_EXAMPLE = "2026-01-15T10:30:00Z";
37
+ /**
38
+ * What a datetime *coming out* of the API looks like, for the description of a response field.
39
+ *
40
+ * The outbound shape is narrower than the inbound one and no pattern states it: datetimes leave the
41
+ * column as `Date` and are serialised by `fast-json-stringify` with `.toISOString()`, so the schema
42
+ * never validates what is emitted. Saying it in the description is what puts it in the published
43
+ * spec, which is where a client reads the contract from.
44
+ */
45
+ export declare const EMITTED_DATETIME_NOTE = "Emitted as ISO-8601 in UTC";
7
46
  //# sourceMappingURL=dates.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dates.schema.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/global/dates/dates.schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAA"}
1
+ {"version":3,"file":"dates.schema.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/global/dates/dates.schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAA;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,0BAA0B,wNAC2K,CAAA;AAElN,uEAAuE;AACvE,eAAO,MAAM,oBAAoB,yBAAyB,CAAA;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,+BAA+B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './permissions.helper';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/global/permissions/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA"}
@@ -0,0 +1,32 @@
1
+ import { FastifyRequest } from 'fastify';
2
+ import { default as RequestContext } from '../../../../models/request/RequestContext';
3
+ import { SEED_PRIVILEGES } from '../../../../constants';
4
+ /** Whether the caller holds the ecosystem or platform administrator role. */
5
+ export declare function isAdmin(ctx: RequestContext): boolean;
6
+ /**
7
+ * Whether the caller holds `privilege`, with the administrator role standing in for it.
8
+ *
9
+ * Seed privileges are granted per profiling and a profiling belongs to a project
10
+ * (`user_profiling.project_id`), so `User.checkPermission` looks the privilege up in the profiling
11
+ * of `ctx.projectId`. An ecosystem or platform administrator has no profiling row in the project,
12
+ * so that lookup finds nothing for them however the privilege is assigned — the grant is not merely
13
+ * missing, it is unassignable. Without the role check an administrator is refused a capability
14
+ * nobody can give them.
15
+ *
16
+ * The same shape as `requireTriggersManagement`
17
+ * (`src/v2/modules/ecosystem/action-system/action-system.helper/action-system.helper.ts`) and as
18
+ * every other capability check of the user model.
19
+ *
20
+ * Requests with no project reach this too — the ecosystem-level mounts — and there the privilege
21
+ * lookup has no row to read for anyone, so the role is the only thing left to gate on.
22
+ */
23
+ export declare function hasPrivilege(ctx: RequestContext, privilege: SEED_PRIVILEGES): boolean;
24
+ /**
25
+ * Builds a `preHandler` that answers 403 with `getMessage` unless `check` passes.
26
+ *
27
+ * The message is a function rather than a string because it is resolved per request: `ctx.t` is the
28
+ * translator of that request, so building the message eagerly would fix one language for the whole
29
+ * process.
30
+ */
31
+ export declare function requirePermission(check: (ctx: RequestContext) => boolean, getMessage: (ctx: RequestContext) => string): (req: FastifyRequest) => Promise<void>;
32
+ //# sourceMappingURL=permissions.helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.helper.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/global/permissions/permissions.helper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,cAAc,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD,6EAA6E;AAC7E,wBAAgB,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAEpD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,GAAG,OAAO,CAKrF;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,EACvC,UAAU,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,MAAM,IAEf,KAAK,cAAc,KAAG,OAAO,CAAC,IAAI,CAAC,CAKhE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=permissions.helper.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.helper.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/v2/modules/global/permissions/permissions.helper.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ declare const _default: import('@fastify/type-provider-typebox').FastifyPluginAsyncTypebox;
2
+ export default _default;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/v2/routes/v2/ecosystem/_ecosystemName/alert/index.ts"],"names":[],"mappings":";AAEA,wBAAmD"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import('@fastify/type-provider-typebox').FastifyPluginAsyncTypebox;
2
+ export default _default;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/v2/routes/v2/ecosystem/_ecosystemName/alert-type/index.ts"],"names":[],"mappings":";AAEA,wBAAkD"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import('@fastify/type-provider-typebox').FastifyPluginAsyncTypebox;
2
+ export default _default;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../src/v2/routes/v2/ecosystem/_ecosystemName/project/_projectName/alert/index.ts"],"names":[],"mappings":";AAEA,wBAA0C"}
@@ -724,6 +724,7 @@ const SEED_PRIVILEGE = {
724
724
  DISPLAY_PATIENT_LIST: "advanced_patient_list",
725
725
  EXPORT_CONFIGURATION_EXPLICIT_ACCESS: "export_configurations_explicit_access_only",
726
726
  TRIGGERS_MANAGEMENT: "triggers_management",
727
+ ALERTS_MANAGEMENT: "alerts_management",
727
728
  DASHBOARD_SETTINGS_MANAGEMENT: "dashboard_settings_manage_all",
728
729
  DASHBOARD_SETTINGS_OWN_MANAGEMENT: "dashboard_settings_manage_own",
729
730
  DASHBOARD_SETTINGS_READ_ONLY: "dashboard_settings_read_only",
@@ -1268,6 +1269,7 @@ var PresentationWidget = /* @__PURE__ */ ((PresentationWidget2) => {
1268
1269
  PresentationWidget2["REPEATABLE_FIELD"] = "repeatable_field";
1269
1270
  PresentationWidget2["LINK"] = "link";
1270
1271
  PresentationWidget2["TREND"] = "trend";
1272
+ PresentationWidget2["MANUAL_ACTIONS"] = "manual_actions";
1271
1273
  return PresentationWidget2;
1272
1274
  })(PresentationWidget || {});
1273
1275
  var AggregationType = /* @__PURE__ */ ((AggregationType2) => {