UNPKG

@twilio/flex-ui

Version:

Twilio Flex UI

20 lines (19 loc) 715 B
export declare const SESSION_IDENTIFIER_KEY = "flex_session_identifier"; export declare const sessionIdentifierTaskAttributesKeys: { TASK_CREATED: string; }; /** * Returns the unique ID for the current Flex UI session. * This method is to be used to prevent FE orchestrations from happening multiple times when multiple instances of Flex UI are open concurrently. * @private * @example * import * as Flex from "@twilio/flex-ui" * * const sessionId = Flex.getSessionIdentifier() * * if (taskAttributes.flex_session_identifier_task_created === sessionId) { * // do your orchestration here * } * @return {string} Unique session identifier */ export declare const getSessionIdentifier: () => string;