@persei/perseed-api 5.0.4 → 5.0.5

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 (102) hide show
  1. package/dist/client.cjs +60 -0
  2. package/dist/client.cjs.map +1 -1
  3. package/dist/client.mjs +60 -0
  4. package/dist/client.mjs.map +1 -1
  5. package/dist/lib/src/generated/client.d.ts +190 -0
  6. package/dist/lib/src/generated/client.d.ts.map +1 -1
  7. package/dist/src/Services/ContainerWidgetService.d.ts +14 -0
  8. package/dist/src/Services/ContainerWidgetService.d.ts.map +1 -0
  9. package/dist/src/config/config.d.ts +9 -2
  10. package/dist/src/config/config.d.ts.map +1 -1
  11. package/dist/src/controllers/{DashboardWidgetController.d.ts → ContainerWidgetController.d.ts} +3 -3
  12. package/dist/src/controllers/{DashboardWidgetController.d.ts.map → ContainerWidgetController.d.ts.map} +1 -1
  13. package/dist/src/helpers/dashboards.d.ts +4 -4
  14. package/dist/src/helpers/dashboards.d.ts.map +1 -1
  15. package/dist/src/models/ecosystem/{DashboardWidget.d.ts → ContainerWidget.d.ts} +14 -14
  16. package/dist/src/models/ecosystem/ContainerWidget.d.ts.map +1 -0
  17. package/dist/src/models/ecosystem/{DashboardWidgetBlock.d.ts → ContainerWidgetBlock.d.ts} +5 -5
  18. package/dist/src/models/ecosystem/{DashboardWidgetBlock.d.ts.map → ContainerWidgetBlock.d.ts.map} +1 -1
  19. package/dist/src/models/perseed/UserSettings.d.ts.map +1 -1
  20. package/dist/src/routes/ecosystem/_ecosystemName/dashboardWidget/_id/index.d.ts.map +1 -1
  21. package/dist/src/routes/ecosystem/_ecosystemName/dashboardWidget/index.d.ts.map +1 -1
  22. package/dist/src/routes/ecosystem/_ecosystemName/project/_projectName/dashboardWidget/_id/index.d.ts.map +1 -1
  23. package/dist/src/routes/ecosystem/_ecosystemName/project/_projectName/dashboardWidget/index.d.ts.map +1 -1
  24. package/dist/src/schemas/{dashboard_widget → container_widget}/col.d.ts.map +1 -1
  25. package/dist/src/schemas/{dashboard_widget → container_widget}/create_widget_payload.schema.json +244 -46
  26. package/dist/src/schemas/{dashboard_widget → container_widget}/dataLoaders/Outcomes.d.ts.map +1 -1
  27. package/dist/src/schemas/container_widget/dataLoaders/index.d.ts.map +1 -0
  28. package/dist/src/schemas/{dashboard_widget → container_widget}/i18n.d.ts.map +1 -1
  29. package/dist/src/schemas/{dashboard_widget → container_widget}/index.d.ts.map +1 -1
  30. package/dist/src/schemas/container_widget/types.d.ts +184 -0
  31. package/dist/src/schemas/container_widget/types.d.ts.map +1 -0
  32. package/dist/src/schemas/{dashboard_widget → container_widget}/update_widget_payload.schema.json +156 -28
  33. package/dist/src/schemas/container_widget/widgetTypes/ContainerWidgetProps.d.ts +6 -0
  34. package/dist/src/schemas/container_widget/widgetTypes/ContainerWidgetProps.d.ts.map +1 -0
  35. package/dist/src/schemas/container_widget/widgetTypes/ModalProps.d.ts +17 -0
  36. package/dist/src/schemas/container_widget/widgetTypes/ModalProps.d.ts.map +1 -0
  37. package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/PatientListProps.d.ts +17 -1
  38. package/dist/src/schemas/container_widget/widgetTypes/PatientListProps.d.ts.map +1 -0
  39. package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/SectionCardProps.d.ts.map +1 -1
  40. package/dist/src/schemas/container_widget/widgetTypes/SidebarProps.d.ts +20 -0
  41. package/dist/src/schemas/container_widget/widgetTypes/SidebarProps.d.ts.map +1 -0
  42. package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/ValueCardProps.d.ts +2 -2
  43. package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/ValueCardProps.d.ts.map +1 -1
  44. package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/index.d.ts +3 -1
  45. package/dist/src/schemas/container_widget/widgetTypes/index.d.ts.map +1 -0
  46. package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/presentationWidgetTypes/Generic.d.ts.map +1 -1
  47. package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/presentationWidgetTypes/IconPresentationWidget.d.ts.map +1 -1
  48. package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/presentationWidgetTypes/IconTextPresentationWidget.d.ts.map +1 -1
  49. package/dist/src/schemas/container_widget/widgetTypes/presentationWidgetTypes/LinkPresentationWidget.d.ts +15 -0
  50. package/dist/src/schemas/container_widget/widgetTypes/presentationWidgetTypes/LinkPresentationWidget.d.ts.map +1 -0
  51. package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/presentationWidgetTypes/ListPresentationWidget.d.ts.map +1 -1
  52. package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/presentationWidgetTypes/TextPresentationWidget.d.ts.map +1 -1
  53. package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/presentationWidgetTypes/index.d.ts.map +1 -1
  54. package/dist/src/schemas/index.d.ts +1 -1
  55. package/dist/src/schemas/user_settings/GenericStringSetting.schema.json +9 -0
  56. package/dist/src/schemas/user_settings/types.d.ts +4 -0
  57. package/dist/src/schemas/user_settings/types.d.ts.map +1 -1
  58. package/dist/src/v2/modules/project/thryve/index.d.ts +4 -0
  59. package/dist/src/v2/modules/project/thryve/index.d.ts.map +1 -0
  60. package/dist/src/v2/modules/project/thryve/thryve.controller.d.ts +5 -0
  61. package/dist/src/v2/modules/project/thryve/thryve.controller.d.ts.map +1 -0
  62. package/dist/src/v2/modules/project/thryve/thryve.controller.e2e.d.ts +2 -0
  63. package/dist/src/v2/modules/project/thryve/thryve.controller.e2e.d.ts.map +1 -0
  64. package/dist/src/v2/modules/project/thryve/thryve.controller.test.d.ts +2 -0
  65. package/dist/src/v2/modules/project/thryve/thryve.controller.test.d.ts.map +1 -0
  66. package/dist/src/v2/modules/project/thryve/thryve.schema.d.ts +10 -0
  67. package/dist/src/v2/modules/project/thryve/thryve.schema.d.ts.map +1 -0
  68. package/dist/src/v2/modules/project/thryve/thryve.service.d.ts +30 -0
  69. package/dist/src/v2/modules/project/thryve/thryve.service.d.ts.map +1 -0
  70. package/dist/src/v2/modules/project/thryve/thryve.service.test.d.ts +2 -0
  71. package/dist/src/v2/modules/project/thryve/thryve.service.test.d.ts.map +1 -0
  72. package/dist/src/v2/routes/v2/ecosystem/_ecosystemName/project/_projectName/thryve/index.d.ts +3 -0
  73. package/dist/src/v2/routes/v2/ecosystem/_ecosystemName/project/_projectName/thryve/index.d.ts.map +1 -0
  74. package/dist/v1/perseed-api.cjs +67 -14
  75. package/dist/v1/perseed-api.cjs.map +1 -1
  76. package/dist/v1/perseed-api.mjs +67 -14
  77. package/dist/v1/perseed-api.mjs.map +1 -1
  78. package/package.json +1 -1
  79. package/dist/src/Services/DashboardWidgetService.d.ts +0 -14
  80. package/dist/src/Services/DashboardWidgetService.d.ts.map +0 -1
  81. package/dist/src/models/ecosystem/DashboardWidget.d.ts.map +0 -1
  82. package/dist/src/schemas/dashboard_widget/dataLoaders/index.d.ts.map +0 -1
  83. package/dist/src/schemas/dashboard_widget/types.d.ts +0 -137
  84. package/dist/src/schemas/dashboard_widget/types.d.ts.map +0 -1
  85. package/dist/src/schemas/dashboard_widget/widgetTypes/DashboardProps.d.ts +0 -6
  86. package/dist/src/schemas/dashboard_widget/widgetTypes/DashboardProps.d.ts.map +0 -1
  87. package/dist/src/schemas/dashboard_widget/widgetTypes/PatientListProps.d.ts.map +0 -1
  88. package/dist/src/schemas/dashboard_widget/widgetTypes/index.d.ts.map +0 -1
  89. package/dist/src/schemas/dashboard_widget/widgetTypes/presentationWidgetTypes/LinkPresentationWidget.d.ts +0 -7
  90. package/dist/src/schemas/dashboard_widget/widgetTypes/presentationWidgetTypes/LinkPresentationWidget.d.ts.map +0 -1
  91. /package/dist/src/schemas/{dashboard_widget → container_widget}/col.d.ts +0 -0
  92. /package/dist/src/schemas/{dashboard_widget → container_widget}/dataLoaders/Outcomes.d.ts +0 -0
  93. /package/dist/src/schemas/{dashboard_widget → container_widget}/dataLoaders/index.d.ts +0 -0
  94. /package/dist/src/schemas/{dashboard_widget → container_widget}/i18n.d.ts +0 -0
  95. /package/dist/src/schemas/{dashboard_widget → container_widget}/index.d.ts +0 -0
  96. /package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/SectionCardProps.d.ts +0 -0
  97. /package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/presentationWidgetTypes/Generic.d.ts +0 -0
  98. /package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/presentationWidgetTypes/IconPresentationWidget.d.ts +0 -0
  99. /package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/presentationWidgetTypes/IconTextPresentationWidget.d.ts +0 -0
  100. /package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/presentationWidgetTypes/ListPresentationWidget.d.ts +0 -0
  101. /package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/presentationWidgetTypes/TextPresentationWidget.d.ts +0 -0
  102. /package/dist/src/schemas/{dashboard_widget → container_widget}/widgetTypes/presentationWidgetTypes/index.d.ts +0 -0
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$ref": "#/definitions/CreateDashboardWidgetPayload",
3
+ "$ref": "#/definitions/CreateContainerWidgetPayload",
4
4
  "definitions": {
5
- "CreateDashboardWidgetPayload": {
5
+ "CreateContainerWidgetPayload": {
6
6
  "anyOf": [
7
7
  {
8
8
  "type": "object",
@@ -10,10 +10,10 @@
10
10
  "properties": {
11
11
  "type": {
12
12
  "type": "string",
13
- "const": "SectionCard"
13
+ "const": "Dashboard"
14
14
  },
15
15
  "params": {
16
- "$ref": "#/definitions/SectionCardProps"
16
+ "$ref": "#/definitions/ContainerWidgetProps"
17
17
  },
18
18
  "title": {
19
19
  "type": "string"
@@ -40,7 +40,7 @@
40
40
  "widgetsBlocks": {
41
41
  "type": "array",
42
42
  "items": {
43
- "$ref": "#/definitions/DashboardWidgetBlockCreatePayload"
43
+ "$ref": "#/definitions/ContainerWidgetBlockCreatePayload"
44
44
  }
45
45
  }
46
46
  },
@@ -52,10 +52,10 @@
52
52
  "properties": {
53
53
  "type": {
54
54
  "type": "string",
55
- "const": "ValueCard"
55
+ "const": "Modal"
56
56
  },
57
57
  "params": {
58
- "$ref": "#/definitions/ValueCardProps"
58
+ "$ref": "#/definitions/ModalProps"
59
59
  },
60
60
  "title": {
61
61
  "type": "string"
@@ -82,7 +82,7 @@
82
82
  "widgetsBlocks": {
83
83
  "type": "array",
84
84
  "items": {
85
- "$ref": "#/definitions/DashboardWidgetBlockCreatePayload"
85
+ "$ref": "#/definitions/ContainerWidgetBlockCreatePayload"
86
86
  }
87
87
  }
88
88
  },
@@ -94,10 +94,10 @@
94
94
  "properties": {
95
95
  "type": {
96
96
  "type": "string",
97
- "const": "PatientList"
97
+ "const": "Sidebar"
98
98
  },
99
99
  "params": {
100
- "$ref": "#/definitions/PatientListProps"
100
+ "$ref": "#/definitions/SidebarProps"
101
101
  },
102
102
  "title": {
103
103
  "type": "string"
@@ -124,7 +124,7 @@
124
124
  "widgetsBlocks": {
125
125
  "type": "array",
126
126
  "items": {
127
- "$ref": "#/definitions/DashboardWidgetBlockCreatePayload"
127
+ "$ref": "#/definitions/ContainerWidgetBlockCreatePayload"
128
128
  }
129
129
  }
130
130
  },
@@ -136,10 +136,94 @@
136
136
  "properties": {
137
137
  "type": {
138
138
  "type": "string",
139
- "const": "Dashboard"
139
+ "const": "SectionCard"
140
+ },
141
+ "params": {
142
+ "$ref": "#/definitions/SectionCardProps"
143
+ },
144
+ "title": {
145
+ "type": "string"
146
+ },
147
+ "description": {
148
+ "type": ["string", "null"]
149
+ },
150
+ "weight": {
151
+ "type": "number"
152
+ },
153
+ "size": {
154
+ "anyOf": [
155
+ {
156
+ "type": "number"
157
+ },
158
+ {
159
+ "$ref": "#/definitions/ColProps"
160
+ }
161
+ ]
162
+ },
163
+ "library": {
164
+ "type": "boolean"
165
+ },
166
+ "widgetsBlocks": {
167
+ "type": "array",
168
+ "items": {
169
+ "$ref": "#/definitions/ContainerWidgetBlockCreatePayload"
170
+ }
171
+ }
172
+ },
173
+ "required": ["params", "title", "type"]
174
+ },
175
+ {
176
+ "type": "object",
177
+ "additionalProperties": false,
178
+ "properties": {
179
+ "type": {
180
+ "type": "string",
181
+ "const": "ValueCard"
182
+ },
183
+ "params": {
184
+ "$ref": "#/definitions/ValueCardProps"
185
+ },
186
+ "title": {
187
+ "type": "string"
188
+ },
189
+ "description": {
190
+ "type": ["string", "null"]
191
+ },
192
+ "weight": {
193
+ "type": "number"
194
+ },
195
+ "size": {
196
+ "anyOf": [
197
+ {
198
+ "type": "number"
199
+ },
200
+ {
201
+ "$ref": "#/definitions/ColProps"
202
+ }
203
+ ]
204
+ },
205
+ "library": {
206
+ "type": "boolean"
207
+ },
208
+ "widgetsBlocks": {
209
+ "type": "array",
210
+ "items": {
211
+ "$ref": "#/definitions/ContainerWidgetBlockCreatePayload"
212
+ }
213
+ }
214
+ },
215
+ "required": ["params", "title", "type"]
216
+ },
217
+ {
218
+ "type": "object",
219
+ "additionalProperties": false,
220
+ "properties": {
221
+ "type": {
222
+ "type": "string",
223
+ "const": "PatientList"
140
224
  },
141
225
  "params": {
142
- "$ref": "#/definitions/DashboardProps"
226
+ "$ref": "#/definitions/PatientListProps"
143
227
  },
144
228
  "title": {
145
229
  "type": "string"
@@ -166,7 +250,7 @@
166
250
  "widgetsBlocks": {
167
251
  "type": "array",
168
252
  "items": {
169
- "$ref": "#/definitions/DashboardWidgetBlockCreatePayload"
253
+ "$ref": "#/definitions/ContainerWidgetBlockCreatePayload"
170
254
  }
171
255
  }
172
256
  },
@@ -208,7 +292,7 @@
208
292
  "widgetsBlocks": {
209
293
  "type": "array",
210
294
  "items": {
211
- "$ref": "#/definitions/DashboardWidgetBlockCreatePayload"
295
+ "$ref": "#/definitions/ContainerWidgetBlockCreatePayload"
212
296
  }
213
297
  }
214
298
  },
@@ -250,7 +334,7 @@
250
334
  "widgetsBlocks": {
251
335
  "type": "array",
252
336
  "items": {
253
- "$ref": "#/definitions/DashboardWidgetBlockCreatePayload"
337
+ "$ref": "#/definitions/ContainerWidgetBlockCreatePayload"
254
338
  }
255
339
  }
256
340
  },
@@ -292,7 +376,7 @@
292
376
  "widgetsBlocks": {
293
377
  "type": "array",
294
378
  "items": {
295
- "$ref": "#/definitions/DashboardWidgetBlockCreatePayload"
379
+ "$ref": "#/definitions/ContainerWidgetBlockCreatePayload"
296
380
  }
297
381
  }
298
382
  },
@@ -334,7 +418,7 @@
334
418
  "widgetsBlocks": {
335
419
  "type": "array",
336
420
  "items": {
337
- "$ref": "#/definitions/DashboardWidgetBlockCreatePayload"
421
+ "$ref": "#/definitions/ContainerWidgetBlockCreatePayload"
338
422
  }
339
423
  }
340
424
  },
@@ -376,7 +460,7 @@
376
460
  "widgetsBlocks": {
377
461
  "type": "array",
378
462
  "items": {
379
- "$ref": "#/definitions/DashboardWidgetBlockCreatePayload"
463
+ "$ref": "#/definitions/ContainerWidgetBlockCreatePayload"
380
464
  }
381
465
  }
382
466
  },
@@ -418,7 +502,7 @@
418
502
  "widgetsBlocks": {
419
503
  "type": "array",
420
504
  "items": {
421
- "$ref": "#/definitions/DashboardWidgetBlockCreatePayload"
505
+ "$ref": "#/definitions/ContainerWidgetBlockCreatePayload"
422
506
  }
423
507
  }
424
508
  },
@@ -426,20 +510,20 @@
426
510
  }
427
511
  ]
428
512
  },
429
- "SectionCardProps": {
513
+ "ContainerWidgetProps": {
430
514
  "type": "object",
431
515
  "properties": {
432
- "icon": {
433
- "type": "string"
516
+ "active": {
517
+ "type": "boolean"
434
518
  },
435
- "background": {
436
- "type": "string"
519
+ "config": {
520
+ "type": "object",
521
+ "additionalProperties": {}
437
522
  },
438
- "titleBackground": {
439
- "type": "string"
523
+ "icon": {
524
+ "type": ["string", "null"]
440
525
  }
441
526
  },
442
- "required": ["icon"],
443
527
  "additionalProperties": false
444
528
  },
445
529
  "ColProps": {
@@ -574,7 +658,7 @@
574
658
  },
575
659
  "additionalProperties": false
576
660
  },
577
- "DashboardWidgetBlockCreatePayload": {
661
+ "ContainerWidgetBlockCreatePayload": {
578
662
  "type": "object",
579
663
  "properties": {
580
664
  "parent_id": {
@@ -616,6 +700,98 @@
616
700
  },
617
701
  "additionalProperties": false
618
702
  },
703
+ "ModalProps": {
704
+ "type": "object",
705
+ "properties": {
706
+ "active": {
707
+ "type": "boolean"
708
+ },
709
+ "icon": {
710
+ "type": ["string", "null"]
711
+ },
712
+ "config": {
713
+ "$ref": "#/definitions/ModalConfig"
714
+ }
715
+ },
716
+ "required": ["config"],
717
+ "additionalProperties": false
718
+ },
719
+ "ModalConfig": {
720
+ "type": "object",
721
+ "properties": {
722
+ "size": {
723
+ "$ref": "#/definitions/ModalSize"
724
+ },
725
+ "width": {
726
+ "type": "string"
727
+ },
728
+ "height": {
729
+ "type": "string"
730
+ }
731
+ },
732
+ "required": ["size"],
733
+ "additionalProperties": false
734
+ },
735
+ "ModalSize": {
736
+ "type": "string",
737
+ "enum": ["small", "medium", "large", "fullscreen", "custom"]
738
+ },
739
+ "SidebarProps": {
740
+ "type": "object",
741
+ "properties": {
742
+ "active": {
743
+ "type": "boolean"
744
+ },
745
+ "icon": {
746
+ "type": ["string", "null"]
747
+ },
748
+ "config": {
749
+ "$ref": "#/definitions/SidebarConfig"
750
+ }
751
+ },
752
+ "required": ["config"],
753
+ "additionalProperties": false
754
+ },
755
+ "SidebarConfig": {
756
+ "type": "object",
757
+ "properties": {
758
+ "placement": {
759
+ "$ref": "#/definitions/SidebarPlacement"
760
+ },
761
+ "size": {
762
+ "$ref": "#/definitions/SidebarSize"
763
+ },
764
+ "width": {
765
+ "type": "string"
766
+ }
767
+ },
768
+ "required": ["placement", "size"],
769
+ "additionalProperties": false
770
+ },
771
+ "SidebarPlacement": {
772
+ "type": "string",
773
+ "enum": ["left", "right"]
774
+ },
775
+ "SidebarSize": {
776
+ "type": "string",
777
+ "enum": ["small", "medium", "large", "custom"]
778
+ },
779
+ "SectionCardProps": {
780
+ "type": "object",
781
+ "properties": {
782
+ "icon": {
783
+ "type": "string"
784
+ },
785
+ "background": {
786
+ "type": "string"
787
+ },
788
+ "titleBackground": {
789
+ "type": "string"
790
+ }
791
+ },
792
+ "required": ["icon"],
793
+ "additionalProperties": false
794
+ },
619
795
  "ValueCardProps": {
620
796
  "type": "object",
621
797
  "properties": {
@@ -638,7 +814,7 @@
638
814
  "type": "object"
639
815
  },
640
816
  "dataLoader": {
641
- "$ref": "#/definitions/DashboardWidgetDataLoader%3CWidgetOutcomesDataLoader%3E"
817
+ "$ref": "#/definitions/ContainerWidgetDataLoader%3CWidgetOutcomesDataLoader%3E"
642
818
  }
643
819
  },
644
820
  "required": ["icon", "text"],
@@ -666,7 +842,7 @@
666
842
  "type": "string"
667
843
  }
668
844
  },
669
- "DashboardWidgetDataLoader<WidgetOutcomesDataLoader>": {
845
+ "ContainerWidgetDataLoader<WidgetOutcomesDataLoader>": {
670
846
  "type": "object",
671
847
  "properties": {
672
848
  "type": {
@@ -1318,19 +1494,6 @@
1318
1494
  },
1319
1495
  "additionalProperties": false
1320
1496
  },
1321
- "DashboardProps": {
1322
- "type": "object",
1323
- "properties": {
1324
- "active": {
1325
- "type": "boolean"
1326
- },
1327
- "config": {},
1328
- "icon": {
1329
- "type": ["string", "null"]
1330
- }
1331
- },
1332
- "additionalProperties": false
1333
- },
1334
1497
  "EmptyProps": {
1335
1498
  "type": "object",
1336
1499
  "additionalProperties": {
@@ -1407,7 +1570,7 @@
1407
1570
  "additionalProperties": {}
1408
1571
  },
1409
1572
  "limit": {
1410
- "type": "number"
1573
+ "type": ["number", "null"]
1411
1574
  },
1412
1575
  "sortBy": {
1413
1576
  "type": "array",
@@ -1464,6 +1627,9 @@
1464
1627
  },
1465
1628
  "hidden": {
1466
1629
  "type": "boolean"
1630
+ },
1631
+ "aggregation": {
1632
+ "$ref": "#/definitions/ColumnAggregation"
1467
1633
  }
1468
1634
  },
1469
1635
  "additionalProperties": false
@@ -1498,11 +1664,43 @@
1498
1664
  },
1499
1665
  "textColor": {
1500
1666
  "type": "string"
1667
+ },
1668
+ "underline": {
1669
+ "type": "boolean"
1670
+ },
1671
+ "linkType": {
1672
+ "$ref": "#/definitions/LinkType"
1673
+ },
1674
+ "openInNewTab": {
1675
+ "type": "boolean"
1676
+ },
1677
+ "targetWidgetId": {
1678
+ "type": "number"
1679
+ }
1680
+ },
1681
+ "additionalProperties": false
1682
+ },
1683
+ "LinkType": {
1684
+ "type": "string",
1685
+ "enum": ["external", "internal"]
1686
+ },
1687
+ "ColumnAggregation": {
1688
+ "type": "object",
1689
+ "properties": {
1690
+ "type": {
1691
+ "$ref": "#/definitions/AggregationType"
1692
+ },
1693
+ "position": {
1694
+ "type": "number"
1501
1695
  }
1502
1696
  },
1503
- "required": ["url"],
1697
+ "required": ["type"],
1504
1698
  "additionalProperties": false
1505
1699
  },
1700
+ "AggregationType": {
1701
+ "type": "string",
1702
+ "enum": ["first", "last", "position", "avg", "sum", "min", "max", "median", "stddev"]
1703
+ },
1506
1704
  "FormListAppearanceConfig": {
1507
1705
  "type": "object",
1508
1706
  "properties": {
@@ -1 +1 @@
1
- {"version":3,"file":"Outcomes.d.ts","sourceRoot":"","sources":["../../../../../../src/schemas/dashboard_widget/dataLoaders/Outcomes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAA;IAC7B,MAAM,EAAE,cAAc,CAAA;CACvB"}
1
+ {"version":3,"file":"Outcomes.d.ts","sourceRoot":"","sources":["../../../../../../src/schemas/container_widget/dataLoaders/Outcomes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAA;IAC7B,MAAM,EAAE,cAAc,CAAA;CACvB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/schemas/container_widget/dataLoaders/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../../src/schemas/dashboard_widget/i18n.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAA;IAEf,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;CACzB;AAED,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAAG,MAAM,CAAA"}
1
+ {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../../src/schemas/container_widget/i18n.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAA;IAEf,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;CACzB;AAED,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAAG,MAAM,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/schemas/dashboard_widget/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,OAAO,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/schemas/container_widget/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,OAAO,CAAA"}
@@ -0,0 +1,184 @@
1
+ import { ColProps } from './col';
2
+ import { ContainerWidgetProps, FormListProps, FormsListProps, ModalProps, PatientListProps, SectionCardProps, SidebarProps, ValueCardProps } from './widgetTypes';
3
+ /**
4
+ * True containers: host other widgets inside them.
5
+ */
6
+ export declare enum ContainerType {
7
+ DASHBOARD = "Dashboard",
8
+ MODAL = "Modal",
9
+ SIDEBAR = "Sidebar"
10
+ }
11
+ /**
12
+ * Leaf widgets: rendered inside a container, do not hold other widgets.
13
+ */
14
+ export declare enum WidgetType {
15
+ VALUECARD = "ValueCard",
16
+ SECTIONCARD = "SectionCard",
17
+ PATIENTLIST = "PatientList",
18
+ QUESTIONNAIRE_LOG = "QuestionnaireLog",
19
+ PATIENTS_PROGRAMS = "PatientsPrograms",
20
+ PATIENTS = "Patients",
21
+ ADHERENCE_SUMMARY = "AdherenceSummary",
22
+ FORM_LIST = "FormList",
23
+ FORMS_LIST = "FormsList"
24
+ }
25
+ /**
26
+ * Union of both enums. Exposed as the previous enum name so existing consumers
27
+ * keep compiling. New code should prefer the narrower `ContainerType` or
28
+ * `WidgetType` when the distinction is relevant.
29
+ */
30
+ export declare const ContainerWidgetType: {
31
+ readonly VALUECARD: WidgetType.VALUECARD;
32
+ readonly SECTIONCARD: WidgetType.SECTIONCARD;
33
+ readonly PATIENTLIST: WidgetType.PATIENTLIST;
34
+ readonly QUESTIONNAIRE_LOG: WidgetType.QUESTIONNAIRE_LOG;
35
+ readonly PATIENTS_PROGRAMS: WidgetType.PATIENTS_PROGRAMS;
36
+ readonly PATIENTS: WidgetType.PATIENTS;
37
+ readonly ADHERENCE_SUMMARY: WidgetType.ADHERENCE_SUMMARY;
38
+ readonly FORM_LIST: WidgetType.FORM_LIST;
39
+ readonly FORMS_LIST: WidgetType.FORMS_LIST;
40
+ readonly DASHBOARD: ContainerType.DASHBOARD;
41
+ readonly MODAL: ContainerType.MODAL;
42
+ readonly SIDEBAR: ContainerType.SIDEBAR;
43
+ };
44
+ export type ContainerWidgetType = ContainerType | WidgetType;
45
+ export type WidgetBlockConfig = {
46
+ size?: number | ColProps;
47
+ };
48
+ export type ContainerWidgetBlockCreatePayload = {
49
+ parent_id: number | string;
50
+ child_id: number;
51
+ position: number;
52
+ config?: WidgetBlockConfig | null;
53
+ };
54
+ export type ContainerBaseWidgetPayload = {
55
+ title: string;
56
+ description?: string | null;
57
+ weight?: number;
58
+ size?: number | ColProps;
59
+ library?: boolean;
60
+ widgetsBlocks?: ContainerWidgetBlockCreatePayload[];
61
+ };
62
+ export type EmptyProps = Record<string, never>;
63
+ export type ContainerProps = {
64
+ type: ContainerType.DASHBOARD;
65
+ params: ContainerWidgetProps;
66
+ } | {
67
+ type: ContainerType.MODAL;
68
+ params: ModalProps;
69
+ } | {
70
+ type: ContainerType.SIDEBAR;
71
+ params: SidebarProps;
72
+ };
73
+ export type WidgetProps = {
74
+ type: WidgetType.SECTIONCARD;
75
+ params: SectionCardProps;
76
+ } | {
77
+ type: WidgetType.VALUECARD;
78
+ params: ValueCardProps;
79
+ } | {
80
+ type: WidgetType.PATIENTLIST;
81
+ params: PatientListProps;
82
+ } | {
83
+ type: WidgetType.QUESTIONNAIRE_LOG;
84
+ params: EmptyProps;
85
+ } | {
86
+ type: WidgetType.PATIENTS_PROGRAMS;
87
+ params: EmptyProps;
88
+ } | {
89
+ type: WidgetType.PATIENTS;
90
+ params: EmptyProps;
91
+ } | {
92
+ type: WidgetType.ADHERENCE_SUMMARY;
93
+ params: EmptyProps;
94
+ } | {
95
+ type: WidgetType.FORM_LIST;
96
+ params: FormListProps;
97
+ } | {
98
+ type: WidgetType.FORMS_LIST;
99
+ params: FormsListProps;
100
+ };
101
+ export type WidgetTypeProps = ContainerProps | WidgetProps;
102
+ export type CreateContainerWidgetPayload = ContainerBaseWidgetPayload & WidgetTypeProps;
103
+ export type UpdateContainerWidgetPayload = Partial<CreateContainerWidgetPayload>;
104
+ export declare enum DataLoaderType {
105
+ OUTCOMES = "outcomes"
106
+ }
107
+ export interface GenericContainerWidgetDataLoader {
108
+ type: DataLoaderType;
109
+ params: Record<string, any>;
110
+ }
111
+ export type ContainerWidgetDataLoader<T> = T extends {
112
+ type: infer Type;
113
+ params: infer Params;
114
+ } ? {
115
+ type: Type;
116
+ params: Params;
117
+ } : never;
118
+ export type BaseContainerWidgetPayload<T extends ContainerWidgetType | undefined = undefined> = {
119
+ id?: number;
120
+ title: string;
121
+ description?: string;
122
+ type: T | ContainerWidgetType;
123
+ library: boolean;
124
+ config?: WidgetBlockConfig;
125
+ position?: number;
126
+ created_user: number;
127
+ };
128
+ export type BaseContainerWidget = BaseContainerWidgetPayload & WidgetTypeProps;
129
+ export type GenericParams = SectionCardProps | ValueCardProps | PatientListProps | ContainerWidgetProps | ModalProps | SidebarProps;
130
+ export type ContainerChildrenWidget<T extends ContainerWidgetType | undefined = undefined> = ContainerBaseWidgetPayload & BaseContainerWidgetPayload<T> & {
131
+ id: number;
132
+ type: ContainerWidgetType;
133
+ params: GenericParams;
134
+ };
135
+ export type ContainerWidget<T extends ContainerWidgetType | undefined = undefined> = T extends ContainerWidgetType ? {
136
+ id: number;
137
+ widgets?: ContainerChildrenWidget[];
138
+ } & ContainerWidgetTypeToParams[T] & BaseContainerWidgetPayload<T> : {
139
+ id: number;
140
+ params: any;
141
+ widgets?: ContainerChildrenWidget[];
142
+ } & BaseContainerWidgetPayload<T>;
143
+ export type ContainerTypeToParams = {
144
+ [ContainerType.DASHBOARD]: {
145
+ params: ContainerWidgetProps;
146
+ };
147
+ [ContainerType.MODAL]: {
148
+ params: ModalProps;
149
+ };
150
+ [ContainerType.SIDEBAR]: {
151
+ params: SidebarProps;
152
+ };
153
+ };
154
+ export type WidgetTypeToParams = {
155
+ [WidgetType.SECTIONCARD]: {
156
+ params: SectionCardProps;
157
+ };
158
+ [WidgetType.VALUECARD]: {
159
+ params: ValueCardProps;
160
+ };
161
+ [WidgetType.PATIENTLIST]: {
162
+ params: PatientListProps;
163
+ };
164
+ [WidgetType.QUESTIONNAIRE_LOG]: {
165
+ params: EmptyProps;
166
+ };
167
+ [WidgetType.PATIENTS_PROGRAMS]: {
168
+ params: EmptyProps;
169
+ };
170
+ [WidgetType.PATIENTS]: {
171
+ params: EmptyProps;
172
+ };
173
+ [WidgetType.ADHERENCE_SUMMARY]: {
174
+ params: EmptyProps;
175
+ };
176
+ [WidgetType.FORM_LIST]: {
177
+ params: FormListProps;
178
+ };
179
+ [WidgetType.FORMS_LIST]: {
180
+ params: FormsListProps;
181
+ };
182
+ };
183
+ export type ContainerWidgetTypeToParams = ContainerTypeToParams & WidgetTypeToParams;
184
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/schemas/container_widget/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACf,MAAM,eAAe,CAAA;AAEtB;;GAEG;AACH,oBAAY,aAAa;IACvB,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,oBAAY,UAAU;IACpB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,iBAAiB,qBAAqB;IACtC,iBAAiB,qBAAqB;IACtC,QAAQ,aAAa;IACrB,iBAAiB,qBAAqB;IACtC,SAAS,aAAa;IACtB,UAAU,cAAc;CACzB;AAED;;;;GAIG;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;CAGtB,CAAA;AACV,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,UAAU,CAAA;AAE5D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,iCAAiC,GAAG;IAC9C,SAAS,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,E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