@icanbwell/types 7.8.0 → 7.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icanbwell/types",
3
- "version": "7.8.0",
3
+ "version": "7.9.0",
4
4
  "typedoc": {
5
5
  "entryPoint": "./src/index.ts",
6
6
  "tsconfig": "./tsconfig.lib.json"
@@ -36,8 +36,8 @@
36
36
  "import": "./frontend-telemetry.js"
37
37
  }
38
38
  },
39
- "repoVersion": "17.14.0",
40
- "description": "@icanbwell/types. repo version: 17.14.0",
39
+ "repoVersion": "17.17.0",
40
+ "description": "@icanbwell/types. repo version: 17.17.0",
41
41
  "peerDependencies": {
42
42
  "react-native": "0.x",
43
43
  "react-native-biometrics": "3.x",
@@ -56,6 +56,9 @@
56
56
  "type": "module",
57
57
  "types": "./src/index.d.ts",
58
58
  "dependencies": {
59
+ "@validic-mobile/react-native-inform-core": "2.3.0",
60
+ "@validic-mobile/react-native-inform-healthconnect": "2.3.0",
61
+ "@validic-mobile/react-native-inform-healthkit": "2.3.0",
59
62
  "apollo-link-rest": "0.9.0",
60
63
  "react-native-android-location-enabler": "2.0.1"
61
64
  }
@@ -147,20 +147,25 @@ export type DeepLinkType = {
147
147
  export interface IDeepLink {
148
148
  openLink(deepLink: DeepLinkType, target?: string): Promise<void>;
149
149
  }
150
- export interface ISamsungHealth {
151
- connect(): Promise<boolean>;
152
- checkPermissions(): Promise<boolean>;
153
- readHeartRate(params: {
154
- startDate: number;
155
- endDate: number;
156
- }): Promise<any>;
157
- readBloodPressure(params: {
158
- startDate: number;
159
- endDate: number;
160
- }): Promise<any>;
150
+ export interface IConnectDevicesSessionUser {
151
+ userID: string;
152
+ organizationID: string;
153
+ accessToken: string;
154
+ }
155
+ export interface SyncRecord {
156
+ date: string;
157
+ metric: string;
158
+ value: number;
159
+ unit: string;
160
+ }
161
+ export interface IConnectDevices {
162
+ startSession(user: IConnectDevicesSessionUser): Promise<void>;
163
+ syncData(daysToFetch?: number): Promise<SyncRecord[]>;
164
+ endSession(): Promise<void>;
165
+ getCurrentUser(): Promise<IConnectDevicesSessionUser | null>;
161
166
  }
162
167
  export interface INativeBridge {
163
- samsungHealth: ISamsungHealth;
168
+ connectDevices: IConnectDevices;
164
169
  webview: IWebview;
165
170
  biometrics: IBiometrics;
166
171
  events: IEvents;
@@ -9,13 +9,10 @@ import type storage from '@react-native-async-storage/async-storage';
9
9
  import type * as cameraRoll from '@react-native-camera-roll/camera-roll';
10
10
  import type geolocation from '@react-native-community/geolocation';
11
11
  import type deviceInfo from 'react-native-device-info';
12
- export interface SamsungHealthNativeModule {
13
- connect(): Promise<boolean>;
14
- readHeartRate(startDate: number, endDate: number): Promise<any[]>;
15
- readBloodPressure(startDate: number, endDate: number): Promise<any[]>;
16
- checkPermissions(): Promise<boolean>;
17
- }
18
- export type NativePackage = '@react-native-async-storage/async-storage' | '@react-native-community/geolocation' | '@react-native-camera-roll/camera-roll' | 'react-native-biometrics' | 'react-native-permissions' | 'react-native-print' | 'react-native-webview' | 'react-native-fs' | '@react-native-documents/picker' | 'react-native-notifications' | 'react-native-device-info' | 'react-native-android-location-enabler' | 'custom-samsung-health';
12
+ import type * as connectDevicesCore from '@validic-mobile/react-native-inform-core';
13
+ import type * as connectDevicesHealthConnect from '@validic-mobile/react-native-inform-healthconnect';
14
+ import type * as connectDevicesHealthKit from '@validic-mobile/react-native-inform-healthkit';
15
+ export type NativePackage = '@react-native-async-storage/async-storage' | '@react-native-community/geolocation' | '@react-native-camera-roll/camera-roll' | 'react-native-biometrics' | 'react-native-permissions' | 'react-native-print' | 'react-native-webview' | 'react-native-fs' | '@react-native-documents/picker' | 'react-native-notifications' | 'react-native-device-info' | 'react-native-android-location-enabler' | '@validic-mobile/react-native-inform-core' | '@validic-mobile/react-native-inform-healthconnect' | '@validic-mobile/react-native-inform-healthkit';
19
16
  export type NativePackages = Array<NativePackage>;
20
17
  export type NativeModuleMap = {
21
18
  androidLocationEnabler?: typeof androidLocationEnabler;
@@ -29,6 +26,8 @@ export type NativeModuleMap = {
29
26
  storage?: typeof storage;
30
27
  pushNotifications?: typeof pushNotifications;
31
28
  deviceInfo?: typeof deviceInfo;
32
- samsungHealth?: SamsungHealthNativeModule;
29
+ connectDevicesCore?: typeof connectDevicesCore;
30
+ connectDevicesHealthConnect?: typeof connectDevicesHealthConnect;
31
+ connectDevicesHealthKit?: typeof connectDevicesHealthKit;
33
32
  };
34
33
  export type NativeModules = (keyof NativeModuleMap)[];