@icanbwell/types 0.41.2 → 0.41.3

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.
@@ -1,4 +1,5 @@
1
1
  const OnAuthSuccessEventKey = 'onauthsuccess';
2
2
  const ErrorEventKey = 'error';
3
+ const NativeDependenciesEventKey = 'nativedependencies';
3
4
 
4
- export { ErrorEventKey, OnAuthSuccessEventKey };
5
+ export { ErrorEventKey, NativeDependenciesEventKey, OnAuthSuccessEventKey };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icanbwell/types",
3
- "version": "0.41.2",
3
+ "version": "0.41.3",
4
4
  "typedoc": {
5
5
  "entryPoint": "./src/index.ts",
6
6
  "tsconfig": "./tsconfig.lib.json"
@@ -36,8 +36,8 @@
36
36
  "import": "./index.js"
37
37
  }
38
38
  },
39
- "repoVersion": "1.28.1",
40
- "description": "@icanbwell/types. repo version: 1.28.1",
39
+ "repoVersion": "1.28.2",
40
+ "description": "@icanbwell/types. repo version: 1.28.2",
41
41
  "module": "./index.js",
42
42
  "main": "./index.js",
43
43
  "type": "module",
package/src/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './lib';
2
2
  export * from './frontend-telemetry';
3
+ export * from './native-plugins';
@@ -1,15 +1,17 @@
1
1
  import type rnBiometrics from 'react-native-biometrics';
2
2
  import type TypedEmitter from 'typed-emitter';
3
- import { OnAuthSuccessEventKey, type OnAuthSuccessEventData, ErrorEventKey, type ErrorEventData } from './native-components';
3
+ import { OnAuthSuccessEventKey, type OnAuthSuccessEventData, ErrorEventKey, type ErrorEventData, type NativeDependenciesEventKey } from './native-components';
4
4
  import { PermissionStatus } from 'react-native-permissions';
5
+ import { NativeDependencies } from './native-plugins';
5
6
  export type NativeEvents<T = any> = {
6
7
  openwebview: (url: string) => void;
7
8
  closewebview: (data: T) => void;
8
9
  reloadwebview: () => void;
9
10
  [OnAuthSuccessEventKey]: (data: OnAuthSuccessEventData) => void;
10
11
  [ErrorEventKey]: (data: ErrorEventData) => void;
12
+ [NativeDependenciesEventKey]: (data: NativeDependencies) => void;
11
13
  };
12
- export type NativeBridgeEmittableEvents = Pick<NativeEvents, 'onauthsuccess' | 'error'>;
14
+ export type NativeBridgeEmittableEvents = Pick<NativeEvents, 'onauthsuccess' | 'error' | 'nativedependencies'>;
13
15
  export type NativeEventEmitter = TypedEmitter<NativeEvents>;
14
16
  export type NativeEmittableEventEmitter = TypedEmitter<NativeBridgeEmittableEvents>;
15
17
  type InvokedReturnType<T> = Promise<Awaited<T>>;
@@ -1,3 +1,4 @@
1
+ import { NativeDependencies } from './native-plugins';
1
2
  export type OnAuthSuccessEventData = {
2
3
  user: {
3
4
  id: string;
@@ -10,9 +11,11 @@ export type ErrorEventData = {
10
11
  };
11
12
  export declare const OnAuthSuccessEventKey = "onauthsuccess";
12
13
  export declare const ErrorEventKey = "error";
14
+ export declare const NativeDependenciesEventKey = "nativedependencies";
13
15
  export type EventKeyToDataMap = {
14
16
  [OnAuthSuccessEventKey]: OnAuthSuccessEventData;
15
17
  [ErrorEventKey]: ErrorEventData;
18
+ [NativeDependenciesEventKey]: NativeDependencies;
16
19
  };
17
20
  type OnEventData<T extends keyof EventKeyToDataMap> = {
18
21
  key: T;
@@ -0,0 +1,2 @@
1
+ export type NativeDependency = 'react-native-webview' | '@react-native-async-storage/async-storage' | 'react-native-biometrics' | 'react-native-permissions' | 'react-native-print';
2
+ export type NativeDependencies = Array<NativeDependency>;