# Interface SheerIdJsApi

The interface exposed on the window object

interface SheerIdJsApi {
conversion: Conversion;
hooks: Hooks;
overrideComponent: (
componentName: OverrideableComponentName,
newComponent: StepComponent,
) => void;
resetOverriddenComponents: () => void;
resetStore: () => void;
VerificationForm: new (element: HTMLElement, programId: string) => void;
addHook(hook: Hook): RegisteredHooks;
collectDeviceProfile(verificationId: string, programId: string): void;
getMessages(
locale:
| "es"
| "id"
| "is"
| "no"
| "ar"
| "bg"
| "bn-IN"
| "cs"
| "da"
| "de"
| "el"
| "en-GB"
| "en-US"
| "es-ES"
| "fi"
| "fr-CA"
| "fr"
| "ga"
| "hi-IN"
| "hr"
| "hu"
| "it"
| "iw"
| "ja"
| "ko"
| "lo"
| "lt"
| "ms"
| "nl"
| "nl-BE"
| "pl"
| "pt-BR"
| "pt"
| "ro"
| "ru"
| "sk"
| "sl"
| "sr"
| "sv"
| "sw"
| "uk"
| "ur"
| "vi"
| "th"
| "tr"
| "zh-HK"
| "zh"
| "zu",
programThemeMessages?: ProgramThemeMessages,
segment?: Segment,
): Promise<StringMap>;
getMetadata(): Metadata;
postVerificationSizeUpdates(options: PostMessagesOptions): void;
refreshStore(): void;
resetMetadata(): void;
resetOptions(): void;
resetViewModel(): void;
setMetadata(metadata: Metadata): void;
setOptions(options: Options): void;
setProgramTheme(theme: Partial<ProgramTheme>): void;
setViewModel(viewModel: {} | ViewModel): void;
}

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

##### Index

### Properties

conversion
hooks
overrideComponent
resetOverriddenComponents
resetStore
VerificationForm

### Methods

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

## Properties

### conversion

conversion: Conversion

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

### hooks

hooks: Hooks

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

### overrideComponent

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

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

### resetOverriddenComponents

resetOverriddenComponents: () => void

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

### resetStore

resetStore: () => void

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

### VerificationForm

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

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

## Methods

### addHook

- addHook(hook: Hook): RegisteredHooks

  #### Parameters

  - hook: Hook

  #### Returns RegisteredHooks

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

### collectDeviceProfile

- collectDeviceProfile(verificationId: string, programId: string): void

  #### Parameters

  - verificationId: string
  - programId: string

  #### Returns void

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

### getMessages

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

  #### Parameters

  - locale:
    | "es"
    | "id"
    | "is"
    | "no"
    | "ar"
    | "bg"
    | "bn-IN"
    | "cs"
    | "da"
    | "de"
    | "el"
    | "en-GB"
    | "en-US"
    | "es-ES"
    | "fi"
    | "fr-CA"
    | "fr"
    | "ga"
    | "hi-IN"
    | "hr"
    | "hu"
    | "it"
    | "iw"
    | "ja"
    | "ko"
    | "lo"
    | "lt"
    | "ms"
    | "nl"
    | "nl-BE"
    | "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:49

### getMetadata

- getMetadata(): Metadata

  #### Returns Metadata

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

### postVerificationSizeUpdates

- postVerificationSizeUpdates(options: PostMessagesOptions): void

  #### Parameters

  - options: PostMessagesOptions

  #### Returns void

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

### refreshStore

- refreshStore(): void

  #### Returns void

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

### resetMetadata

- resetMetadata(): void

  #### Returns void

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

### resetOptions

- resetOptions(): void

  #### Returns void

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

### resetViewModel

- resetViewModel(): void

  #### Returns void

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

### setMetadata

- setMetadata(metadata: Metadata): void

  #### Parameters

  - metadata: Metadata

  #### Returns void

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

### setOptions

- setOptions(options: Options): void

  #### Parameters

  - options: Options

  #### Returns void

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

### setProgramTheme

- setProgramTheme(theme: Partial<ProgramTheme>): void

  #### Parameters

  - theme: Partial<ProgramTheme>

  #### Returns void

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

### setViewModel

- setViewModel(viewModel: {} | ViewModel): void

  #### Parameters

  - viewModel: {} | ViewModel

  #### Returns void

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