# @dynatrace/dtrum-api-types

> Typescript types for the Dynatrace RUM JavaScript dtrum.* API

Latest version **1.349.1** (published 2026-09-18) · SEE LICENSE IN LICENSE.md license · 0 weekly downloads

## Install

```sh
npm install @dynatrace/dtrum-api-types
pnpm add @dynatrace/dtrum-api-types
yarn add @dynatrace/dtrum-api-types
bun add @dynatrace/dtrum-api-types
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.349.1 |
| Published | 2026-09-18 |
| First published | 2021-07-19 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE.md |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 33.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dynatrace |
| Maintainers | dynatrace-nodejs, kamtschatka, dyladan, toddbaert |
| Keywords | dynatrace, jsagent, dtrum, api, typescript, types |

## Links

- npm: https://www.npmjs.com/package/@dynatrace/dtrum-api-types
- Homepage: https://www.dynatrace.com
- npm.io page: https://npm.io/package/@dynatrace/dtrum-api-types

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.349.1 (latest) — 2026-09-18
- 1.343.3 (pr-1.343.3) — 2026-06-29
- 1.341.4 (pr-1.341.4) — 2026-06-22
- 1.341.3 (pr-1.341.3) — 2026-06-11
- 1.339.9 (pr-1.339.9) — 2026-06-03
- 1.341.2 (pr-1.341.2) — 2026-06-03
- 1.341.1 (pr-1.341.1) — 2026-05-29
- 1.339.8 (pr-1.339.8) — 2026-05-26
- 1.337.12 (pr-1.337.12) — 2026-05-26
- 1.339.7 (pr-1.339.7) — 2026-05-26
- 1.339.6 (pr-1.339.6) — 2026-05-20
- 1.337.11 (pr-1.337.11) — 2026-05-18
- 1.339.5 (pr-1.339.5) — 2026-05-18
- 1.335.7 (pr-1.335.7) — 2026-05-18
- 1.337.10 (pr-1.337.10) — 2026-05-08
- … 94 more at https://npm.io/package/@dynatrace/dtrum-api-types/versions

## README

# Dynatrace Dtrum Api Types
This package contains the Typescript type information for the dtrum.* API of the RUM Classic JavaScript.

Keep in mind that when the RUM Classic JavaScript is updated, this type package might not provide accurate types.
Version: 1.349.1

## Installation
> npm install --save-dev @dynatrace/dtrum-api-types

## Configuration
Make sure to add these paths to `"typeRoots"` in tsconfig.json under `"compilerOptions"`
```
"typeRoots": ["./node_modules/@types", "./node_modules/@dynatrace/"],
```

## Usage examples
Type inference works out of the box for dtrum calls.
```
if (window.dtrum) {
    window.dtrum.identifyUser("exampleId");
} else {
    // handle missing dtrum api
}
```

In case some specific types or enums are needed, you can import them from `dtrum` types library.
```
import { ActionNameResult } from '@dynatrace/dtrum-api-types';

if (window.dtrum) {
    const result = window.dtrum.actionName("exampleName");
    switch(result) {
      case ActionNameResult.SUCCESS:
      // handle success...
      break;
      case ActionNameResult.ACTION_NOT_FOUND:
      // handle action not found...
      break;
      //etc...
    }
} else {
    // handle missing dtrum api
}
```

---
_Source: https://npm.io/package/@dynatrace/dtrum-api-types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
