@trulioo/kyc-documents 3.0.43-beta.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/236.js +1 -0
- package/LICENSE.md +13 -0
- package/README.md +95 -0
- package/package.json +24 -0
- package/trulioo-kyc-documents.d.ts +281 -0
- package/trulioo-kyc-documents.js +2 -0
package/236.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunkui=globalThis.webpackChunkui||[]).push([[236],{236:e=>{e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}}]);
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
BY DOWNLOADING, INSTALLING, ACCESSING, OR OTHERWISE USING THE IMAGE CAPTURE SDK (DEFINED BELOW) PROVIDED OR MADE AVAILABLE BY TRULIOO INFORMATION SERVICES INC. (“**us**,” “**we**,” or “**our**”), YOU HEREBY AGREE TO BE BOUND BY THE TERMS AND CONDITIONS SET FORTH BELOW (“**Terms**”). IF YOU DO NOT AGREE TO THESE TERMS, THEN YOU DO NOT HAVE OUR PERMISSION TO USE THE IMAGE CAPTURE SDK. THESE TERMS DO NOT GRANT YOU OR ANY USER OF YOUR APPLICATION (AS DEFINED BELOW) THE RIGHT TO ACCESS OR USE ANY OF OUR OTHER PRODUCTS AND SERVICES (“**Services**”), AND ANY ACCESS TO OR USE OF THE SERVICES IS SUBJECT TO THE CUSTOMER AGREEMENT ENTERED INTO BETWEEN YOU AND US (IF ANY) GOVERNING SUCH ACCESS AND USE (“**Customer Agreement**”). IF THE IMAGE CAPTURE SDK IS BEING USED ON BEHALF OF A COMPANY, ORGANIZATION, OR OTHER ENTITY, THEN ALL REFERENCES TO “YOU,” OR “YOUR” REFER TO SUCH ENTITY AND ITS AFFILIATES, AND THE INDIVIDUAL AGREEING TO THESE TERMS ON YOUR BEHALF REPRESENTS AND WARRANTS THAT THEY HAVE AUTHORITY TO BIND YOU TO THESE TERMS.
|
|
2
|
+
|
|
3
|
+
1. <u>License; License Keys</u>. Subject to your compliance with these Terms, we hereby grant you a limited, non-exclusive, non-sublicensable, non-transferable, royalty-free, fully paid-up license, exercisable by and through your employees and contractors, to internally use and reproduce a reasonable number of copies of the software development kit (including any portion thereof) provided or made available by us to you under these Terms (“**Image Capture SDK**”) for the sole purpose of your internal development and testing of a software application developed by you or on your behalf that interoperates with Services (“**Application**”). Any use of the Image Capture SDK in a production format of your Application, for commercial purposes, or for any other purpose not expressly permitted by this Section 1 requires a license key provided by us to you pursuant to the Customer Agreement (“**License Key(s)**”). You hereby acknowledge and agree that: (a) the Image Capture SDK, the License Keys, and any know-how and trade secrets relating thereto are our sole and exclusive property and are confidential and proprietary to us; and (b) you will protect each of them using the same degree of care, but no less than a reasonable degree of care, as you use to protect your own confidential information.
|
|
4
|
+
|
|
5
|
+
2. <u>Restrictions</u>. Except to the extent otherwise permitted under these Terms or under applicable law, you will not, nor will you permit any third party to: (a) implement the Image Capture SDK in any software other than your Application or for any purpose other than its interoperation with the Services; (b) modify, translate, or create a derivative work of any portion of the Image Capture SDK; (c) sell, lease, loan, provide, distribute, disclose, expose, or otherwise transfer any portion of the Image Capture SDK (including any License Keys) to any third party (except for the limited right to distribute, in object code format, any source code (modified or unmodified) or object code provided with the Image Capture SDK solely as integrated components of your Application); (d) reverse engineer, disassemble, decompile, or otherwise attempt to gain access to the source code of the Services or the Image Capture SDK; (e) remove, alter, or obscure any copyright notices or other proprietary rights notices displayed on any portion of the Image Capture SDK; (f) use the Image Capture SDK or the License Keys to develop any software (including your Application) or other technology that (1) can be used with any service or product other than the Services, or (2) is competitive, directly or indirectly, with the Services; (g) interfere with the normal operation and security of the Image Capture SDK or the Services; (h) release or commercially distribute to third parties an Application in production format that is (1) not fully compatible with the Image Capture SDK and the Services, or (2) integrated or interoperable with any application programming interface not provided with the Image Capture SDK; or (i) circumvent or disable any technological, usage, or security features, restrictions, or limitations of any portion of the Image Capture SDK (including any License Keys).
|
|
6
|
+
|
|
7
|
+
3. <u>Other Terms</u>. The Image Capture SDK is licensed, not sold, to you. All rights not expressly granted herein are reserved by us. No additional rights whatsoever are granted to you by implication, estoppel or otherwise. The Image Capture SDK may incorporate third-party open-source software (“OSS”), as specified by us in the Image Capture SDK documentation or upon your prior written request, and any use of OSS on a stand-alone basis will be subject to the terms of the applicable OSS license and not these Terms. We reserve the right to modify or discontinue our provision of all or any portion of the Image Capture SDK at any time, temporarily or permanently, without notice to you. These Terms and the rights and licenses granted hereunder: (a) can be terminated by us at any time for any reason or for no reason at all, without notice to you; and (b) will automatically terminate if you breach any provision of these Terms. Upon any termination of these Terms, you must immediately cease all use of the Image Capture SDK and destroy all copies of the Image Capture SDK in your control or possession. If you have entered into a Customer Agreement with us or have otherwise agreed to other policies, guidelines, or terms and conditions (click-through, click-wrap, or otherwise) with us, they may contain additional rights, restrictions, and obligations relating to your access to and use of the Image Capture SDK that are not expressly set forth herein, and you are responsible for complying with them.
|
|
8
|
+
|
|
9
|
+
4. <u>Disclaimer</u>. THE IMAGE CAPTURE SDK AND ALL INTELLECTUAL PROPERTY MADE AVAILABLE OR LICENSED BY US UNDER THESE TERMS ARE PROVIDED “AS IS” WITHOUT ANY REPRESENTATION OR WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON INFRINGEMENT, QUALITY, ACCURACY, AND FITNESS FOR A PARTICULAR PURPOSE. ANY USE OF THE IMAGE CAPTURE SDK IS AT YOUR OWN RISK.
|
|
10
|
+
|
|
11
|
+
5. <u>Limitation of Liability</u>. TO THE FULLEST EXTENT PERMITTED BY LAW, IN NO EVENT WILL WE, UNDER THESE TERMS, HAVE ANY (a) LIABILITY TO YOU OR TO ANY THIRD PARTY HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE), or (b) OBLIGATION TO INDEMNIFY, DEFEND, OR HOLD YOU OR ANY THIRD PARTY HARMLESS. TO THE EXTENT THAT A COURT HOLDS THAT THESE TERMS ARE INVALID OR UNENFORCEABLE AS A RESULT OF OUR DISCLAIMING ALL LIABILITY AND DAMAGES UNDER THESE TERMS PURSUANT TO THIS SECTION 5, THEN, TO THE FULLEST EXTENT PERMITTED BY LAW, OUR TOTAL LIABILITY TO YOU HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) WILL NOT EXCEED $50.00 (USD).
|
|
12
|
+
|
|
13
|
+
6. <u>Miscellaneous</u>. These Terms are governed by the laws of British Columbia, Canada without regard to conflict of law principles. You may not assign or transfer these Terms or your rights hereunder, in whole or in part, by operation of law, change of control, or otherwise, without our prior written consent. Any attempted assignment by you in violation of this Section will be null and void. If any part of these Terms is held to be invalid or unenforceable, then the unenforceable part will be given effect to the greatest extent possible, and the remaining parts will remain in full force and effect.
|
package/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# @trulioo/kyc-documents
|
|
2
|
+
|
|
3
|
+
Trulioo KYC-Documents Javascript SDK
|
|
4
|
+
|
|
5
|
+
For more information, see our [Documentation](https://docs.verification.trulioo.com/sdk/web-3.0/index.html).
|
|
6
|
+
|
|
7
|
+
<hr />
|
|
8
|
+
|
|
9
|
+
## Info
|
|
10
|
+
|
|
11
|
+
Some US states impose obligations on businesses that collect and use “biometric identifiers” and/or “biometric information”, which may include facial scan data extracted from photos during a document verification transaction. One such law is the Illinois Biometric Information Privacy Act (“BIPA”). A business required to comply with BIPA is under obligations to, among other things, ensure that it informs the individual of the purpose of the collection and obtain consent. Accordingly, we require a notice and consent mechanism be implemented for all document verification transactions, and our customers using our API must provide us with confirmation via API whether an individual is located in the United States and has consented to the transaction in the prescribed manner. We also strongly encourage all of our customers to consult with legal counsel to ensure their own compliance with such laws.
|
|
12
|
+
|
|
13
|
+
For more information about the required notice and consent mechanism, please refer to our [Service Specific Terms for Document Verification](https://www.trulioo.com/legal/SST).
|
|
14
|
+
|
|
15
|
+
## Install and Usage
|
|
16
|
+
|
|
17
|
+
#### HTML
|
|
18
|
+
Create an HTML element where the SDK UI should be rendered:
|
|
19
|
+
```html
|
|
20
|
+
<div id="trulioo-sdk"></div>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
#### JS
|
|
24
|
+
Import the Javascript modules and set up the SDK:
|
|
25
|
+
|
|
26
|
+
```javascript showLineNumbers
|
|
27
|
+
import {Trulioo, EventBuilder, ListenerCallback, Response} from "@trulioo/kyc-documents"
|
|
28
|
+
|
|
29
|
+
const elementID = "trulioo-sdk" // The HTML element id to attach to
|
|
30
|
+
const shortCode = "sample-short-code" // Set the obtained short code from the Trulioo Customer API
|
|
31
|
+
|
|
32
|
+
// Set up callbacks to get results and debugging errors
|
|
33
|
+
const callbacks = new ListenerCallback({
|
|
34
|
+
onComplete: (success: Response.Success) => {
|
|
35
|
+
console.info(`Verification Successful: ${success.transactionId} `)
|
|
36
|
+
},
|
|
37
|
+
onError: (error: Response.Error) => {
|
|
38
|
+
console.error(`Verification Failed with Error Code: ${error.code}, Reason: ${error.message}`)
|
|
39
|
+
},
|
|
40
|
+
onException: (exception: Response.Exception) => {
|
|
41
|
+
console.error("Verification Failed with Exception:", exception)
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
const events = new EventBuilder()
|
|
46
|
+
const callbackOption = events.setCallbacks(callbacks)
|
|
47
|
+
|
|
48
|
+
// Initialize the SDK with the shortcode
|
|
49
|
+
const trulioo = new Trulioo()
|
|
50
|
+
trulioo.initialize(shortCode)
|
|
51
|
+
.then(complete => {
|
|
52
|
+
console.info("Initialize complete:", complete)
|
|
53
|
+
// Launch the UI with the provided HTML element ID
|
|
54
|
+
trulioo.launch(elementID, callbackOption)
|
|
55
|
+
.then(success => {
|
|
56
|
+
console.info("Launch success:", success)
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
.catch(error =>
|
|
60
|
+
console.error("Error:", error)
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
**Note**: The SDK will import additional css files automatically. Be sure to not exclude the css files contained in the @trulioo/kyc-documents node_modules
|
|
65
|
+
directory from your web app configuration if you are using webpack css-loader or something similar.
|
|
66
|
+
|
|
67
|
+
------
|
|
68
|
+
## Customization
|
|
69
|
+
|
|
70
|
+
The SDK supports customization options that allow you to tailor the user experience. You can configure settings such as language locale and themes.
|
|
71
|
+
All customization is managed through the **Customer API** at the time you create a transaction. Once the short code is provided to the SDK, it will automatically render using the configured locale and theme.
|
|
72
|
+
|
|
73
|
+
For details on how to configure these options, see the [Customer API documentation](https://docs.verification.trulioo.com/api/customer/2.5/index.html#tag/Transaction/operation/post-transactions).
|
|
74
|
+
|
|
75
|
+
------
|
|
76
|
+
## Desktop to Mobile Workflow
|
|
77
|
+
|
|
78
|
+
The SDK also supports cross-device document capture.
|
|
79
|
+
When a user begins the verification flow on a desktop browser, they will be shown a QR code that can be scanned with their mobile phone.
|
|
80
|
+
This allows them to seamlessly continue the capture process using their phone’s camera.
|
|
81
|
+
After completing the document capture on mobile, the user is automatically redirected back to their desktop session to continue and complete the verification flow.
|
|
82
|
+
|
|
83
|
+
For details on how to configure these options, see the [Customer API documentation](https://docs.verification.trulioo.com/api/customer/2.5/index.html#tag/Transaction/operation/post-transactions).
|
|
84
|
+
|
|
85
|
+
------
|
|
86
|
+
## Utilize the SDK from a CDN
|
|
87
|
+
|
|
88
|
+
In your project, you can import the Trulioo SDK:
|
|
89
|
+
```javascript
|
|
90
|
+
import truliooKYC from "https://cdn.jsdelivr.net/npm/@trulioo/kyc-documents/+esm"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
You will now have full access to the SDK via your import, without any extra configuration steps needed.
|
|
94
|
+
The above URL will get you the latest version of the SDK. If you want to use a more specific version for the SDK,
|
|
95
|
+
you can do https://cdn.jsdelivr.net/npm/@trulioo/kyc-documents@VERSION_NUMBER/+esm and replace the VERSION_NUMBER to your choice.
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@trulioo/kyc-documents",
|
|
3
|
+
"version": "3.0.43-beta.0",
|
|
4
|
+
"main": "trulioo-kyc-documents.js",
|
|
5
|
+
"types": "trulioo-kyc-documents.d.ts",
|
|
6
|
+
"devDependencies": {
|
|
7
|
+
"webpack": "5.94.0",
|
|
8
|
+
"webpack-cli": "5.1.4",
|
|
9
|
+
"kotlin-web-helpers": "2.0.0",
|
|
10
|
+
"typescript": "5.5.4",
|
|
11
|
+
"source-map-loader": "5.0.0",
|
|
12
|
+
"webpack-dev-server": "4.15.2",
|
|
13
|
+
"lottie-web": "5.12.2",
|
|
14
|
+
"hash.js": "1.1.7",
|
|
15
|
+
"@js-joda/core": "3.2.0",
|
|
16
|
+
"format-util": "^1.0.5",
|
|
17
|
+
"ws": "8.18.0"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {},
|
|
20
|
+
"peerDependencies": {},
|
|
21
|
+
"optionalDependencies": {},
|
|
22
|
+
"bundledDependencies": [],
|
|
23
|
+
"license": "SEE LICENSE IN LICENSE.md"
|
|
24
|
+
}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
type Nullable<T> = T | null | undefined
|
|
2
|
+
/** @deprecated */
|
|
3
|
+
export declare const initHook: { get(): any; };
|
|
4
|
+
export declare class CameraProps {
|
|
5
|
+
constructor(backgroundColor?: string);
|
|
6
|
+
get backgroundColor(): string;
|
|
7
|
+
shouldShowAnimation(): boolean;
|
|
8
|
+
copy(backgroundColor?: string): CameraProps;
|
|
9
|
+
toString(): string;
|
|
10
|
+
hashCode(): number;
|
|
11
|
+
equals(other: Nullable<any>): boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class Coordinates {
|
|
14
|
+
constructor(topLeft: ScreenPoint, bottomRight: ScreenPoint, center: ScreenPoint);
|
|
15
|
+
get topLeft(): ScreenPoint;
|
|
16
|
+
get bottomRight(): ScreenPoint;
|
|
17
|
+
get center(): ScreenPoint;
|
|
18
|
+
copy(topLeft?: ScreenPoint, bottomRight?: ScreenPoint, center?: ScreenPoint): Coordinates;
|
|
19
|
+
toString(): string;
|
|
20
|
+
hashCode(): number;
|
|
21
|
+
equals(other: Nullable<any>): boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare class ScreenPoint {
|
|
24
|
+
constructor(x: number, y: number);
|
|
25
|
+
get x(): number;
|
|
26
|
+
get y(): number;
|
|
27
|
+
copy(x?: number, y?: number): ScreenPoint;
|
|
28
|
+
toString(): string;
|
|
29
|
+
hashCode(): number;
|
|
30
|
+
equals(other: Nullable<any>): boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare interface ITruliooImageFeedback {
|
|
33
|
+
readonly imageId: string;
|
|
34
|
+
readonly detectionType: DetectionType;
|
|
35
|
+
readonly imageFeedbacks: Array<string>;
|
|
36
|
+
readonly __doNotUseOrImplementIt: {
|
|
37
|
+
readonly "com.trulioo.docv.sdk.capture.contract.ITruliooImageFeedback": unique symbol;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export declare interface ITruliooVerifyFeedback {
|
|
41
|
+
readonly isVerifyAttemptAvailable: boolean;
|
|
42
|
+
readonly verifyResponses: Array<string>;
|
|
43
|
+
readonly __doNotUseOrImplementIt: {
|
|
44
|
+
readonly "com.trulioo.docv.sdk.capture.contract.ITruliooVerifyFeedback": unique symbol;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export declare class TruliooCameraConfig {
|
|
48
|
+
constructor(detectionType?: DetectionType);
|
|
49
|
+
get detectionType(): DetectionType;
|
|
50
|
+
copy(detectionType?: DetectionType): TruliooCameraConfig;
|
|
51
|
+
toString(): string;
|
|
52
|
+
hashCode(): number;
|
|
53
|
+
equals(other: Nullable<any>): boolean;
|
|
54
|
+
}
|
|
55
|
+
export declare abstract class DetectionType {
|
|
56
|
+
private constructor();
|
|
57
|
+
static get DOCUMENT(): DetectionType & {
|
|
58
|
+
get name(): "DOCUMENT";
|
|
59
|
+
get ordinal(): 0;
|
|
60
|
+
};
|
|
61
|
+
static get BIOMETRIC_SELFIE(): DetectionType & {
|
|
62
|
+
get name(): "BIOMETRIC_SELFIE";
|
|
63
|
+
get ordinal(): 1;
|
|
64
|
+
};
|
|
65
|
+
get name(): "DOCUMENT" | "BIOMETRIC_SELFIE";
|
|
66
|
+
get ordinal(): 0 | 1;
|
|
67
|
+
static values(): Array<DetectionType>;
|
|
68
|
+
static valueOf(value: string): DetectionType;
|
|
69
|
+
}
|
|
70
|
+
export declare class TruliooCameraProps {
|
|
71
|
+
constructor(backgroundColor?: string);
|
|
72
|
+
get backgroundColor(): string;
|
|
73
|
+
shouldShowAnimation(): boolean;
|
|
74
|
+
copy(backgroundColor?: string): TruliooCameraProps;
|
|
75
|
+
toString(): string;
|
|
76
|
+
hashCode(): number;
|
|
77
|
+
equals(other: Nullable<any>): boolean;
|
|
78
|
+
}
|
|
79
|
+
export declare class TruliooError /* extends Error */ {
|
|
80
|
+
private constructor();
|
|
81
|
+
get code(): number;
|
|
82
|
+
get errorMessage(): string;
|
|
83
|
+
static get GeneralError(): {
|
|
84
|
+
toString(): string;
|
|
85
|
+
hashCode(): number;
|
|
86
|
+
equals(other: Nullable<any>): boolean;
|
|
87
|
+
} & TruliooError;
|
|
88
|
+
static get FeedbackManuallyStopped(): {
|
|
89
|
+
toString(): string;
|
|
90
|
+
hashCode(): number;
|
|
91
|
+
equals(other: Nullable<any>): boolean;
|
|
92
|
+
} & TruliooError;
|
|
93
|
+
static get CameraIsNotReady(): {
|
|
94
|
+
toString(): string;
|
|
95
|
+
hashCode(): number;
|
|
96
|
+
equals(other: Nullable<any>): boolean;
|
|
97
|
+
} & TruliooError;
|
|
98
|
+
static get SdkIsNotInitialized(): {
|
|
99
|
+
toString(): string;
|
|
100
|
+
hashCode(): number;
|
|
101
|
+
equals(other: Nullable<any>): boolean;
|
|
102
|
+
} & TruliooError;
|
|
103
|
+
static get ParentElementNotFound(): {
|
|
104
|
+
toString(): string;
|
|
105
|
+
hashCode(): number;
|
|
106
|
+
equals(other: Nullable<any>): boolean;
|
|
107
|
+
} & TruliooError;
|
|
108
|
+
static get CameraPermissionDenied(): {
|
|
109
|
+
toString(): string;
|
|
110
|
+
hashCode(): number;
|
|
111
|
+
equals(other: Nullable<any>): boolean;
|
|
112
|
+
} & TruliooError;
|
|
113
|
+
}
|
|
114
|
+
export declare namespace TruliooError {
|
|
115
|
+
class UnexpectedError extends TruliooError {
|
|
116
|
+
constructor();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
export declare interface ITruliooCamera {
|
|
120
|
+
readonly id: string;
|
|
121
|
+
readonly detectionType: DetectionType;
|
|
122
|
+
render(parentElementId: string, cameraProps?: Nullable<TruliooCameraProps>): Promise<any>;
|
|
123
|
+
onCaptureRegion(onRegionChange: (p0: Coordinates) => void): void;
|
|
124
|
+
startFeedback(): Promise<ITruliooCaptureResponse>;
|
|
125
|
+
startFeedbackWithFilter(filter: (p0: ITruliooImageFeedback) => boolean): Promise<ITruliooCaptureResponse>;
|
|
126
|
+
stopFeedback(): void;
|
|
127
|
+
onFeedbackState(feedback: (p0: string) => void): void;
|
|
128
|
+
captureLatestFrame(): Promise<ITruliooManualCaptureResponse>;
|
|
129
|
+
remove(): void;
|
|
130
|
+
resume(): void;
|
|
131
|
+
readonly __doNotUseOrImplementIt: {
|
|
132
|
+
readonly "com.trulioo.docv.sdk.capture.ITruliooCamera": unique symbol;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export declare interface ITruliooCaptureResponse extends ICaptureResponse, ITruliooImageFeedback {
|
|
136
|
+
readonly __doNotUseOrImplementIt: {
|
|
137
|
+
readonly "com.trulioo.docv.sdk.capture.ITruliooCaptureResponse": unique symbol;
|
|
138
|
+
} & ICaptureResponse["__doNotUseOrImplementIt"] & ITruliooImageFeedback["__doNotUseOrImplementIt"];
|
|
139
|
+
}
|
|
140
|
+
export declare interface ITruliooManualCaptureResponse extends ICaptureResponse {
|
|
141
|
+
readonly __doNotUseOrImplementIt: {
|
|
142
|
+
readonly "com.trulioo.docv.sdk.capture.ITruliooManualCaptureResponse": unique symbol;
|
|
143
|
+
} & ICaptureResponse["__doNotUseOrImplementIt"];
|
|
144
|
+
}
|
|
145
|
+
export declare interface ICaptureResponse {
|
|
146
|
+
readonly imageId: string;
|
|
147
|
+
acceptImage(): Promise<any>;
|
|
148
|
+
verifyImage(): Promise<ITruliooVerifyFeedback>;
|
|
149
|
+
readonly __doNotUseOrImplementIt: {
|
|
150
|
+
readonly "com.trulioo.docv.sdk.capture.ICaptureResponse": unique symbol;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
export declare interface ITruliooCapture {
|
|
154
|
+
initialize(shortCode: string): Promise<string>;
|
|
155
|
+
createTruliooCamera(config?: Nullable<TruliooCameraConfig>): ITruliooCamera;
|
|
156
|
+
submit(): Promise<any>;
|
|
157
|
+
readonly __doNotUseOrImplementIt: {
|
|
158
|
+
readonly "com.trulioo.docv.sdk.capture.ITruliooCapture": unique symbol;
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
export declare class TruliooCamera implements ITruliooCamera {
|
|
162
|
+
constructor(detectionType: DetectionType, id?: string, viewModel?: any/* ICameraViewModel */, cameraView?: any/* IWebCameraView */, cameraDispatcher?: any/* CoroutineDispatcher */);
|
|
163
|
+
get detectionType(): DetectionType;
|
|
164
|
+
get id(): string;
|
|
165
|
+
render(parentElementId: string, cameraProps?: Nullable<TruliooCameraProps>): Promise<any>;
|
|
166
|
+
onCaptureRegion(onRegionChange: (p0: Coordinates) => void): void;
|
|
167
|
+
startFeedback(): Promise<ITruliooCaptureResponse>;
|
|
168
|
+
startFeedbackWithFilter(filter: (p0: ITruliooImageFeedback) => boolean): Promise<ITruliooCaptureResponse>;
|
|
169
|
+
stopFeedback(): void;
|
|
170
|
+
onFeedbackState(feedback: (p0: string) => void): void;
|
|
171
|
+
captureLatestFrame(): Promise<ITruliooManualCaptureResponse>;
|
|
172
|
+
resume(): void;
|
|
173
|
+
remove(): void;
|
|
174
|
+
readonly __doNotUseOrImplementIt: ITruliooCamera["__doNotUseOrImplementIt"];
|
|
175
|
+
}
|
|
176
|
+
export declare const TruliooCapture: {
|
|
177
|
+
getInstance(): {
|
|
178
|
+
initialize(shortCode: string): Promise<string>;
|
|
179
|
+
createTruliooCamera(config?: Nullable<TruliooCameraConfig>): ITruliooCamera;
|
|
180
|
+
submit(): Promise<any>;
|
|
181
|
+
readonly __doNotUseOrImplementIt: ITruliooCapture["__doNotUseOrImplementIt"];
|
|
182
|
+
} & ITruliooCapture;
|
|
183
|
+
};
|
|
184
|
+
export declare class TruliooCaptureResponse implements ITruliooCaptureResponse {
|
|
185
|
+
constructor(detectionType: DetectionType, imageDecision: any/* IImageDecision */, cameraFlow: any/* ISDKCameraBridge */);
|
|
186
|
+
get detectionType(): DetectionType;
|
|
187
|
+
get imageId(): string;
|
|
188
|
+
get imageFeedbacks(): Array<string>;
|
|
189
|
+
acceptImage(): Promise<any>;
|
|
190
|
+
verifyImage(): Promise<ITruliooVerifyFeedback>;
|
|
191
|
+
readonly __doNotUseOrImplementIt: ITruliooCaptureResponse["__doNotUseOrImplementIt"];
|
|
192
|
+
}
|
|
193
|
+
export declare class TruliooManualCaptureResponse implements ITruliooManualCaptureResponse {
|
|
194
|
+
constructor(imageId: string, cameraFlow: any/* ISDKCameraBridge */);
|
|
195
|
+
get imageId(): string;
|
|
196
|
+
acceptImage(): Promise<any>;
|
|
197
|
+
verifyImage(): Promise<ITruliooVerifyFeedback>;
|
|
198
|
+
readonly __doNotUseOrImplementIt: ITruliooManualCaptureResponse["__doNotUseOrImplementIt"];
|
|
199
|
+
}
|
|
200
|
+
export declare class Trulioo implements ITrulioo {
|
|
201
|
+
constructor();
|
|
202
|
+
initialize(shortcode: string): Promise<TruliooResult.Authorized>;
|
|
203
|
+
launch(parentId: string, eventBuilder: EventBuilder): Promise<TruliooResult>;
|
|
204
|
+
readonly __doNotUseOrImplementIt: ITrulioo["__doNotUseOrImplementIt"];
|
|
205
|
+
}
|
|
206
|
+
export declare interface ITrulioo {
|
|
207
|
+
initialize(shortcode: string): Promise<TruliooResult.Authorized>;
|
|
208
|
+
launch(parentId: string, eventBuilder: EventBuilder): Promise<TruliooResult>;
|
|
209
|
+
readonly __doNotUseOrImplementIt: {
|
|
210
|
+
readonly "com.trulioo.docv.ui.contract.ITrulioo": unique symbol;
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
export declare abstract class TruliooResult {
|
|
214
|
+
protected constructor();
|
|
215
|
+
static get Complete(): {
|
|
216
|
+
} & TruliooResult;
|
|
217
|
+
}
|
|
218
|
+
export declare namespace TruliooResult {
|
|
219
|
+
class Authorized extends TruliooResult {
|
|
220
|
+
constructor(transactionId: string);
|
|
221
|
+
get transactionId(): string;
|
|
222
|
+
copy(transactionId?: string): TruliooResult.Authorized;
|
|
223
|
+
toString(): string;
|
|
224
|
+
hashCode(): number;
|
|
225
|
+
equals(other: Nullable<any>): boolean;
|
|
226
|
+
}
|
|
227
|
+
class Error extends TruliooResult {
|
|
228
|
+
constructor(message: string, code?: Nullable<number>, transactionId?: Nullable<string>);
|
|
229
|
+
get message(): string;
|
|
230
|
+
get code(): Nullable<number>;
|
|
231
|
+
get transactionId(): Nullable<string>;
|
|
232
|
+
toString(): string;
|
|
233
|
+
copy(message?: string, code?: Nullable<number>, transactionId?: Nullable<string>): TruliooResult.Error;
|
|
234
|
+
hashCode(): number;
|
|
235
|
+
equals(other: Nullable<any>): boolean;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
export declare abstract class Response {
|
|
239
|
+
protected constructor();
|
|
240
|
+
abstract asJs(): any;
|
|
241
|
+
}
|
|
242
|
+
export declare namespace Response {
|
|
243
|
+
class Success extends Response {
|
|
244
|
+
constructor(transactionId: Nullable<string>);
|
|
245
|
+
get transactionId(): Nullable<string>;
|
|
246
|
+
asJs(): any;
|
|
247
|
+
copy(transactionId?: Nullable<string>): Response.Success;
|
|
248
|
+
toString(): string;
|
|
249
|
+
hashCode(): number;
|
|
250
|
+
equals(other: Nullable<any>): boolean;
|
|
251
|
+
}
|
|
252
|
+
class Error extends Response {
|
|
253
|
+
constructor(code: number, message: Nullable<string>);
|
|
254
|
+
get code(): number;
|
|
255
|
+
get message(): Nullable<string>;
|
|
256
|
+
asJs(): any;
|
|
257
|
+
copy(code?: number, message?: Nullable<string>): Response.Error;
|
|
258
|
+
toString(): string;
|
|
259
|
+
hashCode(): number;
|
|
260
|
+
equals(other: Nullable<any>): boolean;
|
|
261
|
+
}
|
|
262
|
+
class Exception extends Response {
|
|
263
|
+
constructor(message: Nullable<string>);
|
|
264
|
+
get message(): Nullable<string>;
|
|
265
|
+
asJs(): any;
|
|
266
|
+
copy(message?: Nullable<string>): Response.Exception;
|
|
267
|
+
toString(): string;
|
|
268
|
+
hashCode(): number;
|
|
269
|
+
equals(other: Nullable<any>): boolean;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
export declare class EventBuilder {
|
|
273
|
+
constructor();
|
|
274
|
+
setCallbacks(obj: Nullable<ListenerCallback>): EventBuilder;
|
|
275
|
+
}
|
|
276
|
+
export declare class ListenerCallback {
|
|
277
|
+
constructor(obj?: any);
|
|
278
|
+
get onComplete(): (p0: Response.Success) => void;
|
|
279
|
+
get onError(): (p0: Response.Error) => void;
|
|
280
|
+
get onException(): (p0: Response.Exception) => void;
|
|
281
|
+
}
|