@dynatrace-sdk/addons
v1.0.4
Published
Control the lifecycle of Dynatrace apps opened in addon mode.
Readme
Add-on intents
This package provides functions for controlling the lifecycle of Dynatrace apps opened in addon mode. It allows an addon app to resolve or reject the request initiated by the source app, optionally passing response data.
npm install @dynatrace-sdk/addonsExample usage
Detecting addon mode
import { getMode } from '@dynatrace-sdk/addons';
const mode = getMode();
if (mode === 'overlay') {
// App is running as an addon
}Resolving an addon request with a response
import { resolveAddonWithResponse } from '@dynatrace-sdk/addons';
// Close the add-on intent and pass data back to the source app
resolveAddonWithResponse({ status: 'confirmed', selectedItem: 'my-item' });API reference
See the package reference in the Dynatrace Developer.
