Skip to content

Commit 198eb2a

Browse files
Merge pull request #188 from regulaforensics/feature/sp-19783
SP-19783 - add TransactionInfo to the top level
2 parents fa41fc4 + 4437ef1 commit 198eb2a

File tree

7 files changed

+100
-6
lines changed

7 files changed

+100
-6
lines changed

src/.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ models/document-types-candidates-list.ts
4646
models/document-types-candidates-result-all-of.ts
4747
models/document-types-candidates-result.ts
4848
models/document-types-candidates.ts
49+
models/documents-database.ts
4950
models/encrypted-rclresult-all-of.ts
5051
models/encrypted-rclresult.ts
5152
models/face-api-search.ts

src/ext/process-response.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,27 @@ export class Response {
3030
status?: Status;
3131
text?: TextExt;
3232
images?: ImagesExt;
33+
TransactionInfo: TransactionInfo;
3334

3435
lowLvlResponse: LowLvlResponse;
3536
rawResponse: ProcessResponse | InlineResponse2001;
3637

3738
constructor(original: ProcessResponse | InlineResponse2001) {
3839
const lowLvlResponse = new LowLvlResponse(original);
40+
const statusResult = lowLvlResponse.statusResult()?.Status;
41+
const textResult = lowLvlResponse.textResult();
42+
const imagesResult = lowLvlResponse.imagesResult();
43+
3944
this.lowLvlResponse = lowLvlResponse;
4045
this.rawResponse = original;
46+
this.TransactionInfo = original.TransactionInfo || {};
4147

42-
this.status = lowLvlResponse.statusResult()?.Status;
43-
const textResult = lowLvlResponse.textResult();
48+
if (statusResult) {
49+
this.status = statusResult;
50+
}
4451
if (textResult) {
4552
this.text = new TextExt(textResult.Text);
4653
}
47-
const imagesResult = lowLvlResponse.imagesResult();
4854
if (imagesResult) {
4955
this.images = new ImagesExt(imagesResult.Images);
5056
}

src/models/documents-database.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* Regula Document Reader Web API
5+
* Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core
6+
*
7+
* The version of the OpenAPI document: 7.2.0
8+
*
9+
*
10+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11+
* https://openapi-generator.tech
12+
* Do not edit the class manually.
13+
*/
14+
15+
16+
17+
/**
18+
* Document database information
19+
* @export
20+
* @interface DocumentsDatabase
21+
*/
22+
export interface DocumentsDatabase {
23+
/**
24+
* Document database description
25+
* @type {string}
26+
* @memberof DocumentsDatabase
27+
*/
28+
Description?: string;
29+
/**
30+
* Date the document database was created
31+
* @type {string}
32+
* @memberof DocumentsDatabase
33+
*/
34+
ExportDate?: string;
35+
/**
36+
* Document database identifier
37+
* @type {string}
38+
* @memberof DocumentsDatabase
39+
*/
40+
ID?: string;
41+
/**
42+
* Document database version
43+
* @type {string}
44+
* @memberof DocumentsDatabase
45+
*/
46+
Version?: string;
47+
}
48+
49+

src/models/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export * from './document-types-candidates';
4141
export * from './document-types-candidates-list';
4242
export * from './document-types-candidates-result';
4343
export * from './document-types-candidates-result-all-of';
44+
export * from './documents-database';
4445
export * from './encrypted-rclresult';
4546
export * from './encrypted-rclresult-all-of';
4647
export * from './fdsidlist';

src/models/process-params.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,12 @@ export interface ProcessParams {
380380
* @memberof ProcessParams
381381
*/
382382
strictBarcodeDigitalSignatureCheck?: boolean;
383+
/**
384+
* Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc.
385+
* @type {boolean}
386+
* @memberof ProcessParams
387+
*/
388+
selectLongestNames?: boolean;
383389
}
384390

385391

src/models/transaction-info.ts

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*/
1414

1515

16+
import { DocumentsDatabase } from './documents-database';
1617

1718
/**
1819
*
@@ -21,29 +22,53 @@
2122
*/
2223
export interface TransactionInfo {
2324
/**
24-
*
25+
* Computer name
2526
* @type {string}
2627
* @memberof TransactionInfo
2728
*/
2829
ComputerName?: string;
2930
/**
30-
*
31+
* Date and time
3132
* @type {string}
3233
* @memberof TransactionInfo
3334
*/
3435
DateTime?: string;
3536
/**
3637
*
38+
* @type {DocumentsDatabase}
39+
* @memberof TransactionInfo
40+
*/
41+
DocumentsDatabase?: DocumentsDatabase;
42+
/**
43+
* System information
44+
* @type {string}
45+
* @memberof TransactionInfo
46+
*/
47+
SystemInfo?: string;
48+
/**
49+
* Transaction tag
50+
* @type {string}
51+
* @memberof TransactionInfo
52+
*/
53+
Tag?: string;
54+
/**
55+
* Transaction identifier
3756
* @type {string}
3857
* @memberof TransactionInfo
3958
*/
4059
TransactionID?: string;
4160
/**
42-
*
61+
* User name
4362
* @type {string}
4463
* @memberof TransactionInfo
4564
*/
4665
UserName?: string;
66+
/**
67+
* SDK version
68+
* @type {string}
69+
* @memberof TransactionInfo
70+
*/
71+
Version?: string;
4772
}
4873

4974

src/models/transaction-process-request.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ export interface TransactionProcessRequest {
6666
* @memberof TransactionProcessRequest
6767
*/
6868
passBackObject?: { [key: string]: object; };
69+
/**
70+
* Digital Travel Credential (DTC-VC) data in base64 format for processing
71+
* @type {string}
72+
* @memberof TransactionProcessRequest
73+
*/
74+
dtc?: string;
6975
}
7076

7177

0 commit comments

Comments
 (0)