TypeScript References
Types
DocumentDetectorResponse
DocumentDetectorResponse
Field | Type | Description |
---|---|---|
| DocumentDetectorResult or null | Shows when document detector returns a successful capture. |
| DocumentDetectorError or null | Shows when the document detector return some error. |
| boolean | Shows when user cancel the document detector. |
DocumentDetectorResult
DocumentDetectorResult
Field | Type | Description |
---|---|---|
| The array with the respective captures of the parameterized documents | |
| string | Identifier of this run on our servers. If possible, save this field and send it along to our API. This way we will have more data about how the user behaved during the execution |
| string | The class of the read document stream. This parameter is useful in an integration with our OCR route. The existing types are: |
DocumentDetectorError
DocumentDetectorError
Field | Type | Description |
---|---|---|
| string | Https code status. |
| string | Detailed error message. |
| Enum describing the type of error. |
DocumentDetectorSettings
DocumentDetectorSettings
Field | Type | Description | Android | iOS | Requerid |
---|---|---|---|---|---|
| Defines the document capture flow. | ✅ | ✅ | ✅ | |
| Configures the requirements for each capture stage. Designed to make capture more flexible in cases where the user is unable to capture with all checks active, preventing them from getting stuck at this stage in their registration flow. | ✅ | ❌ | ❌ | |
| Change the development environment. | ✅ | ✅ | ❌ | |
| boolean | Enables/disables the popups displayed before each document capture. | ✅ | ✅ | ❌ |
| number | Defines SDK's requests timeout. | ✅ | ✅ | ❌ |
| Object of the configuration for define the sensors of the SDK. | ✅ | ✅ | ❌ | |
| Defines your proxy to make requests. | ✅ | ✅ | ❌ | |
| Enables/disables and allows the configuration of the visualization of the capture performed, requesting the user's confirmation to proceed. | ✅ | ✅ | ❌ | |
| number | Allows you to configure the quality in the compression process. By default, all captures go through compression. The method expects values between 80 and 100 as a parameter, where 100 is the best quality compression. | ✅ | ✅ | ❌ |
| number | Enables/disables manual capture. | ❌ | ✅ | ❌ |
| string | Sets the time the image URL will last on the server until it is expired. Expect to receive a time interval between "30m" to "30d".
Examples:
| ✅ | ✅ | ❌ |
| number | Delays the activity after the completion of each step. | ✅ | ✅ | ❌ |
| Allows you to set the capture resolution. | ✅ | ✅ | ❌ | |
| Enables the option to allow passports from only a certain issuing country, or, a list of countries. | ✅ | ✅ | ❌ | |
| To custom messages use this object. | ✅ | ✅ | ❌ | |
| To enable the document upload functionality it is necessary to use this object. | ✅ | ✅ | ❌ | |
| Defines the primary color and feedback colors of the SDK. | ✅ | ✅ | ❌ | |
| The SDK has some blocks that may prevent its execution in certain contexts. To disable them, you can use the methods as shown in the example below. | ✅ | ❌ | ❌ |
DocumentDetectorStep
DocumentDetectorStep
Field | Type | Description | Android | iOS |
---|---|---|---|---|
| Defines the document capture flow. | ✅ | ✅ | |
| string | Defines text to be shown in the lower part of the layout. | ✅ | ✅ |
| boolean | Present the text to be displayed at the top of the layout. | ✅ | ✅ |
| string | Defines illustration to be shown in the popup prior to capture. | ✅ | ✅ |
DocumentDetectorCaptureStage
DocumentDetectorCaptureStage
Field | Type | Description | Android | iOS |
---|---|---|---|---|
| Defines the capture mode. | ✅ | ❌ | |
| number | Duration of the stage, in milliseconds. | ✅ | ❌ |
| boolean | Enables/Disables the use of sensors for capturing the photo. | ✅ | ❌ |
DocumentDetectorSensorSettings
DocumentDetectorSensorSettings
Field | Type | Description | Android | iOS |
---|---|---|---|---|
| number | Defines threshold between acceptable/unacceptable ambient brightness. | ✅ | ✅ |
| number | Defines threshold between correct/incorrect device orientation. Higher the value more flexible it will be. | ✅ | ✅ |
| Changes the default settings of the stability sensor. The threshold of this sensor is in the range of the last two accelerations collected from the device. | ✅ | ✅ |
DocumentDetectorSensorSettingsStabilitySensor
DocumentDetectorSensorSettingsStabilitySensor
Field | Type | Description | Android | iOS |
---|---|---|---|---|
| number | Defines stability sensor settings. | ✅ | ❌ |
| number | The threshold of this sensor is in the range of the last two accelerations collected from the device. | ✅ | ✅ |
DocumentDetectorProxySettings
DocumentDetectorProxySettings
Field | Type | Description | Android | iOS |
---|---|---|---|---|
| string | Sets the domain or IP address of the proxy service. | ✅ | ✅ |
| number | Sets the port to be used. | ✅ | ✅ |
| Enables/Disables the use of sensors for capturing the photo. | ✅ | ✅ |
DocumentDetectorProxySettingsAuthentication
DocumentDetectorProxySettingsAuthentication
Field | Type | Description | Android | iOS |
---|---|---|---|---|
| string | Username to be used for authentication. | ✅ | ✅ |
| number | Password to be used for authentication. | ✅ | ✅ |
DocumentDetectorPreviewSettings
DocumentDetectorPreviewSettings
Field | Type | Description | Android | iOS |
---|---|---|---|---|
| boolean | Enables/disables and allows the configuration of the visualization of the capture performed, requesting the user's confirmation to proceed. | ✅ | ✅ |
| string | Sets the title shown on the screen. | ✅ | ✅ |
| string | Sets the subtitle displayed on the screen. | ✅ | ✅ |
| string | Sets the message displayed on the confirmation button. | ✅ | ✅ |
| string | Sets the message displayed on the button to perform a new capture. | ✅ | ✅ |
DocumentDetectorMessageSettings
DocumentDetectorMessageSettings
Field | Type | Description | Android | iOS |
---|---|---|---|---|
| string | Message displayed when you start the camera | ✅ | ✅ |
| string | Message telling you to fit the document to the mask | ✅ | ✅ |
| string | Message displayed at the moment the capture is being performed | ✅ | ✅ |
| string | Message displayed when the SDK makes a request to the backend, checking for quality | ✅ | ✅ |
| string | Message displayed when the capture quality fails | ✅ | ✅ |
| string | Message displayed when there is no quality check and the capture is being saved on the servers | ✅ | ✅ |
| string | Message displayed when displaying an open document, the message will be displayed together with the error message on the document being used, example: if the user displays an open CNH(Brazilian drive’s license), the standard error message "Essa é uma CNH Aberta" + the defined message will be displayed. | ✅ | ❌ |
| string | Message displayed in the subtitle of the pop-up that brings the illustration of the document that is being requested for capture. | ✅ | ✅ |
| string | Message displayed when the document is displayed in a different stream than expected. | ✅ | ✅ |
| string | Message displayed when a unexpected type of document is displayed for capture | ✅ | ✅ |
| string | Message displayed when a document is unknown | ✅ | ❌ |
| string | Message displayed when the brightness threshold is lower than expected | ✅ | ✅ |
| string | Message displayed when the orientation threshold is lower than expected | ✅ | ✅ |
| string | Message displayed when the orientation threshold is lower than expected | ✅ | ✅ |
| string | Allows for customization of the confirmation button message | ✅ | ❌ |
| string | Message displayed to request a document to be present on the camera. | ✅ | ✅ |
| string | Message displayed to request to get closer to the document. | ✅ | ✅ |
| string | Message displayed to request to center the document. | ✅ | ✅ |
| string | Message displayed to request to move away from the document. | ✅ | ✅ |
| string | Message displayed to request to align the document. | ✅ | ✅ |
| string | Message displayed to request to turn document 90 degrees. | ✅ | ✅ |
| string | Message displayed to alert that the document was captured. | ✅ | ✅ |
DocumentDetectorUploadSettings
DocumentDetectorUploadSettings
Field | Type | Description | Android | iOS |
---|---|---|---|---|
| boolean | Enables/disables this feature. | ✅ | ✅ |
| boolean | Enables/disables file compression before uploading. | ✅ | ✅ |
| Defines the file format(s) that will be accepted for upload. | ✅ | ✅ | |
| number | Sets the maximum KB limit of the file to upload. | ✅ | ✅ |
DocumentDetectorStyle
DocumentDetectorStyle
Field | Type | Description | Android | iOS |
---|---|---|---|---|
| string | Define the principal color of the SDK. | Use hexadecimal colors. Example: | |
| Colors of the feedback area. | Use hexadecimal colors. Example: |
DocumentFeedbackColors
DocumentFeedbackColors
Field | Type | Description | Android | iOS |
---|---|---|---|---|
| string | Defines the default coolor for default feedback. | ✅ | ✅ |
| string | defines the error color when there is an error capturing the document. | ✅ | ✅ |
| string | Sets the success color when the document is captured. | ✅ | ✅ |
DocumentDetectorSecuritySettings
DocumentDetectorSecuritySettings
Field | Type | Description | Android | iOS |
---|---|---|---|---|
| boolean | Enables the use of emulator. | ✅ | ❌ |
| boolean | Enables the use of rooted devices. | ✅ | ❌ |
| boolean | Enable developer mode on the physical device. | ✅ | ❌ |
| boolean | Enable the Android Debug Bridge (ADB). | ✅ | ❌ |
| boolean | Enable debug mode for Android. | ✅ | ❌ |
Enums
Document
Document
Field | Description | Android | iOS |
---|---|---|---|
| Front of the RG, part where the photo is. | ✅ | ✅ |
| Back of the RG, where the data is. | ✅ | ✅ |
| RG open, showing both the front and back. | ✅ | ✅ |
| Front of the CNH, part where the photo is. | ✅ | ✅ |
| Back of the CNH, part where the signature is. | ✅ | ✅ |
| CNH open, showing both the front and back. | ✅ | ✅ |
| CRLV. | ✅ | ✅ |
| Front of RNE and RNM, where are the data. | ✅ | ✅ |
| Back of RNE and RNM, where is the photo. | ✅ | ✅ |
| Passport, one side only, showing all data. | ✅ | ✅ |
| Front of CTPS, where the photo is located. | ✅ | ✅ |
| Back of the CTPS, where it contains the data. | ✅ | ✅ |
| Other identification documents in general, such as RNE, Military Identity, OAB and CRLV. | ✅ | ✅ |
| Allows the sending of any type of document, all those mentioned above, including any other document, as no typifications are made. | ✅ | ✅ |
CaptureMode
CaptureMode
Field | Description | Android | iOS |
---|---|---|---|
| Automatically scans the document. | ✅ | ❌ |
| Scan the document manually. | ✅ | ❌ |
Stage
Stage
Field | Description | Android | iOS |
---|---|---|---|
| Beta environment. | ✅ | ✅ |
| Production environment. | ✅ | ✅ |
Resolution
Resolution
Field | Description | Android | iOS |
---|---|---|---|
| 1920 x 1080 | ✅ | ✅ |
| 2560 x 1440 | ✅ | ❌ |
| 3840 x 2160 | ✅ | ✅ |
CountryCodes
CountryCodes
See the complete list at: ISO 3166-1 alpha-3.
Example: CountryCodes.BRA
.
FileFormat
FileFormat
Field | Description | Android | iOS |
---|---|---|---|
| image/png | ✅ | ✅ |
| image/jpg | ✅ | ❌ |
| image/jpeg | ✅ | ✅ |
| image/pdf | ✅ | ✅ |
| image/heif | ✅ | ❌ |
Error
Error
Field | Description | Android | iOS |
---|---|---|---|
| You are missing some mandatory permission to run the SDK. | ✅ | ✅ |
| Indicates a network-related exception occurred during verification. | ✅ | ✅ |
| Indicates a server-side exception occurred during verification. | ✅ | ✅ |
| Indicates an issue with the token used for verification. | ✅ | ✅ |
| When the SDK cannot be started due to a security reason. | ✅ | ✅ |
| When an SDK internal library cannot be started. | ✅ | ✅ |
| There is no space on the user device's internal storage. | ✅ | ✅ |
| An unxpected error has occurred. | ✅ | ✅ |
Last updated