@d4l/collect-lib 1.18.0 → 1.20.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/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Duration } from 'luxon';
2
1
  import * as fhir_r5 from 'fhir/r5';
2
+ import { DateTimeUnit, Duration } from 'luxon';
3
3
 
4
4
  type ConsentTimes = {
5
5
  [key: string]: Date | null;
@@ -37,7 +37,6 @@ type TaskFrequency = {
37
37
  type: FrequencyType;
38
38
  start: string;
39
39
  end?: string;
40
- location?: string;
41
40
  factor?: number;
42
41
  editDuration?: string;
43
42
  skipFirst?: boolean;
@@ -92,9 +91,9 @@ type DisplayContent = {
92
91
  title: TranslatedString;
93
92
  message: TranslatedString;
94
93
  };
95
- blocks?: DisplayContentBlock[];
94
+ blocks?: ContentBlock[];
96
95
  };
97
- type DisplayContentBlock = {
96
+ type ContentBlock = {
98
97
  image?: string;
99
98
  text: TranslatedString;
100
99
  };
@@ -127,6 +126,35 @@ interface SeenDisplay {
127
126
  }
128
127
  type DisplayPath = RecursiveKeyOf<Display>;
129
128
 
129
+ interface Message {
130
+ name: string;
131
+ programName: string;
132
+ recipients: string[];
133
+ subject: TranslatedString;
134
+ blocks?: ContentBlock[];
135
+ createdAt?: string;
136
+ updatedAt?: string;
137
+ sentAt?: string;
138
+ }
139
+ type MessagePath = RecursiveKeyOf<Message>;
140
+ interface MessageRecipient {
141
+ messageName: string;
142
+ programName: string;
143
+ subjectID: string;
144
+ sentAt?: string;
145
+ pushedAt?: string;
146
+ readAt?: string;
147
+ }
148
+ interface SeenMessage {
149
+ name: string;
150
+ programName: string;
151
+ seenAt: string;
152
+ sentAt: string;
153
+ lng: string;
154
+ subject: TranslatedString;
155
+ blocks?: ContentBlock[];
156
+ }
157
+
130
158
  interface QuestionnaireScore {
131
159
  /**
132
160
  * The actual survey name
@@ -136,6 +164,10 @@ interface QuestionnaireScore {
136
164
  * The actual score
137
165
  */
138
166
  value: number;
167
+ /**
168
+ * The minimum score
169
+ */
170
+ min: number;
139
171
  /**
140
172
  * The maximum score
141
173
  */
@@ -255,7 +287,6 @@ type ProgramDonation = {
255
287
  };
256
288
  type ProgramAnonymization = {
257
289
  blur?: {
258
- location: string;
259
290
  authored?: DateBlurringFunction;
260
291
  researchSubject?: DateBlurringFunction;
261
292
  };
@@ -680,6 +711,198 @@ declare const APPLE_HEALTH_SIGNAL_TYPE_ANNOTATIONS: {
680
711
  [key in DEVICE_SIGNAL_TYPE]?: DEVICE_ANNOTATION;
681
712
  };
682
713
 
714
+ declare function generateFHIRConsent(id: string, consent: Consent, decision: fhir5.Consent['decision'], start: string, end?: string): fhir5.Consent;
715
+
716
+ declare const SliderMinLabelExtension = "http://fhir.data4life.care/StructureDefinition/slider-label-min";
717
+ declare const SliderMaxLabelExtension = "http://fhir.data4life.care/StructureDefinition/slider-label-max";
718
+ declare const SliderStepSizeExtension = "http://fhir.data4life.care/StructureDefinition/slider-step-size";
719
+ declare const RelativeMinValueExtension = "http://fhir.data4life.care/StructureDefinition/relative-min-value";
720
+ declare const RelativeMaxValueExtension = "http://fhir.data4life.care/StructureDefinition/relative-max-value";
721
+ declare const CustomExtensionStudyName = "http://fhir.data4life.care/StructureDefinition/study-name";
722
+ declare const CustomExtensionDate = "http://fhir.data4life.care/StructureDefinition/effective-date";
723
+ declare const MaxValueExtension = "http://hl7.org/fhir/StructureDefinition/maxValue";
724
+ declare const MinValueExtension = "http://hl7.org/fhir/StructureDefinition/minValue";
725
+ declare const MinLengthExtension = "http://hl7.org/fhir/StructureDefinition/minLength";
726
+ declare const QItemControlDefinition = "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl";
727
+ declare const RoutineIsPassiveExtension = "http://fhir.data4life.care/StructureDefinition/is-passive-recording";
728
+ declare const SignalIDSystem = "http://fhir.data4life.care/r5/NamingSystem/app-signal-ids";
729
+ declare const AppIDNamingSystem = "http://fhir.data4life.care/r5/NamingSystem/app-db-ids";
730
+ declare const SensorTypeSystem = "http://fhir.data4life.care/r5/NamingSystem/sensor-device-type";
731
+ declare const SensorIdentifierSystem = "http://fhir.data4life.care/r5/NamingSystem/sensor-peripheral-id";
732
+ declare const TokenNamingSystem = "http://fhir.data4life.care/r5/NamingSystem/participation-token";
733
+ declare const ConsentNameSystem = "http://fhir.data4life.care/r5/NamingSystem/consent-name";
734
+ declare const ConsentVersionSystem = "http://fhir.data4life.care/r5/NamingSystem/consent-version";
735
+ declare const ObservationTypeSystem = "http://fhir.data4life.care/r5/CodeSystem/observation-types";
736
+ declare const MeasurementTypeSystem = "http://fhir.data4life.care/r5/CodeSystem/sensor-measurement-types";
737
+ declare const StudyNameSystem = "http://fhir.data4life.care/r5/CodeSystem/study-name";
738
+ declare const SensorSettingsSystem = "http://fhir.data4life.care/r5/CodeSystem/sensor-settings";
739
+ declare const CustomQuestionSystem = "http://fhir.data4life.care/r5/CodeSystem/custom-question-class";
740
+ declare const CommunicationTypeSystem = "http://fhir.data4life.care/r5/CodeSystem/communication-types";
741
+ declare const DEVICE_LABEL_CODING: {
742
+ system: string;
743
+ code: string;
744
+ display: string;
745
+ };
746
+ declare const DEVICE_DISPLAY_LABEL_CODING: {
747
+ system: string;
748
+ code: string;
749
+ display: string;
750
+ };
751
+ declare const DEVICE_OUTPUT_RATE_CODING: {
752
+ system: string;
753
+ code: string;
754
+ display: string;
755
+ };
756
+ declare const DEVICE_SENSOR_DELAY_CODING: {
757
+ system: string;
758
+ code: string;
759
+ display: string;
760
+ };
761
+ declare const SIGNAL_DURATION_CODING: {
762
+ system: string;
763
+ code: string;
764
+ display: string;
765
+ };
766
+ declare const ANDROID_SENSORS_CONSTANT_NAMES: string[];
767
+
768
+ /**
769
+ * Replaces {{program-name}} and {{fhir-base-host}} templates in the given string
770
+ */
771
+ type StringTemplater = (template: string) => string;
772
+ declare function generateUrn(): string;
773
+ declare function capitalizeFirstLetter(string: string): string;
774
+ declare function getText<K>(content: any, path: K, lng: string): string;
775
+ /**
776
+ * Get a value at a certain path from an object
777
+ * @param obj The object to get from
778
+ * @param path The path to get e.g 'path.to.property'
779
+ * @returns The value at the path or undefined
780
+ */
781
+ declare function get(obj: Record<string, any>, path: string): string | undefined;
782
+ /**
783
+ * Create an index map out of an array
784
+ * @param array Any array that contains objects
785
+ * @param keyField The key which is used to index
786
+ * @returns An object which contains the elements from the array indexed by _keyField_
787
+ */
788
+ declare const indexArrayBy: <T extends Record<string, any>, K extends keyof T>(array: T[] | undefined, keyField: K) => Record<T[K], T>;
789
+
790
+ declare function generateFHIRQuestionnaireScore(id: string, data: QuestionnaireScore & {
791
+ createdAt: string;
792
+ }, stringTemplater: StringTemplater): fhir5.Observation;
793
+ type Range = {
794
+ min: number;
795
+ max: number;
796
+ };
797
+ declare function calculateQuestionnaireScoreRange(questionnaire: fhir5.Questionnaire, scoring: SurveyScoring | undefined): Range;
798
+ declare function calculateScoreRangeForItem(item: fhir5.QuestionnaireItem, valueSets: {
799
+ [key: string]: fhir5.ValueSet;
800
+ }, scoring: SurveyScoring): Range;
801
+
802
+ declare function generateFHIRResponse(id: string, { programName, effectiveDate, language, questionnaire, createdAt, status, answers, }: QuestionnaireResponse): fhir5.QuestionnaireResponse;
803
+ declare const toQuestionnaireResponseItem: (answer: {
804
+ id: string;
805
+ type: QuestionInputType;
806
+ response: ReponseValue | ReponseValue[];
807
+ text: string;
808
+ }) => fhir5.QuestionnaireResponseItem;
809
+
810
+ type RecordingSignalWithId = RecordingSignal & {
811
+ id: string;
812
+ };
813
+ declare function generateFHIRRecordingBundle(id: string, recording: Recording, signals: RecordingSignalWithId[], stringTemplater: StringTemplater): fhir5.Bundle;
814
+
815
+ declare const generateFHIRResearchSubject: (id: string, { programName, subject, progress }: ResearchSubject) => fhir_r5.ResearchSubject;
816
+
817
+ declare function generateFHIRSeenDisplay(id: string, seenDisplay: SeenDisplay): fhir5.Communication;
818
+
819
+ declare function generateFHIRSeenMessage(id: string, seenMessage: SeenMessage): fhir5.Communication;
820
+
821
+ declare function generateFHIRTag(id: string, code: string, date: string, labels: {
822
+ [key: string]: string;
823
+ }, stringTemplater: StringTemplater): fhir5.Observation;
824
+
825
+ type TimeWindow = {
826
+ start: Date;
827
+ end: Date;
828
+ };
829
+ /**
830
+ * Subset of TaskFrequency type required for time functions.
831
+ * Start is an ISO 8601 timestamp indicating the starting point for the frequency subset.
832
+ */
833
+ type FrequencySubset = {
834
+ factor?: number;
835
+ start?: string;
836
+ type: FrequencyType;
837
+ };
838
+
839
+ /**
840
+ * Returns the timeFuncs for the given parameters.
841
+ * Can be used with task.frequency and an optional overwrite for the startDate
842
+ * @param parameters subset of task frequency
843
+ * @param startDate startDate as a means to overwrite date part of the frequency start
844
+ * @returns
845
+ */
846
+ declare const getTimeFuncs: (parameters: FrequencySubset, startDate?: Date) => TimeFuncs;
847
+ /**
848
+ * Abstract class for functions to manipulate time based on a given window size
849
+ */
850
+ declare abstract class TimeFuncs {
851
+ abstract unit: DateTimeUnit;
852
+ factor: number;
853
+ start?: string;
854
+ constructor(parameters?: {
855
+ factor?: number;
856
+ start?: string;
857
+ });
858
+ abstract addFunc(base: Date, x: number): Date;
859
+ add(base: Date, x: number): Date;
860
+ abstract diffFunc(later: Date, earlier: Date): number;
861
+ diff(later: Date, earlier: Date): number;
862
+ abstract formatFunc(date: Date): string;
863
+ group(date: Date): string;
864
+ private startOfUnit;
865
+ private endOfUnit;
866
+ window(date: Date): TimeWindow;
867
+ }
868
+
869
+ declare const dayFormat: (date: Date) => string;
870
+ /**
871
+ * Checks if the given date is not after the effective end date
872
+ * @param effectiveEndDate
873
+ * @param date
874
+ * @returns true if there is no endDate or if the date is not after the endDate
875
+ */
876
+ declare const isNotAfterEndDate: (effectiveEndDate: Date | undefined, date: Date) => boolean;
877
+ /**
878
+ * Checks if the given date is not before the start date
879
+ * @param startDate
880
+ * @param date
881
+ * @returns true if there is no startDate or if the date is not before the startDate
882
+ */
883
+ declare const isNotBeforeStartDate: (startDate: Date | undefined, date: Date) => boolean;
884
+ /**
885
+ * Checks if the given date is before the start date
886
+ * @param start
887
+ * @param date
888
+ * @returns true if there is a start and the date is before the start date
889
+ */
890
+ declare const isBeforeStartDate: (start: string | Date | undefined, date: Date) => boolean | "" | undefined;
891
+ /**
892
+ * Overwrite the time of a date with a given timestamp (ignoring timezone information)
893
+ * @param date the date the time should be applied to
894
+ * @param timeComponent ISO 8601 timestamp string to take the time from
895
+ * @returns
896
+ */
897
+ declare const overwriteTime: (date: Date | null | undefined, timeComponent: string | undefined) => Date | undefined;
898
+ /**
899
+ * Converts a ISO 8601 timestamp string to a Date ignoring the timezone
900
+ * Uses luxon for date parsing (allows setting default timezone in tests)
901
+ * @param input
902
+ * @returns timestamp without timezone information
903
+ */
904
+ declare const timezonelessDate: (input: string) => Date;
905
+
683
906
  interface CryptoModule {
684
907
  deriveEncryptionKey(recoveryKey: Uint8Array, salt: string): Promise<Uint8Array>;
685
908
  generateKey(size: number): Uint8Array;
@@ -805,6 +1028,12 @@ type RestorationSize = {
805
1028
  bytes: number;
806
1029
  }[];
807
1030
  };
1031
+ type ResponseMinimal = {
1032
+ id: string;
1033
+ resourceType: string;
1034
+ version: number;
1035
+ [key: string]: any;
1036
+ };
808
1037
  interface SDKInterface {
809
1038
  /**
810
1039
  * Checks readiness state of donation service
@@ -821,7 +1050,7 @@ interface SDKInterface {
821
1050
  /**
822
1051
  * Register a donor identity for a program
823
1052
  * @param recoveryKey The 16byte long recovery key (from the recovery phrase)
824
- * @param programName The name of the program for which the registration should be done
1053
+ * @param program The program for which the registration should be done
825
1054
  * @param participationCode The optional participation code
826
1055
  * @returns The newly created donor identity
827
1056
  */
@@ -832,7 +1061,7 @@ interface SDKInterface {
832
1061
  /**
833
1062
  * Donate resources for a study
834
1063
  * @param donorIdentity The donor identity for the study
835
- * @param programName The program for which the resources should be donated
1064
+ * @param program The program for which the resources should be donated
836
1065
  * @param records The list of resources that should be donated
837
1066
  * @returns True, if the donation was successful. Otherwise, false.
838
1067
  */
@@ -867,6 +1096,28 @@ interface SDKInterface {
867
1096
  * @returns True, if the revocation was successful. Otherwise, false.
868
1097
  */
869
1098
  revoke: (donorIdentity: DonorIdentity, program: Program, records: DonationRecord[]) => Promise<boolean>;
1099
+ /**
1100
+ * Register device for push notifications
1101
+ * @param donorIdentity The donor identity for the study
1102
+ * @param program The program for which the device should be registered
1103
+ * @param deviceToken The device token for push notifications
1104
+ * @returns True, if the registration was successful. Otherwise, false.
1105
+ */
1106
+ registerDevice: (donorIdentity: DonorIdentity, program: Program, deviceToken: string) => Promise<boolean>;
1107
+ /**
1108
+ * Unregister device for push notifications
1109
+ * @param donorIdentity The donor identity for the study
1110
+ * @param program The program for which the device should be unregistered
1111
+ * @returns True, if the device was removed successfully. Otherwise, false.
1112
+ */
1113
+ unregisterDevice: (donorIdentity: DonorIdentity, program: Program) => Promise<boolean>;
1114
+ /**
1115
+ * Get responses left for participant in a study
1116
+ * @param donorIdentity The donor identity for the study
1117
+ * @param programName The name of the program for which the responses should be gotten
1118
+ * @returns The list of resources that were left for the participant
1119
+ */
1120
+ getResponses: (donorIdentity: DonorIdentity, programName: string) => Promise<fhir5.Resource[]>;
870
1121
  }
871
1122
  declare enum ERROR_CODES {
872
1123
  COULD_NOT_SIGN = "could_not_sign",
@@ -959,6 +1210,9 @@ declare class DonationSDK implements SDKInterface {
959
1210
  status: RecordState;
960
1211
  }[]>;
961
1212
  revoke(donorIdentity: DonorIdentity, program: Program, records: DonationRecord[]): Promise<boolean>;
1213
+ getResponses(donorIdentity: DonorIdentity, programName: string, updatedAfter?: string): Promise<ResponseMinimal[]>;
1214
+ registerDevice(donorIdentity: DonorIdentity, program: Program, deviceToken: string): Promise<boolean>;
1215
+ unregisterDevice(donorIdentity: DonorIdentity, program: Program): Promise<boolean>;
962
1216
  }
963
1217
 
964
1218
  /**
@@ -1148,100 +1402,6 @@ declare const wordlists: {
1148
1402
  de: string[];
1149
1403
  };
1150
1404
 
1151
- declare function generateFHIRConsent(id: string, consent: Consent, decision: fhir5.Consent['decision'], start: string, end?: string): fhir5.Consent;
1152
-
1153
- declare const SliderMinLabelExtension = "http://fhir.data4life.care/StructureDefinition/slider-label-min";
1154
- declare const SliderMaxLabelExtension = "http://fhir.data4life.care/StructureDefinition/slider-label-max";
1155
- declare const SliderStepSizeExtension = "http://fhir.data4life.care/StructureDefinition/slider-step-size";
1156
- declare const RelativeMinValueExtension = "http://fhir.data4life.care/StructureDefinition/relative-min-value";
1157
- declare const RelativeMaxValueExtension = "http://fhir.data4life.care/StructureDefinition/relative-max-value";
1158
- declare const CustomExtensionStudyName = "http://fhir.data4life.care/StructureDefinition/study-name";
1159
- declare const CustomExtensionDate = "http://fhir.data4life.care/StructureDefinition/effective-date";
1160
- declare const MaxValueExtension = "http://hl7.org/fhir/StructureDefinition/maxValue";
1161
- declare const MinValueExtension = "http://hl7.org/fhir/StructureDefinition/minValue";
1162
- declare const MinLengthExtension = "http://hl7.org/fhir/StructureDefinition/minLength";
1163
- declare const QItemControlDefinition = "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl";
1164
- declare const RoutineIsPassiveExtension = "http://fhir.data4life.care/StructureDefinition/is-passive-recording";
1165
- declare const SignalIDSystem = "http://fhir.data4life.care/r5/NamingSystem/app-signal-ids";
1166
- declare const AppIDNamingSystem = "http://fhir.data4life.care/r5/NamingSystem/app-db-ids";
1167
- declare const SensorTypeSystem = "http://fhir.data4life.care/r5/NamingSystem/sensor-device-type";
1168
- declare const SensorIdentifierSystem = "http://fhir.data4life.care/r5/NamingSystem/sensor-peripheral-id";
1169
- declare const TokenNamingSystem = "http://fhir.data4life.care/r5/NamingSystem/participation-token";
1170
- declare const ConsentNameSystem = "http://fhir.data4life.care/r5/NamingSystem/consent-name";
1171
- declare const ConsentVersionSystem = "http://fhir.data4life.care/r5/NamingSystem/consent-version";
1172
- declare const ObservationTypeSystem = "http://fhir.data4life.care/r5/CodeSystem/observation-types";
1173
- declare const MeasurementTypeSystem = "http://fhir.data4life.care/r5/CodeSystem/sensor-measurement-types";
1174
- declare const StudyNameSystem = "http://fhir.data4life.care/r5/CodeSystem/study-name";
1175
- declare const SensorSettingsSystem = "http://fhir.data4life.care/r5/CodeSystem/sensor-settings";
1176
- declare const CustomQuestionSystem = "http://fhir.data4life.care/r5/CodeSystem/custom-question-class";
1177
- declare const CommunicationTypeSystem = "http://fhir.data4life.care/r5/CodeSystem/communication-types";
1178
- declare const DEVICE_LABEL_CODING: {
1179
- system: string;
1180
- code: string;
1181
- display: string;
1182
- };
1183
- declare const DEVICE_DISPLAY_LABEL_CODING: {
1184
- system: string;
1185
- code: string;
1186
- display: string;
1187
- };
1188
- declare const DEVICE_OUTPUT_RATE_CODING: {
1189
- system: string;
1190
- code: string;
1191
- display: string;
1192
- };
1193
- declare const DEVICE_SENSOR_DELAY_CODING: {
1194
- system: string;
1195
- code: string;
1196
- display: string;
1197
- };
1198
- declare const SIGNAL_DURATION_CODING: {
1199
- system: string;
1200
- code: string;
1201
- display: string;
1202
- };
1203
- declare const ANDROID_SENSORS_CONSTANT_NAMES: string[];
1204
-
1205
- /**
1206
- * Replaces {{program-name}} and {{fhir-base-host}} templates in the given string
1207
- */
1208
- type StringTemplater = (template: string) => string;
1209
- declare function generateUrn(): string;
1210
- declare function capitalizeFirstLetter(string: string): string;
1211
- declare function getText<K>(content: any, path: K, lng: string): string;
1212
- /**
1213
- * Get a value at a certain path from an object
1214
- * @param obj The object to get from
1215
- * @param path The path to get e.g 'path.to.property'
1216
- * @returns The value at the path or undefined
1217
- */
1218
- declare function get(obj: Record<string, any>, path: string): string | undefined;
1219
-
1220
- declare function generateFHIRQuestionnaireScore(id: string, data: QuestionnaireScore & {
1221
- createdAt: string;
1222
- }, stringTemplater: StringTemplater): fhir5.Observation;
1223
-
1224
- declare function generateFHIRResponse(id: string, { programName, effectiveDate, language, questionnaire, createdAt, status, answers, }: QuestionnaireResponse): fhir5.QuestionnaireResponse;
1225
- declare const toQuestionnaireResponseItem: (answer: {
1226
- id: string;
1227
- type: QuestionInputType;
1228
- response: ReponseValue | ReponseValue[];
1229
- text: string;
1230
- }) => fhir5.QuestionnaireResponseItem;
1231
-
1232
- type RecordingSignalWithId = RecordingSignal & {
1233
- id: string;
1234
- };
1235
- declare function generateFHIRRecordingBundle(id: string, recording: Recording, signals: RecordingSignalWithId[], stringTemplater: StringTemplater): fhir5.Bundle;
1236
-
1237
- declare const generateFHIRResearchSubject: (id: string, { programName, subject, progress }: ResearchSubject) => fhir_r5.ResearchSubject;
1238
-
1239
- declare function generateFHIRSeenDisplay(id: string, seenDisplay: SeenDisplay): fhir5.Communication;
1240
-
1241
- declare function generateFHIRTag(id: string, code: string, date: string, labels: {
1242
- [key: string]: string;
1243
- }, stringTemplater: StringTemplater): fhir5.Observation;
1244
-
1245
1405
  type API = 'DEXCOM' | 'FITBIT';
1246
1406
  type APIConfig = {
1247
1407
  loginEndpoint: string;
@@ -1254,4 +1414,4 @@ declare const API_TARGET_MAP: {
1254
1414
  };
1255
1415
  };
1256
1416
 
1257
- export { ANDROID_SENSORS_CONSTANT_NAMES, type API, type APIConfig, type APIDeviceConfig, API_TARGET_MAP, APPLE_HEALTH_ACTIVE_ENERGY_ANNOTATION, APPLE_HEALTH_ANNOTATION_ITEM_ACTIVE_ENERGY, APPLE_HEALTH_ANNOTATION_ITEM_SLEEP_DURATION, APPLE_HEALTH_ANNOTATION_ITEM_SLEEP_STATE, APPLE_HEALTH_ANNOTATION_ITEM_STEP_COUNT, APPLE_HEALTH_ANNOTATION_ITEM_WALKING_RUNNING_DISTANCE, APPLE_HEALTH_SIGNAL_TYPE_ANNOTATIONS, APPLE_HEALTH_SLEEP_ANALYSIS_ANNOTATION, APPLE_HEALTH_SLEEP_STATE_MAP, APPLE_HEALTH_STEP_COUNT_ANNOTATION, APPLE_HEALTH_WALKING_RUNNING_DISTANCE_ANNOTATION, ASMSECGMeasurementAnnotation, ASMSSpO2MeasurementAnnotation, type Answer, AnswerCodeCondition, type Answers, AppIDNamingSystem, type AppleHealthSleepStates, type BLEDeviceConfig, BLE_ASMS_ANNOTATION_ITEM_ECG, BLE_ASMS_ANNOTATION_ITEM_SPO2, BLE_CPMS_ANNOTATION_ITEM_ACTIVITY_TYPE, BLE_CPMS_ANNOTATION_ITEM_DAILY_CALORIES, BLE_CPMS_ANNOTATION_ITEM_DAILY_DISTANCE, BLE_CPMS_ANNOTATION_ITEM_DAILY_ELEVATION_GAIN, BLE_CPMS_ANNOTATION_ITEM_DAILY_FLOORS, BLE_CPMS_ANNOTATION_ITEM_DAILY_STEPS, BLE_PAMS_ANNOTATION_ITEM_ABSOLUTE_ELEVATION, BLE_PAMS_ANNOTATION_ITEM_AVERAGE_MOTION_CADENCE, BLE_PAMS_ANNOTATION_ITEM_AVERAGE_SPEED, BLE_PAMS_ANNOTATION_ITEM_BYTE, BLE_PAMS_ANNOTATION_ITEM_CALORIES_TOTAL, BLE_PAMS_ANNOTATION_ITEM_DISTANCE_TOTAL, BLE_PAMS_ANNOTATION_ITEM_FLAGS_16, BLE_PAMS_ANNOTATION_ITEM_FLAGS_24, BLE_PAMS_ANNOTATION_ITEM_FLAGS_32, BLE_PAMS_ANNOTATION_ITEM_FLAGS_8, BLE_PAMS_ANNOTATION_ITEM_FLOORS_TOTAL, BLE_PAMS_ANNOTATION_ITEM_FOUR_BYTES, BLE_PAMS_ANNOTATION_ITEM_HEADER, BLE_PAMS_ANNOTATION_ITEM_HEART_RATE, BLE_PAMS_ANNOTATION_ITEM_MAXIMUM_MOTION_CADENCE, BLE_PAMS_ANNOTATION_ITEM_MAXIMUM_SPEED, BLE_PAMS_ANNOTATION_ITEM_MINIMUM_MOTION_CADENCE, BLE_PAMS_ANNOTATION_ITEM_MINIMUM_SPEED, BLE_PAMS_ANNOTATION_ITEM_MOTION_CADENCE, BLE_PAMS_ANNOTATION_ITEM_NEGATIVE_ELEVATION_GAIN, BLE_PAMS_ANNOTATION_ITEM_POSITIVE_ELEVATION_GAIN, BLE_PAMS_ANNOTATION_ITEM_RUNNING_STEPS_TOTAL, BLE_PAMS_ANNOTATION_ITEM_SPEED, BLE_PAMS_ANNOTATION_ITEM_STEPS_TOTAL, BLE_PAMS_ANNOTATION_ITEM_THREE_BYTES, BLE_PAMS_ANNOTATION_ITEM_TWO_BYTES, BLE_PAMS_ANNOTATION_ITEM_VO2_MAX, BLE_PSMS_ANNOTATION_ITEM_HEART_RATE, BLE_PSMS_ANNOTATION_ITEM_IBI, BLE_PSMS_ANNOTATION_ITEM_PPG_GREEN, BLE_PSMS_ANNOTATION_ITEM_PPG_IR, BLE_PSMS_ANNOTATION_ITEM_PPG_RED, BLE_PSMS_ANNOTATION_ITEM_SKIN_TEMPERATURE, type BaseDeviceConfig, type BleDeviceMetaLabel, BoolCondition, CPMSHealthServicesActivityDetectionAnnotation, CPMSHealthServicesPassiveDataAnnotation, CommunicationTypeSystem, type ComparisonOperator, type ConditionOperatorType, type ConditionQuestionType, type ConditionSorting, type ConditionType, Conjunction, type Consent, ConsentCondition, ConsentNameSystem, type ConsentPath, type ConsentTimes, ConsentVersionSystem, type Converter, type CryptoModule, CustomExtensionDate, CustomExtensionStudyName, CustomQuestionSystem, type DEVICE_ANNOTATION, type DEVICE_ANNOTATION_DATA_FORMAT, type DEVICE_ANNOTATION_DATA_TYPE, DEVICE_ANNOTATION_HEARTRATE, type DEVICE_ANNOTATION_ITEM, DEVICE_ANNOTATION_ITEM_ACCELERATION, DEVICE_ANNOTATION_ITEM_ANGULAR_SPEED, DEVICE_ANNOTATION_ITEM_BEACON_ID, DEVICE_ANNOTATION_ITEM_DISTANCE, DEVICE_ANNOTATION_ITEM_EGVS, DEVICE_ANNOTATION_ITEM_HEARTRATE, DEVICE_ANNOTATION_ITEM_MAGNETIC_FIELD, DEVICE_ANNOTATION_ITEM_REMOTE_DISTANCE, DEVICE_ANNOTATION_ITEM_RSSI, DEVICE_ANNOTATION_ITEM_UNIX_TIMESTAMP, DEVICE_ANNOTATION_TIMESTAMP_NOTE, DEVICE_ANNOTATION_TIMESTAMP_SIZE, DEVICE_ANNOTATION_TIMESTAMP_UNIT, DEVICE_D4L_COMPANION_ANNOTATION_ITEM_DATA_TYPES_FLAG, DEVICE_D4L_COMPANION_ANNOTATION_ITEM_TIMESTAMP, DEVICE_DISPLAY_LABEL_CODING, type DEVICE_KEY, type DEVICE_KEY_API, type DEVICE_KEY_BLE, type DEVICE_KEY_INTERNAL, type DEVICE_KEY_SDK, DEVICE_KEY_TO_NAME, DEVICE_LABEL_CODING, type DEVICE_MOVELLA_PAYLOAD_MODES, DEVICE_OUTPUT_RATE_CODING, DEVICE_SENSOR_DELAY_CODING, type DEVICE_SIGNAL_TYPE, type DateBlurringFunction, DateCondition, DecimalCondition, type DeviceConfig, type DeviceName, Disjunction, type Display, type DisplayContent, type DisplayContentBlock, type DisplayContentPath, type DisplayPath, type DisplayType, type DonationRecord, DonationSDK, type DonorIdentity, ERROR_CODES, ExistsCondition, type ExtendedProgramDevicesDataType, FITBIT_ANNOTATION_ITEM_BREATHING_RATE, FITBIT_ANNOTATION_ITEM_CALORIES, FITBIT_ANNOTATION_ITEM_HEART_RATE, FITBIT_ANNOTATION_ITEM_HEART_RATE_VARIABILITY, FITBIT_ANNOTATION_ITEM_SKIN_TEMPERATURE, FITBIT_ANNOTATION_ITEM_SLEEP_LEVEL, FITBIT_ANNOTATION_ITEM_SLEEP_LEVEL_DURATION, FITBIT_ANNOTATION_ITEM_SPO2, FITBIT_ANNOTATION_ITEM_STEPS, FITBIT_BREATHING_RATE_ANNOTATION, FITBIT_CALORIES_ANNOTATION, FITBIT_HEART_RATE_ANNOTATION, FITBIT_HEART_RATE_VARIABILITY_ANNOTATION, FITBIT_SIGNAL_TYPE_ANNOTATIONS, FITBIT_SKIN_TEMPERATURE_ANNOTATION, FITBIT_SLEEP_ANNOTATION, FITBIT_SLEEP_LEVEL_MAP, FITBIT_SPO2_ANNOTATION, FITBIT_STEPS_ANNOTATION, type FitbitSleepLevelTypes, type FrequencyType, type Guard, IMUAnnotation, type InternalDeviceConfig, InternalSensorAnnotationTypes, KeyHandler, MaxValueExtension, MeasurementTypeSystem, MinLengthExtension, MinValueExtension, type MultiAnswers, ObservationTypeSystem, Offset, PAMSCardioVascularActivityAnnotation, PAMSGeneralActivityInstantaneousAnnotation, PAMSGeneralActivitySummaryAnnotation, PAMSStepCounterActivitySummaryAnnotation, PSMSHeartRateAnnotation, PSMSPPGGreenAnnotation, PSMSPPGIRAnnotation, PSMSPPGRedAnnotation, PSMSSkinTemperatureAnnotation, type PreviewTimeSeriesItem, type Program, type ProgramAnonymization, type ProgramClientTarget, type ProgramConsentStep, type ProgramContact, type ProgramContent, type ProgramContentPath, type ProgramDevice, type ProgramDeviceType, type ProgramDevicesDataType, type ProgramDevicesLabel, type ProgramDisplayStep, type ProgramDonation, type ProgramEligibilityStep, type ProgramFeatured, type ProgramRoutineStep, type ProgramSensorStep, type ProgramStep, type ProgramStepBase, type ProgramStepType, type ProgramSurveyStep, type ProgramTag, type ProgramTokenStep, type ProgramType, QItemControlDefinition, type QuestionInputType, type QuestionnaireResponse, type QuestionnaireScore, RECORDING_MODEL_CURRENT_VERSION, RECORDING_SIGNAL_MODEL_CURRENT_VERSION, type RecordState, type Recording, type RecordingSignal, type RecordingSignalItem, type RecordingSignalPreview, type RecordingSignalWithId, type RecordingTag, type RecursiveKeyOf, RelativeMaxValueExtension, RelativeMinValueExtension, type ReminderFrequencyType, type ReponseValue, type ResearchSubject, type ResearchSubjectProgress, type ResearchSubjectProgressState, type RestorationSize, type Routine, RoutineCondition, type RoutineContent, type RoutineContentPath, type RoutineContentStep, RoutineIsPassiveExtension, type RoutineTimes, type SDKDeviceConfig, type SDKInterface, SIGNAL_DURATION_CODING, type ScoreThreshold, type SeenDisplay, SensorIdentifierSystem, SensorSettingsSystem, SensorTypeSystem, SignalIDSystem, type SkippedStep, SliderMaxLabelExtension, SliderMinLabelExtension, SliderStepSizeExtension, type StepCondition, type StringTemplater, StudyNameSystem, type Survey, SurveyCondition, type SurveyContent, type SurveyContentPath, type SurveyScoring, type Tag, type TagEffectiveType, type TaskFrequency, type TaskReminder, type Threshold, TokenNamingSystem, type TranslatedString, ULID_REGEX, ULIDtoUUID, UUID_REGEX, UUIDtoULID, WORDLIST_LANGUAGES, WearOS3AnnotationMap, WebConverter, type WordListLanguage, YearCondition, binaryStringToUint8Array, capitalizeFirstLetter, extractWordsFromRecoveryPhrase, generateFHIRConsent, generateFHIRQuestionnaireScore, generateFHIRRecordingBundle, generateFHIRResearchSubject, generateFHIRResponse, generateFHIRSeenDisplay, generateFHIRTag, generateQuestionGuard, generateStepGuard, generateUrn, get, getLanguageOfPassPhrase, getMovellaAnnotation, getText, isScoreEligible, isYearString, newStepDateCondtion, stringToDate, stringToYear, toDeviceConfig, toQuestionnaireResponseItem, uint8ArrayToBinaryString, utf8ToUint8Array, wordlists };
1417
+ export { ANDROID_SENSORS_CONSTANT_NAMES, type API, type APIConfig, type APIDeviceConfig, API_TARGET_MAP, APPLE_HEALTH_ACTIVE_ENERGY_ANNOTATION, APPLE_HEALTH_ANNOTATION_ITEM_ACTIVE_ENERGY, APPLE_HEALTH_ANNOTATION_ITEM_SLEEP_DURATION, APPLE_HEALTH_ANNOTATION_ITEM_SLEEP_STATE, APPLE_HEALTH_ANNOTATION_ITEM_STEP_COUNT, APPLE_HEALTH_ANNOTATION_ITEM_WALKING_RUNNING_DISTANCE, APPLE_HEALTH_SIGNAL_TYPE_ANNOTATIONS, APPLE_HEALTH_SLEEP_ANALYSIS_ANNOTATION, APPLE_HEALTH_SLEEP_STATE_MAP, APPLE_HEALTH_STEP_COUNT_ANNOTATION, APPLE_HEALTH_WALKING_RUNNING_DISTANCE_ANNOTATION, ASMSECGMeasurementAnnotation, ASMSSpO2MeasurementAnnotation, type Answer, AnswerCodeCondition, type Answers, AppIDNamingSystem, type AppleHealthSleepStates, type BLEDeviceConfig, BLE_ASMS_ANNOTATION_ITEM_ECG, BLE_ASMS_ANNOTATION_ITEM_SPO2, BLE_CPMS_ANNOTATION_ITEM_ACTIVITY_TYPE, BLE_CPMS_ANNOTATION_ITEM_DAILY_CALORIES, BLE_CPMS_ANNOTATION_ITEM_DAILY_DISTANCE, BLE_CPMS_ANNOTATION_ITEM_DAILY_ELEVATION_GAIN, BLE_CPMS_ANNOTATION_ITEM_DAILY_FLOORS, BLE_CPMS_ANNOTATION_ITEM_DAILY_STEPS, BLE_PAMS_ANNOTATION_ITEM_ABSOLUTE_ELEVATION, BLE_PAMS_ANNOTATION_ITEM_AVERAGE_MOTION_CADENCE, BLE_PAMS_ANNOTATION_ITEM_AVERAGE_SPEED, BLE_PAMS_ANNOTATION_ITEM_BYTE, BLE_PAMS_ANNOTATION_ITEM_CALORIES_TOTAL, BLE_PAMS_ANNOTATION_ITEM_DISTANCE_TOTAL, BLE_PAMS_ANNOTATION_ITEM_FLAGS_16, BLE_PAMS_ANNOTATION_ITEM_FLAGS_24, BLE_PAMS_ANNOTATION_ITEM_FLAGS_32, BLE_PAMS_ANNOTATION_ITEM_FLAGS_8, BLE_PAMS_ANNOTATION_ITEM_FLOORS_TOTAL, BLE_PAMS_ANNOTATION_ITEM_FOUR_BYTES, BLE_PAMS_ANNOTATION_ITEM_HEADER, BLE_PAMS_ANNOTATION_ITEM_HEART_RATE, BLE_PAMS_ANNOTATION_ITEM_MAXIMUM_MOTION_CADENCE, BLE_PAMS_ANNOTATION_ITEM_MAXIMUM_SPEED, BLE_PAMS_ANNOTATION_ITEM_MINIMUM_MOTION_CADENCE, BLE_PAMS_ANNOTATION_ITEM_MINIMUM_SPEED, BLE_PAMS_ANNOTATION_ITEM_MOTION_CADENCE, BLE_PAMS_ANNOTATION_ITEM_NEGATIVE_ELEVATION_GAIN, BLE_PAMS_ANNOTATION_ITEM_POSITIVE_ELEVATION_GAIN, BLE_PAMS_ANNOTATION_ITEM_RUNNING_STEPS_TOTAL, BLE_PAMS_ANNOTATION_ITEM_SPEED, BLE_PAMS_ANNOTATION_ITEM_STEPS_TOTAL, BLE_PAMS_ANNOTATION_ITEM_THREE_BYTES, BLE_PAMS_ANNOTATION_ITEM_TWO_BYTES, BLE_PAMS_ANNOTATION_ITEM_VO2_MAX, BLE_PSMS_ANNOTATION_ITEM_HEART_RATE, BLE_PSMS_ANNOTATION_ITEM_IBI, BLE_PSMS_ANNOTATION_ITEM_PPG_GREEN, BLE_PSMS_ANNOTATION_ITEM_PPG_IR, BLE_PSMS_ANNOTATION_ITEM_PPG_RED, BLE_PSMS_ANNOTATION_ITEM_SKIN_TEMPERATURE, type BaseDeviceConfig, type BleDeviceMetaLabel, BoolCondition, CPMSHealthServicesActivityDetectionAnnotation, CPMSHealthServicesPassiveDataAnnotation, CommunicationTypeSystem, type ComparisonOperator, type ConditionOperatorType, type ConditionQuestionType, type ConditionSorting, type ConditionType, Conjunction, type Consent, ConsentCondition, ConsentNameSystem, type ConsentPath, type ConsentTimes, ConsentVersionSystem, type ContentBlock, type Converter, type CryptoModule, CustomExtensionDate, CustomExtensionStudyName, CustomQuestionSystem, type DEVICE_ANNOTATION, type DEVICE_ANNOTATION_DATA_FORMAT, type DEVICE_ANNOTATION_DATA_TYPE, DEVICE_ANNOTATION_HEARTRATE, type DEVICE_ANNOTATION_ITEM, DEVICE_ANNOTATION_ITEM_ACCELERATION, DEVICE_ANNOTATION_ITEM_ANGULAR_SPEED, DEVICE_ANNOTATION_ITEM_BEACON_ID, DEVICE_ANNOTATION_ITEM_DISTANCE, DEVICE_ANNOTATION_ITEM_EGVS, DEVICE_ANNOTATION_ITEM_HEARTRATE, DEVICE_ANNOTATION_ITEM_MAGNETIC_FIELD, DEVICE_ANNOTATION_ITEM_REMOTE_DISTANCE, DEVICE_ANNOTATION_ITEM_RSSI, DEVICE_ANNOTATION_ITEM_UNIX_TIMESTAMP, DEVICE_ANNOTATION_TIMESTAMP_NOTE, DEVICE_ANNOTATION_TIMESTAMP_SIZE, DEVICE_ANNOTATION_TIMESTAMP_UNIT, DEVICE_D4L_COMPANION_ANNOTATION_ITEM_DATA_TYPES_FLAG, DEVICE_D4L_COMPANION_ANNOTATION_ITEM_TIMESTAMP, DEVICE_DISPLAY_LABEL_CODING, type DEVICE_KEY, type DEVICE_KEY_API, type DEVICE_KEY_BLE, type DEVICE_KEY_INTERNAL, type DEVICE_KEY_SDK, DEVICE_KEY_TO_NAME, DEVICE_LABEL_CODING, type DEVICE_MOVELLA_PAYLOAD_MODES, DEVICE_OUTPUT_RATE_CODING, DEVICE_SENSOR_DELAY_CODING, type DEVICE_SIGNAL_TYPE, type DateBlurringFunction, DateCondition, DecimalCondition, type DeviceConfig, type DeviceName, Disjunction, type Display, type DisplayContent, type DisplayContentPath, type DisplayPath, type DisplayType, type DonationRecord, DonationSDK, type DonorIdentity, ERROR_CODES, ExistsCondition, type ExtendedProgramDevicesDataType, FITBIT_ANNOTATION_ITEM_BREATHING_RATE, FITBIT_ANNOTATION_ITEM_CALORIES, FITBIT_ANNOTATION_ITEM_HEART_RATE, FITBIT_ANNOTATION_ITEM_HEART_RATE_VARIABILITY, FITBIT_ANNOTATION_ITEM_SKIN_TEMPERATURE, FITBIT_ANNOTATION_ITEM_SLEEP_LEVEL, FITBIT_ANNOTATION_ITEM_SLEEP_LEVEL_DURATION, FITBIT_ANNOTATION_ITEM_SPO2, FITBIT_ANNOTATION_ITEM_STEPS, FITBIT_BREATHING_RATE_ANNOTATION, FITBIT_CALORIES_ANNOTATION, FITBIT_HEART_RATE_ANNOTATION, FITBIT_HEART_RATE_VARIABILITY_ANNOTATION, FITBIT_SIGNAL_TYPE_ANNOTATIONS, FITBIT_SKIN_TEMPERATURE_ANNOTATION, FITBIT_SLEEP_ANNOTATION, FITBIT_SLEEP_LEVEL_MAP, FITBIT_SPO2_ANNOTATION, FITBIT_STEPS_ANNOTATION, type FitbitSleepLevelTypes, type FrequencySubset, type FrequencyType, type Guard, IMUAnnotation, type InternalDeviceConfig, InternalSensorAnnotationTypes, KeyHandler, MaxValueExtension, MeasurementTypeSystem, type Message, type MessagePath, type MessageRecipient, MinLengthExtension, MinValueExtension, type MultiAnswers, ObservationTypeSystem, Offset, PAMSCardioVascularActivityAnnotation, PAMSGeneralActivityInstantaneousAnnotation, PAMSGeneralActivitySummaryAnnotation, PAMSStepCounterActivitySummaryAnnotation, PSMSHeartRateAnnotation, PSMSPPGGreenAnnotation, PSMSPPGIRAnnotation, PSMSPPGRedAnnotation, PSMSSkinTemperatureAnnotation, type PreviewTimeSeriesItem, type Program, type ProgramAnonymization, type ProgramClientTarget, type ProgramConsentStep, type ProgramContact, type ProgramContent, type ProgramContentPath, type ProgramDevice, type ProgramDeviceType, type ProgramDevicesDataType, type ProgramDevicesLabel, type ProgramDisplayStep, type ProgramDonation, type ProgramEligibilityStep, type ProgramFeatured, type ProgramRoutineStep, type ProgramSensorStep, type ProgramStep, type ProgramStepBase, type ProgramStepType, type ProgramSurveyStep, type ProgramTag, type ProgramTokenStep, type ProgramType, QItemControlDefinition, type QuestionInputType, type QuestionnaireResponse, type QuestionnaireScore, RECORDING_MODEL_CURRENT_VERSION, RECORDING_SIGNAL_MODEL_CURRENT_VERSION, type RecordState, type Recording, type RecordingSignal, type RecordingSignalItem, type RecordingSignalPreview, type RecordingSignalWithId, type RecordingTag, type RecursiveKeyOf, RelativeMaxValueExtension, RelativeMinValueExtension, type ReminderFrequencyType, type ReponseValue, type ResearchSubject, type ResearchSubjectProgress, type ResearchSubjectProgressState, type ResponseMinimal, type RestorationSize, type Routine, RoutineCondition, type RoutineContent, type RoutineContentPath, type RoutineContentStep, RoutineIsPassiveExtension, type RoutineTimes, type SDKDeviceConfig, type SDKInterface, SIGNAL_DURATION_CODING, type ScoreThreshold, type SeenDisplay, type SeenMessage, SensorIdentifierSystem, SensorSettingsSystem, SensorTypeSystem, SignalIDSystem, type SkippedStep, SliderMaxLabelExtension, SliderMinLabelExtension, SliderStepSizeExtension, type StepCondition, type StringTemplater, StudyNameSystem, type Survey, SurveyCondition, type SurveyContent, type SurveyContentPath, type SurveyScoring, type Tag, type TagEffectiveType, type TaskFrequency, type TaskReminder, type Threshold, TimeFuncs, type TimeWindow, TokenNamingSystem, type TranslatedString, ULID_REGEX, ULIDtoUUID, UUID_REGEX, UUIDtoULID, WORDLIST_LANGUAGES, WearOS3AnnotationMap, WebConverter, type WordListLanguage, YearCondition, binaryStringToUint8Array, calculateQuestionnaireScoreRange, calculateScoreRangeForItem, capitalizeFirstLetter, dayFormat, extractWordsFromRecoveryPhrase, generateFHIRConsent, generateFHIRQuestionnaireScore, generateFHIRRecordingBundle, generateFHIRResearchSubject, generateFHIRResponse, generateFHIRSeenDisplay, generateFHIRSeenMessage, generateFHIRTag, generateQuestionGuard, generateStepGuard, generateUrn, get, getLanguageOfPassPhrase, getMovellaAnnotation, getText, getTimeFuncs, indexArrayBy, isBeforeStartDate, isNotAfterEndDate, isNotBeforeStartDate, isScoreEligible, isYearString, newStepDateCondtion, overwriteTime, stringToDate, stringToYear, timezonelessDate, toDeviceConfig, toQuestionnaireResponseItem, uint8ArrayToBinaryString, utf8ToUint8Array, wordlists };