@dynatrace/dtrum-api-types 1.303.1 → 1.307.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE.md +1 -0
  2. package/README.md +44 -44
  3. package/package.json +18 -18
package/LICENSE.md ADDED
@@ -0,0 +1 @@
1
+ Copyright (c) Dynatrace LLC. All rights reserved.
package/README.md CHANGED
@@ -1,44 +1,44 @@
1
- # Dynatrace Dtrum Api Types
2
- This package contains the Typescript type information for the Dtrum Api of the javascript agent.
3
-
4
- Keep in mind that when the javascript agent is updated, this type package might not provide accurate types.
5
- Version: 1.303.1
6
-
7
- ## Installation
8
- > npm install --save-dev @dynatrace/dtrum-api-types
9
-
10
- ## Configuration
11
- Make sure to add these paths to `"typeRoots"` in tsconfig.json under `"compilerOptions"`
12
- ```
13
- "typeRoots": ["./node_modules/@types", "./node_modules/@dynatrace/"],
14
- ```
15
-
16
- ## Usage examples
17
- Type inference works out of the box for dtrum calls.
18
- ```
19
- if (window.dtrum) {
20
- window.dtrum.identifyUser("exampleId");
21
- } else {
22
- // handle missing dtrum api
23
- }
24
- ```
25
-
26
- In case some specific types or enums are needed, you can import them from `dtrum` types library.
27
- ```
28
- import { ActionNameResult } from '@dynatrace/dtrum-api-types';
29
-
30
- if (window.dtrum) {
31
- const result = window.dtrum.actionName("exampleName");
32
- switch(result) {
33
- case ActionNameResult.SUCCESS:
34
- // handle success...
35
- break;
36
- case ActionNameResult.ACTION_NOT_FOUND:
37
- // handle action not found...
38
- break;
39
- //etc...
40
- }
41
- } else {
42
- // handle missing dtrum api
43
- }
44
- ```
1
+ # Dynatrace Dtrum Api Types
2
+ This package contains the Typescript type information for the dtrum.* API of the RUM JavaScript.
3
+
4
+ Keep in mind that when the RUM JavaScript is updated, this type package might not provide accurate types.
5
+ Version: 1.307.0
6
+
7
+ ## Installation
8
+ > npm install --save-dev @dynatrace/dtrum-api-types
9
+
10
+ ## Configuration
11
+ Make sure to add these paths to `"typeRoots"` in tsconfig.json under `"compilerOptions"`
12
+ ```
13
+ "typeRoots": ["./node_modules/@types", "./node_modules/@dynatrace/"],
14
+ ```
15
+
16
+ ## Usage examples
17
+ Type inference works out of the box for dtrum calls.
18
+ ```
19
+ if (window.dtrum) {
20
+ window.dtrum.identifyUser("exampleId");
21
+ } else {
22
+ // handle missing dtrum api
23
+ }
24
+ ```
25
+
26
+ In case some specific types or enums are needed, you can import them from `dtrum` types library.
27
+ ```
28
+ import { ActionNameResult } from '@dynatrace/dtrum-api-types';
29
+
30
+ if (window.dtrum) {
31
+ const result = window.dtrum.actionName("exampleName");
32
+ switch(result) {
33
+ case ActionNameResult.SUCCESS:
34
+ // handle success...
35
+ break;
36
+ case ActionNameResult.ACTION_NOT_FOUND:
37
+ // handle action not found...
38
+ break;
39
+ //etc...
40
+ }
41
+ } else {
42
+ // handle missing dtrum api
43
+ }
44
+ ```
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
- {
2
- "name": "@dynatrace/dtrum-api-types",
3
- "version": "1.303.1",
4
- "description": "Typescript types for Dynatrace jsagents dtrum api.",
5
- "main": "",
6
- "typings": "dtrum.d.ts",
7
- "homepage": "https://www.dynatrace.com",
8
- "author": "Dynatrace",
9
- "license": "Copyright (c) Dynatrace LLC. All rights reserved.",
10
- "keywords": [
11
- "dynatrace",
12
- "jsagent",
13
- "dtrum",
14
- "api",
15
- "typescript",
16
- "types"
17
- ]
18
- }
1
+ {
2
+ "name": "@dynatrace/dtrum-api-types",
3
+ "version": "1.307.0",
4
+ "description": "Typescript types for the Dynatrace RUM JavaScript dtrum.* API",
5
+ "main": "",
6
+ "typings": "dtrum.d.ts",
7
+ "homepage": "https://www.dynatrace.com",
8
+ "author": "Dynatrace",
9
+ "license": "SEE LICENSE IN LICENSE.md",
10
+ "keywords": [
11
+ "dynatrace",
12
+ "jsagent",
13
+ "dtrum",
14
+ "api",
15
+ "typescript",
16
+ "types"
17
+ ]
18
+ }