# Interface VerificationServiceFunctions<T>

interface VerificationServiceFunctions<T extends ViewModel = ViewModel> {
dispatch?: Dispatch;
fetchExistingVerificationRequest: (
programId: string,
verificationId: string,
previousVerificationResponse?: VerificationResponse,
previousViewModel?: T,
needsLoading?: boolean,
) => Promise<object>;
fetchNewVerificationRequest: (
programId: string,
segment: Segment,
previousViewModel: T,
trackingId?: string,
forceNewVerificationRequest?: boolean,
) => Promise<object>;
resetState: () => void;
submitStep: (
stepName: VerificationStep,
viewModel: T,
previousResponse: VerificationResponse,
) => Promise<object>;
updateFieldValidationErrors: (
fieldValidationErrors: FieldValidationErrors,
) => void;
updateLocale: (
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",
segment: Segment,
) => void;
updateProgramTheme: (programTheme: ProgramTheme) => void;
updateViewModel: <
Opts extends
Partial<ViewModelUpdateOptions> = {
externalUserIdCheck: false;
metadataCheck: false;
partial: false;
},
>(
viewModel: Opts["partial"] extends true ? Partial<T> : T,
options?: Opts,
) => void;
}

#### Type Parameters

- T extends ViewModel = ViewModel

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

##### Index

### Properties

dispatch?
fetchExistingVerificationRequest
fetchNewVerificationRequest
resetState
submitStep
updateFieldValidationErrors
updateLocale
updateProgramTheme
updateViewModel

## Properties

### `Optional` `Readonly` dispatch

dispatch?: Dispatch

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

### `Readonly` fetchExistingVerificationRequest

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

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

### `Readonly` fetchNewVerificationRequest

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

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

### `Readonly` resetState

resetState: () => void

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

### `Readonly` submitStep

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

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

### `Readonly` updateFieldValidationErrors

updateFieldValidationErrors: (
fieldValidationErrors: FieldValidationErrors,
) => void

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

### `Readonly` updateLocale

updateLocale: (
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",
segment: Segment,
) => void

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

### `Readonly` updateProgramTheme

updateProgramTheme: (programTheme: ProgramTheme) => void

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

### `Readonly` updateViewModel

updateViewModel: <
Opts extends
Partial<ViewModelUpdateOptions> = {
externalUserIdCheck: false;
metadataCheck: false;
partial: false;
},
>(
viewModel: Opts["partial"] extends true ? Partial<T> : T,
options?: Opts,
) => void

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