@tryvital/vital-health-react-native 0.2.5 → 0.2.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvital/vital-health-react-native",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Client to access iOS's HealthKit and Android HealthConnect",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -33,8 +33,7 @@
33
33
  "release": "release-it",
34
34
  "example": "yarn --cwd example",
35
35
  "bootstrap": "yarn example && yarn install && yarn example pods",
36
- "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build",
37
- "postinstall": "npm run typescript"
36
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build"
38
37
  },
39
38
  "keywords": [
40
39
  "react-native",
package/lib/index.d.ts DELETED
@@ -1,22 +0,0 @@
1
- import { NativeEventEmitter } from 'react-native';
2
- export declare class VitalHealth {
3
- static status: NativeEventEmitter;
4
- static configure(backgroundDeliveryEnabled: boolean, numberOfDaysToBackFill: number, enableLogs: boolean): Promise<void>;
5
- static askForResources(resources: VitalResource[]): Promise<void>;
6
- static hasAskedForPermission(resource: VitalResource): Promise<boolean>;
7
- static syncData(resources: VitalResource[]): Promise<void>;
8
- static cleanUp(): Promise<void>;
9
- }
10
- export declare enum VitalResource {
11
- Profile = "profile",
12
- Body = "body",
13
- Workout = "workout",
14
- Activity = "activity",
15
- Sleep = "sleep",
16
- Glucose = "glucose",
17
- BloodPressure = "bloodPressure",
18
- HeartRate = "heartRate",
19
- Steps = "steps",
20
- ActiveEnergyBurned = "activeEnergyBurned",
21
- BasalEnergyBurned = "basalEnergyBurned"
22
- }
package/lib/index.js DELETED
@@ -1,44 +0,0 @@
1
- import { NativeEventEmitter, NativeModules, Platform } from 'react-native';
2
- const LINKING_ERROR = `The package 'vital-health-react-native' doesn't seem to be linked. Make sure: \n\n` +
3
- Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
4
- '- You rebuilt the app after installing the package\n' +
5
- '- You are not using Expo Go\n';
6
- const VitalHealthReactNative = NativeModules.VitalHealthReactNative
7
- ? NativeModules.VitalHealthReactNative
8
- : new Proxy({}, {
9
- get() {
10
- throw new Error(LINKING_ERROR);
11
- },
12
- });
13
- export class VitalHealth {
14
- static status = new NativeEventEmitter(VitalHealthReactNative);
15
- static configure(backgroundDeliveryEnabled, numberOfDaysToBackFill, enableLogs) {
16
- return VitalHealthReactNative.configure(backgroundDeliveryEnabled, numberOfDaysToBackFill, enableLogs);
17
- }
18
- static askForResources(resources) {
19
- return VitalHealthReactNative.askForResources(resources);
20
- }
21
- static hasAskedForPermission(resource) {
22
- return VitalHealthReactNative.hasAskedForPermission(resource);
23
- }
24
- static syncData(resources) {
25
- return VitalHealthReactNative.syncData(resources);
26
- }
27
- static cleanUp() {
28
- return VitalHealthReactNative.cleanUp();
29
- }
30
- }
31
- export var VitalResource;
32
- (function (VitalResource) {
33
- VitalResource["Profile"] = "profile";
34
- VitalResource["Body"] = "body";
35
- VitalResource["Workout"] = "workout";
36
- VitalResource["Activity"] = "activity";
37
- VitalResource["Sleep"] = "sleep";
38
- VitalResource["Glucose"] = "glucose";
39
- VitalResource["BloodPressure"] = "bloodPressure";
40
- VitalResource["HeartRate"] = "heartRate";
41
- VitalResource["Steps"] = "steps";
42
- VitalResource["ActiveEnergyBurned"] = "activeEnergyBurned";
43
- VitalResource["BasalEnergyBurned"] = "basalEnergyBurned";
44
- })(VitalResource || (VitalResource = {}));