Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #16 from regulaforensics/develop
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
aliaksandr-drozd authored Feb 12, 2024
2 parents a21817e + be5e592 commit 7019566
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.0.17",
"version": "0.0.18",
"author": "Regula Forensics, Inc.",
"name": "@regulaforensics/document-reader-recipes",
"description": "Document Reader Recipes",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { RDocumentBarcode, RDocumentBarcodeField, RDocumentBarcodeModuleData } f
export const getDocumentBarcodes = (input: ProcessResponse): RDocumentBarcode[] => {
const result: RDocumentBarcode[] = []

const containers = DocBarCodeInfoContainer.fromProcessResponse(input)
const containers = DocBarCodeInfoContainer.fromProcessResponse(input, false)

containers.forEach((container) => {
if (!container.DocBarCodeInfo?.pArrayFields?.length) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const getDocumentImages = async (
): Promise<RDocumentImage[]> => {
const result: RDocumentImage[] = []

const containers = ImagesResultContainer.fromProcessResponse(input)
const containers = ImagesResultContainer.fromProcessResponse(input, false)

if (!containers.length) {
return result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export async function getGraphicField(
result.height = 1
result.src = DEFAULT_IMAGE

const containers = ImagesResultContainer.fromProcessResponse(input)
const containers = ImagesResultContainer.fromProcessResponse(input, false)

if (!containers.length) {
return allowDefaultImage ? result : undefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { RImageQuality, RImageQualityCheck } from './models'
export const getImageQuality = (input: ProcessResponse): RImageQuality[] => {
const result: RImageQuality[] = []

const containers = ImageQualityCheckListContainer.fromProcessResponse(input)
const containers = ImageQualityCheckListContainer.fromProcessResponse(input, false)
.sort(firstBy((i) => i.page_idx))

containers.forEach((container) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { eOpticalStatusField, RDetailedStatus, RDetailedStatusOptical } from './

export const getDetailedStatus = (input: ProcessResponse): RDetailedStatus => {
const result = new RDetailedStatus()
const container = StatusContainer.fromProcessResponse(input)
const container = StatusContainer.fromProcessResponse(input, false)

if (!container.length) {
result.optical = new RDetailedStatusOptical()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function getDocumentIdentification(
allowDefault: boolean = false,
defaultDocumentName: string = 'UNKNOWN'
): RDocumentIdentification | undefined {
const containers = OneCandidateContainer.fromProcessResponse(input)
const containers = OneCandidateContainer.fromProcessResponse(input, false)

for (let i = 0; i < containers.length; i++) {
const container = containers[i]
Expand Down
2 changes: 1 addition & 1 deletion src/recipes/text/name-surname/get-name-surname.recipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const SCORE_SHIFT = 3
export const getNameSurname = (input: ProcessResponse, unknownValue: string = 'UNKNOWN'): RNameSurname => {
const result: RNameSurname = new RNameSurname()

const containers = TextResultContainer.fromProcessResponse(input)
const containers = TextResultContainer.fromProcessResponse(input, false)

if (!containers.length) {
return RNameSurname.fromPlain({
Expand Down
2 changes: 1 addition & 1 deletion src/recipes/text/text-data/get-text-data.recipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { RTextData, RTextDataSource } from './models'

export const getTextData = (input: ProcessResponse): RTextData[] => {
const result: RTextData[] = []
const containers = TextResultContainer.fromProcessResponse(input)
const containers = TextResultContainer.fromProcessResponse(input, false)

if (!containers.length) {
return result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { RTextFieldValue } from './models'
export function getTextFieldValue(input: ProcessResponse, fieldType: eVisualFieldType, allowDefault?: true): RTextFieldValue;
export function getTextFieldValue(input: ProcessResponse, fieldType: eVisualFieldType, allowDefault?: false): RTextFieldValue | undefined;
export function getTextFieldValue(input: ProcessResponse, fieldType: eVisualFieldType, allowDefault: boolean = true): RTextFieldValue | undefined {
const containers = TextResultContainer.fromProcessResponse(input)
const containers = TextResultContainer.fromProcessResponse(input, false)

for (let i = 0; i < containers.length; i++) {
const container = containers[i]
Expand Down

0 comments on commit 7019566

Please sign in to comment.