This repository has been archived by the owner on Oct 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from regulaforensics/develop
Authenticity
- Loading branch information
Showing
10 changed files
with
211 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
...ildren/authenticity-barcode-check-list-item/authenticity-barcode-check-list-item.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { IsDefined, IsEnum } from 'class-validator' | ||
|
||
import { eCheckDiagnose, eCheckResult, eSecurityFeatureType } from '@regulaforensics/document-reader-typings' | ||
import { plainToClass } from 'class-transformer' | ||
|
||
|
||
/** | ||
* Authenticity Barcode check list item | ||
*/ | ||
export interface iRAuthenticityBarcodeCheckListItem { | ||
/** | ||
* Feature type | ||
* @type {string} | ||
*/ | ||
feature: eSecurityFeatureType | ||
|
||
/** | ||
* Element with which errors are checked | ||
* @type {eCheckDiagnose} | ||
*/ | ||
diagnose: eCheckDiagnose | ||
|
||
/** | ||
* Overall checking result | ||
* @type {eCheckResult} | ||
*/ | ||
checkResult: eCheckResult | ||
} | ||
|
||
/** | ||
* Authenticity Barcode check list item | ||
*/ | ||
export class RAuthenticityBarcodeCheckListItem implements iRAuthenticityBarcodeCheckListItem { | ||
/** | ||
* Feature type | ||
* @type {string} | ||
*/ | ||
@IsDefined() | ||
@IsEnum(eSecurityFeatureType) | ||
feature: eSecurityFeatureType | ||
|
||
/** | ||
* Element with which errors are checked | ||
* @type {eCheckDiagnose} | ||
*/ | ||
@IsDefined() | ||
@IsEnum(eCheckDiagnose) | ||
diagnose: eCheckDiagnose | ||
|
||
/** | ||
* Overall checking result | ||
* @type {eCheckResult} | ||
*/ | ||
@IsDefined() | ||
@IsEnum(eCheckResult) | ||
checkResult: eCheckResult | ||
|
||
/** | ||
* Create instance of RAuthenticityBarcodeCheckListItem from plain object | ||
* @param {iRAuthenticityBarcodeCheckListItem} input - plain object | ||
* @returns {RAuthenticityBarcodeCheckListItem} | ||
*/ | ||
static fromPlain = (input: iRAuthenticityBarcodeCheckListItem): RAuthenticityBarcodeCheckListItem => | ||
plainToClass(RAuthenticityBarcodeCheckListItem, input) | ||
} |
1 change: 1 addition & 0 deletions
1
...odels/authenticity-check-list-item/children/authenticity-barcode-check-list-item/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './authenticity-barcode-check-list-item.model' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
...-item/children/authenticity-ipi-check-list-item/authenticity-ipi-check-list-item.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { IsDefined, IsEnum, IsString } from 'class-validator' | ||
|
||
import { eCheckDiagnose, eCheckResult } from '@regulaforensics/document-reader-typings' | ||
import { plainToClass } from 'class-transformer' | ||
|
||
|
||
/** | ||
* Authenticity IPI check list item | ||
*/ | ||
export interface iRAuthenticityIpiCheckListItem { | ||
/** | ||
* Located image fragment | ||
* @type {string} | ||
*/ | ||
image: string | ||
|
||
/** | ||
* Element with which errors are checked | ||
* @type {eCheckDiagnose} | ||
*/ | ||
diagnose: eCheckDiagnose | ||
|
||
/** | ||
* Overall checking result | ||
* @type {eCheckResult} | ||
*/ | ||
checkResult: eCheckResult | ||
} | ||
|
||
/** | ||
* Authenticity IPI check list item | ||
*/ | ||
export class RAuthenticityIpiCheckListItem implements iRAuthenticityIpiCheckListItem { | ||
/** | ||
* Located image fragment | ||
* @type {string} | ||
*/ | ||
@IsDefined() | ||
@IsString() | ||
image: string | ||
|
||
/** | ||
* Element with which errors are checked | ||
* @type {eCheckDiagnose} | ||
*/ | ||
@IsDefined() | ||
@IsEnum(eCheckDiagnose) | ||
diagnose: eCheckDiagnose | ||
|
||
/** | ||
* Overall checking result | ||
* @type {eCheckResult} | ||
*/ | ||
@IsDefined() | ||
@IsEnum(eCheckResult) | ||
checkResult: eCheckResult | ||
|
||
/** | ||
* Create instance of RAuthenticityIpiCheckListItem from plain object | ||
* @param {iRAuthenticityIpiCheckListItem} input - plain object | ||
* @returns {RAuthenticityIpiCheckListItem} | ||
*/ | ||
static fromPlain = (input: iRAuthenticityIpiCheckListItem): RAuthenticityIpiCheckListItem => | ||
plainToClass(RAuthenticityIpiCheckListItem, input) | ||
} |
1 change: 1 addition & 0 deletions
1
...st/models/authenticity-check-list-item/children/authenticity-ipi-check-list-item/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './authenticity-ipi-check-list-item.model' |
2 changes: 2 additions & 0 deletions
2
...nticity/get-authenticity-check-list/models/authenticity-check-list-item/children/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export * from './authenticity-barcode-check-list-item' | ||
export * from './authenticity-image-check-list-item' | ||
export * from './authenticity-ipi-check-list-item' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters