Types

CaptureContent

Capture content configuration

type CaptureContent = {
  description: string;
  attemptInfo: string;
  infoIcon: string;
  infoTooltip: string;
  action: {
    backIcon: string;
    takePhoto: string;
  };
};

Properties:

Name/PathTypeDescription
descriptionstringThe description text
attemptInfostringThe attempt info text
infoIconstringThe info icon url
infoTooltipstringThe info tooltip text
actionobjectThe capture action button and configuration
action.backIconstringThe back icon url
action.takePhotostringThe take photo text
Capture content

Capture content

CaptureTheme

Capture theme configuration

type CaptureTheme = {
  frameContainer: {
    backgroundColor: string;
  };
  description: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  attemptInfo: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  action: {
    takePhoto: {
      backgroundColor: string;
      borderColor: string;
      color: string;
      fontSize: string;
      fontFamily: string;
      hover: {
        backgroundColor: string;
        borderColor: string;
        color: string;
      };
      disabled: {
        backgroundColor: string;
        borderColor: string;
        color: string;
      };
    };
  };
};

Properties:

Name/PathTypeDescription
frameContainerobjectThe frame container style
frameContainer.backgroundColorstringThe frame container background color
descriptionobjectThe description style
description.colorstringThe description font color
description.fontSizestringThe description font size
description.fontFamilystringThe description font family
attemptInfoobjectThe attempt info style
attemptInfo.colorstringThe attempt info font color
attemptInfo.fontSizestringThe attempt info font size
attemptInfo.fontFamilystringThe attempt info font family
actionobjectThe action styles
action.takePhotoobjectThe take photo action button style
action.takePhoto.backgroundColorstringThe take photo action button background color
action.takePhoto.borderColorstringThe take photo action button border color
action.takePhoto.colorstringThe take photo action button font color
action.takePhoto.fontSizestringThe take photo action button font size
action.takePhoto.fontFamilystringThe take photo action button font family
action.takePhoto.hoverobjectThe take photo action button hover style
action.takePhoto.hover.backgroundColorstringThe take photo action button background color when hovered
action.takePhoto.hover.borderColorstringThe take photo action button border color when hovered
action.takePhoto.hover.colorstringThe take photo action button font color when hovered
action.takePhoto.disabledobjectThe take photo action button disabled style
action.takePhoto.disabled.backgroundColorstringThe take photo action button background color when disabled
action.takePhoto.disabled.borderColorstringThe take photo action button border color when disabled
action.takePhoto.disabled.colorstringThe take photo action button font color when disabled
Capture theme

Capture theme

CheckContent

Check content configuration

type CheckContent = {
  title: string;
  message: string;
  action: {
    backIcon: string;
    continue: string;
    retake: string;
  };
};

Properties:

Name/PathTypeDescription
titlestringThe title text
messagestringThe message text
actionobjectThe check action button and configuration
action.backIconstringThe back icon url
action.continuestringThe continue text
action.retakestringThe retake text
Check content

Check content

CheckTheme

Check theme configuration

type CheckTheme = {
  frameContainer: {
    backgroundColor: string;
  };
  title: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  message: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  photoFrame: {
    borderColor: string;
  };
  action: {
    retake: {
      backgroundColor: string;
      borderColor: string;
      color: string;
      fontSize: string;
      fontFamily: string;
      hover: {
        backgroundColor: string;
        borderColor: string;
        color: string;
      };
    };
    continue: {
      backgroundColor: string;
      borderColor: string;
      color: string;
      fontSize: string;
      fontFamily: string;
      hover: {
        backgroundColor: string;
        borderColor: string;
        color: string;
      };
    };
  };
};

Properties:

Name/PathTypeDescription
frameContainerobjectThe frame container style
frameContainer.backgroundColorstringThe frame container background color
titleobjectThe title style
title.colorstringThe title font color
title.fontSizestringThe title font size
title.fontFamilystringThe title font family
messageobjectThe message style
message.colorstringThe message font color
message.fontSizestringThe message font size
message.fontFamilystringThe message font family
photoFrameobjectThe photo frame style
photoFrame.borderColorobjectThe photo frame border color
actionobjectThe action styles
action.retakeobjectThe retake action button style
action.retake.backgroundColorstringThe retake action button background color
action.retake.borderColorstringThe retake action button border color
action.retake.colorstringThe retake action button font color
action.retake.fontSizestringThe retake action button font size
action.retake.fontFamilystringThe retake action button font family
action.retake.hoverobjectThe retake action button hover style
action.retake.hover.backgroundColorstringThe retake action button background color when hovered
action.retake.hover.borderColorstringThe retake action button border color when hovered
action.retake.hover.colorstringThe retake action button font color when hovered
action.continueobjectThe continue action button style
action.continue.backgroundColorstringThe continue action button background color
action.continue.borderColorstringThe continue action button border color
action.continue.colorstringThe continue action button font color
action.continue.fontSizestringThe continue action button font size
action.continue.fontFamilystringThe continue action button font family
action.continue.hoverobjectThe continue action button hover style
action.continue.hover.backgroundColorstringThe continue action button background color when hovered
action.continue.hover.borderColorstringThe continue action button border color when hovered
action.continue.hover.colorstringThe continue action button font color when hovered
Check theme

Check theme

CheckFailedContent

Check failed content configuration

type CheckFailedContent = {
  title: string;
  message: string;
  action: {
    backIcon: string;
    retake: string;
  };
  chips: {
    badQuality: {
      message: string;
      icon: string;
    };
    notDetected: {
      message: string;
      icon: string;
    };
  };
  infoMessage: string;
  infoIcon: string;
  End: {
    message: string;
    action: {
      exit: string;
    };
  };
};

Properties:

Name/PathTypeDescription
titlestringThe title text
messagestringThe message text
actionobjectThe check failed action button and configuration
action.backIconstringThe back icon url
action.retakestringThe retake text
chipsobjectThe check failed's chip configuration
chip.badQualityobjectThe chip bad quality configuration
chip.badQuality.messagestringThe bad quality message text
chip.badQuality.iconstringThe bad quality icon url
chip.notDetectedobjectThe chip not detected configuration
chip.notDetected.messagestringThe not detected message text
chip.notDetected.iconstringThe not detected icon url
infoMessagestringThe info message text
infoIconstringThe info icon url
EndobjectThe check failed's end configuration
End.messagestringThe end message text
End.actionobjectThe end's action configuration
End.action.exitstringThe end exit text
Check failed theme

Check failed theme

CheckFailedTheme

Check failed theme configuration

type CheckFailedTheme = {
  frameContainer: {
    backgroundColor: string;
  };
  title: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  message: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  photoFrame: {
    borderColor: string;
  };
  action: {
    retake: {
      backgroundColor: string;
      borderColor: string;
      color: string;
      fontSize: string;
      fontFamily: string;
      hover: {
        backgroundColor: string;
        borderColor: string;
        color: string;
      };
    };
  };
  chips: {
    badQuality: {
      backgroundColor: string;
      borderColor: string;
      color: string;
      fontSize: string;
      fontFamily: string;
    };
    notDetected: {
      backgroundColor: string;
      borderColor: string;
      color: string;
      fontSize: string;
      fontFamily: string;
    };
  };
  infoMessage: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  End: {
    message: {
      color: string;
      fontSize: string;
      fontFamily: string;
    };
    action: {
      exit: {
        backgroundColor: string;
        borderColor: string;
        color: string;
        fontSize: string;
        fontFamily: string;
        hover: {
          backgroundColor: string;
          borderColor: string;
          color: string;
        };
      };
    };
  };
};

Properties:

Name/PathTypeDescription
frameContainerobjectThe frame container style
frameContainer.backgroundColorstringThe frame container background color
titleobjectThe title style
title.colorstringThe title font color
title.fontSizestringThe title font size
title.fontFamilystringThe title font family
messageobjectThe message style
message.colorstringThe message font color
message.fontSizestringThe message font size
message.fontFamilystringThe message font family
photoFrameobjectThe photo frame style
photoFrame.borderColorobjectThe photo frame border color
actionobjectThe action styles
action.retakeobjectThe retake action button style
action.retake.backgroundColorstringThe retake action button background color
action.retake.borderColorstringThe retake action button border color
action.retake.colorstringThe retake action button font color
action.retake.fontSizestringThe retake action button font size
action.retake.fontFamilystringThe retake action button font family
action.retake.hoverobjectThe retake action button hover style
action.retake.hover.backgroundColorstringThe retake action button background color when hovered
action.retake.hover.borderColorstringThe retake action button border color when hovered
action.retake.hover.colorstringThe retake action button font color when hovered
chipsobjectThe chips styles
chips.badQualityobjectThe bad quality chips button style
chips.badQuality.backgroundColorstringThe bad quality chips button background color
chips.badQuality.borderColorstringThe bad quality chips button border color
chips.badQuality.colorstringThe bad quality chips button font color
chips.badQuality.fontSizestringThe bad quality chips button font size
chips.badQuality.fontFamilystringThe bad quality chips button font family
chips.notDetectedobjectThe not detected chips button style
chips.notDetected.backgroundColorstringThe not detected chips button background color
chips.notDetected.borderColorstringThe not detected chips button border color
chips.notDetected.colorstringThe not detected chips button font color
chips.notDetected.fontSizestringThe not detected chips button font size
chips.notDetected.fontFamilystringThe not detected chips button font family
infoMessageobjectThe info message style
infoMessage.colorstringThe info message font color
infoMessage.fontSizestringThe info message font size
infoMessage.fontFamilystringThe info message font family
EndobjectThe end styles
End.messageobjectThe end message style
End.message.colorstringThe end message font color
End.message.fontSizestringThe end message font size
End.message.fontFamilystringThe end message font family
actionobjectThe action styles
End.action.exitobjectThe exit end action button style
End.action.exit.backgroundColorstringThe exit end action button background color
End.action.exit.borderColorstringThe exit end action button border color
End.action.exit.colorstringThe exit end action button font color
End.action.exit.fontSizestringThe exit end action button font size
End.action.exit.fontFamilystringThe exit end action button font family
End.action.exit.hoverobjectThe exit end action button hover style
End.action.exit.hover.backgroundColorstringThe exit end action button background color when hovered
End.action.exit.hover.borderColorstringThe exit end action button border color when hovered
End.action.exit.hover.colorstringThe exit end action button font color when hovered
Check failed theme

Check failed theme

CompletedContent

Completed content configuration

type CompletedContent = {
  image: string;
  message: string;
};

Properties:

Name/PathTypeDescription
imagestringThe image url
messagestringThe message text

CompletedTheme

Completed theme configuration

type CompletedTheme = {
  frameContainer: {
    backgroundColor: string;
  };
  message: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
};

Properties:

Name/PathTypeDescription
frameContainerobjectThe frame container style
frameContainer.backgroundColorstringThe frame container background color
messageobjectThe message style
message.colorstringThe message font color
message.fontSizestringThe message font size
message.fontFamilystringThe message font family

ConfirmationDialogTheme

Confirmation dialog theme configuration

type ConfirmationDialogTheme = {
  frameContainer: {
    backgroundColor: string;
  };
  title: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  description: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  photoFrame: {
    borderColor: string;
  };
  action: {
    cancel: {
      backgroundColor: string;
      borderColor: string;
      color: string;
      fontSize: string;
      fontFamily: string;
      hover: {
        backgroundColor: string;
        borderColor: string;
        color: string;
      };
    };
    ok: {
      backgroundColor: string;
      borderColor: string;
      color: string;
      fontSize: string;
      fontFamily: string;
      hover: {
        backgroundColor: string;
        borderColor: string;
        color: string;
      };
    };
  };
};

Properties:

Name/PathTypeDescription
frameContainerobjectThe frame container style
frameContainer.backgroundColorstringThe frame container background color
titleobjectThe title style
title.colorstringThe title font color
title.fontSizestringThe title font size
title.fontFamilystringThe title font family
descriptionobjectThe description style
description.colorstringThe description font color
description.fontSizestringThe description font size
description.fontFamilystringThe description font family
photoFrameobjectThe photo frame style
photoFrame.borderColorobjectThe photo frame border color
actionobjectThe action styles
action.cancelobjectThe cancel action button style
action.cancel.backgroundColorstringThe cancel action button background color
action.cancel.borderColorstringThe cancel action button border color
action.cancel.colorstringThe cancel action button font color
action.cancel.fontSizestringThe cancel action button font size
action.cancel.fontFamilystringThe cancel action button font family
action.cancel.hoverobjectThe cancel action button hover style
action.cancel.hover.backgroundColorstringThe cancel action button background color when hovered
action.cancel.hover.borderColorstringThe cancel action button border color when hovered
action.cancel.hover.colorstringThe cancel action button font color when hovered
action.okobjectThe ok action button style
action.ok.backgroundColorstringThe ok action button background color
action.ok.borderColorstringThe ok action button border color
action.ok.colorstringThe ok action button font color
action.ok.fontSizestringThe ok action button font size
action.ok.fontFamilystringThe ok action button font family
action.ok.hoverobjectThe ok action button hover style
action.ok.hover.backgroundColorstringThe ok action button background color when hovered
action.ok.hover.borderColorstringThe ok action button border color when hovered
action.ok.hover.colorstringThe ok action button font color when hovered

Endpoint

An endpoint specification

type Endpoint = {
  headers: Record<any, any>;
  params: Record<any, any>;
  url: Url;
};

Properties:

Name/PathTypeDescription
headersRecord<any, any>The custom header field to be sent together
paramsRecord<any, any>The query parameter field to be sent together
urlUrlThe url destination

ErrorDialogContent

Error dialog content configuration

type ErrorDialogContent = {
  icon: string;
  title: string;
  okText: string;
};

Properties:

Name/PathTypeDescription
iconstringThe icon url
titlestringThe title text
okTextstringThe ok text

ExitDialogContent

Exit dialog content configuration

type ExitDialogContent = {
  icon: string;
  title: string;
  okText: string;
  cancelText: string;
};

Properties:

Name/PathTypeDescription
iconstringThe icon url
titlestringThe title text
okTextstringThe ok text
cancelTextstringThe cancel text

FormContent

Form content configuration

type FormContent = {
  title: string;
  subtitle: string;
  action: {
    backIcon: string;
    submit: string;
  };
  formLabels: {
    nik: string;
    full_name: string;
    date_of_birth: string;
    place_of_birth: string;
    gender: string;
    blood_type: string;
    address: string;
    rt_rw: string;
    province: string;
    city: string;
    administrative_village: string;
    district: string;
    religion: string;
    marital_status: string;
    occupation: string;
    nationality: string;
  };
  formErrorTexts: {
    noEmpty: string;
    nikDigits: string;
  };
};

Properties:

Name/PathTypeDescription
titlestringThe title text
subtitlestringThe subtitle text
formLabelsobjectThe form label
formLabels.nikstringThe nik label
formLabels.full_namestringThe full name label
formLabels.date_of_birthstringThe date of birth label
formLabels.place_of_birthstringThe place of birth label
formLabels.genderstringThe gender label
formLabels.blood_typestringThe blood type label
formLabels.addressstringThe address label
formLabels.rt_rwstringThe rt/rw label
formLabels.provincestringThe province label
formLabels.citystringThe city label
formLabels.administrative_villagestringThe administrative village label
formLabels.districtstringThe district label
formLabels.religionstringThe religion label
formLabels.marital_statusstringThe marital status label
formLabels.occupationstringThe occupation label
formLabels.nationalitystringThe nationality label
formErrorTextsobjectThe form error text
formErrorTexts.noEmptystringThe form empty error text
formErrorTexts.nikDigitsstringThe form nik digit error text

FormTheme

Form theme configuration

type FormTheme = {
  frameContainer: {
    backgroundColor: string;
  };
  title: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  subtitle: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  action: {
    submit: {
      backgroundColor: string;
      borderColor: string;
      color: string;
      fontSize: string;
      fontFamily: string;
      hover: {
        backgroundColor: string;
        borderColor: string;
        color: string;
      };
      disabled: {
        backgroundColor: string;
        borderColor: string;
        color: string;
      };
    };
  };
};

Properties:

Name/PathTypeDescription
frameContainerobjectThe frame container style
frameContainer.backgroundColorstringThe frame container background color
titleobjectThe title style
title.colorstringThe title font color
title.fontSizestringThe title font size
title.fontFamilystringThe title font family
subtitleobjectThe subtitle info style
subtitle.colorstringThe subtitle info font color
subtitle.fontSizestringThe subtitle info font size
subtitle.fontFamilystringThe subtitle info font family
actionobjectThe action styles
action.submitobjectThe submit action button style
action.submit.backgroundColorstringThe submit action button background color
action.submit.borderColorstringThe submit action button border color
action.submit.colorstringThe submit action button font color
action.submit.fontSizestringThe submit action button font size
action.submit.fontFamilystringThe submit action button font family
action.submit.hoverobjectThe submit action button hover style
action.submit.hover.backgroundColorstringThe submit action button background color when hovered
action.submit.hover.borderColorstringThe submit action button border color when hovered
action.submit.hover.colorstringThe submit action button font color when hovered
action.submit.disabledobjectThe submit action button disabled style
action.submit.disabled.backgroundColorstringThe submit action button background color when disabled
action.submit.disabled.borderColorstringThe submit action button border color when disabled
action.submit.disabled.colorstringThe submit action button font color when disabled

InputTheme

Input theme configuration

type InputTheme = {
  message: {
    color: string;
    fontFamily: string;
    error: {
      color: string;
      fontFamily: string;
    };
  };
  border: {
    borderColor: string;
    error: {
      borderColor: string;
    };
  };
  errorText: {
    color: string;
    fontFamily: string;
    fontSize: string;
    fontStyle: string;
  }
};

Properties:

Name/PathTypeDescription
labelobjectThe label style
label.colorstringThe label font color
label.fontFamilystringThe label font family
label.errorobjectThe error label style
label.error.colorstringThe error label font color
label.error.fontFamilystringThe error label font family
borderobjectThe border style
border.borderColorstringThe border color
border.errorobjectThe error border style
border.error.borderColorstringThe error border color
errorTextobjectThe error text style
errorText.colorstringThe error text font color
errorText.fontFamilystringThe error text font family
errorText.fontSizestringThe error text font size
errorText.fontStylestringThe error text font style

InstructionContent

Instruction content configuration

type InstructionPageContent = {
  title: string;
  subtitle: string;
  instructions: Array<{
    caption: string;
    image: string;
  }>;
  action: {
    start: string;
    continue: string;
  };
};

Properties:

Name/PathTypeDescription
titlestringThe title text
subtitlestringThe subtitle text below the title text
instructionsobject[]The instruction contents on the instruction page
instructions[number].captionstringThe instruction image caption
instructions[number].imagestringThe instruction image url
actionobjectThe instruction page action button content configurations
action.startstringThe start button text
action.continuestringThe continue button text
Instruction content

Instruction content

InstructionTheme

Instruction theme configuration

type InstructionTheme = {
  frameContainer: {
    backgroundColor: string;
  };
  title: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  subtitle: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  figure: {
    borderColor: string;
  };
  figcaption: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  action: {
    start: {
      backgroundColor: string;
      borderColor: string;
      color: string;
      fontSize: string;
      fontFamily: string;
      hover: {
        backgroundColor: string;
        borderColor: string;
        color: string;
      };
    };
  };
};

Properties:

Name/PathTypeDescription
frameContainerobjectThe frame container style
frameContainer.backgroundColorstringThe frame container background color
titleobjectThe title style
title.colorstringThe title font color
title.fontSizestringThe title font size
title.fontFamilystringThe title font family
subtitleobjectThe subtitle style
subtitle.colorstringThe subtitle font color
subtitle.fontSizestringThe subtitle font size
subtitle.fontFamilystringThe subtitle font family
figureobjectThe figure style
figure.borderColorobjectThe figure border color
figcaptionobjectThe figcaption style
figcaption.colorstringThe figcaption font color
figcaption.fontSizestringThe figcaption font size
figcaption.fontFamilystringThe figcaption font family
actionobjectThe action styles
action.startobjectThe start action button style
action.start.backgroundColorstringThe start action button background color
action.start.borderColorstringThe start action button border color
action.start.colorstringThe start action button font color
action.start.fontSizestringThe start action button font size
action.start.fontFamilystringThe start action button font family
action.start.hoverobjectThe start action button hover style
action.start.hover.backgroundColorstringThe start action button background color when hovered
action.start.hover.borderColorstringThe start action button border color when hovered
action.start.hover.colorstringThe start action button font color when hovered
Instruction theme

Instruction theme

LoaderTheme

Loader theme configuration

type LoaderTheme = {
  message: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
};

Properties:

Name/PathTypeDescription
messageobjectThe message style
message.colorstringThe message font color
message.fontSizestringThe message font size
message.fontFamilystringThe message font family

NotificationDialogTheme

Notification dialog theme configuration

type NotificationDialogTheme = {
  frameContainer: {
    backgroundColor: string;
  };
  title: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  description: {
    color: string;
    fontSize: string;
    fontFamily: string;
  };
  action: {
    ok: {
      backgroundColor: string;
      borderColor: string;
      color: string;
      fontSize: string;
      fontFamily: string;
      hover: {
        backgroundColor: string;
        borderColor: string;
        color: string;
      };
    };
  };
};

Properties:

Name/PathTypeDescription
frameContainerobjectThe frame container style
frameContainer.backgroundColorstringThe frame container background color
titleobjectThe title style
title.colorstringThe title font color
title.fontSizestringThe title font size
title.fontFamilystringThe title font family
descriptionobjectThe description style
description.colorstringThe description font color
description.fontSizestringThe description font size
description.fontFamilystringThe description font family
actionobjectThe action styles
action.okobjectThe ok action button style
action.ok.backgroundColorstringThe ok action button background color
action.ok.borderColorstringThe ok action button border color
action.ok.colorstringThe ok action button font color
action.ok.fontSizestringThe ok action button font size
action.ok.fontFamilystringThe ok action button font family
action.ok.hoverobjectThe ok action button hover style
action.ok.hover.backgroundColorstringThe ok action button background color when hovered
action.ok.hover.borderColorstringThe ok action button border color when hovered
action.ok.hover.colorstringThe ok action button font color when hovered

OCRContentConfiguration

The OCR WebSDK content configuration

type ContentConfiguration = {
  Instruction: InstructionContent;
  Capture: CaptureContent;
  Check: CheckContent;
  CheckFailed: CheckFailedContent;
  Processing: ProcessingContent;
  ErrorDialog: ErrorDialogContent;
  Form: FormContent;
  SubmissionDialog: SubmissionDialogContent;
  ExitDialog: ExitDialogContent;
  Completed: CompletedContent;
};

Properties:

NameTypeDescription
InstructionInstructionContentInstruction content configuration
CaptureCaptureContentCapture content configuration
CheckCheckContentCheck content configuration
CheckFailedCheckFailedContentCheck failed content configuration
ProcessingProcessingContentProcessing content configuration
ErrorDialogErrorDialogContentError dialog content configuration
FormFormContentForm content configuration
SubmissionDialogSubmissionDialogContentSubmission dialog content configuration
ExitDialogExitDialogContentExit dialog content configuration
CompletedCompletedContentCompleted content configuration

OCRSDK

The OCR WebSDK instance

type OCRSDK = {
  onStart: (hideFrame?: boolean) => void;
  onDestroy: () => void;
};

Methods:

Name/PathType SignatureDescription
onStart(hideFrame?: boolean) => voidShows and starts the OCR WebSDK
onDestroy() => voidStops and remove the OCR WebSDK

onStart

Shows and starts the OCR WebSDK

onStart(hideFrame?: boolean): void;

Parameters:

NameTypeDescription
hideFrameboolean | undefinedHides the OCR WebSDK if true.

onDestroy

Stops and remove the OCR WebSDK

onDestroy(): void;

OCRThemeConfiguration

The OCR WebSDK theme configuration

type OCRThemeConfiguration = {
  Component: {
    Instruction: InstructionTheme;
    Capture: CaptureTheme;
    Check: CheckTheme;
    CheckFailed: CheckFailedTheme;
    NotificationDialog: NotificationDialogTheme;
    Form: FormTheme;
    ConfirmationDialog: ConfirmationDialogTheme;
    Shared: SharedTheme;
    Completed: CompletedTheme;
    Loader: LoaderTheme;
    Input: InputTheme;
  };
  Palette: ThemePalette;
  Typography: TypographyPalette;
  VendorPlaceholder: boolean;
};

Properties:

Name/PathTypeDescription
ComponentobjectAll page theme configurations
Component.InstructonInstructionThemeInstruction theme configuration
Component.CaptureCaptureThemeCapture theme configuration
Component.CheckCheckThemeCheck theme configuration
Component.CheckFailedCheckFailedThemeCheck failed theme configuration
Component.NotificationDialogNotificationDialogThemeNotification dialog theme configuration
Component.FormFormThemeForm theme configuration
Component.ConfirmationDialogConfirmationDialogThemeConfirmation dialog theme configuration
Component.LoaderLoaderThemeLoader theme configuration
Component.InputInputThemeInput theme configuration
Component.CompletedCompletedThemeCompleted theme configuration
Component.SharedSharedThemeShared theme configuration
PalettePaletteThemeGlobal palette configuration
TypographyTypographyThemeGlobal typography configuration
VendorPlaceholderbooleanGlobal vendor placeholder configuration

Palette

A color palette for theming

type Palette = {
  contrastText: string;
  default: string;
  LIGHT: string;
  DARK: string;
};

Properties:

Name/PathTypeDescription
contrastTextstringUsually for button text color
defaultstringPrimary color for the palette
LIGHTstringLighter version of the default color
DARKstringLightest version of the default color

PaletteTheme

Global palette configuration

type PaletteTheme = {
  primary: Palette;
  secondary: Palette;
};

Properties:

Name/PathTypeDescription
primaryPaletteThe primary palette
secondaryPaletteThe secondary palette

ProcessingContent

Processing content configuration

type ProcessingContent = {
  message: string;
};

Properties:

Name/PathTypeDescription
messagestringThe message text

ProxyMiddleware

Endpoint specification collection for the OCR WebSDK

type ProxyMiddleware = {
  Extract: Endpoint;
  ExtractSync: Endpoint;
  ExtractResult: Endpoint;
  License: Endpoint;
};

Properties:

Name/PathTypeDescription
ExtractEndpointThe extract endpoint specification
ExtractSyncEndpointThe extract sync endpoint specification
ExtractResultEndpointThe extract result endpoint specification
LicenseEndpointThe license endpoint specification

ProcessingFlow

Processing flow configuration

type SubmissionDialogContent = {
  isAsync: boolean;
};

Properties:

Name/PathTypeDescription
isAsyncbooleanUse async or sync processing flow

SharedTheme

Shared theme configuration

type SharedTheme = {
  background: {
    backgroundColor: string;
    backgroundImage: string;
    backgroundSize: string;
  };
};

Properties:

Name/PathTypeDescription
backgroundobjectThe background style
background.backgroundColorstringThe background color
background.backgroundImagestringThe background image url
background.backgroundSizestringThe background size

SubmissionDialogContent

Submission dialog content configuration

type SubmissionDialogContent = {
  icon: string;
  title: string;
  okText: string;
  cancelText: string;
};

Properties:

Name/PathTypeDescription
iconstringThe icon url
titlestringThe title text
okTextstringThe ok text
cancelTextstringThe cancel text

TypographyTheme

Global typography configuration

type TypographyTheme = {
  fontFamily: string[];
  fontSize: {
    title: string;
    body: string;
    caption: string;
    button: string;
  };
};

Properties:

Name/PathTypeDescription
fontFamilystring[]An array of font family. Uses the first one. If not available, uses the next one.
fontSizeobjectText font size variations
fontSize.titlestringTitle text font size
fontSize.bodystringBody text font size
fontSize.captionstringCaption text font size
fontSize.buttonstringButton text font size

Url

Url string

type Url = string;