Skip to main content

App SDK API

Classes

ClassDescription
AnalyticsAnalytics scripting object that captures business analytics events and performance timing measurements, forwarding them to multiple destinations.
CMicroAppGuestMicro-frontend guest application class (singleton). Manages communication between a guest micro-app and its host application. Supports both SSF (Shared Service Framework) and App Bridge communication methods.
CMicroAppHostMicro-frontend host application class (singleton). Manages hosting and coordination of multiple micro-frontend guest applications. Provides shared services like navigation, theming, analytics, and state management.
ErrorBoundaryReact error boundary component that catches JavaScript errors in child components. Logs errors and displays a fallback UI instead of crashing the app.
GuestModuleDefault IModule implementation backed by a static parameters object. Hosts can instantiate this directly or use the createGuestModule factory for a terser API.

Interfaces

InterfaceDescription
AppConfig-
GuestProps-
UseStateSelectorOptions-

Functions

FunctionDescription
AppRootRoot component for SDK-based applications. Provides Redux store, routing, theming, error boundaries, and session management.
authorizeHandles the OAuth authorization callback after redirect from IDP. Exchanges authorization code for access token and initializes user session.
authSaga-
Autocomplete-
buildModuleParamsBuild a ModuleParameters object for a self-initializing guest.
CheckBox-
cleanupUnmounts React trees that were mounted with render.
ComboBoxDropdown/select field component with React Hook Form integration. Wraps the Dimsum ComboBox component with form state management and validation.
ComboBoxV3-
configureStoreCreates and configures the Redux store with SDK middleware and enhancers. Includes saga middleware, listener middleware, RTK Query support, and hot reloading.
ConnectForm-
createGuestModuleCreate a module scripting object for a guest micro-app. The host registers this before rendering GuestMicroApp so the guest can pull its init parameters via module.getParameters().
createManagerCreates a "manager" component that will inject the provided reducer and saga when mounted. It only renders its children after both the reducer and saga have been injected. This is the recommended way to use redux-injectors.
DateInput-
DatePickerDate picker field component with React Hook Form integration. Wraps the Dimsum DatePicker component with form state management and validation.
DateRangePicker-
DateTimePicker-
enableReactAppForHostIntegration-
fetchHostAppData-
fetchUserSettings-
FormForm component with integrated React Hook Form state management and validation. Provides form context to all child form fields and handles submission.
FormItemLayout-
FormLayoutBlockItem-
FormSubmitButton-
getApiActionCreator-
getAppConfig-
getAppConfigValueGets a value from the application configuration using dot notation. Returns a deep clone to prevent accidental mutations.
getAuthHTTPClientCreates an authenticated HTTP client instance with authorization headers. Automatically includes the current user's authorization token in all requests.
getAuthorizationHeaderGets the current authorization header value from session storage.
getHostAppDataByKey-
getHTTPClientCreates a basic HTTP client instance using Axios. The client includes request/response interceptors and automatic retry logic.
getLogger-
getMicroFrontEndAppConfig-
getNavigationLinks-
getRedirectUrl-
getSelectFieldWhy use this? It will prevent unnecessary rerenders hence improving performance, it also reduces the amount of code needed to select data from the store hence making it easier and keeping your codebase smaller and easier to maintain.
getStoreGets the global Redux store instance.
initServiceWorker-
InputMask-
InputText-
isCIBuild-
isProd-
isUserAuthorizedChecks if the user is currently authorized/authenticated.
LargeTextBox-
listenStorageEvents-
loadableCreates a lazily-loaded React component for code splitting. Wraps the component in Suspense with a customizable fallback.
loadAppConfigLoads the application configuration from a JSON file. Attempts to fetch from versioned path first, then falls back to unversioned path. Merges environment-specific configuration with base configuration.
loginInitiates the login flow using OAuth/OIDC authorization code flow. If authorization code is present in URL, completes the authorization. Otherwise, redirects to the identity provider's login page.
MaskedInputText-
notifyGuestUnloadComplete-
onAuthorizationFailureRegisters a callback to handle authorization failures (401 errors). The callback should refresh the authentication token and return the new authorization header. The SDK will automatically retry the failed request with the new token.
onGuestUnloadStart-
Page-
Radio-
RadioGroup-
redactPiiRedacts personally identifiable information (PII) from data objects. Removes sensitive data like credit cards, SSNs, emails, passwords, addresses, etc.
RegisterService-
removeDoubleSlash-
removeStorageEvents-
render-
renderHookAllows you to render a hook within a test React component without having to create that component yourself.
renderWithHostData-
renderWithRedux-
renderWithRouter-
renderWithRouterRedux-
RenderWithStateAddOns-
RequireAuthA React component that ensures authentication for its children.
sdkBaseQueryBase query function for RTK Query integration. Provides automatic error handling, authentication, and token refresh capabilities. Use this as the baseQuery for RTK Query API slices.
sendBAEventSends a business analytics event to Google Tag Manager data layer. Can send events to the host app or handle locally.
sendMessageToHost-
SessionTimeout-
setAppConfigSets the entire application configuration. Replaces the current configuration with the provided config object.
setAppConfigValueSets a value in the application configuration using dot notation. Creates nested objects if they don't exist.
setHostAppData-
setLoginParamsSets login parameters for the authentication flow. Stores parameters in the global window object for use across the application.
subscribeToResetSessionSubscribes to session reset events. The callback is invoked when the session idle time is reset.
subscribeToSessionExpirySubscribes to session expiry events. The callback is invoked when the session has expired.
subscribeToSessionExpiryWarningSubscribes to session expiry warning events. The callback is invoked when the session is about to expire (based on warning interval).
TextBoxText input field component with React Hook Form integration. Wraps the Dimsum TextBox component with form state management and validation.
Toggle-
trackActivityStarts tracking user activity for session management. Monitors user interactions on the specified element and invokes callback.
useAppDispatchReact hook to get the typed dispatch function. Provides type-safe dispatching of Redux actions.
useAppMiddleware-
useInjectQueryReact hook to dynamically inject RTK Query API slice into the Redux store. Registers the reducer and middleware for the API slice at runtime.
useInjectReducerA react hook that dynamically injects a reducer when the hook is run
useInjectSagaA react hook that dynamically injects a saga when the hook is run
useInjectSideEffect-
useMediaQueryList-
useStateSelectorGeneric selector that receives a field selector function returned from getSelectField
useStateSelectorShallowGeneric selector that receives a field selector function returned from getSelectField.
waitFor-
waitForElementToBeRemoved-
withAppDecorator-

References

CMicroApp

Renames and re-exports CMicroAppGuest

Type Aliases

Type AliasDescription
AppDispatch-
AppStore-
Await-
EMUI-
HostOptions-
HostProvidedParamsHost-provided values that can't be read from the app config.
ModuleOverridesOptional method overrides the host can supply to customise the module scripting object beyond the defaults.
OnHostInitCallback-
OnInitCallback-
OnMountCallback-
OnUnMountCallback-
RootState-
SelectStateFieldFunction-

Variables

VariableDescription
actSimply calls ReactDOMTestUtils.act(cb) If that's not available (older version of react) then it simply calls the given callback immediately
ariaLive-
auth-
authReducer-
clearSideEffectsClears all registered side effect listeners. Useful for cleanup or resetting the app state.
createSideEffectCreates a new side effect listener. Alternative API for adding listeners.
decorators-
endSessionEnds the current user session and redirects to logout page. Revokes tokens and clears session storage.
error-
errorMiddleware-
ErrorToast-
fireEvent-
FormPropsContextSide-channel context for the useForm configuration that the parent <Form> was created with.
globalConstants-
GuestMicroAppComponent to load a guest microapp
history-
httpClientProps-
logout-
MASK_PIPES-
MASK_TYPES-
memoryHistory-
MicroAppComponent to render a guest microapp
MicroIFrameAppComponent to render a guest microapp in an iframe.
NavigationPrompt-
NavigationPromptActions-
removeSideEffectRemoves a side effect listener.
resetUserIdleTimeResets the user idle time counter. Call this when user performs an action to extend their session.
screen-
startSideEffectStarts a side effect listener. Used to listen for specific actions and execute side effects.
Themes-
updateBAEventParametersUpdates the business analytics event parameters with new values
useAppSelectorReact hook to select data from Redux store with type safety. Automatically typed to the app's RootState.
VisuallyHidden-
WaitMessage-
waitMessageAction-
within-