From 29027a63d7d8394517b2d79d4e98fb1dc8ed8ccd Mon Sep 17 00:00:00 2001 From: LeeviKopakkala Date: Thu, 22 Feb 2024 17:25:19 +0200 Subject: [PATCH] Fix for required flowSteps if workflowRunId exists. --- js/config_constants.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/config_constants.ts b/js/config_constants.ts index edde379..099e109 100644 --- a/js/config_constants.ts +++ b/js/config_constants.ts @@ -30,8 +30,6 @@ export type OnfidoResult = { export type OnfidoConfig = { sdkToken: string; - workflowRunId?: string; - flowSteps: OnfidoFlowSteps; hideLogo?: boolean; logoCoBrand?: boolean; disableNFC?: boolean; @@ -40,7 +38,10 @@ export type OnfidoConfig = { ios_strings_file_name?: string; }; theme: OnfidoTheme; -}; +} & ( + | { workflowRunId: undefined; flowSteps: OnfidoFlowSteps } + | { workflowRunId: string; flowSteps?: OnfidoFlowSteps } +); export interface OnfidoError extends Error { code?: string;