/** * @license * Copyright (c) 2021, 2024, Oracle and/or its affiliates. * Licensed under The Universal Permissive License (UPL), Version 1.0 * as shown at https://oss.oracle.com/licenses/upl/ * @ignore */ import { IADebugFlowSession, IAFlowSession } from "./IAFlowEngineAPI"; /** * The SDK version. */ export declare const IASDKVersion: string; /** * The mode used to resume the session * * @remarks Options type are: * - latestVersion - resumes the flow using the latest deployed version * - sameVersion - resumes the flow using the same version as was used to create the stored session * * @see {@link IACreateSessionParams} */ export type IAResumeMode = "latestVersion" | "sameVersion"; /** * Parameters to start a flow session */ export interface IACreateSessionParams { /** * The JWT session token acquired by sending request to webDeterminationsURL/flow/start. * Must be created with an action of "startOrResume" */ jwt: string; /** * If specified, signified this session should restore its state from a {@link storedSessionState}. * */ resumeMode?: IAResumeMode; /** * The session state used to restore the flow session. Is required if {@link resumeMode} is specified. * @see {@link IAFlowSession.getSessionState} */ storedSessionState?: string; /** * Optional global input data to set at the beginning of the flow * @see {@link IAFlowSession.globalInputDataDefinition} * @see {@link IAFlowSession.setGlobalInputData} */ globalInputData?: any; } export declare const isBrowserEnv: () => boolean; /** * Creates a Flow Session. * @param props - The set of {@link IACreateSessionParams} use to create the session * @returns A promise of that resolves to the newly created flow session. * * @throws string - an error message if the flow session can not be created */ export declare function createSession(props: IACreateSessionParams): Promise; /** * Parameters to start a debugging flow session */ export interface IACreateDebugSessionParams { /** * The JWT session token acquired by sending request to webDeterminationsURL/flow/start. The JWT session token * must be created with an action of "debug" */ jwt: string; /** * Optional global input data to set at the beginning of the flow * @see {@link IAFlowSession.globalInputDataDefinition} * @see {@link IAFlowSession.setGlobalInputData} */ globalInputData?: any; /** * The language code to use for localizing messages. The default is the flow scheme's language. */ uiLanguage?: string; } /** * Creates a flow session with debugging features enabled. This feature is only available when * running in a Web Browser. * * @param props the {@link IACreateDebugSessionParams} properties used to create the session * * @returns A promise of that resolves to the newly created flow session. * * @throws string - an error message if the flow session can not be created. */ export declare function createDebugSession(props: IACreateDebugSessionParams): Promise;