Typescript Usage

In order to use our SDK with your typescript projects please follow this guide:

1 - Import the types to your project

import uqudoSdkFactory, {
	ReturnEnrollmentType,
	ReturnFaceSessionType,
	DocumentType,
	BackgroundCheckType,
	OperationError,
	ITrace} from "uqudosdk-web";

Enrollment:

try {

  const result = await uqudoSdk.enrollment({
      sessionId?: string;
      returnDataForIncompleteSession?: boolean;
	scan: {
  	  documentType: DocumentType;
  	  disableExpiryValidation?: boolean;
  	  forceUpload?: boolean;
          enableAgeVerification?: number;
	};
	face?: {
  	  enableFacialRecognition?: boolean;
          maxAttempts?: number;
          minimumMatchLevel?: number;
	};
        lookup?: {
  	  enableLookup: boolean;
  	  documentTypes: DocumentType[];
	};
	backgroundCheck?: {
  	  enableBackgroundCheck?: boolean;
  	  checkType?: BackgroundCheckType;
  	  disableConsent?: boolean;
  	  skipView?: boolean;
  	  enableMonitoring?: boolean;
	};
	onSuccess?: (result: ReturnEnrollmentType) => void;
	onError?: (error: OperationError) => void;
	onTrace?: (trace: ITrace) => void;
	onFinally?: () => void;
	assets?: IAssetsArg;
	texts?: ITextsArg;
  });

} catch (error) {
}

Face Session Flow:

Last updated

Was this helpful?