react-native-spike-sdk 4.6.13 → 4.8.13-beta.1

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 (186) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/com/spikesdk/SpikeMappers.kt +0 -46
  3. package/android/src/main/java/com/spikesdk/SpikeSdkModule.kt +18 -476
  4. package/ios/SpikeExceptionMapper.swift +4 -12
  5. package/ios/SpikeSdk.m +5 -79
  6. package/ios/SpikeSdk.swift +28 -417
  7. package/lib/commonjs/Spike.js +35 -58
  8. package/lib/commonjs/Spike.js.map +1 -1
  9. package/lib/commonjs/SpikeException.js +15 -94
  10. package/lib/commonjs/SpikeException.js.map +1 -1
  11. package/lib/commonjs/index.js +1 -71
  12. package/lib/commonjs/index.js.map +1 -1
  13. package/lib/commonjs/version.js +1 -1
  14. package/lib/commonjs/version.js.map +1 -1
  15. package/lib/module/Spike.js +34 -56
  16. package/lib/module/Spike.js.map +1 -1
  17. package/lib/module/SpikeException.js +14 -83
  18. package/lib/module/SpikeException.js.map +1 -1
  19. package/lib/module/index.js +4 -8
  20. package/lib/module/index.js.map +1 -1
  21. package/lib/module/version.js +1 -1
  22. package/lib/module/version.js.map +1 -1
  23. package/lib/typescript/Spike.d.ts +22 -29
  24. package/lib/typescript/Spike.d.ts.map +1 -1
  25. package/lib/typescript/SpikeException.d.ts +5 -30
  26. package/lib/typescript/SpikeException.d.ts.map +1 -1
  27. package/lib/typescript/index.d.ts +5 -24
  28. package/lib/typescript/index.d.ts.map +1 -1
  29. package/lib/typescript/version.d.ts +1 -1
  30. package/lib/typescript/version.d.ts.map +1 -1
  31. package/package.json +2 -2
  32. package/src/Spike.ts +45 -89
  33. package/src/SpikeException.ts +13 -96
  34. package/src/index.ts +2 -61
  35. package/src/version.ts +1 -1
  36. package/android/src/main/java/com/spikesdk/SpikeConnectionLogger.kt +0 -37
  37. package/ios/SpikeConnectionListener.swift +0 -17
  38. package/ios/SpikeConnectionLogger.swift +0 -43
  39. package/ios/SpikeDataTypeMapper.swift +0 -255
  40. package/lib/commonjs/DataModels/SpikeActivitiesStreamDataEntry.js +0 -2
  41. package/lib/commonjs/DataModels/SpikeActivitiesStreamDataEntry.js.map +0 -1
  42. package/lib/commonjs/DataModels/SpikeActivitiesSummaryDataEntry.js +0 -2
  43. package/lib/commonjs/DataModels/SpikeActivitiesSummaryDataEntry.js.map +0 -1
  44. package/lib/commonjs/DataModels/SpikeBodyDataEntry.js +0 -2
  45. package/lib/commonjs/DataModels/SpikeBodyDataEntry.js.map +0 -1
  46. package/lib/commonjs/DataModels/SpikeBreathingDataEntry.js +0 -2
  47. package/lib/commonjs/DataModels/SpikeBreathingDataEntry.js.map +0 -1
  48. package/lib/commonjs/DataModels/SpikeCaloriesDataEntry.js +0 -2
  49. package/lib/commonjs/DataModels/SpikeCaloriesDataEntry.js.map +0 -1
  50. package/lib/commonjs/DataModels/SpikeData.js +0 -6
  51. package/lib/commonjs/DataModels/SpikeData.js.map +0 -1
  52. package/lib/commonjs/DataModels/SpikeDataTypes.js +0 -23
  53. package/lib/commonjs/DataModels/SpikeDataTypes.js.map +0 -1
  54. package/lib/commonjs/DataModels/SpikeDistanceDataEntry.js +0 -2
  55. package/lib/commonjs/DataModels/SpikeDistanceDataEntry.js.map +0 -1
  56. package/lib/commonjs/DataModels/SpikeEcgDataEntry.js +0 -2
  57. package/lib/commonjs/DataModels/SpikeEcgDataEntry.js.map +0 -1
  58. package/lib/commonjs/DataModels/SpikeGlucoseDataEntry.js +0 -2
  59. package/lib/commonjs/DataModels/SpikeGlucoseDataEntry.js.map +0 -1
  60. package/lib/commonjs/DataModels/SpikeHeartDataEntry.js +0 -2
  61. package/lib/commonjs/DataModels/SpikeHeartDataEntry.js.map +0 -1
  62. package/lib/commonjs/DataModels/SpikeOxygenSaturationDataEntry.js +0 -2
  63. package/lib/commonjs/DataModels/SpikeOxygenSaturationDataEntry.js.map +0 -1
  64. package/lib/commonjs/DataModels/SpikeSleepDataEntry.js +0 -2
  65. package/lib/commonjs/DataModels/SpikeSleepDataEntry.js.map +0 -1
  66. package/lib/commonjs/DataModels/SpikeStepsDataEntry.js +0 -2
  67. package/lib/commonjs/DataModels/SpikeStepsDataEntry.js.map +0 -1
  68. package/lib/commonjs/DataModels/SpikeStepsIntradayDataEntry.js +0 -2
  69. package/lib/commonjs/DataModels/SpikeStepsIntradayDataEntry.js.map +0 -1
  70. package/lib/commonjs/DataModels/SpikeWebhookJob.js +0 -2
  71. package/lib/commonjs/DataModels/SpikeWebhookJob.js.map +0 -1
  72. package/lib/commonjs/DataTypes/SpikeDataType.js +0 -59
  73. package/lib/commonjs/DataTypes/SpikeDataType.js.map +0 -1
  74. package/lib/commonjs/SpikeBackgroundDeliveriesLogger.js +0 -2
  75. package/lib/commonjs/SpikeBackgroundDeliveriesLogger.js.map +0 -1
  76. package/lib/commonjs/SpikeConnection.js +0 -301
  77. package/lib/commonjs/SpikeConnection.js.map +0 -1
  78. package/lib/commonjs/SpikeConnectionTypes.js +0 -6
  79. package/lib/commonjs/SpikeConnectionTypes.js.map +0 -1
  80. package/lib/commonjs/SpikeLogger.js +0 -6
  81. package/lib/commonjs/SpikeLogger.js.map +0 -1
  82. package/lib/module/DataModels/SpikeActivitiesStreamDataEntry.js +0 -2
  83. package/lib/module/DataModels/SpikeActivitiesStreamDataEntry.js.map +0 -1
  84. package/lib/module/DataModels/SpikeActivitiesSummaryDataEntry.js +0 -2
  85. package/lib/module/DataModels/SpikeActivitiesSummaryDataEntry.js.map +0 -1
  86. package/lib/module/DataModels/SpikeBodyDataEntry.js +0 -2
  87. package/lib/module/DataModels/SpikeBodyDataEntry.js.map +0 -1
  88. package/lib/module/DataModels/SpikeBreathingDataEntry.js +0 -2
  89. package/lib/module/DataModels/SpikeBreathingDataEntry.js.map +0 -1
  90. package/lib/module/DataModels/SpikeCaloriesDataEntry.js +0 -2
  91. package/lib/module/DataModels/SpikeCaloriesDataEntry.js.map +0 -1
  92. package/lib/module/DataModels/SpikeData.js +0 -4
  93. package/lib/module/DataModels/SpikeData.js.map +0 -1
  94. package/lib/module/DataModels/SpikeDataTypes.js +0 -19
  95. package/lib/module/DataModels/SpikeDataTypes.js.map +0 -1
  96. package/lib/module/DataModels/SpikeDistanceDataEntry.js +0 -2
  97. package/lib/module/DataModels/SpikeDistanceDataEntry.js.map +0 -1
  98. package/lib/module/DataModels/SpikeEcgDataEntry.js +0 -2
  99. package/lib/module/DataModels/SpikeEcgDataEntry.js.map +0 -1
  100. package/lib/module/DataModels/SpikeGlucoseDataEntry.js +0 -2
  101. package/lib/module/DataModels/SpikeGlucoseDataEntry.js.map +0 -1
  102. package/lib/module/DataModels/SpikeHeartDataEntry.js +0 -2
  103. package/lib/module/DataModels/SpikeHeartDataEntry.js.map +0 -1
  104. package/lib/module/DataModels/SpikeOxygenSaturationDataEntry.js +0 -2
  105. package/lib/module/DataModels/SpikeOxygenSaturationDataEntry.js.map +0 -1
  106. package/lib/module/DataModels/SpikeSleepDataEntry.js +0 -2
  107. package/lib/module/DataModels/SpikeSleepDataEntry.js.map +0 -1
  108. package/lib/module/DataModels/SpikeStepsDataEntry.js +0 -2
  109. package/lib/module/DataModels/SpikeStepsDataEntry.js.map +0 -1
  110. package/lib/module/DataModels/SpikeStepsIntradayDataEntry.js +0 -2
  111. package/lib/module/DataModels/SpikeStepsIntradayDataEntry.js.map +0 -1
  112. package/lib/module/DataModels/SpikeWebhookJob.js +0 -2
  113. package/lib/module/DataModels/SpikeWebhookJob.js.map +0 -1
  114. package/lib/module/DataTypes/SpikeDataType.js +0 -42
  115. package/lib/module/DataTypes/SpikeDataType.js.map +0 -1
  116. package/lib/module/SpikeBackgroundDeliveriesLogger.js +0 -2
  117. package/lib/module/SpikeBackgroundDeliveriesLogger.js.map +0 -1
  118. package/lib/module/SpikeConnection.js +0 -296
  119. package/lib/module/SpikeConnection.js.map +0 -1
  120. package/lib/module/SpikeConnectionTypes.js +0 -4
  121. package/lib/module/SpikeConnectionTypes.js.map +0 -1
  122. package/lib/module/SpikeLogger.js +0 -4
  123. package/lib/module/SpikeLogger.js.map +0 -1
  124. package/lib/typescript/DataModels/SpikeActivitiesStreamDataEntry.d.ts +0 -66
  125. package/lib/typescript/DataModels/SpikeActivitiesStreamDataEntry.d.ts.map +0 -1
  126. package/lib/typescript/DataModels/SpikeActivitiesSummaryDataEntry.d.ts +0 -29
  127. package/lib/typescript/DataModels/SpikeActivitiesSummaryDataEntry.d.ts.map +0 -1
  128. package/lib/typescript/DataModels/SpikeBodyDataEntry.d.ts +0 -54
  129. package/lib/typescript/DataModels/SpikeBodyDataEntry.d.ts.map +0 -1
  130. package/lib/typescript/DataModels/SpikeBreathingDataEntry.d.ts +0 -13
  131. package/lib/typescript/DataModels/SpikeBreathingDataEntry.d.ts.map +0 -1
  132. package/lib/typescript/DataModels/SpikeCaloriesDataEntry.d.ts +0 -15
  133. package/lib/typescript/DataModels/SpikeCaloriesDataEntry.d.ts.map +0 -1
  134. package/lib/typescript/DataModels/SpikeData.d.ts +0 -27
  135. package/lib/typescript/DataModels/SpikeData.d.ts.map +0 -1
  136. package/lib/typescript/DataModels/SpikeDataTypes.d.ts +0 -17
  137. package/lib/typescript/DataModels/SpikeDataTypes.d.ts.map +0 -1
  138. package/lib/typescript/DataModels/SpikeDistanceDataEntry.d.ts +0 -13
  139. package/lib/typescript/DataModels/SpikeDistanceDataEntry.d.ts.map +0 -1
  140. package/lib/typescript/DataModels/SpikeEcgDataEntry.d.ts +0 -13
  141. package/lib/typescript/DataModels/SpikeEcgDataEntry.d.ts.map +0 -1
  142. package/lib/typescript/DataModels/SpikeGlucoseDataEntry.d.ts +0 -21
  143. package/lib/typescript/DataModels/SpikeGlucoseDataEntry.d.ts.map +0 -1
  144. package/lib/typescript/DataModels/SpikeHeartDataEntry.d.ts +0 -32
  145. package/lib/typescript/DataModels/SpikeHeartDataEntry.d.ts.map +0 -1
  146. package/lib/typescript/DataModels/SpikeOxygenSaturationDataEntry.d.ts +0 -15
  147. package/lib/typescript/DataModels/SpikeOxygenSaturationDataEntry.d.ts.map +0 -1
  148. package/lib/typescript/DataModels/SpikeSleepDataEntry.d.ts +0 -30
  149. package/lib/typescript/DataModels/SpikeSleepDataEntry.d.ts.map +0 -1
  150. package/lib/typescript/DataModels/SpikeStepsDataEntry.d.ts +0 -13
  151. package/lib/typescript/DataModels/SpikeStepsDataEntry.d.ts.map +0 -1
  152. package/lib/typescript/DataModels/SpikeStepsIntradayDataEntry.d.ts +0 -17
  153. package/lib/typescript/DataModels/SpikeStepsIntradayDataEntry.d.ts.map +0 -1
  154. package/lib/typescript/DataModels/SpikeWebhookJob.d.ts +0 -11
  155. package/lib/typescript/DataModels/SpikeWebhookJob.d.ts.map +0 -1
  156. package/lib/typescript/DataTypes/SpikeDataType.d.ts +0 -68
  157. package/lib/typescript/DataTypes/SpikeDataType.d.ts.map +0 -1
  158. package/lib/typescript/SpikeBackgroundDeliveriesLogger.d.ts +0 -4
  159. package/lib/typescript/SpikeBackgroundDeliveriesLogger.d.ts.map +0 -1
  160. package/lib/typescript/SpikeConnection.d.ts +0 -63
  161. package/lib/typescript/SpikeConnection.d.ts.map +0 -1
  162. package/lib/typescript/SpikeConnectionTypes.d.ts +0 -102
  163. package/lib/typescript/SpikeConnectionTypes.d.ts.map +0 -1
  164. package/lib/typescript/SpikeLogger.d.ts +0 -13
  165. package/lib/typescript/SpikeLogger.d.ts.map +0 -1
  166. package/src/DataModels/SpikeActivitiesStreamDataEntry.ts +0 -67
  167. package/src/DataModels/SpikeActivitiesSummaryDataEntry.ts +0 -28
  168. package/src/DataModels/SpikeBodyDataEntry.ts +0 -61
  169. package/src/DataModels/SpikeBreathingDataEntry.ts +0 -12
  170. package/src/DataModels/SpikeCaloriesDataEntry.ts +0 -13
  171. package/src/DataModels/SpikeData.ts +0 -38
  172. package/src/DataModels/SpikeDataTypes.ts +0 -31
  173. package/src/DataModels/SpikeDistanceDataEntry.ts +0 -12
  174. package/src/DataModels/SpikeEcgDataEntry.ts +0 -12
  175. package/src/DataModels/SpikeGlucoseDataEntry.ts +0 -20
  176. package/src/DataModels/SpikeHeartDataEntry.ts +0 -34
  177. package/src/DataModels/SpikeOxygenSaturationDataEntry.ts +0 -14
  178. package/src/DataModels/SpikeSleepDataEntry.ts +0 -29
  179. package/src/DataModels/SpikeStepsDataEntry.ts +0 -12
  180. package/src/DataModels/SpikeStepsIntradayDataEntry.ts +0 -16
  181. package/src/DataModels/SpikeWebhookJob.ts +0 -10
  182. package/src/DataTypes/SpikeDataType.ts +0 -93
  183. package/src/SpikeBackgroundDeliveriesLogger.ts +0 -3
  184. package/src/SpikeConnection.ts +0 -495
  185. package/src/SpikeConnectionTypes.ts +0 -124
  186. package/src/SpikeLogger.ts +0 -14
@@ -1,61 +0,0 @@
1
- export type SpikeBodyDataEntry = {
2
- date?: string;
3
- bodyData?: BodyData;
4
- temperatureData?: TemperatureData;
5
- bloodPressureData?: BloodPressureDataObject[];
6
- source?: string;
7
- };
8
-
9
- type BodyData = {
10
- weightKg?: BodyDataObject;
11
- heightCm?: BodyDataObject;
12
- bmi?: BodyDataObject;
13
- bodyFatPercentage?: BodyDataObject;
14
- boneMassG?: BodyDataObject;
15
- muscleMassG?: BodyDataObject;
16
- waterPercentage?: BodyDataObject;
17
- };
18
-
19
- type BodyDataObject = {
20
- value?: number;
21
- timeseries?: BodyDataObjectItem[];
22
- };
23
-
24
- type BodyDataObjectItem = {
25
- timestamp?: string;
26
- value?: number;
27
- };
28
-
29
- type TemperatureData = {
30
- skinTemperature?: TemperatureDataObject;
31
- coreTemperature?: TemperatureDataObject;
32
- baselineSkinTemperature?: TemperatureDataObject;
33
- baselineCoreTemperature?: TemperatureDataObject;
34
- diffFromBaselineTemperature?: DiffTemperatureDataObject;
35
- };
36
-
37
- type TemperatureDataObject = {
38
- temperatureCelsius?: number;
39
- timeseries?: TemperatureDataObjectItem[];
40
- };
41
-
42
- type TemperatureDataObjectItem = {
43
- timestamp?: string;
44
- temperatureCelsius?: number;
45
- };
46
-
47
- type DiffTemperatureDataObject = {
48
- diffTemperatureCelsius?: number;
49
- timeseries?: DiffTemperatureDataObjectItem[];
50
- };
51
-
52
- type DiffTemperatureDataObjectItem = {
53
- timestamp?: string;
54
- diffTemperatureCelsius?: number;
55
- };
56
-
57
- type BloodPressureDataObject = {
58
- timestamp?: string;
59
- systolicBloodPressure?: number;
60
- diastolicBloodPressure?: number;
61
- };
@@ -1,12 +0,0 @@
1
- export type SpikeBreathingDataEntry = {
2
- date?: string;
3
- avgValue?: number;
4
- intradayData?: IntradayData[];
5
- source?: string;
6
- dataType?: string;
7
- };
8
-
9
- type IntradayData = {
10
- time: string;
11
- value?: number;
12
- };
@@ -1,13 +0,0 @@
1
- export type SpikeCaloriesDataEntry = {
2
- date?: string;
3
- value?: number;
4
- intradayData?: IntradayData[];
5
- source?: string;
6
- dataType?: string;
7
- };
8
- type IntradayData = {
9
- level?: number;
10
- mets?: number;
11
- time: string;
12
- value?: number;
13
- };
@@ -1,38 +0,0 @@
1
- import type { SpikeActivitiesStreamDataEntry } from './SpikeActivitiesStreamDataEntry';
2
- import type { SpikeActivitiesSummaryDataEntry } from './SpikeActivitiesSummaryDataEntry';
3
- import type { SpikeBodyDataEntry } from './SpikeBodyDataEntry';
4
- import type { SpikeBreathingDataEntry } from './SpikeBreathingDataEntry';
5
- import type { SpikeCaloriesDataEntry } from './SpikeCaloriesDataEntry';
6
- import type { SpikeDistanceDataEntry } from './SpikeDistanceDataEntry';
7
- import type { SpikeGlucoseDataEntry } from './SpikeGlucoseDataEntry';
8
- import type { SpikeHeartDataEntry } from './SpikeHeartDataEntry';
9
- import type { SpikeOxygenSaturationDataEntry } from './SpikeOxygenSaturationDataEntry';
10
- import type { SpikeSleepDataEntry } from './SpikeSleepDataEntry';
11
- import type { SpikeStepsDataEntry } from './SpikeStepsDataEntry';
12
-
13
- export type SpikeDataEntry =
14
- | SpikeActivitiesSummaryDataEntry
15
- | SpikeActivitiesStreamDataEntry
16
- | SpikeBreathingDataEntry
17
- | SpikeCaloriesDataEntry
18
- | SpikeDistanceDataEntry
19
- | SpikeGlucoseDataEntry
20
- | SpikeHeartDataEntry
21
- | SpikeOxygenSaturationDataEntry
22
- | SpikeSleepDataEntry
23
- | SpikeStepsDataEntry
24
- | SpikeBodyDataEntry;
25
- export interface SpikeData<DataEntry extends SpikeDataEntry> {
26
- dateFrom: string;
27
- dateTo: string;
28
- collectedAt: string;
29
- endUserId: string;
30
- sources: SpikeSource[];
31
- entries: DataEntry[];
32
- }
33
-
34
- interface SpikeSource {
35
- name: string;
36
- isSuccess: boolean;
37
- message: string;
38
- }
@@ -1,31 +0,0 @@
1
- import {
2
- SpikeActivitiesStreamDataType,
3
- SpikeActivitiesSummaryDataType,
4
- SpikeBreathingDataType,
5
- SpikeCaloriesDataType,
6
- SpikeDistanceDataType,
7
- SpikeGlucoseDataType,
8
- SpikeHeartDataType,
9
- SpikeOxygenSaturationDataType,
10
- SpikeSleepDataType,
11
- SpikeStepsDataType,
12
- SpikeBodyDataType,
13
- SpikeStepsIntradayDataType,
14
- SpikeEcgDataType,
15
- } from '../DataTypes/SpikeDataType';
16
-
17
- export const SpikeDataTypes = {
18
- activitiesSummary: new SpikeActivitiesSummaryDataType(),
19
- activitiesStream: new SpikeActivitiesStreamDataType(),
20
- breathing: new SpikeBreathingDataType(),
21
- calories: new SpikeCaloriesDataType(),
22
- distance: new SpikeDistanceDataType(),
23
- glucose: new SpikeGlucoseDataType(),
24
- heart: new SpikeHeartDataType(),
25
- oxygenSaturation: new SpikeOxygenSaturationDataType(),
26
- sleep: new SpikeSleepDataType(),
27
- steps: new SpikeStepsDataType(),
28
- stepsIntraday: new SpikeStepsIntradayDataType(),
29
- body: new SpikeBodyDataType(),
30
- ecg: new SpikeEcgDataType(),
31
- };
@@ -1,12 +0,0 @@
1
- export type SpikeDistanceDataEntry = {
2
- date?: string;
3
- value?: number;
4
- intradayData?: IntradayData[];
5
- source?: string;
6
- dataType?: string;
7
- };
8
-
9
- type IntradayData = {
10
- time: string;
11
- value?: number;
12
- };
@@ -1,12 +0,0 @@
1
- export type SpikeEcgDataEntry = {
2
- frequency?: number;
3
- classification?: string;
4
- lead?: string;
5
- originalSource?: string[];
6
- source?: string;
7
- timeStart?: string;
8
- timeEnd?: string;
9
- timezoneOffset?: number;
10
- unit?: string;
11
- samples?: number[];
12
- };
@@ -1,20 +0,0 @@
1
- export type SpikeGlucoseDataEntry = {
2
- date?: string;
3
- avgValue?: number;
4
- minValue?: number;
5
- maxValue?: number;
6
- unit?: string;
7
- source?: string;
8
- intradayData?: IntradayData[];
9
- dataType?: string;
10
- };
11
-
12
- type IntradayData = {
13
- time: string;
14
- value?: number;
15
- realtimeValue?: number;
16
- smoothedValue?: number;
17
- status?: string;
18
- trend?: string;
19
- trendRate?: number;
20
- };
@@ -1,34 +0,0 @@
1
- export type SpikeHeartDataEntry = {
2
- date?: string;
3
- restingHeartRate?: number;
4
- minHeartRate?: number;
5
- avgHeartRate?: number;
6
- maxHeartRate?: number;
7
- heartRateSamples?: Sample[];
8
- heartRateVariability?: Variability;
9
- intradayHRV?: IntradayHrv[];
10
- source?: string;
11
- dataType?: string;
12
- };
13
-
14
- type Sample = {
15
- time: string;
16
- value?: number;
17
- };
18
-
19
- type Variability = {
20
- dayHRV?: number;
21
- sleepHRV?: number;
22
- };
23
-
24
- type IntradayHrv = {
25
- time: string;
26
- value?: Value;
27
- };
28
-
29
- type Value = {
30
- rmssd?: number;
31
- coverage?: number;
32
- hf?: number;
33
- lf?: number;
34
- };
@@ -1,14 +0,0 @@
1
- export type SpikeOxygenSaturationDataEntry = {
2
- date?: string;
3
- avg?: number;
4
- min?: number;
5
- max?: number;
6
- intradayData?: IntradayData[];
7
- source?: string;
8
- dataType?: string;
9
- };
10
-
11
- type IntradayData = {
12
- time: string;
13
- value?: number;
14
- };
@@ -1,29 +0,0 @@
1
- export type SpikeSleepDataEntry = {
2
- date?: string;
3
- bedtimeStart?: string;
4
- bedtimeEnd?: string;
5
- timezoneOffset?: number;
6
- bedtimeDuration?: number;
7
- totalSleep?: number;
8
- awake?: number;
9
- light?: number;
10
- rem?: number;
11
- deep?: number;
12
- hrLowest?: number;
13
- hrAverage?: number;
14
- efficiency?: number;
15
- latency?: number;
16
- temperatureDelta?: number;
17
- averageHrv?: number;
18
- respiratoryRate?: number;
19
- standardizedSleepScore?: number;
20
- sourceSpecificSleepScore?: number;
21
- source?: string;
22
- levels?: Levels[];
23
- };
24
-
25
- type Levels = {
26
- dateTime?: string;
27
- level?: string;
28
- seconds?: number;
29
- };
@@ -1,12 +0,0 @@
1
- export type SpikeStepsDataEntry = {
2
- date?: string;
3
- value?: number;
4
- intradayData?: IntradayData[];
5
- source?: string;
6
- dataType?: string;
7
- };
8
-
9
- type IntradayData = {
10
- time: string;
11
- value?: number;
12
- };
@@ -1,16 +0,0 @@
1
- export type SpikeStepsIntradayDataEntry = {
2
- date?: string;
3
- value?: number;
4
- intradayData?: IntradayData[];
5
- source?: string;
6
- dataType?: string;
7
- timezoneOffset: number;
8
- };
9
-
10
- type IntradayData = {
11
- timeStart: string;
12
- timeEnd: string;
13
- value: number;
14
- source?: string;
15
- metadata?: Record<string, string>;
16
- };
@@ -1,10 +0,0 @@
1
- export interface SpikeWebhookJob {
2
- notificationId?: string;
3
- dataType: string;
4
- payloadSize: number;
5
- callbackUrl: URL;
6
- dateFrom: Date;
7
- dateTo: Date;
8
- collectedAt: Date;
9
- submittedAt?: Date;
10
- }
@@ -1,93 +0,0 @@
1
- import type { SpikeActivitiesStreamDataEntry } from '../DataModels/SpikeActivitiesStreamDataEntry';
2
- import type { SpikeActivitiesSummaryDataEntry } from '../DataModels/SpikeActivitiesSummaryDataEntry';
3
- import type { SpikeBreathingDataEntry } from '../DataModels/SpikeBreathingDataEntry';
4
- import type { SpikeCaloriesDataEntry } from '../DataModels/SpikeCaloriesDataEntry';
5
- import type { SpikeDistanceDataEntry } from '../DataModels/SpikeDistanceDataEntry';
6
- import type { SpikeGlucoseDataEntry } from '../DataModels/SpikeGlucoseDataEntry';
7
- import type { SpikeHeartDataEntry } from '../DataModels/SpikeHeartDataEntry';
8
- import type { SpikeOxygenSaturationDataEntry } from '../DataModels/SpikeOxygenSaturationDataEntry';
9
- import type { SpikeSleepDataEntry } from '../DataModels/SpikeSleepDataEntry';
10
- import type { SpikeStepsDataEntry } from '../DataModels/SpikeStepsDataEntry';
11
- import type { SpikeBodyDataEntry } from '../DataModels/SpikeBodyDataEntry';
12
- import type { SpikeStepsIntradayDataEntry } from '../DataModels/SpikeStepsIntradayDataEntry';
13
- import type { SpikeEcgDataEntry } from '../DataModels/SpikeEcgDataEntry';
14
-
15
- type SpikeDataTypeValues =
16
- | 'activities_summary'
17
- | 'activities_stream'
18
- | 'breathing'
19
- | 'calories'
20
- | 'distance'
21
- | 'glucose'
22
- | 'heart'
23
- | 'oxygen_saturation'
24
- | 'sleep'
25
- | 'steps'
26
- | 'steps_intraday'
27
- | 'body'
28
- | 'ecg'
29
- ;
30
- export class SpikeActivitiesStreamDataType {
31
- rawValue: SpikeDataTypeValues = 'activities_stream';
32
- rawObject?: SpikeActivitiesStreamDataEntry;
33
- }
34
-
35
- export class SpikeActivitiesSummaryDataType {
36
- rawValue: SpikeDataTypeValues = 'activities_summary';
37
- rawObject?: SpikeActivitiesSummaryDataEntry;
38
- }
39
-
40
- export class SpikeBreathingDataType {
41
- rawValue: SpikeDataTypeValues = 'breathing';
42
- rawObject?: SpikeBreathingDataEntry;
43
- }
44
-
45
- export class SpikeCaloriesDataType {
46
- rawValue: SpikeDataTypeValues = 'calories';
47
- rawObject?: SpikeCaloriesDataEntry;
48
- }
49
-
50
- export class SpikeDistanceDataType {
51
- rawValue: SpikeDataTypeValues = 'distance';
52
- rawObject?: SpikeDistanceDataEntry;
53
- }
54
-
55
- export class SpikeGlucoseDataType {
56
- rawValue: SpikeDataTypeValues = 'glucose';
57
- rawObject?: SpikeGlucoseDataEntry;
58
- }
59
-
60
- export class SpikeHeartDataType {
61
- rawValue: SpikeDataTypeValues = 'heart';
62
- rawObject?: SpikeHeartDataEntry;
63
- }
64
-
65
- export class SpikeOxygenSaturationDataType {
66
- rawValue: SpikeDataTypeValues = 'oxygen_saturation';
67
- rawObject?: SpikeOxygenSaturationDataEntry;
68
- }
69
-
70
- export class SpikeSleepDataType {
71
- rawValue: SpikeDataTypeValues = 'sleep';
72
- rawObject?: SpikeSleepDataEntry;
73
- }
74
-
75
- export class SpikeStepsDataType {
76
- rawValue: SpikeDataTypeValues = 'steps';
77
- rawObject?: SpikeStepsDataEntry;
78
- }
79
-
80
- export class SpikeStepsIntradayDataType {
81
- rawValue: SpikeDataTypeValues = 'steps_intraday';
82
- rawObject?: SpikeStepsIntradayDataEntry;
83
- }
84
-
85
- export class SpikeBodyDataType {
86
- rawValue: SpikeDataTypeValues = 'body';
87
- rawObject?: SpikeBodyDataEntry;
88
- }
89
-
90
- export class SpikeEcgDataType {
91
- rawValue: SpikeDataTypeValues = 'ecg';
92
- rawObject?: SpikeEcgDataEntry;
93
- }
@@ -1,3 +0,0 @@
1
- export interface SpikeBackgroundDeliveriesLogger {
2
- onBackgroundLog: (log: string) => void;
3
- }