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;
}yHistoryEntity
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;
}Last updated