1.301.7 • Published 2 months ago

@dynatrace/dtrum-api-types v1.301.7

Weekly downloads
-
License
Copyright (c) Dyn...
Repository
-
Last release
2 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.301.7

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.299.6

2 months ago

1.301.7

2 months ago

1.297.3

2 months ago

1.295.6

2 months ago

1.293.12

2 months ago

1.291.1

8 months ago

1.285.2

8 months ago

1.287.7

8 months ago

1.289.2

8 months ago

1.283.3

11 months ago

1.281.3

11 months ago

1.273.1

1 year ago

1.275.1

1 year ago

1.271.1

1 year ago

1.279.1

1 year ago

1.277.3

1 year ago

1.269.4

1 year ago

1.265.3

1 year ago

1.267.3

1 year ago

1.259.4

2 years ago

1.261.2

2 years ago

1.263.3

2 years ago

1.257.2

2 years ago

1.255.1

2 years ago

1.253.4

2 years ago

1.251.1

2 years ago

1.249.3

2 years ago

1.243.1

3 years ago

1.247.2

2 years ago

1.245.2

2 years ago

1.241.1

3 years ago

1.239.1

3 years ago

1.237.2

3 years ago

1.235.5

3 years ago

1.233.5

3 years ago

1.231.7

3 years ago

1.229.5

3 years ago

1.227.14

3 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