@icanbwell/types 0.36.0 → 0.38.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": "0.36.0",
3
+ "version": "0.38.0",
4
4
  "typedoc": {
5
5
  "entryPoint": "./src/index.ts",
6
6
  "tsconfig": "./tsconfig.lib.json"
@@ -35,7 +35,8 @@
35
35
  "types": "./src/index.d.ts",
36
36
  "dependencies": {
37
37
  "apollo-link-rest": "0.9.0",
38
- "react-native-biometrics": "3.0.1"
38
+ "react-native-biometrics": "3.0.1",
39
+ "react-native-vision-camera": "2.15.4"
39
40
  },
40
41
  "peerDependencies": {}
41
42
  }
@@ -1,5 +1,6 @@
1
1
  import type rnBiometrics from 'react-native-biometrics';
2
2
  import type TypedEmitter from 'typed-emitter';
3
+ import type { Camera } from 'react-native-vision-camera';
3
4
  import { OnAuthSuccessEventKey, type OnAuthSuccessEventData } from './native-components';
4
5
  export type NativeEvents<T = any> = {
5
6
  openwebview: (url: string) => void;
@@ -31,11 +32,18 @@ export interface IStorage {
31
32
  getItem(key: string): Promise<string | null>;
32
33
  removeItem(key: string): Promise<void>;
33
34
  }
35
+ export interface ICamera {
36
+ isAvailable(): Promise<boolean>;
37
+ getCameraPermissionStatus: InvokedWrappedMethod<typeof Camera.getCameraPermissionStatus>;
38
+ requestCameraPermission: InvokedWrappedMethod<typeof Camera.requestCameraPermission>;
39
+ takePhoto: InvokedWrappedMethod<Camera['takePhoto']>;
40
+ }
34
41
  export interface INativeBridge {
35
42
  webview: IWebview;
36
43
  biometrics: IBiometrics;
37
44
  events: IEvents;
38
45
  storage: IStorage;
46
+ camera: ICamera;
39
47
  reloadView(): void;
40
48
  }
41
49
  export type PluginKeys = Exclude<keyof INativeBridge, 'webview'>;