@icanbwell/types 7.9.0 → 7.10.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.9.0",
3
+ "version": "7.10.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.17.0",
40
- "description": "@icanbwell/types. repo version: 17.17.0",
39
+ "repoVersion": "17.19.0",
40
+ "description": "@icanbwell/types. repo version: 17.19.0",
41
41
  "peerDependencies": {
42
42
  "react-native": "0.x",
43
43
  "react-native-biometrics": "3.x",
@@ -49,7 +49,8 @@
49
49
  "@react-native-async-storage/async-storage": "1.x",
50
50
  "@react-native-camera-roll/camera-roll": "5.x",
51
51
  "@react-native-community/geolocation": "3.x",
52
- "react-native-device-info": "^10.x"
52
+ "react-native-device-info": "^10.x",
53
+ "react-native-passkey": "3.x"
53
54
  },
54
55
  "module": "./index.js",
55
56
  "main": "./index.js",
@@ -164,6 +164,73 @@ export interface IConnectDevices {
164
164
  endSession(): Promise<void>;
165
165
  getCurrentUser(): Promise<IConnectDevicesSessionUser | null>;
166
166
  }
167
+ export interface PasskeyCredentialDescriptor {
168
+ type: string;
169
+ id: string;
170
+ transports?: string[];
171
+ }
172
+ export interface PasskeyCreateRequest {
173
+ challenge: string;
174
+ rp: {
175
+ id: string;
176
+ name: string;
177
+ };
178
+ user: {
179
+ id: string;
180
+ name: string;
181
+ displayName: string;
182
+ };
183
+ pubKeyCredParams: Array<{
184
+ type: string;
185
+ alg: number;
186
+ }>;
187
+ timeout?: number;
188
+ excludeCredentials?: PasskeyCredentialDescriptor[];
189
+ authenticatorSelection?: {
190
+ authenticatorAttachment?: string;
191
+ requireResidentKey?: boolean;
192
+ residentKey?: string;
193
+ userVerification?: string;
194
+ };
195
+ attestation?: string;
196
+ }
197
+ export interface PasskeyCreateResult {
198
+ id: string;
199
+ rawId: string;
200
+ type?: string;
201
+ authenticatorAttachment?: string;
202
+ response: {
203
+ clientDataJSON: string;
204
+ attestationObject: string;
205
+ };
206
+ }
207
+ export interface PasskeyGetRequest {
208
+ challenge: string;
209
+ rpId: string;
210
+ timeout?: number;
211
+ allowCredentials?: PasskeyCredentialDescriptor[];
212
+ userVerification?: string;
213
+ }
214
+ export interface PasskeyGetResult {
215
+ id: string;
216
+ rawId: string;
217
+ type?: string;
218
+ authenticatorAttachment?: string;
219
+ response: {
220
+ authenticatorData: string;
221
+ clientDataJSON: string;
222
+ signature: string;
223
+ userHandle: string;
224
+ };
225
+ }
226
+ export interface IPasskey {
227
+ /** Whether the device supports passkeys (Android 28+ / iOS 15+). */
228
+ isSupported(): Promise<boolean>;
229
+ /** Perform a FIDO2 credential registration (navigator.credentials.create). */
230
+ create(request: PasskeyCreateRequest): Promise<PasskeyCreateResult>;
231
+ /** Perform a FIDO2 credential assertion (navigator.credentials.get). */
232
+ get(request: PasskeyGetRequest): Promise<PasskeyGetResult>;
233
+ }
167
234
  export interface INativeBridge {
168
235
  connectDevices: IConnectDevices;
169
236
  webview: IWebview;
@@ -179,6 +246,7 @@ export interface INativeBridge {
179
246
  system: ISystem;
180
247
  deepLink: IDeepLink;
181
248
  utils: IUtils;
249
+ passkey: IPasskey;
182
250
  reloadView(preserveSession?: boolean): void;
183
251
  }
184
252
  export type GlobalPermissionStatus = PermissionStatus | PermissionState;
@@ -12,7 +12,12 @@ import type deviceInfo from 'react-native-device-info';
12
12
  import type * as connectDevicesCore from '@validic-mobile/react-native-inform-core';
13
13
  import type * as connectDevicesHealthConnect from '@validic-mobile/react-native-inform-healthconnect';
14
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';
15
+ export interface PasskeyModule {
16
+ isSupported(): boolean;
17
+ create(request: import('./native-bridge').PasskeyCreateRequest): Promise<import('./native-bridge').PasskeyCreateResult>;
18
+ get(request: import('./native-bridge').PasskeyGetRequest): Promise<import('./native-bridge').PasskeyGetResult>;
19
+ }
20
+ 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' | 'react-native-passkey';
16
21
  export type NativePackages = Array<NativePackage>;
17
22
  export type NativeModuleMap = {
18
23
  androidLocationEnabler?: typeof androidLocationEnabler;
@@ -29,5 +34,6 @@ export type NativeModuleMap = {
29
34
  connectDevicesCore?: typeof connectDevicesCore;
30
35
  connectDevicesHealthConnect?: typeof connectDevicesHealthConnect;
31
36
  connectDevicesHealthKit?: typeof connectDevicesHealthKit;
37
+ passkey?: PasskeyModule;
32
38
  };
33
39
  export type NativeModules = (keyof NativeModuleMap)[];