react-native-spike-sdk 4.3.73-beta.3 → 4.3.83
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/android/build.gradle +1 -1
- package/lib/commonjs/DataModels/SpikeActivitiesStreamDataEntry.js +2 -0
- package/lib/commonjs/DataModels/SpikeActivitiesSummaryDataEntry.js +2 -0
- package/lib/commonjs/DataModels/SpikeBodyDataEntry.js +2 -0
- package/lib/commonjs/DataModels/SpikeBreathingDataEntry.js +2 -0
- package/lib/commonjs/DataModels/SpikeCaloriesDataEntry.js +2 -0
- package/lib/commonjs/DataModels/SpikeData.js +6 -0
- package/lib/commonjs/DataModels/SpikeDataTypes.js +23 -0
- package/lib/commonjs/DataModels/SpikeDistanceDataEntry.js +2 -0
- package/lib/commonjs/DataModels/SpikeEcgDataEntry.js +2 -0
- package/lib/commonjs/DataModels/SpikeGlucoseDataEntry.js +2 -0
- package/lib/commonjs/DataModels/SpikeHeartDataEntry.js +2 -0
- package/lib/commonjs/DataModels/SpikeOxygenSaturationDataEntry.js +2 -0
- package/lib/commonjs/DataModels/SpikeSleepDataEntry.js +2 -0
- package/lib/commonjs/DataModels/SpikeStepsDataEntry.js +2 -0
- package/lib/commonjs/DataModels/SpikeStepsIntradayDataEntry.js +2 -0
- package/lib/commonjs/DataModels/SpikeWebhookJob.js +2 -0
- package/lib/commonjs/DataTypes/SpikeDataType.js +59 -0
- package/lib/commonjs/Spike.js +116 -0
- package/lib/commonjs/SpikeBackgroundDeliveriesLogger.js +2 -0
- package/lib/commonjs/SpikeConnection.js +298 -0
- package/lib/commonjs/SpikeConnectionTypes.js +6 -0
- package/lib/commonjs/SpikeException.js +110 -0
- package/lib/commonjs/SpikeLogger.js +6 -0
- package/lib/commonjs/SpikeSdk.js +9 -0
- package/lib/commonjs/index.js +205 -0
- package/lib/commonjs/v3/Conversion.js +53 -0
- package/lib/commonjs/v3/DataModels/ActivityAdditionalData.js +18 -0
- package/lib/commonjs/v3/DataModels/ActivityAdditionalData.js.map +1 -0
- package/lib/commonjs/v3/DataModels/ActivityConfig.js +17 -0
- package/lib/commonjs/v3/DataModels/ActivityConfig.js.map +1 -0
- package/lib/commonjs/v3/DataModels/ActivityEntry.js +2 -0
- package/lib/commonjs/v3/DataModels/ActivitySamples.js +2 -0
- package/lib/commonjs/v3/DataModels/ActivityTag.js +32 -0
- package/lib/commonjs/v3/DataModels/ActivityType.js +153 -0
- package/lib/commonjs/v3/DataModels/BackgroundDeliveryConfig.js +6 -0
- package/lib/commonjs/v3/DataModels/Gender.js +15 -0
- package/lib/commonjs/v3/DataModels/HealthConnectAvailabilityStatus.js +13 -0
- package/lib/commonjs/v3/DataModels/InputMethod.js +15 -0
- package/lib/commonjs/v3/DataModels/LogLevel.js +16 -0
- package/lib/commonjs/v3/DataModels/MetricType.js +74 -0
- package/lib/commonjs/v3/DataModels/Provider.js +29 -0
- package/lib/commonjs/v3/DataModels/Provider.js.map +1 -1
- package/lib/commonjs/v3/DataModels/ProviderSource.js +52 -0
- package/lib/commonjs/v3/DataModels/RecordSource.js +2 -0
- package/lib/commonjs/v3/DataModels/SamsungHealthDataAvailability.js +6 -0
- package/lib/commonjs/v3/DataModels/SamsungHealthDataAvailabilityStatus.js +37 -0
- package/lib/commonjs/v3/DataModels/SleepConfig.js +15 -0
- package/lib/commonjs/v3/DataModels/SpikeRecord.js +6 -0
- package/lib/commonjs/v3/DataModels/Statistic.js +6 -0
- package/lib/commonjs/v3/DataModels/StatisticsInterval.js +14 -0
- package/lib/commonjs/v3/DataModels/StatisticsType.js +27 -0
- package/lib/commonjs/v3/DataModels/UUID.js +2 -0
- package/lib/commonjs/v3/DataModels/Unit.js +21 -0
- package/lib/commonjs/v3/DataModels/UserInfoResponse.js +6 -0
- package/lib/commonjs/v3/DataModels/UserProperties.js +6 -0
- package/lib/commonjs/v3/SpikeRNConnectionAPIv3.js +394 -0
- package/lib/commonjs/v3/StatisticsFilter.js +20 -0
- package/lib/commonjs/version.js +9 -0
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/DataModels/SpikeActivitiesStreamDataEntry.js +2 -0
- package/lib/module/DataModels/SpikeActivitiesStreamDataEntry.js.map +1 -0
- package/lib/module/DataModels/SpikeActivitiesSummaryDataEntry.js +2 -0
- package/lib/module/DataModels/SpikeActivitiesSummaryDataEntry.js.map +1 -0
- package/lib/module/DataModels/SpikeBodyDataEntry.js +2 -0
- package/lib/module/DataModels/SpikeBodyDataEntry.js.map +1 -0
- package/lib/module/DataModels/SpikeBreathingDataEntry.js +2 -0
- package/lib/module/DataModels/SpikeBreathingDataEntry.js.map +1 -0
- package/lib/module/DataModels/SpikeCaloriesDataEntry.js +2 -0
- package/lib/module/DataModels/SpikeCaloriesDataEntry.js.map +1 -0
- package/lib/module/DataModels/SpikeData.js +4 -0
- package/lib/module/DataModels/SpikeData.js.map +1 -0
- package/lib/module/DataModels/SpikeDataTypes.js +19 -0
- package/lib/module/DataModels/SpikeDataTypes.js.map +1 -0
- package/lib/module/DataModels/SpikeDistanceDataEntry.js +2 -0
- package/lib/module/DataModels/SpikeDistanceDataEntry.js.map +1 -0
- package/lib/module/DataModels/SpikeEcgDataEntry.js +2 -0
- package/lib/module/DataModels/SpikeEcgDataEntry.js.map +1 -0
- package/lib/module/DataModels/SpikeGlucoseDataEntry.js +2 -0
- package/lib/module/DataModels/SpikeGlucoseDataEntry.js.map +1 -0
- package/lib/module/DataModels/SpikeHeartDataEntry.js +2 -0
- package/lib/module/DataModels/SpikeHeartDataEntry.js.map +1 -0
- package/lib/module/DataModels/SpikeOxygenSaturationDataEntry.js +2 -0
- package/lib/module/DataModels/SpikeOxygenSaturationDataEntry.js.map +1 -0
- package/lib/module/DataModels/SpikeSleepDataEntry.js +2 -0
- package/lib/module/DataModels/SpikeSleepDataEntry.js.map +1 -0
- package/lib/module/DataModels/SpikeStepsDataEntry.js +2 -0
- package/lib/module/DataModels/SpikeStepsDataEntry.js.map +1 -0
- package/lib/module/DataModels/SpikeStepsIntradayDataEntry.js +2 -0
- package/lib/module/DataModels/SpikeStepsIntradayDataEntry.js.map +1 -0
- package/lib/module/DataModels/SpikeWebhookJob.js +2 -0
- package/lib/module/DataModels/SpikeWebhookJob.js.map +1 -0
- package/lib/module/DataTypes/SpikeDataType.js +42 -0
- package/lib/module/DataTypes/SpikeDataType.js.map +1 -0
- package/lib/module/Spike.js +108 -0
- package/lib/module/Spike.js.map +1 -0
- package/lib/module/SpikeBackgroundDeliveriesLogger.js +2 -0
- package/lib/module/SpikeBackgroundDeliveriesLogger.js.map +1 -0
- package/lib/module/SpikeConnection.js +293 -0
- package/lib/module/SpikeConnection.js.map +1 -0
- package/lib/module/SpikeConnectionTypes.js +4 -0
- package/lib/module/SpikeConnectionTypes.js.map +1 -0
- package/lib/module/SpikeException.js +94 -0
- package/lib/module/SpikeException.js.map +1 -0
- package/lib/module/SpikeLogger.js +4 -0
- package/lib/module/SpikeLogger.js.map +1 -0
- package/lib/module/SpikeSdk.js +5 -0
- package/lib/module/SpikeSdk.js.map +1 -0
- package/lib/module/index.js +36 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/v3/Conversion.js +48 -0
- package/lib/module/v3/Conversion.js.map +1 -0
- package/lib/module/v3/DataModels/ActivityAdditionalData.js +14 -0
- package/lib/module/v3/DataModels/ActivityAdditionalData.js.map +1 -0
- package/lib/module/v3/DataModels/ActivityConfig.js +12 -0
- package/lib/module/v3/DataModels/ActivityConfig.js.map +1 -0
- package/lib/module/v3/DataModels/ActivityEntry.js +2 -0
- package/lib/module/v3/DataModels/ActivityEntry.js.map +1 -0
- package/lib/module/v3/DataModels/ActivitySamples.js +2 -0
- package/lib/module/v3/DataModels/ActivitySamples.js.map +1 -0
- package/lib/module/v3/DataModels/ActivityTag.js +28 -0
- package/lib/module/v3/DataModels/ActivityTag.js.map +1 -0
- package/lib/module/v3/DataModels/ActivityType.js +149 -0
- package/lib/module/v3/DataModels/ActivityType.js.map +1 -0
- package/lib/module/v3/DataModels/BackgroundDeliveryConfig.js +4 -0
- package/lib/module/v3/DataModels/BackgroundDeliveryConfig.js.map +1 -0
- package/lib/module/v3/DataModels/Gender.js +11 -0
- package/lib/module/v3/DataModels/Gender.js.map +1 -0
- package/lib/module/v3/DataModels/HealthConnectAvailabilityStatus.js +9 -0
- package/lib/module/v3/DataModels/HealthConnectAvailabilityStatus.js.map +1 -0
- package/lib/module/v3/DataModels/InputMethod.js +11 -0
- package/lib/module/v3/DataModels/InputMethod.js.map +1 -0
- package/lib/module/v3/DataModels/LogLevel.js +12 -0
- package/lib/module/v3/DataModels/LogLevel.js.map +1 -0
- package/lib/module/v3/DataModels/MetricType.js +70 -0
- package/lib/module/v3/DataModels/MetricType.js.map +1 -0
- package/lib/module/v3/DataModels/Provider.js +25 -0
- package/lib/module/v3/DataModels/Provider.js.map +1 -0
- package/lib/module/v3/DataModels/ProviderSource.js +48 -0
- package/lib/module/v3/DataModels/ProviderSource.js.map +1 -0
- package/lib/module/v3/DataModels/RecordSource.js +2 -0
- package/lib/module/v3/DataModels/RecordSource.js.map +1 -0
- package/lib/module/v3/DataModels/SamsungHealthDataAvailability.js +4 -0
- package/lib/module/v3/DataModels/SamsungHealthDataAvailability.js.map +1 -0
- package/lib/module/v3/DataModels/SamsungHealthDataAvailabilityStatus.js +33 -0
- package/lib/module/v3/DataModels/SamsungHealthDataAvailabilityStatus.js.map +1 -0
- package/lib/module/v3/DataModels/SleepConfig.js +10 -0
- package/lib/module/v3/DataModels/SleepConfig.js.map +1 -0
- package/lib/module/v3/DataModels/SpikeRecord.js +4 -0
- package/lib/module/v3/DataModels/SpikeRecord.js.map +1 -0
- package/lib/module/v3/DataModels/Statistic.js +4 -0
- package/lib/module/v3/DataModels/Statistic.js.map +1 -0
- package/lib/module/v3/DataModels/StatisticsInterval.js +10 -0
- package/lib/module/v3/DataModels/StatisticsInterval.js.map +1 -0
- package/lib/module/v3/DataModels/StatisticsType.js +23 -0
- package/lib/module/v3/DataModels/StatisticsType.js.map +1 -0
- package/lib/module/v3/DataModels/UUID.js +2 -0
- package/lib/module/v3/DataModels/UUID.js.map +1 -0
- package/lib/module/v3/DataModels/Unit.js +17 -0
- package/lib/module/v3/DataModels/Unit.js.map +1 -0
- package/lib/module/v3/DataModels/UserInfoResponse.js +4 -0
- package/lib/module/v3/DataModels/UserInfoResponse.js.map +1 -0
- package/lib/module/v3/DataModels/UserProperties.js +4 -0
- package/lib/module/v3/DataModels/UserProperties.js.map +1 -0
- package/lib/module/v3/SpikeRNConnectionAPIv3.js +389 -0
- package/lib/module/v3/SpikeRNConnectionAPIv3.js.map +1 -0
- package/lib/module/v3/StatisticsFilter.js +15 -0
- package/lib/module/v3/StatisticsFilter.js.map +1 -0
- package/lib/module/version.js +5 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/v3/DataModels/Provider.d.ts +4 -0
- package/lib/typescript/v3/DataModels/Provider.d.ts.map +1 -1
- package/lib/typescript/v3/DataModels/SpikeRecord.d.ts +1 -1
- package/lib/typescript/v3/DataModels/SpikeRecord.d.ts.map +1 -1
- package/lib/typescript/v3/DataModels/Statistic.d.ts +6 -6
- package/lib/typescript/v3/DataModels/Statistic.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/lib/typescript/version.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/v3/DataModels/Provider.ts +4 -0
- package/src/v3/DataModels/SpikeRecord.ts +1 -1
- package/src/v3/DataModels/Statistic.ts +6 -6
- package/src/version.ts +1 -1
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SpikeRNConnectionAPIv3 = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _SpikeException = require("../SpikeException");
|
|
9
|
+
var _SpikeSdk = require("../SpikeSdk");
|
|
10
|
+
var _Conversion = require("./Conversion");
|
|
11
|
+
var _HealthConnectAvailabilityStatus = require("./DataModels/HealthConnectAvailabilityStatus");
|
|
12
|
+
var _SamsungHealthDataAvailabilityStatus = require("./DataModels/SamsungHealthDataAvailabilityStatus");
|
|
13
|
+
class SpikeRNConnectionAPIv3 {
|
|
14
|
+
constructor(connectionUUID) {
|
|
15
|
+
this.connectionUUID = connectionUUID;
|
|
16
|
+
}
|
|
17
|
+
async getUserInfo() {
|
|
18
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
19
|
+
const result = await _SpikeSdk.SpikeSdk.getUserInfo(this.connectionUUID);
|
|
20
|
+
const jsonResult = JSON.parse(result);
|
|
21
|
+
const finalResult = (0, _Conversion.snakeToCamel)(jsonResult);
|
|
22
|
+
return finalResult;
|
|
23
|
+
}
|
|
24
|
+
async getIntegrationInitUrl({
|
|
25
|
+
provider,
|
|
26
|
+
config = null
|
|
27
|
+
}) {
|
|
28
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
29
|
+
const result = await _SpikeSdk.SpikeSdk.getIntegrationInitUrl(this.connectionUUID, provider, config ? JSON.stringify(config) : null);
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
async getStatistics({
|
|
33
|
+
ofTypes,
|
|
34
|
+
from,
|
|
35
|
+
to,
|
|
36
|
+
interval,
|
|
37
|
+
filter = undefined
|
|
38
|
+
}) {
|
|
39
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
40
|
+
const stringTypes = ofTypes.map(item => item);
|
|
41
|
+
// console.log("Stat types requested", stringTypes)
|
|
42
|
+
// console.log("Filter requested:", JSON.stringify(filter))
|
|
43
|
+
|
|
44
|
+
const result = await _SpikeSdk.SpikeSdk.getStatistics(this.connectionUUID, stringTypes, from.toISOString(), to.toISOString(), interval, !!filter ? JSON.stringify(filter) : null);
|
|
45
|
+
const jsonResult = JSON.parse(result);
|
|
46
|
+
const finalResult = (0, _Conversion.snakeToCamel)(jsonResult);
|
|
47
|
+
return finalResult;
|
|
48
|
+
}
|
|
49
|
+
async getRecords({
|
|
50
|
+
ofTypes,
|
|
51
|
+
from,
|
|
52
|
+
to,
|
|
53
|
+
filter = null
|
|
54
|
+
}) {
|
|
55
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
56
|
+
const stringTypes = ofTypes.map(item => item);
|
|
57
|
+
// console.log("Record types requested", stringTypes)
|
|
58
|
+
const result = await _SpikeSdk.SpikeSdk.getRecords(this.connectionUUID, stringTypes, from.toISOString(), to.toISOString(), !!filter ? JSON.stringify(filter) : null);
|
|
59
|
+
const jsonResult = JSON.parse(result);
|
|
60
|
+
const finalResult = (0, _Conversion.snakeToCamel)(jsonResult);
|
|
61
|
+
return finalResult;
|
|
62
|
+
}
|
|
63
|
+
async getActivities({
|
|
64
|
+
config,
|
|
65
|
+
from,
|
|
66
|
+
to,
|
|
67
|
+
filter = null
|
|
68
|
+
}) {
|
|
69
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
70
|
+
const result = await _SpikeSdk.SpikeSdk.getActivities(this.connectionUUID, !!config ? JSON.stringify(config) : null, from.toISOString(), to.toISOString(), !!filter ? JSON.stringify(filter) : null);
|
|
71
|
+
const jsonResult = JSON.parse(result);
|
|
72
|
+
const finalResult = (0, _Conversion.snakeToCamel)(jsonResult);
|
|
73
|
+
return finalResult;
|
|
74
|
+
}
|
|
75
|
+
async getSleep({
|
|
76
|
+
config,
|
|
77
|
+
from,
|
|
78
|
+
to,
|
|
79
|
+
filter = null
|
|
80
|
+
}) {
|
|
81
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
82
|
+
const result = await _SpikeSdk.SpikeSdk.getSleep(this.connectionUUID, !!config ? JSON.stringify(config) : null, from.toISOString(), to.toISOString(), !!filter ? JSON.stringify(filter) : null);
|
|
83
|
+
const jsonResult = JSON.parse(result);
|
|
84
|
+
const finalResult = (0, _Conversion.snakeToCamel)(jsonResult);
|
|
85
|
+
return finalResult;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Get user properties like weight, height, timezone, birth date, and gender.
|
|
90
|
+
*
|
|
91
|
+
* On iOS, it can read all these properties from HealthKit.
|
|
92
|
+
* On Android, it reads:
|
|
93
|
+
* - weight, height, timezone from Health Connect
|
|
94
|
+
* - birth date, gender from other providers
|
|
95
|
+
*
|
|
96
|
+
* @param types Array of metric types to read properties for
|
|
97
|
+
* @returns User properties object
|
|
98
|
+
*/
|
|
99
|
+
async getUserProperties({
|
|
100
|
+
types = []
|
|
101
|
+
}) {
|
|
102
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
103
|
+
const result = await _SpikeSdk.SpikeSdk.getUserProperties(this.connectionUUID, types);
|
|
104
|
+
const jsonResult = JSON.parse(result);
|
|
105
|
+
const finalResult = (0, _Conversion.snakeToCamel)(jsonResult);
|
|
106
|
+
return finalResult;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// ------------------------- Unified HealthKit and Health Connect permissions -------------------------
|
|
110
|
+
/**
|
|
111
|
+
* iOS:
|
|
112
|
+
* This method must be called before requesting any data from HealthKit. If the user has not
|
|
113
|
+
* granted permissions to read HealthKit data, a system-generated dialog will appear listing the
|
|
114
|
+
* required permissions. If the user has already granted or denied permissions, no dialog will be shown.
|
|
115
|
+
* To read data from HealthKit, this should be run after each app start (but it is NOT needed when
|
|
116
|
+
* the app returns from the background).
|
|
117
|
+
*
|
|
118
|
+
* Android:
|
|
119
|
+
* On Android, calling this method simplifies the use of Health Connect, making it as seamless as
|
|
120
|
+
* using HealthKit. Call it after the app starts; if needed, it will present the user with the OS
|
|
121
|
+
* permission dialog.
|
|
122
|
+
* If you need finer control over the process on android, please use other methods.
|
|
123
|
+
*/
|
|
124
|
+
async requestHealthPermissions({
|
|
125
|
+
statisticTypes = [],
|
|
126
|
+
metricTypes = [],
|
|
127
|
+
activityConfigs = [],
|
|
128
|
+
sleepConfigs = [],
|
|
129
|
+
includeEnhancedPermissions = false,
|
|
130
|
+
includeBackgroundDelivery = false
|
|
131
|
+
}) {
|
|
132
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
133
|
+
if (_reactNative.Platform.OS == 'ios') {
|
|
134
|
+
await _SpikeSdk.SpikeSdk.requestPermissionsFromHealthKit(this.connectionUUID, statisticTypes, metricTypes, activityConfigs.map(object => JSON.stringify(object)), sleepConfigs.map(object => JSON.stringify(object)));
|
|
135
|
+
}
|
|
136
|
+
if (_reactNative.Platform.OS == 'android') {
|
|
137
|
+
await this.enableHealthConnectIntegration();
|
|
138
|
+
const permissions = await _SpikeSdk.SpikeSdk.getHealthConnectPermissions(this.connectionUUID, statisticTypes, metricTypes, activityConfigs.map(object => JSON.stringify(object)), sleepConfigs.map(object => JSON.stringify(object)), includeEnhancedPermissions, includeBackgroundDelivery);
|
|
139
|
+
const result = await _SpikeSdk.SpikeSdk.requestPermissionsFromHealthConnect(this.connectionUUID, permissions);
|
|
140
|
+
console.log("requestPermissionsFromHealthConnect result: " + result);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// ------------------------- Background delivery -------------------------
|
|
145
|
+
|
|
146
|
+
async enableBackgroundDelivery({
|
|
147
|
+
statisticTypes = [],
|
|
148
|
+
metricTypes = [],
|
|
149
|
+
activityConfigs = [],
|
|
150
|
+
sleepConfigs = []
|
|
151
|
+
}) {
|
|
152
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
153
|
+
if (_reactNative.Platform.OS == 'ios') {
|
|
154
|
+
// V3 has to be added because "enableBackgroundDelivery"
|
|
155
|
+
// method from old sdk is still present.
|
|
156
|
+
await _SpikeSdk.SpikeSdk.enableBackgroundDeliveryV3(this.connectionUUID, statisticTypes, metricTypes, activityConfigs.map(object => JSON.stringify(object)), sleepConfigs.map(object => JSON.stringify(object)));
|
|
157
|
+
} else {
|
|
158
|
+
await _SpikeSdk.SpikeSdk.enableBackgroundDelivery(this.connectionUUID, statisticTypes, metricTypes, activityConfigs.map(object => JSON.stringify(object)), sleepConfigs.map(object => JSON.stringify(object)));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
async disableBackgroundDelivery() {
|
|
162
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
163
|
+
await _SpikeSdk.SpikeSdk.disableBackgroundDelivery(this.connectionUUID);
|
|
164
|
+
}
|
|
165
|
+
async getBackgroundDeliveryConfig() {
|
|
166
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
167
|
+
const result = await _SpikeSdk.SpikeSdk.getBackgroundDeliveryConfig(this.connectionUUID);
|
|
168
|
+
return result;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// ------------------------- Android specific Health Connect permissions -------------------------
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Check if Health Connect is installed or should be updated.
|
|
175
|
+
*
|
|
176
|
+
*
|
|
177
|
+
* Possible return values:
|
|
178
|
+
*
|
|
179
|
+
* notInstalled - The Health Connect SDK is unavailable on this device at the time. This can be due
|
|
180
|
+
* to the device running a lower than required Android Version. Apps should hide any integration
|
|
181
|
+
* points to Health Connect in this case.
|
|
182
|
+
*
|
|
183
|
+
* updateRequired - The Health Connect SDK APIs are currently unavailable, the provider is either
|
|
184
|
+
* not installed or needs to be updated. Apps may choose to redirect to package installers to find
|
|
185
|
+
* a suitable APK.
|
|
186
|
+
*
|
|
187
|
+
* installed - The Health Connect SDK APIs are available.
|
|
188
|
+
*/
|
|
189
|
+
async checkHealthConnectAvailability() {
|
|
190
|
+
if (_reactNative.Platform.OS !== 'android') return _HealthConnectAvailabilityStatus.HealthConnectAvailabilityStatus.notInstalled;
|
|
191
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
192
|
+
const availability = await _SpikeSdk.SpikeSdk.checkHealthConnectAvailability(this.connectionUUID);
|
|
193
|
+
return Object.values(_HealthConnectAvailabilityStatus.HealthConnectAvailabilityStatus).includes(availability) ? availability : _HealthConnectAvailabilityStatus.HealthConnectAvailabilityStatus.notInstalled;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Opens Health Connect installation
|
|
198
|
+
*
|
|
199
|
+
* Use if `checkHealthConnectAvailability()` returns `updateRequired` and you want the user to install it.
|
|
200
|
+
*/
|
|
201
|
+
async openHealthConnectInstallation() {
|
|
202
|
+
if (_reactNative.Platform.OS !== 'android') return;
|
|
203
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
204
|
+
await _SpikeSdk.SpikeSdk.openHealthConnectInstallation(this.connectionUUID);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Enables Health Connect as a data provider for SpikeSDK
|
|
209
|
+
*/
|
|
210
|
+
async enableHealthConnectIntegration() {
|
|
211
|
+
if (_reactNative.Platform.OS !== 'android') return;
|
|
212
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
213
|
+
await _SpikeSdk.SpikeSdk.enableHealthConnectIntegration(this.connectionUUID);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Disables Health Connect as a data provider for SpikeSDK.
|
|
218
|
+
* After this call SpikeSDK will stop asking for Health Connect data and will provide only data
|
|
219
|
+
* from other providers or data that was already gathered.
|
|
220
|
+
*
|
|
221
|
+
* This will not revoke any permissions. Call revokeAllHealthConnectPermissions() if want this.
|
|
222
|
+
*/
|
|
223
|
+
async disableHealthConnectIntegration() {
|
|
224
|
+
if (_reactNative.Platform.OS !== 'android') return;
|
|
225
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
226
|
+
await _SpikeSdk.SpikeSdk.disableHealthConnectIntegration(this.connectionUUID);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Check if Health Connect integration in SpikeSDK is active or not
|
|
231
|
+
*/
|
|
232
|
+
async isHealthConnectIntegrationEnabled() {
|
|
233
|
+
if (_reactNative.Platform.OS !== 'android') return false;
|
|
234
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
235
|
+
return await _SpikeSdk.SpikeSdk.isHealthConnectIntegrationEnabled(this.connectionUUID);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* List all Health Connect permissions already granted by user
|
|
240
|
+
*/
|
|
241
|
+
async getGrantedHealthConnectPermissions() {
|
|
242
|
+
if (_reactNative.Platform.OS !== 'android') return [];
|
|
243
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
244
|
+
return await _SpikeSdk.SpikeSdk.getGrantedHealthConnectPermissions(this.connectionUUID);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Convert Spike StatisticTypes into android permissions
|
|
249
|
+
*/
|
|
250
|
+
async revokeAllHealthConnectPermissions() {
|
|
251
|
+
if (_reactNative.Platform.OS !== 'android') return;
|
|
252
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
253
|
+
await _SpikeSdk.SpikeSdk.revokeAllHealthConnectPermissions(this.connectionUUID);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Convert Spike StatisticTypes into android permissions
|
|
258
|
+
*/
|
|
259
|
+
async getHealthConnectPermissions({
|
|
260
|
+
statisticTypes = [],
|
|
261
|
+
metricTypes = [],
|
|
262
|
+
activityConfigs = [],
|
|
263
|
+
sleepConfigs = [],
|
|
264
|
+
includeEnhancedPermissions = false,
|
|
265
|
+
includeBackgroundDelivery = false
|
|
266
|
+
}) {
|
|
267
|
+
if (_reactNative.Platform.OS !== 'android') return [];
|
|
268
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
269
|
+
return await _SpikeSdk.SpikeSdk.getHealthConnectPermissions(this.connectionUUID, statisticTypes, metricTypes, activityConfigs.map(object => JSON.stringify(object)), sleepConfigs.map(object => JSON.stringify(object)), includeEnhancedPermissions, includeBackgroundDelivery);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Checks if permissions are not yet granted and if there are missing permissions, asks
|
|
274
|
+
* user to give them
|
|
275
|
+
*/
|
|
276
|
+
async requestPermissionsFromHealthConnect({
|
|
277
|
+
permissions
|
|
278
|
+
}) {
|
|
279
|
+
if (_reactNative.Platform.OS !== 'android') return false;
|
|
280
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
281
|
+
return await _SpikeSdk.SpikeSdk.requestPermissionsFromHealthConnect(this.connectionUUID, permissions);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// ------------------------- Samsung Health Data permissions -------------------------
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Check if Samsung Health Data is available on the device.
|
|
288
|
+
*
|
|
289
|
+
* Possible return values of SamsungHealthDataAvailability.status field:
|
|
290
|
+
*
|
|
291
|
+
* notInstalled - Samsung Health is not installed. Ask user to install it.
|
|
292
|
+
*
|
|
293
|
+
* updateRequired - The version of Samsung Health is too old. Ask users to update it.
|
|
294
|
+
*
|
|
295
|
+
* disabled - The Samsung Health Data is installed but is disabled.
|
|
296
|
+
*
|
|
297
|
+
* notInitialized - Samsung Health has been installed but the user didn't perform an initial process, such as
|
|
298
|
+
* agreeing to the Terms and Conditions.
|
|
299
|
+
*
|
|
300
|
+
* errorOther - Samsung Health returned other error.
|
|
301
|
+
*
|
|
302
|
+
* installed - Samsung Health Data is available.
|
|
303
|
+
*/
|
|
304
|
+
async checkSamsungHealthDataAvailability() {
|
|
305
|
+
if (_reactNative.Platform.OS !== 'android') return {
|
|
306
|
+
status: _SamsungHealthDataAvailabilityStatus.SamsungHealthDataAvailabilityStatus.notInstalled,
|
|
307
|
+
errorCode: 0,
|
|
308
|
+
message: "Not available on this platform"
|
|
309
|
+
};
|
|
310
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
311
|
+
const result = await _SpikeSdk.SpikeSdk.checkSamsungHealthDataAvailability(this.connectionUUID);
|
|
312
|
+
const jsonResult = JSON.parse(result);
|
|
313
|
+
const finalResult = (0, _Conversion.snakeToCamel)(jsonResult);
|
|
314
|
+
return finalResult;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Enables Samsung Health Data as a data provider for SpikeSDK
|
|
319
|
+
*/
|
|
320
|
+
async enableSamsungHealthDataIntegration() {
|
|
321
|
+
if (_reactNative.Platform.OS !== 'android') return;
|
|
322
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
323
|
+
await _SpikeSdk.SpikeSdk.enableSamsungHealthDataIntegration(this.connectionUUID);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Disables Samsung Health Data as a data provider for SpikeSDK.
|
|
328
|
+
* After this call SpikeSDK will stop asking for Samsung Health Data.
|
|
329
|
+
*
|
|
330
|
+
* This will not revoke any permissions.
|
|
331
|
+
*/
|
|
332
|
+
async disableSamsungHealthDataIntegration() {
|
|
333
|
+
if (_reactNative.Platform.OS !== 'android') return;
|
|
334
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
335
|
+
await _SpikeSdk.SpikeSdk.disableSamsungHealthDataIntegration(this.connectionUUID);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Check if Samsung Health Data integration in SpikeSDK is active or not
|
|
340
|
+
*/
|
|
341
|
+
async isSamsungHealthDataIntegrationEnabled() {
|
|
342
|
+
if (_reactNative.Platform.OS !== 'android') return false;
|
|
343
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
344
|
+
return await _SpikeSdk.SpikeSdk.isSamsungHealthDataIntegrationEnabled(this.connectionUUID);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* List all Samsung Health Data permissions already granted by user
|
|
349
|
+
*/
|
|
350
|
+
async getGrantedSamsungHealthDataPermissions() {
|
|
351
|
+
if (_reactNative.Platform.OS !== 'android') return [];
|
|
352
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
353
|
+
return await _SpikeSdk.SpikeSdk.getGrantedSamsungHealthDataPermissions(this.connectionUUID);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Convert Spike types into Samsung Health Data permissions
|
|
358
|
+
*/
|
|
359
|
+
async getSamsungHealthDataPermissions({
|
|
360
|
+
statisticTypes = [],
|
|
361
|
+
metricTypes = [],
|
|
362
|
+
activityConfigs = [],
|
|
363
|
+
sleepConfigs = []
|
|
364
|
+
}) {
|
|
365
|
+
if (_reactNative.Platform.OS !== 'android') return [];
|
|
366
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
367
|
+
return await _SpikeSdk.SpikeSdk.getSamsungHealthDataPermissions(this.connectionUUID, statisticTypes, metricTypes, activityConfigs.map(object => JSON.stringify(object)), sleepConfigs.map(object => JSON.stringify(object)));
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Initiates the permission request flow with Samsung Health Data.
|
|
372
|
+
* This function will check for existing permissions and, if necessary,
|
|
373
|
+
* prompt the user to grant access to the required permissions.
|
|
374
|
+
*
|
|
375
|
+
* @param statisticTypes The set of statistics types to request permissions for.
|
|
376
|
+
* @param metricTypes The set of metric types to request permissions for.
|
|
377
|
+
* @param activityConfigs The set of activity configurations to request permissions for.
|
|
378
|
+
* @param sleepConfigs The set of sleep configurations to request permissions for.
|
|
379
|
+
*
|
|
380
|
+
* @return A set of permission names that the user granted access to.
|
|
381
|
+
*/
|
|
382
|
+
async requestPermissionsFromSamsungHealthData({
|
|
383
|
+
statisticTypes = [],
|
|
384
|
+
metricTypes = [],
|
|
385
|
+
activityConfigs = [],
|
|
386
|
+
sleepConfigs = []
|
|
387
|
+
}) {
|
|
388
|
+
if (_reactNative.Platform.OS !== 'android') return [];
|
|
389
|
+
if (!_SpikeSdk.SpikeSdk) throw new _SpikeException.SpikeException();
|
|
390
|
+
return await _SpikeSdk.SpikeSdk.requestPermissionsFromSamsungHealthData(this.connectionUUID, statisticTypes, metricTypes, activityConfigs.map(object => JSON.stringify(object)), sleepConfigs.map(object => JSON.stringify(object)));
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
exports.SpikeRNConnectionAPIv3 = SpikeRNConnectionAPIv3;
|
|
394
|
+
//# sourceMappingURL=SpikeRNConnectionAPIv3.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StatisticsFilter = void 0;
|
|
7
|
+
class StatisticsFilter {
|
|
8
|
+
excludeManual = false;
|
|
9
|
+
constructor({
|
|
10
|
+
excludeManual = false,
|
|
11
|
+
providers = undefined,
|
|
12
|
+
activityTags = undefined
|
|
13
|
+
}) {
|
|
14
|
+
this.excludeManual = excludeManual;
|
|
15
|
+
this.providers = providers;
|
|
16
|
+
this.activityTags = activityTags;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.StatisticsFilter = StatisticsFilter;
|
|
20
|
+
//# sourceMappingURL=StatisticsFilter.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SPIKE_SDK_VERSION = void 0;
|
|
7
|
+
// This file is auto-generated. Do not edit manually.
|
|
8
|
+
const SPIKE_SDK_VERSION = exports.SPIKE_SDK_VERSION = "4.3.83";
|
|
9
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SPIKE_SDK_VERSION","exports"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":";;;;;;AAAA;AACO,MAAMA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,
|
|
1
|
+
{"version":3,"names":["SPIKE_SDK_VERSION","exports"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":";;;;;;AAAA;AACO,MAAMA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["DataModels/SpikeActivitiesStreamDataEntry.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["DataModels/SpikeActivitiesSummaryDataEntry.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["DataModels/SpikeBodyDataEntry.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["DataModels/SpikeBreathingDataEntry.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["DataModels/SpikeCaloriesDataEntry.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["DataModels/SpikeData.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { SpikeActivitiesStreamDataType, SpikeActivitiesSummaryDataType, SpikeBreathingDataType, SpikeCaloriesDataType, SpikeDistanceDataType, SpikeGlucoseDataType, SpikeHeartDataType, SpikeOxygenSaturationDataType, SpikeSleepDataType, SpikeStepsDataType, SpikeBodyDataType, SpikeStepsIntradayDataType, SpikeEcgDataType } from '../DataTypes/SpikeDataType';
|
|
4
|
+
export const SpikeDataTypes = {
|
|
5
|
+
activitiesSummary: new SpikeActivitiesSummaryDataType(),
|
|
6
|
+
activitiesStream: new SpikeActivitiesStreamDataType(),
|
|
7
|
+
breathing: new SpikeBreathingDataType(),
|
|
8
|
+
calories: new SpikeCaloriesDataType(),
|
|
9
|
+
distance: new SpikeDistanceDataType(),
|
|
10
|
+
glucose: new SpikeGlucoseDataType(),
|
|
11
|
+
heart: new SpikeHeartDataType(),
|
|
12
|
+
oxygenSaturation: new SpikeOxygenSaturationDataType(),
|
|
13
|
+
sleep: new SpikeSleepDataType(),
|
|
14
|
+
steps: new SpikeStepsDataType(),
|
|
15
|
+
stepsIntraday: new SpikeStepsIntradayDataType(),
|
|
16
|
+
body: new SpikeBodyDataType(),
|
|
17
|
+
ecg: new SpikeEcgDataType()
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=SpikeDataTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SpikeActivitiesStreamDataType","SpikeActivitiesSummaryDataType","SpikeBreathingDataType","SpikeCaloriesDataType","SpikeDistanceDataType","SpikeGlucoseDataType","SpikeHeartDataType","SpikeOxygenSaturationDataType","SpikeSleepDataType","SpikeStepsDataType","SpikeBodyDataType","SpikeStepsIntradayDataType","SpikeEcgDataType","SpikeDataTypes","activitiesSummary","activitiesStream","breathing","calories","distance","glucose","heart","oxygenSaturation","sleep","steps","stepsIntraday","body","ecg"],"sourceRoot":"../../../src","sources":["DataModels/SpikeDataTypes.ts"],"mappings":";;AAAA,SACEA,6BAA6B,EAC7BC,8BAA8B,EAC9BC,sBAAsB,EACtBC,qBAAqB,EACrBC,qBAAqB,EACrBC,oBAAoB,EACpBC,kBAAkB,EAClBC,6BAA6B,EAC7BC,kBAAkB,EAClBC,kBAAkB,EAClBC,iBAAiB,EACjBC,0BAA0B,EAC1BC,gBAAgB,QACX,4BAA4B;AAEnC,OAAO,MAAMC,cAAc,GAAG;EAC5BC,iBAAiB,EAAE,IAAIb,8BAA8B,CAAC,CAAC;EACvDc,gBAAgB,EAAE,IAAIf,6BAA6B,CAAC,CAAC;EACrDgB,SAAS,EAAE,IAAId,sBAAsB,CAAC,CAAC;EACvCe,QAAQ,EAAE,IAAId,qBAAqB,CAAC,CAAC;EACrCe,QAAQ,EAAE,IAAId,qBAAqB,CAAC,CAAC;EACrCe,OAAO,EAAE,IAAId,oBAAoB,CAAC,CAAC;EACnCe,KAAK,EAAE,IAAId,kBAAkB,CAAC,CAAC;EAC/Be,gBAAgB,EAAE,IAAId,6BAA6B,CAAC,CAAC;EACrDe,KAAK,EAAE,IAAId,kBAAkB,CAAC,CAAC;EAC/Be,KAAK,EAAE,IAAId,kBAAkB,CAAC,CAAC;EAC/Be,aAAa,EAAE,IAAIb,0BAA0B,CAAC,CAAC;EAC/Cc,IAAI,EAAE,IAAIf,iBAAiB,CAAC,CAAC;EAC7BgB,GAAG,EAAE,IAAId,gBAAgB,CAAC;AAC5B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["DataModels/SpikeDistanceDataEntry.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["DataModels/SpikeEcgDataEntry.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["DataModels/SpikeGlucoseDataEntry.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["DataModels/SpikeHeartDataEntry.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["DataModels/SpikeOxygenSaturationDataEntry.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["DataModels/SpikeSleepDataEntry.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["DataModels/SpikeStepsDataEntry.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["DataModels/SpikeStepsIntradayDataEntry.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["DataModels/SpikeWebhookJob.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export class SpikeActivitiesStreamDataType {
|
|
4
|
+
rawValue = 'activities_stream';
|
|
5
|
+
}
|
|
6
|
+
export class SpikeActivitiesSummaryDataType {
|
|
7
|
+
rawValue = 'activities_summary';
|
|
8
|
+
}
|
|
9
|
+
export class SpikeBreathingDataType {
|
|
10
|
+
rawValue = 'breathing';
|
|
11
|
+
}
|
|
12
|
+
export class SpikeCaloriesDataType {
|
|
13
|
+
rawValue = 'calories';
|
|
14
|
+
}
|
|
15
|
+
export class SpikeDistanceDataType {
|
|
16
|
+
rawValue = 'distance';
|
|
17
|
+
}
|
|
18
|
+
export class SpikeGlucoseDataType {
|
|
19
|
+
rawValue = 'glucose';
|
|
20
|
+
}
|
|
21
|
+
export class SpikeHeartDataType {
|
|
22
|
+
rawValue = 'heart';
|
|
23
|
+
}
|
|
24
|
+
export class SpikeOxygenSaturationDataType {
|
|
25
|
+
rawValue = 'oxygen_saturation';
|
|
26
|
+
}
|
|
27
|
+
export class SpikeSleepDataType {
|
|
28
|
+
rawValue = 'sleep';
|
|
29
|
+
}
|
|
30
|
+
export class SpikeStepsDataType {
|
|
31
|
+
rawValue = 'steps';
|
|
32
|
+
}
|
|
33
|
+
export class SpikeStepsIntradayDataType {
|
|
34
|
+
rawValue = 'steps_intraday';
|
|
35
|
+
}
|
|
36
|
+
export class SpikeBodyDataType {
|
|
37
|
+
rawValue = 'body';
|
|
38
|
+
}
|
|
39
|
+
export class SpikeEcgDataType {
|
|
40
|
+
rawValue = 'ecg';
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=SpikeDataType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SpikeActivitiesStreamDataType","rawValue","SpikeActivitiesSummaryDataType","SpikeBreathingDataType","SpikeCaloriesDataType","SpikeDistanceDataType","SpikeGlucoseDataType","SpikeHeartDataType","SpikeOxygenSaturationDataType","SpikeSleepDataType","SpikeStepsDataType","SpikeStepsIntradayDataType","SpikeBodyDataType","SpikeEcgDataType"],"sourceRoot":"../../../src","sources":["DataTypes/SpikeDataType.ts"],"mappings":";;AA6BA,OAAO,MAAMA,6BAA6B,CAAC;EACzCC,QAAQ,GAAwB,mBAAmB;AAErD;AAEA,OAAO,MAAMC,8BAA8B,CAAC;EAC1CD,QAAQ,GAAwB,oBAAoB;AAEtD;AAEA,OAAO,MAAME,sBAAsB,CAAC;EAClCF,QAAQ,GAAwB,WAAW;AAE7C;AAEA,OAAO,MAAMG,qBAAqB,CAAC;EACjCH,QAAQ,GAAwB,UAAU;AAE5C;AAEA,OAAO,MAAMI,qBAAqB,CAAC;EACjCJ,QAAQ,GAAwB,UAAU;AAE5C;AAEA,OAAO,MAAMK,oBAAoB,CAAC;EAChCL,QAAQ,GAAwB,SAAS;AAE3C;AAEA,OAAO,MAAMM,kBAAkB,CAAC;EAC9BN,QAAQ,GAAwB,OAAO;AAEzC;AAEA,OAAO,MAAMO,6BAA6B,CAAC;EACzCP,QAAQ,GAAwB,mBAAmB;AAErD;AAEA,OAAO,MAAMQ,kBAAkB,CAAC;EAC9BR,QAAQ,GAAwB,OAAO;AAEzC;AAEA,OAAO,MAAMS,kBAAkB,CAAC;EAC9BT,QAAQ,GAAwB,OAAO;AAEzC;AAEA,OAAO,MAAMU,0BAA0B,CAAC;EACtCV,QAAQ,GAAwB,gBAAgB;AAElD;AAEA,OAAO,MAAMW,iBAAiB,CAAC;EAC7BX,QAAQ,GAAwB,MAAM;AAExC;AAEA,OAAO,MAAMY,gBAAgB,CAAC;EAC5BZ,QAAQ,GAAwB,KAAK;AAEvC","ignoreList":[]}
|