# 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:2683

##### 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:2717

### `Readonly` fetchExistingVerificationRequest

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

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

### `Readonly` fetchNewVerificationRequest

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

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

### `Readonly` resetState

resetState: () => void

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

### `Readonly` submitStep

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

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

### `Readonly` updateFieldValidationErrors

updateFieldValidationErrors: (
fieldValidationErrors: FieldValidationErrors,
) => void

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

### `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:2715

### `Readonly` updateProgramTheme

updateProgramTheme: (programTheme: ProgramTheme) => void

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

### `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:2698