react-native-usesense 1.0.0 → 2.0.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/README.md +267 -373
- package/android/build.gradle +7 -2
- package/android/src/main/java/com/usesense/reactnative/UseSenseModule.kt +6 -1
- package/ios/UseSenseModule.swift +223 -88
- package/lib/commonjs/index.js +122 -101
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +123 -102
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/index.d.ts +157 -141
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/react-native-usesense.podspec +9 -3
- package/src/index.ts +222 -164
|
@@ -1,196 +1,212 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Target environment for the UseSense API. `auto` asks the native SDK
|
|
3
|
+
* to detect from the API key prefix (`sk_sandbox_*` → sandbox,
|
|
4
|
+
* `sk_prod_*` → production).
|
|
5
|
+
*/
|
|
6
|
+
export type UseSenseEnvironment = 'sandbox' | 'production' | 'auto';
|
|
7
|
+
/** Type of verification session. */
|
|
4
8
|
export type SessionType = 'enrollment' | 'authentication';
|
|
5
|
-
/** Challenge policy controlling verification difficulty. */
|
|
6
|
-
export type ChallengePolicy = 'standard' | 'enhanced' | 'adaptive';
|
|
7
|
-
/** Decision returned by the verification engine. */
|
|
8
|
-
export type UseSenseDecision = 'approved' | 'rejected' | 'manual_review';
|
|
9
|
-
/** Processing stage during server-side analysis. */
|
|
10
|
-
export type ProcessingStage = 'deepsense' | 'livesense' | 'matchsense' | 'fusion';
|
|
11
9
|
/**
|
|
12
|
-
*
|
|
10
|
+
* Decision returned by the native SDK.
|
|
13
11
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
* These values come straight from the server's verdict and are
|
|
13
|
+
* exposed to the integrator for UI feedback only. The definitive
|
|
14
|
+
* verdict arrives at your backend via an HMAC-signed webhook; never
|
|
15
|
+
* trust the client-side decision for access-control.
|
|
16
|
+
*/
|
|
17
|
+
export type Decision = 'APPROVE' | 'REJECT' | 'MANUAL_REVIEW';
|
|
18
|
+
/**
|
|
19
|
+
* Branding overrides applied to the native camera UI.
|
|
20
|
+
*
|
|
21
|
+
* - `logoUrl`, `primaryColor`, `buttonRadius`, `fontFamily` are
|
|
22
|
+
* honoured on both iOS and Android.
|
|
23
|
+
* - `displayName`, `redirectUrl` are Android-only fields. They're
|
|
24
|
+
* accepted on iOS for cross-platform API parity but ignored.
|
|
25
|
+
*/
|
|
26
|
+
export interface BrandingConfig {
|
|
27
|
+
logoUrl?: string;
|
|
28
|
+
primaryColor?: string;
|
|
29
|
+
buttonRadius?: number;
|
|
30
|
+
fontFamily?: string;
|
|
31
|
+
displayName?: string;
|
|
32
|
+
redirectUrl?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Configuration for `UseSense.initialize`. The minimum required
|
|
36
|
+
* field is the API key; every other field has a sensible default.
|
|
21
37
|
*/
|
|
22
38
|
export interface UseSenseConfig {
|
|
23
|
-
/** API key from
|
|
39
|
+
/** API key from watchtower.usesense.ai. */
|
|
24
40
|
apiKey: string;
|
|
25
|
-
/** Target environment. Defaults to `
|
|
41
|
+
/** Target environment. Defaults to `auto` (detected from key prefix). */
|
|
26
42
|
environment?: UseSenseEnvironment;
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Override the API endpoint. Defaults to `https://api.usesense.ai/v1`.
|
|
45
|
+
* Only set this if you're pointing at a staging or self-hosted
|
|
46
|
+
* proxy. Maps to `apiEndpoint` on iOS and `baseUrl` on Android
|
|
47
|
+
* under the hood.
|
|
48
|
+
*/
|
|
49
|
+
apiEndpoint?: string;
|
|
50
|
+
/** SDK-level branding overrides. */
|
|
51
|
+
branding?: BrandingConfig;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Request to start a verification session.
|
|
55
|
+
*/
|
|
56
|
+
export interface VerificationRequest {
|
|
57
|
+
sessionType: SessionType;
|
|
58
|
+
/** Your internal user identifier (optional, stored in session metadata). */
|
|
59
|
+
externalUserId?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Required for `authentication` sessions. The previously-enrolled
|
|
62
|
+
* identity you're verifying against.
|
|
63
|
+
*/
|
|
32
64
|
identityId?: string;
|
|
33
|
-
/** Challenge difficulty policy. Defaults to `'standard'`. */
|
|
34
|
-
challengePolicy?: ChallengePolicy;
|
|
35
|
-
/** Enable audio capture for voice deepfake detection. Defaults to `false`. */
|
|
36
|
-
enableAudio?: boolean;
|
|
37
|
-
/** Maximum session duration in milliseconds. Defaults to `60000`. */
|
|
38
|
-
timeout?: number;
|
|
39
65
|
/** Custom key-value pairs attached to the session. */
|
|
40
|
-
metadata?: Record<string, string>;
|
|
66
|
+
metadata?: Record<string, string | number | boolean>;
|
|
41
67
|
}
|
|
42
68
|
/**
|
|
43
|
-
*
|
|
69
|
+
* Redacted decision object returned when a session completes.
|
|
44
70
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
71
|
+
* This is the ONLY shape the plugin exposes to React Native. Pillar
|
|
72
|
+
* scores (channel trust, liveness, matchsense risk) are intentionally
|
|
73
|
+
* not included — the native SDKs strip those fields before returning
|
|
74
|
+
* across the bridge to prevent reverse-engineering of the server-side
|
|
75
|
+
* scoring logic. If you need full scoring details, consume the signed
|
|
76
|
+
* webhook delivered to your backend.
|
|
47
77
|
*/
|
|
48
78
|
export interface UseSenseResult {
|
|
49
|
-
/** Unique session identifier. */
|
|
50
79
|
sessionId: string;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
|
|
61
|
-
/** Reasons contributing to the decision. */
|
|
62
|
-
reasons: string[];
|
|
63
|
-
/** Rule that triggered the decision, if any. */
|
|
64
|
-
ruleTriggered?: string;
|
|
65
|
-
/** Recommended action for the integrator. */
|
|
66
|
-
recommendedAction?: string;
|
|
67
|
-
/** Cryptographic signature for result verification. */
|
|
68
|
-
sessionSignature: string;
|
|
80
|
+
sessionType: string | null;
|
|
81
|
+
identityId: string | null;
|
|
82
|
+
decision: Decision;
|
|
83
|
+
timestamp: string;
|
|
84
|
+
/** Convenience: `decision === 'APPROVE'`. */
|
|
85
|
+
isApproved: boolean;
|
|
86
|
+
/** Convenience: `decision === 'REJECT'`. */
|
|
87
|
+
isRejected: boolean;
|
|
88
|
+
/** Convenience: `decision === 'MANUAL_REVIEW'`. */
|
|
89
|
+
isPendingReview: boolean;
|
|
69
90
|
}
|
|
70
91
|
/**
|
|
71
|
-
* Error
|
|
92
|
+
* Error thrown when a verification session fails.
|
|
93
|
+
*
|
|
94
|
+
* Matches the native SDKs' error shape: machine-readable code,
|
|
95
|
+
* human-readable message, retry hint.
|
|
72
96
|
*/
|
|
73
97
|
export interface UseSenseError {
|
|
74
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* Machine-readable error code. One of
|
|
100
|
+
* `CAMERA_UNAVAILABLE`, `CAMERA_PERMISSION_DENIED`,
|
|
101
|
+
* `MIC_PERMISSION_DENIED`, `NETWORK_ERROR`, `NETWORK_TIMEOUT`,
|
|
102
|
+
* `SESSION_EXPIRED`, `UNAUTHORIZED`, `INVALID_TOKEN`,
|
|
103
|
+
* `SESSION_NOT_FOUND`, `IDENTITY_NOT_FOUND`, `INVALID_REQUEST`,
|
|
104
|
+
* `INVALID_CONFIG`, `QUOTA_EXCEEDED`, `USER_CANCELLED`,
|
|
105
|
+
* `session_cancelled`, `sdk_not_initialized`, `no_view_controller`,
|
|
106
|
+
* `CAPTURE_FAILED`, `ENCODING_FAILED`, `UPLOAD_FAILED`,
|
|
107
|
+
* `FACE_NOT_DETECTED`, `LOW_LIGHT`, `TIMEOUT`, `SERVER_ERROR`,
|
|
108
|
+
* `SERVICE_UNAVAILABLE`, `TOKEN_EXPIRED`, `TOKEN_ALREADY_USED`,
|
|
109
|
+
* `INSUFFICIENT_CREDITS`, `NONCE_MISMATCH`, `UNKNOWN_ERROR`.
|
|
110
|
+
*/
|
|
75
111
|
code: string;
|
|
76
112
|
/** Human-readable error message. */
|
|
77
113
|
message: string;
|
|
78
|
-
/**
|
|
79
|
-
|
|
114
|
+
/** Whether the operation can be retried. */
|
|
115
|
+
isRetryable?: boolean;
|
|
116
|
+
/** Server-specific error code, if any. */
|
|
117
|
+
serverCode?: string;
|
|
80
118
|
}
|
|
81
119
|
/**
|
|
82
|
-
*
|
|
120
|
+
* Lifecycle event types emitted by the native SDK during a
|
|
121
|
+
* verification session.
|
|
83
122
|
*/
|
|
84
|
-
export type
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
challengeType: string;
|
|
93
|
-
} | {
|
|
94
|
-
type: 'processing';
|
|
95
|
-
stage: ProcessingStage;
|
|
96
|
-
} | {
|
|
97
|
-
type: 'session_completed';
|
|
98
|
-
result: UseSenseResult;
|
|
99
|
-
} | {
|
|
100
|
-
type: 'session_error';
|
|
101
|
-
error: UseSenseError;
|
|
102
|
-
};
|
|
103
|
-
/** Options for starting a verification session. */
|
|
104
|
-
export interface StartSessionOptions {
|
|
105
|
-
/** Session type. Overrides the value set in {@link UseSenseConfig}. */
|
|
106
|
-
sessionType?: SessionType;
|
|
107
|
-
/** Identity ID for authentication sessions. */
|
|
108
|
-
identityId?: string;
|
|
109
|
-
}
|
|
110
|
-
/** Status of a verification session. */
|
|
111
|
-
export interface SessionStatus {
|
|
112
|
-
/** Current session status. */
|
|
113
|
-
status: string;
|
|
114
|
-
/** Result, if the session has completed. */
|
|
115
|
-
result?: UseSenseResult;
|
|
123
|
+
export type UseSenseEventType = 'SESSION_CREATED' | 'PERMISSIONS_REQUESTED' | 'PERMISSIONS_GRANTED' | 'PERMISSIONS_DENIED' | 'CAPTURE_STARTED' | 'FRAME_CAPTURED' | 'CAPTURE_COMPLETED' | 'AUDIO_RECORD_STARTED' | 'AUDIO_RECORD_COMPLETED' | 'CHALLENGE_STARTED' | 'CHALLENGE_COMPLETED' | 'UPLOAD_STARTED' | 'UPLOAD_PROGRESS' | 'UPLOAD_COMPLETED' | 'COMPLETE_STARTED' | 'DECISION_RECEIVED' | 'IMAGE_QUALITY_CHECK' | 'ERROR' | 'UNKNOWN';
|
|
124
|
+
/** Single event emitted during a session. */
|
|
125
|
+
export interface UseSenseEvent {
|
|
126
|
+
type: UseSenseEventType;
|
|
127
|
+
/** Unix epoch milliseconds. */
|
|
128
|
+
timestamp: number;
|
|
129
|
+
/** Event-specific payload. Opaque strings; never contains scoring data. */
|
|
130
|
+
data?: Record<string, string>;
|
|
116
131
|
}
|
|
117
|
-
/**
|
|
132
|
+
/** Handle returned by `UseSense.addListener`. */
|
|
118
133
|
export interface UseSenseSubscription {
|
|
119
|
-
|
|
120
|
-
remove: () => void;
|
|
134
|
+
remove(): void;
|
|
121
135
|
}
|
|
122
136
|
/**
|
|
123
137
|
* UseSense React Native plugin.
|
|
124
138
|
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
139
|
+
* Human presence verification wrapping the native iOS and Android
|
|
140
|
+
* UseSense SDKs. Every session runs inside a full-screen native
|
|
141
|
+
* camera activity; the plugin is a thin bridge that forwards
|
|
142
|
+
* initialization, verification requests, and lifecycle events to
|
|
143
|
+
* the platform SDK and returns a redacted decision object.
|
|
127
144
|
*
|
|
128
145
|
* @example
|
|
129
146
|
* ```ts
|
|
130
147
|
* import { UseSense } from 'react-native-usesense';
|
|
131
148
|
*
|
|
132
|
-
* await UseSense.initialize({
|
|
133
|
-
*
|
|
134
|
-
*
|
|
149
|
+
* await UseSense.initialize({
|
|
150
|
+
* apiKey: 'sk_sandbox_...',
|
|
151
|
+
* environment: 'sandbox',
|
|
152
|
+
* });
|
|
153
|
+
*
|
|
154
|
+
* const unsubscribe = UseSense.addListener((event) => {
|
|
155
|
+
* console.log(event.type, event.data);
|
|
156
|
+
* });
|
|
157
|
+
*
|
|
158
|
+
* try {
|
|
159
|
+
* const result = await UseSense.startVerification({
|
|
160
|
+
* sessionType: 'enrollment',
|
|
161
|
+
* });
|
|
162
|
+
* console.log(result.decision); // 'APPROVE' | 'REJECT' | 'MANUAL_REVIEW'
|
|
163
|
+
* } finally {
|
|
164
|
+
* unsubscribe.remove();
|
|
165
|
+
* }
|
|
135
166
|
* ```
|
|
136
167
|
*/
|
|
137
168
|
export declare class UseSense {
|
|
138
169
|
/**
|
|
139
|
-
* Initialize the UseSense plugin. Must be called
|
|
170
|
+
* Initialize the UseSense plugin. Must be called before any other
|
|
171
|
+
* method. Calling again with a different API key or environment
|
|
172
|
+
* replaces the previous configuration.
|
|
140
173
|
*
|
|
141
|
-
* @
|
|
142
|
-
*
|
|
174
|
+
* @throws {UseSenseError} If the API key is empty or initialization
|
|
175
|
+
* fails on the native side.
|
|
143
176
|
*/
|
|
144
177
|
static initialize(config: UseSenseConfig): Promise<void>;
|
|
145
178
|
/**
|
|
146
|
-
* Start a verification session. Presents a full-screen native
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* @param options - Optional overrides for session type and identity ID.
|
|
152
|
-
* @returns The verification result (for UI feedback only).
|
|
153
|
-
* @throws {UseSenseError} On failure or cancellation.
|
|
179
|
+
* Start a verification session. Presents a full-screen native
|
|
180
|
+
* camera activity. The returned promise resolves when the session
|
|
181
|
+
* completes or rejects with a `UseSenseError` (including the
|
|
182
|
+
* `USER_CANCELLED` / `session_cancelled` cases when the user
|
|
183
|
+
* dismisses the camera screen).
|
|
154
184
|
*/
|
|
155
|
-
static
|
|
185
|
+
static startVerification(request: VerificationRequest): Promise<UseSenseResult>;
|
|
156
186
|
/**
|
|
157
|
-
*
|
|
187
|
+
* Subscribe to real-time lifecycle events emitted by the native
|
|
188
|
+
* SDK during a verification session. Call this **before**
|
|
189
|
+
* `startVerification` so the subscription captures the earliest
|
|
190
|
+
* events (`SESSION_CREATED`, `PERMISSIONS_REQUESTED`).
|
|
158
191
|
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
192
|
+
* Returns a subscription handle; call `.remove()` to stop
|
|
193
|
+
* receiving events.
|
|
161
194
|
*/
|
|
162
|
-
static
|
|
195
|
+
static addListener(callback: (event: UseSenseEvent) => void): UseSenseSubscription;
|
|
163
196
|
/**
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
197
|
+
* Clear all event listeners and release native resources. Does not
|
|
198
|
+
* need to be called explicitly during normal usage; the plugin
|
|
199
|
+
* cleans up on process teardown. Useful when you want to re-
|
|
200
|
+
* initialize against a different API key or during test teardown.
|
|
168
201
|
*/
|
|
169
|
-
static
|
|
202
|
+
static reset(): Promise<void>;
|
|
170
203
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
* @param callback - Function invoked for each event.
|
|
176
|
-
* @returns A subscription handle with a `remove()` method.
|
|
177
|
-
*
|
|
178
|
-
* @example
|
|
179
|
-
* ```ts
|
|
180
|
-
* const listener = UseSense.addListener((event) => {
|
|
181
|
-
* console.log(event.type);
|
|
182
|
-
* });
|
|
183
|
-
* // Later:
|
|
184
|
-
* listener.remove();
|
|
185
|
-
* ```
|
|
186
|
-
*/
|
|
187
|
-
static addListener(callback: (event: UseSenseEvent) => void): UseSenseSubscription;
|
|
188
|
-
/**
|
|
189
|
-
* Get the native SDK version string.
|
|
190
|
-
*
|
|
191
|
-
* @returns Version string in semver format (e.g. `"1.0.0"`).
|
|
204
|
+
* Whether the native plugin has an active `UseSense` client. Set
|
|
205
|
+
* to `true` after a successful `initialize` and `false` after
|
|
206
|
+
* `reset`. Useful for feature-flagging UI that should only show
|
|
207
|
+
* when the SDK is ready.
|
|
192
208
|
*/
|
|
193
|
-
static
|
|
209
|
+
static isInitialized(): Promise<boolean>;
|
|
194
210
|
}
|
|
195
211
|
export default UseSense;
|
|
196
212
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-usesense",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "React Native plugin for human presence verification. Wraps the native UseSense iOS and Android SDKs.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -11,7 +11,9 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.authors = { "UseSense Technologies Ltd." => "support@usesense.ai" }
|
|
12
12
|
s.source = { :git => package["repository"]["url"], :tag => "v#{s.version}" }
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
# Minimum iOS 15.0 to match the native UseSense iOS SDK's floor
|
|
15
|
+
# (v4.x uses SwiftUI features that require iOS 15.0 and up).
|
|
16
|
+
s.platforms = { :ios => "15.0" }
|
|
15
17
|
s.swift_version = "5.9"
|
|
16
18
|
|
|
17
19
|
s.source_files = "ios/**/*.{swift,h,m}"
|
|
@@ -19,6 +21,10 @@ Pod::Spec.new do |s|
|
|
|
19
21
|
# React Native dependency (supports both old and new architecture)
|
|
20
22
|
install_modules_dependencies(s)
|
|
21
23
|
|
|
22
|
-
# Native UseSense iOS SDK
|
|
23
|
-
|
|
24
|
+
# Native UseSense iOS SDK. Minimum 4.2.2 — earlier 4.x releases had
|
|
25
|
+
# terminal-screen centering bugs, and the 1.x series used a pre-
|
|
26
|
+
# redaction result type with a completely different UseSenseConfig
|
|
27
|
+
# init signature. See CHANGELOG [2.0.0] for the full rewrite
|
|
28
|
+
# rationale.
|
|
29
|
+
s.dependency "UseSenseSDK", "~> 4.2"
|
|
24
30
|
end
|