@vizualkei/neuma-client-sdk 0.108.0 → 0.110.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 +1 -1
- package/dist/{NeumaClientHelper.d.ts → NeumaClient.d.ts} +23 -24
- package/dist/{NeumaClientHelper.js → NeumaClient.js} +53 -55
- package/dist/NeumaMobile.js +15 -15
- package/dist/NeumaMobileInterface.d.ts +10 -10
- package/dist/index.d.ts +4 -3
- package/dist/index.js +6 -4
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ export type EnrollUserOptions = {
|
|
|
3
3
|
email?: string | null;
|
|
4
4
|
phoneNo?: string | null;
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
6
|
+
export type NeumaClientConfig = {
|
|
7
7
|
neumaSessionUrl: string;
|
|
8
8
|
neumaResultUrl: string;
|
|
9
9
|
fetcher: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
@@ -41,7 +41,7 @@ export type HandlePendingOperationOptions = {
|
|
|
41
41
|
operation?: PendingOperationMatcher;
|
|
42
42
|
/**
|
|
43
43
|
* Submit the recovered NRT to `neumaResultUrl` before calling
|
|
44
|
-
* `onSuccess`. Defaults to `true`, matching foreground
|
|
44
|
+
* `onSuccess`. Defaults to `true`, matching foreground client methods.
|
|
45
45
|
* Set to `false` for direct business flows such as password updates.
|
|
46
46
|
*/
|
|
47
47
|
submitResult?: boolean;
|
|
@@ -77,27 +77,27 @@ export type HandlePendingOperationOptions = {
|
|
|
77
77
|
*/
|
|
78
78
|
onError?: (error: unknown, context: PendingOperationErrorContext) => MaybePromise<void>;
|
|
79
79
|
};
|
|
80
|
-
export declare class
|
|
80
|
+
export declare class NeumaClient {
|
|
81
81
|
private readonly config;
|
|
82
82
|
private readonly biometricService;
|
|
83
|
-
constructor(config:
|
|
83
|
+
constructor(config: NeumaClientConfig);
|
|
84
84
|
/**
|
|
85
85
|
* Optional early initialization hook (preserves prior SwClient behavior).
|
|
86
86
|
*/
|
|
87
87
|
ensureInitialized(): void;
|
|
88
88
|
enrollUser(user: UserDescriptor, enrollOptions?: EnrollUserOptions): Promise<string>;
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
restoreEnrollment(): Promise<string>;
|
|
90
|
+
verifyUser(postResult?: boolean): Promise<string>;
|
|
91
91
|
/**
|
|
92
|
-
*
|
|
93
|
-
* biometric result endpoint
|
|
94
|
-
*
|
|
92
|
+
* Verify the user and return a signed NRT without auto-submitting it to
|
|
93
|
+
* the biometric result endpoint by calling `verifyUser(false)`.
|
|
94
|
+
* Use this for business routes that validate the NRT themselves
|
|
95
|
+
* (e.g. ticket purchase, update-password).
|
|
95
96
|
*/
|
|
96
|
-
authenticateUserDirect(): Promise<string>;
|
|
97
97
|
unenrollUser(): Promise<string>;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
verifyUserForKey(): Promise<null>;
|
|
99
|
+
clearEnrollment(): Promise<void>;
|
|
100
|
+
parseVerifyUserForKeyResult(jsonString: string): KeyRetrievalResult;
|
|
101
101
|
/**
|
|
102
102
|
* Returns metadata for a pending deep-link operation issued from this
|
|
103
103
|
* browser tab whose result has not yet been retrieved, or `null` when
|
|
@@ -115,7 +115,7 @@ export declare class NeumaClientHelper {
|
|
|
115
115
|
*/
|
|
116
116
|
clearPendingResult(): void;
|
|
117
117
|
/**
|
|
118
|
-
* High-level iOS Safari recovery
|
|
118
|
+
* High-level iOS Safari recovery API for page-load handling.
|
|
119
119
|
*
|
|
120
120
|
* This hides the storage/URL recovery details from webapps: it checks
|
|
121
121
|
* whether a matching operation is recoverable, resumes or retrieves the
|
|
@@ -136,7 +136,7 @@ export declare class NeumaClientHelper {
|
|
|
136
136
|
private buildResultPayload;
|
|
137
137
|
private postJson;
|
|
138
138
|
/**
|
|
139
|
-
* POST
|
|
139
|
+
* POST utility for the biometric-result submission path. Retries only
|
|
140
140
|
* on network-class fetch rejections (e.g. iOS Safari tab-refocus
|
|
141
141
|
* jitter producing `TypeError: Failed to fetch`). HTTP error statuses
|
|
142
142
|
* are deterministic server responses and are not retried. The
|
|
@@ -145,18 +145,17 @@ export declare class NeumaClientHelper {
|
|
|
145
145
|
*/
|
|
146
146
|
private postJsonWithRetry;
|
|
147
147
|
}
|
|
148
|
-
export declare const
|
|
149
|
-
init(config:
|
|
150
|
-
get: () =>
|
|
148
|
+
export declare const neumaClient: {
|
|
149
|
+
init(config: NeumaClientConfig): NeumaClient;
|
|
150
|
+
get: () => NeumaClient;
|
|
151
151
|
ensureInitialized(): void;
|
|
152
152
|
enrollUser(user: UserDescriptor, enrollOptions?: EnrollUserOptions): Promise<string>;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
authenticateUserDirect(): Promise<string>;
|
|
153
|
+
restoreEnrollment(): Promise<string>;
|
|
154
|
+
verifyUser(postResult?: boolean): Promise<string>;
|
|
156
155
|
unenrollUser(): Promise<string>;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
verifyUserForKey(): Promise<null>;
|
|
157
|
+
clearEnrollment(): Promise<void>;
|
|
158
|
+
parseVerifyUserForKeyResult(jsonString: string): KeyRetrievalResult;
|
|
160
159
|
getPendingOperation(): PendingOperationInfo | null;
|
|
161
160
|
resumePendingResult(): Promise<unknown | null>;
|
|
162
161
|
clearPendingResult(): void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.neumaClient = exports.NeumaClient = void 0;
|
|
4
4
|
const NeumaMobile_1 = require("./NeumaMobile");
|
|
5
5
|
const biometricService_1 = require("./biometricService");
|
|
6
6
|
const NeumaMobileInterface_1 = require("./NeumaMobileInterface");
|
|
7
7
|
const installLinks_1 = require("./installLinks");
|
|
8
8
|
const DEFAULT_BIOMETRIC_SERVICE = 'https://api.neuma.me:443';
|
|
9
|
-
class
|
|
9
|
+
class NeumaClient {
|
|
10
10
|
constructor(config) {
|
|
11
11
|
this.config = config;
|
|
12
12
|
const service = config.biometricService?.trim();
|
|
@@ -21,36 +21,37 @@ class NeumaClientHelper {
|
|
|
21
21
|
async enrollUser(user, enrollOptions) {
|
|
22
22
|
return this.runSignedOperation(client => client.enrollUser(user), { enrollOptions });
|
|
23
23
|
}
|
|
24
|
-
async
|
|
25
|
-
return this.runSignedOperation(client => client.
|
|
24
|
+
async restoreEnrollment() {
|
|
25
|
+
return this.runSignedOperation(client => client.restoreEnrollment());
|
|
26
26
|
}
|
|
27
|
-
async
|
|
28
|
-
|
|
27
|
+
async verifyUser(postResult = true) {
|
|
28
|
+
if (!postResult) {
|
|
29
|
+
const { nst } = await this.requestNeumaSessionToken();
|
|
30
|
+
const client = this.createSdk(nst);
|
|
31
|
+
return client.verifyUser();
|
|
32
|
+
}
|
|
33
|
+
return this.runSignedOperation(client => client.verifyUser());
|
|
29
34
|
}
|
|
30
35
|
/**
|
|
31
|
-
*
|
|
32
|
-
* biometric result endpoint
|
|
33
|
-
*
|
|
36
|
+
* Verify the user and return a signed NRT without auto-submitting it to
|
|
37
|
+
* the biometric result endpoint by calling `verifyUser(false)`.
|
|
38
|
+
* Use this for business routes that validate the NRT themselves
|
|
39
|
+
* (e.g. ticket purchase, update-password).
|
|
34
40
|
*/
|
|
35
|
-
async authenticateUserDirect() {
|
|
36
|
-
const { nst } = await this.requestNeumaSessionToken();
|
|
37
|
-
const client = this.createSdk(nst);
|
|
38
|
-
return client.authenticateUser();
|
|
39
|
-
}
|
|
40
41
|
async unenrollUser() {
|
|
41
42
|
return this.runSignedOperation(client => client.unenrollUser());
|
|
42
43
|
}
|
|
43
|
-
async
|
|
44
|
+
async verifyUserForKey() {
|
|
44
45
|
const client = this.createSdk();
|
|
45
|
-
return client.
|
|
46
|
+
return client.verifyUserForKey();
|
|
46
47
|
}
|
|
47
|
-
async
|
|
48
|
+
async clearEnrollment() {
|
|
48
49
|
const client = this.createSdk();
|
|
49
|
-
return client.
|
|
50
|
+
return client.clearEnrollment();
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
+
parseVerifyUserForKeyResult(jsonString) {
|
|
52
53
|
const client = this.createSdk();
|
|
53
|
-
return client.
|
|
54
|
+
return client.parseVerifyUserForKeyResult(jsonString);
|
|
54
55
|
}
|
|
55
56
|
/**
|
|
56
57
|
* Returns metadata for a pending deep-link operation issued from this
|
|
@@ -75,7 +76,7 @@ class NeumaClientHelper {
|
|
|
75
76
|
this.createSdk().clearPendingResult();
|
|
76
77
|
}
|
|
77
78
|
/**
|
|
78
|
-
* High-level iOS Safari recovery
|
|
79
|
+
* High-level iOS Safari recovery API for page-load handling.
|
|
79
80
|
*
|
|
80
81
|
* This hides the storage/URL recovery details from webapps: it checks
|
|
81
82
|
* whether a matching operation is recoverable, resumes or retrieves the
|
|
@@ -230,7 +231,7 @@ class NeumaClientHelper {
|
|
|
230
231
|
}
|
|
231
232
|
async postJson(url, body) {
|
|
232
233
|
if (!this.config.fetcher) {
|
|
233
|
-
throw new Error('Missing fetcher for
|
|
234
|
+
throw new Error('Missing fetcher for NeumaClient');
|
|
234
235
|
}
|
|
235
236
|
const response = await this.config.fetcher(url, {
|
|
236
237
|
method: 'POST',
|
|
@@ -246,7 +247,7 @@ class NeumaClientHelper {
|
|
|
246
247
|
return response.json();
|
|
247
248
|
}
|
|
248
249
|
/**
|
|
249
|
-
* POST
|
|
250
|
+
* POST utility for the biometric-result submission path. Retries only
|
|
250
251
|
* on network-class fetch rejections (e.g. iOS Safari tab-refocus
|
|
251
252
|
* jitter producing `TypeError: Failed to fetch`). HTTP error statuses
|
|
252
253
|
* are deterministic server responses and are not retried. The
|
|
@@ -255,7 +256,7 @@ class NeumaClientHelper {
|
|
|
255
256
|
*/
|
|
256
257
|
async postJsonWithRetry(url, body) {
|
|
257
258
|
if (!this.config.fetcher) {
|
|
258
|
-
throw new Error('Missing fetcher for
|
|
259
|
+
throw new Error('Missing fetcher for NeumaClient');
|
|
259
260
|
}
|
|
260
261
|
const maxAttempts = 5;
|
|
261
262
|
const retryDelayMs = 2000;
|
|
@@ -287,59 +288,56 @@ class NeumaClientHelper {
|
|
|
287
288
|
throw lastNetworkError;
|
|
288
289
|
}
|
|
289
290
|
}
|
|
290
|
-
exports.
|
|
291
|
-
let
|
|
292
|
-
const
|
|
293
|
-
if (!
|
|
294
|
-
throw new Error('
|
|
291
|
+
exports.NeumaClient = NeumaClient;
|
|
292
|
+
let clientInstance = null;
|
|
293
|
+
const getClientInstance = () => {
|
|
294
|
+
if (!clientInstance) {
|
|
295
|
+
throw new Error('neumaClient is not initialized');
|
|
295
296
|
}
|
|
296
|
-
return
|
|
297
|
+
return clientInstance;
|
|
297
298
|
};
|
|
298
|
-
exports.
|
|
299
|
+
exports.neumaClient = {
|
|
299
300
|
init(config) {
|
|
300
|
-
if (!
|
|
301
|
-
|
|
301
|
+
if (!clientInstance) {
|
|
302
|
+
clientInstance = new NeumaClient(config);
|
|
302
303
|
}
|
|
303
|
-
return
|
|
304
|
+
return clientInstance;
|
|
304
305
|
},
|
|
305
|
-
get:
|
|
306
|
+
get: getClientInstance,
|
|
306
307
|
ensureInitialized() {
|
|
307
|
-
|
|
308
|
+
getClientInstance().ensureInitialized();
|
|
308
309
|
},
|
|
309
310
|
enrollUser(user, enrollOptions) {
|
|
310
|
-
return
|
|
311
|
-
},
|
|
312
|
-
restoreUser() {
|
|
313
|
-
return getHelperInstance().restoreUser();
|
|
311
|
+
return getClientInstance().enrollUser(user, enrollOptions);
|
|
314
312
|
},
|
|
315
|
-
|
|
316
|
-
return
|
|
313
|
+
restoreEnrollment() {
|
|
314
|
+
return getClientInstance().restoreEnrollment();
|
|
317
315
|
},
|
|
318
|
-
|
|
319
|
-
return
|
|
316
|
+
verifyUser(postResult = true) {
|
|
317
|
+
return getClientInstance().verifyUser(postResult);
|
|
320
318
|
},
|
|
321
319
|
unenrollUser() {
|
|
322
|
-
return
|
|
320
|
+
return getClientInstance().unenrollUser();
|
|
323
321
|
},
|
|
324
|
-
|
|
325
|
-
return
|
|
322
|
+
verifyUserForKey() {
|
|
323
|
+
return getClientInstance().verifyUserForKey();
|
|
326
324
|
},
|
|
327
|
-
|
|
328
|
-
return
|
|
325
|
+
clearEnrollment() {
|
|
326
|
+
return getClientInstance().clearEnrollment();
|
|
329
327
|
},
|
|
330
|
-
|
|
331
|
-
return
|
|
328
|
+
parseVerifyUserForKeyResult(jsonString) {
|
|
329
|
+
return getClientInstance().parseVerifyUserForKeyResult(jsonString);
|
|
332
330
|
},
|
|
333
331
|
getPendingOperation() {
|
|
334
|
-
return
|
|
332
|
+
return getClientInstance().getPendingOperation();
|
|
335
333
|
},
|
|
336
334
|
resumePendingResult() {
|
|
337
|
-
return
|
|
335
|
+
return getClientInstance().resumePendingResult();
|
|
338
336
|
},
|
|
339
337
|
clearPendingResult() {
|
|
340
|
-
|
|
338
|
+
getClientInstance().clearPendingResult();
|
|
341
339
|
},
|
|
342
340
|
handlePendingOperation(options) {
|
|
343
|
-
return
|
|
341
|
+
return getClientInstance().handlePendingOperation(options);
|
|
344
342
|
},
|
|
345
343
|
};
|
package/dist/NeumaMobile.js
CHANGED
|
@@ -1026,7 +1026,7 @@ class NeumaMobile {
|
|
|
1026
1026
|
throw new NeumaMobileInterface_1.NeumaError(msg, 'USER_EXISTS');
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
1029
|
-
async
|
|
1029
|
+
async restoreEnrollment() {
|
|
1030
1030
|
try {
|
|
1031
1031
|
const payload = await this.invokeMobileApp('restore', undefined);
|
|
1032
1032
|
const nrt = this.extractNeumaResultToken(payload, 'restore', 'AUTH_FAILED');
|
|
@@ -1058,11 +1058,11 @@ class NeumaMobile {
|
|
|
1058
1058
|
throw new NeumaMobileInterface_1.NeumaError(msg, 'AUTH_FAILED');
|
|
1059
1059
|
}
|
|
1060
1060
|
}
|
|
1061
|
-
async
|
|
1061
|
+
async verifyUser() {
|
|
1062
1062
|
try {
|
|
1063
1063
|
const payload = await this.invokeMobileApp('authenticate', undefined);
|
|
1064
1064
|
const nrt = this.extractNeumaResultToken(payload, 'authenticate', 'AUTH_FAILED');
|
|
1065
|
-
common_utils_1.logger.info('
|
|
1065
|
+
common_utils_1.logger.info('User verification successful');
|
|
1066
1066
|
return nrt;
|
|
1067
1067
|
}
|
|
1068
1068
|
catch (error) {
|
|
@@ -1071,22 +1071,22 @@ class NeumaMobile {
|
|
|
1071
1071
|
if (error instanceof Error && /(cancel|canceled|cancelled)/i.test(error.message)) {
|
|
1072
1072
|
throw new NeumaMobileInterface_1.NeumaError('Cancelled by user', 'USER_CANCELLED');
|
|
1073
1073
|
}
|
|
1074
|
-
const msg = error instanceof Error ? error.message : '
|
|
1075
|
-
common_utils_1.logger.error('
|
|
1074
|
+
const msg = error instanceof Error ? error.message : 'User verification failed';
|
|
1075
|
+
common_utils_1.logger.error('User verification error', { error: msg });
|
|
1076
1076
|
throw new NeumaMobileInterface_1.NeumaError(msg, 'AUTH_FAILED');
|
|
1077
1077
|
}
|
|
1078
1078
|
}
|
|
1079
|
-
async
|
|
1080
|
-
//
|
|
1079
|
+
async verifyUserForKey() {
|
|
1080
|
+
// verifyUserForKey requires clipboard sharing between browser and mobile app,
|
|
1081
1081
|
// which only works when both are on the same device (mobile browser)
|
|
1082
1082
|
if (this.isDesktopBrowser()) {
|
|
1083
|
-
common_utils_1.logger.error('
|
|
1083
|
+
common_utils_1.logger.error('verifyUserForKey called from desktop browser');
|
|
1084
1084
|
throw new NeumaMobileInterface_1.NeumaError('This operation is supported only on mobile browsers', 'AUTH_FAILED');
|
|
1085
1085
|
}
|
|
1086
1086
|
await this.invokeMobileApp('retrieve-key', undefined);
|
|
1087
1087
|
return null;
|
|
1088
1088
|
}
|
|
1089
|
-
|
|
1089
|
+
parseVerifyUserForKeyResult(jsonString) {
|
|
1090
1090
|
try {
|
|
1091
1091
|
const result = JSON.parse(jsonString);
|
|
1092
1092
|
if (this.isUserCancelledPayload(result)) {
|
|
@@ -1108,22 +1108,22 @@ class NeumaMobile {
|
|
|
1108
1108
|
if (error instanceof NeumaMobileInterface_1.NeumaError)
|
|
1109
1109
|
throw error;
|
|
1110
1110
|
const msg = error instanceof Error ? error.message : 'Invalid JSON format';
|
|
1111
|
-
common_utils_1.logger.error('Failed to parse
|
|
1111
|
+
common_utils_1.logger.error('Failed to parse key verification result', { error: msg });
|
|
1112
1112
|
throw new NeumaMobileInterface_1.NeumaError(msg, 'PARSE_ERROR');
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
1115
|
async getEnrolledUser() {
|
|
1116
1116
|
return this.readPersistedEnrollment();
|
|
1117
1117
|
}
|
|
1118
|
-
async
|
|
1118
|
+
async clearEnrollment() {
|
|
1119
1119
|
try {
|
|
1120
1120
|
if (this.isDesktopBrowser()) {
|
|
1121
|
-
common_utils_1.logger.error('
|
|
1121
|
+
common_utils_1.logger.error('clearEnrollment called from desktop browser');
|
|
1122
1122
|
throw new NeumaMobileInterface_1.NeumaError('This operation is supported only on mobile browsers', 'AUTH_FAILED');
|
|
1123
1123
|
}
|
|
1124
1124
|
await this.invokeMobileApp('clear-user', undefined);
|
|
1125
1125
|
this.persistEnrollment(null);
|
|
1126
|
-
common_utils_1.logger.info('
|
|
1126
|
+
common_utils_1.logger.info('Enrollment cleared successfully');
|
|
1127
1127
|
return;
|
|
1128
1128
|
}
|
|
1129
1129
|
catch (error) {
|
|
@@ -1132,8 +1132,8 @@ class NeumaMobile {
|
|
|
1132
1132
|
if (error instanceof Error && /(cancel|canceled|cancelled)/i.test(error.message)) {
|
|
1133
1133
|
throw new NeumaMobileInterface_1.NeumaError('Cancelled by user', 'USER_CANCELLED');
|
|
1134
1134
|
}
|
|
1135
|
-
const msg = error instanceof Error ? error.message : 'Clear
|
|
1136
|
-
common_utils_1.logger.error('Clear
|
|
1135
|
+
const msg = error instanceof Error ? error.message : 'Clear enrollment failed';
|
|
1136
|
+
common_utils_1.logger.error('Clear enrollment error', { error: msg });
|
|
1137
1137
|
throw new NeumaMobileInterface_1.NeumaError(msg, 'USER_NOT_FOUND');
|
|
1138
1138
|
}
|
|
1139
1139
|
}
|
|
@@ -9,10 +9,10 @@ export interface EnrollmentResult {
|
|
|
9
9
|
readonly enrolledAt: Date;
|
|
10
10
|
readonly userDescriptor: UserDescriptor;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
12
|
+
export interface VerificationResult {
|
|
13
13
|
readonly userId: string;
|
|
14
14
|
readonly userDescriptor: UserDescriptor;
|
|
15
|
-
readonly
|
|
15
|
+
readonly verifiedAt: Date;
|
|
16
16
|
}
|
|
17
17
|
export interface KeyRetrievalResult {
|
|
18
18
|
readonly key: string;
|
|
@@ -145,25 +145,25 @@ export interface NeumaMobileInterface {
|
|
|
145
145
|
* Restores an existing user to a new device and resolves with a Neuma result token (NRT).
|
|
146
146
|
* Rejects with {@link NeumaError} when the operation fails or is cancelled.
|
|
147
147
|
*/
|
|
148
|
-
|
|
148
|
+
restoreEnrollment(): Promise<string>;
|
|
149
149
|
/**
|
|
150
|
-
* Initiates biometric
|
|
150
|
+
* Initiates biometric verification and resolves with a Neuma result token (NRT),
|
|
151
151
|
* throwing {@link NeumaError} on failure.
|
|
152
152
|
*/
|
|
153
|
-
|
|
153
|
+
verifyUser(): Promise<string>;
|
|
154
154
|
/**
|
|
155
155
|
* Requests a biometric-bound cryptographic key from the native flow.
|
|
156
156
|
* NOTE: Works in offline mode - returns null and requires manual paste from mobile app.
|
|
157
|
-
* Use
|
|
157
|
+
* Use parseVerifyUserForKeyResult() to parse the pasted JSON.
|
|
158
158
|
*/
|
|
159
|
-
|
|
159
|
+
verifyUserForKey(): Promise<null>;
|
|
160
160
|
/**
|
|
161
|
-
* Parse and validate manually pasted
|
|
161
|
+
* Parse and validate manually pasted key-verification result from mobile app.
|
|
162
162
|
* Call this after user pastes JSON from mobile app clipboard.
|
|
163
163
|
* @param jsonString The JSON string pasted from mobile app
|
|
164
164
|
* @returns Parsed and validated KeyRetrievalResult
|
|
165
165
|
*/
|
|
166
|
-
|
|
166
|
+
parseVerifyUserForKeyResult(jsonString: string): KeyRetrievalResult;
|
|
167
167
|
/**
|
|
168
168
|
* Performs a full unenrollment (device plus server) and resolves with
|
|
169
169
|
* a Neuma result token (NRT) if successful.
|
|
@@ -173,7 +173,7 @@ export interface NeumaMobileInterface {
|
|
|
173
173
|
* Clears the enrolled user on-device via the native flow, rejecting with
|
|
174
174
|
* {@link NeumaError} on failure or cancellation.
|
|
175
175
|
*/
|
|
176
|
-
|
|
176
|
+
clearEnrollment(): Promise<void>;
|
|
177
177
|
/**
|
|
178
178
|
* Returns metadata for a recoverable deep-link operation, or `null` when
|
|
179
179
|
* there is none.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { NeumaMobileFactory } from './NeumaMobile';
|
|
2
|
-
export
|
|
2
|
+
export { NEUMA_CLIENT_SDK_VERSION } from './version';
|
|
3
|
+
export type { NeumaMobileInterface, NeumaMobileOptions, UserDescriptor, EnrollmentResult, VerificationResult, KeyRetrievalResult, PackageVersion, PendingOperationInfo, AppLaunchPlatform, AppInstallUrlResolver, AppLaunchFailureContext, QrCodeData, QrCodeCleanupFn, } from './NeumaMobileInterface';
|
|
3
4
|
export { NeumaError } from './NeumaMobileInterface';
|
|
4
|
-
export {
|
|
5
|
-
export type {
|
|
5
|
+
export { NeumaClient, neumaClient, } from './NeumaClient';
|
|
6
|
+
export type { NeumaClientConfig, EnrollUserOptions, HandlePendingOperationOptions, PendingOperationErrorContext, PendingOperationMatcher, PendingOperationResult, } from './NeumaClient';
|
|
6
7
|
export { NEUMA_MOBILE_PLAY_STORE_URL, NEUMA_MOBILE_TESTFLIGHT_URL, getNeumaMobileInstallUrl, } from './installLinks';
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNeumaMobileInstallUrl = exports.NEUMA_MOBILE_TESTFLIGHT_URL = exports.NEUMA_MOBILE_PLAY_STORE_URL = exports.
|
|
3
|
+
exports.getNeumaMobileInstallUrl = exports.NEUMA_MOBILE_TESTFLIGHT_URL = exports.NEUMA_MOBILE_PLAY_STORE_URL = exports.neumaClient = exports.NeumaClient = exports.NeumaError = exports.NEUMA_CLIENT_SDK_VERSION = exports.NeumaMobileFactory = void 0;
|
|
4
4
|
// Neuma Client SDK - Main exports
|
|
5
5
|
var NeumaMobile_1 = require("./NeumaMobile");
|
|
6
6
|
Object.defineProperty(exports, "NeumaMobileFactory", { enumerable: true, get: function () { return NeumaMobile_1.NeumaMobileFactory; } });
|
|
7
|
+
var version_1 = require("./version");
|
|
8
|
+
Object.defineProperty(exports, "NEUMA_CLIENT_SDK_VERSION", { enumerable: true, get: function () { return version_1.NEUMA_CLIENT_SDK_VERSION; } });
|
|
7
9
|
// Value export kept separate
|
|
8
10
|
var NeumaMobileInterface_1 = require("./NeumaMobileInterface");
|
|
9
11
|
Object.defineProperty(exports, "NeumaError", { enumerable: true, get: function () { return NeumaMobileInterface_1.NeumaError; } });
|
|
10
|
-
var
|
|
11
|
-
Object.defineProperty(exports, "
|
|
12
|
-
Object.defineProperty(exports, "
|
|
12
|
+
var NeumaClient_1 = require("./NeumaClient");
|
|
13
|
+
Object.defineProperty(exports, "NeumaClient", { enumerable: true, get: function () { return NeumaClient_1.NeumaClient; } });
|
|
14
|
+
Object.defineProperty(exports, "neumaClient", { enumerable: true, get: function () { return NeumaClient_1.neumaClient; } });
|
|
13
15
|
var installLinks_1 = require("./installLinks");
|
|
14
16
|
Object.defineProperty(exports, "NEUMA_MOBILE_PLAY_STORE_URL", { enumerable: true, get: function () { return installLinks_1.NEUMA_MOBILE_PLAY_STORE_URL; } });
|
|
15
17
|
Object.defineProperty(exports, "NEUMA_MOBILE_TESTFLIGHT_URL", { enumerable: true, get: function () { return installLinks_1.NEUMA_MOBILE_TESTFLIGHT_URL; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NEUMA_CLIENT_SDK_VERSION = "0.110.0";
|
package/dist/version.js
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizualkei/neuma-client-sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Neuma Web Client SDK - Biometric
|
|
3
|
+
"version": "0.110.0",
|
|
4
|
+
"description": "Neuma Web Client SDK - Biometric verification SDK for webapp integration",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
26
26
|
"biometric",
|
|
27
|
-
"
|
|
27
|
+
"verification",
|
|
28
28
|
"deep-linking",
|
|
29
29
|
"mobile",
|
|
30
30
|
"pwa"
|