@jumio/websdk
Version:
Jumio WebSDK is a powerful, flexible software development kit that simplifies the integration of Jumio's services into your web applications.
1,643 lines (1,582 loc) • 281 kB
TypeScript
import { ActionFunction } from 'xstate';
import { Actor } from 'xstate';
import { AnyEventObject } from 'xstate';
import { BehaviorSubject } from 'rxjs';
import { Container } from 'inversify';
import type { createStore } from '@ngneat/elf';
import { CSSResult } from 'lit';
import { EntitiesRef } from '@ngneat/elf-entities';
import { EventObject } from 'xstate';
import { getEntityType } from '@ngneat/elf-entities';
import { HTMLTemplateResult } from 'lit';
import { interfaces } from 'inversify';
import { LitElement } from 'lit';
import { MachineContext } from 'xstate';
import { MetaObject } from 'xstate';
import { NonReducibleUnknown } from 'xstate';
import { nothing } from 'lit';
import { nothing as nothing_2 } from 'lit-html';
import { Observable } from 'rxjs';
import { PropertyValues } from 'lit';
import type { PropsFactory } from '@ngneat/elf';
import { QRCodeRenderersOptions } from 'qrcode';
import { QRCodeSegment } from 'qrcode';
import { ReactiveController } from 'lit';
import type { ReactiveControllerHost } from 'lit';
import { ReactiveElement } from 'lit';
import { Ref } from 'lit/directives/ref.js';
import { Ref as Ref_2 } from 'lit-html/directives/ref.js';
import type { RumInitConfiguration } from '@datadog/browser-rum';
import { StateMachine } from 'xstate';
import { Subject } from 'rxjs';
import { SVGTemplateResult } from 'lit';
import { TemplateResult } from 'lit-html';
import { TemplateResult as TemplateResult_2 } from 'lit';
import { UnaryFunction } from 'rxjs';
import { url } from '*?url';
export declare interface AcceptableConsentItem {
id: string;
item: ConsentItem;
given: boolean;
timestamp?: number;
}
export declare enum AcquisitionStatus {
Failed = "FAILED",
NotStarted = "NOT_STARTED",
Pending = "PENDING",
Retry = "RETRY",
Success = "SUCCESS"
}
export declare interface AcquisitionStatusResponse {
status: AcquisitionStatus;
error?: FetchError;
}
declare namespace actionEvents {
export {
createSwitchCameraEvent,
switchCamera,
CameraCaptureIdAutocaptureStateLogEvent,
createCameraCaptureEvent,
cameraCapture,
createSelectedCountryEvent,
selectedCountry,
createSelectedDocumentEvent,
selectedDocument,
createSelectedDocumentVariantEvent,
selectedDocumentVariant,
createClickedStartButtonEvent,
clickedStartButton,
createClickedRetryButtonEvent,
clickedRetryButton,
createClickedCrossDeviceButtonEvent,
clickedCrossDeviceButton,
createClickedSendEmailButtonEvent,
clickedSendEmailButton,
createEmailSentError,
emailSentError,
createClickedUploadButtonEvent,
clickedUploadButton,
createUploadedFileEvent,
uploadedFile
}
}
export declare enum ActiveScreen {
Workflow = "workflow",
CrossDevice = "cross-device"
}
export declare enum ActiveScreenActions {
NavigateToWorkflow = "active-screen-navigate-to-workflow",
NavigateToCrossDevice = "active-screen-navigate-to-cross-device"
}
export declare type ActiveTrackState = Pick<MediaStreamTrack, 'contentHint' | 'enabled' | 'id' | 'kind' | 'label' | 'muted' | 'readyState'> & {
capabilities: MediaTrackCapabilities;
constraints: MediaTrackConstraints;
settings: MediaTrackSettings;
};
export declare interface Address {
addressLine?: string;
city?: string;
postcode?: string;
subdivision?: string;
}
export declare const aleKeyNotValid: ErrorCase;
export declare type AlternativeTexts = Partial<Record<Locale, string>>;
export declare class AnalyticEvent<T extends AnalyticEventBody = AnalyticEventBody> extends CustomEvent<T> {
constructor(detail: T);
}
export declare type AnalyticEventBody<ET extends EventType = EventType, EN extends string = string, M extends EventMetadata = EventMetadata> = EventBodyBase<ET, EN, M>;
export declare const analytics: {
createAttributesChanged: EventCreator<"trace", "custom element attributes changed", {
attributes: Partial<Record<"token" | "sessionUrl" | "dc" | "locale" | "baseUrl", string>>;
}>;
attributesChanged: EventDispatcher< {
attributes: Partial<Record<"token" | "sessionUrl" | "dc" | "locale" | "baseUrl", string>>;
}>;
createWorkflowRestarted: EventCreator<"trace", "workflow restarted", EventMetadata>;
workflowRestarted: EventDispatcher<EventMetadata>;
createVideoPlayThrowsEvent: EventCreator<"trace", "video thrown an error", {
name: string;
message: string;
stack?: string;
state: unknown;
}>;
videoPlayThrows: EventDispatcher< {
name: string;
message: string;
stack?: string;
state: unknown;
}>;
createCameraAccessGrantedEvent: EventCreator<"trace", "camera access granted", {
devices: {
readonly label?: string | undefined;
readonly kind?: MediaDeviceKind | undefined;
}[];
permissionState: PermissionState;
}>;
cameraAccessGranted: EventDispatcher< {
devices: {
readonly label?: string | undefined;
readonly kind?: MediaDeviceKind | undefined;
}[];
permissionState: PermissionState;
}>;
createCameraAccessDeniedEvent: EventCreator<"trace", "camera access denied", {
devices: {
readonly label?: string | undefined;
readonly kind?: MediaDeviceKind | undefined;
}[];
permissionState: PermissionState;
}>;
cameraAccessDenied: EventDispatcher< {
devices: {
readonly label?: string | undefined;
readonly kind?: MediaDeviceKind | undefined;
}[];
permissionState: PermissionState;
}>;
createCameraCaptureHintsShownEvent: EventCreator<"trace", "shown camera capture hints", {
visible: boolean;
}>;
shownCameraCaptureHints: EventDispatcher< {
visible: boolean;
}>;
crateBackMissingEvent: EventCreator<"trace", "back side of ID is missing", EventMetadata>;
backMissingEvent: EventDispatcher<EventMetadata>;
createCameraStreamStartedEvent: EventCreator<"trace", "started camera stream", {
constraints: {
advanced?: {
aspectRatio?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
channelCount?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
echoCancellation?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
facingMode?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
frameRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
sampleRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
}[] | undefined;
aspectRatio?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
channelCount?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
echoCancellation?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
facingMode?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
frameRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
sampleRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
};
capabilities: {
aspectRatio?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean[] | undefined;
channelCount?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | undefined;
echoCancellation?: boolean[] | undefined;
facingMode?: string[] | undefined;
frameRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean[] | undefined;
sampleRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
};
settings: {
aspectRatio?: number | undefined;
autoGainControl?: boolean | undefined;
channelCount?: number | undefined;
displaySurface?: string | undefined;
echoCancellation?: boolean | undefined;
facingMode?: string | undefined;
frameRate?: number | undefined;
height?: number | undefined;
noiseSuppression?: boolean | undefined;
sampleRate?: number | undefined;
sampleSize?: number | undefined;
width?: number | undefined;
};
state: unknown;
}>;
cameraStreamStarted: EventDispatcher< {
constraints: {
advanced?: {
aspectRatio?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
channelCount?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
echoCancellation?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
facingMode?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
frameRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
sampleRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
}[] | undefined;
aspectRatio?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
channelCount?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
echoCancellation?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
facingMode?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
frameRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
sampleRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
};
capabilities: {
aspectRatio?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean[] | undefined;
channelCount?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | undefined;
echoCancellation?: boolean[] | undefined;
facingMode?: string[] | undefined;
frameRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean[] | undefined;
sampleRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
};
settings: {
aspectRatio?: number | undefined;
autoGainControl?: boolean | undefined;
channelCount?: number | undefined;
displaySurface?: string | undefined;
echoCancellation?: boolean | undefined;
facingMode?: string | undefined;
frameRate?: number | undefined;
height?: number | undefined;
noiseSuppression?: boolean | undefined;
sampleRate?: number | undefined;
sampleSize?: number | undefined;
width?: number | undefined;
};
state: unknown;
}>;
createDeviceListChangedEvent: EventCreator<"trace", "device list changed", {
devices: {
readonly label?: string | undefined;
readonly kind?: MediaDeviceKind | undefined;
}[];
permissionState: PermissionState;
}>;
deviceListChanged: EventDispatcher< {
devices: {
readonly label?: string | undefined;
readonly kind?: MediaDeviceKind | undefined;
}[];
permissionState: PermissionState;
}>;
createFailedToFetchEvent: EventCreator<"trace", "failed to fetch", {
error: FetchErrorParams;
}>;
failedToFetch: EventDispatcher< {
error: FetchErrorParams;
}>;
createLivenessManualSelfieFallbackEvent: EventCreator<"trace", "liveness - manual selfie fallback", {
step: string;
reason: string;
}>;
livenessManualSelfieFallback: EventDispatcher< {
step: string;
reason: string;
}>;
createLivenessInitializedEvent: EventCreator<"trace", "liveness - initialized", {
step: string;
}>;
livenessInitialized: EventDispatcher< {
step: string;
}>;
createLivenessModuleLoadingFailedEvent: EventCreator<"trace", "liveness - module loading failed", {
step: string;
}>;
livenessModuleLoadingFailed: EventDispatcher< {
step: string;
}>;
createLivenessProgressEvent: EventCreator<"trace", "liveness - progress", {
jliveProgressCurrentStep: number;
jliveProgressStepsTotal: number;
jLiveStepDuration: number;
jLiveDuration: number;
cls?: CameraLivenessStatus;
clsm?: CameraLivenessStatus;
}>;
livenessProgressEvent: EventDispatcher< {
jliveProgressCurrentStep: number;
jliveProgressStepsTotal: number;
jLiveStepDuration: number;
jLiveDuration: number;
cls?: CameraLivenessStatus;
clsm?: CameraLivenessStatus;
}>;
createAutocaptureStateChangeEvent: EventCreator<"trace", "id autocapture - state change event", {
step: string;
autocaptureState: string;
autocaptureFallbackReason?: string;
}>;
autocaptureStateChangeEvent: EventDispatcher< {
step: string;
autocaptureState: string;
autocaptureFallbackReason?: string;
}>;
createCameraPlaybackStatusEvent: EventCreator<"trace", "camera playback status", {
status: CameraPlaybackStatus;
}>;
cameraPlaybackStatusEvent: EventDispatcher< {
status: CameraPlaybackStatus;
}>;
createUnhandledrejectionEvent: EventCreator<"trace", "unhandled promise rejection", {
name: string;
message: string;
stack?: string;
}>;
unhandledrejectionEvent: EventDispatcher< {
name: string;
message: string;
stack?: string;
}>;
createUncaughtErrorEvent: EventCreator<"trace", "uncaught error", {
name: string;
message: string;
stack?: string;
}>;
uncaughtErrorEvent: EventDispatcher< {
name: string;
message: string;
stack?: string;
}>;
createDefaultToDL: EventCreator<"trace", "missing idType - defaulting to DL", EventMetadata>;
defaultToDL: EventDispatcher<EventMetadata>;
createShownStartScreenEvent: EventCreator<"screen", "start", EventMetadata>;
shownStartScreen: EventDispatcher<EventMetadata>;
createShownDocumentSelectScreenEvent: EventCreator<"screen", "document select", EventMetadata>;
shownDocumentSelectScreen: EventDispatcher<EventMetadata>;
createShownDocumentVariantSelectScreenEvent: EventCreator<"screen", "document variant select", EventMetadata>;
shownDocumentVariantSelectScreen: EventDispatcher<EventMetadata>;
createShownCaptureScreenEvent: EventCreator<"screen", "capture", {
classifier?: string;
sides?: string[];
}>;
shownCaptureScreen: EventDispatcher< {
classifier?: string;
sides?: string[];
}>;
createShownCameraAccessRequestScreenEvent: EventCreator<"screen", "camera access request", {
kind: "denied" | "prompt";
devices: MediaDeviceMetadata[];
}>;
shownCameraAccessRequestScreen: EventDispatcher< {
kind: "denied" | "prompt";
devices: MediaDeviceMetadata[];
}>;
createShownGuidanceScreenEvent: EventCreator<"screen", "guidance", EventMetadata>;
shownGuidanceScreen: EventDispatcher<EventMetadata>;
createShownUploadScreenEvent: EventCreator<"screen", "upload", EventMetadata>;
shownUploadScreen: EventDispatcher<EventMetadata>;
createShowRetryScreenEvent: EventCreator<"screen", "retry", {
category?: Category;
rejectionReasons: Partial<Record<FileStoreKey, ReasonCode>>;
rejectionCodeKeys: Partial<Record<ReasonCode, FileStoreKey[]>>;
codes: ReasonCode[];
}>;
showRetryScreen: EventDispatcher< {
category?: Category;
rejectionReasons: Partial<Record<FileStoreKey, ReasonCode>>;
rejectionCodeKeys: Partial<Record<ReasonCode, FileStoreKey[]>>;
codes: ReasonCode[];
}>;
createShownFinishScreenEvent: EventCreator<"screen", "finish", {
outcome: RequestOutcome<FinalizeResponse | undefined, unknown>;
}>;
shownFinishScreen: EventDispatcher< {
outcome: RequestOutcome<FinalizeResponse | undefined, unknown>;
}>;
createShownCrossDeviceScreenEvent: EventCreator<"screen", "cross device", EventMetadata>;
shownCrossDeviceScreen: EventDispatcher<EventMetadata>;
createShownCrossDeviceFinishScreenEvent: EventCreator<"screen", "cross device finish", {
acquisitionStatus: AcquisitionStatus;
error?: PublicError;
}>;
shownCrossDeviceFinishScreen: EventDispatcher< {
acquisitionStatus: AcquisitionStatus;
error?: PublicError;
}>;
createShownErrorEvent: EventCreator<"screen", "error", EventMetadata>;
shownError: EventDispatcher<EventMetadata>;
getShownScreenEventReporter: (eventName: string) => [EventCreator<"screen", string, {
acquisitionStatus: AcquisitionStatus;
}>, EventDispatcher< {
acquisitionStatus: AcquisitionStatus;
}>];
createPublicErrorEvent: EventCreator<"screen", "public error", {
errorCode: string;
}>;
publicError: EventDispatcher< {
errorCode: string;
}>;
createSwitchCameraEvent: EventCreator<"action", "switch camera", {
deviceInfo: {
readonly label: string;
readonly kind: MediaDeviceKind;
capabilities: {
aspectRatio?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean[] | undefined;
channelCount?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | undefined;
echoCancellation?: boolean[] | undefined;
facingMode?: string[] | undefined;
frameRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean[] | undefined;
sampleRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
};
};
}>;
switchCamera: EventDispatcher< {
deviceInfo: {
readonly label: string;
readonly kind: MediaDeviceKind;
capabilities: {
aspectRatio?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean[] | undefined;
channelCount?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | undefined;
echoCancellation?: boolean[] | undefined;
facingMode?: string[] | undefined;
frameRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean[] | undefined;
sampleRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
};
};
}>;
createCameraCaptureEvent: EventCreator<"action", "capture", {
width?: number | undefined;
height?: number | undefined;
track?: {
readonly id: string;
enabled: boolean;
readonly label: string;
contentHint: string;
readonly kind: string;
readonly muted: boolean;
readonly readyState: MediaStreamTrackState;
capabilities: {
aspectRatio?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean[] | undefined;
channelCount?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | undefined;
echoCancellation?: boolean[] | undefined;
facingMode?: string[] | undefined;
frameRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean[] | undefined;
sampleRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
};
constraints: {
advanced?: {
aspectRatio?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
channelCount?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
echoCancellation?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
facingMode?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
frameRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
sampleRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
}[] | undefined;
aspectRatio?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
channelCount?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
echoCancellation?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
facingMode?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
frameRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
sampleRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
};
settings: {
aspectRatio?: number | undefined;
autoGainControl?: boolean | undefined;
channelCount?: number | undefined;
displaySurface?: string | undefined;
echoCancellation?: boolean | undefined;
facingMode?: string | undefined;
frameRate?: number | undefined;
height?: number | undefined;
noiseSuppression?: boolean | undefined;
sampleRate?: number | undefined;
sampleSize?: number | undefined;
width?: number | undefined;
};
} | undefined;
devices: {
readonly label: string;
readonly kind: MediaDeviceKind;
capabilities: {
aspectRatio?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean[] | undefined;
channelCount?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | undefined;
echoCancellation?: boolean[] | undefined;
facingMode?: string[] | undefined;
frameRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean[] | undefined;
sampleRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
};
}[];
permissionState: PermissionState;
idAutocapture?: boolean | undefined;
idAutocaptureState?: actionEvents.CameraCaptureIdAutocaptureStateLogEvent | undefined;
idAutocaptureFallbackReason?: string | undefined;
timeSpentInStepMs?: number | undefined;
cls?: {
p: number;
q: number;
t: number;
l?: string | undefined;
y: true;
} | {
t: number;
l?: string | undefined;
y: false;
} | undefined;
clsm?: {
p: number;
q: number;
t: number;
l?: string | undefined;
y: true;
} | {
t: number;
l?: string | undefined;
y: false;
} | undefined;
}>;
cameraCapture: EventDispatcher< {
width?: number | undefined;
height?: number | undefined;
track?: {
readonly id: string;
enabled: boolean;
readonly label: string;
contentHint: string;
readonly kind: string;
readonly muted: boolean;
readonly readyState: MediaStreamTrackState;
capabilities: {
aspectRatio?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean[] | undefined;
channelCount?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | undefined;
echoCancellation?: boolean[] | undefined;
facingMode?: string[] | undefined;
frameRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean[] | undefined;
sampleRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
};
constraints: {
advanced?: {
aspectRatio?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
channelCount?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
echoCancellation?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
facingMode?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
frameRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
sampleRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
}[] | undefined;
aspectRatio?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
channelCount?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
echoCancellation?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
facingMode?: string | string[] | {
exact?: string | string[] | undefined;
ideal?: string | string[] | undefined;
} | undefined;
frameRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean | {
exact?: boolean | undefined;
ideal?: boolean | undefined;
} | undefined;
sampleRate?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: number | {
exact?: number | undefined;
ideal?: number | undefined;
max?: number | undefined;
min?: number | undefined;
} | undefined;
};
settings: {
aspectRatio?: number | undefined;
autoGainControl?: boolean | undefined;
channelCount?: number | undefined;
displaySurface?: string | undefined;
echoCancellation?: boolean | undefined;
facingMode?: string | undefined;
frameRate?: number | undefined;
height?: number | undefined;
noiseSuppression?: boolean | undefined;
sampleRate?: number | undefined;
sampleSize?: number | undefined;
width?: number | undefined;
};
} | undefined;
devices: {
readonly label: string;
readonly kind: MediaDeviceKind;
capabilities: {
aspectRatio?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean[] | undefined;
channelCount?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
displaySurface?: string | undefined;
echoCancellation?: boolean[] | undefined;
facingMode?: string[] | undefined;
frameRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
height?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
noiseSuppression?: boolean[] | undefined;
sampleRate?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
sampleSize?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
width?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
};
}[];
permissionState: PermissionState;
idAutocapture?: boolean | undefined;
idAutocaptureState?: actionEvents.CameraCaptureIdAutocaptureStateLogEvent | undefined;
idAutocaptureFallbackReason?: string | undefined;
timeSpentInStepMs?: number | undefined;
cls?: {
p: number;
q: number;
t: number;
l?: string | undefined;
y: true;
} | {
t: number;
l?: string | undefined;
y: false;
} | undefined;
clsm?: {
p: number;
q: number;
t: number;
l?: string | undefined;
y: true;
} | {
t: number;
l?: string | undefined;
y: false;
} | undefined;
}>;
createSelectedCountryEvent: EventCreator<"action", "selected country", {
country: string | undefined;
}>;
selectedCountry: EventDispatcher< {
country: string | undefined;
}>;
createSelectedDocumentEvent: EventCreator<"action", "selected document", {
document: string;
}>;
selectedDocument: EventDispatcher< {
document: string;
}>;
createSelectedDocumentVariantEvent: EventCreator<"action", "selected document variant", {
variant: string;
}>;
selectedDocumentVariant: EventDispatcher< {
variant: string;
}>;
createClickedStartButtonEvent: EventCreator<"action", "clicked start button", EventMetadata>;
clickedStartButton: EventDispatcher<EventMetadata>;
createClickedRetryButtonEvent: EventCreator<"action", "clicked retry button", EventMetadata>;
clickedRetryButton: EventDispatcher<EventMetadata>;
createClickedCrossDeviceButtonEvent: EventCreator<"action", "clicked cross device button", EventMetadata>;
clickedCrossDeviceButton: EventDispatcher<EventMetadata>;
createClickedSendEmailButtonEvent: EventCreator<"action", "clicked send email button", EventMetadata>;
clickedSendEmailButton: EventDispatcher<EventMetadata>;
createEmailSentError: EventCreator<"action", "email sent error", EventMetadata>;
emailSentError: EventDispatcher<EventMetadata>;
createClickedUploadButtonEvent: EventCreator<"action", "clicked file upload button", EventMetadata>;
clickedUploadButton: EventDispatcher<EventMetadata>;
createUploadedFileEvent: EventCreator<"action", "uploaded file", {
source: FileSource;
}>;
uploadedFile: EventDispatcher< {
source: FileSource;
}>;
createSettingsEvent: EventCreator<"arbitrary", "settings", {
credentials: unknown;
}>;
settings: EventDispatcher< {
credentials: unknown;
}>;
createRuntimeEvent: EventCreator<"arbitrary", "runtime", EventMetadata>;
runtime: EventDispatcher<EventMetadata>;
createShownConsentMessageEvent: EventCreator<"arbitrary", "shown consent message", EventMetadata>;
shownConsentMessage: EventDispatcher<EventMetadata>;
createUsedCaptureTypesEvent: EventCreator<"arbitrary", "capture types", {
livenessCaptureType: string;
idCaptureType: string;
xDeviceJourney: boolean;
usedAllCaptureTypes: string[];
}>;
usedCaptureTypesEvent: EventDispatcher< {
livenessCaptureType: string;
idCaptureType: string;
xDeviceJourney: boolean;
usedAllCaptureTypes: string[];
}>;
};
export declare class AppContainerComponent extends BaseComponent {
#private;
static styles: CSSResult[];
type: DsAppContainerLayoutType;
footerVisible: boolean;
readonly layout$: Observable<DsAppContainerLayout>;
readonly layoutController: AsyncController<DsAppContainerLayout>;
constructor();
update(changedProperties: PropertyValues): void;
render(): HTMLTemplateResult;
}
export declare interface AppDisplayMode {
fullscreen: boolean;
standalone: boolean;
minimalUI: boolean;
browser: boolean;
windowControlsOverlay: boolean;
}
export declare const areAllActiveConsentsGiven$: () => Observable<boolean>;
export declare const areAllFilesUploaded$: (credentialId: UUID) => Observable<boolean>;
export declare const areAllFilesUploadedSuccessfully: (credentialId: UUID) => boolean;
export declare const areWorkflowSetupParametersValid$: () => Observable<boolean>;
export declare const areWorkflowSetupParametersValid: (params?: unknown) => boolean;
export declare const asyncAnimationFrame: (callback: AsyncCallback) => Promise<void>;
declare type AsyncCallback = () => void;
declare class AsyncController<T> implements ReactiveController {
#private;
constructor(host: ReactiveControllerHost, source$: Observable<T>, value?: T);
hostConnected(): void;
hostDisconnected(): void;
get value(): T | undefined;
}
export declare const attributesChanged: EventDispatcher< {
attributes: Partial<Record<"token" | "sessionUrl" | "dc" | "locale" | "baseUrl", string>>;
}>;
export declare const authFailed: ErrorCase;
export declare interface AutocaptureDocCornerData {
topLeft: AutocaptureDocXY;
topRight: AutocaptureDocXY;
bottomLeft: AutocaptureDocXY;
bottomRight: AutocaptureDocXY;
}
declare interface AutocaptureDocId<T extends EventName = EventName> extends EventLike<T>, TimestampLike {
}
declare type AutocaptureDocIdEnd = AutocaptureDocId<EventName.DocIdEnd>;
declare type AutocaptureDocIdInputEvent = AutocaptureDocIdStart | AutocaptureDocIdEnd;
declare type AutocaptureDocIdStart = AutocaptureDocId<EventName.DocIdStart>;
export declare interface AutocaptureDocPose {
timestamp: Date;
cornerData: AutocaptureDocCornerData;
originalCornerData: AutocaptureDocCornerData;
middlePoint: AutocaptureDocXY;
width: number;
height: number;
aspectRatio: number;
shift?: number;
shiftTime?: number;
}
export declare interface AutocaptureDocXY {
x: number;
y: number;
}
export declare interface AutocaptureFeedback {
cornersVisible: boolean;
tooFar: boolean;
tooClose: boolean;
middlePointAligned: boolean;
allChecksPassed: boolean;
}
export declare interface AutocaptureFeedbackSmoothed extends AutocaptureFeedback {
successRate: number;
frameCount: number;
duration: number;
fps: number;
}
export declare interface AutocaptureGetPoseFeedbackParameters {
pose$: Observable<AutocaptureDocPose | undefined>;
autocaptureSettings$: Observable<ConfigurationAutocaptureSettings>;
docFinder$: Observable<AutocaptureStateDocFinderPosition>;
videoResolution$: Observable<AutocaptureVideoResolution | undefined>;
}
declare interface AutocapturePoseCombinedParams {
pose: AutocaptureDocPose | undefined;
idStep: string | undefined;
userSelection: IdCredentialSelection;
minMovement: number;
smoothedFeedback: AutocaptureFeedbackSmoothed | undefined;
feedback: AutocaptureFeedback | undefined;
autocaptureSettings: ConfigurationAutocaptureSettings | undefined;
stepActivationTime: number;
}
export declare enum AutocaptureState {
NOT_LOADED = "not-loaded",
LOADING = "loading",
ACTIVE = "active",
MANUAL_CAPTURE_FALLBACK = "manual-capture-fallback"
}
export declare const autocaptureStateChangeEvent: EventDispatcher< {
step: string;
autocaptureState: string;
autocaptureFallbackReason?: string;
}>;
export declare interface AutocaptureStateDocFinderPosition {
type: AutocaptureStateType.DocFinder;
edgeMarginRatio: number;
minFillRatio: number;
maxFillRatio: number;
cx: number;
cy: number;
radius: number;
}
export declare enum AutocaptureStateType {
DocFinder = "doc-finder"
}
export declare interface AutocaptureStore {
state: AutocaptureState;
fallbackReason?: ManualCaptureFallbackReason;
docFinder: AutocaptureStateDocFinderPosition;
}
export declare interface AutocaptureVideoResolution {
width: number;
height: number;
}
export declare interface AutocaptureWorkerProcessedMessageCallback {
initializationSuccess?: () => void;
initializationFailure?: (reason: ManualCaptureFallbackReason) => void;
updateFrame?: (data: AutocaptureDocPose | undefined) => void;
}
export declare class BackdropComponent extends BaseComponent {
#private;
static styles: CSSResult[];
clickToClose: boolean;
hidden: boolean;
render(): TemplateResult<1>;
}
export declare const backMissingEvent: EventDispatcher<EventMetadata>;
export declare interface BackupEntry {
backupGuid: string;
workflowState: WorkflowState;
navigationStep: NavigationStep;
}
export declare interface BackupEntryDescriptor extends BackupEntry {
descriptor: string;
}
export declare const backupRestoreState: (storesToIgnore?: string[]) => string;
export declare enum BarcodeFormat {
Pdf417 = "PDF417"
}
export declare abstract class BaseComponent extends LitElement {
static styles: CSSResult[];
colorScheme: ColorScheme;
}
export declare const blockingNetworkError: ErrorCase;
export declare class ButtonClickEvent extends CustomEvent<Event> {
constructor(detail: Event);
}
export declare type ButtonClickEventHandler = (e: ButtonClickEvent) => void;
export declare class ButtonComponent extends BaseComponent {
static styles: CSSResult[];
fluid: boolean;
type: ButtonType;
size: ButtonSize;
shape: ButtonShape;
padding: boolean;
disabled: boolean;
render(): TemplateResult<1>;
handleClickEvent(event: Event): void;
}
export declare enum ButtonShape {
Default = "default",
Round = "round"
}
export declare enum ButtonSize {
Small = "small",
Medium = "medium",
Large = "large",
ExtraLarge = "extra-large"
}
export declare enum ButtonType {
Primary = "primary",
Secondary = "secondary",
Tertiary = "tertiary",
Quiet = "quiet",
QuietIcon = "quiet-icon",
Destructive = "destructive"
}
export declare const cameraAccessDenied: EventDispatcher< {
devices: {
readonly label?: string | undefined;
readonly kind?: MediaDeviceKind | undefined;
}[];
permissionState: PermissionState;
}>;
export declare const cameraAccessGranted: EventDispatcher< {
devices: {
readonly label?: string | undefined;
readonly kind?: MediaDeviceKind | undefined;
}[];
permissionState: PermissionState;
}>;
declare class CameraCanvas2dRenderer extends BaseComponent implements CameraRenderingEngine {
#private;
static styles: CSSResult[];
imageRatio: number;
flipped: boolean;
renderingAllowed: boolean;
fitMode: CanvasFitMode_2;
readonly canvasRef: Ref_2<HTMLCanvasElement>;
protected singleFrameRequested: boolean;
firstUpdated(changedProperties: PropertyValues): void;
render(): TemplateResult_2<1>;
getImageData: GetImageDataCallback;
getBlob: GetBlobCallback;
captureImage: CaptureImageCallback;
onVideoTick: TickCallback;
onRenderingStart: TickCallback;
onRenderFrame: TickCallback;
onStreamStart: StreamCallback;
onStreamPause: StreamCallback;
onStreamResize: StreamCallback;
renderingSetup(): void;
renderingResize(videoElement: HTMLVideoElement): void;
renderingTeardown(): void;
setRenderingAllowedState(renderingAllowed: boolean): void;
setSingleFrameRequestedState(singleFrameRequested: boolean): void;
getRenderingAllowedState(): boolean;
}
export declare const cameraCapture: EventDispatcher< {
width?: number | undefined;
height?: number | undefined;
track?: {
readonly id: string;
enabled: boolean;
readonly label: string;
contentHint: string;
readonly kind: string;
readonly muted: boolean;
readonly readyState: MediaStreamTrackState;
capabilities: {
aspectRatio?: {
max?: number | undefined;
min?: number | undefined;
} | undefined;
autoGainControl?: boolean[] |