react-native-persona
Version:
Launch a mobile native implementation of the Persona inquiry flow from React Native.
22 lines (21 loc) • 842 B
TypeScript
import type { Fields } from './fields';
import type { InquiryEvent } from './InquiryEvent';
import type { StepData } from './StepData';
export type OnCompleteCallback = (inquiryId: string, status: string, fields: Fields, extraData: ExtraData) => void;
export type OnCanceledCallback = (inquiryId?: string, sessionToken?: string) => void;
export type OnErrorCallback = (error: Error, errorCode?: string) => void;
export type OnEventCallback = (event: InquiryEvent) => void;
export type OnReadyCallback = () => void;
export interface ExtraData {
collectedData: CollectedData | null;
}
export interface CollectedData {
stepData: StepData[];
}
/**
* Type for collected data that came directly from iOS/Android.
* Needs to be translated to TS classes before returning.
*/
export interface ExternalCollectedData {
stepData: any[];
}