/** @ignore */ export declare interface DtRuntimeAppEnvironment { getAppId(): string; getAppName(): string; getAppVersion(): string; getEnvironmentId(): string; getEnvironmentUrl(): string; getCurrentUserDetails(): UserDetails; } /** * Retrieves the app id. * * @returns {string} app id defined in app config. * * *Note:* If the Dynatrace JavaScript runtime isn't available, 'dt.missing.app.id' will be returned and a warning will be logged to the console. * * @example Code example * import { getAppId } from '@dynatrace-sdk/app-environment'; * * // Get the current app's ID * const appId = getAppId(); */ export declare function getAppId(): string; /** * Retrieves the app name. * * @returns {string} app name defined in app config. * * *Note:* If the Dynatrace JavaScript runtime isn't available, 'dt.missing.app.name' will be returned and a warning will be logged to the console. * * @example Code example * import { getAppName } from '@dynatrace-sdk/platform/app-environment'; * * // Get the current app's name * const appName = getAppName(); */ export declare function getAppName(): string; /** * Retrieves the app version. * * @returns {string} app version defined in app manifest. * * *Note:* If the Dynatrace JavaScript runtime isn't available, 'dt.missing.app.version' will be returned and a warning will be logged to the console. * * @example Code example * import { getAppVersion } from '@dynatrace-sdk/platform/app-environment'; * * // Get the current app's version * const appVersion = getAppVersion(); */ export declare function getAppVersion(): string; /** * Retrieves the information about currently logged user * * @returns {UserDetails} id, name and email of currently logged user. * * *Note:* If the Dynatrace JavaScript runtime isn't available, a default UserDetails placeholder object with values * ('dt.missing.user.id', 'dt.missing.user.name', 'dt.missing.user.email') will be returned and a warning will be logged to the console. * * @example Code example * import { getCurrentUserDetails } from '@dynatrace-sdk/platform/app-environment'; * * // Get the details of the currently logged-in user * const userDetails = getCurrentUserDetails(); * * // Use destructuring to extract specific properties * const { id, name, email } = getCurrentUserDetails(); */ export declare function getCurrentUserDetails(): UserDetails; /** * Retrieves the environment id. * * @returns {string} environment id on which app is run. * * *Note:* If the Dynatrace JavaScript runtime isn't available, 'dt.missing.environment.id' will be returned and a warning will be logged to the console. * * @example Code example * import { getEnvironmentId } from '@dynatrace-sdk/platform/app-environment'; * * // Get the current environment ID * const environmentId = getEnvironmentId(); */ export declare function getEnvironmentId(): string; /** * Retrieves the environment url. * * @returns {string} environment url on which app is run. * * *Note:* If the Dynatrace JavaScript runtime isn't available, 'https://dynatrace.com/' will be returned and a warning will be logged to the console. * * @example Code example * import { getEnvironmentUrl } from '@dynatrace-sdk/platform/app-environment'; * * // Get the current environment URL * const environmentUrl = getEnvironmentUrl(); */ export declare function getEnvironmentUrl(): string; /** * Information about currently logged user */ export declare interface UserDetails { id: string; name: string; email: string; } export { }