import { Subject } from 'rxjs'; /** * The event emitted on the observable stream of the elevation helper * This can be used by client application to detect an elevation response * was detected and handled. * If confirmed it will contain the user id who confirmed the barcode scan. * * @export * @interface IElevationEvent */ export interface IElevationEvent { barcode: string; confirmedUserId?: number; functionality: string; requestToken: string; scope: EVA.Core.FunctionalityScope; serviceContext: string; serviceName: string; status: 'ACTIVE' | 'CONFIRMED' | 'EXPIRED'; } /** * The elevation helper is provided any 403 responses from core.fetch that contain headers * indicating an elevated permission check could allow the call to proceed. * * @export * @class ElevationHelper */ export declare class ElevationHelper { /** * This observable stream will emit when a service response is received that contains * elevation headers and needs manager approval * * @type {Subject} */ elevationEvent$: Subject; /** * Returns a copy of the currently active elevation event (if any) */ getCurrentElevationEvent(): IElevationEvent | undefined; /** * The currently active elevation event * * @private * @type {(IElevationEvent | undefined)} */ private currentElevationEvent; /** * Private helper object to translate returned header values to enum raw values * * @private */ private elevationScopeValues; /** * If he core fetch implementation encounters a 403 will pass it to this method. * This method will check for the elevation headers and then generate * the elevation barcode and connect to the elevation signalr hub if needed * * @param {{ * response: Response, * }} { * response, * } */ checkForElevationResponse({ serviceName, response, serviceContext, }: { serviceName: string; response: Response; serviceContext: string; }): Promise; } export declare const elevationHelper: ElevationHelper;