Skip to content

Commit 6ca0136

Browse files
Merge pull request #216 from regulaforensics/develop
Develop -> Stable
2 parents 44bec7a + a141c35 commit 6ca0136

File tree

12 files changed

+52
-8
lines changed

12 files changed

+52
-8
lines changed

examples/auth/client/encrypted-rcl-example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const { DOCUMENT_NUMBER } = TextFieldType;
2222

2323
api.setLicense(license);
2424

25-
const serverInfo = await api.ping();
25+
const serverInfo = await api.health();
2626

2727
const license_file = fs.readFileSync('license.txt', 'utf8');
2828
const encrypted_rcl = fs.readFileSync('encrypted-rcl.txt', 'utf8');

examples/auth/client/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const api = new DocumentReaderApi({
5555
// Uncomment the line below if you want to transfer the license with each request
5656
// api.setLicense(license);
5757

58-
const serverInfo = await api.ping();
58+
const serverInfo = await api.health();
5959

6060
const white_page_0 = fs.readFileSync('WHITE.jpg').buffer;
6161

examples/basic/encrypted-rcl-example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const { DOCUMENT_NUMBER } = TextFieldType;
2222

2323
api.setLicense(license);
2424

25-
const serverInfo = await api.ping();
25+
const serverInfo = await api.health();
2626

2727
const license_file = fs.readFileSync('license.txt', 'utf8');
2828
const encrypted_rcl = fs.readFileSync('encrypted-rcl.txt', 'utf8');

examples/basic/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const api = new DocumentReaderApi({ basePath: apiBasePath });
1919
// Uncomment the line below if you want to transfer the license with each request
2020
// api.setLicense(license);
2121

22-
const serverInfo = await api.ping();
22+
const serverInfo = await api.health();
2323

2424
const white_page_0 = fs.readFileSync('WHITE.jpg').buffer;
2525

src/ext/document-reader.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { DefaultApi } from '../api/default-api';
22
import { ProcessApi } from '../api/process-api';
3+
import { HealthcheckApi } from '../api/healthcheck-api';
34
import { TransactionApi } from '../api/transaction-api';
45
import { Response } from './process-response';
56
import { Configuration, ConfigurationParameters } from '../configuration';
@@ -16,13 +17,15 @@ import {
1617
InlineResponse200,
1718
ListTransactionsByTagResponse,
1819
TransactionProcessGetResponse,
20+
Healthcheck,
1921
} from '../models';
2022
import { Base64String, instanceOfProcessRequest, ProcessRequestExt } from './process-request-ext';
2123
import { ProcessRequestImageWrapper } from './process-request-image-wrapper';
2224
import * as converter from 'base64-arraybuffer';
2325

2426
export class DocumentReaderApi {
2527
private readonly defaultApi: DefaultApi;
28+
private readonly healthcheckApi: HealthcheckApi;
2629
private readonly processApi: ProcessApi;
2730
private readonly transactionApi: TransactionApi;
2831

@@ -34,6 +37,7 @@ export class DocumentReaderApi {
3437
axios: AxiosInstance = globalAxios,
3538
) {
3639
this.defaultApi = new DefaultApi(new Configuration(configuration), basePath, axios);
40+
this.healthcheckApi = new HealthcheckApi(new Configuration(configuration), basePath, axios);
3741
this.processApi = new ProcessApi(new Configuration(configuration), basePath, axios);
3842
this.transactionApi = new TransactionApi(new Configuration(configuration), basePath, axios);
3943
}
@@ -43,6 +47,11 @@ export class DocumentReaderApi {
4347
return axiosResult.data;
4448
}
4549

50+
async health(xRequestID?: string): Promise<Healthcheck> {
51+
const axiosResult = await this.healthcheckApi.healthz(xRequestID);
52+
return axiosResult.data;
53+
}
54+
4655
/**
4756
*
4857
* @summary Process list of documents images and return extracted data

src/models/auth-params.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ export interface AuthParams {
111111
* @memberof AuthParams
112112
*/
113113
checkLetterScreen?: boolean;
114+
/**
115+
* This parameter is used to enable Security text check
116+
* @type {boolean}
117+
* @memberof AuthParams
118+
*/
119+
checkSecurityText?: boolean;
114120
}
115121

116122

src/models/check-diagnose.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ export enum CheckDiagnose {
134134
OCR_QUALITY_INVALID_FONT = 221,
135135
OCR_QUALITY_INVALID_BACKGROUND = 222,
136136
LASINK_INVALID_LINES_FREQUENCY = 230,
137+
DOC_LIVENESS_DOCUMENT_NOT_LIVE = 238,
137138
DOC_LIVENESS_BLACK_AND_WHITE_COPY_DETECTED = 239,
138139
DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED = 240,
139140
DOC_LIVENESS_INVALID_BARCODE_BACKGROUND = 241,

src/models/face-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export interface FaceApi {
7070
*/
7171
proxy_type?: number;
7272
/**
73-
* Minimum age of a child, at which portrait comparison result will be effective. Default: 13.
73+
* The age threshold for the portrait comparison. Default: 13.
7474
* @type {number}
7575
* @memberof FaceApi
7676
*/

src/models/image-quality-check-type.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ export enum ImageQualityCheckType {
5151
/**
5252
* Signals if the document image is bright enough
5353
*/
54-
Brightness = 9
54+
Brightness = 9,
55+
/**
56+
* Signals if the document image has occlusion
57+
*/
58+
Occlusion = 10
5559
}
5660

5761

src/models/input-image-quality-checks.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ export enum InputImageQualityChecks {
5151
/**
5252
* Signals if the document image is bright enough
5353
*/
54-
Brightness = 'brightnessCheck'
54+
Brightness = 'brightnessCheck',
55+
/**
56+
* Signals if the document image has occlusion
57+
*/
58+
Occlusion = 'occlusionCheck'
5559
}
5660

5761

0 commit comments

Comments
 (0)