@forgerock/recognize 0.0.0-beta-20260811162949
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/LICENSE +21 -0
- package/README.md +56 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +3 -0
- package/dist/src/lib/defs/constants.d.ts +4 -0
- package/dist/src/lib/defs/constants.d.ts.map +1 -0
- package/dist/src/lib/defs/constants.js +19 -0
- package/dist/src/lib/defs/recognize-error-code.d.ts +43 -0
- package/dist/src/lib/defs/recognize-error-code.d.ts.map +1 -0
- package/dist/src/lib/defs/recognize-error-code.js +50 -0
- package/dist/src/lib/defs/recognize-sdk-to-recognize-proxy-error-map.d.ts +3 -0
- package/dist/src/lib/defs/recognize-sdk-to-recognize-proxy-error-map.d.ts.map +1 -0
- package/dist/src/lib/defs/recognize-sdk-to-recognize-proxy-error-map.js +57 -0
- package/dist/src/lib/functions/create-recognize-error.d.ts +4 -0
- package/dist/src/lib/functions/create-recognize-error.d.ts.map +1 -0
- package/dist/src/lib/functions/create-recognize-error.js +19 -0
- package/dist/src/lib/functions/get-recognize-error-code-key.d.ts +4 -0
- package/dist/src/lib/functions/get-recognize-error-code-key.d.ts.map +1 -0
- package/dist/src/lib/functions/get-recognize-error-code-key.js +15 -0
- package/dist/src/lib/functions/set-attributes.d.ts +3 -0
- package/dist/src/lib/functions/set-attributes.d.ts.map +1 -0
- package/dist/src/lib/functions/set-attributes.js +66 -0
- package/dist/src/lib/recognize-sdk/index.d.ts +1248 -0
- package/dist/src/lib/recognize-sdk/index.js +66981 -0
- package/dist/src/lib/recognize-sdk/pthreads/wasm.js +32828 -0
- package/dist/src/lib/recognize-sdk/pthreads/wasm.wasm +0 -0
- package/dist/src/lib/recognize-sdk/wasm.data +0 -0
- package/dist/src/lib/recognize-sdk/wasm.js +31578 -0
- package/dist/src/lib/recognize-sdk/wasm.wasm +0 -0
- package/dist/src/lib/recognize.d.ts +8 -0
- package/dist/src/lib/recognize.d.ts.map +1 -0
- package/dist/src/lib/recognize.js +122 -0
- package/dist/src/lib/recognize.types.d.ts +113 -0
- package/dist/src/lib/recognize.types.d.ts.map +1 -0
- package/dist/src/lib/recognize.types.js +9 -0
- package/dist/src/types.d.ts +2 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/package.json +71 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ping Identity Corporation
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# @forgerock/recognize
|
|
2
|
+
|
|
3
|
+
Facial recognition client for the Ping JavaScript SDK.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @forgerock/recognize
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { recognize } from '@forgerock/recognize';
|
|
15
|
+
|
|
16
|
+
const client = recognize({
|
|
17
|
+
authorizationToken: 'USER_AUTHORIZATION_FROM_CUSTOMER',
|
|
18
|
+
customer: 'CUSTOMER_NAME',
|
|
19
|
+
serviceURL: 'KEYLESS_SERVICE_URL',
|
|
20
|
+
transactionData: 'DATA_FROM_CUSTOMER_SERVER_TO_BE_SIGNED',
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
client.subscribe({
|
|
24
|
+
next: (event) => console.log('[recognize]', event.type, event.detail),
|
|
25
|
+
error: (err) => console.error('[recognize] error', err),
|
|
26
|
+
complete: (detail) => console.log('[recognize] complete', detail),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
await client.init({
|
|
30
|
+
mode: 'mount',
|
|
31
|
+
container: document.getElementById('app'),
|
|
32
|
+
type: 'auth',
|
|
33
|
+
username: 'USERNAME',
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// When done
|
|
37
|
+
client.dispose();
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Configuration
|
|
41
|
+
|
|
42
|
+
| Option | Type | Required | Description |
|
|
43
|
+
| -------------------------- | ---------- | -------- | ------------------------------ |
|
|
44
|
+
| `customer` | `string` | Yes | Customer identifier |
|
|
45
|
+
| `serviceURL` | `string` | Yes | URL of the recognition service |
|
|
46
|
+
| `authorizationToken` | `string` | No | Authorization token |
|
|
47
|
+
| `lang` | `string` | No | Language code for the UI |
|
|
48
|
+
| `theme` | `unknown` | No | Theme object |
|
|
49
|
+
| `disableSteps` | `string[]` | No | Steps to skip in the flow |
|
|
50
|
+
| `enableCameraFlash` | `boolean` | No | Enable camera flash |
|
|
51
|
+
| `enableCameraInstructions` | `boolean` | No | Show camera instructions |
|
|
52
|
+
| `disableLogger` | `boolean` | No | Disable internal logging |
|
|
53
|
+
| `disablePoweredBy` | `boolean` | No | Hide the "Powered by" badge |
|
|
54
|
+
| `enableWasmPthreads` | `boolean` | No | Enable WASM pthreads |
|
|
55
|
+
| `operationID` | `string` | No | Custom operation ID |
|
|
56
|
+
| `transactionData` | `string` | No | Transaction data string |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/lib/defs/constants.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,gBAAgB;AAChB,eAAO,MAAM,yBAAyB,EAAE,qBAAqB,EAS5D,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2026 Ping Identity Corporation. All right reserved.
|
|
4
|
+
*
|
|
5
|
+
* This software may be modified and distributed under the terms
|
|
6
|
+
* of the MIT license. See the LICENSE file for details.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const CAMERA_ONLY_DISABLE_STEPS = [
|
|
11
|
+
'bootstrap',
|
|
12
|
+
'camera-instructions',
|
|
13
|
+
'camera-permission',
|
|
14
|
+
'done',
|
|
15
|
+
'error',
|
|
16
|
+
'server-computation',
|
|
17
|
+
'stm-choice',
|
|
18
|
+
'stm-qrcode',
|
|
19
|
+
];
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** @public */
|
|
2
|
+
export declare const RECOGNIZE_ERROR_CODE: {
|
|
3
|
+
readonly SDK_ERROR: 1000;
|
|
4
|
+
readonly SDK_NOT_CONFIGURED: 1001;
|
|
5
|
+
readonly SDK_INVALID_CONFIGURATION: 1002;
|
|
6
|
+
readonly SDK_LOGGING_CONFIGURATION_FAILED: 1003;
|
|
7
|
+
readonly SDK_STORAGE_FAILED: 1004;
|
|
8
|
+
readonly SDK_USER_CANCELLED: 1005;
|
|
9
|
+
readonly SDK_TIMEOUT: 1006;
|
|
10
|
+
readonly SDK_NO_NETWORK_CONNECTION: 1007;
|
|
11
|
+
readonly SDK_DYNAMIC_LINKING_PAYLOAD_MALFORMED: 1008;
|
|
12
|
+
readonly SDK_ARTIFACT_RETRIEVE_FAILED: 1009;
|
|
13
|
+
readonly SDK_INVALID_CLIENT_STATE: 1010;
|
|
14
|
+
readonly SDK_OUTDATED_APP: 1012;
|
|
15
|
+
readonly SDK_WEB_ASSEMBLY_IMPORT_FAILED: 1013;
|
|
16
|
+
readonly SDK_WEB_ASSEMBLY_IMPORT_NOT_FULFILLED: 1014;
|
|
17
|
+
readonly SDK_WEB_ASSEMBLY_ERROR: 1015;
|
|
18
|
+
readonly SDK_INVALID_CUSTOMER_PROPERTIES: 1016;
|
|
19
|
+
readonly CAMERA_ERROR: 2000;
|
|
20
|
+
readonly CAMERA_NOT_FOUND: 2001;
|
|
21
|
+
readonly CAMERA_PERMISSION_DENIED: 2002;
|
|
22
|
+
readonly CAMERA_NOT_SUPPORTED: 2003;
|
|
23
|
+
readonly CORE_ERROR: 3000;
|
|
24
|
+
readonly CORE_NOT_ENOUGH_API_KEY_SEATS: 3001;
|
|
25
|
+
readonly CORE_USER_ALREADY_ENROLLED: 3002;
|
|
26
|
+
readonly CORE_USER_NOT_ENROLLED: 3003;
|
|
27
|
+
readonly CORE_FACE_NOT_MATCHING: 3004;
|
|
28
|
+
readonly CORE_NOT_ENOUGH_CIRCUITS: 3005;
|
|
29
|
+
readonly CORE_SECRET_NOT_FOUND: 3006;
|
|
30
|
+
readonly CORE_USER_LOCKED_OUT: 3007;
|
|
31
|
+
readonly CORE_CUSTOMER_NOT_FOUND: 3008;
|
|
32
|
+
readonly BIOM_ERROR: 4000;
|
|
33
|
+
readonly BIOM_REJECTED: 4001;
|
|
34
|
+
readonly BIOM_GENUINE_PRESENCE_NOT_ESTABLISHED: 4002;
|
|
35
|
+
readonly BIOM_LIVENESS_ENVIRONMENT_AWARE_NOT_SUPPORTED: 4003;
|
|
36
|
+
readonly BIOM_DEVICE_ENVIRONMENT_AWARE_NOT_SUPPORTED: 4004;
|
|
37
|
+
readonly SERVER_ERROR: 5000;
|
|
38
|
+
readonly SERVER_RECOGNITION_FAILED: 5002;
|
|
39
|
+
readonly SERVER_AUTHORIZATION_FAILED: 5003;
|
|
40
|
+
readonly SECURITY_ERROR: 6000;
|
|
41
|
+
readonly SECURITY_DEVICE_NOT_GENUINE: 6001;
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=recognize-error-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recognize-error-code.d.ts","sourceRoot":"","sources":["../../../../src/lib/defs/recognize-error-code.ts"],"names":[],"mappings":"AASA,cAAc;AACd,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCvB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2026 Ping Identity Corporation. All right reserved.
|
|
4
|
+
*
|
|
5
|
+
* This software may be modified and distributed under the terms
|
|
6
|
+
* of the MIT license. See the LICENSE file for details.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
/** @public */
|
|
10
|
+
export const RECOGNIZE_ERROR_CODE = {
|
|
11
|
+
SDK_ERROR: 1000,
|
|
12
|
+
SDK_NOT_CONFIGURED: 1001,
|
|
13
|
+
SDK_INVALID_CONFIGURATION: 1002,
|
|
14
|
+
SDK_LOGGING_CONFIGURATION_FAILED: 1003,
|
|
15
|
+
SDK_STORAGE_FAILED: 1004,
|
|
16
|
+
SDK_USER_CANCELLED: 1005,
|
|
17
|
+
SDK_TIMEOUT: 1006,
|
|
18
|
+
SDK_NO_NETWORK_CONNECTION: 1007,
|
|
19
|
+
SDK_DYNAMIC_LINKING_PAYLOAD_MALFORMED: 1008,
|
|
20
|
+
SDK_ARTIFACT_RETRIEVE_FAILED: 1009,
|
|
21
|
+
SDK_INVALID_CLIENT_STATE: 1010,
|
|
22
|
+
SDK_OUTDATED_APP: 1012,
|
|
23
|
+
SDK_WEB_ASSEMBLY_IMPORT_FAILED: 1013,
|
|
24
|
+
SDK_WEB_ASSEMBLY_IMPORT_NOT_FULFILLED: 1014,
|
|
25
|
+
SDK_WEB_ASSEMBLY_ERROR: 1015,
|
|
26
|
+
SDK_INVALID_CUSTOMER_PROPERTIES: 1016,
|
|
27
|
+
CAMERA_ERROR: 2000,
|
|
28
|
+
CAMERA_NOT_FOUND: 2001,
|
|
29
|
+
CAMERA_PERMISSION_DENIED: 2002,
|
|
30
|
+
CAMERA_NOT_SUPPORTED: 2003,
|
|
31
|
+
CORE_ERROR: 3000,
|
|
32
|
+
CORE_NOT_ENOUGH_API_KEY_SEATS: 3001,
|
|
33
|
+
CORE_USER_ALREADY_ENROLLED: 3002,
|
|
34
|
+
CORE_USER_NOT_ENROLLED: 3003,
|
|
35
|
+
CORE_FACE_NOT_MATCHING: 3004,
|
|
36
|
+
CORE_NOT_ENOUGH_CIRCUITS: 3005,
|
|
37
|
+
CORE_SECRET_NOT_FOUND: 3006,
|
|
38
|
+
CORE_USER_LOCKED_OUT: 3007,
|
|
39
|
+
CORE_CUSTOMER_NOT_FOUND: 3008,
|
|
40
|
+
BIOM_ERROR: 4000,
|
|
41
|
+
BIOM_REJECTED: 4001,
|
|
42
|
+
BIOM_GENUINE_PRESENCE_NOT_ESTABLISHED: 4002,
|
|
43
|
+
BIOM_LIVENESS_ENVIRONMENT_AWARE_NOT_SUPPORTED: 4003,
|
|
44
|
+
BIOM_DEVICE_ENVIRONMENT_AWARE_NOT_SUPPORTED: 4004,
|
|
45
|
+
SERVER_ERROR: 5000,
|
|
46
|
+
SERVER_RECOGNITION_FAILED: 5002,
|
|
47
|
+
SERVER_AUTHORIZATION_FAILED: 5003,
|
|
48
|
+
SECURITY_ERROR: 6000,
|
|
49
|
+
SECURITY_DEVICE_NOT_GENUINE: 6001,
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recognize-sdk-to-recognize-proxy-error-map.d.ts","sourceRoot":"","sources":["../../../../src/lib/defs/recognize-sdk-to-recognize-proxy-error-map.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAGrE,eAAO,MAAM,0CAA0C,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAgD3F,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2026 Ping Identity Corporation. All right reserved.
|
|
4
|
+
*
|
|
5
|
+
* This software may be modified and distributed under the terms
|
|
6
|
+
* of the MIT license. See the LICENSE file for details.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
import { RECOGNIZE_ERROR_CODE } from './recognize-error-code.js';
|
|
10
|
+
export const RECOGNIZE_SDK_TO_RECOGNIZE_PROXY_ERROR_MAP = Object.freeze({
|
|
11
|
+
FRAME_RESULTS_SET_UNSET: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
12
|
+
OPTIONS_UNSET: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
13
|
+
USER_LOCKOUT_EXPIRATION_UNSET: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
14
|
+
VIDEO_ELEMENT_UNSET: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
15
|
+
MEDIA_DEVICES_EMPTY_AUDIO_INPUT_LABEL: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
16
|
+
MEDIA_DEVICES_EMPTY_VIDEO_INPUT_LABEL: RECOGNIZE_ERROR_CODE.CAMERA_PERMISSION_DENIED,
|
|
17
|
+
MEDIA_DEVICES_NO_VIDEO_INPUTS: RECOGNIZE_ERROR_CODE.CAMERA_NOT_FOUND,
|
|
18
|
+
MEDIA_STREAM_ABORT: RECOGNIZE_ERROR_CODE.CAMERA_ERROR,
|
|
19
|
+
MEDIA_STREAM_INVALID_STATE: RECOGNIZE_ERROR_CODE.CAMERA_ERROR,
|
|
20
|
+
MEDIA_STREAM_NOT_ALLOWED: RECOGNIZE_ERROR_CODE.CAMERA_PERMISSION_DENIED,
|
|
21
|
+
MEDIA_STREAM_NOT_FOUND: RECOGNIZE_ERROR_CODE.CAMERA_ERROR,
|
|
22
|
+
MEDIA_STREAM_NOT_READABLE: RECOGNIZE_ERROR_CODE.CAMERA_ERROR,
|
|
23
|
+
MEDIA_STREAM_OVERCONSTRAINED: RECOGNIZE_ERROR_CODE.CAMERA_NOT_SUPPORTED,
|
|
24
|
+
MEDIA_STREAM_SECURITY: RECOGNIZE_ERROR_CODE.CAMERA_ERROR,
|
|
25
|
+
MEDIA_STREAM_TYPE: RECOGNIZE_ERROR_CODE.CAMERA_ERROR,
|
|
26
|
+
SERVER_CUSTOMER_NOT_FOUND: RECOGNIZE_ERROR_CODE.CORE_CUSTOMER_NOT_FOUND,
|
|
27
|
+
SERVER_FORBIDDEN: RECOGNIZE_ERROR_CODE.SERVER_AUTHORIZATION_FAILED,
|
|
28
|
+
SERVER_INTERNAL_ERROR: RECOGNIZE_ERROR_CODE.SERVER_ERROR,
|
|
29
|
+
SERVER_INVALID_REQUEST: RECOGNIZE_ERROR_CODE.SERVER_ERROR,
|
|
30
|
+
SERVER_INVALID_RESPONSE: RECOGNIZE_ERROR_CODE.SERVER_ERROR,
|
|
31
|
+
SERVER_INVALID_STATE: RECOGNIZE_ERROR_CODE.SERVER_ERROR,
|
|
32
|
+
SERVER_NO_ATTEMPTS_LEFT: RECOGNIZE_ERROR_CODE.CORE_NOT_ENOUGH_CIRCUITS,
|
|
33
|
+
SERVER_RECOGNITION_FAILED: RECOGNIZE_ERROR_CODE.SERVER_RECOGNITION_FAILED,
|
|
34
|
+
SERVER_USER_LOCKED_OUT: RECOGNIZE_ERROR_CODE.CORE_USER_LOCKED_OUT,
|
|
35
|
+
SESSION_DATABASE_ERROR: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
36
|
+
SESSION_MANAGER_NOT_NULL: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
37
|
+
SESSION_MANAGER_NULL: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
38
|
+
SESSION_MEDIA_STREAM_TIMEOUT: RECOGNIZE_ERROR_CODE.SDK_TIMEOUT,
|
|
39
|
+
SESSION_MEDIA_STREAM_UNSET: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
40
|
+
CREATE_MEDIA_STREAM_ARGS_UNSET: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
41
|
+
EXCEPTION: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
42
|
+
GET_VIDEO_MEDIA_DEVICES_ARGS_UNSET: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
43
|
+
RUNTIME_VIOLATION: RECOGNIZE_ERROR_CODE.SECURITY_ERROR,
|
|
44
|
+
SYMBOL_DESCRIPTION_UNSET: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
45
|
+
CUSTOMER_UNSET: RECOGNIZE_ERROR_CODE.SDK_INVALID_CONFIGURATION,
|
|
46
|
+
SERVICE_URL_PARSE_FAILED: RECOGNIZE_ERROR_CODE.SDK_INVALID_CONFIGURATION,
|
|
47
|
+
SERVICE_URL_UNSET: RECOGNIZE_ERROR_CODE.SDK_INVALID_CONFIGURATION,
|
|
48
|
+
USERNAME_UNSET: RECOGNIZE_ERROR_CODE.SDK_INVALID_CONFIGURATION,
|
|
49
|
+
WEB_ASSEMBLY_ABORTED: RECOGNIZE_ERROR_CODE.SDK_WEB_ASSEMBLY_ERROR,
|
|
50
|
+
WEB_ASSEMBLY_FACTORY_FAILED: RECOGNIZE_ERROR_CODE.SDK_WEB_ASSEMBLY_ERROR,
|
|
51
|
+
WEB_ASSEMBLY_IMPORT_FAILED: RECOGNIZE_ERROR_CODE.SDK_WEB_ASSEMBLY_IMPORT_FAILED,
|
|
52
|
+
WEB_ASSEMBLY_NOT_READY: RECOGNIZE_ERROR_CODE.SDK_WEB_ASSEMBLY_IMPORT_NOT_FULFILLED,
|
|
53
|
+
WEB_ASSEMBLY_MODULE_NOT_FOUND: RECOGNIZE_ERROR_CODE.SDK_WEB_ASSEMBLY_ERROR,
|
|
54
|
+
SLUG_UNSUPPORTED: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
55
|
+
QUEUE_UNSET: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
56
|
+
SYMBOL_UNSET: RECOGNIZE_ERROR_CODE.SDK_ERROR,
|
|
57
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CreateRecognizeErrorOptions, RecognizeError, RecognizeErrorCodeValue } from '../recognize.types.js';
|
|
2
|
+
/** @public */
|
|
3
|
+
export declare function createRecognizeError(code: RecognizeErrorCodeValue, options?: CreateRecognizeErrorOptions): RecognizeError;
|
|
4
|
+
//# sourceMappingURL=create-recognize-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-recognize-error.d.ts","sourceRoot":"","sources":["../../../../src/lib/functions/create-recognize-error.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,2BAA2B,EAC3B,cAAc,EACd,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAG/B,cAAc;AACd,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,2BAA2B,GACpC,cAAc,CAQhB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2026 Ping Identity Corporation. All right reserved.
|
|
4
|
+
*
|
|
5
|
+
* This software may be modified and distributed under the terms
|
|
6
|
+
* of the MIT license. See the LICENSE file for details.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
import { getRecognizeErrorCodeKey } from './get-recognize-error-code-key.js';
|
|
10
|
+
/** @public */
|
|
11
|
+
export function createRecognizeError(code, options) {
|
|
12
|
+
return {
|
|
13
|
+
error: {
|
|
14
|
+
cause: options?.cause,
|
|
15
|
+
code,
|
|
16
|
+
message: getRecognizeErrorCodeKey(code),
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RecognizeErrorCodeKey, RecognizeErrorCodeValue } from '../recognize.types.js';
|
|
2
|
+
/** @public */
|
|
3
|
+
export declare function getRecognizeErrorCodeKey(code: RecognizeErrorCodeValue): RecognizeErrorCodeKey;
|
|
4
|
+
//# sourceMappingURL=get-recognize-error-code-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-recognize-error-code-key.d.ts","sourceRoot":"","sources":["../../../../src/lib/functions/get-recognize-error-code-key.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAE5F,cAAc;AACd,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,uBAAuB,GAAG,qBAAqB,CAS7F"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2026 Ping Identity Corporation. All right reserved.
|
|
4
|
+
*
|
|
5
|
+
* This software may be modified and distributed under the terms
|
|
6
|
+
* of the MIT license. See the LICENSE file for details.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
import { RECOGNIZE_ERROR_CODE } from '../defs/recognize-error-code.js';
|
|
10
|
+
/** @public */
|
|
11
|
+
export function getRecognizeErrorCodeKey(code) {
|
|
12
|
+
const keys = Object.keys(RECOGNIZE_ERROR_CODE);
|
|
13
|
+
const key = keys.find((key) => RECOGNIZE_ERROR_CODE[key] === code);
|
|
14
|
+
return key ?? 'SDK_ERROR';
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-attributes.d.ts","sourceRoot":"","sources":["../../../../src/lib/functions/set-attributes.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,qBAAqB,EACrB,kCAAkC,EACnC,MAAM,uBAAuB,CAAC;AAE/B,wBAAgB,aAAa,CAC3B,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,kCAAkC,GACzC,IAAI,CAoCN"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2026 Ping Identity Corporation. All right reserved.
|
|
4
|
+
*
|
|
5
|
+
* This software may be modified and distributed under the terms
|
|
6
|
+
* of the MIT license. See the LICENSE file for details.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export function setAttributes(element, config) {
|
|
10
|
+
if (config.aspectRatio !== undefined)
|
|
11
|
+
element.aspectRatio = config.aspectRatio;
|
|
12
|
+
if (config.authorizationToken !== undefined)
|
|
13
|
+
element.authorizationToken = config.authorizationToken;
|
|
14
|
+
if (config.cameraAspectRatio !== undefined)
|
|
15
|
+
element.cameraAspectRatio = config.cameraAspectRatio;
|
|
16
|
+
if (config.cameraInstructions !== undefined)
|
|
17
|
+
element.cameraInstructions = config.cameraInstructions;
|
|
18
|
+
element.customer = config.customer;
|
|
19
|
+
if (config.datadogEnv !== undefined)
|
|
20
|
+
element.datadogEnv = config.datadogEnv;
|
|
21
|
+
if (config.datadogToken !== undefined)
|
|
22
|
+
element.datadogToken = config.datadogToken;
|
|
23
|
+
if (config.disableDatadog !== undefined)
|
|
24
|
+
element.disableDatadog = config.disableDatadog;
|
|
25
|
+
if (config.disableLogger !== undefined)
|
|
26
|
+
element.disableLogger = config.disableLogger;
|
|
27
|
+
if (config.disablePoweredBy !== undefined)
|
|
28
|
+
element.disablePoweredBy = config.disablePoweredBy;
|
|
29
|
+
if (config.disableSteps !== undefined)
|
|
30
|
+
element.disableSteps = config.disableSteps;
|
|
31
|
+
if (config.enableCameraFlash !== undefined)
|
|
32
|
+
element.enableCameraFlash = config.enableCameraFlash;
|
|
33
|
+
if (config.enableCameraInstructions !== undefined)
|
|
34
|
+
element.enableCameraInstructions = config.enableCameraInstructions;
|
|
35
|
+
if (config.enableCameraInstructionsIcons !== undefined)
|
|
36
|
+
element.enableCameraInstructionsIcons = config.enableCameraInstructionsIcons;
|
|
37
|
+
if (config.enableDatadogPII !== undefined)
|
|
38
|
+
element.enableDatadogPII = config.enableDatadogPII;
|
|
39
|
+
if (config.enableWasmPthreads !== undefined)
|
|
40
|
+
element.enableWasmPthreads = config.enableWasmPthreads;
|
|
41
|
+
if (config.lang !== undefined)
|
|
42
|
+
element.lang = config.lang;
|
|
43
|
+
if (config.localizationPacks !== undefined)
|
|
44
|
+
element.localizationPacks = config.localizationPacks;
|
|
45
|
+
if (config.localizationVariables !== undefined)
|
|
46
|
+
element.localizationVariables = config.localizationVariables;
|
|
47
|
+
if (config.loggerLevel !== undefined)
|
|
48
|
+
element.loggerLevel = config.loggerLevel;
|
|
49
|
+
if (config.operationID !== undefined)
|
|
50
|
+
element.operationID = config.operationID;
|
|
51
|
+
if (config.seedEntropy !== undefined)
|
|
52
|
+
element.seedEntropy = config.seedEntropy;
|
|
53
|
+
element.serviceURL = config.serviceURL;
|
|
54
|
+
if (config.theme !== undefined)
|
|
55
|
+
element.theme = config.theme;
|
|
56
|
+
if (config.themeOptions !== undefined)
|
|
57
|
+
element.themeOptions = config.themeOptions;
|
|
58
|
+
if (config.transactionData !== undefined)
|
|
59
|
+
element.transactionData = config.transactionData;
|
|
60
|
+
if (config.wasmBinaryURL !== undefined)
|
|
61
|
+
element.wasmBinaryURL = config.wasmBinaryURL;
|
|
62
|
+
if (config.wasmDataURL !== undefined)
|
|
63
|
+
element.wasmDataURL = config.wasmDataURL;
|
|
64
|
+
if (config.wasmScriptURL !== undefined)
|
|
65
|
+
element.wasmScriptURL = config.wasmScriptURL;
|
|
66
|
+
}
|