UNPKG

@arrowhealth/bridge-sdk

Version:

Bridge SDK provides web applications the ability to integrate with the Bridge Platform.

129 lines (128 loc) 5.35 kB
import { AuthStatus, AuthUser, LoginResult, Org, Page, Patient, Platform, PushNotification, RuntimeDetails, UserSession } from './interfaces'; /** * Request from smart tile to capture user events * @returns off */ export declare function onCaptureUserEventsRequest(handle: (appId: string) => void): Function; /** * Request clear all cached items store in bridge * @returns off */ export declare function onClearCacheRequest(handle: (appId: string) => void): Function; /** * Request to close application. Can be performed by application or smart tile. * @returns off */ export declare function onCloseAppRequest(handle: (appId: string) => void): Function; /** * Request to disable tile. Can be performed by application or smart tile. * @returns off */ export declare function onDisableTileRequest(handle: (appId: string) => void): Function; /** * Request to enabled tile. Can be performed by application or smart tile. * @returns off */ export declare function onEnableTileRequest(handle: (appId: string) => void): Function; /** * Request to get the application status. Can be performed by application or smart tile. * @returns off */ export declare function onGetAuthStatusRequest(handle: (appId: string, sendResponse: (authStatus: AuthStatus) => void, data?: any) => void): Function; /** * Request to get user session. Can be performed by application or smart tile. * @returns off */ export declare function onGetAuthUserRequest(handle: (appId: string, sendResponse: (authUser: AuthUser | null) => void) => void): Function; /** * Request to get user session. Can be performed by application or smart tile. * @returns off */ export declare function onGetUserSessionRequest(handle: (appId: string, sendResponse: (userSession: UserSession | null) => void) => void): Function; /** * Request to get the org stored in chrome storage * @returns off */ export declare function onGetOrgRequest(handle: (appId: string, sendResponse: (org?: Org) => void) => void): Function; /** * Request to get page. Can be performed by application or smart tile. * @returns off */ export declare function onGetPageRequest(handle: (appId: string, deep: boolean, sendResponse: (page: Page) => void) => void): Function; /** * Request to get patient info. Can be performed by application or smart tile. * @returns off */ export declare function onGetPatientRequest(handle: (appId: string, sendResponse: (patient: Patient | null) => void) => void): Function; /** * Request to get platform (e.g. Athena info, eCW, etc.) information. Can be performed by application or smart tile. * @returns off */ export declare function onGetPlatformRequest(handle: (appId: string, respond: (platform: Platform) => void) => void): Function; /** * Request to get the details of page currently being displayed * * @param handle * @returns off */ export declare function onGetRuntimeDetailsRequest(handle: (appId: string, sendResponse: (runtimeDetails?: RuntimeDetails) => void) => void): Function; /** * Request to hide tile. Can be performed by application or smart tile. * @returns off */ export declare function onHideTileRequest(handle: (appId: string) => void): Function; export declare function onLoginRequest(handle: (appId: string, realm: string, user: string, pw: string, sendResponse: (loginResult: LoginResult) => void) => void): Function; export declare function onLogoutRequest(handle: (appId: string, sendResponse: () => void) => void): Function; /** * Request to open application. Can only be performed by smart tile. * @returns off */ export declare function onOpenAppRequest(handle: (appId: string) => void): Function; /** * Request to indicate bridge proxy is ready * * @param handle * @returns off */ export declare function onProxyReady(handle: (appId: string) => void): Function; /** * Request to push notification to bridge. Can be performed by application or smart tile. * @returns off */ export declare function onPushNotificationRequest(handle: (appId: string, notification: PushNotification) => void): Function; /** * Request from smart tile to release user events back to bridge * @returns off */ export declare function onReleaseUserEventsRequest(handle: (appId: string) => void): Function; /** * Used by the Bridge Platform and Account for applications handling their own auth through OIDC or other means * @private * @returns off */ export declare function onSetAuthStatusRequest(handle: (appId: string, status: AuthStatus) => void): Function; /** * Used by platorm to perform SSO * @returns off */ export declare function onSetAuthUserRequest(handle: (appId: string, authUser: AuthUser | null) => void): Function; /** * Request to set badge count on tile. Can be performed by application or smart tile. * @returns off */ export declare function onSetBadgeCountRequest(handle: (appId: string, count: number) => void): Function; /** * Used by platform to perform SSO * @returns off */ export declare function onSetOrgRequest(handle: (appId: string, org: Org | null) => void): Function; /** * Request to show tile. Can be performed by application or smart tile. * @returns off */ export declare function onShowTileRequest(handle: (appId: string) => void): Function; /** * Sends patient info to an application * */ export declare function setPatient(win: Window, patient: Patient | null): void;