UNPKG

@sheerid/jslib-nightly

Version:

SheerID JavaScript Library

1,205 lines (1,203 loc) • 82.9 kB
import { Dispatch, Store } from 'redux'; import { InjectedIntl } from 'react-intl'; import { FormFieldConfigType } from '../../components/FormFields/FormFieldCustom/FormFieldCustom'; import { TryAgainAction } from '../../components/TryAgainAction'; import { Flags } from '../../components/FeatureFlags/flags'; import { RewardDisplayEnum, Locale, IdCheckLoopServiceType, ThirdPartyLoopProvider } from './runtimeTypes'; import { hooks } from '../hooks'; import { DeepPartial } from './helpers'; import { ViewModelUpdateOptions } from '../VerificationService/ViewModel'; export { type Locale } from './runtimeTypes'; export interface NavigatorBeta extends Navigator { globalPrivacyControl: boolean; } /** * SheerID Javascript Library types and interfaces */ /** * The interface exposed on the window object */ export interface SheerIdJsApi { getMetadata(): Metadata; setMetadata(metadata: Metadata): void; resetMetadata(): void; setOptions(options: Options): void; resetOptions(): void; VerificationForm: new (element: HTMLElement, programId: DatabaseId) => void; addHook(hook: Hook): RegisteredHooks; refreshStore(): void; hooks: typeof hooks; conversion: Conversion; setViewModel(viewModel: ViewModel | {}): void; resetViewModel(): void; overrideComponent: (componentName: OverrideableComponentName, newComponent: StepComponent) => void; resetOverriddenComponents: () => void; postVerificationSizeUpdates(options: PostMessagesOptions): void; getMessages(locale: Locale, programThemeMessages?: ProgramThemeMessages, segment?: Segment): Promise<StringMap>; collectDeviceProfile(verificationId: string, programId: string): void; resetStore: () => void; setProgramTheme(theme: Partial<ProgramTheme>): void; } export interface FormFieldConfig { fieldId: PersonalInfoFieldId | string; disabled?: boolean; requireIfOptional?: boolean; hidden?: boolean; } export interface CustomFormFieldConfig extends FormFieldConfig { fieldType: (typeof FormFieldConfigType)[keyof typeof FormFieldConfigType]; validate: (value: string | boolean) => ErrorId | ExtendedErrorId; showPlaceholderAndHideLabel?: boolean; required?: boolean; options?: string[]; } export interface UtilsApi { determineDevice: (verificationId: DatabaseId, programId: DatabaseId) => void; setOptions(options: Options): void; } /** * @description Require only properties of type T * @private * Example: type A = { foo: string } function bar(newObject: PropertiesOf<A>) {...} bar({ foo: 'baz' }) // valid bar({ otherProp: 'stuff' }) // invalid */ export type PropertiesOf<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & { [K in Keys]-?: Required<Pick<T, K>>; }[Keys]; /** * @description creates a keypath union type of all nested keys under an object. * @private */ type NestedKeyOf<ObjectType extends object> = { [Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object ? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}` : `${Key}`; }[keyof ObjectType & (string | number)]; /** * @private */ export type StringMap = { [a: string]: string; }; /** * @example 5bbd127d9781852f68e14ddc * @template 24 digit hexadecimal */ export type DatabaseId = string; /** * @example { 'someKey': 'someValue' } */ export type Metadata = { [key: string]: string | boolean; }; /** * @description Configurable options that can be passed when initializing this library. */ export type Options = { restApi?: RestApiOptions; logLevel?: LogLevel; mockStep?: MockStep; mockSegment?: Segment; mockSubSegment?: SubSegment; mockErrorId?: ErrorId; mockErrorDetailId?: ErrorDetailId; mockRewardCode?: string; mockRedirectUrl?: string; mockConsumerInfoState?: ConsumerInfoState; mockIdCheckLoopServiceType?: IdCheckLoopServiceType; mockPreviousStep?: VerificationStep; mockDocSelected?: string; installPageUrl?: string; mockResponse?: VerificationResponse; doFetchTheme?: boolean; locale?: Locale; messages?: object; messagesWithLocale?: object; urlFaq?: string; /** * @deprecated since version 1.63 */ urlStudentFaq?: string; /** * @deprecated since version 1.63 */ urlSeniorFaq?: string; /** * @deprecated since version 1.63 */ urlAgeFaq?: string; /** * @deprecated since version 1.63 */ urlMilitaryFaq?: string; /** * @deprecated since version 1.63 */ urlTeacherFaq?: string; /** * @deprecated since version 1.63 */ urlMemberFaq?: string; /** * @deprecated since version 1.63 */ urlFirstResponderFaq?: string; /** * @deprecated since version 1.63 */ urlMedicalFaq?: string; /** * @deprecated since version 1.63 */ urlEmploymentFaq?: string; /** * @deprecated since version 1.63 */ urlIdentityFaq?: string; /** * @deprecated since version 1.63 */ urlLicensedProfessionalFaq?: string; urlLowIncomeFaq?: string; urlAddSchoolFaq?: string; urlAddSchoolForm?: string; customCss?: ProgramTheme["customCss"]; logoUrl?: ProgramTheme["logoUrl"]; privacyPolicyUrl?: ProgramTheme["privacyPolicyUrl"]; cookies?: CookieOptions; useFingerprinting?: boolean; marketConsent?: MarketConsentOptions; customMetadata?: MetadataConfig; verificationId?: string; externalUserId?: string; minimumOrganizationSearchLength?: number; httpRequestTimeout?: number; hideTestModeFlag?: boolean; /** * @deprecated */ hideMilitaryFamilyAcceptableUploads?: boolean; customFormFields?: CustomFormFieldConfig[]; formFieldConfig?: FormFieldConfig[]; tryAgainAction?: TryAgainAction; _launchDarklyUserTargeting?: boolean; _launchDarklyFlagCb?: (flags: Flags) => void; /** * Supports backwards compatibility with consumers who render the a verification form directly on their page, preventing the landing page from rendering within their container. * This option may be removed in v2. */ renderAs?: "default" | "landingPage"; }; export type RestApiOptions = { serviceUrl: string; resources?: RestResources; }; /** * @description Control how cookies behave * @field `expires` Number of days for cookie to expire in. Use 0 to expire in same browser session. * @field `secure` Whether the cookie is set securely. */ export type CookieOptions = { expires: number; secure: boolean; enabled: boolean; path?: string; domain?: string; sameSite?: "lax" | "strict" | "none"; }; export type MarketConsentOptions = { enabled: boolean; required: boolean; message: string; }; export type MetadataConfig = { enabled: boolean; keys: string[]; requiredKeys?: string[]; }; export type RestResources = { verification: string; program: ProgramResources; conversion: ConversionResources; }; export type ProgramResources = { base: string; theme: string; organization: string; }; /** * @description Configuration for a verification being displayed on an iframe. */ export type IframeUserConfiguration = { closeButtonText?: string; mobileRedirect?: boolean; mobileThreshold?: string | number; stopPropagation?: boolean; }; export type VerificationFormLayout = "fullRight" | "center" | "splitRight"; /** * @description URL of a verification to be displayed. */ export type VerificationUrl = string; /** * @description Options for the message events send by a verification loaded on an iframe. * These event are used to resize a modal containing a verification. */ export type PostMessagesOptions = { origin: VerificationUrl; interval: number; }; export type PostMessageAction = { type: "updateHeight"; action?: "updateHeight"; height: number; } | { type: "focus"; action?: "focus"; focusOn: "firstElement" | "lastElement"; } | { type: "hook"; action?: never; hook: HookData; }; export type PostMessageData = { verificationIframeUid: string; action: PostMessageAction; }; /** * @description URLs related to conversion endpoints. */ export type ConversionResources = { base: string; }; export type LogLevel = "info" | "log" | "warn" | "error" | "silent"; /** * @description Interface for individual field instances, such as BirthdateField * @example new sheerid.BirthdateField().setValue('2000-01-01'); */ export interface DiscreteField { getValue(): any; setValue(value: any): void; onChange(callback: Function): void; setIsErrored(value: boolean): void; render(): void; } /** * @todo document constraints here */ export type Email = string; /** * @example (111) 222-3333 | 1112223333 | 111-222-3333 * TODO - Update this when PhoneNumberValidator regex changes. */ export type PhoneNumber = string; /** * @example 2013-03-06 * @template ISO-8601 'YYYY-MM-DD' */ export type BirthDate = string; /** * @example 1234567 | A01205257 */ export type MemberId = string; /** * @example 2013-03-06 * @template ISO-8601 'YYYY-MM-DD' * The `day` portion of this date is not editable or displayed to the user */ export type DischargeDate = string; /** * @example 2013-03-06 * @template ISO-8601 'YYYY-MM-DD' */ export type ActiveDutyStartDate = string; /** * @description TODO */ export declare const MILITARY_STATUS: readonly ["ACTIVE_DUTY", "VETERAN", "RESERVIST", "MILITARY_RETIREE", "MILITARY_FAMILY", "GOLD_STAR_FAMILY"]; export type MilitaryStatus = (typeof MILITARY_STATUS)[number]; /** * @description TODO */ export declare const FIRST_RESPONDER_STATUS: readonly ["FIREFIGHTER", "EMT", "POLICE", "SEARCH_AND_RESCUE"]; export type FirstResponderStatus = (typeof FIRST_RESPONDER_STATUS)[number]; export declare const MEDICAL_PROFESSIONAL_STATUS: readonly ["NURSE", "DOCTOR", "DENTIST", "PHARMACIST", "OTHER_HEALTH_WORKER"]; export type MedicalProfessionalStatus = (typeof MEDICAL_PROFESSIONAL_STATUS)[number]; export declare const LICENSED_PROFESSIONAL_STATUS: readonly ["LICENSED_COSMETOLOGIST", "LICENSED_REAL_ESTATE_AGENT", "VETERINARIAN", "CHILD_CARE_WORKER", "LIBRARIAN", "INTERIOR_DESIGNER", "ARCHITECT", "GENERAL_CONTRACTOR", "NUTRITION_PROFESSIONAL"]; export type LicensedProfessionalStatus = (typeof LICENSED_PROFESSIONAL_STATUS)[number]; export declare const RECENT_MOVER_STATUS: readonly ["HOME_BUYER", "OTHER_MOVER"]; export type RecentMoverStatus = (typeof RECENT_MOVER_STATUS)[number]; export declare const LOW_INCOME_STATUS: readonly ["SNAP_BENEFITS", "OTHER_GOVERNMENT_ASSISTANCE", "COMMUNITY_ELIGIBILITY_PROVISION"]; export type LowIncomeStatus = (typeof LOW_INCOME_STATUS)[number]; /** * @description TODO */ export type OrganizationId = number; /** * @description TODO */ export type OrganizationName = string; /** * @description All possible fields which show up on the personal info steps */ export type PersonalInfoFieldId = "firstName" | "lastName" | "memberId" | "organization" | "birthDate" | "email" | "phoneNumber" | "postalCode" | "address1" | "city" | "state" | "dischargeDate" | "activeDutyStartDate" | "status" | "statuses" | "country" | "socialSecurityNumber" | "marketConsentValue" | "ebtCardNumber" | "cvecNumber" | "driverLicenseNumber"; /** * @description All possible fields */ export type FieldId = PersonalInfoFieldId | "docUpload" | "carrierConsentValue" | "overrideCode" | "organizationEmail" | "authenticationCode" | "smsCode"; export type FormValidationOptions = { minAge?: number; maxAge?: number; smsLoopEnabled?: boolean; strictMilitaryValidationEnabled?: boolean; transitionalMilitaryValidityDays?: number; currentStep?: VerificationStep; viewModel?: ViewModel; }; /** * @description TODO */ export type ExtendedFieldId = FieldId | string; /** * @description The object that contains all possible field ids for setting & displaying field errors, if any */ export type FieldValidationErrors = { [P in FieldId]: ErrorId; }; /** * @description TODO */ export type ExtendedFieldValidationErrors = StringMap; /** * @description TODO */ export type FieldContent = string | number | File | FormSelectChoice<Country, string> | Organization | boolean; /** * @private */ export type Organization = { id: OrganizationId; name: OrganizationName; country?: Country; type?: OrganizationType; idExtended?: string; source?: OrganizationRemoteSource; city?: string; state?: string; }; /** * @private */ export type OrganizationRemoteSource = "EMPLOYER" | "PLACE"; /** * @private */ export type OrganizationSearchResp = Organization[]; /** * @description A model to back many of this library's `<select>` elements. * For compatibility, a default for value of `string` or `number` is allowed. * Made generic to allow arbitrary types (e.g. `FormSelectChoice<Locale, string>`) */ export type FormSelectChoice<v = string | number, l = string> = { value: v; label: l; }; export type InputSelectOnKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => void; export interface FormFieldComponentProps<T = any> { onChange: (value: T) => void; value: T; intl?: InjectedIntl; autoFocus?: boolean; isErrored?: boolean; errorId?: ErrorId; isRequired?: boolean; onKeyDown?: Function; placeholder?: string; label?: JSX.Element; verificationService?: VerificationService; disabled?: boolean; } /** * @description Configurable refs that can be defined when rendering FormField components. */ export type FieldRef = { fieldId: FieldId | ExtendedFieldId; ref: HTMLElement; }; export interface VerificationServiceProps { verificationService: VerificationService; } export interface InputSelectComponentProps<T = any> { onChange: (choice: T) => void; options: FormSelectChoice[]; value: T; isErrored?: boolean; isRequired?: boolean; onKeyDown?: InputSelectOnKeyDown; placeholder?: string; label?: string | JSX.Element; intl?: InjectedIntl; suppressPlaceholder?: boolean; disabled?: boolean; } export type ErrorId = "activeDutyStartDateBeforeBirthDate" | "apiRateLimitExceeded" | "dischargeDateBeforeBirthDate" | "docReviewLimitExceeded" | "inactiveProgram" | "expiredProgram" | "expiredEmailLoopToken" | "expiredSMSCode" | "expiredVerification" | "fraudRulesReject" | "futureBirthDate" | "futureDischargeDate" | "futureActiveDutyStartDate" | "incorrectVerificationOverrideCodeAttemptLimitExceeded" | "ineligibleOrganization" | "internalServerError" | "invalidActiveDutyStartDate" | "invalidAddress" | "invalidApiToken" | "invalidBirthDate" | "invalidCity" | "invalidCountry" | "invalidCvecNumber" | "invalidDischargeDate" | "invalidDocUploadToken" | "invalidEbtCardNumber" | "invalidEmail" | "invalidFileSizeEmpty" | "invalidFileSizeMax" | "invalidFirstName" | "invalidFirstResponderStatus" | "invalidLastName" | "invalidMemberId" | "invalidMilitaryStatus" | "invalidNumberOfFiles" | "invalidOptIn" | "invalidOrganization" | "invalidOverrideCode" | "invalidPhoneNumber" | "invalidPostalCode" | "invalidProgram" | "invalidRequest" | "invalidSMSCode" | "invalidSocialSecurityNumber" | "invalidState" | "invalidStatus" | "invalidStatuses" | "invalidDriverLicenseNumber" | "invalidStep" | "invalidAuthenticationLoopToken" | "marketConsentRequired" | "maxMetadataLengthExceeded" | "maxMetadataValuesExceeded" | "maxSMSCodeLimitExceeded" | "incorrectSMSCodeAttemptLimitExceeded" | "noProgram" | "noRemainingRewardCodes" | "notApproved" | "notFound" | "noValidFiles" | "noVerification" | "outsideAgePerson" | "simulatedError" | "unauthorizedAccountStatus" | "unauthorizedDomain" | "underagePerson" | "unknownError" | "unsupportedDocMimeType" | "verificationLimitExceeded" | "invalidEmailLoopToken" | "missingRequiredMetadata" | "missingRequiredExternalId" | "invalidAuthenticationLoopToken" | "duplicateFile" | NetworkErrorId; export type NetworkErrorId = "failedToFetch" | "requestTimeout"; export type ExtendedErrorId = string | undefined; export type ErrorDetailId = "govIdOtherFailure" | "govIdMismatch" | "govIdRetakeBiometric" | "govIdRetakeId" | "govIdUnsupportedDoc" | "personLimit" | "troubleVerifying" | "unableToVerify" | "vpnsNotAllowed"; export type RejectionReasons = "DOCUMENT_UNREADABLE" | "DOCUMENT_PASSWORD_PROTECTED" | "DOCUMENT_LIKELY_FRAUD" | "DOCUMENT_UNSUPPORTED" | "DOCUMENT_HANDWRITTEN" | "MISSING_INFORMATION" | "MISSING_INFORMATION_PERSON_NAME" | "MISSING_INFORMATION_ORGANIZATION_NAME" | "DOCUMENT_EXPIRED" | "DOCUMENT_OUTDATED" | "MISMATCH_PERSON_NAME" | "MISMATCH_ORGANIZATION" | "MISMATCH_STATUS" | "INELIGIBLE_ORGANIZATION" | "MISSING_INFORMATION_UNIVERSITY_ENROLLMENT" | "INELIGIBLE_PERSON_HIGH_SCHOOL_STUDENT" | "MISSING_INFORMATION_AFFILIATION_US_ARMED_FORCES" | "MISMATCH_COMPANY_NAME_OR_ADDRESS" | "PAYSTUB_OUTDATED_LAST_30_DAYS" | "MISSING_INFORMATION_BIRTHDATE" | "MISMATCH_BIRTHDATE" | "DOCUMENT_OUTDATED_FACULTY" | "MISSING_OR_MISMATCH_JOB_TITLE" | "RESTRICTED_DOCUMENT" | "DOCUMENT_EMAIL_SCREENSHOT" | "OTHER_CONTACT_US"; export type VerificationStep = "collectStudentPersonalInfo" | "collectTeacherPersonalInfo" | "collectMemberPersonalInfo" | "collectMilitaryStatus" | "collectActiveMilitaryPersonalInfo" | "collectInactiveMilitaryPersonalInfo" | "collectSeniorPersonalInfo" | "collectAgePersonalInfo" | "collectFirstResponderPersonalInfo" | "collectMedicalProfessionalPersonalInfo" | "collectEmployeePersonalInfo" | "collectDriverLicensePersonalInfo" | "collectGeneralIdentityPersonalInfo" | "collectHybridIdentityPersonalInfo" | "collectLicensedProfessionalPersonalInfo" | "collectLowIncomePersonalInfo" | "collectMoverPersonalInfo" | "collectSocialSecurityNumber" | "collectIdentifier" | "collectPersonalInfo" | "cancelSocialSecurityNumber" | "docUpload" | "pending" | "docReviewLimitExceeded" | "success" | "error" | "sso" | "smsLoop" | "emailLoop" | "emailLoopCollectOrganizationEmail" | "completeAuthentication" | "cancelEmailLoop" | "idCheckLoop" | "consolation" | "override" | "cancelDocUpload" | "missingRequiredMetadata" | "missingRequiredExternalId" | "thirdPartyLoop"; export type VerificationStepMap<T> = { [P in VerificationStep]: T; }; export type MockStep = VerificationStep | "loading" | "collect"; export type OverrideableComponentName = "StepStudentPersonalInfoComponent" | "StepSeniorPersonalInfoComponent" | "StepAgePersonalInfoComponent" | "StepTeacherPersonalInfoComponent" | "StepMemberPersonalInfoComponent" | "StepCollectMilitaryStatusComponent" | "StepActiveMilitaryPersonalInfoComponent" | "StepInactiveMilitaryPersonalInfoComponent" | "StepFirstResponderPersonalInfoComponent" | "StepMedicalProfessionalPersonalInfoComponent" | "StepEmploymentPersonalInfoComponent" | "StepDriverLicensePersonalInfoComponent" | "StepGeneralIdentityPersonalInfoComponent" | "StepHybridIdentityPersonalInfoComponent" | "StepLicensedProfessionalPersonalInfoComponent" | "StepLowIncomePersonalInfoComponent" | "StepMoverPersonalInfoComponent" | "StepSuccessComponent" | "StepConsolationComponent" | "StepDocUploadComponent" | "StepOverrideComponent" | "StepPendingComponent" | "StepPendingEmailLoopComponent" | "StepErrorComponent" | "StepSSOComponent" | "StepSMSLoopComponent" | "StepEmailLoopComponent" | "StepIDCheckLoopComponent" | "StepSocialSecurity" | "StepCollectIdentifierComponent" | "StepCompleteAuthentication" | "StepCollectPersonalInfo" | "StepThirdPartyLoopComponent"; export type StepComponent = React.FunctionComponent<{ verificationService: VerificationService; }>; export type Segment = "student" | "military" | "teacher" | "member" | "senior" | "age" | "firstResponder" | "medical" | "employment" | "identity" | "licensedProfessional" | "recentMover" | "lowIncome"; export type SubSegment = "college" | "highSchool" | "police" | "emt" | "fireFighter" | "nurse" | "doctor" | "driverLicense" | "generalIdentity" | "hybridIdentity" | "licensedCosmetologists" | "licensedRealState" | "homeBuyer" | "otherMover" | "snapBenefits" | SubSegmentMilitary; export type SubSegmentMilitary = "activeDuty" | "reservist" | "veteran" | "retiree" | "militaryFamily" | "goldStarFamily"; export type OrganizationType = "UNIVERSITY" | "POST_SECONDARY" | "MEMBERSHIP" | "MILITARY" | "FIRST_RESPONDER" | "MEDICAL" | "NON_PROFIT" | "CORPORATE" | "K12" | "AGE_ID" | "HIGH_SCHOOL" | "NONE" | "LOW_INCOME_PROGRAM"; export type NewVerificationRequest = { programId: DatabaseId; trackingId?: string; installPageUrl?: string; }; export type AllStatuses = MilitaryStatus | MedicalProfessionalStatus | FirstResponderStatus | RecentMoverStatus | LicensedProfessionalStatus | LowIncomeStatus | RecentMoverStatus; /** * @description The request to submit when verification is on the step "collectStudentPersonalInfo" */ export type StudentPersonalInfoRequest = { birthDate: BirthDate; cvecNumber?: string; } & WithOrganization & WithCoreFields; export type StudentPersonalInfoViewModel = StudentPersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; /** * @description The request to submit when verification is on the step "collectSeniorPersonalInfo" */ export type SeniorPersonalInfoRequest = { birthDate: BirthDate; postalCode: string; } & WithCoreFields; export type SeniorPersonalInfoViewModel = SeniorPersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; /** * @description The request to submit when verification is on the step "collectAgePersonalInfo" */ export type AgePersonalInfoRequest = { birthDate: BirthDate; postalCode: string; phoneNumber: PhoneNumber; country: Country; city?: string; address1?: string; } & WithCoreFields; export type AgePersonalInfoViewModel = AgePersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; /** * @description The request to submit when verification is on the step "collectMilitaryStatus" */ export type MilitaryStatusRequest = { status: MilitaryStatus; }; /** * @description The request to submit when verification is on the step "collectActiveMilitaryPersonalInfo" */ export type ActiveMilitaryPersonalInfoRequest = { birthDate: BirthDate; dischargeDate?: DischargeDate; activeDutyStartDate?: ActiveDutyStartDate; country?: Country; } & WithOrganization & WithCoreFields; export type ActiveMilitaryPersonalInfoViewModel = { status: MilitaryStatus; } & ActiveMilitaryPersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; /** * @description The request to submit when verification is on the step "collectInactiveMilitaryPersonalInfo" */ export type InactiveMilitaryPersonalInfoRequest = { birthDate: BirthDate; dischargeDate: DischargeDate; activeDutyStartDate?: ActiveDutyStartDate; country?: Country; } & WithOrganization & WithCoreFields; export type InactiveMilitaryPersonalInfoViewModel = { status: MilitaryStatus; city?: string; state?: State; address1?: string; postalCode?: string; } & InactiveMilitaryPersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; /** * @description The request to submit when verification is on the step "collectTeacherPersonalInfo" */ export type TeacherPersonalInfoRequest = { birthDate?: BirthDate; postalCode?: string; } & WithOrganization & WithCoreFields; export type TeacherPersonalInfoViewModel = TeacherPersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; /** * @description The request to submit when verification is on the step "collectMemberPersonalInfo" */ export type MemberPersonalInfoRequest = { memberId?: MemberId; birthDate?: BirthDate; phoneNumber?: PhoneNumber; postalCode?: string; address1?: string; city?: string; state?: string; country?: Country; } & WithOrganization & WithCoreFields; export type MemberPersonalInfoViewModel = MemberPersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; /** * @description The request to submit when verification is on the step "collectFirstResponderPersonalInfo" * Provide postalCode when organization.id = 0 for better verification results. */ export type FirstResponderPersonalInfoRequest = { birthDate: BirthDate; status: FirstResponderStatus; statuses?: FirstResponderStatus[]; postalCode?: string; country?: Country; } & WithOrganization & WithCoreFields; export type FirstResponderPersonalInfoViewModel = FirstResponderPersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; export type MedicalStatusRequest = { status: MedicalProfessionalStatus; }; /** * @description The request to submit when verification is on the step "collectMedicalProfessionalPersonalInfo" */ export type MedicalProfessionalPersonalInfoRequest = { birthDate: BirthDate; postalCode: string; status: MedicalProfessionalStatus; memberId: string; country?: Country; } & WithOrganization & WithCoreFields; export type MedicalProfessionalPersonalInfoViewModel = MedicalProfessionalPersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; /** * @description The request to submit when verification is on the step "collectEmployeePersonalInfo" */ export type EmploymentPersonalInfoRequest = { postalCode: string; phoneNumber?: PhoneNumber; shouldCollectAddress?: Boolean; country?: Country; } & WithAddress & WithOrganization & WithCoreFields; export type SMSLoopVerificationRequest = { smsCode: string; deviceFingerprintHash?: string; }; export type EmailLoopVerificationRequest = { emailToken: string; deviceFingerprintHash?: string; }; export type EmailLoopCollectOrganizationRequest = { emailAddress: string; }; export type IDCheckLoopVerificationRequest = {}; export type EmploymentPersonalInfoViewModel = EmploymentPersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; /** * @description The request to submit when verification is on the step "collectDriverLicensePersonalInfo" */ export type DriverLicensePersonalInfoRequest = { driverLicenseNumber: string; state: string; } & WithCoreFields; export type DriverLicensePersonalInfoViewModel = DriverLicensePersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; export type GeneralIdentityPersonalInfoRequest = { birthDate: BirthDate; postalCode: string; } & WithAddress & WithCoreFields; export type GeneralIdentityPersonalInfoViewModel = GeneralIdentityPersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; export type HybridIdentityPersonalInfoRequest = { birthDate: BirthDate; postalCode: string; driverLicenseNumber: string; } & WithAddress & WithCoreFields; export type HybridIdentityPersonalInfoViewModel = HybridIdentityPersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; /** * @description The request to submit when verification is on the step "collectLicensedProfessionalPersonalInfo" */ export type LicensedProfessionalPersonalInfoRequest = { birthDate: BirthDate; postalCode: string; statuses: LicensedProfessionalStatus[]; } & WithCoreFields & WithOrganization; export type LicensedProfessionalPersonalInfoViewModel = LicensedProfessionalPersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; /** * @description The request to submit when verification is on the step "collectMoverPersonalInfo" */ export type MoverPersonalInfoRequest = { address1: string; postalCode: string; statuses: RecentMoverStatus[]; } & WithCoreFields; export type MoverPersonalInfoViewModel = MoverPersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; export type SocialSecurityRequest = { socialSecurityNumber: number; }; export type SocialSecurityResponse = { verificationId: DatabaseId; submissionUrl: string; cancelUrl: string; currentStep: "collectSocialSecurityNumber"; errorIds?: [ErrorId]; } & WithLocaleAndCountryAndSegment; export type SocialSecurityViewModel = { socialSecurityNumber: string; metadata?: Metadata; } & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; /** * @description The request to submit when verification is on the step "collectLowIncomePersonalInfo" */ export type LowIncomePersonalInfoRequest = { birthDate: BirthDate; postalCode: string; statuses: LowIncomeStatus[]; ebtCardNumber?: string; } & WithCoreFields & WithAddress & Partial<WithOrganization>; export type LowIncomePersonalInfoViewModel = LowIncomePersonalInfoRequest & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; export type CollectIdentifierRequest = { email: string; }; export type CollectIdentifierResponse = { submissionUrl: string; } & VerificationResponse; export type CollectIdentifierViewModel = { email: string; transactionId: string; expirationTimestamp: string; remembered: boolean; metadata?: Metadata; } & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; export type CompleteAuthenticationRequest = { authenticationToken: string; }; export type CompleteAuthenticationResponse = { cancelUrl: string; submissionUrl: string; } & VerificationResponse; export type CompleteAuthenticationViewModel = { authenticationCode?: string; email?: string; didManuallyVerify?: boolean; metadata?: Metadata; } & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; export type CollectPersonalInfoRequest = { driverLicenseNumber?: string; memberId?: MemberId; postalCode?: string; ebtCardNumber?: string; statuses?: AllStatuses[]; birthDate?: BirthDate; socialSecurityNumber?: string; dischargeDate?: DischargeDate; activeDutyStartDate?: ActiveDutyStartDate; country?: Country; } & Partial<WithCoreFields> & Partial<WithOrganization> & Partial<WithAddress>; /** * Response from REST API indicating that CollectPersonalInfoViewModel is expected to be submitted next. */ export type CollectPersonalInfoResponse = { submissionUrl: string; availableStatuses?: AllStatuses[]; country?: string; currentStep: "collectPersonalInfo"; segment: Segment; subSegment: SubSegment | SubSegmentMilitary; errorIds?: [ErrorId]; instantMatchAttempts?: number; } & VerificationResponse; export type CollectPersonalInfoViewModel = { driverLicenseNumber?: string; memberId?: MemberId; postalCode?: string; ebtCardNumber?: string; status?: AllStatuses; statuses?: AllStatuses[]; birthDate?: BirthDate; socialSecurityNumber?: string; dischargeDate?: DischargeDate; activeDutyStartDate?: ActiveDutyStartDate; } & Partial<WithCoreFields> & Partial<WithOrganization> & Partial<WithAddress> & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; /** * @description The request to submit when verification is on the step "docUpload" */ export type DocUploadRequest = { file1: File; file2?: File; file3?: File; metadata?: Metadata; }; /** * @description The request to enter a verification override code when it is on the step "override" */ export type OverrideVerificationRequest = { overrideCode: string; deviceFingerprintHash?: string; }; export type DocUploadViewModel = DocUploadRequest & { erroredFileNames?: string[]; } & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; export type SingleSignOnViewModel = { isSingleSignOnActive: boolean; metadata?: Metadata; } & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; export type OverrideViewModel = OverrideVerificationRequest & { overrideCode: string; deviceFingerprintHash?: string; metadata?: Metadata; } & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; export type SMSLoopViewModel = { smsCode: string; phoneNumber: string; metadata?: Metadata; deviceFingerprintHash?: string; } & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; export type EmailLoopViewModel = { emailToken: string; organizationEmail?: string; metadata?: Metadata; deviceFingerprintHash?: string; } & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; export type EmailLoopCollectOrganizationEmailViewModel = { organizationEmail?: string; metadata?: Metadata; deviceFingerprintHash?: string; } & WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; export type IDCheckLoopViewModel = WithLocaleChoiceAndCountryChoice & WithFieldsToSkipValidation; export type VerificationRequest = StudentPersonalInfoRequest | AgePersonalInfoRequest | SeniorPersonalInfoRequest | TeacherPersonalInfoRequest | MemberPersonalInfoRequest | MilitaryStatusRequest | ActiveMilitaryPersonalInfoRequest | InactiveMilitaryPersonalInfoRequest | DocUploadRequest | OverrideVerificationRequest | FirstResponderPersonalInfoRequest | MedicalProfessionalPersonalInfoRequest | EmploymentPersonalInfoRequest | SocialSecurityRequest | SMSLoopVerificationRequest | EmailLoopVerificationRequest | DriverLicensePersonalInfoRequest | GeneralIdentityPersonalInfoRequest | HybridIdentityPersonalInfoRequest | LicensedProfessionalPersonalInfoRequest | LowIncomePersonalInfoRequest | MoverPersonalInfoRequest | CollectIdentifierRequest | CompleteAuthenticationRequest | CollectPersonalInfoRequest; export type ViewModel = StudentPersonalInfoViewModel | SeniorPersonalInfoViewModel | AgePersonalInfoViewModel | TeacherPersonalInfoViewModel | MemberPersonalInfoViewModel | ActiveMilitaryPersonalInfoViewModel | InactiveMilitaryPersonalInfoViewModel | DocUploadViewModel | SingleSignOnViewModel | OverrideViewModel | FirstResponderPersonalInfoViewModel | MedicalProfessionalPersonalInfoViewModel | EmploymentPersonalInfoViewModel | SocialSecurityViewModel | SMSLoopViewModel | EmailLoopViewModel | EmailLoopCollectOrganizationEmailViewModel | DriverLicensePersonalInfoViewModel | GeneralIdentityPersonalInfoViewModel | HybridIdentityPersonalInfoViewModel | LicensedProfessionalPersonalInfoViewModel | LowIncomePersonalInfoViewModel | MoverPersonalInfoViewModel | CollectIdentifierViewModel | CompleteAuthenticationViewModel | CollectPersonalInfoViewModel; export type PersonalInfoViewModel = StudentPersonalInfoViewModel | SeniorPersonalInfoViewModel | AgePersonalInfoViewModel | TeacherPersonalInfoViewModel | MemberPersonalInfoViewModel | ActiveMilitaryPersonalInfoViewModel | InactiveMilitaryPersonalInfoViewModel | FirstResponderPersonalInfoViewModel | MedicalProfessionalPersonalInfoViewModel | EmploymentPersonalInfoViewModel | DriverLicensePersonalInfoViewModel | GeneralIdentityPersonalInfoViewModel | HybridIdentityPersonalInfoViewModel | LicensedProfessionalPersonalInfoViewModel | LowIncomePersonalInfoViewModel | MoverPersonalInfoViewModel; export type WithOrganization = { organization: Organization; }; export type WithAddress = { address1: string; city: string; state: string; }; export type WithCoreFields = { firstName: string; lastName: string; email: Email; phoneNumber?: PhoneNumber; metadata?: Metadata; deviceFingerprintHash?: string; locale?: Locale; externalUserId?: string; }; export type WithFieldsToSkipValidation = { fieldsToSkipValidation?: FieldId[]; }; export type WithLocaleChoiceAndCountryChoice = { countryChoice: FormSelectChoice<Country, string>; localeChoice: FormSelectChoice<Locale, string>; }; export type AddSchoolRequestViewModel = { programId: string; firstName: string; lastName: string; email: string; schoolCountry: Country; schoolName: string; schoolDomain: string; trackingId?: string; }; export type WithLocaleAndCountryAndSegment = { segment: Segment; subSegment: SubSegment; locale: Locale; country?: Country; }; /** * @description Base type for all responses */ export type VerificationResponse = { submissionUrl?: string; verificationId: DatabaseId; currentStep: VerificationStep; errorIds?: ErrorId[]; maxAge?: number; minAge?: number; lastResponse?: VerificationResponse; } & WithLocaleAndCountryAndSegment; /** * @description Intersection type for all *PersonalInfo responses */ export type PersonalInfoResponse = StudentPersonalInfoResponse | SeniorPersonalInfoResponse | AgePersonalInfoResponse | TeacherPersonalInfoResponse | MemberPersonalInfoResponse | ActiveMilitaryPersonalInfoResponse | InactiveMilitaryPersonalInfoResponse | FirstResponderPersonalInfoResponse | MedicalProfessionalPersonalInfoResponse | EmploymentPersonalInfoResponse | DriverLicensePersonalInfoResponse | GeneralIdentityPersonalInfoResponse | HybridIdentityPersonalInfoResponse | LicensedProfessionalPersonalInfoResponse | LowIncomePersonalInfoResponse | MoverPersonalInfoResponse | CollectPersonalInfoResponse; export type AllResponseTypes = PersonalInfoResponse | SSOResponse | DocUploadResponse | SMSLoopResponse | EmailLoopResponse | IDCheckLoopResponse | SuccessResponse | ConsolationResponse | OverrideResponse | ErrorResponse | PendingResponse | SocialSecurityResponse | MilitaryStatusResponse | CollectIdentifierResponse | CompleteAuthenticationResponse | CollectPersonalInfoResponse | ThirdPartyLoopResponse; /** * @description Response from REST API indicating that StudentPersonalInfoViewModel is expected to be submitted next. */ export type StudentPersonalInfoResponse = { submissionUrl: string; currentStep: "collectStudentPersonalInfo"; segment: "student"; subSegment: null; errorIds?: [ErrorId]; instantMatchAttempts?: number; } & VerificationResponse; /** * @description Response from REST API indicating that SeniorPersonalInfoViewModel is expected to be submitted next. */ export type SeniorPersonalInfoResponse = { submissionUrl: string; currentStep: "collectSeniorPersonalInfo"; segment: "senior"; subSegment: null; errorIds?: [ErrorId]; instantMatchAttempts?: number; } & VerificationResponse; /** * @description Response from REST API indicating that AgePersonalInfoViewModel is expected to be submitted next. */ export type AgePersonalInfoResponse = { submissionUrl: string; currentStep: "collectAgePersonalInfo"; segment: "age"; subSegment: null; errorIds?: [ErrorId]; instantMatchAttempts?: number; minAge?: number; maxAge?: number; } & VerificationResponse; /** * @description Response from REST API indicating that TeacherPersonalInfoViewModel is expected to be submitted next. */ export type TeacherPersonalInfoResponse = { submissionUrl: string; currentStep: "collectTeacherPersonalInfo"; segment: "teacher"; subSegment: null; errorIds?: [ErrorId]; instantMatchAttempts?: number; } & VerificationResponse; export type MemberPersonalInfoResponse = { submissionUrl: string; currentStep: "collectMemberPersonalInfo"; segment: "member"; subSegment: null; errorIds?: [ErrorId]; instantMatchAttempts?: number; } & VerificationResponse; /** * @description Response from REST API indicating that StudentPersonalInfoViewModel is expected to be submitted next. */ export type MilitaryStatusResponse = { submissionUrl: string; currentStep: "collectMilitaryStatus"; segment: "military"; errorIds?: [ErrorId]; availableStatuses?: MilitaryStatus[]; } & VerificationResponse; /** * @description Response from REST API indicating that StudentPersonalInfoViewModel is expected to be submitted next. */ export type ActiveMilitaryPersonalInfoResponse = { submissionUrl: string; currentStep: "collectActiveMilitaryPersonalInfo"; segment: "military"; errorIds?: [ErrorId]; instantMatchAttempts?: number; } & VerificationResponse; /** * @description Response from REST API indicating that StudentPersonalInfoViewModel is expected to be submitted next. */ export type InactiveMilitaryPersonalInfoResponse = { submissionUrl: string; currentStep: "collectInactiveMilitaryPersonalInfo"; segment: "military"; errorIds?: [ErrorId]; instantMatchAttempts?: number; } & VerificationResponse; export type FirstResponderPersonalInfoResponse = { submissionUrl: string; currentStep: "collectFirstResponderPersonalInfo"; segment: "firstResponder"; errorIds?: [ErrorId]; availableStatuses?: FirstResponderStatus[]; instantMatchAttempts?: number; } & VerificationResponse; export type MedicalProfessionalPersonalInfoResponse = { submissionUrl: string; currentStep: "collectMedicalProfessionalPersonalInfo"; segment: "medical"; errorIds?: [ErrorId]; availableStatuses?: MedicalProfessionalStatus[]; instantMatchAttempts?: number; } & VerificationResponse; export type EmploymentPersonalInfoResponse = { submissionUrl: string; currentStep: "collectEmployeePersonalInfo"; segment: "employment"; subSegment: null; errorIds?: [ErrorId]; instantMatchAttempts?: number; } & VerificationResponse; /** * @description Response from REST API indicating that DriverLicensePersonalInfoViewModel is expected to be submitted next. */ export type DriverLicensePersonalInfoResponse = { submissionUrl: string; currentStep: "collectDriverLicensePersonalInfo"; segment: "identity"; errorIds?: [ErrorId]; instantMatchAttempts?: number; } & VerificationResponse; export type GeneralIdentityPersonalInfoResponse = { submissionUrl: string; currentStep: "collectGeneralIdentityPersonalInfo"; segment: "identity"; errorIds?: [ErrorId]; instantMatchAttempts?: number; } & VerificationResponse; export type HybridIdentityPersonalInfoResponse = { submissionUrl: string; currentStep: "collectHybridIdentityPersonalInfo"; segment: "identity"; errorIds?: [ErrorId]; instantMatchAttempts?: number; } & VerificationResponse; export type LicensedProfessionalPersonalInfoResponse = { submissionUrl: string; currentStep: "collectLicensedProfessionalPersonalInfo"; segment: "licensedProfessional"; availableStatuses?: LicensedProfessionalStatus[]; errorIds?: [ErrorId]; instantMatchAttempts?: number; } & VerificationResponse; export type MoverPersonalInfoResponse = { submissionUrl: string; currentStep: "collectMoverPersonalInfo"; segment: "recentMover"; availableStatuses?: RecentMoverStatus[]; errorIds?: [ErrorId]; instantMatchAttempts?: number; } & VerificationResponse; export type LowIncomePersonalInfoResponse = { submissionUrl: string; currentStep: "collectLowIncomePersonalInfo"; segment: "lowIncome"; availableStatuses?: LowIncomeStatus[]; errorIds?: [ErrorId]; instantMatchAttempts?: number; } & VerificationResponse; /** * @description Response from REST API indicating that DocUploadRequest is expected to be submitted next. */ export type DocUploadResponse = { verificationId: DatabaseId; submissionUrl: string; currentStep: "docUpload"; errorIds?: [ErrorId]; rejectionReasons?: RejectionReasons[]; maxReviewTime?: MaxReviewTime; estimatedReviewTime?: EstimatedReviewTime; } & WithLocaleAndCountryAndSegment; /** * @description Response from REST API indicating that SSO is expected to be submitted next. */ export type SSOResponse = { verificationId: DatabaseId; loginUrl: string; cancelUrl: string; currentStep: "sso"; errorIds?: [ErrorId]; } & WithLocaleAndCountryAndSegment; export type ThirdPartyLoopResponse = { verificationId: DatabaseId; loginUrl: string; cancelUrl: string; currentStep: "thirdPartyLoop"; thirdPartyLoopProvider: ThirdPartyLoopProvider; errorIds?: [ErrorId]; } & WithLocaleAndCountryAndSegment; export type SMSLoopResponse = { verificationId: DatabaseId; submissionUrl: string; errorIds?: [ErrorId]; currentStep: "smsLoop"; } & WithLocaleAndCountryAndSegment; export type EmailLoopResponse = { verificationId: DatabaseId; submissionUrl: string; errorIds?: [ErrorId]; currentStep: "emailLoop"; currentState: "collectOrganizationEmail" | "pending"; canResendEmailLoop: boolean; cancelUrl: string; } & WithLocaleAndCountryAndSegment; export type IDCheckLoopResponse = { verificationId: DatabaseId; submissionUrl: string; errorIds?: [ErrorId]; currentStep: "idCheckLoop"; sdkToken?: string; idCheckServiceType?: IdCheckLoopServiceType; uploadUrl?: string; } & WithLocaleAndCountryAndSegment; /** * @description Response from REST API. No further requests are expected. */ export type SuccessResponse = { verificationId: DatabaseId; currentStep: "success"; rewardCode: string; redirectUrl?: string; rewardData?: string[]; consumerInfoState?: ConsumerInfoState; } & WithLocaleAndCountryAndSegment; /** * @description Response from REST API. No further requests are expected. */ export type ConsolationResponse = { verificationId: DatabaseId; currentStep: "consolation"; consolationRewardCode: string; segment: Segment; subSegment: SubSegment; redirectUrl?: string; } & WithLocaleAndCountryAndSegment; /** * @description Response from REST API. No further requests are expected. */ export type OverrideResponse = { verificationId: DatabaseId; currentStep: "override"; segment: Segment; subSegment: SubSegment; submissionUrl: string; errorIds?: [ErrorId]; } & WithLocaleAndCountryAndSegment; /** * @description Response from REST API. Unrecoverable error. No further requests are expected. Recommend starting over. */ export interface ErrorResponse extends Omit<VerificationResponse, "subSegment">, Omit<WithLocaleAndCountryAndSegment, "subSegment"> { verificationId: DatabaseId; currentStep: "error"; subSegment: SubSegment | null; errorIds: [ErrorId]; errorDetailId?: ErrorDetailId; redirectUrl: string | null; } /** * @description Response from REST API. Poll statusUrl for updates while document is reviewed. */ export type PendingResponse = { verificationId: DatabaseId; currentStep: "pending"; statusUrl: string; maxReviewTime?: MaxReviewTime; estimatedReviewTime?: EstimatedReviewTime; } & WithLocaleAndCountryAndSegment; export type FieldDescription = { key: FieldId; }; export type FieldsToCollect = { required: FieldDescription[]; optional: FieldDescription[]; }; export type CollectFieldsResponse = { verificationId: DatabaseId; currentStep: VerificationStep; fieldsToCollect: FieldsToCollect; } & WithLocaleAndCountryAndSegment; export type DocTypeResult = { [country: string]: { documentType: any; }[]; }; export type ApplicableDocTypesResponse = { results: DocTypeResult; }; export type ConsumerInfoState = "consumerNotFound" | "consumerFound" | "consumerFoundNewFieldsAvailable" | "consumerFoundNotActionable" | "UNKNOWN"; /** * @description Theme information about the Program that was created at my.sheerid.com */ export type ProgramTheme = { intl: { locale: Locale; messages: ProgramThemeMessages; }; customCss: string; /** @deprecated - Use themeChoices.logoUrl instead */ logoUrl?: string; privacyPolicyUrl?: string; isTestMode?: boolean; openOrgSearchEnabled?: boolean; isSmsNotifierConfigured?: boolean; remainingRewardCodes?: number | null; smsLoopEnabled?: boolean; overrideEnabled?: boolean; threatMetrixEnabled?: boolean; idCheckAddOnEnabled?: boolean; ipqsDeviceFingerprintEnabled?: boolean; strictMilitaryValidationEnabled?: boolean; transitionalMilitaryValidityDays?: number; docUploadEnabled?: boolean; affinityProgramEnabled?: boolean; externalUserIdRequired?: boolean; config: { brandInfo?: { faqUrl: string | null; emailAddress: string | null; phoneNumber: string | null; }; countries: Country[]; states?: State[]; locales: Locale[]; maxReviewTime: MaxReviewTime; estimatedReviewTime: EstimatedReviewTime; marketConsent: MarketConsentOptions; customFaqLink: FaqUrl; customMetadata: MetadataConfig; orgSearchUrl: string; orgRemoteSource?: OrganizationRemoteSource; orgTypes: OrganizationType[]; excludedOrganizationIds: number[]; orgSearchCountryTags?: { [country in Country]?: string[]; }; orgSearchAffiliationOverrides?: { [a: string]: { [a: string]: string[]; }; }; offerType: "noCode" | "staticCode" | "rewardPool" | undefined; minAge: number | null; maxAge: number | null; rewardDisplay: RewardDisplayEnum[]; onfidoReportNames?: string[]; onfidoIncludedCountries?: string[]; segment?: Segment; }; accountId?: string; themeChoices: { logoUrl?: string; font?: string; backgroundColor?: string; primaryFontColor?: string; buttonColor?: string; buttonFontColor?: string; linkColor?: string; h1FontColor?: string; helperFontColor?: string; customCss?: string; landingPage: { logoUrl?: string; backgroundImageUrl?: string; backgroundColor?: string; primaryFontColor?: string; layout?: VerificationFormLayout; }; }; }; export type EstimatedReviewTime = "A_FEW_MINUTES" | "A_HALF_HOUR" | "A_FEW_HOURS" | "A_FEW_DAYS"; export type MaxReviewTime = "2_MIN" | "20_MIN" | "A_HALF_HOUR" | "2_HRS" | "24_HRS" | "2_DAY" | "3_DAY"; export type FaqUrl = string; /** * @description List of countries supported by SheerID */ export type Country = keyof Cou