react-native-rook-sdk 0.2.3 → 0.2.5
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/lib/commonjs/hooks/useRookAppleHealth.js +20 -57
- package/lib/commonjs/hooks/useRookAppleHealth.js.map +1 -1
- package/lib/commonjs/hooks/useRookConfiguration.js +46 -0
- package/lib/commonjs/hooks/useRookConfiguration.js.map +1 -1
- package/lib/commonjs/hooks/useRookEvents.js +101 -2
- package/lib/commonjs/hooks/useRookEvents.js.map +1 -1
- package/lib/commonjs/hooks/useRookPermissions.js +28 -0
- package/lib/commonjs/hooks/useRookPermissions.js.map +1 -1
- package/lib/commonjs/hooks/useRookSummaries.js +46 -0
- package/lib/commonjs/hooks/useRookSummaries.js.map +1 -1
- package/lib/commonjs/utils/packageInfo.js +1 -1
- package/lib/module/hooks/useRookAppleHealth.js +20 -57
- package/lib/module/hooks/useRookAppleHealth.js.map +1 -1
- package/lib/module/hooks/useRookConfiguration.js +46 -0
- package/lib/module/hooks/useRookConfiguration.js.map +1 -1
- package/lib/module/hooks/useRookEvents.js +101 -2
- package/lib/module/hooks/useRookEvents.js.map +1 -1
- package/lib/module/hooks/useRookPermissions.js +28 -0
- package/lib/module/hooks/useRookPermissions.js.map +1 -1
- package/lib/module/hooks/useRookSummaries.js +46 -0
- package/lib/module/hooks/useRookSummaries.js.map +1 -1
- package/lib/module/utils/packageInfo.js +1 -1
- package/lib/typescript/src/hooks/useRookAppleHealth.d.ts +2 -6
- package/lib/typescript/src/hooks/useRookAppleHealth.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useRookConfiguration.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useRookEvents.d.ts +2 -2
- package/lib/typescript/src/hooks/useRookEvents.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useRookPermissions.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useRookSummaries.d.ts.map +1 -1
- package/package.json +1 -1
- package/react-native-rook-sdk.podspec +1 -1
|
@@ -33,41 +33,34 @@ const useRookAppleHealth = () => {
|
|
|
33
33
|
}));
|
|
34
34
|
}
|
|
35
35
|
}, [ready]);
|
|
36
|
-
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The function `enableBackGroundUpdates` enable background updates and returns a promise
|
|
39
|
+
* indicating success.
|
|
40
|
+
* @returns The function `enableBackGroundUpdates` returns a Promise that resolves to a boolean
|
|
41
|
+
* value.
|
|
42
|
+
*/
|
|
43
|
+
const enableBackGroundUpdates = () => {
|
|
37
44
|
(0, _utils.isRunningOniOS)();
|
|
38
45
|
(0, _utils.isModuleReady)(ready);
|
|
39
46
|
return rookSync.current.enableBackGroundUpdates();
|
|
40
47
|
};
|
|
41
|
-
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The function `disableBackGroundUpdates` disables background updates and returns a promise
|
|
51
|
+
* indicating success.
|
|
52
|
+
* @returns The function `disableBackGroundUpdates` returns a Promise that resolves to a boolean
|
|
53
|
+
* value.
|
|
54
|
+
*/
|
|
55
|
+
const disableBackGroundUpdates = () => {
|
|
42
56
|
(0, _utils.isRunningOniOS)();
|
|
43
57
|
(0, _utils.isModuleReady)(ready);
|
|
44
58
|
return rookSync.current.disableBackGroundUpdates();
|
|
45
59
|
};
|
|
46
|
-
const enableBackgroundForEvents = () => {
|
|
47
|
-
(0, _utils.isRunningOniOS)();
|
|
48
|
-
(0, _utils.isModuleReady)(ready);
|
|
49
|
-
return rookSync.current.enableBackGroundEventUpdates();
|
|
50
|
-
};
|
|
51
|
-
const disableBackgroundForEvents = () => {
|
|
52
|
-
(0, _utils.isRunningOniOS)();
|
|
53
|
-
(0, _utils.isModuleReady)(ready);
|
|
54
|
-
return rookSync.current.disableBackGroundEventUpdates();
|
|
55
|
-
};
|
|
56
|
-
const getTodayActiveCaloriesBurned = () => {
|
|
57
|
-
(0, _utils.isRunningOniOS)();
|
|
58
|
-
(0, _utils.isModuleReady)(ready);
|
|
59
|
-
return rookSync.current.getTodayActiveCaloriesBurned();
|
|
60
|
-
};
|
|
61
|
-
const enableBackGroundForCalories = () => {
|
|
62
|
-
(0, _utils.isRunningOniOS)();
|
|
63
|
-
(0, _utils.isModuleReady)(ready);
|
|
64
|
-
return rookSync.current.enableBackGroundForCalories();
|
|
65
|
-
};
|
|
66
60
|
return {
|
|
67
61
|
ready,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
fun: enableBackgroundForSummaries,
|
|
62
|
+
enableBackGroundUpdates: () => logBoundary({
|
|
63
|
+
fun: enableBackGroundUpdates,
|
|
71
64
|
logSuccess: true,
|
|
72
65
|
logType: {
|
|
73
66
|
date: new Date().toISOString(),
|
|
@@ -76,8 +69,8 @@ const useRookAppleHealth = () => {
|
|
|
76
69
|
},
|
|
77
70
|
dataType: 'enable_background_summaries'
|
|
78
71
|
}),
|
|
79
|
-
|
|
80
|
-
fun:
|
|
72
|
+
disableBackGroundUpdates: () => logBoundary({
|
|
73
|
+
fun: disableBackGroundUpdates,
|
|
81
74
|
logSuccess: true,
|
|
82
75
|
logType: {
|
|
83
76
|
date: new Date().toISOString(),
|
|
@@ -85,36 +78,6 @@ const useRookAppleHealth = () => {
|
|
|
85
78
|
event: 'other'
|
|
86
79
|
},
|
|
87
80
|
dataType: 'disable_background_summaries'
|
|
88
|
-
}),
|
|
89
|
-
enableBackgroundForEvents: () => logBoundary({
|
|
90
|
-
fun: enableBackgroundForEvents,
|
|
91
|
-
logSuccess: true,
|
|
92
|
-
logType: {
|
|
93
|
-
date: new Date().toISOString(),
|
|
94
|
-
type: 'transmission',
|
|
95
|
-
event: 'other'
|
|
96
|
-
},
|
|
97
|
-
dataType: 'enable_background_events'
|
|
98
|
-
}),
|
|
99
|
-
disableBackgroundForEvents: () => logBoundary({
|
|
100
|
-
fun: disableBackgroundForEvents,
|
|
101
|
-
logSuccess: true,
|
|
102
|
-
logType: {
|
|
103
|
-
date: new Date().toISOString(),
|
|
104
|
-
type: 'transmission',
|
|
105
|
-
event: 'other'
|
|
106
|
-
},
|
|
107
|
-
dataType: 'disable_background_events'
|
|
108
|
-
}),
|
|
109
|
-
enableBackGroundForCalories: () => logBoundary({
|
|
110
|
-
fun: enableBackGroundForCalories,
|
|
111
|
-
logSuccess: true,
|
|
112
|
-
logType: {
|
|
113
|
-
date: new Date().toISOString(),
|
|
114
|
-
type: 'transmission',
|
|
115
|
-
event: 'other'
|
|
116
|
-
},
|
|
117
|
-
dataType: 'disable_steps'
|
|
118
81
|
})
|
|
119
82
|
};
|
|
120
83
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeRookLoggerReactNative","_RookSyncGateContext","_utils","useRookAppleHealth","rookSync","useRef","getRookModule","state","ready","clientUUID","environment","userID","useRookSyncGateContext","initLogger","logBoundary","useRookLogger","useEffect","loggerDescription","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeRookLoggerReactNative","_RookSyncGateContext","_utils","useRookAppleHealth","rookSync","useRef","getRookModule","state","ready","clientUUID","environment","userID","useRookSyncGateContext","initLogger","logBoundary","useRookLogger","useEffect","loggerDescription","enableBackGroundUpdates","isRunningOniOS","isModuleReady","current","disableBackGroundUpdates","fun","logSuccess","logType","date","Date","toISOString","type","event","dataType","exports"],"sourceRoot":"../../../src","sources":["hooks/useRookAppleHealth.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,iCAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAJA;;AAWO,MAAMI,kBAAkB,GAAGA,CAAA,KAAM;EACtC,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAC,IAAAC,oBAAa,EAAC,CAAC,CAAC;EACxC,MAAM;IACJC,KAAK,EAAE;MAAEC,KAAK;MAAEC,UAAU;MAAEC,WAAW;MAAEC;IAAO;EAClD,CAAC,GAAG,IAAAC,2CAAsB,EAAC,CAAC;EAE5B,MAAM;IAAEC,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MACT,CAAC;MACDC,QAAQ,EAAE;IACZ,CAAC;EACL,CAAC;AACH,CAAC;AAACC,OAAA,CAAA7B,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -15,6 +15,11 @@ const useRookConfiguration = () => {
|
|
|
15
15
|
},
|
|
16
16
|
dispatch
|
|
17
17
|
} = (0, _RookSyncGateContext.useRookSyncGateContext)();
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The `getUserID` function retrieves the user ID
|
|
21
|
+
* @returns The function `getUserID` is returning a Promise that resolves to a string value.
|
|
22
|
+
*/
|
|
18
23
|
const getUserID = async () => {
|
|
19
24
|
(0, _utils.isModuleReady)(ready);
|
|
20
25
|
const result = await rookSync.current.getUserID();
|
|
@@ -24,6 +29,14 @@ const useRookConfiguration = () => {
|
|
|
24
29
|
});
|
|
25
30
|
return result;
|
|
26
31
|
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The function `updateUserID` updates the user ID and returns a boolean indicating the success of
|
|
35
|
+
* the update.
|
|
36
|
+
* @param {string} userID - The `userID` parameter is a string that represents the user ID that needs
|
|
37
|
+
* to be updated in the system.
|
|
38
|
+
* @returns The `updateUserID` function returns a Promise that resolves to a boolean value.
|
|
39
|
+
*/
|
|
27
40
|
const updateUserID = async userID => {
|
|
28
41
|
(0, _utils.isModuleReady)(ready);
|
|
29
42
|
dispatch({
|
|
@@ -33,6 +46,11 @@ const useRookConfiguration = () => {
|
|
|
33
46
|
const result = await rookSync.current.updateUserID(userID);
|
|
34
47
|
return result;
|
|
35
48
|
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The function `clearUserID` clears the user ID and returns a boolean indicating success.
|
|
52
|
+
* @returns The `clearUserID` function is returning a Promise that resolves to a boolean value.
|
|
53
|
+
*/
|
|
36
54
|
const clearUserID = async () => {
|
|
37
55
|
(0, _utils.isModuleReady)(ready);
|
|
38
56
|
dispatch({
|
|
@@ -42,11 +60,21 @@ const useRookConfiguration = () => {
|
|
|
42
60
|
const result = await rookSync.current.clearUserID();
|
|
43
61
|
return result;
|
|
44
62
|
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* This function `syncUserTimeZone` synchronizes the user's time zone using
|
|
66
|
+
* @returns The `syncUserTimeZone` function returns a boolean value, indicating success or failure
|
|
67
|
+
*/
|
|
45
68
|
const syncUserTimeZone = async () => {
|
|
46
69
|
(0, _utils.isModuleReady)(ready);
|
|
47
70
|
const result = await rookSync.current.syncUserTimeZone();
|
|
48
71
|
return result;
|
|
49
72
|
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The function `removeUserFromRook` removes a user from a rook services, If you delete the user from the Rook services you have to create the user again with updateUserID and request permissions.
|
|
76
|
+
* @returns The `removeUserFromRook` function is returning a boolean value.
|
|
77
|
+
*/
|
|
50
78
|
const removeUserFromRook = async () => {
|
|
51
79
|
(0, _utils.isModuleReady)(ready);
|
|
52
80
|
const result = await rookSync.current.removeUserFromRook();
|
|
@@ -56,18 +84,36 @@ const useRookConfiguration = () => {
|
|
|
56
84
|
});
|
|
57
85
|
return result;
|
|
58
86
|
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* This method enables the automatic upload of the summaries from the previous day of the current device's date. Every time the user opens the app it will try to upload the summaries, before use this method is necessary to add a user id and request permissions.
|
|
90
|
+
* @returns The function `enableAppleHealthSync` is returning a boolean value, which is the result
|
|
91
|
+
* of enable the Apple Health
|
|
92
|
+
*/
|
|
59
93
|
const enableAppleHealthSync = async () => {
|
|
60
94
|
(0, _utils.isRunningOniOS)();
|
|
61
95
|
(0, _utils.isModuleReady)(ready);
|
|
62
96
|
const result = await rookSync.current.enableSync();
|
|
63
97
|
return result;
|
|
64
98
|
};
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* This method disables the automatic upload of the summaries from the previous day of the current device's date.
|
|
102
|
+
* @returns The function `disableAppleHealthSync` is returning a boolean value, which is the result
|
|
103
|
+
* of disabling the Apple Health
|
|
104
|
+
*/
|
|
65
105
|
const disableAppleHealthSync = async () => {
|
|
66
106
|
(0, _utils.isRunningOniOS)();
|
|
67
107
|
(0, _utils.isModuleReady)(ready);
|
|
68
108
|
const result = await rookSync.current.disableSync();
|
|
69
109
|
return result;
|
|
70
110
|
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The function `isAppleHealthSyncEnabled` checks if Apple Health sync is enabled and returns a
|
|
114
|
+
* boolean value.
|
|
115
|
+
* @returns The function `isAppleHealthSyncEnabled` is returning the a boolean value indicating if is enable or not
|
|
116
|
+
*/
|
|
71
117
|
const isAppleHealthSyncEnabled = async () => {
|
|
72
118
|
(0, _utils.isRunningOniOS)();
|
|
73
119
|
(0, _utils.isModuleReady)(ready);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_RookSyncGateContext","_utils","useRookConfiguration","rookSync","useRef","getRookModule","state","ready","dispatch","useRookSyncGateContext","getUserID","isModuleReady","result","current","type","userID","updateUserID","clearUserID","syncUserTimeZone","removeUserFromRook","enableAppleHealthSync","isRunningOniOS","enableSync","disableAppleHealthSync","disableSync","isAppleHealthSyncEnabled","isSyncEnable","exports"],"sourceRoot":"../../../src","sources":["hooks/useRookConfiguration.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEO,MAAMG,oBAAoB,GAAGA,CAAA,KAAM;EACxC,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAC,IAAAC,oBAAa,EAAC,CAAC,CAAC;EACxC,MAAM;IACJC,KAAK,EAAE;MAAEC;IAAM,CAAC;IAChBC;EACF,CAAC,GAAG,IAAAC,2CAAsB,EAAC,CAAC;
|
|
1
|
+
{"version":3,"names":["_react","require","_RookSyncGateContext","_utils","useRookConfiguration","rookSync","useRef","getRookModule","state","ready","dispatch","useRookSyncGateContext","getUserID","isModuleReady","result","current","type","userID","updateUserID","clearUserID","syncUserTimeZone","removeUserFromRook","enableAppleHealthSync","isRunningOniOS","enableSync","disableAppleHealthSync","disableSync","isAppleHealthSyncEnabled","isSyncEnable","exports"],"sourceRoot":"../../../src","sources":["hooks/useRookConfiguration.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEO,MAAMG,oBAAoB,GAAGA,CAAA,KAAM;EACxC,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAC,IAAAC,oBAAa,EAAC,CAAC,CAAC;EACxC,MAAM;IACJC,KAAK,EAAE;MAAEC;IAAM,CAAC;IAChBC;EACF,CAAC,GAAG,IAAAC,2CAAsB,EAAC,CAAC;;EAE5B;AACF;AACA;AACA;EACE,MAAMC,SAAS,GAAG,MAAAA,CAAA,KAA6B;IAC7C,IAAAC,oBAAa,EAACJ,KAAK,CAAC;IAEpB,MAAMK,MAAc,GAAG,MAAMT,QAAQ,CAACU,OAAO,CAACH,SAAS,CAAC,CAAC;IACzDF,QAAQ,CAAC;MAAEM,IAAI,EAAE,aAAa;MAAEC,MAAM,EAAEH;IAAO,CAAC,CAAC;IAEjD,OAAOA,MAAM;EACf,CAAC;;EAED;AACF;AACA;AACA;AACA;AACA;AACA;EACE,MAAMI,YAAY,GAAG,MAAOD,MAAc,IAAuB;IAC/D,IAAAJ,oBAAa,EAACJ,KAAK,CAAC;IAEpBC,QAAQ,CAAC;MAAEM,IAAI,EAAE,aAAa;MAAEC;IAAO,CAAC,CAAC;IAEzC,MAAMH,MAAe,GAAG,MAAMT,QAAQ,CAACU,OAAO,CAACG,YAAY,CAACD,MAAM,CAAC;IACnE,OAAOH,MAAM;EACf,CAAC;;EAED;AACF;AACA;AACA;EACE,MAAMK,WAAW,GAAG,MAAAA,CAAA,KAA8B;IAChD,IAAAN,oBAAa,EAACJ,KAAK,CAAC;IAEpBC,QAAQ,CAAC;MA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,wBAAwB,GAAG,MAAAA,CAAA,KAA8B;IAC7D,IAAAJ,qBAAc,EAAC,CAAC;IAChB,IAAAV,oBAAa,EAACJ,KAAK,CAAC;IAEpB,MAAMK,MAAe,GAAG,MAAMT,QAAQ,CAACU,OAAO,CAACa,YAAY,CAAC,CAAC;IAC7D,OAAOd,MAAM;EACf,CAAC;EAED,OAAO;IACLL,KAAK;IACLU,WAAW;IACXM,sBAAsB;IACtBH,qBAAqB;IACrBV,SAAS;IACTe,wBAAwB;IACxBN,kBAAkB;IAClBD,gBAAgB;IAChBF;EACF,CAAC;AACH,CAAC;AAACW,OAAA,CAAAzB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -33,25 +33,70 @@ const useRookEvents = () => {
|
|
|
33
33
|
}));
|
|
34
34
|
}
|
|
35
35
|
}, [ready]);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated this function will be removed at version 1.0.0
|
|
39
|
+
*
|
|
40
|
+
* The function `syncYesterdayEvents` asynchronously synchronizes yesterday's events and returns a
|
|
41
|
+
* boolean indicating success.
|
|
42
|
+
* @returns A boolean value is being returned from the `syncYesterdayEvents` function.
|
|
43
|
+
*/
|
|
36
44
|
const syncYesterdayEvents = () => {
|
|
37
45
|
(0, _utils.isModuleReady)(ready);
|
|
38
46
|
return rookSync.current.syncYesterdayEvents();
|
|
39
47
|
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The function `syncBodyHeartRateEvents` takes a date string as input, performs some checks, and
|
|
51
|
+
* then syncs body heart rate events for that date.
|
|
52
|
+
* @param {string} date - The `date` parameter in the `syncBodyHeartRateEvents` function is a string
|
|
53
|
+
* that represents the date for which the body heart rate events are to be synchronized.
|
|
54
|
+
* @returnsThe function `syncBodyHeartRateEvents` is returning a `Promise` that resolves to a boolean
|
|
55
|
+
* value.`.
|
|
56
|
+
*/
|
|
40
57
|
const syncBodyHeartRateEvent = date => {
|
|
41
58
|
(0, _utils.isModuleReady)(ready);
|
|
42
59
|
(0, _utils.isValidDate)(date);
|
|
43
60
|
return rookSync.current.syncBodyHeartRateEvent(date);
|
|
44
61
|
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The function `syncPhysicalHeartRateEvents` synchronizes physical heart rate events for a specific
|
|
65
|
+
* date.
|
|
66
|
+
* @param {string} date - The `date` parameter in the `syncPhysicalHeartRateEvents` function is a
|
|
67
|
+
* string that represents the date for which you want to sync physical heart rate events in a
|
|
68
|
+
* certain format, such as "YYYY-MM-DD".
|
|
69
|
+
* @returns The function `syncPhysicalHeartRateEvents` is returning a `Promise` that resolves to a boolean
|
|
70
|
+
* value.`.
|
|
71
|
+
*/
|
|
45
72
|
const syncPhysicalHeartRateEvent = date => {
|
|
46
73
|
(0, _utils.isModuleReady)(ready);
|
|
47
74
|
(0, _utils.isValidDate)(date);
|
|
48
75
|
return rookSync.current.syncPhysicalHeartRateEvent(date);
|
|
49
76
|
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The function `syncBodyOxygenationEvents` asynchronously syncs body oxygenation events for a given
|
|
80
|
+
* date.
|
|
81
|
+
* @param {string} date - The `date` parameter is a string that represents a specific date in a
|
|
82
|
+
* particular format, such as "YYYY-MM-DD".
|
|
83
|
+
* @returns The function `syncBodyOxygenationEvents` is returning the result of the sync
|
|
84
|
+
*/
|
|
50
85
|
const syncBodyOxygenationEvent = date => {
|
|
51
86
|
(0, _utils.isModuleReady)(ready);
|
|
52
87
|
(0, _utils.isValidDate)(date);
|
|
53
88
|
return rookSync.current.syncBodyOxygenationEvent(date);
|
|
54
89
|
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The function `syncPhysicalOxygenationEvents` in TypeScript synchronizes physical oxygenation
|
|
93
|
+
* events for a given date.
|
|
94
|
+
* @param {string} date - The `date` parameter is a string representing a specific date for which
|
|
95
|
+
* physical oxygenation events need to be synchronized, in a
|
|
96
|
+
* particular format, such as "YYYY-MM-DD".
|
|
97
|
+
* @returns The function `syncPhysicalOxygenationEvents` is returning a Promise that resolves to a boolean
|
|
98
|
+
* value.
|
|
99
|
+
*/
|
|
55
100
|
const syncPhysicalOxygenationEvent = date => {
|
|
56
101
|
(0, _utils.isModuleReady)(ready);
|
|
57
102
|
(0, _utils.isValidDate)(date);
|
|
@@ -63,30 +108,71 @@ const useRookEvents = () => {
|
|
|
63
108
|
if (_utils.packageInfo.isAndroid) return rookSync.current.syncPhysicalEvents(date);
|
|
64
109
|
return rookSync.current.syncTrainingEvent(date);
|
|
65
110
|
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The function `syncTemperatureEvents` asynchronously syncs temperature events for a given date.
|
|
114
|
+
* @param {string} date - The `date` parameter in the `syncTemperatureEvents` function is a string
|
|
115
|
+
* that represents the date for which temperature events are to be synchronized. The format of the date must be yyyy-MM-dd
|
|
116
|
+
* @returns The function `syncTemperatureEvents` is returning a Promise that resolves to a boolean
|
|
117
|
+
* value.
|
|
118
|
+
*/
|
|
66
119
|
const syncTemperatureEvent = async date => {
|
|
67
120
|
(0, _utils.isModuleReady)(ready);
|
|
68
121
|
(0, _utils.isValidDate)(date);
|
|
69
122
|
const result = await rookSync.current.syncTemperatureEvent(date);
|
|
70
123
|
return result;
|
|
71
124
|
};
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The function `syncBloodPressureEvents` synchronizes blood pressure events for a specific date.
|
|
128
|
+
* @param {string} date - The `date` parameter is a string that represents the date for which blood
|
|
129
|
+
* pressure events are to be synchronized in a certain format, such as "YYYY-MM-DD".
|
|
130
|
+
* @returns function `syncBloodPressureEvents` is returning a `Promise` that resolves to a boolean
|
|
131
|
+
* value.`
|
|
132
|
+
*/
|
|
72
133
|
const syncPressureEvent = async date => {
|
|
73
134
|
(0, _utils.isModuleReady)(ready);
|
|
74
135
|
(0, _utils.isValidDate)(date);
|
|
75
136
|
if (_utils.packageInfo.isAndroid) return rookSync.current.syncBloodPressureEvents(date);
|
|
76
137
|
return rookSync.current.syncPressureEvent(date);
|
|
77
138
|
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The function `syncBloodGlucoseEvents` in TypeScript synchronizes blood glucose events for a given
|
|
142
|
+
* date.
|
|
143
|
+
* @param {string} date - The `date` parameter is a string representing a specific date for which
|
|
144
|
+
* blood glucose events are to be synchronized in a certain format, such as "YYYY-MM-DD".
|
|
145
|
+
* @returns function `syncBloodGlucoseEvents` is returning a `Promise` that resolves to a boolean
|
|
146
|
+
* value.`
|
|
147
|
+
*/
|
|
78
148
|
const syncGlucoseEvent = async date => {
|
|
79
149
|
(0, _utils.isModuleReady)(ready);
|
|
80
150
|
(0, _utils.isValidDate)(date);
|
|
81
151
|
if (_utils.packageInfo.isAndroid) return rookSync.current.syncBloodGlucoseEvents(date);
|
|
82
152
|
return rookSync.current.syncGlucoseEvent(date);
|
|
83
153
|
};
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* The function `syncBodyMetricsEvents` synchronizes body metrics events for a specific date.
|
|
157
|
+
* @param {string} date - The `date` parameter is a string that represents a specific date in a
|
|
158
|
+
* certain format, such as "YYYY-MM-DD".
|
|
159
|
+
* @returns function `syncBodyMetricsEvents` is returning a `Promise` that resolves to a boolean
|
|
160
|
+
* value.`
|
|
161
|
+
*/
|
|
84
162
|
const syncBodyMetricsEvent = async date => {
|
|
85
163
|
(0, _utils.isModuleReady)(ready);
|
|
86
164
|
(0, _utils.isValidDate)(date);
|
|
87
165
|
const result = await rookSync.current.syncBodyMetricsEvent(date);
|
|
88
166
|
return result;
|
|
89
167
|
};
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* The function `syncHealthConnectHydrationEvents` takes a date string as input and synchronize hydration events.
|
|
171
|
+
* @param {string} date - The `date` parameter is a string that represents a specific date in a
|
|
172
|
+
* certain format, such as "YYYY-MM-DD".
|
|
173
|
+
* @returns The function `syncHydrationEvents` is returning a `Promise` that resolves to a boolean
|
|
174
|
+
* value.
|
|
175
|
+
*/
|
|
90
176
|
const syncHealthConnectHydrationEvents = async date => {
|
|
91
177
|
(0, _utils.isRunningOnAndroid)();
|
|
92
178
|
(0, _utils.isModuleReady)(ready);
|
|
@@ -94,6 +180,13 @@ const useRookEvents = () => {
|
|
|
94
180
|
const result = await rookSync.current.syncHydrationEvents(date);
|
|
95
181
|
return result;
|
|
96
182
|
};
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The function `syncHealthConnectNutritionEvents` in TypeScript synchronizes nutrition events for a given date.
|
|
186
|
+
* @param {string} date - The `date` parameter is a string that represents a specific date in a
|
|
187
|
+
* particular format, such as "YYYY-MM-DD".
|
|
188
|
+
* @returns The function `syncNutritionEvents` is returning the result of the sync
|
|
189
|
+
*/
|
|
97
190
|
const syncHealthConnectNutritionEvents = async date => {
|
|
98
191
|
(0, _utils.isRunningOnAndroid)();
|
|
99
192
|
(0, _utils.isModuleReady)(ready);
|
|
@@ -101,6 +194,12 @@ const useRookEvents = () => {
|
|
|
101
194
|
const result = await rookSync.current.syncNutritionEvents(date);
|
|
102
195
|
return result;
|
|
103
196
|
};
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* TThe function `reSyncFailedEvents` syncs pending summaries that for some reason failed to upload.
|
|
200
|
+
* @returns The function `syncPendingEvents` is returning the result of the
|
|
201
|
+
* call, which is a boolean value.
|
|
202
|
+
*/
|
|
104
203
|
const reSyncFailedEvents = async () => {
|
|
105
204
|
(0, _utils.isModuleReady)(ready);
|
|
106
205
|
if (_utils.packageInfo.isAndroid) return rookSync.current.syncPendingEvents();
|
|
@@ -211,7 +310,7 @@ const useRookEvents = () => {
|
|
|
211
310
|
},
|
|
212
311
|
dataType: 'blood_glucose_body_events'
|
|
213
312
|
}),
|
|
214
|
-
|
|
313
|
+
syncHealthConnectHydrationEvents: payload => logBoundary({
|
|
215
314
|
fun: syncHealthConnectHydrationEvents,
|
|
216
315
|
logSuccess: true,
|
|
217
316
|
payload,
|
|
@@ -222,7 +321,7 @@ const useRookEvents = () => {
|
|
|
222
321
|
},
|
|
223
322
|
dataType: 'hydration_body_events'
|
|
224
323
|
}),
|
|
225
|
-
|
|
324
|
+
syncHealthConnectNutritionEvents: payload => logBoundary({
|
|
226
325
|
fun: syncHealthConnectNutritionEvents,
|
|
227
326
|
logSuccess: true,
|
|
228
327
|
payload,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_RookSyncGateContext","_utils","_reactNativeRookLoggerReactNative","useRookEvents","rookSync","useRef","getRookModule","initLogger","logBoundary","useRookLogger","state","ready","clientUUID","environment","userID","useRookSyncGateContext","useEffect","loggerDescription","syncYesterdayEvents","isModuleReady","current","syncBodyHeartRateEvent","date","isValidDate","syncPhysicalHeartRateEvent","syncBodyOxygenationEvent","syncPhysicalOxygenationEvent","syncTrainingEvent","packageInfo","isAndroid","syncPhysicalEvents","syncTemperatureEvent","result","syncPressureEvent","syncBloodPressureEvents","syncGlucoseEvent","syncBloodGlucoseEvents","syncBodyMetricsEvent","syncHealthConnectHydrationEvents","isRunningOnAndroid","syncHydrationEvents","syncHealthConnectNutritionEvents","syncNutritionEvents","reSyncFailedEvents","syncPendingEvents","Promise","resolve","fun","logSuccess","payload","logType","Date","toISOString","type","event","dataType","syncBloodPressureEvent","syncBloodGlucoseEvent","exports"],"sourceRoot":"../../../src","sources":["hooks/useRookEvents.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAQA,IAAAG,iCAAA,GAAAH,OAAA;AAXA;;AAaO,MAAMI,aAAa,GAAGA,CAAA,KAAM;EACjC,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAC,IAAAC,oBAAa,EAAC,CAAC,CAAC;EACxC,MAAM;IAAEC,UAAU;IAAEC;EAAY,CAAC,GAAG,IAAAC,+CAAa,EAAC,CAAC;EAEnD,MAAM;IACJC,KAAK,EAAE;MAAEC,KAAK;MAAEC,UAAU;MAAEC,WAAW;MAAEC;IAAO;EAClD,CAAC,GAAG,IAAAC,2CAAsB,EAAC,CAAC;EAE5B,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAIL,KAAK,EAAE;MACTJ,UAAU,CAAC,IAAAU,wBAAiB,EAAC;QAAEL,UAAU;QAAEC,WAAW;QAAEC;MAAO,CAAC,CAAC,CAAC;IACpE;EACF,CAAC,EAAE,CAACH,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"names":["_react","require","_RookSyncGateContext","_utils","_reactNativeRookLoggerReactNative","useRookEvents","rookSync","useRef","getRookModule","initLogger","logBoundary","useRookLogger","state","ready","clientUUID","environment","userID","useRookSyncGateContext","useEffect","loggerDescription","syncYesterdayEvents","isModuleReady","current","syncBodyHeartRateEvent","date","isValidDate","syncPhysicalHeartRateEvent","syncBodyOxygenationEvent","syncPhysicalOxygenationEvent","syncTrainingEvent","packageInfo","isAndroid","syncPhysicalEvents","syncTemperatureEvent","result","syncPressureEvent","syncBloodPressureEvents","syncGlucoseEvent","syncBloodGlucoseEvents","syncBodyMetricsEvent","syncHealthConnectHydrationEvents","isRunningOnAndroid","syncHydrationEvents","syncHealthConnectNutritionEvents","syncNutritionEvents","reSyncFailedEvents","syncPendingEvents","Promise","resolve","fun","logSuccess","payload","logType","Date","toISOString","type","event","dataType","syncBloodPressureEvent","syncBloodGlucoseEvent","exports"],"sourceRoot":"../../../src","sources":["hooks/useRookEvents.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAQA,IAAAG,iCAAA,GAAAH,OAAA;AAXA;;AAaO,MAAMI,aAAa,GAAGA,CAAA,KAAM;EACjC,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAC,IAAAC,oBAAa,EAAC,CAAC,CAAC;EACxC,MAAM;IAAEC,UAAU;IAAEC;EAAY,CAAC,GAAG,IAAAC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C,CAAC;QAC9BC,IAAI,EAAE,cAAc;QACpBC,KAAK,EAAE;MACT,CAAC;MACDC,QAAQ,EAAE;IACZ,CAAC;EACL,CAAC;AACH,CAAC;AAACG,OAAA,CAAAvD,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -14,31 +14,59 @@ const useRookPermissions = () => {
|
|
|
14
14
|
ready
|
|
15
15
|
}
|
|
16
16
|
} = (0, _RookSyncGateContext.useRookSyncGateContext)();
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The function `checkAvailability` checks the availability of the health services
|
|
20
|
+
* @returns The function `checkAvailability` returns a Promise that resolves to a
|
|
21
|
+
* `CheckAvailabilityResponse` | 'INSTALLED' | 'NOT_INSTALLED' | 'NOT_SUPPORTED';
|
|
22
|
+
*/
|
|
17
23
|
const checkAvailability = () => {
|
|
18
24
|
(0, _utils.isModuleReady)(ready);
|
|
19
25
|
if (_utils.packageInfo.isAndroid) return rookSync.current.checkAvailability();
|
|
20
26
|
return new Promise(resolve => resolve('INSTALLED'));
|
|
21
27
|
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The function `healthConnectHasPermissions` checks if the app has permissions for health connect data
|
|
31
|
+
* access.
|
|
32
|
+
* @returns The function `healthConnectHasPermissions` is returning a boolean`.
|
|
33
|
+
*/
|
|
22
34
|
const healthConnectHasPermissions = async () => {
|
|
23
35
|
(0, _utils.isRunningOnAndroid)();
|
|
24
36
|
(0, _utils.isModuleReady)(ready);
|
|
25
37
|
return rookSync.current.checkPermissions('ALL');
|
|
26
38
|
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The function `requestAllAppleHealthPermissions` requests all permissions for apple health
|
|
42
|
+
*/
|
|
27
43
|
const requestAllAppleHealthPermissions = async () => {
|
|
28
44
|
(0, _utils.isRunningOniOS)();
|
|
29
45
|
(0, _utils.isModuleReady)(ready);
|
|
30
46
|
await rookSync.current.requestAllPermissions();
|
|
31
47
|
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The function `requestAllHealthConnectPermissions` requests all permissions for health connect
|
|
51
|
+
*/
|
|
32
52
|
const requestAllHealthConnectPermissions = async () => {
|
|
33
53
|
(0, _utils.isRunningOnAndroid)();
|
|
34
54
|
(0, _utils.isModuleReady)(ready);
|
|
35
55
|
await rookSync.current.requestPermissions('ALL');
|
|
36
56
|
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The function `requestAllPermissions` requests all permissions
|
|
60
|
+
*/
|
|
37
61
|
const requestAllPermissions = () => {
|
|
38
62
|
(0, _utils.isModuleReady)(ready);
|
|
39
63
|
if (_utils.packageInfo.isAndroid) return rookSync.current.requestPermissions('ALL');
|
|
40
64
|
return rookSync.current.requestAllPermissions();
|
|
41
65
|
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The function `openHealthConnectSettings` opens the health connect settings
|
|
69
|
+
*/
|
|
42
70
|
const openHealthConnectSettings = async () => {
|
|
43
71
|
(0, _utils.isRunningOnAndroid)();
|
|
44
72
|
(0, _utils.isModuleReady)(ready);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_RookSyncGateContext","_utils","useRookPermissions","rookSync","useRef","getRookModule","state","ready","useRookSyncGateContext","checkAvailability","isModuleReady","packageInfo","isAndroid","current","Promise","resolve","healthConnectHasPermissions","isRunningOnAndroid","checkPermissions","requestAllAppleHealthPermissions","isRunningOniOS","requestAllPermissions","requestAllHealthConnectPermissions","requestPermissions","openHealthConnectSettings","result","requestAndroidBackgroundPermissions","hasAndroidBackgroundPermissions","exports"],"sourceRoot":"../../../src","sources":["hooks/useRookPermissions.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAaO,MAAMG,kBAAkB,GAAGA,CAAA,KAAM;EACtC,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAC,IAAAC,oBAAa,EAAC,CAAC,CAAC;EACxC,MAAM;IACJC,KAAK,EAAE;MAAEC;IAAM;EACjB,CAAC,GAAG,IAAAC,2CAAsB,EAAC,CAAC;
|
|
1
|
+
{"version":3,"names":["_react","require","_RookSyncGateContext","_utils","useRookPermissions","rookSync","useRef","getRookModule","state","ready","useRookSyncGateContext","checkAvailability","isModuleReady","packageInfo","isAndroid","current","Promise","resolve","healthConnectHasPermissions","isRunningOnAndroid","checkPermissions","requestAllAppleHealthPermissions","isRunningOniOS","requestAllPermissions","requestAllHealthConnectPermissions","requestPermissions","openHealthConnectSettings","result","requestAndroidBackgroundPermissions","hasAndroidBackgroundPermissions","exports"],"sourceRoot":"../../../src","sources":["hooks/useRookPermissions.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAaO,MAAMG,kBAAkB,GAAGA,CAAA,KAAM;EACtC,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAC,IAAAC,oBAAa,EAAC,CAAC,CAAC;EACxC,MAAM;IACJC,KAAK,EAAE;MAAEC;IAAM;EACjB,CAAC,GAAG,IAAAC,2CAAsB,EAAC,CAAC;;EAE5B;AACF;AACA;AACA;AACA;EACE,MAAMC,iBAAiB,GAAGA,CAAA,KAA0C;IAClE,IAAAC,oBAAa,EAACH,KAAK,CAAC;IAEpB,IAAII,kBAAW,CAACC,SAAS,EAAE,OAAOT,QAAQ,CAACU,OAAO,CAACJ,iBAAiB,CAAC,CAAC;IAEtE,OAAO,IAAIK,OAAO,CAA6BC,OAAO,IACpDA,OAAO,CAAC,WAAW,CACrB,CAAC;EACH,CAAC;;EAED;AACF;AACA;AACA;AACA;EACE,MAAMC,2BAA2B,GAAG,MAAAA,CAAA,KAA8B;IAChE,IAAAC,yBAAkB,EAAC,CAAC;IACpB,IAAAP,oBAAa,EAACH,KAAK,CAAC;IAEpB,OAAOJ,QAA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AACA;EACE,MAAMC,+BAA+B,GAAGA,CAAA,KAAwB;IAC9D,IAAAV,yBAAkB,EAAC,CAAC;IACpB,IAAAP,oBAAa,EAACH,KAAK,CAAC;IAEpB,OAAOJ,QAAQ,CAACU,OAAO,CAACc,+BAA+B,CAAC,CAAC;EAC3D,CAAC;EAED,OAAO;IACLpB,KAAK;IACLE,iBAAiB;IACjBU,gCAAgC;IAChCG,kCAAkC;IAClCD,qBAAqB;IACrBG,yBAAyB;IACzBR,2BAA2B;IAC3BU,mCAAmC;IACnCC;EACF,CAAC;AACH,CAAC;AAACC,OAAA,CAAA1B,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -32,10 +32,30 @@ const useRookSummaries = () => {
|
|
|
32
32
|
userID
|
|
33
33
|
}));
|
|
34
34
|
}, [ready]);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The function `syncYesterdaySummaries` checks if a module is ready and then synchronizes
|
|
38
|
+
* yesterday's summaries.
|
|
39
|
+
* @returns A Promise<boolean> is being returned.
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated this function will be removed at version 1.0.0
|
|
43
|
+
* The function `syncYesterdaySummaries` synchronizes yesterday's summaries and returns a
|
|
44
|
+
* Promise<boolean>.
|
|
45
|
+
* @returns A Promise that resolves to a boolean value.
|
|
46
|
+
*/
|
|
35
47
|
const syncYesterdaySummaries = () => {
|
|
36
48
|
(0, _utils.isModuleReady)(ready);
|
|
37
49
|
return rookSync.current.syncYesterdaySummaries();
|
|
38
50
|
};
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Checks if in the specific date the health kit contains available data
|
|
54
|
+
* @param {'SLEEP' | 'PHYSICAL' | 'BODY'} props.type - specifies the type of summary that you want to sync
|
|
55
|
+
* @param {string} props.date - The `date` parameter is a string that represents a specific date for which
|
|
56
|
+
* the physical summary is being requested, should have the YYYY-MM-DD format.
|
|
57
|
+
* @returns
|
|
58
|
+
*/
|
|
39
59
|
const shouldSyncFor = props => {
|
|
40
60
|
(0, _utils.isModuleReady)(ready);
|
|
41
61
|
const {
|
|
@@ -47,21 +67,47 @@ const useRookSummaries = () => {
|
|
|
47
67
|
}
|
|
48
68
|
return rookSync.current.shouldSyncFor(type, date);
|
|
49
69
|
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The function `syncSleepSummary` sync sleep summary for the specific date.
|
|
73
|
+
* @param {string} date - The `date` parameter is a string that represents a specific date for which
|
|
74
|
+
* the sleep summary is being requested, should have the YYYY-MM-DD format.
|
|
75
|
+
* @returns A Promise that resolves to a boolean value thats means success or failure.
|
|
76
|
+
*/
|
|
50
77
|
const syncSleepSummary = date => {
|
|
51
78
|
(0, _utils.isModuleReady)(ready);
|
|
52
79
|
(0, _utils.isValidDate)(date);
|
|
53
80
|
return rookSync.current.syncSleepSummary(date);
|
|
54
81
|
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The function `syncPhysicalSummary` sync physical summary for the specific date.
|
|
85
|
+
* @param {string} date - The `date` parameter is a string that represents a specific date for which
|
|
86
|
+
* the physical summary is being requested, should have the YYYY-MM-DD format.
|
|
87
|
+
* @returns A Promise that resolves to a boolean value thats means success or failure.
|
|
88
|
+
*/
|
|
55
89
|
const syncPhysicalSummary = date => {
|
|
56
90
|
(0, _utils.isModuleReady)(ready);
|
|
57
91
|
(0, _utils.isValidDate)(date);
|
|
58
92
|
return rookSync.current.syncPhysicalSummary(date);
|
|
59
93
|
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The function `syncBodySummary` sync body summary for the specific date.
|
|
97
|
+
* @param {string} date - The `date` parameter is a string that represents a specific date for which
|
|
98
|
+
* the body summary is being requested, should have the YYYY-MM-DD format.
|
|
99
|
+
* @returns A Promise that resolves to a boolean value thats means success or failure.
|
|
100
|
+
*/
|
|
60
101
|
const syncBodySummary = date => {
|
|
61
102
|
(0, _utils.isModuleReady)(ready);
|
|
62
103
|
(0, _utils.isValidDate)(date);
|
|
63
104
|
return rookSync.current.syncBodySummary(date);
|
|
64
105
|
};
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The function `reSyncFailedSummaries` syncs pending summaries that for some reason failed to upload.
|
|
109
|
+
* @returns The function `reSyncFailedSummaries` is returning a `Promise<boolean>`.
|
|
110
|
+
*/
|
|
65
111
|
const reSyncFailedSummaries = () => {
|
|
66
112
|
(0, _utils.isModuleReady)(ready);
|
|
67
113
|
return rookSync.current.syncPendingSummaries();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_RookSyncGateContext","_utils","_reactNativeRookLoggerReactNative","useRookSummaries","rookSync","useRef","getRookModule","state","ready","clientUUID","environment","userID","useRookSyncGateContext","initLogger","logBoundary","useRookLogger","useEffect","loggerDescription","syncYesterdaySummaries","isModuleReady","current","shouldSyncFor","props","type","date","packageInfo","isAndroid","Promise","resolve","syncSleepSummary","isValidDate","syncPhysicalSummary","syncBodySummary","reSyncFailedSummaries","syncPendingSummaries","fun","logSuccess","payload","logType","event","dataType","exports"],"sourceRoot":"../../../src","sources":["hooks/useRookSummaries.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAOA,IAAAG,iCAAA,GAAAH,OAAA;AAVA;;AAiBO,MAAMI,gBAAgB,GAAGA,CAAA,KAAM;EACpC,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAC,IAAAC,oBAAa,EAAC,CAAC,CAAC;EACxC,MAAM;IACJC,KAAK,EAAE;MAAEC,KAAK;MAAEC,UAAU;MAAEC,WAAW;MAAEC;IAAO;EAClD,CAAC,GAAG,IAAAC,2CAAsB,EAAC,CAAC;EAE5B,MAAM;IAAEC,UAAU;IAAEC;EAAY,CAAC,GAAG,IAAAC,+CAAa,EAAC,CAAC;EAEnD,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAI,CAACR,KAAK,EAAE;IAEZK,UAAU,CAAC,IAAAI,wBAAiB,EAAC;MAAER,UAAU;MAAEC,WAAW;MAAEC;IAAO,CAAC,CAAC,CAAC;EACpE,CAAC,EAAE,CAACH,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"names":["_react","require","_RookSyncGateContext","_utils","_reactNativeRookLoggerReactNative","useRookSummaries","rookSync","useRef","getRookModule","state","ready","clientUUID","environment","userID","useRookSyncGateContext","initLogger","logBoundary","useRookLogger","useEffect","loggerDescription","syncYesterdaySummaries","isModuleReady","current","shouldSyncFor","props","type","date","packageInfo","isAndroid","Promise","resolve","syncSleepSummary","isValidDate","syncPhysicalSummary","syncBodySummary","reSyncFailedSummaries","syncPendingSummaries","fun","logSuccess","payload","logType","event","dataType","exports"],"sourceRoot":"../../../src","sources":["hooks/useRookSummaries.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAOA,IAAAG,iCAAA,GAAAH,OAAA;AAVA;;AAiBO,MAAMI,gBAAgB,GAAGA,CAAA,KAAM;EACpC,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAC,IAAAC,oBAAa,EAAC,CAAC,CAAC;EACxC,MAAM;IACJC,KAAK,EAAE;MAAEC,KAAK;MAAEC,UAAU;MAAEC,WAAW;MAAEC;IAAO;EAClD,CAAC,GAAG,IAAAC,2CAAsB,EAAC,CAAC;EAE5B,MAAM;IAAEC,UAAU;IAAEC;EAAY,CAAC,GAAG,IAAAC,+CAAa,EAAC,CAAC;EAEnD,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAI,CAACR,KAAK,EAAE;IAEZK,UAAU,CAAC,IAAAI,wBAAiB,EAAC;MAAER,UAAU;MAAEC,WAAW;MAAEC;IAAO,CAAC,CAAC,CAAC;EACpE,CAAC,EAAE,CAACH,KAAK,CAAC,CAAC;;EAEX;AACF;AACA;AACA;AACA;EACE;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,IAAI,CAAC;EAC/C,CAAC;;EAED;AACF;AACA;AACA;EACE,MAAMS,qBAAqB,GAAGA,CAAA,KAAwB;IACpD,IAAAd,oBAAa,EAACX,KAAK,CAAC;IACpB,OAAOJ,QAAQ,CAACgB,OAAO,CAACc,oBAAoB,CAAC,CAAC;EAChD,CAAC;EAED,OAAO;IACL1B,KAAK;IACLa,aAAa;IACbH,sBAAsB;IACtBe,qBAAqB;IACrBJ,gBAAgB,EAAGL,IAAY,IAC7BV,WAAW,CAAU;MACnBqB,GAAG,EAAEN,gBAAgB;MACrBO,UAAU,EAAE,IAAI;MAChBC,OAAO,EAAEb,IAAI;MACbc,OAAO,EAAE;QACPd,IAAI;QACJD,IAAI,EAAE,cAAc;QACpBgB,KAAK,EAAE;MACT,CAAC;MACDC,QAAQ,EAAE;IACZ,CAAC,CAAC;IACJT,mBAAmB,EAAGP,IAAY,IAChCV,WAAW,CAAU;MACnBqB,GAAG,EAAEJ,mBAAmB;MACxBK,UAAU,EAAE,IAAI;MAChBC,OAAO,EAAEb,IAAI;MACbc,OAAO,EAAE;QACPd,IAAI;QACJD,IAAI,EAAE,cAAc;QACpBgB,KAAK,EAAE;MACT,CAAC;MACDC,QAAQ,EAAE;IACZ,CAAC,CAAC;IACJR,eAAe,EAAGR,IAAY,IAC5BV,WAAW,CAAU;MACnBqB,GAAG,EAAEH,eAAe;MACpBI,UAAU,EAAE,IAAI;MAChBC,OAAO,EAAEb,IAAI;MACbc,OAAO,EAAE;QACPd,IAAI;QACJD,IAAI,EAAE,cAAc;QACpBgB,KAAK,EAAE;MACT,CAAC;MACDC,QAAQ,EAAE;IACZ,CAAC;EACL,CAAC;AACH,CAAC;AAACC,OAAA,CAAAtC,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.packageInfo = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
8
|
const packageInfo = exports.packageInfo = {
|
|
9
|
-
version: '0.2.
|
|
9
|
+
version: '0.2.4',
|
|
10
10
|
isAndroid: _reactNative.Platform.OS === 'android',
|
|
11
11
|
debug: false
|
|
12
12
|
};
|