@d4l/collect-lib 1.14.0 → 1.15.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
@@ -32,19 +32,20 @@ Update the types by running `yarn run readme:update`.
32
32
 
33
33
  ### Program
34
34
 
35
- | Properties | Required | Type | Description |
36
- | ----------- | -------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
37
- | name | true | string | Name of the program used as primary identifier |
38
- | tenantID | true | string | Tenant the program belongs to |
39
- | languages | true | string[] | Language codes that the program is available in. Example: `['en', 'de']` |
40
- | type | true | `study` or `sensor` | `sensor` is the new research-studio type, `study` is from the study-builder (and older) |
41
- | phases | true | [ProgramStep](#ProgramStep)[][] | Defines the flow of the program as an array of `phases`. `phases` consist of arrays of `steps`. `phases` are worked through sequentially and `steps` within a single `phase` are parallel. |
42
- | donation | true | [ProgramDonation](#ProgramDonation) | Donation settings handle which resources are donated, where they are donated to, and how the donation is regulated |
43
- | content | true | [ProgramContent](#ProgramContent) | Contains all the relevant content properties of the program. |
44
- | endDate | false | ISO 8601 date with timezone | Date the program should finish for all users. |
45
- | tags | false | [ProgramTag](#ProgramTag)[] | List of supported tags including their configuration |
46
- | publishedAt | true | ISO 8601 date with timezone | Date the program was published (used to determine program state). |
47
- | featured | true | [ProgramFeatured](#ProgramFeatured) | Describes the featured state of the program. |
35
+ | Properties | Required | Type | Description |
36
+ | ----------- | -------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
37
+ | name | true | string | Name of the program used as primary identifier |
38
+ | tenantID | true | string | Tenant the program belongs to |
39
+ | languages | true | string[] | Language codes that the program is available in. Example: `['en', 'de']` |
40
+ | type | true | `study` or `sensor` | `sensor` is the new research-studio type, `study` is from the study-builder (and older) |
41
+ | phases | true | [ProgramStep](#ProgramStep)[][] | Defines the flow of the program as an array of `phases`. `phases` consist of arrays of `steps`. `phases` are worked through sequentially and `steps` within a single `phase` are parallel. |
42
+ | donation | true | [ProgramDonation](#ProgramDonation) | Donation settings handle which resources are donated, where they are donated to, and how the donation is regulated |
43
+ | content | true | [ProgramContent](#ProgramContent) | Contains all the relevant content properties of the program. |
44
+ | endDate | false | ISO 8601 date with timezone | Date the program should finish for all users. |
45
+ | tags | false | [ProgramTag](#ProgramTag)[] | List of supported tags including their configuration |
46
+ | publishedAt | true | ISO 8601 date with timezone | Date the program was published (used to determine program state). |
47
+ | featured | true | [ProgramFeatured](#ProgramFeatured) | Describes the featured state of the program. |
48
+ | theme | false | 'D4L', 'GREEN', 'PURPLE', 'OLIVE' or 'BLUE' | The theme to be used for the program in the app |
48
49
 
49
50
  #### ProgramFeatured
50
51
 
package/dist/index.d.mts CHANGED
@@ -160,6 +160,7 @@ type Program = {
160
160
  tags?: ProgramTag[];
161
161
  publishedAt?: string;
162
162
  featured: ProgramFeatured;
163
+ theme?: 'D4L' | 'GREEN' | 'PURPLE' | 'OLIVE' | 'BLUE';
163
164
  };
164
165
  type ProgramFeatured = {
165
166
  enabled: boolean;
@@ -536,7 +537,7 @@ type RecursiveKeyOf<TObj extends object> = {
536
537
  type RecursiveKeyOfInner<TObj extends object> = {
537
538
  [TKey in keyof TObj & (string | number)]: RecursiveKeyOfHandleValue<TObj[TKey], `.${TKey}`>;
538
539
  }[keyof TObj & (string | number)];
539
- type RecursiveKeyOfHandleValue<TValue, Text extends string> = TValue extends Function ? undefined : TValue extends any[] ? Text | `${Text}.${number}` | `${Text}.${number}${RecursiveKeyOfInner<TValue[0]>}` : TValue extends object ? Text | `${Text}${RecursiveKeyOfInner<TValue>}` : Text;
540
+ type RecursiveKeyOfHandleValue<TValue, Text extends string> = TValue extends Function ? never : TValue extends any[] ? Text | `${Text}.${number}` | `${Text}.${number}${RecursiveKeyOfInner<TValue[0]>}` : TValue extends object ? Text | `${Text}${RecursiveKeyOfInner<TValue>}` : Text;
540
541
 
541
542
  declare function toDeviceConfig(devices: ProgramDevice[]): DeviceConfig[];
542
543
 
package/dist/index.d.ts CHANGED
@@ -160,6 +160,7 @@ type Program = {
160
160
  tags?: ProgramTag[];
161
161
  publishedAt?: string;
162
162
  featured: ProgramFeatured;
163
+ theme?: 'D4L' | 'GREEN' | 'PURPLE' | 'OLIVE' | 'BLUE';
163
164
  };
164
165
  type ProgramFeatured = {
165
166
  enabled: boolean;
@@ -536,7 +537,7 @@ type RecursiveKeyOf<TObj extends object> = {
536
537
  type RecursiveKeyOfInner<TObj extends object> = {
537
538
  [TKey in keyof TObj & (string | number)]: RecursiveKeyOfHandleValue<TObj[TKey], `.${TKey}`>;
538
539
  }[keyof TObj & (string | number)];
539
- type RecursiveKeyOfHandleValue<TValue, Text extends string> = TValue extends Function ? undefined : TValue extends any[] ? Text | `${Text}.${number}` | `${Text}.${number}${RecursiveKeyOfInner<TValue[0]>}` : TValue extends object ? Text | `${Text}${RecursiveKeyOfInner<TValue>}` : Text;
540
+ type RecursiveKeyOfHandleValue<TValue, Text extends string> = TValue extends Function ? never : TValue extends any[] ? Text | `${Text}.${number}` | `${Text}.${number}${RecursiveKeyOfInner<TValue[0]>}` : TValue extends object ? Text | `${Text}${RecursiveKeyOfInner<TValue>}` : Text;
540
541
 
541
542
  declare function toDeviceConfig(devices: ProgramDevice[]): DeviceConfig[];
542
543
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d4l/collect-lib",
3
- "version": "1.14.0",
3
+ "version": "1.15.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",