# Interface SheerIdJsApi

The interface exposed on the window object

interface SheerIdJsApi {
VerificationForm: (new (element, programId) => void);
conversion: Conversion;
hooks: Hooks;
overrideComponent: ((componentName, newComponent) => void);
resetOverriddenComponents: (() => void);
resetStore: (() => void);
addHook(hook): RegisteredHooks;
collectDeviceProfile(verificationId, programId): void;
getMessages(locale, programThemeMessages?, segment?): Promise<StringMap>;
getMetadata(): Metadata;
postVerificationSizeUpdates(options): void;
refreshStore(): void;
resetMetadata(): void;
resetOptions(): void;
resetViewModel(): void;
setMetadata(metadata): void;
setOptions(options): void;
setProgramTheme(theme): void;
setViewModel(viewModel): void;
}

- Defined in jslib/src/lib/types/types.ts:29

#####
Index

### Properties

VerificationForm
conversion
hooks
overrideComponent
resetOverriddenComponents
resetStore

### Methods

addHook
collectDeviceProfile
getMessages
getMetadata
postVerificationSizeUpdates
refreshStore
resetMetadata
resetOptions
resetViewModel
setMetadata
setOptions
setProgramTheme
setViewModel

## Properties

### VerificationForm

VerificationForm: (new (element, programId) => void)

#### Type declaration

- - new (element, programId): void

  - #### Parameters

    - element: HTMLElement
    - programId: string

    #### Returns void

- Defined in jslib/src/lib/types/types.ts:35

### conversion

conversion: Conversion

- Defined in jslib/src/lib/types/types.ts:39

### hooks

hooks: Hooks

- Defined in jslib/src/lib/types/types.ts:38

### overrideComponent

overrideComponent: ((componentName, newComponent) => void)

#### Type declaration

- - (componentName, newComponent): void

  - #### Parameters

    - componentName: OverrideableComponentName
    - newComponent: StepComponent

    #### Returns void

- Defined in jslib/src/lib/types/types.ts:42

### resetOverriddenComponents

resetOverriddenComponents: (() => void)

#### Type declaration

- - (): void

  - #### Returns void

- Defined in jslib/src/lib/types/types.ts:46

### resetStore

resetStore: (() => void)

#### Type declaration

- - (): void

  - #### Returns void

- Defined in jslib/src/lib/types/types.ts:54

## Methods

### addHook

- addHook(hook): RegisteredHooks

- #### Parameters

  - hook: Hook<keyof HookEvents>

  #### Returns RegisteredHooks

  - Defined in jslib/src/lib/types/types.ts:36

### collectDeviceProfile

- collectDeviceProfile(verificationId, programId): void

- #### Parameters

  - verificationId: string
  - programId: string

  #### Returns void

  - Defined in jslib/src/lib/types/types.ts:53

### getMessages

- getMessages(locale, programThemeMessages?, segment?): Promise<StringMap>

- #### Parameters

  - locale: "ar" | "bg" | "bn-IN" | "cs" | "da" | "de" | "el" | "en-GB" | "en-US" | "es-ES" | "es" | "fi" | "fr-CA" | "fr" | "ga" | "hi-IN" | "hr" | "hu" | "id" | "is" | "it" | "iw" | "ja" | "ko" | "lo" | "lt" | "ms" | "nl" | "nl-BE" | "no" | "pl" | "pt-BR" | "pt" | "ro" | "ru" | "sk" | "sl" | "sr" | "sv" | "sw" | "uk" | "ur" | "vi" | "th" | "tr" | "zh-HK" | "zh" | "zu"
  - `Optional` programThemeMessages: ProgramThemeMessages
  - `Optional` segment: Segment

  #### Returns Promise<StringMap>

  - Defined in jslib/src/lib/types/types.ts:48

### getMetadata

- getMetadata(): Metadata

- #### Returns Metadata

  - Defined in jslib/src/lib/types/types.ts:30

### postVerificationSizeUpdates

- postVerificationSizeUpdates(options): void

- #### Parameters

  - options: PostMessagesOptions

  #### Returns void

  - Defined in jslib/src/lib/types/types.ts:47

### refreshStore

- refreshStore(): void

- #### Returns void

  - Defined in jslib/src/lib/types/types.ts:37

### resetMetadata

- resetMetadata(): void

- #### Returns void

  - Defined in jslib/src/lib/types/types.ts:32

### resetOptions

- resetOptions(): void

- #### Returns void

  - Defined in jslib/src/lib/types/types.ts:34

### resetViewModel

- resetViewModel(): void

- #### Returns void

  - Defined in jslib/src/lib/types/types.ts:41

### setMetadata

- setMetadata(metadata): void

- #### Parameters

  - metadata: Metadata

  #### Returns void

  - Defined in jslib/src/lib/types/types.ts:31

### setOptions

- setOptions(options): void

- #### Parameters

  - options: Options

  #### Returns void

  - Defined in jslib/src/lib/types/types.ts:33

### setProgramTheme

- setProgramTheme(theme): void

- #### Parameters

  - theme: Partial<ProgramTheme>

  #### Returns void

  - Defined in jslib/src/lib/types/types.ts:55

### setViewModel

- setViewModel(viewModel): void

- #### Parameters

  - viewModel: {} | ViewModel

  #### Returns void

  - Defined in jslib/src/lib/types/types.ts:40