Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 49 additions & 2 deletions src/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ models/authenticity-check-result.ts
models/authenticity-result-all-of.ts
models/authenticity-result-type.ts
models/authenticity-result.ts
models/bar-code-module-type.ts
models/barcode-type.ts
models/bc-pdf417-info.ts
models/bc-roidetect.ts
models/binary-data.ts
models/byte-array-result-all-of.ts
models/byte-array-result.ts
models/check-diagnose.ts
Expand All @@ -31,8 +34,14 @@ models/device-info.ts
models/doc-bar-code-info-all-of.ts
models/doc-bar-code-info-fields-list.ts
models/doc-bar-code-info.ts
models/doc-visual-extended-field-rect-all-of.ts
models/doc-visual-extended-field-rect.ts
models/doc-visual-extended-field-rfid-all-of.ts
models/doc-visual-extended-field-rfid.ts
models/doc-visual-extended-field.ts
models/doc-visual-extended-info.ts
models/document-binary-info-result-all-of.ts
models/document-binary-info-result.ts
models/document-format.ts
models/document-image-result-all-of.ts
models/document-image-result.ts
Expand All @@ -55,6 +64,9 @@ models/fdsidlist.ts
models/fiber-result-all-of.ts
models/fiber-result.ts
models/get-transactions-by-tag-response.ts
models/graphic-field-rect.ts
models/graphic-field-rfid-all-of.ts
models/graphic-field-rfid.ts
models/graphic-field-type.ts
models/graphic-field.ts
models/graphic-fields-list.ts
Expand Down Expand Up @@ -82,8 +94,6 @@ models/in-data-transaction-images-field-value.ts
models/in-data-video.ts
models/in-data.ts
models/index.ts
models/inline-response200.ts
models/inline-response2001.ts
models/lcid.ts
models/lexical-analysis-result-all-of.ts
models/lexical-analysis-result.ts
Expand All @@ -104,6 +114,7 @@ models/original-symbol.ts
models/out-data-transaction-images-field-value.ts
models/out-data.ts
models/parray-field.ts
models/parsing-error-codes.ts
models/parsing-notification-codes.ts
models/per-document-config.ts
models/photo-ident-result-all-of.ts
Expand All @@ -122,8 +133,38 @@ models/raw-image-container-list.ts
models/rectangle-coordinates.ts
models/result-item.ts
models/result.ts
models/rfid-access-control-info.ts
models/rfid-access-control-procedure-type.ts
models/rfid-access-key.ts
models/rfid-achip.ts
models/rfid-application-type.ts
models/rfid-application.ts
models/rfid-attribute-data.ts
models/rfid-attribute-name.ts
models/rfid-authentication-procedure-type.ts
models/rfid-baud-rate.ts
models/rfid-card-properties-ext.ts
models/rfid-certificate-ex.ts
models/rfid-certificate-origin.ts
models/rfid-certificate-type.ts
models/rfid-data-file-type.ts
models/rfid-data-file.ts
models/rfid-data-group-type-tag.ts
models/rfid-dg1.ts
models/rfid-distinguished-name.ts
models/rfid-location.ts
models/rfid-origin.ts
models/rfid-password-type.ts
models/rfid-pki-extension.ts
models/rfid-security-object.ts
models/rfid-session-data.ts
models/rfid-signer-info-ex.ts
models/rfid-terminal-type.ts
models/rfid-terminal.ts
models/rfid-type.ts
models/rfid-validity.ts
models/rfiderror-codes.ts
models/rfidpkdresource-type.ts
models/scenario.ts
models/security-feature-result-all-of.ts
models/security-feature-result.ts
Expand All @@ -136,6 +177,7 @@ models/status.ts
models/string-recognition-result.ts
models/symbol-candidate.ts
models/symbol-recognition-result.ts
models/tdoc-binary-info.ts
models/text-available-source.ts
models/text-data-result-all-of.ts
models/text-data-result.ts
Expand All @@ -150,6 +192,11 @@ models/transaction-image.ts
models/transaction-info.ts
models/transaction-process-get-response.ts
models/transaction-process-request.ts
models/transaction-process-response-all-of.ts
models/transaction-process-response.ts
models/transaction-process-result.ts
models/trf-ft-bytes.ts
models/trf-ft-string.ts
models/verification-result.ts
models/verified-field-map.ts
models/visibility.ts
4 changes: 2 additions & 2 deletions src/api/healthcheck-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Regula Document Reader Web API
* 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
* 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
*
* The version of the OpenAPI document: 7.2.0
* The version of the OpenAPI document: 7.4.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
4 changes: 2 additions & 2 deletions src/api/process-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Regula Document Reader Web API
* 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
* 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
*
* The version of the OpenAPI document: 7.2.0
* The version of the OpenAPI document: 7.4.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
20 changes: 10 additions & 10 deletions src/api/transaction-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Regula Document Reader Web API
* 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
* 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
*
* The version of the OpenAPI document: 7.2.0
* The version of the OpenAPI document: 7.4.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand All @@ -19,15 +19,15 @@ import { Configuration } from '../configuration';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { InlineResponse200 } from '../models';
// @ts-ignore
import { InlineResponse2001 } from '../models';
// @ts-ignore
import { ListTransactionsByTagResponse } from '../models';
// @ts-ignore
import { TransactionProcessGetResponse } from '../models';
// @ts-ignore
import { TransactionProcessRequest } from '../models';
// @ts-ignore
import { TransactionProcessResponse } from '../models';
// @ts-ignore
import { TransactionProcessResult } from '../models';
/**
* TransactionApi - axios parameter creator
* @export
Expand Down Expand Up @@ -394,7 +394,7 @@ export const TransactionApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiV2TransactionTransactionIdProcessPost(transactionId: string, transactionProcessRequest: TransactionProcessRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>> {
async apiV2TransactionTransactionIdProcessPost(transactionId: string, transactionProcessRequest: TransactionProcessRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TransactionProcessResult>> {
const localVarAxiosArgs = await TransactionApiAxiosParamCreator(configuration).apiV2TransactionTransactionIdProcessPost(transactionId, transactionProcessRequest, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
Expand All @@ -409,7 +409,7 @@ export const TransactionApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async apiV2TransactionTransactionIdResultsGet(transactionId: string, withImages?: boolean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse2001>> {
async apiV2TransactionTransactionIdResultsGet(transactionId: string, withImages?: boolean, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TransactionProcessResponse>> {
const localVarAxiosArgs = await TransactionApiAxiosParamCreator(configuration).apiV2TransactionTransactionIdResultsGet(transactionId, withImages, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...localVarAxiosArgs.options, url: (configuration?.basePath || basePath) + localVarAxiosArgs.url};
Expand Down Expand Up @@ -474,7 +474,7 @@ export const TransactionApiFactory = function (configuration?: Configuration, ba
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiV2TransactionTransactionIdProcessPost(transactionId: string, transactionProcessRequest: TransactionProcessRequest, options?: any): AxiosPromise<InlineResponse200> {
apiV2TransactionTransactionIdProcessPost(transactionId: string, transactionProcessRequest: TransactionProcessRequest, options?: any): AxiosPromise<TransactionProcessResult> {
return TransactionApiFp(configuration).apiV2TransactionTransactionIdProcessPost(transactionId, transactionProcessRequest, options).then((request) => request(axios, basePath));
},
/**
Expand All @@ -485,7 +485,7 @@ export const TransactionApiFactory = function (configuration?: Configuration, ba
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
apiV2TransactionTransactionIdResultsGet(transactionId: string, withImages?: boolean, options?: any): AxiosPromise<InlineResponse2001> {
apiV2TransactionTransactionIdResultsGet(transactionId: string, withImages?: boolean, options?: any): AxiosPromise<TransactionProcessResponse> {
return TransactionApiFp(configuration).apiV2TransactionTransactionIdResultsGet(transactionId, withImages, options).then((request) => request(axios, basePath));
},
};
Expand Down
4 changes: 2 additions & 2 deletions src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Regula Document Reader Web API
* 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
* 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
*
* The version of the OpenAPI document: 7.2.0
* The version of the OpenAPI document: 7.4.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
4 changes: 2 additions & 2 deletions src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/* eslint-disable */
/**
* Regula Document Reader Web API
* 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
* 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
*
* The version of the OpenAPI document: 7.2.0
* The version of the OpenAPI document: 7.4.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 2 additions & 0 deletions src/ext/authenticity/authenticity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import { SecurityFeatureChecks } from './security-feature';
export class Authenticity implements AuthenticityCheckList {
List: Array<AuthenticityCheckResult>;
page_idx: number;
Count: number;

constructor(origin: AuthenticityCheckList, page_idx: number) {
this.List = origin.List;
this.page_idx = page_idx;
this.Count = origin.Count;
}

public uvLuminescenceChecks(): SecurityFeatureChecks | undefined {
Expand Down
4 changes: 2 additions & 2 deletions src/ext/document-reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
Result,
DeviceInfo,
TransactionProcessRequest,
InlineResponse200,
TransactionProcessResult,
ListTransactionsByTagResponse,
TransactionProcessGetResponse,
} from '../models';
Expand Down Expand Up @@ -101,7 +101,7 @@ export class DocumentReaderApi {
transactionId: string,
transactionProcessRequest: TransactionProcessRequest,
options?: any,
): Promise<AxiosResponse<InlineResponse200, any>> {
): Promise<AxiosResponse<TransactionProcessResult, any>> {
return this.transactionApi.apiV2TransactionTransactionIdProcessPost(
transactionId,
transactionProcessRequest,
Expand Down
28 changes: 14 additions & 14 deletions src/ext/images-ext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ import * as converter from 'base64-arraybuffer';
export class ImagesExt implements Images {
availableSourceList: Array<ImagesAvailableSource>;
fieldList: Array<ImagesFieldWrapper>;
fieldCount: number;
availableSourceCount: number;

constructor(origin: Images) {
this.availableSourceList = origin.availableSourceList;
this.fieldList = origin.fieldList.map((field) => new ImagesFieldWrapper(field));
this.fieldCount = origin.fieldCount;
this.availableSourceCount = origin.availableSourceCount;
}

public getField(type: GraphicFieldType): ImagesFieldWrapper | undefined {
Expand All @@ -27,31 +31,27 @@ export class ImagesFieldWrapper implements ImagesField {
fieldName: string;
fieldType: GraphicFieldType;
valueList: Array<ImagesFieldValue>;
valueCount: number;

constructor(origin: ImagesField) {
this.fieldName = origin.fieldName;
this.fieldType = origin.fieldType;
this.valueList = origin.valueList;
this.valueCount = origin.valueCount;
}

public getValue(source?: Source, original = false) {
let fieldValue;
if (!source) {
// rfid -> visual -> barcode
fieldValue =
this.getValueBySource(Source.RFID) ||
this.getValueBySource(Source.VISUAL) ||
this.getValueBySource(Source.BARCODE);
} else {
fieldValue = this.getValueBySource(source);
}
const fieldValue = source
? this.getValueBySource(source)
: this.getValueBySource(Source.RFID) ||
this.getValueBySource(Source.VISUAL) ||
this.getValueBySource(Source.BARCODE);

if (!fieldValue) return;

if (original && fieldValue.originalValue) {
return base64ToBuffer(fieldValue.originalValue);
}
return base64ToBuffer(fieldValue.value);
const valueToConvert = original && fieldValue.originalValue ? fieldValue.originalValue : fieldValue.value;

return valueToConvert ? base64ToBuffer(valueToConvert) : undefined;
}

private getValueBySource(source: Source): ImagesFieldValue | undefined {
Expand Down
Loading
Loading