/** * Every moment the SDK can open, with the params it requires * and the data it resolves with when completed. */ export interface MomentMap { payment_collect_pin: { params: { /** ref of the payment to collect the customer's PIN for */ paymentRef: string; }; result: void; }; } export type MomentName = keyof MomentMap; export type MomentParams = MomentMap[T]['params']; export type MomentResult = { status: 'completed'; data: MomentMap[T]['result']; } | { status: 'dismissed'; };