1.283.3 • Published 3 months ago

@dynatrace/dtrum-api-types v1.283.3

Weekly downloads
-
License
Copyright (c) Dyn...
Repository
-
Last release
3 months ago

Dynatrace Dtrum Api Types

This package contains the Typescript type information for the Dtrum Api of the javascript agent.

Keep in mind that when the javascript agent is updated, this type package might not provide accurate types. Version: 1.283.3

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
}
1.283.3

3 months ago

1.281.3

3 months ago

1.273.1

8 months ago

1.275.1

8 months ago

1.271.1

8 months ago

1.279.1

6 months ago

1.277.3

6 months ago

1.269.4

8 months ago

1.265.3

8 months ago

1.267.3

8 months ago

1.259.4

1 year ago

1.261.2

1 year ago

1.263.3

1 year ago

1.257.2

1 year ago

1.255.1

1 year ago

1.253.4

1 year ago

1.251.1

2 years ago

1.249.3

2 years ago

1.243.1

2 years ago

1.247.2

2 years ago

1.245.2

2 years ago

1.241.1

2 years ago

1.239.1

2 years ago

1.237.2

2 years ago

1.235.5

2 years ago

1.233.5

2 years ago

1.231.7

2 years ago

1.229.5

2 years ago

1.227.14

2 years ago

1.225.8

3 years ago

1.223.5

3 years ago

1.221.12

3 years ago

1.219.10

3 years ago