Entities
BrowserDeviceEntity
export class BrowserDeviceEntity {
@ApiProperty({type: String, description: 'Browser user agent' })
userAgent: string;
@ApiProperty({ type: String, description: 'Browser type' })
browserType: string;
@ApiProperty({ type: String, description: 'Browser version' })
browserVersion: string;
@ApiProperty({ type: String, description: 'SDK version' })
sdkVersion: string;
@ApiProperty({ type: String, description: 'User ip' })
ip: string;
@ApiPropertyOptional({
type: String,
description: 'User country code ISO-3166-1',
})
country?: string;
@ApiPropertyOptional({
type: String,
description: 'User country region ISO 3166-2',
})
region?: string;
@ApiPropertyOptional({ type: String, description: 'Europe union flag' })
eu?: string;
@ApiPropertyOptional({
type: String,
description: 'User timezone from IANA Time Zone Database',
})
timezone?: string;
@ApiPropertyOptional({ type: String, description: 'User city' })
city?: string;
@ApiPropertyOptional({ type: Number, description: 'User city metro code' })
metro?: number;
@ApiPropertyOptional({
type: [Number],
description: 'The latitude and longitude of the city',
})
ll?: number[];
@ApiPropertyOptional({
type: Number,
description:
'The approximate accuracy radius (km), around the latitude and longitude',
})
area?: number;
}
VerificationStartedEntity
export class VerificationStartedEntity {
@ApiProperty({
type: String,
description: 'Allpass transactionId (UUIDv4)',
})
transactionId: string;
@ApiProperty({
type: String,
description: 'Session identifier in your system',
})
clientSession: string;
@ApiProperty({
type: String,
description: 'Your own Allpass client key',
})
clientKey: string;
@ApiProperty({
type: String,
description: 'Your own Allpass application key (API key)',
})
appKey: string;
@ApiProperty({
type: () => BrowserDeviceEntity,
description: 'User device information, ip, geo-position',
})
device: BrowserDeviceEntity;
@ApiProperty({
enum: WebhookEventsEnum,
description: 'Webhook event type',
})
type: WebhookEventsEnum = WebhookEventsEnum.VerificationStarted;
}
VerificationStepPassedEntity
export class VerificationStepPassedEntity {
@ApiProperty({
type: String,
description: 'Allpass transactionId (UUIDv4)',
})
transactionId: string;
@ApiProperty({
type: String,
description: 'Session identifier in your system',
})
clientSession: string;
@ApiProperty({
type: String,
description: 'Your own Allpass client key',
})
clientKey: string;
@ApiProperty({
type: String,
description: 'Your own Allpass application key (API key)',
})
appKey: string;
@ApiProperty({ enum: VerificationStepEnum, description: 'Passed step' })
passedStep: VerificationStepEnum;
@ApiPropertyOptional({
enum: VerificationSubstepEnum,
description: 'Passed substep',
})
passedSubstep?: VerificationSubstepEnum;
@ApiPropertyOptional({
enum: VerificationStepEnum,
description: 'Next step'
})
nextStep?: VerificationStepEnum;
@ApiPropertyOptional({
enum: VerificationSubstepEnum,
description: 'Next substep',
})
nextSubstep?: VerificationSubstepEnum;
}
VerificationCompleteEntity
export class VerificationCompleteEntity {
@ApiProperty({
type: String,
description: 'Verification transaction ID',
})
transactionId: string;
@ApiProperty({ type: String, description: 'Client key' })
clientKey: string;
@ApiProperty({ type: String, description: 'Application key' })
appKey: string;
@ApiProperty({
enum: VerificationStatusEnum,
description: 'Verification status',
})
status: VerificationStatusEnum;
@ApiProperty({ enum: PlatformEnum, description: 'Customer platform' })
platform: PlatformEnum;
@ApiProperty({
type: [HistoryEntity],
isArray: true,
description: 'Verification history data',
})
histories: HistoryEntity[];
@ApiPropertyOptional({
type: [VerificationServiceInfoEntity],
isArray: true,
description: 'Verification services',
})
servicesData?: VerificationServiceInfoEntity[];
@ApiPropertyOptional({
description: 'Device data',
oneOf: [
{ $ref: getSchemaPath(BrowserDeviceEntity) },
{ $ref: getSchemaPath(AndroidDeviceEntity) },
{ $ref: getSchemaPath(IosDeviceEntity) },
],
})
device?: BrowserDeviceEntity | AndroidDeviceEntity | IosDeviceEntity;
@ApiPropertyOptional({
type: WebhookDeliveryStateEntity,
description: 'Verification webhook delivery state',
})
webhookDeliveryState?: WebhookDeliveryStateEntity;
@ApiPropertyOptional({ type: String, description: 'Client session' })
clientSession?: string;
@ApiPropertyOptional({ type: String, description: 'Sdk Version' })
sdkVersion?: string;
@ApiPropertyOptional({
enum: ServiceEnum,
isArray: true,
description: 'Verification success services',
})
services?: ServiceEnum[];
@ApiPropertyOptional({
enum: ServiceEnum,
description: 'Verification failed service',
})
failedService?: ServiceEnum;
@ApiPropertyOptional({
type: String,
description: 'Verification error message',
})
error?: string;
@ApiProperty({
type: Boolean,
description: 'Verification cloud flag (for web always == true)',
})
isCloud: boolean;
@ApiPropertyOptional({
type: [String],
description: 'Verification service hashes (only for mobile platforms)',
})
hashes?: string[];
@ApiProperty({ type: Date, description: 'Verification created time' })
createdAt: Date;
@ApiProperty({ type: Date, description: 'Verification confirmation time' })
updatedAt: Date;
}y
HistoryEntity
export class HistoryEntity {
@ApiProperty({ enum: HistoryEventEnum, description: 'Event type' })
event: HistoryEventEnum;
@ApiProperty({ type: String, description: 'Event description' })
description: string;
@ApiProperty({ type: Date, description: 'Event time' })
createdAt: Date;
@ApiPropertyOptional({ type: UserEntity, description: 'User' })
user?: UserEntity;
@ApiPropertyOptional({ type: Number, description: 'User id' })
userId?: number;
}
UserEntity
export class UserEntity {
@ApiProperty({
name: 'id',
type: Number,
description: 'User id',
})
id: number;
@ApiProperty({
type: String,
description: "User's full name",
example: 'Viktor Plotnikov',
})
fullName: string;
@ApiProperty({ type: String, description: "User's position", example: 'CTO' })
position: string;
}
WebhookDeliveryStateEntity
export class WebhookDeliveryStateEntity {
@ApiProperty({ type: Number, description: 'Webhook Id' })
webhookId: number;
@ApiProperty({ enum: DeliveryStatusEnum, description: 'Webhook status' })
status: DeliveryStatusEnum;
@ApiProperty({ enum: WebhookEventsEnum, description: 'Webhook event type' })
eventType: WebhookEventsEnum;
@ApiPropertyOptional({ type: String, description: 'Webhook error message' })
errorMessage?: string;
}
VerificationServiceInfoEntity
export class VerificationServiceInfoEntity {
@ApiProperty({ enum: ServiceEnum, description: 'Service type' })
service: ServiceEnum;
@ApiProperty({
description: 'Service data',
isArray: true,
oneOf: [
{ $ref: getSchemaPath(DocumentInfoEntity) },
{ $ref: getSchemaPath(LivenessInfoEntity) },
{ $ref: getSchemaPath(FacematchInfoEntity) },
{ $ref: getSchemaPath(OtpEntity) },
{ $ref: getSchemaPath(InnEntity) },
{ $ref: getSchemaPath(ImageEntity) },
{ $ref: getSchemaPath(PassiveLivenessInfoEntity) },
{ $ref: getSchemaPath(PassiveFacematchInfoEntity) },
],
})
data: VerificationServiceInfoDataType;
}
LivenessInfoEntity
export class LivenessInfoEntity {
@ApiPropertyOptional({
enum: LivenessStatusEnum,
description: 'Liveness detection status',
})
liveness?: LivenessStatusEnum;
@ApiPropertyOptional({
type: String,
description: 'Liveness detection error message',
})
livenessError?: string;
@ApiPropertyOptional({
type: String,
description: 'Liveness detection video file name',
})
guid?: string;
@ApiProperty({ type: Date, description: 'Liveness created date' })
createdAt: Date;
}
FacematchInfoEntity
export class FacematchInfoEntity {
@ApiPropertyOptional({
type: Boolean,
description: 'Face match result status',
})
facematchResult?: boolean;
@ApiPropertyOptional({
type: Number,
description: 'Face match similarity number',
})
similarity?: number;
@ApiPropertyOptional({
type: String,
description: 'Face match error message',
})
facematchError?: string;
@ApiPropertyOptional({
type: [String],
isArray: true,
description: 'System names of saved images',
})
images?: string[];
@ApiProperty({ type: Date, description: 'Face match created date' })
createdAt: Date;
}
OtpEntity
export class OtpEntity {
@ApiProperty({ type: Number, description: 'Otp ID' })
id: number;
@ApiPropertyOptional({ type: String, description: 'Otp email' })
email?: string;
@ApiPropertyOptional({ type: String, description: 'Otp phone' })
phone?: string;
@ApiPropertyOptional({ type: Boolean, description: 'Checked email status' })
checkedEmail?: boolean;
@ApiPropertyOptional({ type: String, description: 'Checked phone status' })
checkedPhone?: boolean;
@ApiProperty({ type: Date, description: 'Otp step created date' })
createdAt: Date;
@ApiProperty({ type: Date, description: 'Otp step updated date' })
updatedAt: Date;
}
InnEntity
export class InnEntity {
@ApiProperty({ type: String, description: 'Inn ID' })
id: number;
@ApiProperty({ type: String, description: 'Inn number' })
number: string;
@ApiProperty({ type: String, description: 'Inn image url' })
image: string;
@ApiProperty({ type: Date, description: 'Inn create date' })
createdAt: Date;
}
ImageEntity
export class ImageEntity {
@ApiProperty({ type: Number, description: 'Image ID' })
id: number;
@ApiProperty({ enum: ImageStepTypeEnum, description: 'Image type' })
type: ImageStepTypeEnum;
@ApiProperty({ type: String, description: 'Image url' })
image: string;
@ApiProperty({ type: Date, description: 'Image created date' })
createdAt: Date;
}
PassiveLivenessInfoEntity
export class PassiveLivenessInfoEntity {
@ApiPropertyOptional({
enum: LivenessStatusEnum,
description: 'Passive liveness detection status',
})
liveness?: LivenessStatusEnum;
@ApiPropertyOptional({
type: [SourceMediaEntity],
isArray: true,
description: 'Passive liveness error message',
})
sources?: SourceMediaEntity[];
@ApiPropertyOptional({
type: String,
description: 'Passive liveness detection error message',
})
livenessError?: string;
@ApiProperty({
type: Date,
description: 'Passive liveness step created date',
})
createdAt: Date;
}
SourceMediaEntity
export class SourceMediaEntity {
@ApiProperty({ type: String, description: 'Media resource id' })
mediaId: string;
@ApiProperty({ enum: MediaTypeEnum, description: 'Media resource type' })
resourceType: MediaTypeEnum;
}
PassiveFacematchInfoEntity
export class PassiveFacematchInfoEntity {
@ApiPropertyOptional({
type: Boolean,
description: 'Passive face match result status',
})
facematchResult?: boolean;
@ApiPropertyOptional({
type: Number,
description: 'Passive face match similarity number',
})
similarity?: number;
@ApiPropertyOptional({
type: [SourceMediaEntity],
description: 'Face match error message',
})
sources?: SourceMediaEntity[];
@ApiPropertyOptional({
type: String,
description: 'Passive face match error message',
})
facematchError?: string;
@ApiProperty({
type: Date,
description: 'Passive face match step created date',
})
createdAt: Date;
}
DocumentInfoEntity
export class DocumentInfoEntity {
@ApiProperty({ type: Number, description: 'Document ID' })
id: number;
@ApiProperty({
enum: DocumentStepTypeEnum,
description: 'Document step type',
})
stepType: DocumentStepTypeEnum;
@ApiProperty({ enum: CheckResultEnum, description: 'Document status' })
overallResult: CheckResultEnum;
@ApiProperty({ type: Number, description: 'Document processing time in ms' })
elapsedTime: number;
@ApiProperty({
type: Number,
description: 'Document rfid processing time in ms',
required: false,
})
elapsedTimeRFID: number;
@ApiProperty({
type: Number,
description: 'Document more pages availability',
})
morePagesAvailable: number;
@ApiProperty({
type: [DocumentTypeEntity],
isArray: true,
description: 'Document types data',
})
types: DocumentTypeEntity[];
@ApiProperty({
type: [DocumentGraphicInfoEntity],
isArray: true,
description: 'Document graphics data',
})
graphics: DocumentGraphicInfoEntity[];
@ApiProperty({
type: [DocumentFieldInfoEntity],
isArray: true,
description: 'Document fields data',
})
fields: DocumentFieldInfoEntity[];
@ApiProperty({ type: Date, description: 'Document create date' })
createdAt: Date;
}
DocumentTypeEntity
export class DocumentTypeEntity {
@ApiProperty({ type: Number, description: 'Document type ID' })
id: number;
@Exclude()
@ApiProperty({ type: Number, description: 'Document ID' })
docId: number;
@ApiProperty({ type: String, description: 'Document type name' })
name: string;
@ApiProperty({ type: Number, description: 'Document page index' })
pageIndex: number;
@ApiProperty({ type: Boolean, description: 'Document MRZ availability' })
hasMRZ: boolean;
@ApiProperty({ type: String, description: 'Document ICAO' })
icao: string;
@ApiProperty({ enum: Number, description: 'Document type' })
type: number;
@ApiProperty({ type: String, description: 'Document year' })
year: string;
@ApiProperty({ enum: DocFormatEnum, description: 'Document format' })
format: DocFormatEnum;
@ApiProperty({ type: Date, description: 'Document create date' })
createdAt: Date;
}
DocumentGraphicInfoEntity
export class DocumentGraphicInfoEntity {
@ApiProperty({
enum: GraphicFieldTypeEnum,
description: 'Document graphic type',
})
fieldType: GraphicFieldTypeEnum;
@ApiProperty({
type: [DocumentGraphicEntity],
isArray: true,
description: 'Document graphic data',
})
data: DocumentGraphicEntity[];
}
DocumentGraphicEntity
export class DocumentGraphicEntity {
@ApiProperty({ type: Number, description: 'Document graphic ID' })
id: number;
@ApiProperty({
enum: GraphicFieldTypeEnum,
description: 'Document graphic type',
})
fieldType: GraphicFieldTypeEnum;
@ApiProperty({
enum: ResultTypeEnum,
description: 'Document graphic sourceType',
})
sourceType: ResultTypeEnum;
@ApiProperty({ type: Number, description: 'Document page index' })
pageIndex: number;
@ApiProperty({ type: String, description: 'Document graphic url' })
image: string;
@ApiProperty({ type: Date, description: 'Document graphic create date' })
createdAt: Date;
}y
DocumentFieldInfoEntity
export class DocumentFieldInfoEntity {
@ApiProperty({
enum: VisualFieldTypeEnum,
description: 'Document field type',
})
fieldType: VisualFieldTypeEnum;
@ApiProperty({
type: [DocumentFieldEntity],
isArray: true,
description: 'Document field data',
})
data: DocumentFieldEntity[];
}
DocumentFieldEntity
export class DocumentFieldEntity {
@ApiProperty({ type: Number, description: 'Document field ID' })
id: number;
@ApiProperty({ enum: LcidEnum, description: 'Document field LCID' })
lcid: LcidEnum;
@ApiProperty({ enum: CheckResultEnum, description: 'Document field status' })
status: CheckResultEnum;
@ApiProperty({ type: Number, description: 'Document page index' })
pageIndex: number;
@ApiProperty({
type: Number,
description: 'Document field value recognition probability',
})
probability: number;
@ApiProperty({
enum: FieldVerificationResultEnum,
description: 'Document field value validity enum',
})
validity: FieldVerificationResultEnum;
@ApiProperty({ type: String, description: 'Document field obtained value' })
value: string;
@ApiProperty({
enum: ResultTypeEnum,
description: 'Document field value sourceType enum',
})
sourceType: ResultTypeEnum;
@ApiProperty({ type: Object, description: 'Document field value comparison' })
comparison: DocFieldValueComparisonType;
}
export type DocFieldValueComparisonType = {
[s: string]: number;
};
Last updated