@d4l/collect-lib 1.5.1 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -299,13 +299,14 @@ Update the types by running `yarn run readme:update`.
299
299
 
300
300
  ### Display
301
301
 
302
- | Properties | Required | Type | Description |
303
- | ----------- | -------- | --------------------------------- | -------------------------------------------------------------------------------- |
304
- | name | true | string | Primary identifier. Assumption: survey and display names are collectively unique |
305
- | programName | true | string | The name of the program the display belongs to |
306
- | displayType | true | 'report' / 'recommendation' | The type of the display (report or recommendation) |
307
- | frequency | true | [TaskFrequency](#TaskFrequency) | Defines in which frequency the questionnaire occurs |
308
- | content | true | [DisplayContent](#DisplayContent) | Defines the texts, images and icons that need to be displayed for the display |
302
+ | Properties | Required | Type | Description |
303
+ | ----------- | -------- | --------------------------------------------------------- | -------------------------------------------------------------------------------- |
304
+ | name | true | string | Primary identifier. Assumption: survey and display names are collectively unique |
305
+ | programName | true | string | The name of the program the display belongs to |
306
+ | displayType | true | 'report' / 'recommendation' | The type of the display (report or recommendation) |
307
+ | frequency | true | [TaskFrequency](#TaskFrequency) | Defines in which frequency the questionnaire occurs |
308
+ | content | true | [DisplayContent](#DisplayContent) | Defines the texts, images and icons that need to be displayed for the display |
309
+ | charts | false | { [key in ProgramDeviceType]?: ProgramDevicesDataType[] } | List of devices and their data types that are relevant for the display |
309
310
 
310
311
  #### DisplayContent
311
312
 
package/dist/index.d.mts CHANGED
@@ -76,6 +76,9 @@ type Display = {
76
76
  displayType: DisplayType;
77
77
  frequency: TaskFrequency;
78
78
  content: DisplayContent;
79
+ charts?: {
80
+ [key in ProgramDeviceType]?: ProgramDevicesDataType[];
81
+ };
79
82
  };
80
83
  type DisplayType = 'report' | 'recommendation' | 'end-of-participation';
81
84
  type DisplayContent = {
@@ -84,9 +87,6 @@ type DisplayContent = {
84
87
  message: TranslatedString;
85
88
  };
86
89
  blocks?: DisplayContentBlock[];
87
- charts?: {
88
- [key in ProgramDeviceType]?: ProgramDevicesDataType[];
89
- };
90
90
  };
91
91
  type DisplayContentBlock = {
92
92
  image?: string;
@@ -115,7 +115,7 @@ interface SeenDisplay {
115
115
  */
116
116
  content?: DisplayContent;
117
117
  }
118
- type DisplayPath = `content.${DisplayContentPath}` | `content.blocks.${number}.image` | `content.blocks.${number}.text` | 'content.blocks' | `content.charts.${ProgramDeviceType}` | 'name' | `frequency.${keyof TaskFrequency}` | 'frequency';
118
+ type DisplayPath = `content.${DisplayContentPath}` | `content.blocks.${number}.image` | `content.blocks.${number}.text` | 'content.blocks' | `charts.${ProgramDeviceType}` | 'name' | `frequency.${keyof TaskFrequency}` | 'frequency';
119
119
 
120
120
  interface EligibilityScore {
121
121
  /**
package/dist/index.d.ts CHANGED
@@ -76,6 +76,9 @@ type Display = {
76
76
  displayType: DisplayType;
77
77
  frequency: TaskFrequency;
78
78
  content: DisplayContent;
79
+ charts?: {
80
+ [key in ProgramDeviceType]?: ProgramDevicesDataType[];
81
+ };
79
82
  };
80
83
  type DisplayType = 'report' | 'recommendation' | 'end-of-participation';
81
84
  type DisplayContent = {
@@ -84,9 +87,6 @@ type DisplayContent = {
84
87
  message: TranslatedString;
85
88
  };
86
89
  blocks?: DisplayContentBlock[];
87
- charts?: {
88
- [key in ProgramDeviceType]?: ProgramDevicesDataType[];
89
- };
90
90
  };
91
91
  type DisplayContentBlock = {
92
92
  image?: string;
@@ -115,7 +115,7 @@ interface SeenDisplay {
115
115
  */
116
116
  content?: DisplayContent;
117
117
  }
118
- type DisplayPath = `content.${DisplayContentPath}` | `content.blocks.${number}.image` | `content.blocks.${number}.text` | 'content.blocks' | `content.charts.${ProgramDeviceType}` | 'name' | `frequency.${keyof TaskFrequency}` | 'frequency';
118
+ type DisplayPath = `content.${DisplayContentPath}` | `content.blocks.${number}.image` | `content.blocks.${number}.text` | 'content.blocks' | `charts.${ProgramDeviceType}` | 'name' | `frequency.${keyof TaskFrequency}` | 'frequency';
119
119
 
120
120
  interface EligibilityScore {
121
121
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d4l/collect-lib",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",