# Interface VerificationServiceFunctions<T>

interface VerificationServiceFunctions<T> {
fetchExistingVerificationRequest: ((programId, verificationId, previousVerificationResponse?, previousViewModel?, needsLoading?) => Promise<object>);
fetchNewVerificationRequest: ((programId, segment, previousViewModel, trackingId?, forceNewVerificationRequest?) => Promise<object>);
resetState: (() => void);
submitStep: ((stepName, viewModel, previousResponse) => Promise<object>);
updateFieldValidationErrors: ((fieldValidationErrors) => void);
updateLocale: ((locale, segment) => void);
updateProgramTheme: ((programTheme) => void);
updateViewModel: (<Opts>(viewModel, options?) => void);
}

#### Type Parameters

- T extends ViewModel = ViewModel

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

#####
Index

### Properties

fetchExistingVerificationRequest
fetchNewVerificationRequest
resetState
submitStep
updateFieldValidationErrors
updateLocale
updateProgramTheme
updateViewModel

## Properties

### `Readonly` fetchExistingVerificationRequest

fetchExistingVerificationRequest: ((programId, verificationId, previousVerificationResponse?, previousViewModel?, needsLoading?) => Promise<object>)

#### Type declaration

- - (programId, verificationId, previousVerificationResponse?, previousViewModel?, needsLoading?): Promise<object>

  - #### Parameters

    - programId: string
    - verificationId: string
    - `Optional` previousVerificationResponse: VerificationResponse
    - `Optional` previousViewModel: T
    - `Optional` needsLoading: boolean

    #### Returns Promise<object>

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

### `Readonly` fetchNewVerificationRequest

fetchNewVerificationRequest: ((programId, segment, previousViewModel, trackingId?, forceNewVerificationRequest?) => Promise<object>)

#### Type declaration

- - (programId, segment, previousViewModel, trackingId?, forceNewVerificationRequest?): Promise<object>

  - #### Parameters

    - programId: string
    - segment: Segment
    - previousViewModel: T
    - `Optional` trackingId: string
    - `Optional` forceNewVerificationRequest: boolean

    #### Returns Promise<object>

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

### `Readonly` resetState

resetState: (() => void)

#### Type declaration

- - (): void

  - #### Returns void

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

### `Readonly` submitStep

submitStep: ((stepName, viewModel, previousResponse) => Promise<object>)

#### Type declaration

- - (stepName, viewModel, previousResponse): Promise<object>

  - #### Parameters

    - stepName: VerificationStep
    - viewModel: T
    - previousResponse: VerificationResponse

    #### Returns Promise<object>

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

### `Readonly` updateFieldValidationErrors

updateFieldValidationErrors: ((fieldValidationErrors) => void)

#### Type declaration

- - (fieldValidationErrors): void

  - #### Parameters

    - fieldValidationErrors: FieldValidationErrors

    #### Returns void

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

### `Readonly` updateLocale

updateLocale: ((locale, segment) => void)

#### Type declaration

- - (locale, segment): void

  - #### 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"
    - segment: Segment

    #### Returns void

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

### `Readonly` updateProgramTheme

updateProgramTheme: ((programTheme) => void)

#### Type declaration

- - (programTheme): void

  - #### Parameters

    - programTheme: ProgramTheme

    #### Returns void

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

### `Readonly` updateViewModel

updateViewModel: (<Opts>(viewModel, options?) => void)

#### Type declaration

- - <Opts>(viewModel, options?): void

  - #### Type Parameters

    - Opts extends Partial<ViewModelUpdateOptions> = {
      externalUserIdCheck: false;
      metadataCheck: false;
      partial: false;
      }

    #### Parameters

    - viewModel: Opts["partial"] extends true
      ? Partial<T>
      : T
    - `Optional` options: Opts

    #### Returns void

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